| Previous | 15994 Revisions | Next |
| r6050 Monday 12th October, 2009 at 11:07:23 UTC by Nathan Woods |
|---|
| Updated to MAME 0.134u3 |
| [docs] | messnew.txt |
| [src/emu] | mame.c sound.c streams.c streams.h |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/m68000] | m68k_in.c m68kcpu.c m68kmmu.h |
| [src/emu/cpu/minx] | minx.h |
| [src/emu/cpu/mips] | psx.c |
| [src/emu/cpu/tms32025] | tms32025.c |
| [src/emu/cpu/tms34010] | 34010ops.c tms34010.c |
| [src/emu/cpu/tms57002] | tms57002.h |
| [src/emu/cpu/z8000] | z8000.c z8000ops.c |
| [src/emu/debug] | debugcpu.c debugvw.c textbuf.h |
| [src/emu/sound] | disc_dev.c disc_flt.c disc_inp.c disc_mth.c disc_sys.c disc_wav.c discrete.c discrete.h |
| [src/lib/util] | astring.c astring.h avcomp.c avcomp.h aviio.c aviio.h bitmap.c bitmap.h cdrom.c cdrom.h chd.c chd.h corefile.c corefile.h corestr.c corestr.h coreutil.c coreutil.h harddisk.c harddisk.h huffman.c huffman.h jedparse.c jedparse.h options.c options.h palette.c palette.h png.c png.h pool.c pool.h unicode.c unicode.h unzip.c unzip.h vbiparse.c vbiparse.h xmlfile.c xmlfile.h |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | 8080bw.c asteroid.c avalnche.c blockade.c canyon.c circus.c cliffhgr.c crbaloon.c dkong.c dragrace.c galaxian.c hitme.c irem.c llander.c m79amb.c madalien.c mario.c mw8080bw.c nitedrvr.c phoenix.c poolshrk.c qix.c skyraid.c snk6502.c spiders.c sprint8.c starshp1.c tank8.c |
| [src/mame/drivers] | arkanoid.c attckufo.c backfire.c bingor.c btime.c galaxian.c galdrvr.c hshavoc.c ironhors.c megadriv.c megadriv.h megaplay.c megatech.c model3.c multfish.c multigam.c mw8080bw.c norautp.c puckpkmn.c stv.c taito_h.c topshoot.c |
| [src/mame/includes] | arkanoid.h genesis.h mw8080bw.h |
| [src/mame/machine] | arkanoid.c scudsp.c snes7110.c snesdsp2.c snesobc1.c snesrtc.c snessdd1.c snesst10.c |
| [src/mame/video] | atari.c vdc.c |
| [src/mess/drivers] | osi.c |
| [src/osd] | osdcomm.h osdcore.h osdepend.h |
| [src/osd/osdmini] | minidir.c minifile.c minimain.c* minimisc.c minisync.c minitime.c miniwork.c osdmini.mak |
| [src/osd/windows] | d3d8intf.c d3d9intf.c d3dintf.h debugwin.c debugwin.h drawd3d.c drawdd.c drawgdi.c drawnone.c eivc.h eivcx86.h input.c input.h ledutil.c mame.rc osinline.h output.c output.h sound.c sound.h strconv.c strconv.h vconv.c video.c video.h winalloc.c windir.c window.c window.h windows.mak winfile.c winmain.c winmain.h winmisc.c winprefix.h winsync.c wintime.c winutf8.c winutf8.h winutil.c winutil.h winwork.c |
| r6049 | r6050 | |
|---|---|---|
| 370 | 370 | NODE_22, |
| 371 | 371 | NODE_23) |
| 372 | 372 | DISCRETE_RCFILTER(NODE_25, |
| 373 | 1, | |
| 374 | 373 | NODE_24, |
| 375 | 374 | 1.0/(1.0/RES_K(10) + 1.0/RES_K(100)), /* R19, R20 */ |
| 376 | 375 | CAP_U(.047)) /* C5 */ |
| r6049 | r6050 | |
| 429 | 428 | &phoenix_effect2_mixer2) |
| 430 | 429 | /* C22 charging is R45 in parallel with R46, R42 and the 555 CV internal resistance */ |
| 431 | 430 | DISCRETE_RCFILTER(NODE_37, |
| 432 | 1, /* ENAB */ | |
| 433 | 431 | NODE_36, |
| 434 | 432 | 1.0/ (1.0/RES_K(5.1) + (1.0/(RES_K(5.1) + 1.0/(1.0/RES_K(10) + 1.0/RES_K(5) + 1.0/RES_K(10)) ))), |
| 435 | 433 | CAP_U(100)) /* R45, R46, R42, internal 555 Rs, C22 */ |
| r6049 | r6050 | |
|---|---|---|
| 117 | 117 | /************************************************/ |
| 118 | 118 | DISCRETE_LFSR_NOISE(AVALNCHE_NOISE, AVALNCHE_ATTRACT_EN, AVALNCHE_ATTRACT_EN, 15750.0, AVALNCHE_SOUNDLVL_DATA, 0, 0, &avalnche_lfsr) |
| 119 | 119 | DISCRETE_ADDER2(NODE_30, 1, NODE_20, AVALNCHE_NOISE) |
| 120 | DISCRETE_RCFILTER(AVALNCHE_SOUNDLVL_AUD0_SND, | |
| 120 | DISCRETE_RCFILTER(AVALNCHE_SOUNDLVL_AUD0_SND, | |
| 121 | 121 | |
| 122 | 122 | /************************************************/ |
| 123 | 123 | /* Final mix and output. */ |
| r6049 | r6050 | |
|---|---|---|
| 344 | 344 | DISCRETE_LOGIC_INVERT(NODE_170, GAL_INP_FIRE) |
| 345 | 345 | DISCRETE_MULTIPLY(NODE_171, TTL_OUT, GAL_INP_FIRE) |
| 346 | 346 | DISCRETE_MULTIPLY(NODE_172, TTL_OUT, NODE_170) // inverted |
| 347 | DISCRETE_RCFILTER(NODE_173, | |
| 347 | DISCRETE_RCFILTER(NODE_173, | |
| 348 | 348 | /* Mix noise and 163 */ |
| 349 | 349 | DISCRETE_TRANSFORM5(NODE_177, NODE_152, TTL_OUT, 1.0/GAL_R46, NODE_173, 1.0/GAL_R48, |
| 350 | 350 | "01*2*34*+" ) |
| r6049 | r6050 | |
|---|---|---|
| 73 | 73 | DISCRETE_555_ASTABLE(NODE_24,1,22e3,39e3,NODE_23,&desc_hitme_555) |
| 74 | 74 | |
| 75 | 75 | /* The output of the 555 timer is fed through a simple CR filter in the amp stage. */ |
| 76 | DISCRETE_CRFILTER(HITME_FINAL_SND, | |
| 76 | DISCRETE_CRFILTER(HITME_FINAL_SND, | |
| 77 | 77 | |
| 78 | 78 | /* We scale the final output of 3.8 to 16-bit range and output it at full volume */ |
| 79 | 79 | DISCRETE_OUTPUT(HITME_FINAL_SND,32000.0/3.8) |
| r6049 | r6050 | |
|---|---|---|
| 113 | 113 | /************************************************/ |
| 114 | 114 | DISCRETE_DAC_R1(NODE_30, ASTEROID_THUMP_DATA, 3.5, &asteroid_thump_dac1) // CMOS |
| 115 | 115 | DISCRETE_555_CC(NODE_31, ASTEROID_THUMP_EN, NODE_30, RES_K(22), CAP_U(0.22), 0, 0, RES_K(18), &asteroid_thump_555cc) |
| 116 | DISCRETE_RCFILTER(NODE_32, | |
| 116 | DISCRETE_RCFILTER(NODE_32, | |
| 117 | 117 | DISCRETE_GAIN(ASTEROID_THUMP_SND, NODE_32, 30) |
| 118 | 118 | |
| 119 | 119 | /************************************************/ |
| r6049 | r6050 | |
| 135 | 135 | DISCRETE_TRANSFORM4(NODE_42, ASTEROID_SAUCER_SEL, -250, NODE_41, 750, "01*2+3+") // Large saucer is 250hz lower |
| 136 | 136 | |
| 137 | 137 | DISCRETE_TRIANGLEWAVE(NODE_43, ASTEROID_SAUCER_SND_EN, NODE_42, 76.1, 0, 0) |
| 138 | DISCRETE_RCFILTER(ASTEROID_SAUCER_SND, | |
| 138 | DISCRETE_RCFILTER(ASTEROID_SAUCER_SND, | |
| 139 | 139 | |
| 140 | 140 | /************************************************/ |
| 141 | 141 | /* The Ship Fire sound is produced by a 555 */ |
| r6049 | r6050 | |
| 147 | 147 | DISCRETE_ADDER2(NODE_52, 1, NODE_51, 7.0) /* Amplitude */ |
| 148 | 148 | DISCRETE_TRANSFORM3(NODE_53, 4500, NODE_50, 67, "01/2+") /* Duty */ |
| 149 | 149 | DISCRETE_SQUAREWAVE(NODE_54, ASTEROID_SHIP_FIRE_EN, NODE_50, NODE_52, NODE_53, 0, 0) |
| 150 | DISCRETE_RCFILTER(ASTEROID_SHIP_FIRE_SND, | |
| 150 | DISCRETE_RCFILTER(ASTEROID_SHIP_FIRE_SND, | |
| 151 | 151 | |
| 152 | 152 | /************************************************/ |
| 153 | 153 | /* The Saucer Fire sound is produced by a 555 */ |
| r6049 | r6050 | |
| 159 | 159 | DISCRETE_ADDER2(NODE_62, 1, NODE_61, 7.0) /* Amplitude */ |
| 160 | 160 | DISCRETE_TRANSFORM3(NODE_63, 4500, NODE_60, 67, "01/2+") /* Duty */ |
| 161 | 161 | DISCRETE_SQUAREWAVE(NODE_64, ASTEROID_SAUCER_FIRE_EN, NODE_60, NODE_62, NODE_63, 0, 0) |
| 162 | DISCRETE_RCFILTER(ASTEROID_SAUCER_FIRE_SND, | |
| 162 | DISCRETE_RCFILTER(ASTEROID_SAUCER_FIRE_SND, | |
| 163 | 163 | |
| 164 | 164 | /************************************************/ |
| 165 | 165 | /* Thrust noise is a gated noise source */ |
| r6049 | r6050 | |
| 171 | 171 | DISCRETE_LFSR_NOISE(ASTEROID_NOISE, ASTEROID_NOISE_RESET, ASTEROID_NOISE_RESET, 12000.0, 1.0, 0, 0, &asteroid_lfsr) |
| 172 | 172 | |
| 173 | 173 | DISCRETE_GAIN(NODE_70, ASTEROID_NOISE, 600.0*7.6) |
| 174 | DISCRETE_RCFILTER(NODE_71, ASTEROID_THRUST_EN, NODE_70, 2200, 1e-6) | |
| 174 | DISCRETE_RCFILTER(NODE_71, NODE_70, 2200, 1e-6) | |
| 175 | DISCRETE_MULTIPLY(NODE_72, NODE_71, ASTEROID_THRUST_EN) | |
| 175 | 176 | /* TBD - replace this line with a Sallen-Key Bandpass macro */ |
| 176 | DISCRETE_FILTER2(NODE_7 | |
| 177 | DISCRETE_FILTER2(NODE_73, 1, NODE_72, 89.5, (1.0 / 7.6), DISC_FILTER_BANDPASS) | |
| 177 | 178 | /* TBD - replace this line with a Active Lowpass macro */ |
| 178 | DISCRETE_FILTER1(ASTEROID_THRUST_SND, 1, NODE_7 | |
| 179 | DISCRETE_FILTER1(ASTEROID_THRUST_SND, 1, NODE_73, 160, DISC_FILTER_LOWPASS) | |
| 179 | 180 | |
| 180 | 181 | /************************************************/ |
| 181 | 182 | /* Explosion generation circuit, pitch and vol */ |
| r6049 | r6050 | |
| 195 | 196 | DISCRETE_SQUAREWFIX(NODE_82, 1, NODE_80, 1.0, NODE_81, 1.0/2, 0) /* Pitch clock */ |
| 196 | 197 | DISCRETE_SAMPLHOLD(NODE_83, ASTEROID_NOISE, NODE_82, DISC_SAMPHOLD_REDGE) |
| 197 | 198 | DISCRETE_MULTIPLY(NODE_84, NODE_83, ASTEROID_EXPLODE_DATA) |
| 198 | DISCRETE_RCFILTER(ASTEROID_EXPLODE_SND, | |
| 199 | DISCRETE_RCFILTER(ASTEROID_EXPLODE_SND, | |
| 199 | 200 | |
| 200 | 201 | /************************************************/ |
| 201 | 202 | /* Life enable is just 3KHz tone from the clock */ |
| r6049 | r6050 | |
| 241 | 242 | DISCRETE_LFSR_NOISE(ASTEROID_NOISE, ASTEROID_NOISE_RESET, ASTEROID_NOISE_RESET, 12000.0, 1.0, 0, 0, &asteroid_lfsr) |
| 242 | 243 | |
| 243 | 244 | DISCRETE_GAIN(NODE_70, ASTEROID_NOISE, 1000.0*7.6) |
| 244 | DISCRETE_RCFILTER(NODE_71, ASTEROID_THRUST_EN, NODE_70, 2200, 1e-6) | |
| 245 | DISCRETE_RCFILTER(NODE_71, NODE_70, 2200, 1e-6) | |
| 246 | DISCRETE_MULTIPLY(NODE_72, NODE_71, ASTEROID_THRUST_EN) | |
| 245 | 247 | /* TBD - replace this line with a Sallen-Key Bandpass macro */ |
| 246 | DISCRETE_FILTER2(NODE_7 | |
| 248 | DISCRETE_FILTER2(NODE_73, 1, NODE_72, 89.5, (1.0 / 7.6), DISC_FILTER_BANDPASS) | |
| 247 | 249 | /* TBD - replace this line with a Active Lowpass macro */ |
| 248 | DISCRETE_FILTER1(ASTEROID_THRUST_SND, 1, NODE_7 | |
| 250 | DISCRETE_FILTER1(ASTEROID_THRUST_SND, 1, NODE_73, 160, DISC_FILTER_LOWPASS) | |
| 249 | 251 | |
| 250 | 252 | /************************************************/ |
| 251 | 253 | /* Explosion generation circuit, pitch and vol */ |
| r6049 | r6050 | |
| 265 | 267 | DISCRETE_SQUAREWFIX(NODE_82, 1, NODE_80, 1.0, NODE_81, 1.0/2, 0) /* Pitch clock */ |
| 266 | 268 | DISCRETE_SAMPLHOLD(NODE_83, ASTEROID_NOISE, NODE_82, DISC_SAMPHOLD_REDGE) |
| 267 | 269 | DISCRETE_MULTIPLY(NODE_84, NODE_83, ASTEROID_EXPLODE_DATA) |
| 268 | DISCRETE_RCFILTER(ASTEROID_EXPLODE_SND, | |
| 270 | DISCRETE_RCFILTER(ASTEROID_EXPLODE_SND, | |
| 269 | 271 | |
| 270 | 272 | /************************************************/ |
| 271 | 273 | /* Combine all 7 sound sources with a double */ |
| r6049 | r6050 | |
|---|---|---|
| 37 | 37 | DISCRETE_ONOFF(NODE_05,CLIFF_ENABLE_SND_1,NODE_03) |
| 38 | 38 | DISCRETE_ONOFF(NODE_06,CLIFF_ENABLE_SND_2,NODE_04) |
| 39 | 39 | |
| 40 | DISCRETE_RCFILTER(NODE_07,1,NODE_05,1.0/(1.0/RES_K(4.7)+1.0/RES_K(10)), CAP_U(0.1)) | |
| 41 | DISCRETE_RCFILTER(NODE_08,1,NODE_06,1.0/(1.0/RES_K(5.1)+1.0/RES_K(12)), CAP_U(0.1)) | |
| 40 | DISCRETE_RCFILTER(NODE_07,NODE_05,1.0/(1.0/RES_K(4.7)+1.0/RES_K(10)), CAP_U(0.1)) | |
| 41 | DISCRETE_RCFILTER(NODE_08,NODE_06,1.0/(1.0/RES_K(5.1)+1.0/RES_K(12)), CAP_U(0.1)) | |
| 42 | 42 | |
| 43 | 43 | DISCRETE_GAIN(NODE_09,NODE_07,RES_K(10)/(RES_K(4.7)+RES_K(10))) |
| 44 | 44 | DISCRETE_GAIN(NODE_10,NODE_08,RES_K(12)/(RES_K(5.1)+RES_K(12))) |
| r6049 | r6050 | |
|---|---|---|
| 74 | 74 | /* Bump is just a triggered 128V signal */ |
| 75 | 75 | /************************************************/ |
| 76 | 76 | DISCRETE_SQUAREWFIX(NODE_20, POOLSHRK_BUMP_EN, 15750.0/2.0/128.0, 3.4, 50.0, 3.4/2, 0.0) // 128V signal 3.4V |
| 77 | DISCRETE_RCFILTER(POOLSHRK_BUMP_SND, | |
| 77 | DISCRETE_RCFILTER(POOLSHRK_BUMP_SND, | |
| 78 | 78 | |
| 79 | 79 | /************************************************/ |
| 80 | 80 | /* Score is a triggered 0-15 count of the */ |
| r6049 | r6050 | |
|---|---|---|
| 31 | 31 | /* oscillator to 0Hz. (OUT02 = FF) */ |
| 32 | 32 | /************************************************/ |
| 33 | 33 | DISCRETE_NOTE(BLOCKADE_NOTE, 1, 93681.5, BLOCKADE_NOTE_DATA, 255, 1, DISC_CLK_IS_FREQ | DISC_OUT_IS_ENERGY) |
| 34 | DISCRETE_CRFILTER(NODE_10, | |
| 34 | DISCRETE_CRFILTER(NODE_10, | |
| 35 | 35 | |
| 36 | 36 | DISCRETE_OUTPUT(NODE_10, 7500) |
| 37 | 37 | DISCRETE_SOUND_END |
| r6049 | r6050 | |
|---|---|---|
| 91 | 91 | /* 0k = 214Hz. 250k = 4416Hz */ |
| 92 | 92 | /* NOTE: freqs are ripped from Sprint for now. */ |
| 93 | 93 | /************************************************/ |
| 94 | DISCRETE_RCFILTER(NODE_20, | |
| 94 | DISCRETE_RCFILTER(NODE_20, | |
| 95 | 95 | DISCRETE_ADJUSTMENT_TAG(NODE_21, (214.0-27.0)/12/31, (4416.0-27.0)/12/31, DISC_LOGADJ, "MOTOR1") |
| 96 | 96 | DISCRETE_MULTIPLY(NODE_22, NODE_20, NODE_21) |
| 97 | 97 | |
| 98 | 98 | DISCRETE_MULTADD(NODE_23, NODE_22, 2, 27.0/6) /* F1 = /12*2 = /6 */ |
| 99 | 99 | DISCRETE_SQUAREWAVE(NODE_24, 1, NODE_23, (581.6/3), 50.0, 0, 0) |
| 100 | DISCRETE_RCFILTER(NODE_25, | |
| 100 | DISCRETE_RCFILTER(NODE_25, | |
| 101 | 101 | |
| 102 | 102 | DISCRETE_MULTADD(NODE_26, NODE_22, 3, 27.0/4) /* F2 = /12*3 = /4 */ |
| 103 | 103 | DISCRETE_SQUAREWAVE(NODE_27, 1, NODE_26, (581.6/3), 50.0, 0, 0) |
| 104 | DISCRETE_RCFILTER(NODE_28, | |
| 104 | DISCRETE_RCFILTER(NODE_28, | |
| 105 | 105 | |
| 106 | 106 | DISCRETE_MULTADD(NODE_29, NODE_22, 4, 27.0/3) /* F3 = /12*4 = /3 */ |
| 107 | 107 | DISCRETE_SQUAREWAVE(NODE_30, 1, NODE_29, (581.6/3), 100.0/3, 0, 360.0/3) |
| 108 | DISCRETE_RCFILTER(NODE_31, | |
| 108 | DISCRETE_RCFILTER(NODE_31, | |
| 109 | 109 | |
| 110 | 110 | DISCRETE_ADDER3(DRAGRACE_MOTOR1_SND, DRAGRACE_MOTOR1_EN, NODE_25, NODE_28, NODE_31) |
| 111 | 111 | |
| r6049 | r6050 | |
| 114 | 114 | /* Car1. But I shifted the frequencies up for */ |
| 115 | 115 | /* it to sound different from car1. */ |
| 116 | 116 | /************************************************/ |
| 117 | DISCRETE_RCFILTER(NODE_40, | |
| 117 | DISCRETE_RCFILTER(NODE_40, | |
| 118 | 118 | DISCRETE_ADJUSTMENT_TAG(NODE_41, (214.0-27.0)/12/31, (4416.0-27.0)/12/31, DISC_LOGADJ, "MOTOR2") |
| 119 | 119 | DISCRETE_MULTIPLY(NODE_42, NODE_40, NODE_41) |
| 120 | 120 | |
| 121 | 121 | DISCRETE_MULTADD(NODE_43, NODE_42, 2, 27.0/6) /* F1 = /12*2 = /6 */ |
| 122 | 122 | DISCRETE_SQUAREWAVE(NODE_44, 1, NODE_43, (581.6/3), 50.0, 0, 0) |
| 123 | DISCRETE_RCFILTER(NODE_45, | |
| 123 | DISCRETE_RCFILTER(NODE_45, | |
| 124 | 124 | |
| 125 | 125 | DISCRETE_MULTADD(NODE_46, NODE_42, 3, 27.0/4) /* F2 = /12*3 = /4 */ |
| 126 | 126 | DISCRETE_SQUAREWAVE(NODE_47, 1, NODE_46, (581.6/3), 50.0, 0, 0) |
| 127 | DISCRETE_RCFILTER(NODE_48, | |
| 127 | DISCRETE_RCFILTER(NODE_48, | |
| 128 | 128 | |
| 129 | 129 | DISCRETE_MULTADD(NODE_49, NODE_42, 4, 27.0/3) /* F3 = /12*4 = /3 */ |
| 130 | 130 | DISCRETE_SQUAREWAVE(NODE_50, 1, NODE_49, (581.6/3), 100.0/3, 0, 360.0/3) |
| 131 | DISCRETE_RCFILTER(NODE_51, | |
| 131 | DISCRETE_RCFILTER(NODE_51, | |
| 132 | 132 | |
| 133 | 133 | DISCRETE_ADDER3(DRAGRACE_MOTOR2_SND, DRAGRACE_MOTOR2_EN, NODE_45, NODE_48, NODE_51) |
| 134 | 134 | |
| r6049 | r6050 | |
| 144 | 144 | |
| 145 | 145 | DISCRETE_RAMP(NODE_61, DRAGRACE_EXPLODE1_EN, DRAGRACE_EXPLODE1_EN, (1000.0-0.0)/1, 1000.0, 0.0, 1000.0) |
| 146 | 146 | DISCRETE_MULTIPLY(NODE_62, DRAGRACE_NOISE, NODE_61) |
| 147 | DISCRETE_RCFILTER(DRAGRACE_EXPLODE1_SND, DRAGRACE_KLEXPL1_EN, NODE_62, 1500, 2.2e-7) | |
| 147 | DISCRETE_RCFILTER(NODE_63, NODE_62, 1500, 2.2e-7) | |
| 148 | DISCRETE_MULTIPLY(DRAGRACE_EXPLODE1_SND, NODE_63, DRAGRACE_KLEXPL1_EN) | |
| 148 | 149 | |
| 149 | 150 | DISCRETE_RAMP(NODE_66, DRAGRACE_EXPLODE2_EN, DRAGRACE_EXPLODE2_EN, (1000.0-0.0)/1, 1000.0, 0.0, 1000.0) |
| 150 | 151 | DISCRETE_MULTIPLY(NODE_67, DRAGRACE_NOISE, NODE_66) |
| 151 | DISCRETE_RCFILTER(DRAGRACE_EXPLODE2_SND, DRAGRACE_KLEXPL2_EN, NODE_67, 1500, 2.2e-7) | |
| 152 | DISCRETE_RCFILTER(NODE_68, NODE_67, 1500, 2.2e-7) | |
| 153 | DISCRETE_MULTIPLY(DRAGRACE_EXPLODE2_SND, NODE_68, DRAGRACE_KLEXPL2_EN) | |
| 152 | 154 | |
| 153 | 155 | /************************************************/ |
| 154 | 156 | /* Skid circuits takes the noise output from */ |
| r6049 | r6050 | |
| 165 | 167 | /************************************************/ |
| 166 | 168 | DISCRETE_INVERT(NODE_70, DRAGRACE_NOISE) |
| 167 | 169 | DISCRETE_MULTADD(NODE_71, NODE_70, 940.0-630.0, ((940.0-630.0)/2)+630.0) |
| 168 | DISCRETE_RCFILTER(NODE_72, | |
| 170 | DISCRETE_RCFILTER(NODE_72, | |
| 169 | 171 | DISCRETE_SQUAREWAVE(NODE_73, 1, NODE_72, 407.8, 31.5, 0, 0.0) |
| 170 | 172 | DISCRETE_ONOFF(DRAGRACE_SCREECH1_SND, DRAGRACE_SCREECH1_EN, NODE_73) |
| 171 | 173 | DISCRETE_ONOFF(DRAGRACE_SCREECH2_SND, DRAGRACE_SCREECH2_EN, NODE_73) |
| r6049 | r6050 | |
|---|---|---|
| 133 | 133 | DISC_MIXER_IS_RESISTOR, |
| 134 | 134 | {STARSHP1_R66, STARSHP1_R126, STARSHP1_R59 + STARSHP1_R60, STARSHP1_R74, STARSHP1_R75}, |
| 135 | 135 | {0}, /* no resistor nodes */ |
| 136 | {0, STARSHP1_C78, | |
| 136 | {0, STARSHP1_C78, 0 | |
| 137 | 137 | 0, |
| 138 | 138 | STARSHP1_R76, |
| 139 | 139 | 0, /* no cF */ |
| r6049 | r6050 | |
| 157 | 157 | DISCRETE_INPUT_LOGIC(STARSHP1_SL1) |
| 158 | 158 | DISCRETE_INPUT_LOGIC(STARSHP1_KICKER) |
| 159 | 159 | DISCRETE_INPUT_LOGIC(STARSHP1_PHASOR_ON) |
| 160 | DISCRETE_INPUT_NOT (STARSHP1_MOLVL) | |
| 160 | 161 | DISCRETE_INPUT_NOT (STARSHP1_ATTRACT) /* Inverted by Q9 */ |
| 161 | /* when MOLVL is high, R58 is grounded, reducing the gain by 50% */ | |
| 162 | /* we will cheat and calculate that now */ | |
| 163 | #define STARSHP1_MOLVL_GAIN STARSHP1_MOLVL | |
| 164 | #define STARSHP1_MOLVL_GAIN_VAL RES_VOLTAGE_DIVIDER(STARSHP1_R59, STARSHP1_R58) | |
| 165 | DISCRETE_INPUTX_LOGIC(STARSHP1_MOLVL_GAIN, -STARSHP1_MOLVL_GAIN_VAL, STARSHP1_MOLVL_GAIN_VAL, 1) | |
| 166 | 162 | |
| 167 | 163 | /************************************************ |
| 168 | 164 | * Noise |
| r6049 | r6050 | |
| 186 | 182 | NODE_21, |
| 187 | 183 | STARSHP1_NOISE_AMPLITUDE) |
| 188 | 184 | DISCRETE_RCFILTER( NODE_23, |
| 189 | 1, /* ENAB */ | |
| 190 | 185 | NODE_22, |
| 191 | 186 | STARSHP1_FAKE_MC3340_COMPENSATION_R, |
| 192 | 187 | STARSHP1_C61) |
| 193 | 188 | /* when NOISE_FREQ is high (NOISE_FREQ_INV is low), C59 is in circuit */ |
| 194 | 189 | DISCRETE_RCFILTER( NODE_24, |
| 195 | 1, /* ENAB */ | |
| 196 | 190 | NODE_22, |
| 197 | 191 | STARSHP1_FAKE_MC3340_COMPENSATION_R, |
| 198 | 192 | STARSHP1_C61 + STARSHP1_C59) |
| r6049 | r6050 | |
| 246 | 240 | STARSHP1_C34, |
| 247 | 241 | 5, -10, NODE_41, /* VPOS,VNEG,VCHARGE */ |
| 248 | 242 | DISC_566_OUT_TRIANGLE) |
| 243 | DISCRETE_SWITCH(NODE_43, | |
| 244 | 1, /* ENAB */ | |
| 245 | STARSHP1_MOLVL, /* SWITCH */ | |
| 246 | STARSHP1_R59 + RES_2_PARALLEL(STARSHP1_R58, STARSHP1_R60 + STARSHP1_R76), | |
| 247 | STARSHP1_R59 + STARSHP1_R60 + STARSHP1_R76) | |
| 248 | DISCRETE_CRFILTER(NODE_44, | |
| 249 | NODE_42, /* IN0 */ | |
| 250 | NODE_43, /* RVAL*/ | |
| 251 | STARSHP1_C36) | |
| 252 | DISCRETE_SWITCH(NODE_45, /* gain affect of voltage divider */ | |
| 253 | 1, /* ENAB */ | |
| 254 | STARSHP1_MOLVL, /* SWITCH */ | |
| 255 | RES_VOLTAGE_DIVIDER(STARSHP1_R59, STARSHP1_R58), 1) | |
| 249 | 256 | DISCRETE_MULTIPLY( STARSHP1_MOTOR_SND, |
| 250 | NODE_42, | |
| 251 | STARSHP1_MOLVL_GAIN) | |
| 257 | NODE_44, | |
| 258 | NODE_45) | |
| 252 | 259 | |
| 253 | 260 | /************************************************ |
| 254 | 261 | * SL1, SL2 |
| r6049 | r6050 | |
| 266 | 273 | &starshp1_555_b10) |
| 267 | 274 | /* use switch instead of logic AND, so we can switch between |
| 268 | 275 | * 0V and the anti-aliased TTL level out that we set NODE_51 to. */ |
| 269 | DISCRETE_SWITCH( STARSHP1_SL1_SND, /* IC A10, pin 11 */ | |
| 270 | 1, /* ENAB */ | |
| 271 | STARSHP1_SL1, | |
| 272 | 0, | |
| 273 | NODE_51) | |
| 274 | DISCRETE_SWITCH( STARSHP1_SL2_SND, /* IC A10, pin 8 */ | |
| 275 | 1, /* ENAB */ | |
| 276 | STARSHP1_SL2, | |
| 277 | 0, | |
| 278 | NODE_51) | |
| 276 | DISCRETE_ONOFF( STARSHP1_SL1_SND, /* IC A10, pin 11 */ | |
| 277 | STARSHP1_SL1, NODE_51) | |
| 278 | DISCRETE_ONOFF( STARSHP1_SL2_SND, /* IC A10, pin 8 */ | |
| 279 | STARSHP1_SL2, NODE_51) | |
| 279 | 280 | |
| 280 | 281 | /************************************************ |
| 281 | 282 | * Mixing and output |
| r6049 | r6050 | |
|---|---|---|
| 263 | 263 | * Final Mixing and Output |
| 264 | 264 | * |
| 265 | 265 | ******************************************************************************/ |
| 266 | DISCRETE_CRFILTER(NODE_90, | |
| 266 | DISCRETE_CRFILTER(NODE_90, | |
| 267 | 267 | |
| 268 | 268 | DISCRETE_OUTPUT(NODE_90, 21000) |
| 269 | 269 | |
| r6049 | r6050 | |
| 347 | 347 | {DISC_OP_AMP_OSCILLATOR_VCO_1 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_CAP, RES_M(1), RES_K(680), RES_K(680), RES_M(1), RES_M(1), RES_K(120), RES_M(1), 0, CAP_P(180), 12}; |
| 348 | 348 | |
| 349 | 349 | static const discrete_op_amp_tvca_info polaris_sonar_tvca_info = |
| 350 | { RES_M(2.7), RES_K(680), 0, RES_K(680), RES_K(1), RES_K(120), RES_K(560), 0, 0, 0, 0, CAP_U(1), 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG1, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 350 | { RES_M(2.7), RES_K(680), 0, RES_K(680), RES_K(1), RES_K(120), RES_K(560), 0, 0, 0, 0, CAP_U(1), 0, 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG1, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 351 | 351 | |
| 352 | 352 | static const discrete_op_amp_osc_info polaris_boat_mod_info = |
| 353 | 353 | {DISC_OP_AMP_OSCILLATOR_1 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_CAP, RES_M(1), RES_K(10), RES_K(100), RES_K(120), RES_M(1), 0, 0, 0, CAP_U(.22), 12}; |
| r6049 | r6050 | |
| 356 | 356 | {DISC_OP_AMP_OSCILLATOR_VCO_1 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_CAP, RES_M(1), RES_K(680), RES_K(680), RES_M(1), RES_M(1), 0, 0, 0, CAP_P(180), 12}; |
| 357 | 357 | |
| 358 | 358 | static const discrete_op_amp_tvca_info polaris_shot_tvca_info = |
| 359 | { RES_M(2.7), RES_K(680), RES_K(680), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 359 | { RES_M(2.7), RES_K(680), RES_K(680), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 360 | 360 | |
| 361 | 361 | static const discrete_op_amp_tvca_info polaris_shiphit_tvca_info = |
| 362 | { RES_M(2.7), RES_K(680), RES_K(680), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 362 | { RES_M(2.7), RES_K(680), RES_K(680), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0_INV, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 363 | 363 | |
| 364 | 364 | static const discrete_op_amp_tvca_info polaris_exp_tvca_info = |
| 365 | { RES_M(2.7), RES_K(680), 0, RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(.33), 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 365 | { RES_M(2.7), RES_K(680), 0, RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(.33), 0, 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 366 | 366 | |
| 367 | 367 | // The schematic shows a .22uF cap but Guru's board has a 1uF |
| 368 | 368 | static const discrete_op_amp_tvca_info polaris_hit_tvca_info = |
| 369 | { RES_M(2.7), RES_K(1360), RES_K(1360), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG1, DISC_OP_AMP_TRIGGER_FUNCTION_TRG01_NAND, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 369 | { RES_M(2.7), RES_K(1360), RES_K(1360), RES_K(680), RES_K(1), 0, RES_K(680), 0, 0, 0, 0, CAP_U(1), 0, 0, 0, 12, 12, 12, 12, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG1, DISC_OP_AMP_TRIGGER_FUNCTION_TRG01_NAND, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE, DISC_OP_AMP_TRIGGER_FUNCTION_NONE}; | |
| 370 | 370 | |
| 371 | 371 | // The schematic shows a 1uF cap but Guru's board has a 2.2uF |
| 372 | 372 | static const discrete_integrate_info polaris_plane_integrate_info = |
| r6049 | r6050 | |
| 574 | 574 | ******************************************************************************/ |
| 575 | 575 | DISCRETE_OP_AMP_TRIG_VCA(NODE_70, POLARIS_SX3_EN, 0, 0, POLARIS_NOISE_LO, 0, &polaris_exp_tvca_info) |
| 576 | 576 | |
| 577 | DISCRETE_RCFILTER(NODE_71, 1, NODE_70, 560.0, CAP_U(.22)) | |
| 578 | DISCRETE_RCFILTER(POLARIS_EXPLOSIONSND, 1, NODE_71, RES_K(6.8), CAP_U(.22)) | |
| 577 | DISCRETE_RCFILTER(NODE_71, NODE_70, 560.0, CAP_U(.22)) | |
| 578 | DISCRETE_RCFILTER(POLARIS_EXPLOSIONSND, NODE_71, RES_K(6.8), CAP_U(.22)) | |
| 579 | 579 | |
| 580 | 580 | /****************************************************************************** |
| 581 | 581 | * |
| r6049 | r6050 | |
| 759 | 759 | DISCRETE_SQUAREWFIX(NODE_20, 1, SCHASER_4V, DEFAULT_TTL_V_LOGIC_1, 50, 0, 0) |
| 760 | 760 | DISCRETE_SQUAREWFIX(NODE_21, 1, SCHASER_8V, DEFAULT_TTL_V_LOGIC_1, 50, 0, 0) |
| 761 | 761 | DISCRETE_SWITCH(NODE_22, SCHASER_DOT_EN, SCHASER_DOT_SEL, NODE_20, NODE_21) |
| 762 | DISCRETE_RCFILTER(NODE_23, 1, NODE_22, 560, CAP_U(.1)) | |
| 763 | DISCRETE_RCFILTER(NODE_24, 1, NODE_23, RES_K(6.8) + 560, CAP_U(.1)) | |
| 762 | DISCRETE_RCFILTER(NODE_23, NODE_22, 560, CAP_U(.1)) | |
| 763 | DISCRETE_RCFILTER(NODE_24, NODE_23, RES_K(6.8) + 560, CAP_U(.1)) | |
| 764 | 764 | DISCRETE_MULTIPLY(SCHASER_DOT_SND, NODE_24, SCHASER_VR3) |
| 765 | 765 | |
| 766 | 766 | /************************************************/ |
| 767 | 767 | /* Explosion/Effect filtering */ |
| 768 | 768 | /************************************************/ |
| 769 | DISCRETE_RCFILTER(NODE_30, 1, SCHASER_EXP_STREAM, 560, CAP_U(.1)) | |
| 770 | DISCRETE_RCFILTER(NODE_31, 1, NODE_30, RES_K(6.8) + 560, CAP_U(.1)) | |
| 771 | DISCRETE_CRFILTER(NODE_32, 1, NODE_31, RES_K(6.8) + 560 + RES_K(2) + RES_K(50), CAP_U(1)) | |
| 769 | DISCRETE_RCFILTER(NODE_30, SCHASER_EXP_STREAM, 560, CAP_U(.1)) | |
| 770 | DISCRETE_RCFILTER(NODE_31, NODE_30, RES_K(6.8) + 560, CAP_U(.1)) | |
| 771 | DISCRETE_CRFILTER(NODE_32, NODE_31, RES_K(6.8) + 560 + RES_K(2) + RES_K(50), CAP_U(1)) | |
| 772 | 772 | DISCRETE_MULTIPLY(SCHASER_EXP_SND, NODE_32, SCHASER_VR2) |
| 773 | 773 | |
| 774 | 774 | /************************************************/ |
| 775 | 775 | /* Music is just a 1 bit DAC */ |
| 776 | 776 | /************************************************/ |
| 777 | DISCRETE_CRFILTER(NODE_40, | |
| 777 | DISCRETE_CRFILTER(NODE_40, | |
| 778 | 778 | DISCRETE_MULTIPLY(SCHASER_MUSIC_SND, NODE_40, SCHASER_VR1) |
| 779 | 779 | |
| 780 | 780 | /************************************************/ |
| r6049 | r6050 | |
|---|---|---|
| 233 | 233 | 12, 0, 12, /* VPOS,VNEG,VCHARGE */ |
| 234 | 234 | DISC_566_OUT_DC | DISC_566_OUT_TRIANGLE) |
| 235 | 235 | DISCRETE_CRFILTER(NODE_53, |
| 236 | M79AMB_MC_CONTROL_EN, /* Q13 */ | |
| 237 | 236 | NODE_52, M79AMB_R41 + M79AMB_R42 + M79AMB_R43, M79AMB_C22) |
| 238 | DISCRETE_GAIN(M79AMB_MC_SND, NODE_53, RES_VOLTAGE_DIVIDER(M79AMB_R41 + M79AMB_R42, 2200))//M79AMB_R43)) | |
| 237 | DISCRETE_MULTIPLY(NODE_54, NODE_53, M79AMB_MC_CONTROL_EN) | |
| 238 | DISCRETE_GAIN(M79AMB_MC_SND, NODE_54, RES_VOLTAGE_DIVIDER(M79AMB_R41 + M79AMB_R42, 2200))//M79AMB_R43)) | |
| 239 | 239 | |
| 240 | 240 | /************************************************ |
| 241 | 241 | * Tank, Truck, Jeep |
| r6049 | r6050 | |
| 249 | 249 | M79AMB_TANK_TRUCK_JEEP_EN, /* Q16, Q17 */ |
| 250 | 250 | NODE_60) |
| 251 | 251 | DISCRETE_CRFILTER(NODE_62, |
| 252 | 1, /* ENAB */ | |
| 253 | 252 | NODE_61, M79AMB_R48 + M79AMB_R49, M79AMB_C26) |
| 254 | 253 | DISCRETE_GAIN(NODE_63, NODE_62, RES_VOLTAGE_DIVIDER(M79AMB_R48, M79AMB_R49)) |
| 255 | 254 | DISCRETE_RCFILTER(M79AMB_TANK_TRUCK_JEEP_SND, |
| 256 | 1, /* ENAB */ | |
| 257 | 255 | NODE_63, RES_2_PARALLEL(M79AMB_R48, M79AMB_R49), M79AMB_C27) |
| 258 | 256 | |
| 259 | 257 | /************************************************ |
| r6049 | r6050 | |
| 273 | 271 | 12, 0, 12, /* VPOS,VNEG,VCHARGE */ |
| 274 | 272 | DISC_566_OUT_DC | DISC_566_OUT_TRIANGLE) |
| 275 | 273 | DISCRETE_CRFILTER(NODE_73, |
| 276 | M79AMB_WHISTLE_A_EN, /* Q16, Q17 */ | |
| 277 | 274 | NODE_72, M79AMB_R57 + M79AMB_R58 + M79AMB_R59, M79AMB_C31) |
| 278 | DISCRETE_GAIN(M79AMB_WHISTLE_A_SND, NODE_73, RES_VOLTAGE_DIVIDER(M79AMB_R57 + M79AMB_R58, M79AMB_R59)) | |
| 275 | DISCRETE_MULTIPLY(NODE_74, NODE_73, M79AMB_WHISTLE_A_EN) /* Q16, Q17 */ | |
| 276 | DISCRETE_GAIN(M79AMB_WHISTLE_A_SND, NODE_74, RES_VOLTAGE_DIVIDER(M79AMB_R57 + M79AMB_R58, M79AMB_R59)) | |
| 279 | 277 | |
| 280 | 278 | /************************************************ |
| 281 | 279 | * Whisle B |
| r6049 | r6050 | |
| 294 | 292 | 12, 0, 12, /* VPOS,VNEG,VCHARGE */ |
| 295 | 293 | DISC_566_OUT_DC | DISC_566_OUT_TRIANGLE) |
| 296 | 294 | DISCRETE_CRFILTER(NODE_83, |
| 297 | M79AMB_WHISTLE_B_EN, /* Q19, Q20*/ | |
| 298 | 295 | NODE_82, M79AMB_R67 + M79AMB_R68 + M79AMB_R69, M79AMB_C35) |
| 299 | DISCRETE_GAIN(M79AMB_WHISTLE_B_SND, NODE_83, RES_VOLTAGE_DIVIDER(M79AMB_R67 + M79AMB_R68, M79AMB_R69)) | |
| 296 | DISCRETE_MULTIPLY(NODE_84, NODE_83, M79AMB_WHISTLE_B_EN) /* Q19, Q20*/ | |
| 297 | DISCRETE_GAIN(M79AMB_WHISTLE_B_SND, NODE_84, RES_VOLTAGE_DIVIDER(M79AMB_R67 + M79AMB_R68, M79AMB_R69)) | |
| 300 | 298 | |
| 301 | 299 | /************************************************ |
| 302 | 300 | * Mixer |
| r6049 | r6050 | |
| 312 | 310 | M79AMB_WHISTLE_B_SND, |
| 313 | 311 | &m79amb_final_mix) |
| 314 | 312 | DISCRETE_RCFILTER(NODE_91, |
| 315 | 1, /* ENAB */ | |
| 316 | 313 | NODE_90, M79AMB_R86, M79AMB_C41) |
| 317 | 314 | |
| 318 | 315 | DISCRETE_OUTPUT(NODE_91, 32000.0/5) |
| r6049 | r6050 | |
|---|---|---|
| 78 | 78 | DISCRETE_SWITCH(NODE_22, 1, QIX_VOL_DATA_R, QIX_DAC_DATA, NODE_21) |
| 79 | 79 | |
| 80 | 80 | /* Filter the DC using the lowest case filter. */ |
| 81 | DISCRETE_CRFILTER(NODE_13, 1, NODE_12, RES_K(1.5), CAP_U(1)) | |
| 82 | DISCRETE_CRFILTER(NODE_23, 1, NODE_22, RES_K(1.5), CAP_U(1)) | |
| 81 | DISCRETE_CRFILTER(NODE_13, NODE_12, RES_K(1.5), CAP_U(1)) | |
| 82 | DISCRETE_CRFILTER(NODE_23, NODE_22, RES_K(1.5), CAP_U(1)) | |
| 83 | 83 | |
| 84 | 84 | DISCRETE_OUTPUT(NODE_13, 1) |
| 85 | 85 | DISCRETE_OUTPUT(NODE_23, 1) |
| r6049 | r6050 | |
|---|---|---|
| 137 | 137 | |
| 138 | 138 | // Fire envelope |
| 139 | 139 | DISCRETE_MULTIPLY(NODE_41, DEFAULT_TTL_V_LOGIC_1, SPIDERS_FIRE_EN) |
| 140 | DISCRETE_RCFILTER(NODE_42, | |
| 140 | DISCRETE_RCFILTER(NODE_42, | |
| 141 | 141 | DISCRETE_TRANSFORM4(NODE_43, NODE_40, NODE_42, 2.5, 24.5,"012*3/-") |
| 142 | 142 | |
| 143 | 143 | DISCRETE_555_ASTABLE_CV(NODE_44, 1, RES_K(10), RES_K(22), CAP_N(100), NODE_43, &spiders_fire_555a) //R10, R18, C12 |
| r6049 | r6050 | |
|---|---|---|
| 59 | 59 | DISCRETE_INPUT_PULSE(LLANDER_NOISE_RESET, 1) |
| 60 | 60 | |
| 61 | 61 | DISCRETE_LFSR_NOISE(NODE_20, 1, LLANDER_NOISE_RESET, 12000, 1, 0, 0, &llander_lfsr) // 12KHz Noise source for thrust |
| 62 | DISCRETE_RCFILTER(LLANDER_NOISE, | |
| 62 | DISCRETE_RCFILTER(LLANDER_NOISE, | |
| 63 | 63 | |
| 64 | 64 | DISCRETE_SQUAREWFIX(LLANDER_TONE_3K_SND, LLANDER_TONE3K_EN, 3000, 9.2, 50, 0, 0) // 3KHz |
| 65 | 65 |
| r6049 | r6050 | |
|---|---|---|
| 122 | 122 | /* This adjusts the high end. */ |
| 123 | 123 | /* 0k = 214Hz. 250k = 4416Hz */ |
| 124 | 124 | /************************************************/ |
| 125 | DISCRETE_RCFILTER(NODE_20, | |
| 125 | DISCRETE_RCFILTER(NODE_20, | |
| 126 | 126 | DISCRETE_ADJUSTMENT_TAG(NODE_21, (214.0-27.0)/12/15, (4416.0-27.0)/12/15, DISC_LOGADJ, "MOTOR1") |
| 127 | 127 | DISCRETE_MULTIPLY(NODE_22, NODE_20, NODE_21) |
| 128 | 128 | |
| 129 | 129 | DISCRETE_MULTADD(NODE_23, NODE_22, 2, 27.0/6) /* F1 = /12*2 = /6 */ |
| 130 | 130 | DISCRETE_SQUAREWAVE(NODE_24, 1, NODE_23, (142.9/3), 50.0, 0, 0) |
| 131 | DISCRETE_RCFILTER(NODE_25, | |
| 131 | DISCRETE_RCFILTER(NODE_25, | |
| 132 | 132 | |
| 133 | 133 | DISCRETE_MULTADD(NODE_26, NODE_22, 3, 27.0/4) /* F2 = /12*3 = /4 */ |
| 134 | 134 | DISCRETE_SQUAREWAVE(NODE_27, 1, NODE_26, (142.9/3), 50.0, 0, 0) |
| 135 | DISCRETE_RCFILTER(NODE_28, | |
| 135 | DISCRETE_RCFILTER(NODE_28, | |
| 136 | 136 | |
| 137 | 137 | DISCRETE_MULTADD(NODE_29, NODE_22, 4, 27.0/3) /* F3 = /12*4 = /3 */ |
| 138 | 138 | DISCRETE_SQUAREWAVE(NODE_30, 1, NODE_29, (142.9/3), 100.0/3, 0, 360.0/3) |
| 139 | DISCRETE_RCFILTER(NODE_31, | |
| 139 | DISCRETE_RCFILTER(NODE_31, | |
| 140 | 140 | |
| 141 | 141 | DISCRETE_ADDER3(CANYON_MOTORSND1, CANYON_ATTRACT1_EN, NODE_25, NODE_28, NODE_31) |
| 142 | 142 | |
| r6049 | r6050 | |
| 145 | 145 | /* for 1. But I shifted the frequencies up for */ |
| 146 | 146 | /* it to sound different from motor 1. */ |
| 147 | 147 | /************************************************/ |
| 148 | DISCRETE_RCFILTER(NODE_40, | |
| 148 | DISCRETE_RCFILTER(NODE_40, | |
| 149 | 149 | DISCRETE_ADJUSTMENT_TAG(NODE_41, (214.0-27.0)/12/15, (4416.0-27.0)/12/15, DISC_LOGADJ, "MOTOR2") |
| 150 | 150 | DISCRETE_MULTIPLY(NODE_42, NODE_40, NODE_41) |
| 151 | 151 | |
| 152 | 152 | DISCRETE_MULTADD(NODE_43, NODE_42, 2, 27.0/6) /* F1 = /12*2 = /6 */ |
| 153 | 153 | DISCRETE_SQUAREWAVE(NODE_44, 1, NODE_43, (142.9/3), 50.0, 0, 0) |
| 154 | DISCRETE_RCFILTER(NODE_45, | |
| 154 | DISCRETE_RCFILTER(NODE_45, | |
| 155 | 155 | |
| 156 | 156 | DISCRETE_MULTADD(NODE_46, NODE_42, 3, 27.0/4) /* F2 = /12*3 = /4 */ |
| 157 | 157 | DISCRETE_SQUAREWAVE(NODE_47, 1, NODE_46, (142.9/3), 50.0, 0, 0) |
| 158 | DISCRETE_RCFILTER(NODE_48, | |
| 158 | DISCRETE_RCFILTER(NODE_48, | |
| 159 | 159 | |
| 160 | 160 | DISCRETE_MULTADD(NODE_49, NODE_42, 4, 27.0/3) /* F3 = /12*4 = /3 */ |
| 161 | 161 | DISCRETE_SQUAREWAVE(NODE_50, 1, NODE_49, (142.9/3), 100.0/3, 0, 360.0/3) |
| 162 | DISCRETE_RCFILTER(NODE_51, | |
| 162 | DISCRETE_RCFILTER(NODE_51, | |
| 163 | 163 | |
| 164 | 164 | DISCRETE_ADDER3(CANYON_MOTORSND2, CANYON_ATTRACT2_EN, NODE_45, NODE_48, NODE_51) |
| 165 | 165 | |
| r6049 | r6050 | |
| 176 | 176 | DISCRETE_LFSR_NOISE(CANYON_NOISE, NODE_60, NODE_60, 15750.0/4, 1.0, 0, 0, &canyon_lfsr) |
| 177 | 177 | |
| 178 | 178 | DISCRETE_MULTIPLY(NODE_61, CANYON_NOISE, CANYON_EXPLODE_DATA) |
| 179 | DISCRETE_RCFILTER(CANYON_EXPLODESND, | |
| 179 | DISCRETE_RCFILTER(CANYON_EXPLODESND, | |
| 180 | 180 | |
| 181 | 181 | /************************************************/ |
| 182 | 182 | /* Whistle circuit is a 555 capacitor charge */ |
| r6049 | r6050 | |
|---|---|---|
| 79 | 79 | /************************************************/ |
| 80 | 80 | /* Music is just a 1 bit DAC */ |
| 81 | 81 | /************************************************/ |
| 82 | DISCRETE_CRFILTER(CIRCUS_MUSIC_SND, | |
| 82 | DISCRETE_CRFILTER(CIRCUS_MUSIC_SND, | |
| 83 | 83 | |
| 84 | 84 | DISCRETE_OUTPUT(CIRCUS_MUSIC_SND, 1) |
| 85 | 85 | DISCRETE_SOUND_END |
| r6049 | r6050 | |
| 161 | 161 | /************************************************/ |
| 162 | 162 | /* Music is just a 1 bit DAC */ |
| 163 | 163 | /************************************************/ |
| 164 | DISCRETE_RCFILTER(NODE_20, 1, ROBOTBWL_MUSIC_BIT, RES_K(10), CAP_U(.47)) | |
| 165 | DISCRETE_CRFILTER(ROBOTBWL_MUSIC_SND, 1, NODE_20, RES_K(10) + RES_K(22), CAP_U(.1)) | |
| 164 | DISCRETE_RCFILTER(NODE_20, ROBOTBWL_MUSIC_BIT, RES_K(10), CAP_U(.47)) | |
| 165 | DISCRETE_CRFILTER(ROBOTBWL_MUSIC_SND, NODE_20, RES_K(10) + RES_K(22), CAP_U(.1)) | |
| 166 | 166 | |
| 167 | 167 | DISCRETE_OUTPUT(ROBOTBWL_MUSIC_SND, 1) |
| 168 | 168 | DISCRETE_SOUND_END |
| r6049 | r6050 | |
|---|---|---|
| 105 | 105 | * square wave. |
| 106 | 106 | ************************************************/ |
| 107 | 107 | DISCRETE_555_ASTABLE(NODE_10, 1, RES_K(10), RES_K(100), CAP_U(1), &desc_crbaloon_laugh_osc) |
| 108 | DISCRETE_CRFILTER_VREF(NODE_11, | |
| 108 | DISCRETE_CRFILTER_VREF(NODE_11, | |
| 109 | 109 | 1.0/(1.0/RES_K(5) + 1.0/RES_K(10) + 1.0/RES_K(100)), // 5k & 10k are 555 internal |
| 110 | 110 | CAP_U(10), |
| 111 | 111 | /* The following will calculate the reference control voltage with no signal applied to the cap. */ |
| 112 | 112 | 5.0* (1.0/(1.0/RES_K(10) + 1.0/RES_K(100))) / (RES_K(5)+(1.0/(1.0/RES_K(10) + 1.0/RES_K(100)))) ) |
| 113 | 113 | DISCRETE_555_ASTABLE_CV(NODE_12, CRBALOON_LAUGH_EN, RES_K(1), RES_K(22), CAP_U(.1), NODE_11, &desc_crbaloon_laugh_osc) |
| 114 | 114 | DISCRETE_MULTIPLY(NODE_13, NODE_12, CRBALOON_VR2) |
| 115 | DISCRETE_CRFILTER(CRBALOON_LAUGH_SND, | |
| 115 | DISCRETE_CRFILTER(CRBALOON_LAUGH_SND, | |
| 116 | 116 | |
| 117 | 117 | /************************************************ |
| 118 | 118 | * Music Generator is amplitude modulated by a |
| r6049 | r6050 | |
| 124 | 124 | DISCRETE_ONOFF(NODE_22, CRBALOON_MUSIC_EN, NODE_21) |
| 125 | 125 | // DISCRETE_RAMP(NODE_21, 1, RAMP, GRAD, MIN, MAX, CLAMP) |
| 126 | 126 | DISCRETE_MULTIPLY(NODE_23, NODE_22, CRBALOON_VR3) |
| 127 | DISCRETE_CRFILTER(CRBALOON_MUSIC_SND, | |
| 127 | DISCRETE_CRFILTER(CRBALOON_MUSIC_SND, | |
| 128 | 128 | |
| 129 | 129 | /************************************************ |
| 130 | 130 | * Final mix and output. |
| 131 | 131 | ************************************************/ |
| 132 | 132 | DISCRETE_ADDER2(NODE_90, 1, CRBALOON_LAUGH_SND, CRBALOON_MUSIC_SND) |
| 133 | DISCRETE_CRFILTER(NODE_91, | |
| 133 | DISCRETE_CRFILTER(NODE_91, | |
| 134 | 134 | |
| 135 | 135 | DISCRETE_OUTPUT(NODE_91, 65000.0/12) |
| 136 | 136 |
| r6049 | r6050 | |
|---|---|---|
| 365 | 365 | DISCRETE_SWITCH(NODE_11, 1, FANTASY_NOISE_LOGIC, 0, NODE_10) |
| 366 | 366 | |
| 367 | 367 | DISCRETE_OP_AMP_FILTER(NODE_20, 1, NODE_11, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &fantasy_filter) |
| 368 | DISCRETE_RCFILTER(NODE_21, 1, NODE_20, RES_K(22), CAP_U(.01)) | |
| 369 | DISCRETE_RCFILTER(NODE_22, 1, NODE_21, RES_K(22) + RES_K(22), CAP_P(2200)) | |
| 370 | DISCRETE_RCFILTER(NODE_23, 1, NODE_22, RES_K(22) + RES_K(22) + RES_K(22), CAP_U(.001)) | |
| 368 | DISCRETE_RCFILTER(NODE_21, NODE_20, RES_K(22), CAP_U(.01)) | |
| 369 | DISCRETE_RCFILTER(NODE_22, NODE_21, RES_K(22) + RES_K(22), CAP_P(2200)) | |
| 370 | DISCRETE_RCFILTER(NODE_23, NODE_22, RES_K(22) + RES_K(22) + RES_K(22), CAP_U(.001)) | |
| 371 | 371 | |
| 372 | 372 | DISCRETE_OUTPUT(NODE_23, 32760.0/12) |
| 373 | 373 | DISCRETE_SOUND_END |
| r6049 | r6050 | |
|---|---|---|
| 327 | 327 | |
| 328 | 328 | /* Sallen - Key Filter */ |
| 329 | 329 | /* TODO: R12, C30: This looks like a band pass */ |
| 330 | DISCRETE_RCFILTER(NODE_25, | |
| 330 | DISCRETE_RCFILTER(NODE_25, | |
| 331 | 331 | DISCRETE_SALLEN_KEY_FILTER(NODE_30, 1, NODE_25, DISC_SALLEN_KEY_LOW_PASS, &m52_sound_c_sallen_key) |
| 332 | 332 | |
| 333 | 333 | /* Mix signals */ |
| 334 | 334 | DISCRETE_MIXER2(NODE_40, 1, NODE_10, NODE_25, &m52_sound_c_mix1) |
| 335 | DISCRETE_CRFILTER(NODE_45, | |
| 335 | DISCRETE_CRFILTER(NODE_45, | |
| 336 | 336 | |
| 337 | 337 | DISCRETE_OUTPUT(NODE_40, 18.0) |
| 338 | 338 |
| r6049 | r6050 | |
|---|---|---|
| 439 | 439 | /* Trigger */ |
| 440 | 440 | DISCRETE_RCDISC_MODULATED(NODE_60,DS_SOUND0_INV,NODE_55,DK_R36,DK_R18,DK_R35,DK_R17,DK_C25,DK_SUP_V) |
| 441 | 441 | /* Filter and divide - omitted C22 */ |
| 442 | DISCRETE_CRFILTER(NODE_61, | |
| 442 | DISCRETE_CRFILTER(NODE_61, | |
| 443 | 443 | DISCRETE_MULTIPLY(DS_OUT_SOUND2, NODE_61, DK_R15/(DK_R15+DK_R16)) |
| 444 | 444 | DISCRETE_TASK_END() |
| 445 | 445 | |
| r6049 | r6050 | |
| 448 | 448 | /************************************************/ |
| 449 | 449 | |
| 450 | 450 | DISCRETE_TASK_START(1) |
| 451 | /* Mixing - DAC */ | |
| 452 | DISCRETE_ADJUSTMENT_TAG(DS_ADJ_DAC, 0, 1, DISC_LINADJ, "VR2") | |
| 453 | ||
| 451 | 454 | /* Buffer DAC first to input stream 0 */ |
| 452 | 455 | DISCRETE_INPUT_BUFFER(DS_DAC, 0) |
| 453 | 456 | //DISCRETE_INPUT_DATA(DS_DAC) |
| r6049 | r6050 | |
| 467 | 470 | |
| 468 | 471 | /* Adjustment VR2 */ |
| 469 | 472 | #if DK_NO_FILTERS |
| 470 | DISCRETE_MULTIPLY(DS_OUT_DAC, | |
| 473 | DISCRETE_MULTIPLY(DS_OUT_DAC, | |
| 471 | 474 | #else |
| 472 | 475 | DISCRETE_MULTIPLY(DS_OUT_DAC, NODE_73, DS_ADJ_DAC) |
| 473 | 476 | #endif |
| r6049 | r6050 | |
| 478 | 481 | /************************************************/ |
| 479 | 482 | |
| 480 | 483 | DISCRETE_TASK_START(2) |
| 481 | /* Mixing - DAC */ | |
| 482 | DISCRETE_ADJUSTMENT_TAG(DS_ADJ_DAC, 0, 1, DISC_LINADJ, "VR2") | |
| 483 | 484 | |
| 484 | 485 | DISCRETE_MIXER4(NODE_288, 1, DS_OUT_SOUND0, DS_OUT_SOUND1, DS_OUT_DAC, DS_OUT_SOUND2, &dkong_mixer_desc) |
| 485 | 486 | |
| 486 | 487 | /* Amplifier: internal amplifier */ |
| 487 | 488 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 488 | 489 | DISCRETE_RCINTEGRATE(NODE_294,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 489 | DISCRETE_CRFILTER(NODE_295, | |
| 490 | DISCRETE_CRFILTER(NODE_295, | |
| 490 | 491 | /*DISCRETE_CRFILTER(NODE_295,1,NODE_294, 1000, DK_C13) */ |
| 491 | 492 | /* EZV20 equivalent filter circuit ... */ |
| 492 | DISCRETE_CRFILTER(NODE_296, | |
| 493 | DISCRETE_CRFILTER(NODE_296, | |
| 493 | 494 | #if DK_NO_FILTERS |
| 494 | 495 | DISCRETE_OUTPUT(NODE_288, 32767.0/5.0 * 10) |
| 495 | 496 | #else |
| r6049 | r6050 | |
| 704 | 705 | DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), RS_C49, NODE_42, &radarscp_555_vco_desc) |
| 705 | 706 | |
| 706 | 707 | DISCRETE_RCDISC_MODULATED(NODE_44,DS_SOUND0_INV,NODE_43,RS_R39,RS_R18,RS_R37,RS_R38,RS_C22,DK_SUP_V) |
| 707 | DISCRETE_CRFILTER(NODE_45, | |
| 708 | DISCRETE_CRFILTER(NODE_45, | |
| 708 | 709 | DISCRETE_MULTIPLY(DS_OUT_SOUND0, NODE_45, RS_R15/(RS_R15+RS_R16)) |
| 709 | 710 | |
| 710 | 711 | /************************************************/ |
| r6049 | r6050 | |
| 721 | 722 | |
| 722 | 723 | DISCRETE_RCINTEGRATE(NODE_55,NODE_52,RS_R46, RS_R46,0,RS_C45,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1) |
| 723 | 724 | DISCRETE_TRANSFORM4(NODE_56, NODE_55, DS_SOUND7,NODE_54,2.5, "01*23<*") |
| 724 | DISCRETE_CRFILTER(NODE_57, | |
| 725 | DISCRETE_CRFILTER(NODE_57, | |
| 725 | 726 | DISCRETE_MULTIPLY(DS_OUT_SOUND7, NODE_57, RS_R44/(RS_R43+RS_R44)) |
| 726 | 727 | |
| 727 | 728 | /************************************************/ |
| r6049 | r6050 | |
| 753 | 754 | /* Amplifier: internal amplifier */ |
| 754 | 755 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 755 | 756 | DISCRETE_RCINTEGRATE(NODE_294,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 756 | DISCRETE_CRFILTER(NODE_295, | |
| 757 | DISCRETE_CRFILTER(NODE_295, | |
| 757 | 758 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3) |
| 758 | 759 | |
| 759 | 760 | DISCRETE_SOUND_END |
| r6049 | r6050 | |
| 894 | 895 | |
| 895 | 896 | DISCRETE_LS123(NODE_110, DS_SOUND0_INV, JR_R8, JR_C14) |
| 896 | 897 | DISCRETE_TRANSFORM2(NODE_111, TTL_HIGH, NODE_110, "01-") |
| 897 | DISCRETE_RCFILTER(NODE_112, | |
| 898 | DISCRETE_RCFILTER(NODE_112, | |
| 898 | 899 | DISCRETE_74LS624(NODE_113, NODE_112, DK_SUP_V, JR_C18, DISC_LS624_OUT_ENERGY) |
| 899 | 900 | |
| 900 | 901 | DISCRETE_LOGIC_XOR(NODE_115, NODE_105, NODE_106) |
| 901 | 902 | |
| 902 | 903 | DISCRETE_TRANSFORM2(NODE_116, NODE_107, TTL_HIGH, "0!1*") |
| 903 | DISCRETE_RCFILTER(NODE_117, | |
| 904 | DISCRETE_RCFILTER(NODE_117, | |
| 904 | 905 | DISCRETE_74LS624(NODE_118, NODE_117, DK_SUP_V, JR_C19, DISC_LS624_OUT_COUNT_F) |
| 905 | 906 | |
| 906 | 907 | DISCRETE_LOGIC_NAND(NODE_120, NODE_115, NODE_110) |
| r6049 | r6050 | |
| 921 | 922 | /* The following circuit does not match 100%, however works. |
| 922 | 923 | * To be exact, we need a C-R-C-R circuit, we actually do not have. |
| 923 | 924 | */ |
| 924 | DISCRETE_CRFILTER_VREF(NODE_16, 1, NODE_15, JR_R4, JR_C23, 2.5) | |
| 925 | DISCRETE_RCFILTER(DS_OUT_SOUND1, 1, NODE_16, JR_R19, JR_C21) | |
| 925 | DISCRETE_CRFILTER_VREF(NODE_16, NODE_15, JR_R4, JR_C23, 2.5) | |
| 926 | DISCRETE_RCFILTER(DS_OUT_SOUND1, NODE_16, JR_R19, JR_C21) | |
| 926 | 927 | DISCRETE_TASK_END() |
| 927 | 928 | |
| 928 | 929 | /************************************************/ |
| r6049 | r6050 | |
| 937 | 938 | /* The following circuit does not match 100%, however works. |
| 938 | 939 | * To be exact, we need a C-R-C-R circuit, we actually do not have. |
| 939 | 940 | */ |
| 940 | DISCRETE_CRFILTER_VREF(NODE_27, 1, NODE_26, JR_R6, JR_C30, 2.5) | |
| 941 | DISCRETE_RCFILTER(DS_OUT_SOUND2, 1, NODE_27, JR_R2, JR_C25) | |
| 941 | DISCRETE_CRFILTER_VREF(NODE_27, NODE_26, JR_R6, JR_C30, 2.5) | |
| 942 | DISCRETE_RCFILTER(DS_OUT_SOUND2, NODE_27, JR_R2, JR_C25) | |
| 942 | 943 | DISCRETE_TASK_END() |
| 943 | 944 | |
| 944 | 945 | /************************************************/ |
| r6049 | r6050 | |
| 947 | 948 | |
| 948 | 949 | DISCRETE_TASK_START(1) |
| 949 | 950 | DISCRETE_LOGIC_INVERT(DS_SOUND9,DS_SOUND9_INV) |
| 950 | DISCRETE_RCFILTER(NODE_90, | |
| 951 | DISCRETE_RCFILTER(NODE_90, | |
| 951 | 952 | DISCRETE_MULTIPLY(NODE_91, NODE_90, TTL_HIGH) |
| 952 | 953 | DISCRETE_74LS624( NODE_92, NODE_91, DK_SUP_V, JR_C37, DISC_LS624_OUT_ENERGY) |
| 953 | 954 | DISCRETE_ENERGY_NAND(NODE_93, NODE_92, DS_SOUND9) |
| r6049 | r6050 | |
| 986 | 987 | /* Amplifier: internal amplifier |
| 987 | 988 | * Just a 1:n amplifier without filters - just the output filter |
| 988 | 989 | */ |
| 989 | DISCRETE_CRFILTER(NODE_295, | |
| 990 | DISCRETE_CRFILTER(NODE_295, | |
| 990 | 991 | DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 10) |
| 991 | 992 | DISCRETE_TASK_END() |
| 992 | 993 |
| r6049 | r6050 | |
|---|---|---|
| 341 | 341 | * Jet, Plane sound |
| 342 | 342 | ************************************************/ |
| 343 | 343 | DISCRETE_RCFILTER(NODE_30, /* IC J6, pin 5 */ |
| 344 | 1, /* ENAB */ | |
| 345 | 344 | SKYRAID_PLANE_SWEEP_EN, /* IN0 */ |
| 346 | 345 | RES_2_PARALLEL(SKYRAID_R25, SKYRAID_R24), SKYRAID_C49) |
| 347 | 346 | DISCRETE_566(NODE_31, /* IC J6, pin 3 */ |
| r6049 | r6050 | |
| 391 | 390 | SKYRAID_PLANE_SND, |
| 392 | 391 | &skyraid_mixer) |
| 393 | 392 | DISCRETE_CRFILTER(NODE_93, |
| 394 | 1, /* ENAB */ | |
| 395 | 393 | NODE_92, /* IN0 */ |
| 396 | 394 | SKYRAID_R122 + RES_6_PARALLEL(SKYRAID_R120, SKYRAID_R32, SKYRAID_R29, SKYRAID_R30, SKYRAID_R31, RES_2_PARALLEL(SKYRAID_R27, SKYRAID_R28)), |
| 397 | 395 | SKYRAID_C93) |
| r6049 | r6050 | |
|---|---|---|
| 158 | 158 | * we will just tell the monostable it was triggered once and ignore C17/R40. |
| 159 | 159 | */ |
| 160 | 160 | #define SPRINT8_MOTOR_CIRCUIT(_car) \ |
| 161 | DISCRETE_RCFILTER(NODE_RELATIVE(NODE_30, _car - 1), | |
| 161 | DISCRETE_RCFILTER(NODE_RELATIVE(NODE_30, _car - 1), | |
| 162 | 162 | DISCRETE_ADDER2(NODE_RELATIVE(NODE_40, _car - 1), 1, NODE_RELATIVE(NODE_30, _car - 1), 0.7) /* add Q21 shift */ \ |
| 163 | 163 | DISCRETE_555_ASTABLE_CV(NODE_RELATIVE(NODE_50, _car - 1), 1, SPRINT8_R39, 0, SPRINT8_C27, NODE_RELATIVE(NODE_40, _car - 1), &sprint8_motor_555a_desc) \ |
| 164 | 164 | DISCRETE_555_MSTABLE(NODE_RELATIVE(NODE_60, _car - 1), 1, NODE_RELATIVE(NODE_50, _car - 1), SPRINT8_R41, SPRINT8_C28, &sprint8_motor_555m_desc) \ |
| r6049 | r6050 | |
| 200 | 200 | DISCRETE_TASK_START(1) |
| 201 | 201 | DISCRETE_GAIN(NODE_70, SPRINT8_NOISE, DEFAULT_TTL_V_LOGIC_1 * RES_VOLTAGE_DIVIDER(SPRINT8_R148, SPRINT8_R147)) |
| 202 | 202 | DISCRETE_CRFILTER_VREF(NODE_71, |
| 203 | 1, /* ENAB */ | |
| 204 | 203 | NODE_70, /* IN0 */ |
| 205 | 204 | RES_2_PARALLEL(SPRINT8_R148, SPRINT8_R147) + RES_2_PARALLEL(RES_K(5), RES_K(10)), |
| 206 | 205 | SPRINT8_C90, |
| r6049 | r6050 | |
| 227 | 226 | &sprint8_crash_screech_mixer) |
| 228 | 227 | |
| 229 | 228 | DISCRETE_CRFILTER_VREF(NODE_76, |
| 230 | 1, /* ENAB */ | |
| 231 | 229 | NODE_75, /* IN0 */ |
| 232 | 230 | SPRINT8_R93 + SPRINT8_R91, SPRINT8_C63, |
| 233 | 231 | 5) /* VREF */ |
| r6049 | r6050 | |
|---|---|---|
| 222 | 222 | 15, 1, 0, DISC_CLK_BY_COUNT) // 4-bit binary up counter |
| 223 | 223 | DISCRETE_DAC_R1(NODE_55, NODE_54, DEFAULT_TTL_V_LOGIC_1, &madalien_effect1a_dac) |
| 224 | 224 | DISCRETE_DAC_R1(NODE_56, NODE_54, DEFAULT_TTL_V_LOGIC_1, &madalien_effect1b_dac) |
| 225 | DISCRETE_RCFILTER(NODE_57, | |
| 225 | DISCRETE_RCFILTER(NODE_57, | |
| 226 | 226 | DISCRETE_COMP_ADDER(NODE_59, MADALIEN_8910_PORTB_23, &madalien_effect_1b_vol_r) |
| 227 | 227 | |
| 228 | 228 | /************************************************ |
| 229 | 229 | * Enemy motor |
| 230 | 230 | ************************************************/ |
| 231 | DISCRETE_CRFILTER(NODE_60, | |
| 231 | DISCRETE_CRFILTER(NODE_60, | |
| 232 | 232 | // 2 diodes clamp it positive. |
| 233 | 233 | DISCRETE_CLAMP(NODE_62, NODE_60, 0, 12) |
| 234 | 234 | // the 0.047uF cap to ground just removes real world spikes. |
| r6049 | r6050 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "cpu/z80/z80.h" |
| 3 | 3 | #include "cpu/mcs48/mcs48.h" |
| 4 | #include "sound/dac.h" | |
| 5 | 4 | #include "sound/ay8910.h" |
| 6 | 5 | #include "sound/discrete.h" |
| 7 | 6 | |
| r6049 | r6050 | |
| 203 | 202 | |
| 204 | 203 | double sample_t = node->info->sample_time; |
| 205 | 204 | double vn, exponent, t = 0; |
| 206 | int update_exponent | |
| 205 | int update_exponent | |
| 207 | 206 | double t1, t2; |
| 208 | 207 | |
| 209 | if (MARIO_CUSTOM_IN1 > 0.001) | |
| 208 | if (EXPECTED(MARIO_CUSTOM_IN1 > 0.001)) | |
| 210 | 209 | t1 = 0.5 / LS624_F(MARIO_CUSTOM_IN1, 1); |
| 211 | 210 | else |
| 212 | 211 | /* close enough to 0, so we can speed things up by no longer call pow() */ |
| 213 | 212 | t1 = context->dt_in1_at_0; |
| 214 | 213 | |
| 215 | if (MARIO_CUSTOM_IN2 > 0.001) | |
| 214 | if (EXPECTED(MARIO_CUSTOM_IN2 > 0.001)) | |
| 216 | 215 | t2 = 0.5 / LS624_F(MARIO_CUSTOM_IN2, 2); |
| 217 | 216 | else |
| 218 | 217 | t2 = context->dt_in2_at_0; |
| r6049 | r6050 | |
| 222 | 221 | /* state before time advance */ |
| 223 | 222 | vn = (double) (context->state1 ^ context->state2); |
| 224 | 223 | vn *= MARIO_CUSTOM_VOUT; |
| 224 | update_exponent = 0; | |
| 225 | 225 | if (context->remain1 < context->remain2) |
| 226 | 226 | { |
| 227 | if (context->remain1 < sample_t) | |
| 227 | if (EXPECTED(context->remain1 < sample_t)) | |
| 228 | 228 | { |
| 229 | 229 | t = context->remain1; |
| 230 | 230 | update_exponent = 1; |
| r6049 | r6050 | |
| 242 | 242 | } |
| 243 | 243 | else |
| 244 | 244 | { |
| 245 | if (context->remain2 < sample_t) | |
| 245 | if (EXPECTED(context->remain2 < sample_t)) | |
| 246 | 246 | { |
| 247 | 247 | t = context->remain2; |
| 248 | 248 | update_exponent = 1; |
| r6049 | r6050 | |
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | if (update_exponent) | |
| 262 | if (EXPECTED(update_exponent)) | |
| 263 | 263 | exponent = RC_CHARGE_EXP_DT(context->r1_c3, t); |
| 264 | 264 | else |
| 265 | 265 | exponent = context->exponent_c3; |
| r6049 | r6050 | |
| 313 | 313 | DISCRETE_TASK_START(1) |
| 314 | 314 | DISCRETE_INPUT_PULSE(DS_SOUND0_INV, 1) |
| 315 | 315 | DISCRETE_LS123(NODE_10, DS_SOUND0_INV, MR_R17, MR_C14) |
| 316 | DISCRETE_RCFILTER(NODE_11, | |
| 316 | DISCRETE_RCFILTER(NODE_11, | |
| 317 | 317 | DISCRETE_CUSTOM7(NODE_12, NODE_10, NODE_11, NODE_11, MR_C6, MR_C17, |
| 318 | 318 | MR_MIXER_RPAR, MR_C31, &mario_custom_run_info) |
| 319 | 319 | DISCRETE_MULTIPLY(DS_OUT_SOUND0, NODE_12, MR_MIXER_RPAR / MR_R20) |
| r6049 | r6050 | |
| 326 | 326 | DISCRETE_TASK_START(1) |
| 327 | 327 | DISCRETE_INPUT_PULSE(DS_SOUND1_INV, 1) |
| 328 | 328 | DISCRETE_LS123(NODE_20, DS_SOUND1_INV, MR_R18, MR_C15) |
| 329 | DISCRETE_RCFILTER(NODE_21, | |
| 329 | DISCRETE_RCFILTER(NODE_21, | |
| 330 | 330 | DISCRETE_CUSTOM7(NODE_22, NODE_20, NODE_21, NODE_21, MR_C5, MR_C16, |
| 331 | 331 | MR_MIXER_RPAR, MR_C31, &mario_custom_run_info) |
| 332 | 332 | DISCRETE_MULTIPLY(DS_OUT_SOUND1, NODE_22, MR_MIXER_RPAR / MR_R19) |
| r6049 | r6050 | |
| 344 | 344 | |
| 345 | 345 | DISCRETE_LS123(NODE_110, DS_SOUND7_INV, MR_R61, MR_C41) |
| 346 | 346 | DISCRETE_TRANSFORM2(NODE_111, NODE_110, TTL_HIGH, "0!1*") |
| 347 | DISCRETE_RCFILTER(NODE_112, | |
| 347 | DISCRETE_RCFILTER(NODE_112, | |
| 348 | 348 | DISCRETE_74LS624(NODE_113, NODE_112, RUN_VCO_VOLTAGE /*VSS*/, MR_C40, DISC_LS624_OUT_LOGIC) |
| 349 | 349 | |
| 350 | 350 | DISCRETE_LOGIC_XOR(NODE_115, NODE_102, NODE_113) |
| 351 | 351 | |
| 352 | DISCRETE_RCFILTER(NODE_117, | |
| 352 | DISCRETE_RCFILTER(NODE_117, | |
| 353 | 353 | DISCRETE_74LS624(NODE_118, NODE_117, RUN_VCO_VOLTAGE /*VSS*/, MR_C39, DISC_LS624_OUT_COUNT_F) |
| 354 | 354 | |
| 355 | 355 | DISCRETE_LOGIC_AND(NODE_120, NODE_115, NODE_110) |
| 356 | 356 | DISCRETE_MULTIPLY(NODE_121, NODE_120, TTL_HIGH * MR_MIXER_RPAR / MR_R41) |
| 357 | DISCRETE_RCFILTER(DS_OUT_SOUND7, | |
| 357 | DISCRETE_RCFILTER(DS_OUT_SOUND7, | |
| 358 | 358 | DISCRETE_TASK_END() |
| 359 | 359 | |
| 360 | 360 | /************************************************/ |
| r6049 | r6050 | |
| 368 | 368 | DISCRETE_TASK_START(1) |
| 369 | 369 | DISCRETE_INPUT_BUFFER(DS_DAC, 0) |
| 370 | 370 | DISCRETE_MULTIPLY(NODE_170, DS_DAC, TTL_HIGH/256.0) |
| 371 | DISCRETE_RCFILTER(NODE_171, | |
| 371 | DISCRETE_RCFILTER(NODE_171, | |
| 372 | 372 | |
| 373 | 373 | DISCRETE_MULTIPLY(NODE_172, NODE_171, MR_MIXER_RPAR / MR_R40) |
| 374 | DISCRETE_RCFILTER(DS_OUT_DAC, | |
| 374 | DISCRETE_RCFILTER(DS_OUT_DAC, | |
| 375 | 375 | DISCRETE_TASK_END() |
| 376 | 376 | |
| 377 | 377 | |
| r6049 | r6050 | |
| 385 | 385 | /* Amplifier: internal amplifier |
| 386 | 386 | * Just a 1:n amplifier without filters and no output capacitor |
| 387 | 387 | */ |
| 388 | DISCRETE_CRFILTER(NODE_296, | |
| 388 | DISCRETE_CRFILTER(NODE_296, | |
| 389 | 389 | /* EZV20 (Monitor) ouput capacitor / Speaker */ |
| 390 | DISCRETE_CRFILTER(NODE_297, | |
| 390 | DISCRETE_CRFILTER(NODE_297, | |
| 391 | 391 | DISCRETE_OUTPUT(NODE_297, 32767.0/5.0 * 10) |
| 392 | 392 | //DISCRETE_WAVELOG1(DS_OUT_SOUND0, 32767/5.0) |
| 393 | 393 | //DISCRETE_WAVELOG2(NODE_296, 32767/5.0 * 2, DS_SOUND7_INV, 10000) |
| r6049 | r6050 | |
|---|---|---|
| 150 | 150 | DISCRETE_LOGIC_INVERT(NODE_30, TANK8_MOTOR1_EN) |
| 151 | 151 | DISCRETE_DAC_R1(NODE_32, TANK8_MOTOR1_EN, 3.6, &tank8_dac) |
| 152 | 152 | DISCRETE_555_ASTABLE_CV(NODE_33, NODE_30, RES_K(220), RES_K(39), CAP_U(0.22), NODE_32, &tank8_555_a) |
| 153 | DISCRETE_CRFILTER_VREF(NODE_34, | |
| 153 | DISCRETE_CRFILTER_VREF(NODE_34, | |
| 154 | 154 | DISCRETE_555_MSTABLE(NODE_35, 1, NODE_34, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 155 | 155 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR1, 1, NODE_35, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 156 | 156 | |
| 157 | 157 | DISCRETE_LOGIC_INVERT(NODE_40, TANK8_MOTOR2_EN) |
| 158 | 158 | DISCRETE_DAC_R1(NODE_42, TANK8_MOTOR2_EN, 3.6, &tank8_dac) |
| 159 | 159 | DISCRETE_555_ASTABLE_CV(NODE_43, NODE_40, RES_K(220), RES_K(39), CAP_U(0.22), NODE_42, &tank8_555_a) |
| 160 | DISCRETE_CRFILTER_VREF(NODE_44, | |
| 160 | DISCRETE_CRFILTER_VREF(NODE_44, | |
| 161 | 161 | DISCRETE_555_MSTABLE(NODE_45, 1, NODE_44, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 162 | 162 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR2, 1, NODE_45, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 163 | 163 | |
| 164 | 164 | DISCRETE_LOGIC_INVERT(NODE_50, TANK8_MOTOR3_EN) |
| 165 | 165 | DISCRETE_DAC_R1(NODE_52, TANK8_MOTOR3_EN, 3.6, &tank8_dac) |
| 166 | 166 | DISCRETE_555_ASTABLE_CV(NODE_53, NODE_50, RES_K(220), RES_K(39), CAP_U(0.22), NODE_52, &tank8_555_a) |
| 167 | DISCRETE_CRFILTER_VREF(NODE_54, | |
| 167 | DISCRETE_CRFILTER_VREF(NODE_54, | |
| 168 | 168 | DISCRETE_555_MSTABLE(NODE_55, 1, NODE_54, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 169 | 169 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR3, 1, NODE_55, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 170 | 170 | |
| 171 | 171 | DISCRETE_LOGIC_INVERT(NODE_60, TANK8_MOTOR4_EN) |
| 172 | 172 | DISCRETE_DAC_R1(NODE_62, TANK8_MOTOR4_EN, 3.6, &tank8_dac) |
| 173 | 173 | DISCRETE_555_ASTABLE_CV(NODE_63, NODE_60, RES_K(220), RES_K(39), CAP_U(0.22), NODE_62, &tank8_555_a) |
| 174 | DISCRETE_CRFILTER_VREF(NODE_64, | |
| 174 | DISCRETE_CRFILTER_VREF(NODE_64, | |
| 175 | 175 | DISCRETE_555_MSTABLE(NODE_65, 1, NODE_64, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 176 | 176 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR4, 1, NODE_65, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 177 | 177 | |
| 178 | 178 | DISCRETE_LOGIC_INVERT(NODE_70, TANK8_MOTOR5_EN) |
| 179 | 179 | DISCRETE_DAC_R1(NODE_72, TANK8_MOTOR5_EN, 3.6, &tank8_dac) |
| 180 | 180 | DISCRETE_555_ASTABLE_CV(NODE_73, NODE_70, RES_K(220), RES_K(39), CAP_U(0.22), NODE_72, &tank8_555_a) |
| 181 | DISCRETE_CRFILTER_VREF(NODE_74, | |
| 181 | DISCRETE_CRFILTER_VREF(NODE_74, | |
| 182 | 182 | DISCRETE_555_MSTABLE(NODE_75, 1, NODE_74, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 183 | 183 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR5, 1, NODE_75, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 184 | 184 | |
| 185 | 185 | DISCRETE_LOGIC_INVERT(NODE_80, TANK8_MOTOR6_EN) |
| 186 | 186 | DISCRETE_DAC_R1(NODE_82, TANK8_MOTOR6_EN, 3.6, &tank8_dac) |
| 187 | 187 | DISCRETE_555_ASTABLE_CV(NODE_83, NODE_80, RES_K(220), RES_K(39), CAP_U(0.22), NODE_82, &tank8_555_a) |
| 188 | DISCRETE_CRFILTER_VREF(NODE_84, | |
| 188 | DISCRETE_CRFILTER_VREF(NODE_84, | |
| 189 | 189 | DISCRETE_555_MSTABLE(NODE_85, 1, NODE_84, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 190 | 190 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR6, 1, NODE_85, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 191 | 191 | |
| 192 | 192 | DISCRETE_LOGIC_INVERT(NODE_90, TANK8_MOTOR7_EN) |
| 193 | 193 | DISCRETE_DAC_R1(NODE_92, TANK8_MOTOR7_EN, 3.6, &tank8_dac) |
| 194 | 194 | DISCRETE_555_ASTABLE_CV(NODE_93, NODE_90, RES_K(220), RES_K(39), CAP_U(0.22), NODE_92, &tank8_555_a) |
| 195 | DISCRETE_CRFILTER_VREF(NODE_94, | |
| 195 | DISCRETE_CRFILTER_VREF(NODE_94, | |
| 196 | 196 | DISCRETE_555_MSTABLE(NODE_95, 1, NODE_94, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 197 | 197 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR7, 1, NODE_95, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 198 | 198 | |
| 199 | 199 | DISCRETE_LOGIC_INVERT(NODE_100, TANK8_MOTOR8_EN) |
| 200 | 200 | DISCRETE_DAC_R1(NODE_102, TANK8_MOTOR8_EN, 3.6, &tank8_dac) |
| 201 | 201 | DISCRETE_555_ASTABLE_CV(NODE_103, NODE_100, RES_K(220), RES_K(39), CAP_U(0.22), NODE_102, &tank8_555_a) |
| 202 | DISCRETE_CRFILTER_VREF(NODE_104, | |
| 202 | DISCRETE_CRFILTER_VREF(NODE_104, | |
| 203 | 203 | DISCRETE_555_MSTABLE(NODE_105, 1, NODE_104, RES_K(56), CAP_U(0.1), &tank8_555_m) |
| 204 | 204 | DISCRETE_OP_AMP_FILTER(TANK8_MOTOR8, 1, NODE_105, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &tank8_filt) |
| 205 | 205 | |
| r6049 | r6050 | |
| 213 | 213 | DISCRETE_DIVIDE(NODE_111,1,TANK8_BUGLE_DATA2,7875.0) |
| 214 | 214 | DISCRETE_SQUAREWAVE2(NODE_112,TANK8_BUGLE_EN,3.4, NODE_110, NODE_111,1.7,0) |
| 215 | 215 | DISCRETE_RCDISC3(NODE_113,1, NODE_112, RES_K(10),RES_K(1),CAP_U(0.1), 0.5) |
| 216 | DISCRETE_CRFILTER(TANK8_BUGLE, | |
| 216 | DISCRETE_CRFILTER(TANK8_BUGLE, | |
| 217 | 217 | |
| 218 | 218 | /************************************************/ |
| 219 | 219 | /* Noise generator is built from 2 shift */ |
| r6049 | r6050 | |
| 246 | 246 | /************************************************/ |
| 247 | 247 | DISCRETE_ADDER2(NODE_125, 1 , NODE_122, NODE_124 ) |
| 248 | 248 | DISCRETE_MULTIPLY(NODE_126, NODE_120, NODE_125 ) |
| 249 | DISCRETE_RCFILTER(NODE_127, | |
| 249 | DISCRETE_RCFILTER(NODE_127, | |
| 250 | 250 | DISCRETE_ADJUSTMENT_TAG(NODE_128, |
| 251 | 251 | 1.0, // min gain of E5 |
| 252 | 252 | 1.0 + 100.0/22, // max gain of E5 = 1 + r132/r101 |
| r6049 | r6050 | |
|---|---|---|
| 80 | 80 | 0, |
| 81 | 81 | CAP_U(.001), /* c500 */ |
| 82 | 82 | 0, |
| 83 | 0, | |
| 83 | 0, 0, | |
| 84 | 84 | 12, /* v1 */ |
| 85 | 85 | 0, /* v2 */ |
| 86 | 86 | 0, /* v3 */ |
| r6049 | r6050 | |
| 327 | 327 | /* 47K resistor (R601) and 0.047uF capacitor (C601) |
| 328 | 328 | There is also a 50K pot acting as a volume control, but we output at |
| 329 | 329 | the maximum volume as MAME has its own volume adjustment */ |
| 330 | DISCRETE_CRFILTER(TORNBASE_TONE_SND_FILT, | |
| 330 | DISCRETE_CRFILTER(TORNBASE_TONE_SND_FILT, | |
| 331 | 331 | |
| 332 | 332 | /* amplify for output */ |
| 333 | 333 | DISCRETE_OUTPUT(TORNBASE_TONE_SND_FILT, 32767) |
| r6049 | r6050 | |
| 554 | 554 | |
| 555 | 555 | /* The following circuits remove DC poping noises when the tone is switched in/out. */ |
| 556 | 556 | DISCRETE_CRFILTER_VREF(NODE_40, |
| 557 | 1, /* ENAB */ | |
| 558 | 557 | NODE_36, /* IN0 */ |
| 559 | 558 | RES_K(250), /* R311, R312, R402, R403 in parallel */ |
| 560 | 559 | CAP_U(0.1), /* c301 */ |
| r6049 | r6050 | |
| 565 | 564 | 2.5, /* INP0 - center voltage of R402, R403 */ |
| 566 | 565 | NODE_40) /* INP1 */ |
| 567 | 566 | DISCRETE_CRFILTER(NODE_42, |
| 568 | 1, /* ENAB */ | |
| 569 | 567 | NODE_41, /* IN0 */ |
| 570 | 568 | RES_K(56 + 390), /* R404 + R405 */ |
| 571 | 569 | CAP_P(0.01) ) /* C401 */ |
| 572 | 570 | DISCRETE_RCFILTER(NODE_43, |
| 573 | 1, /* ENAB */ | |
| 574 | 571 | NODE_42, /* IN0 */ |
| 575 | 572 | RES_K(56), /* R404 */ |
| 576 | 573 | CAP_P(4700) ) /* C400 */ |
| r6049 | r6050 | |
| 653 | 650 | 0, |
| 654 | 651 | CAP_U(.001), |
| 655 | 652 | 0, |
| 656 | 0, | |
| 653 | 0, 0, | |
| 657 | 654 | 12, |
| 658 | 655 | 0, |
| 659 | 656 | 0, |
| r6049 | r6050 | |
| 682 | 679 | 0, |
| 683 | 680 | CAP_U(0.22), |
| 684 | 681 | 0, |
| 685 | 0, | |
| 682 | 0, 0, | |
| 686 | 683 | 12, |
| 687 | 684 | 0, |
| 688 | 685 | 0, |
| r6049 | r6050 | |
| 708 | 705 | 0, |
| 709 | 706 | 0, |
| 710 | 707 | 0, |
| 711 | 0, | |
| 708 | 0, 0, | |
| 712 | 709 | CAP_U(1), |
| 713 | 710 | 0, |
| 714 | 711 | 0, |
| r6049 | r6050 | |
| 788 | 785 | DISCRETE_LFSR_NOISE(BOOTHILL_NOISE, 1, 1, 7700, 12.0, 0, 12.0/2, &midway_lfsr) |
| 789 | 786 | |
| 790 | 787 | DISCRETE_OP_AMP_TRIG_VCA(NODE_30, BOOTHILL_LEFT_SHOT_EN, 0, 0, BOOTHILL_NOISE, 0, &boothill_shot_tvca_info) |
| 791 | DISCRETE_RCFILTER(NODE_31, 1, NODE_30, RES_K(12), CAP_U(.01)) | |
| 792 | DISCRETE_RCFILTER(BOOTHILL_L_SHOT_SND, 1, NODE_31, RES_K(12) + RES_K(68), CAP_U(.0022)) | |
| 788 | DISCRETE_RCFILTER(NODE_31, NODE_30, RES_K(12), CAP_U(.01)) | |
| 789 | DISCRETE_RCFILTER(BOOTHILL_L_SHOT_SND, NODE_31, RES_K(12) + RES_K(68), CAP_U(.0022)) | |
| 793 | 790 | |
| 794 | 791 | DISCRETE_OP_AMP_TRIG_VCA(NODE_35, BOOTHILL_RIGHT_SHOT_EN, 0, 0, BOOTHILL_NOISE, 0, &boothill_shot_tvca_info) |
| 795 | DISCRETE_RCFILTER(NODE_36, 1, NODE_35, RES_K(12), CAP_U(.01)) | |
| 796 | DISCRETE_RCFILTER(BOOTHILL_R_SHOT_SND, 1, NODE_36, RES_K(12) + RES_K(68), CAP_U(.0033)) | |
| 792 | DISCRETE_RCFILTER(NODE_36, NODE_35, RES_K(12), CAP_U(.01)) | |
| 793 | DISCRETE_RCFILTER(BOOTHILL_R_SHOT_SND, NODE_36, RES_K(12) + RES_K(68), CAP_U(.0033)) | |
| 797 | 794 | |
| 798 | 795 | /************************************************ |
| 799 | 796 | * Hit sounds |
| 800 | 797 | ************************************************/ |
| 801 | 798 | DISCRETE_OP_AMP_TRIG_VCA(NODE_40, BOOTHILL_LEFT_HIT_EN, 0, 0, BOOTHILL_NOISE, 0, &boothill_hit_tvca_info) |
| 802 | DISCRETE_RCFILTER(NODE_41, 1, NODE_40, RES_K(12), CAP_U(.033)) | |
| 803 | DISCRETE_RCFILTER(BOOTHILL_L_HIT_SND, 1, NODE_41, RES_K(12) + RES_K(100), CAP_U(.0033)) | |
| 799 | DISCRETE_RCFILTER(NODE_41, NODE_40, RES_K(12), CAP_U(.033)) | |
| 800 | DISCRETE_RCFILTER(BOOTHILL_L_HIT_SND, NODE_41, RES_K(12) + RES_K(100), CAP_U(.0033)) | |
| 804 | 801 | |
| 805 | 802 | DISCRETE_OP_AMP_TRIG_VCA(NODE_45, BOOTHILL_RIGHT_HIT_EN, 0, 0, BOOTHILL_NOISE, 0, &boothill_hit_tvca_info) |
| 806 | DISCRETE_RCFILTER(NODE_46, 1, NODE_45, RES_K(12), CAP_U(.0033)) | |
| 807 | DISCRETE_RCFILTER(BOOTHILL_R_HIT_SND, 1, NODE_46, RES_K(12) + RES_K(100), CAP_U(.0022)) | |
| 803 | DISCRETE_RCFILTER(NODE_46, NODE_45, RES_K(12), CAP_U(.0033)) | |
| 804 | DISCRETE_RCFILTER(BOOTHILL_R_HIT_SND, NODE_46, RES_K(12) + RES_K(100), CAP_U(.0022)) | |
| 808 | 805 | |
| 809 | 806 | /************************************************ |
| 810 | 807 | * Combine all sound sources. |
| r6049 | r6050 | |
| 933 | 930 | 0, /* r11 - not used */ |
| 934 | 931 | CAP_U(1), /* C300 */ |
| 935 | 932 | 0, /* c2 - not used */ |
| 936 | 0, | |
| 933 | 0, 0, | |
| 937 | 934 | 5, /* v1 */ |
| 938 | 935 | 0, /* v2 */ |
| 939 | 936 | 0, /* v3 */ |
| r6049 | r6050 | |
| 1030 | 1027 | |
| 1031 | 1028 | /* The following circuits remove DC poping noises when the tone is switched in/out. */ |
| 1032 | 1029 | DISCRETE_CRFILTER_VREF(NODE_31, |
| 1033 | 1, /* ENAB */ | |
| 1034 | 1030 | NODE_30, /* IN0 */ |
| 1035 | 1031 | RES_K(250), /* R409, R415, R414, R413 in parallel */ |
| 1036 | 1032 | CAP_U(0.1), /* c401 */ |
| r6049 | r6050 | |
| 1041 | 1037 | 2.5, /* INP0 - center voltage of R413, R414 */ |
| 1042 | 1038 | NODE_31) /* INP1 */ |
| 1043 | 1039 | DISCRETE_CRFILTER(NODE_33, |
| 1044 | 1, /* ENAB */ | |
| 1045 | 1040 | NODE_32, /* IN0 */ |
| 1046 | 1041 | RES_K(56 + 47 + 200), /* R412 + R408 + part of R411 */ |
| 1047 | 1042 | CAP_P(0.01) ) /* C404 */ |
| 1048 | 1043 | DISCRETE_RCFILTER(CHECKMAT_TONE_SND, |
| 1049 | 1, /* ENAB */ | |
| 1050 | 1044 | NODE_33, /* IN0 */ |
| 1051 | 1045 | RES_K(56), /* R412 */ |
| 1052 | 1046 | CAP_P(4700) ) /* C403 */ |
| r6049 | r6050 | |
| 1132 | 1126 | 0, |
| 1133 | 1127 | CAP_U(0.47), |
| 1134 | 1128 | 0, |
| 1135 | 0, | |
| 1129 | 0, 0, | |
| 1136 | 1130 | 12, /* v1 */ |
| 1137 | 1131 | 0, /* v2 */ |
| 1138 | 1132 | 0, /* v3 */ |
| r6049 | r6050 | |
| 1236 | 1230 | DISCRETE_LFSR_NOISE(DESERTGU_NOISE, 1, 1, 7515, 12.0, 0, 12.0/2, &midway_lfsr) |
| 1237 | 1231 | |
| 1238 | 1232 | DISCRETE_OP_AMP_TRIG_VCA(NODE_30, DESERTGU_RIFLE_SHOT_EN, 0, 0, DESERTGU_NOISE, 0, &desertgu_rifle_shot_tvca_info) |
| 1239 | DISCRETE_RCFILTER(NODE_31, 1, NODE_30, RES_K(12), CAP_U(.01)) | |
| 1240 | DISCRETE_CRFILTER(DESERTGU_RIFLE_SHOT_SND, 1, NODE_31, RES_K(12) + RES_K(68), CAP_U(.0022)) | |
| 1233 | DISCRETE_RCFILTER(NODE_31, NODE_30, RES_K(12), CAP_U(.01)) | |
| 1234 | DISCRETE_CRFILTER(DESERTGU_RIFLE_SHOT_SND, NODE_31, RES_K(12) + RES_K(68), CAP_U(.0022)) | |
| 1241 | 1235 | |
| 1242 | 1236 | /************************************************ |
| 1243 | 1237 | * Bottle hit sound |
| r6049 | r6050 | |
| 1801 | 1795 | CAP_U(.015), /* c300 */ |
| 1802 | 1796 | CAP_U(.1), /* c301 */ |
| 1803 | 1797 | CAP_U(.082), /* c302 */ |
| 1798 | 0, /* no c4 */ | |
| 1804 | 1799 | 5, /* v1 */ |
| 1805 | 1800 | 5, /* v2 */ |
| 1806 | 1801 | 5, /* v3 */ |
| r6049 | r6050 | |
| 1842 | 1837 | 0,0,0,0, |
| 1843 | 1838 | CAP_U(1), /* c201 */ |
| 1844 | 1839 | 0, |
| 1845 | 0, | |
| 1840 | 0, 0, | |
| 1846 | 1841 | 5, /* v1 */ |
| 1847 | 1842 | 0, /* v2 */ |
| 1848 | 1843 | 0, /* v3 */ |
| r6049 | r6050 | |
| 1909 | 1904 | DISCRETE_LFSR_NOISE(CLOWNS_NOISE, 1, 1, 7700, 12.0, 0, 12.0/2, &midway_lfsr) |
| 1910 | 1905 | |
| 1911 | 1906 | DISCRETE_OP_AMP_TRIG_VCA(NODE_30, CLOWNS_POP_TOP_EN, CLOWNS_POP_MIDDLE_EN, CLOWNS_POP_BOTTOM_EN, CLOWNS_NOISE, 0, &clowns_pop_tvca_info) |
| 1912 | DISCRETE_RCFILTER(NODE_31, 1, NODE_30, RES_K(15), CAP_U(.01)) | |
| 1913 | DISCRETE_CRFILTER(NODE_32, 1, NODE_31, RES_K(15) + RES_K(39), CAP_U(.01)) | |
| 1907 | DISCRETE_RCFILTER(NODE_31, NODE_30, RES_K(15), CAP_U(.01)) | |
| 1908 | DISCRETE_CRFILTER(NODE_32, NODE_31, RES_K(15) + RES_K(39), CAP_U(.01)) | |
| 1914 | 1909 | DISCRETE_GAIN(CLOWNS_POP_SND, NODE_32, RES_K(39)/(RES_K(15) + RES_K(39))) |
| 1915 | 1910 | |
| 1916 | 1911 | /************************************************ |
| r6049 | r6050 | |
| 2052 | 2047 | #define SPACWALK_R305 RES_K(3680) |
| 2053 | 2048 | #define SPACWALK_R307 RES_K(20) |
| 2054 | 2049 | #define SPACWALK_R308 RES_K(20) /* not labeled but it's beside R307 */ |
| 2050 | #define SPACWALK_R400 RES_K(1) | |
| 2051 | #define SPACWALK_R401 RES_K(200) | |
| 2052 | #define SPACWALK_R403 RES_K(51) | |
| 2053 | #define SPACWALK_R404 RES_K(220) | |
| 2054 | #define SPACWALK_R406 RES_M(1) | |
| 2055 | #define SPACWALK_R407 RES_K(820) | |
| 2056 | #define SPACWALK_R410 RES_K(47) | |
| 2057 | #define SPACWALK_R411 RES_K(300) | |
| 2058 | #define SPACWALK_R412 RES_K(330) | |
| 2059 | #define SPACWALK_R413 RES_M(1) | |
| 2060 | #define SPACWALK_R414 RES_M(1) | |
| 2061 | #define SPACWALK_R416 RES_M(4.7) | |
| 2062 | #define SPACWALK_R417 RES_K(10) | |
| 2063 | #define SPACWALK_R418 RES_K(100) | |
| 2055 | 2064 | #define SPACWALK_R419 RES_K(2.7) |
| 2056 | 2065 | #define SPACWALK_R420 RES_K(20) |
| 2057 | 2066 | #define SPACWALK_R421 RES_K(11) |
| r6049 | r6050 | |
| 2069 | 2078 | #define SPACWALK_C302 CAP_U(2.2) |
| 2070 | 2079 | #define SPACWALK_C303 CAP_U(0.0047) |
| 2071 | 2080 | #define SPACWALK_C304 CAP_U(0.0047) /* not labeled but it's beside C303 */ |
| 2081 | #define SPACWALK_C401 CAP_U(1) | |
| 2082 | #define SPACWALK_C402 CAP_U(0.68) | |
| 2083 | #define SPACWALK_C403 CAP_U(0.0022) | |
| 2084 | #define SPACWALK_C451 CAP_U(0.001) | |
| 2085 | #define SPACWALK_C452 CAP_U(0.001) | |
| 2086 | #define SPACWALK_C453 CAP_U(0.001) | |
| 2072 | 2087 | #define SPACWALK_C602 CAP_U(1) |
| 2073 | 2088 | |
| 2074 | 2089 | |
| r6049 | r6050 | |
| 2078 | 2093 | SPACWALK_RJ3, 0, SPACWALK_R300, /* r5, r6, r7 */ |
| 2079 | 2094 | SPACWALK_RJ3, SPACWALK_R301, /* r8, r9 */ |
| 2080 | 2095 | SPACWALK_RJ3, SPACWALK_R302, /* r10, r11 */ |
| 2081 | SPACWALK_C300, SPACWALK_C301, SPACWALK_C302, /* c1, c2, c3 */ | |
| 2096 | SPACWALK_C300, SPACWALK_C301, SPACWALK_C302, 0, /* c1, c2, c3, c4 */ | |
| 2082 | 2097 | 5, 5, 5, 12, /* v1, v2, v3, vP */ |
| 2083 | 2098 | DISC_OP_AMP_TRIGGER_FUNCTION_NONE, |
| 2084 | 2099 | DISC_OP_AMP_TRIGGER_FUNCTION_NONE, |
| r6049 | r6050 | |
| 2101 | 2116 | SPACWALK_R207, SPACWALK_R205, 0, SPACWALK_R208, /* r1, r2, r3, r4 */ |
| 2102 | 2117 | SPACWALK_RJ3, 0, SPACWALK_R206, /* r5, r6, r7 */ |
| 2103 | 2118 | 0, 0, 0, 0 , /* r8, r9, r10, r11 */ |
| 2104 | SPACWALK_C201, 0, 0, /* c1, c2, c3 */ | |
| 2119 | SPACWALK_C201, 0, 0, 0, /* c1, c2, c3, c4 */ | |
| 2105 | 2120 | 5, 0, 0, 12, /* v1, v2, v3, vP */ |
| 2106 | 2121 | DISC_OP_AMP_TRIGGER_FUNCTION_NONE, |
| 2107 | 2122 | DISC_OP_AMP_TRIGGER_FUNCTION_NONE, |
| r6049 | r6050 | |
| 2111 | 2126 | DISC_OP_AMP_TRIGGER_FUNCTION_NONE |
| 2112 | 2127 | }; |
| 2113 | 2128 | |
| 2129 | static const discrete_integrate_info spacwalk_sb_miss_integrate = | |
| 2130 | { | |
| 2131 | DISC_INTEGRATE_OP_AMP_1 | DISC_OP_AMP_IS_NORTON, | |
| 2132 | SPACWALK_R406, SPACWALK_R401, 0, SPACWALK_C402, /* r1, r2, r3, c */ | |
| 2133 | 12, 12, /* v1, vP */ | |
| 2134 | 0, 0, 0 /* f0, f1, f2 */ | |
| 2135 | }; | |
| 2136 | ||
| 2137 | static const discrete_op_amp_osc_info spacwalk_sb_miss_vco = | |
| 2138 | { | |
| 2139 | DISC_OP_AMP_OSCILLATOR_VCO_3 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_SQW, | |
| 2140 | SPACWALK_R407, SPACWALK_R412, SPACWALK_R410, SPACWALK_R411, SPACWALK_R413, 0, 0, 0, /* r1, r2, r3, r4, r5, r6, r7, r8 */ | |
| 2141 | SPACWALK_C403, 12 /* c, vP */ | |
| 2142 | }; | |
| 2143 | ||
| 2144 | static const discrete_op_amp_filt_info spacwalk_sb_miss_filter = | |
| 2145 | { | |
| 2146 | /* we use r1, not r2 because vref is taken into acount by the CRFILTER */ | |
| 2147 | SPACWALK_R417, 0, SPACWALK_R414, 0, SPACWALK_R416, /* r1, r2, r3, r4, rF */ | |
| 2148 | SPACWALK_C451, SPACWALK_C452, 0, /* c1, c2, c3 */ | |
| 2149 | 0, 12, 0 /* vRef, vP, vN */ | |
| 2150 | }; | |
| 2151 | ||
| 2152 | static const discrete_op_amp_info spacwalk_sb_miss_amp = | |
| 2153 | { | |
| 2154 | DISC_OP_AMP_IS_NORTON, | |
| 2155 | SPACWALK_R418, SPACWALK_R404, 0, SPACWALK_R403, /* r1, r2, r3, r4 */ | |
| 2156 | 0, /* c */ | |
| 2157 | 0, 12, /* vN, vP */ | |
| 2158 | }; | |
| 2159 | ||
| 2114 | 2160 | static const discrete_op_amp_osc_info spacwalk_spaceship_osc = |
| 2115 | 2161 | { |
| 2116 | DISC_OP_AMP_OSCILLATOR_2 | DISC_OP_AMP_IS_NORTON, | |
| 2162 | DISC_OP_AMP_OSCILLATOR_2 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_CAP, | |
| 2117 | 2163 | RES_K(75), RES_M(1), RES_M(6.8), RES_M(2.4), 0, 0, 0, 0, /* r1, r2, r3, r4, r5, r6, r7, r8 */ |
| 2118 | 2164 | CAP_U(2.2), 12 /* c, vP */ |
| 2119 | 2165 | }; |
| r6049 | r6050 | |
| 2139 | 2185 | ************************************************/ |
| 2140 | 2186 | #define SPACWALK_SPRINGBOARD_HIT_CIRCUIT(_num) \ |
| 2141 | 2187 | DISCRETE_RCFILTER(NODE_RELATIVE(NODE_29, _num), \ |
| 2142 | 1, /* ENAB */ \ | |
| 2143 | 2188 | SPACWALK_NOISE, /* IN0 */ \ |
| 2144 | 2189 | RES_K(330), CAP_U(.1)) \ |
| 2145 | 2190 | DISCRETE_RCFILTER(NODE_RELATIVE(NODE_31, _num), \ |
| 2146 | 1, /* ENAB */ \ | |
| 2147 | 2191 | NODE_RELATIVE(NODE_29, _num), /* IN0 */ \ |
| 2148 | 2192 | RES_K(330) + RES_K(150), CAP_U(.1)) \ |
| 2149 | 2193 | DISCRETE_OP_AMP_VCO1(NODE_RELATIVE(NODE_33, _num), /* IC M2-3, pin 5 */ \ |
| r6049 | r6050 | |
| 2202 | 2246 | SPACWALK_NOISE, 0, /* IN0, IN1 */ |
| 2203 | 2247 | &spacwalk_hit_tvca_info) |
| 2204 | 2248 | DISCRETE_RCFILTER(NODE_21, |
| 2205 | 1, /* ENAB */ | |
| 2206 | 2249 | NODE_20, /* IN0 */ |
| 2207 | 2250 | SPACWALK_R307, SPACWALK_C303) |
| 2208 | 2251 | DISCRETE_RCFILTER(SPACWALK_TARGET_HIT_SND, |
| 2209 | 1, /* ENAB */ | |
| 2210 | 2252 | NODE_21, /* IN0 */ |
| 2211 | 2253 | SPACWALK_R307 + SPACWALK_R308, SPACWALK_C304) |
| 2212 | 2254 | |
| r6049 | r6050 | |
| 2220 | 2262 | /************************************************ |
| 2221 | 2263 | * Springboard miss sound |
| 2222 | 2264 | ************************************************/ |
| 2223 | DISCRETE_CONSTANT(SPACWALK_SPRINGBOARD_MISS_SND, 0) | |
| 2265 | DISCRETE_RCDISC2(NODE_50, /* voltage on C401 */ | |
| 2266 | SPACWALK_SPRINGBOARD_MISS_EN, /* SWITCH */ | |
| 2267 | OP_AMP_NORTON_VBE, RES_2_PARALLEL(SPACWALK_R401, SPACWALK_R407), /* INP0,RVAL0 */ | |
| 2268 | 12.0 - .5, SPACWALK_R400, /* INP1,RVAL1 */ | |
| 2269 | SPACWALK_C401) | |
| 2270 | DISCRETE_INTEGRATE(NODE_51, /* IC K4, pin 9 */ | |
| 2271 | NODE_50, 0, /* TRG0,TRG1*/ | |
| 2272 | &spacwalk_sb_miss_integrate) | |
| 2273 | DISCRETE_OP_AMP_VCO1(NODE_52, /* IC K4, pin 5 */ | |
| 2274 | 1, /* ENAB */ | |
| 2275 | NODE_50, /* VMOD1 */ | |
| 2276 | &spacwalk_sb_miss_vco) | |
| 2277 | DISCRETE_CRFILTER(NODE_53, | |
| 2278 | NODE_52, /* IN0 */ | |
| 2279 | SPACWALK_R417, SPACWALK_C453) | |
| 2280 | /* this filter type probably does not work right. I need to test it. */ | |
| 2281 | DISCRETE_OP_AMP_FILTER(NODE_54, /* IC K3, pin 5 */ | |
| 2282 | 1, /* ENAB */ | |
| 2283 | NODE_53, 0, /* INP0,INP1 */ | |
| 2284 | DISC_OP_AMP_FILTER_IS_BAND_PASS_1M | DISC_OP_AMP_IS_NORTON, &spacwalk_sb_miss_filter) | |
| 2285 | DISCRETE_OP_AMP(SPACWALK_SPRINGBOARD_MISS_SND, /* IC K4, pin 10 */ | |
| 2286 | 1, /* ENAB */ | |
| 2287 | NODE_54, NODE_51, /* IN0,IN1 */ | |
| 2288 | &spacwalk_sb_miss_amp) | |
| 2224 | 2289 | |
| 2225 | 2290 | /************************************************ |
| 2226 | 2291 | * Space ship sound |
| 2227 | 2292 | ************************************************/ |
| 2228 | DISCRETE_OP_AMP_OSCILLATOR(NODE_60, /* 2.2uF cap near IC JK-2 */ | |
| 2293 | DISCRETE_OP_AMP_OSCILLATOR(NODE_60, /* voltage on 2.2uF cap near IC JK-2 */ | |
| 2229 | 2294 | 1, /* ENAB */ |
| 2230 | 2295 | &spacwalk_spaceship_osc) |
| 2231 | 2296 | DISCRETE_OP_AMP_VCO1(NODE_61, /* IC JK-2, pin 5 */ |
| r6049 | r6050 | |
| 2233 | 2298 | NODE_60, /* VMOD1*/ |
| 2234 | 2299 | &spacwalk_spaceship_vco) |
| 2235 | 2300 | DISCRETE_RCFILTER(NODE_62, |
| 2236 | 1, /* ENAB */ | |
| 2237 | 2301 | NODE_61, /* IN0 */ |
| 2238 | 2302 | RES_K(1), CAP_U(0.15)) |
| 2239 | 2303 | DISCRETE_RCFILTER(SPACWALK_SPACE_SHIP_SND, |
| 2240 | 1, /* ENAB */ | |
| 2241 | 2304 | NODE_62, /* IN0 */ |
| 2242 | 2305 | RES_K(1) + RES_K(10), CAP_U(0.015)) |
| 2243 | 2306 | |
| r6049 | r6050 | |
| 2296 | 2359 | * |
| 2297 | 2360 | * Shuffleboard |
| 2298 | 2361 | * |
| 2362 | * Discrete sound emulation: Oct 2009, D.R. | |
| 2363 | * | |
| 2299 | 2364 | *************************************/ |
| 2300 | 2365 | |
| 2301 | /* Noise clock was breadboarded and measured at 1210Hz */ | |
| 2366 | /* Discrete Sound Input Nodes */ | |
| 2367 | #define SHUFFLE_ROLLING_1_EN NODE_01 | |
| 2368 | #define SHUFFLE_ROLLING_2_EN NODE_02 | |
| 2369 | #define SHUFFLE_ROLLING_3_EN NODE_03 | |
| 2370 | #define SHUFFLE_FOUL_EN NODE_04 | |
| 2371 | #define SHUFFLE_ROLLOVER_EN NODE_05 | |
| 2372 | #define SHUFFLE_CLICK_EN NODE_06 | |
| 2302 | 2373 | |
| 2374 | /* Discrete Sound Output Nodes */ | |
| 2375 | #define SHUFFLE_NOISE NODE_10 | |
| 2376 | #define SHUFFLE_ROLLING_SND NODE_11 | |
| 2377 | #define SHUFFLE_FOUL_SND NODE_12 | |
| 2378 | #define SHUFFLE_ROLLOVER_SND NODE_13 | |
| 2379 | #define SHUFFLE_CLICK_SND NODE_14 | |
| 2303 | 2380 | |
| 2381 | /* Parts List - Resistors */ | |
| 2382 | #define SHUFFLE_R300 RES_K(33) | |
| 2383 | #define SHUFFLE_R400 RES_K(200) | |
| 2384 | #define SHUFFLE_R401 RES_K(3) | |
| 2385 | #define SHUFFLE_R402 RES_K(5.6) | |
| 2386 | #define SHUFFLE_R403 RES_K(5.6) | |
| 2387 | #define SHUFFLE_R404 RES_M(1) | |
| 2388 | #define SHUFFLE_R406 RES_K(300) | |
| 2389 | #define SHUFFLE_R407 RES_K(680) | |
| 2390 | #define SHUFFLE_R408 RES_K(680) | |
| 2391 | #define SHUFFLE_R409 RES_K(680) | |
| 2392 | #define SHUFFLE_R410 RES_K(680) | |
| 2393 | #define SHUFFLE_R411 RES_K(680) | |
| 2394 | #define SHUFFLE_R412 RES_M(2.7) | |
| 2395 | #define SHUFFLE_R500 RES_K(300) | |
| 2396 | #define SHUFFLE_R503 RES_M(2.7) | |
| 2397 | #define SHUFFLE_R504 RES_K(680) | |
| 2398 | #define SHUFFLE_R505 RES_K(680) | |
| 2399 | #define SHUFFLE_R506 RES_K(100) | |
| 2400 | #define SHUFFLE_R507 RES_K(47) | |
| 2401 | #define SHUFFLE_R508 RES_K(47) | |
| 2402 | #define SHUFFLE_R509 RES_K(100) | |
| 2403 | #define SHUFFLE_R511 RES_M(2) | |
| 2404 | #define SHUFFLE_R512 RES_M(5.6) | |
| 2405 | #define SHUFFLE_R513 RES_K(680) | |
| 2406 | #define SHUFFLE_R514 RES_M(1.5) | |
| 2407 | #define SHUFFLE_R515 RES_M(1) | |
| 2408 | #define SHUFFLE_R516 RES_K(510) | |
| 2409 | ||
| 2410 | /* Parts List - Capacitors */ | |
| 2411 | #define SHUFFLE_C300 CAP_U(0.1) | |
| 2412 | #define SHUFFLE_C400 CAP_U(0.1) | |
| 2413 | #define SHUFFLE_C401 CAP_U(1) | |
| 2414 | #define SHUFFLE_C402 CAP_U(1) | |
| 2415 | #define SHUFFLE_C403 CAP_U(1) | |
| 2416 | #define SHUFFLE_C404 CAP_U(0.1) | |
| 2417 | #define SHUFFLE_C405 CAP_U(0.1) | |
| 2418 | #define SHUFFLE_C500 CAP_U(0.1) | |
| 2419 | #define SHUFFLE_C503 CAP_U(0.0022) | |
| 2420 | #define SHUFFLE_C504 CAP_U(0.0022) | |
| 2421 | #define SHUFFLE_C505 CAP_U(0.33) | |
| 2422 | #define SHUFFLE_C506 CAP_U(1) | |
| 2423 | #define SHUFFLE_C507 CAP_U(1) | |
| 2424 | #define SHUFFLE_C508 CAP_U(1) | |
| 2425 | ||
| 2426 | #define SHUFFLE_HSYNC 15750 /* unmeasured */ | |
| 2427 | #define SHUFFLE_1V SHUFFLE_HSYNC / 2 | |
| 2428 | #define SHUFFLE_32V SHUFFLE_1V / 32 | |
| 2429 | ||
| 2430 | ||
| 2431 | static const discrete_op_amp_tvca_info shuffle_rolling_tvca = | |
| 2432 | { | |
| 2433 | SHUFFLE_R512, 0, 0, SHUFFLE_R511, /* r1, r2, r3, r4 */ | |
| 2434 | RES_K(10), 0, SHUFFLE_R516, /* r5, r6, r7 */ | |
| 2435 | RES_K(10), SHUFFLE_R515, /* r8, r9 */ | |
| 2436 | RES_K(10), SHUFFLE_R514, /* r10, r11 */ | |
| 2437 | SHUFFLE_C508, SHUFFLE_C507, SHUFFLE_C506, SHUFFLE_C505, /* c1, c2, c3, c4 */ | |
| 2438 | 12, 12, 12, 12, /* v1, v2, v3, vP */ | |
| 2439 | 0, 0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, 0, /* f0, f1, f2, f3 */ | |
| 2440 | DISC_OP_AMP_TRIGGER_FUNCTION_TRG1, /* f4 */ | |
| 2441 | DISC_OP_AMP_TRIGGER_FUNCTION_TRG2 /* f5 */ | |
| 2442 | }; | |
| 2443 | ||
| 2444 | static const discrete_op_amp_info shuffle_rolling_amp = | |
| 2445 | { | |
| 2446 | DISC_OP_AMP_IS_NORTON, | |
| 2447 | SHUFFLE_R513, SHUFFLE_R505, SHUFFLE_R503, SHUFFLE_R504, /* r1, r2, r3, r4 */ | |
| 2448 | 0, /* c */ | |
| 2449 | 0, 12, /* vN, vP */ | |
| 2450 | }; | |
| 2451 | ||
| 2452 | static const discrete_op_amp_tvca_info shuffle_foul_tvca = | |
| 2453 | { | |
| 2454 | SHUFFLE_R412, SHUFFLE_R411, 0, SHUFFLE_R408, /* r1, r2, r3, r4 */ | |
| 2455 | RES_K(1), 0, SHUFFLE_R406, /* r5, r6, r7 */ | |
| 2456 | 0, 0, 0, 0, /* r8, r9, r10, r11 */ | |
| 2457 | SHUFFLE_C404, 0, 0, 0, /* c1, c2, c3, c4 */ | |
| 2458 | 5, 0, 0, 12, /* v1, v2, v3, vP */ | |
| 2459 | 0, 0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, 0, 0, 0 /* f0, f1, f2, f3, f4, f5 */ | |
| 2460 | }; | |
| 2461 | ||
| 2462 | static const discrete_op_amp_tvca_info shuffle_rollover_tvca = | |
| 2463 | { | |
| 2464 | SHUFFLE_R404, SHUFFLE_R410, 0, SHUFFLE_R407, /* r1, r2, r3, r4 */ | |
| 2465 | RES_K(10), 0, SHUFFLE_R409, /* r5, r6, r7 */ | |
| 2466 | 0, 0, 0, 0, /* r8, r9, r10, r11 */ | |
| 2467 | SHUFFLE_C405, 0, 0, 0, /* c1, c2, c3, c4 */ | |
| 2468 | 12, 0, 0, 12, /* v1, v2, v3, vP */ | |
| 2469 | 0, 0, DISC_OP_AMP_TRIGGER_FUNCTION_TRG0, 0, 0, 0 /* f0, f1, f2, f3, f4, f5 */ | |
| 2470 | }; | |
| 2471 | ||
| 2472 | static const discrete_mixer_desc shuffle_mixer = | |
| 2473 | { | |
| 2474 | DISC_MIXER_IS_RESISTOR, | |
| 2475 | {SHUFFLE_R500, SHUFFLE_R400, SHUFFLE_R403 + SHUFFLE_R402 + SHUFFLE_R401, SHUFFLE_R300}, | |
| 2476 | {0}, /* r_nodes */ | |
| 2477 | {SHUFFLE_C500, SHUFFLE_C400, SHUFFLE_C401, SHUFFLE_C300}, | |
| 2478 | 0, 0, 0, 0, 0 ,1 /* rI, rF, cF, cAmp, vRef, gain */ | |
| 2479 | }; | |
| 2480 | ||
| 2481 | ||
| 2482 | static DISCRETE_SOUND_START(shuffle) | |
| 2483 | DISCRETE_INPUT_LOGIC(SHUFFLE_ROLLING_1_EN) | |
| 2484 | DISCRETE_INPUT_LOGIC(SHUFFLE_ROLLING_2_EN) | |
| 2485 | DISCRETE_INPUT_LOGIC(SHUFFLE_ROLLING_3_EN) | |
| 2486 | DISCRETE_INPUT_LOGIC(SHUFFLE_FOUL_EN) | |
| 2487 | DISCRETE_INPUT_LOGIC(SHUFFLE_ROLLOVER_EN) | |
| 2488 | DISCRETE_INPUTX_LOGIC(SHUFFLE_CLICK_EN, 11.5, 0, 0) | |
| 2489 | ||
| 2490 | /* Noise clock was breadboarded and measured at 1210Hz */ | |
| 2491 | DISCRETE_LFSR_NOISE(SHUFFLE_NOISE, /* IC N5, pin 10 */ | |
| 2492 | 1, 1, /* ENAB, RESET */ | |
| 2493 | 1210, 12.0, 0, 12.0 / 2, &midway_lfsr) /* CLK,AMPL,FEED,BIAS,LFSRTB */ | |
| 2494 | ||
| 2495 | /************************************************ | |
| 2496 | * Shuffle rolling | |
| 2497 | ************************************************/ | |
| 2498 | DISCRETE_OP_AMP_TRIG_VCA(NODE_20, /* IC P3-4, pin 5 */ | |
| 2499 | SHUFFLE_ROLLING_1_EN, SHUFFLE_ROLLING_2_EN, SHUFFLE_ROLLING_3_EN, /* TRG0,TRG1,TRG2 */ | |
| 2500 | 0, 0, /*IN0,IN1 */ | |
| 2501 | &shuffle_rolling_tvca) | |
| 2502 | DISCRETE_OP_AMP(NODE_21, /* IC P3-4, pin 4 */ | |
| 2503 | 1, /* ENAB */ | |
| 2504 | SHUFFLE_NOISE, NODE_20, /* IN0,IN1 */ | |
| 2505 | &shuffle_rolling_amp) | |
| 2506 | /* filter not accurate */ | |
| 2507 | DISCRETE_FILTER1(NODE_22, 1, NODE_21, 800, DISC_FILTER_LOWPASS) | |
| 2508 | DISCRETE_GAIN(SHUFFLE_ROLLING_SND, NODE_22, .2) | |
| 2509 | ||
| 2510 | /************************************************ | |
| 2511 | * Foul | |
| 2512 | ************************************************/ | |
| 2513 | DISCRETE_SQUAREWFIX(NODE_30, /* 32V is a guess, scan of schematic is missing actual tone value used */ | |
| 2514 | 1, SHUFFLE_32V, DEFAULT_TTL_V_LOGIC_1, 50, DEFAULT_TTL_V_LOGIC_1 / 2, 0) /* ENAB,FREQ,AMP,DUTY,BIAS,PHASE */ | |
| 2515 | DISCRETE_OP_AMP_TRIG_VCA(SHUFFLE_FOUL_SND, /* IC M3-4, pin 5 */ | |
| 2516 | SHUFFLE_FOUL_EN, 0, 0, /* TRG0,TRG1,TRG2 */ | |
| 2517 | NODE_30, 0, /*IN0,IN1 */ | |
| 2518 | &shuffle_foul_tvca) | |
| 2519 | ||
| 2520 | /************************************************ | |
| 2521 | * Shuffle rollover | |
| 2522 | ************************************************/ | |
| 2523 | DISCRETE_OP_AMP_TRIG_VCA(NODE_40, /* IC M3-4, pin 4 */ | |
| 2524 | SHUFFLE_ROLLOVER_EN, 0, 0, /* TRG0,TRG1,TRG2 */ | |
| 2525 | SHUFFLE_NOISE, 0, /*IN0,IN1 */ | |
| 2526 | &shuffle_rollover_tvca) | |
| 2527 | DISCRETE_RCFILTER(NODE_41, | |
| 2528 | NODE_40, /* IN0 */ | |
| 2529 | SHUFFLE_R403, SHUFFLE_C403) | |
| 2530 | DISCRETE_RCFILTER(SHUFFLE_ROLLOVER_SND, | |
| 2531 | NODE_41, /* IN0 */ | |
| 2532 | SHUFFLE_R403 + SHUFFLE_R402, SHUFFLE_C402) | |
| 2533 | ||
| 2534 | /************************************************ | |
| 2535 | * Click | |
| 2536 | ************************************************/ | |
| 2537 | /* filter not accurate */ | |
| 2538 | DISCRETE_FILTER1(NODE_50, 1, SHUFFLE_CLICK_EN, 300, DISC_FILTER_LOWPASS) | |
| 2539 | DISCRETE_GAIN(SHUFFLE_CLICK_SND, NODE_50, .3) | |
| 2540 | ||
| 2541 | /************************************************ | |
| 2542 | * Combine all sound sources. | |
| 2543 | ************************************************/ | |
| 2544 | DISCRETE_MIXER4(NODE_90, | |
| 2545 | 1, /* ENAB */ | |
| 2546 | SHUFFLE_ROLLING_SND, | |
| 2547 | SHUFFLE_FOUL_SND, | |
| 2548 | SHUFFLE_ROLLOVER_SND, | |
| 2549 | SHUFFLE_CLICK_SND, | |
| 2550 | &shuffle_mixer) | |
| 2551 | DISCRETE_OUTPUT(NODE_90, 59200) | |
| 2552 | DISCRETE_SOUND_END | |
| 2553 | ||
| 2554 | ||
| 2304 | 2555 | MACHINE_DRIVER_START( shuffle_audio ) |
| 2305 | 2556 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 2557 | ||
| 2558 | MDRV_SOUND_ADD("discrete", DISCRETE, 0) | |
| 2559 | MDRV_SOUND_CONFIG_DISCRETE(shuffle) | |
| 2560 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 2306 | 2561 | MACHINE_DRIVER_END |
| 2307 | 2562 | |
| 2308 | 2563 | |
| 2309 | WRITE8_HANDLER( shuffle_audio_1_w ) | |
| 2564 | WRITE8_DEVICE_HANDLER( shuffle_audio_1_w ) | |
| 2310 | 2565 | { |
| 2311 | | |
| 2566 | | |
| 2312 | 2567 | |
| 2313 | | |
| 2568 | | |
| 2314 | 2569 | |
| 2315 | sound_global_enable( | |
| 2570 | sound_global_enable(device->machine, (data >> 2) & 0x01); | |
| 2316 | 2571 | |
| 2317 | /* set SHUFFLE ROLLING sound((data >> 3) & 0x07) 0, if not rolling, | |
| 2318 | faster rolling = higher number */ | |
| 2572 | discrete_sound_w(device, NODE_29, (data >> 3) & 0x07); | |
| 2319 | 2573 | |
| 2574 | discrete_sound_w(device, SHUFFLE_ROLLING_3_EN, (data >> 3) & 0x01); | |
| 2575 | discrete_sound_w(device, SHUFFLE_ROLLING_2_EN, (data >> 4) & 0x01); | |
| 2576 | discrete_sound_w(device, SHUFFLE_ROLLING_1_EN, (data >> 5) & 0x01); | |
| 2577 | ||
| 2320 | 2578 | /* D6 and D7 are not connected */ |
| 2321 | 2579 | } |
| 2322 | 2580 | |
| 2323 | 2581 | |
| 2324 | WRITE8_HANDLER( shuffle_audio_2_w ) | |
| 2582 | WRITE8_DEVICE_HANDLER( shuffle_audio_2_w ) | |
| 2325 | 2583 | { |
| 2326 | | |
| 2584 | d | |
| 2327 | 2585 | |
| 2328 | 2586 | coin_counter_w(0, (data >> 1) & 0x01); |
| 2329 | 2587 | |
| r6049 | r6050 | |
| 2352 | 2610 | /************************************************ |
| 2353 | 2611 | * Filter it to be AC. |
| 2354 | 2612 | ************************************************/ |
| 2355 | DISCRETE_CRFILTER(NODE_91, | |
| 2613 | DISCRETE_CRFILTER(NODE_91, | |
| 2356 | 2614 | |
| 2357 | 2615 | DISCRETE_OUTPUT(NODE_91, 5000) |
| 2358 | 2616 | |
| r6049 | r6050 | |
| 2572 | 2830 | 0, /* no r11 */ |
| 2573 | 2831 | CAP_U(1), /* C506 */ |
| 2574 | 2832 | 0, /* no c2 */ |
| 2575 | 0, | |
| 2833 | 0, 0, | |
| 2576 | 2834 | 12, /* v1 */ |
| 2577 | 2835 | 0, /* no v2 */ |
| 2578 | 2836 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 2601 | 2859 | 0, /* no r11 */ |
| 2602 | 2860 | CAP_U(2.2), /* C304 */ |
| 2603 | 2861 | 0, /* no c2 */ |
| 2604 | 0, | |
| 2862 | 0, 0, | |
| 2605 | 2863 | 5, /* v1 */ |
| 2606 | 2864 | 0, /* no v2 */ |
| 2607 | 2865 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 2630 | 2888 | 0, /* no r11 */ |
| 2631 | 2889 | CAP_U(2.2), /* C400 */ |
| 2632 | 2890 | 0, /* no c2 */ |
| 2633 | 0, | |
| 2891 | 0, 0, | |
| 2634 | 2892 | 12, /* v1 */ |
| 2635 | 2893 | 0, /* no v2 */ |
| 2636 | 2894 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 2731 | 2989 | DISC_OP_AMP_FILTER_IS_BAND_PASS_1M | DISC_OP_AMP_IS_NORTON, |
| 2732 | 2990 | &spcenctr_enemy_ship_shot_filt) |
| 2733 | 2991 | DISCRETE_CRFILTER(SPCENCTR_ENEMY_SHIP_SHOT_SND, |
| 2734 | 1, /* ENAB */ | |
| 2735 | 2992 | NODE_23, /* IN0 */ |
| 2736 | 2993 | RES_K(1.8), /* R116 */ |
| 2737 | 2994 | CAP_U(0.1) ) /* C104 */ |
| r6049 | r6050 | |
| 2758 | 3015 | 0, /* MIN */ |
| 2759 | 3016 | 12) /* MAX */ |
| 2760 | 3017 | DISCRETE_CRFILTER(NODE_34, |
| 2761 | 1, /* ENAB */ | |
| 2762 | 3018 | SPCENCTR_NOISE, /* IN0 */ |
| 2763 | 3019 | RES_M(1) + RES_K(330), /* R507, R509 */ |
| 2764 | 3020 | CAP_U(0.1) ) /* C503 */ |
| r6049 | r6050 | |
| 2836 | 3092 | 0, /* no IN1 */ |
| 2837 | 3093 | &spcenctr_explosion_tvca) |
| 2838 | 3094 | DISCRETE_RCFILTER(NODE_71, |
| 2839 | 1, /* ENAB */ | |
| 2840 | 3095 | NODE_70, /* IN0 */ |
| 2841 | 3096 | RES_K(1.8), /* R405 */ |
| 2842 | 3097 | CAP_U(0.22) ) /* C401 */ |
| 2843 | 3098 | DISCRETE_RCFILTER(SPCENCTR_EXPLOSION_SND, |
| 2844 | 1, /* ENAB */ | |
| 2845 | 3099 | NODE_71, /* IN0 */ |
| 2846 | 3100 | RES_K(1.8) + RES_K(3.6), /* R405 + R406 */ |
| 2847 | 3101 | CAP_U(0.22) ) /* C402 */ |
| r6049 | r6050 | |
| 3062 | 3316 | 0, /* no r11 */ |
| 3063 | 3317 | CAP_U(0.1), /* C1050 */ |
| 3064 | 3318 | 0, /* no c2 */ |
| 3065 | 0, | |
| 3319 | 0, 0, | |
| 3066 | 3320 | 5, /* v1 */ |
| 3067 | 3321 | 0, /* no v2 */ |
| 3068 | 3322 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 3102 | 3356 | 0, /* no IN1 */ |
| 3103 | 3357 | &bowler_fowl_tvca) |
| 3104 | 3358 | DISCRETE_CRFILTER(BOWLER_FOWL_SND, |
| 3105 | 1, /* ENAB */ | |
| 3106 | 3359 | NODE_21, /* IN0 */ |
| 3107 | 3360 | RES_K(68), /* R1120 */ |
| 3108 | 3361 | CAP_U(0.1) ) /* C1048 */ |
| r6049 | r6050 | |
| 3484 | 3737 | 0, /* no r11 */ |
| 3485 | 3738 | CAP_U(1), /* C26 */ |
| 3486 | 3739 | 0, /* no c2 */ |
| 3487 | 0, | |
| 3740 | 0, 0, | |
| 3488 | 3741 | 12.0 - OP_AMP_NORTON_VBE, /* v1 */ |
| 3489 | 3742 | 0, /* no v2 */ |
| 3490 | 3743 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 3570 | 3823 | 0, /* no r11 */ |
| 3571 | 3824 | CAP_U(0.1), /* C14 */ |
| 3572 | 3825 | 0, /* no c2 */ |
| 3573 | 0, | |
| 3826 | 0, 0, | |
| 3574 | 3827 | 5, /* v1 */ |
| 3575 | 3828 | 0, /* no v2 */ |
| 3576 | 3829 | 0, /* no v3 */ |
| r6049 | r6050 | |
| 3666 | 3919 | CAP_U(0.1), /* C29 */ \ |
| 3667 | 3920 | &invaders_thump_555) \ |
| 3668 | 3921 | DISCRETE_RCFILTER(INVADERS_NODE(32, _board), \ |
| 3669 | 1, /* ENAB */ \ | |
| 3670 | 3922 | INVADERS_NODE(31, _board), /* IN0 */ \ |
| 3671 | 3923 | 100, /* R132 */ \ |
| 3672 | 3924 | CAP_U(4.7) ) /* C31 */ \ |
| 3673 | 3925 | DISCRETE_RCFILTER(INVADERS_NODE(INVADERS_FLEET_SND, _board), \ |
| 3674 | 1, /* ENAB */ \ | |
| 3675 | 3926 | INVADERS_NODE(32, _board), /* IN0 */ \ |
| 3676 | 3927 | 100 + 100, /* R132 + R133 */ \ |
| 3677 | 3928 | CAP_U(10) ) /* C32 */ |
| r6049 | r6050 | |
| 3747 | 3998 | 0, /* no IN1 */ \ |
| 3748 | 3999 | &invaders_explosion_tvca) \ |
| 3749 | 4000 | DISCRETE_RCFILTER(INVADERS_NODE(62, _board), \ |
| 3750 | 1, /* ENAB */ \ | |
| 3751 | 4001 | INVADERS_NODE(61, _board), /* IN0 */ \ |
| 3752 | 4002 | RES_K(5.6), /* R84 */ \ |
| 3753 | 4003 | CAP_U(0.1) ) /* C27 */ \ |
| 3754 | 4004 | DISCRETE_RCFILTER(INVADERS_NODE(INVADERS_EXPLOSION_SND, _board), \ |
| 3755 | 1, /* ENAB */ \ | |
| 3756 | 4005 | INVADERS_NODE(62, _board), /* IN0 */ \ |
| 3757 | 4006 | RES_K(5.6) + RES_K(6.8), /* R84 + R85 */ \ |
| 3758 | 4007 | CAP_U(0.1) ) /* C28 */ |
| r6049 | r6050 | |
| 3781 | 4030 | 0, /* MIN */ \ |
| 3782 | 4031 | 12) /* MAX */ \ |
| 3783 | 4032 | DISCRETE_CRFILTER(INVADERS_NODE(74, _board), \ |
| 3784 | 1, /* ENAB */ \ | |
| 3785 | 4033 | INVADERS_NOISE, /* IN0 */ \ |
| 3786 | 4034 | RES_M(1) + RES_K(330), /* R29, R11 */ \ |
| 3787 | 4035 | CAP_U(0.1) ) /* C57 */ \ |
| r6049 | r6050 | |
| 3908 | 4156 | #define BLUESHRK_SHARK_SND NODE_15 |
| 3909 | 4157 | #define BLUESHRK_SHOT_SND NODE_16 |
| 3910 | 4158 | |
| 4159 | /* Parts List - Resistors */ | |
| 4160 | #define BLUESHRK_R300 RES_M(1) | |
| 4161 | #define BLUESHRK_R301 RES_K(100) | |
| 4162 | #define BLUESHRK_R302 RES_M(1) | |
| 4163 | #define BLUESHRK_R303 RES_K(33) | |
| 4164 | #define BLUESHRK_R304 RES_K(120) | |
| 4165 | #define BLUESHRK_R305 RES_M(1) | |
| 4166 | #define BLUESHRK_R306 RES_K(470) | |
| 4167 | #define BLUESHRK_R307 RES_K(680) | |
| 4168 | #define BLUESHRK_R308 RES_M(1) | |
| 4169 | #define BLUESHRK_R309 RES_M(1) | |
| 4170 | #define BLUESHRK_R310 RES_K(680) | |
| 4171 | #define BLUESHRK_R311 RES_K(1) | |
| 4172 | #define BLUESHRK_R312 RES_K(100) | |
| 4173 | #define BLUESHRK_R313 RES_M(1) | |
| 4174 | #define BLUESHRK_R314 RES_M(1) | |
| 4175 | #define BLUESHRK_R315 RES_M(4.7) | |
| 4176 | #define BLUESHRK_R316 RES_M(2.2) | |
| 4177 | #define BLUESHRK_R317 RES_K(10) | |
| 4178 | #define BLUESHRK_R318 RES_M(1) | |
| 4179 | #define BLUESHRK_R319 RES_K(680) | |
| 4180 | #define BLUESHRK_R320 RES_M(2.7) | |
| 4181 | #define BLUESHRK_R321 RES_K(680) | |
| 4182 | #define BLUESHRK_R324 RES_K(750) | |
| 4183 | #define BLUESHRK_R520 RES_K(510) | |
| 4184 | #define BLUESHRK_R521 RES_K(22) | |
| 4185 | #define BLUESHRK_R529 RES_K(33) | |
| 4186 | #define BLUESHRK_R601 RES_K(47) | |
| 4187 | #define BLUESHRK_R602 RES_K(22) | |
| 4188 | #define BLUESHRK_R603 RES_K(39) | |
| 4189 | #define BLUESHRK_R604 RES_K(1) | |
| 4190 | #define BLUESHRK_R605 RES_M(1) | |
| 4191 | #define BLUESHRK_R730 RES_K(56) | |
| 3911 | 4192 | |
| 3912 | static const discrete_555_desc blueshrk_555_H1A = | |
| 4193 | /* Parts List - Capacitors */ | |
| 4194 | #define BLUESHRK_C300 CAP_U(0.1) | |
| 4195 | #define BLUESHRK_C301 CAP_P(470) | |
| 4196 | #define BLUESHRK_C302 CAP_P(470) | |
| 4197 | #define BLUESHRK_C303 CAP_U(0.47) | |
| 4198 | #define BLUESHRK_C304 CAP_U(1) | |
| 4199 | #define BLUESHRK_C305 CAP_U(1) | |
| 4200 | #define BLUESHRK_C508 CAP_U(1) | |
| 4201 | #define BLUESHRK_C600 CAP_U(2.2) | |
| 4202 | #define BLUESHRK_C602 CAP_U(0.022) | |
| 4203 | #define BLUESHRK_C603 CAP_U(0.01) | |
| 4204 | #define BLUESHRK_C604 CAP_U(0.015) | |
| 4205 | #define BLUESHRK_C606 CAP_U(1) | |
| 4206 | #define BLUESHRK_C704 CAP_U(1) | |
| 4207 | #define BLUESHRK_C900 CAP_U(10) | |
| 4208 | ||
| 4209 | ||
| 4210 | static const discrete_op_amp_osc_info blueshark_octopus_osc = | |
| 3913 | 4211 | { |
| 3914 | DISC_555_OUT_SQW | DISC_555_OUT_DC | DISC_555_TRIGGER_IS_LOGIC, | |
| 3915 | 5, /* B+ voltage of 555 */ | |
| 3916 | DEFAULT_555_VALUES | |
| 4212 | DISC_OP_AMP_OSCILLATOR_1 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_CAP, | |
| 4213 | BLUESHRK_R300, BLUESHRK_R303, BLUESHRK_R301, BLUESHRK_R304, BLUESHRK_R302, 0, 0, 0, /* r1, r2, r3, r4, r5, r6, r7, r8 */ | |
| 4214 | BLUESHRK_C300, 12 /*c, vP */ | |
| 3917 | 4215 | }; |
| 3918 | 4216 | |
| 4217 | static const discrete_op_amp_osc_info blueshark_octopus_vco = | |
| 4218 | { | |
| 4219 | DISC_OP_AMP_OSCILLATOR_VCO_1 | DISC_OP_AMP_IS_NORTON | DISC_OP_AMP_OSCILLATOR_OUT_SQW, | |
| 4220 | BLUESHRK_R305, BLUESHRK_R306, BLUESHRK_R307, BLUESHRK_R309, BLUESHRK_R308, 0, 0, 0, /* r1, r2, r3, r4, r5, r6, r7, r8 */ | |
| 4221 | BLUESHRK_C301, 12 /*c, vP */ | |
| 4222 | }; | |
| 3919 | 4223 | |
| 4224 | static const discrete_op_amp_1sht_info blueshark_octopus_oneshot = | |
| 4225 | { | |
| 4226 | DISC_OP_AMP_1SHT_1 | DISC_OP_AMP_IS_NORTON, | |
| 4227 | BLUESHRK_R315, BLUESHRK_R312, BLUESHRK_R314, BLUESHRK_R313, BLUESHRK_R316, /* r1, r2, r3, r4, r5 */ | |
| 4228 | BLUESHRK_C303, BLUESHRK_C302, /* c1, c2 */ | |
| 4229 | 0, 12 /* vN, vP */ | |
| 4230 | }; | |
| 4231 | ||
| 4232 | static const discrete_integrate_info blueshark_octopus_integrate = | |
| 4233 | { | |
| 4234 | DISC_INTEGRATE_OP_AMP_1 | DISC_OP_AMP_IS_NORTON, | |
| 4235 | BLUESHRK_R318, BLUESHRK_R317, 0, BLUESHRK_C304, /* r1, r2, r3, c */ | |
| 4236 | 12, 12, /* v1, vP */ | |
| 4237 | 0, 0, 0 /* f0, f1, f2 */ | |
| 4238 | }; | |
| 4239 | ||
| 4240 | static const discrete_op_amp_info blueshark_octopus_amp = | |
| 4241 | { | |
| 4242 | DISC_OP_AMP_IS_NORTON, | |
| 4243 | BLUESHRK_R310, BLUESHRK_R319, BLUESHRK_R320, BLUESHRK_R321, /* r1, r2, r3, r4 */ | |
| 4244 | 0, 0, 12 /* c, vN, vP */ | |
| 4245 | }; | |
| 4246 | ||
| 3920 | 4247 | static const discrete_555_desc blueshrk_555_H1B = |
| 3921 | 4248 | { |
| 3922 | 4249 | DISC_555_OUT_ENERGY | DISC_555_OUT_DC, |
| r6049 | r6050 | |
| 3928 | 4255 | |
| 3929 | 4256 | static const discrete_mixer_desc blueshrk_mixer = |
| 3930 | 4257 | { |
| 3931 | DISC_MIXER_IS_OP_AMP, | |
| 3932 | { RES_K(750), | |
| 3933 | 1.0/(1.0/RES_K(510) + 1.0/RES_K(22)), | |
| 3934 | RES_M(1), | |
| 3935 | RES_K(56) }, | |
| 3936 | { 0 }, | |
| 3937 | { CAP_U(1), | |
| 3938 | CAP_U(1), | |
| 3939 | CAP_U(1), | |
| 3940 | CAP_U(1) }, | |
| 3941 | 0, | |
| 3942 | RES_K(100), | |
| 3943 | 0, | |
| 3944 | CAP_U(0.1), | |
| 3945 | 0, /* Vref */ | |
| 3946 | 700 /* final gain */ | |
| 4258 | DISC_MIXER_IS_RESISTOR, | |
| 4259 | {BLUESHRK_R324, RES_2_PARALLEL(BLUESHRK_R520, BLUESHRK_R521) + BLUESHRK_R529, BLUESHRK_R604 + BLUESHRK_R605, BLUESHRK_R730}, | |
| 4260 | {0}, /* r_node */ | |
| 4261 | {BLUESHRK_C305, BLUESHRK_C508, BLUESHRK_C606, BLUESHRK_C704}, | |
| 4262 | 0, 0, 0, BLUESHRK_C900, 0, 1 /* rI, rF, cF, cAmp, vRef, gain */ | |
| 3947 | 4263 | }; |
| 3948 | 4264 | |
| 3949 | ||
| 3950 | 4265 | static DISCRETE_SOUND_START(blueshrk) |
| 3951 | 4266 | |
| 3952 | 4267 | /************************************************ |
| 3953 | 4268 | * Input register mapping |
| 3954 | 4269 | ************************************************/ |
| 3955 | DISCRETE_INPUT_LOGIC(BLUESHRK_OCTOPUS_EN) | |
| 4270 | DISCRETE_INPUTX_LOGIC(BLUESHRK_OCTOPUS_EN, 12, 0, 0) | |
| 3956 | 4271 | DISCRETE_INPUT_LOGIC(BLUESHRK_HIT_EN) |
| 3957 | 4272 | DISCRETE_INPUT_LOGIC(BLUESHRK_SHARK_EN) |
| 3958 | 4273 | DISCRETE_INPUT_LOGIC(BLUESHRK_SHOT_EN) |
| r6049 | r6050 | |
| 3961 | 4276 | /************************************************ |
| 3962 | 4277 | * Octopus sound |
| 3963 | 4278 | ************************************************/ |
| 3964 | DISCRETE_CONSTANT(BLUESHRK_OCTOPUS_SND, 0) /* placeholder for incomplete sound */ | |
| 4279 | DISCRETE_OP_AMP_OSCILLATOR(NODE_20, /* IC M5, pin 5 */ | |
| 4280 | 1, /* ENAB */ | |
| 4281 | &blueshark_octopus_osc) | |
| 4282 | DISCRETE_OP_AMP_VCO1(NODE_21, /* IC M5, pin 10 */ | |
| 4283 | 1, /* ENAB */ | |
| 4284 | NODE_20, /* VMOD1 */ | |
| 4285 | &blueshark_octopus_vco) | |
| 4286 | DISCRETE_OP_AMP_ONESHOT(NODE_22, /* IC J5, pin 10 */ | |
| 4287 | BLUESHRK_OCTOPUS_EN, &blueshark_octopus_oneshot) | |
| 4288 | DISCRETE_INTEGRATE(NODE_23, /* IC J5, pin 5 */ | |
| 4289 | NODE_22, 0, /* TRG0,TRG1 */ | |
| 4290 | &blueshark_octopus_integrate) | |
| 4291 | DISCRETE_OP_AMP(BLUESHRK_OCTOPUS_SND, /* IC J5, pin 4 */ | |
| 4292 | 1, /* ENAB */ | |
| 4293 | NODE_21, NODE_23, /* IN0,IN1 */ | |
| 4294 | &blueshark_octopus_amp) | |
| 3965 | 4295 | |
| 3966 | 4296 | /************************************************ |
| 4297 | * Shot sound | |
| 4298 | ************************************************/ | |
| 4299 | DISCRETE_CONSTANT(BLUESHRK_SHOT_SND, 0) /* placeholder for incomplete sound */ | |
| 4300 | ||
| 4301 | /************************************************ | |
| 3967 | 4302 | * Hit sound |
| 3968 | 4303 | ************************************************/ |
| 3969 | /* the 555 trigger is connected to the cap, so when reset goes high, the 555 is triggered */ | |
| 3970 | /* but the 555_MSTABLE does not currently allow connection of the trigger to the cap */ | |
| 3971 | /* so we will cheat and add a pulse 1 sample wide to trigger it */ | |
| 3972 | DISCRETE_ONESHOT(NODE_30, BLUESHRK_HIT_EN, 1, /* 1 sample wide */ 0, DISC_ONESHOT_REDGE | DISC_ONESHOT_NORETRIG | DISC_OUT_ACTIVE_LOW) | |
| 3973 | DISCRETE_555_MSTABLE(NODE_31, BLUESHRK_HIT_EN, NODE_30, RES_K(47), CAP_U(2.2), &blueshrk_555_H1A) | |
| 3974 | DISCRETE_LOGIC_INVERT(NODE_32, BLUESHRK_HIT_EN) | |
| 3975 | DISCRETE_COUNTER(NODE_33, 1, /*RST*/ NODE_32, /*CLK*/ NODE_31, 1, DISC_COUNT_UP, 0, DISC_CLK_ON_F_EDGE) | |
| 3976 | DISCRETE_SWITCH(NODE_34, 1, NODE_33, CAP_U(0.015) + CAP_U(0.01), CAP_U(0.022)) | |
| 3977 | DISCRETE_555_ASTABLE(BLUESHRK_HIT_SND, BLUESHRK_HIT_EN, RES_K(22), RES_K(39), NODE_34, &blueshrk_555_H1B) | |
| 4304 | DISCRETE_COUNTER(NODE_40, /* IC H3, pin 5 */ | |
| 4305 | 1, BLUESHRK_HIT_EN, /* ENAB,RESET */ | |
| 4306 | FREQ_OF_555(BLUESHRK_R601, 0, BLUESHRK_C600), /* CLK */ | |
| 4307 | 1, DISC_COUNT_UP, 0, /* MAX,DIR,INIT0 */ | |
| 4308 | DISC_CLK_IS_FREQ) | |
| 4309 | DISCRETE_SWITCH(NODE_41, /* value of toggled caps */ | |
| 4310 | 1, /* ENAB */ | |
| 4311 | NODE_40, /* SWITCH */ | |
| 4312 | BLUESHRK_C602 + BLUESHRK_C603, /* INP0 - IC H3, pin 5 low */ | |
| 4313 | BLUESHRK_C604) /* INP1 - IC H3, pin 6 low */ | |
| 4314 | DISCRETE_555_ASTABLE(BLUESHRK_HIT_SND, /* IC H2, pin 2 */ | |
| 4315 | BLUESHRK_HIT_EN, /* RESET */ | |
| 4316 | BLUESHRK_R602, BLUESHRK_R603, NODE_41, /* R1,R2,C */ | |
| 4317 | &blueshrk_555_H1B) | |
| 3978 | 4318 | |
| 3979 | 4319 | /************************************************ |
| 3980 | 4320 | * Shark sound |
| r6049 | r6050 | |
| 3982 | 4322 | DISCRETE_CONSTANT(BLUESHRK_SHARK_SND, 0) /* paceholder for incomplete sound */ |
| 3983 | 4323 | |
| 3984 | 4324 | /************************************************ |
| 3985 | * Shot sound | |
| 3986 | ************************************************/ | |
| 3987 | DISCRETE_CONSTANT(BLUESHRK_SHOT_SND, 0) /* placeholder for incomplete sound */ | |
| 3988 | ||
| 3989 | /************************************************ | |
| 3990 | 4325 | * Combine all sound sources. |
| 3991 | 4326 | ************************************************/ |
| 3992 | DISCRETE_MIXER4(NODE_91, BLUESHRK_GAME_ON_EN, BLUESHRK_OCTOPUS_SND, BLUESHRK_HIT_SND, BLUESHRK_SHARK_SND, BLUESHRK_SHOT_SND, &blueshrk_mixer) | |
| 4327 | DISCRETE_MIXER4(NODE_91, | |
| 4328 | BLUESHRK_GAME_ON_EN, | |
| 4329 | BLUESHRK_OCTOPUS_SND, | |
| 4330 | BLUESHRK_SHOT_SND, | |
| 4331 | BLUESHRK_HIT_SND, | |
| 4332 | BLUESHRK_SHARK_SND, | |
| 4333 | &blueshrk_mixer) | |
| 3993 | 4334 | |
| 3994 | DISCRETE_OUTPUT(NODE_91, | |
| 4335 | DISCRETE_OUTPUT(NODE_91, 240000) | |
| 3995 | 4336 | DISCRETE_SOUND_END |
| 3996 | 4337 | |
| 3997 | 4338 | |
| r6049 | r6050 | |
| 4007 | 4348 | { |
| 4008 | 4349 | discrete_sound_w(device, BLUESHRK_GAME_ON_EN, (data >> 0) & 0x01); |
| 4009 | 4350 | |
| 4010 | | |
| 4351 | | |
| 4011 | 4352 | |
| 4012 | 4353 | discrete_sound_w(device, BLUESHRK_HIT_EN, (data >> 2) & 0x01); |
| 4013 | 4354 | |
| 4014 | | |
| 4355 | | |
| 4015 | 4356 | |
| 4016 | 4357 | /* if (data & 0x10) enable KILLED DIVER sound, this circuit |
| 4017 | 4358 | doesn't appear to be on the schematics */ |
| 4018 | 4359 | |
| 4019 | | |
| 4360 | | |
| 4020 | 4361 | |
| 4021 | 4362 | /* D6 and D7 are not connected */ |
| 4022 | 4363 | } |
| r6049 | r6050 | |
|---|---|---|
| 79 | 79 | /* This adjusts the high end. */ |
| 80 | 80 | /* 0k = 214Hz. 250k = 4416Hz */ |
| 81 | 81 | /************************************************/ |
| 82 | DISCRETE_RCFILTER(NODE_20, | |
| 82 | DISCRETE_RCFILTER(NODE_20, | |
| 83 | 83 | DISCRETE_ADJUSTMENT_TAG(NODE_21, (214.0-27.0)/12/31, (4416.0-27.0)/12/31, DISC_LOGADJ, "MOTOR") |
| 84 | 84 | DISCRETE_MULTIPLY(NODE_22, NODE_20, NODE_21) |
| 85 | 85 | |
| 86 | 86 | DISCRETE_MULTADD(NODE_23, NODE_22, 2, 27.0/6) /* F1 = /12*2 = /6 */ |
| 87 | 87 | DISCRETE_SQUAREWAVE(NODE_24, 1, NODE_23, (786.7/3), 50.0, 0, 0) |
| 88 | DISCRETE_RCFILTER(NODE_25, | |
| 88 | DISCRETE_RCFILTER(NODE_25, | |
| 89 | 89 | |
| 90 | 90 | DISCRETE_MULTADD(NODE_26, NODE_22, 3, 27.0/4) /* F2 = /12*3 = /4 */ |
| 91 | 91 | DISCRETE_SQUAREWAVE(NODE_27, 1, NODE_26, (786.7/3), 50.0, 0, 0) |
| 92 | DISCRETE_RCFILTER(NODE_28, | |
| 92 | DISCRETE_RCFILTER(NODE_28, | |
| 93 | 93 | |
| 94 | 94 | DISCRETE_MULTADD(NODE_29, NODE_22, 4, 27.0/3) /* F3 = /12*4 = /3 */ |
| 95 | 95 | DISCRETE_SQUAREWAVE(NODE_30, 1, NODE_29, (786.7/3), 100.0/3, 0, 360.0/3) |
| 96 | DISCRETE_RCFILTER(NODE_31, | |
| 96 | DISCRETE_RCFILTER(NODE_31, | |
| 97 | 97 | |
| 98 | 98 | DISCRETE_ADDER3(NITEDRVR_MOTOR_SND, NITEDRVR_ATTRACT_EN, NODE_25, NODE_28, NODE_31) |
| 99 | 99 | |
| r6049 | r6050 | |
| 108 | 108 | DISCRETE_LFSR_NOISE(NITEDRVR_NOISE, NITEDRVR_CRASH_EN, NITEDRVR_CRASH_EN, 15750.0/2/4, 1.0, 0, 0, &nitedrvr_lfsr) |
| 109 | 109 | |
| 110 | 110 | DISCRETE_MULTIPLY(NODE_62, NITEDRVR_NOISE, NITEDRVR_BANG_DATA) |
| 111 | DISCRETE_RCFILTER(NITEDRVR_BANG_SND, | |
| 111 | DISCRETE_RCFILTER(NITEDRVR_BANG_SND, | |
| 112 | 112 | |
| 113 | 113 | /************************************************/ |
| 114 | 114 | /* Skid circuits ripped from other drivers */ |
| r6049 | r6050 | |
| 127 | 127 | /* the duty variance is so small we ignore it */ |
| 128 | 128 | /************************************************/ |
| 129 | 129 | DISCRETE_INVERT(NODE_70, NITEDRVR_NOISE) |
| 130 | DISCRETE_RCFILTER(NODE_71, | |
| 130 | DISCRETE_RCFILTER(NODE_71, | |
| 131 | 131 | DISCRETE_MULTADD(NODE_72, NODE_71, 940.0-630.0, ((940.0-630.0)/2)+630.0) |
| 132 | 132 | DISCRETE_SQUAREWAVE(NITEDRVR_SCREECH1_SND, NITEDRVR_SKID1_EN, NODE_72, 226.9, 31.5, 0, 0.0) |
| 133 | 133 |
| r6049 | r6050 | |
|---|---|---|
| 51 | 51 | ******************************************************************************************/ |
| 52 | 52 | #include "driver.h" |
| 53 | 53 | #include "machine/scudsp.h" |
| 54 | #include "osd_cpu.h" | |
| 55 | 54 | #include "sound/scsp.h" |
| 56 | 55 | |
| 57 | 56 | /*DSP macros*/ |
| r6049 | r6050 | |
| 420 | 419 | SET_V(((dsp_reg.pl.si) ^ (dsp_reg.acl.si)) & ((dsp_reg.pl.si) ^ (i3)) & 0x80000000); |
| 421 | 420 | break; |
| 422 | 421 | case 0x6: /* AD2 */ |
| 423 | i1 = COMBINE_64_32_32((INT32)dsp_reg.ph.si,dsp_reg.pl.si); | |
| 424 | i2 = COMBINE_64_32_32((INT32)dsp_reg.ach.si,dsp_reg.acl.si); | |
| 422 | i1 = CONCAT_64((INT32)dsp_reg.ph.si,dsp_reg.pl.si); | |
| 423 | i2 = CONCAT_64((INT32)dsp_reg.ach.si,dsp_reg.acl.si); | |
| 425 | 424 | dsp_reg.alu = i1 + i2; |
| 426 | 425 | SET_Z((dsp_reg.alu & S64(0xffffffffffff)) == 0); |
| 427 | 426 | SET_S((dsp_reg.alu & S64(0x800000000000)) > 0); |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | File to handle emulation of the SNES "DSP-2" add-on chip. |
| 6 | 6 | |
| 7 | Original C++ code by byuu, based on research by Overload | |
| 7 | Original C++ code by byuu, based on research by Overload. | |
| 8 | Byuu's code is released under GNU General Public License | |
| 9 | version 2 as published by the Free Software Foundation. | |
| 10 | The implementation below is released under the MAME license | |
| 11 | for use in MAME, MESS and derivatives by permission of the | |
| 12 | author | |
| 8 | 13 | |
| 9 | MAME/MESS C conversion by etabeta | |
| 10 | ||
| 11 | 14 | ***************************************************************************/ |
| 12 | 15 | |
| 13 | 16 | static int DSP2_waiting_for_command = 0; |
| r6049 | r6050 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | snes7110.c | |
| 4 | ||
| 5 | File to handle emulation of the SNES "SPC7110" add-on chip. | |
| 6 | ||
| 7 | Based on C++ implementation by Byuu in BSNES. | |
| 8 | ||
| 9 | Byuu's code is released under GNU General Public License | |
| 10 | version 2 as published by the Free Software Foundation. | |
| 11 | The implementation below is released under the MAME license | |
| 12 | for use in MAME, MESS and derivatives by permission of the | |
| 13 | author | |
| 14 | ||
| 15 | ***************************************************************************/ | |
| 16 | ||
| 17 | ||
| 1 | 18 | static const UINT32 spc7110_decomp_buffer_size = 64; |
| 2 | 19 | |
| 3 | 20 | static const UINT8 spc7110_evolution_table[53][4] = |
| r6049 | r6050 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | snessdd1.c | |
| 4 | ||
| 5 | File to handle emulation of the SNES "S-DD1" add-on chip. | |
| 6 | ||
| 7 | Based on Andreas Naive Public Domain code. | |
| 8 | ||
| 9 | ***************************************************************************/ | |
| 10 | ||
| 1 | 11 | static UINT8 sdd1_read(running_machine* machine, UINT32 addr); |
| 2 | 12 | |
| 3 | 13 | typedef struct //Input Manager |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | File to handle emulation of the SNES "OBC-1" add-on chip. |
| 6 | 6 | |
| 7 | Original C++ code by byuu | |
| 7 | Original C++ code by byuu. | |
| 8 | Byuu's code is released under GNU General Public License | |
| 9 | version 2 as published by the Free Software Foundation. | |
| 10 | The implementation below is released under the MAME license | |
| 11 | for use in MAME, MESS and derivatives by permission of the author. | |
| 8 | 12 | |
| 9 | MAME/MESS C conversion by etabeta | |
| 10 | ||
| 11 | 13 | ***************************************************************************/ |
| 12 | 14 | |
| 13 | 15 | #include "includes/snes.h" |
| r6049 | r6050 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | snessdd1.c | |
| 4 | ||
| 5 | File to handle emulation of the SNES "S-RTC" add-on chip. | |
| 6 | ||
| 7 | Based on C++ implementation by Byuu in BSNES. | |
| 8 | ||
| 9 | Byuu's code is released under GNU General Public License | |
| 10 | version 2 as published by the Free Software Foundation. | |
| 11 | The implementation below is released under the MAME license | |
| 12 | for use in MAME, MESS and derivatives by permission of the | |
| 13 | author | |
| 14 | ||
| 15 | ***************************************************************************/ | |
| 16 | ||
| 1 | 17 | enum |
| 2 | 18 | { |
| 3 | 19 | RTCM_Ready, |
| r6049 | r6050 | |
|---|---|---|
| 8 | 8 | Overload and Feather. |
| 9 | 9 | This implementation is based on byuu's BSNES C++ version |
| 10 | 10 | |
| 11 | Byuu's code is released under GNU General Public License | |
| 12 | version 2 as published by the Free Software Foundation. | |
| 13 | The implementation below is released under the MAME license | |
| 14 | for use in MAME, MESS and derivatives by permission of the author. | |
| 15 | ||
| 11 | 16 | ***************************************************************************/ |
| 12 | 17 | |
| 13 | 18 | typedef struct |
| r6049 | r6050 | |
|---|---|---|
| 141 | 141 | Bootlegs stuff |
| 142 | 142 | |
| 143 | 143 | The bootlegs simulate the missing MCU behaviour with writes to 0xd018 and reads value back from 0xf002. |
| 144 | Fortunately, 'arkangc', 'arkbloc2' and 'arkblock' has patched code not to bother with that. | |
| 144 | Fortunately, 'arkangc', 'arkangc2', 'block2', 'arkbloc2' and 'arkblock' has patched code not to bother with that. | |
| 145 | 145 | So I've fixed 'arkbl3' and 'paddle2' to return the expected values (code is strongly similar). |
| 146 | However, 'block2' is the only bootleg that writes some values to 0xd018 and reads them back from 0xf000. | |
| 146 | 147 | |
| 147 | 148 | Some bootlegs also test some bits from 0xd008 after reading the paddle value at 0xd018. |
| 148 | 149 | Their effect is completely unknown but I need to set some bits to 1 so the games are playable : |
| r6049 | r6050 | |
| 155 | 156 | . you can use the "fire" button (the game never shoots) |
| 156 | 157 | . you are awarded points as in a normal game |
| 157 | 158 | . sounds are played |
| 159 | - 'block2' : | |
| 160 | * bit 1 must be set to 1 or you enter sort of endless "demo mode" when you start : | |
| 161 | . you can't control the paddle (it automoves by following the ball) | |
| 162 | . you can use the "fire" button (the game never shoots) | |
| 163 | . you are awarded points as in a normal game | |
| 164 | . sounds are played | |
| 158 | 165 | - 'arkblock' : NO read from 0xd008 ! |
| 159 | 166 | - 'arkbloc2' : |
| 160 | 167 | * bit 5 must sometimes be set to 1 or you can't reach right side of the screen |
| r6049 | r6050 | |
| 183 | 190 | */ |
| 184 | 191 | |
| 185 | 192 | |
| 193 | #define LOG_F000_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - val = %02x\n",cpu_get_pc(space->cpu),arkanoid_bootleg_cmd,arkanoid_bootleg_val); | |
| 186 | 194 | #define LOG_F002_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_f002_r - cmd = %02x - val = %02x\n",cpu_get_pc(space->cpu),arkanoid_bootleg_cmd,arkanoid_bootleg_val); |
| 187 | 195 | #define LOG_D018_W if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - cmd = %02x\n",cpu_get_pc(space->cpu),data,arkanoid_bootleg_cmd); |
| 188 | 196 | #define LOG_D008_R if (ARKANOID_BOOTLEG_VERBOSE) logerror("%04x: arkanoid_bootleg_d008_r - val = %02x\n",cpu_get_pc(space->cpu),arkanoid_bootleg_d008_val); |
| r6049 | r6050 | |
| 191 | 199 | static UINT8 arkanoid_bootleg_cmd; |
| 192 | 200 | |
| 193 | 201 | /* Kludge for some bootlegs that read this address */ |
| 202 | READ8_HANDLER( arkanoid_bootleg_f000_r ) | |
| 203 | { | |
| 204 | UINT8 arkanoid_bootleg_val = 0x00; | |
| 205 | ||
| 206 | switch (arkanoid_bootleg_id) | |
| 207 | { | |
| 208 | case ARKANGC: /* There are no reads from 0xf000 in these bootlegs */ | |
| 209 | case ARKBLOCK: | |
| 210 | case ARKANGC2: | |
| 211 | case ARKBLOC2: | |
| 212 | case ARKGCBL: | |
| 213 | case PADDLE2: | |
| 214 | switch (arkanoid_bootleg_cmd) | |
| 215 | { | |
| 216 | default: | |
| 217 | break; | |
| 218 | } | |
| 219 | LOG_F000_R | |
| 220 | break; | |
| 221 | case BLOCK2: | |
| 222 | switch (arkanoid_bootleg_cmd) | |
| 223 | { | |
| 224 | case 0x05: /* Check 1 */ | |
| 225 | arkanoid_bootleg_val = 0x05; | |
| 226 | break; | |
| 227 | case 0x0a: /* Check 2 */ | |
| 228 | arkanoid_bootleg_val = 0x0a; | |
| 229 | break; | |
| 230 | default: | |
| 231 | break; | |
| 232 | } | |
| 233 | LOG_F000_R | |
| 234 | break; | |
| 235 | default: | |
| 236 | logerror("%04x: arkanoid_bootleg_f000_r - cmd = %02x - unknown bootleg !\n",cpu_get_pc(space->cpu),arkanoid_bootleg_cmd); | |
| 237 | break; | |
| 238 | } | |
| 239 | ||
| 240 | return arkanoid_bootleg_val; | |
| 241 | } | |
| 242 | ||
| 243 | /* Kludge for some bootlegs that read this address */ | |
| 194 | 244 | READ8_HANDLER( arkanoid_bootleg_f002_r ) |
| 195 | 245 | { |
| 196 | 246 | UINT8 arkanoid_bootleg_val = 0x00; |
| r6049 | r6050 | |
| 206 | 256 | } |
| 207 | 257 | LOG_F002_R |
| 208 | 258 | break; |
| 209 | case ARKANGC2: /* There are no reads from 0xf002 in this bootleg */ | |
| 259 | case ARKANGC2: /* There are no reads from 0xf002 in these bootlegs */ | |
| 260 | case BLOCK2: | |
| 210 | 261 | switch (arkanoid_bootleg_cmd) |
| 211 | 262 | { |
| 212 | 263 | default: |
| r6049 | r6050 | |
| 360 | 411 | } |
| 361 | 412 | LOG_D018_W |
| 362 | 413 | break; |
| 414 | case BLOCK2: | |
| 415 | switch (data) | |
| 416 | { | |
| 417 | case 0x05: /* Check 1 */ | |
| 418 | if (cpu_get_pc(space->cpu) == 0x0363) | |
| 419 | arkanoid_bootleg_cmd = 0x05; | |
| 420 | break; | |
| 421 | case 0x0a: /* Check 2 */ | |
| 422 | if (cpu_get_pc(space->cpu) == 0x0372) | |
| 423 | arkanoid_bootleg_cmd = 0x0a; | |
| 424 | break; | |
| 425 | default: | |
| 426 | arkanoid_bootleg_cmd = 0x00; | |
| 427 | break; | |
| 428 | } | |
| 429 | LOG_D018_W | |
| 430 | break; | |
| 363 | 431 | case ARKBLOC2: |
| 364 | 432 | switch (data) |
| 365 | 433 | { |
| r6049 | r6050 | |
| 507 | 575 | } |
| 508 | 576 | LOG_D018_W |
| 509 | 577 | break; |
| 578 | ||
| 510 | 579 | default: |
| 511 | 580 | logerror("%04x: arkanoid_bootleg_d018_w - data = %02x - unknown bootleg !\n",cpu_get_pc(space->cpu),data); |
| 512 | 581 | break; |
| 513 | 582 | } |
| 514 | 583 | } |
| 515 | 584 | |
| 585 | READ8_HANDLER( block2_bootleg_f000_r ) | |
| 586 | { | |
| 587 | return arkanoid_bootleg_cmd; | |
| 588 | } | |
| 589 | ||
| 516 | 590 | /* Kludge for some bootlegs that read this address */ |
| 517 | 591 | READ8_HANDLER( arkanoid_bootleg_d008_r ) |
| 518 | 592 | { |
| r6049 | r6050 | |
| 534 | 608 | arkanoid_bootleg_d008_bit[5] = 0; /* untested bit */ |
| 535 | 609 | break; |
| 536 | 610 | case ARKANGC2: |
| 611 | case BLOCK2: | |
| 537 | 612 | arkanoid_bootleg_d008_bit[0] = 0; /* untested bit */ |
| 538 | 613 | arkanoid_bootleg_d008_bit[1] = 1; /* check code at 0x0cad */ |
| 539 | 614 | arkanoid_bootleg_d008_bit[2] = 0; /* untested bit */ |
| r6049 | r6050 | |
|---|---|---|
| 174 | 174 | DRIVER( streakng ) /* [1980] Shoei */ |
| 175 | 175 | DRIVER( pacmanbl ) /* bootleg */ |
| 176 | 176 | DRIVER( pacmanbla ) /* bootleg */ |
| 177 | DRIVER( phoenxp2 ) /* bootleg */ | |
| 178 | DRIVER( atlantisb ) /* bootleg */ | |
| 177 | 179 | DRIVER( devilfsg ) /* (c) 1984 Vision / Artic (bootleg?) */ |
| 178 | 180 | DRIVER( zigzag ) /* (c) 1982 LAX */ |
| 179 | 181 | DRIVER( zigzag2 ) /* (c) 1982 LAX */ |
| r6049 | r6050 | |
| 1759 | 1761 | DRIVER( arkbloc2 ) /* bootleg */ |
| 1760 | 1762 | DRIVER( arkgcbl ) /* bootleg */ |
| 1761 | 1763 | DRIVER( paddle2 ) /* bootleg */ |
| 1764 | DRIVER( block2 ) /* bootleg */ | |
| 1762 | 1765 | DRIVER( arkatayt ) /* bootleg */ |
| 1763 | 1766 | DRIVER( arktayt2 ) /* bootleg */ |
| 1764 | 1767 | DRIVER( arkatour ) /* ??? (c) 1987 Taito America Corporation + Romstar license (US) */ |
| r6049 | r6050 | |
| 1889 | 1892 | /* Taito H-System games */ |
| 1890 | 1893 | DRIVER( syvalion ) /* B51 (c) 1988 Taito Corporation (Japan) */ |
| 1891 | 1894 | DRIVER( recordbr ) /* B56 (c) 1988 Taito Corporation Japan (World) */ |
| 1895 | DRIVER( gogold ) /* B56 (c) 1988 Taito Corporation (Japan) */ | |
| 1892 | 1896 | DRIVER( dleague ) /* C02 (c) 1990 Taito Corporation (Japan) */ |
| 1893 | 1897 | |
| 1894 | 1898 | /* Taito B-System games */ |
| r6049 | r6050 | |
| 3517 | 3521 | DRIVER( astrob2 ) /* (c) 1981 */ |
| 3518 | 3522 | DRIVER( astrob2a ) /* (c) 1981 */ |
| 3519 | 3523 | DRIVER( astrob1 ) /* (c) 1981 */ |
| 3524 | DRIVER( astrode ) /* (c) 1981 */ | |
| 3520 | 3525 | DRIVER( 005 ) /* (c) 1981 */ |
| 3521 | 3526 | DRIVER( monsterb ) /* (c) 1982 */ |
| 3522 | 3527 | DRIVER( monsterb2 ) /* (c) 1982 */ |
| r6049 | r6050 | |
| 4074 | 4079 | DRIVER( sanjeon ) /* 1999.04 Sanjun Sujun (Sega / Deniam) */ |
| 4075 | 4080 | DRIVER( danchih ) /* 1999.06 Danchi de Hanafuda Okusan Komeya Desuyo! (Altron (Tecmo License)) */ |
| 4076 | 4081 | DRIVER( ffreveng ) /* 1999.09 Final Fight Revenge (Capcom) */ |
| 4077 | | |
| 4082 | DRIVER( danchiq ) /* 2000.12 Danchi de Quiz Okusan Yontaku Desuyo! (Altron) */ | |
| 4078 | 4083 | |
| 4079 | 4084 | /* Sega Model 2 Games */ |
| 4080 | 4085 | |
| r6049 | r6050 | |
| 9152 | 9157 | DRIVER( 4roses ) /* (c) 1999 Unknown */ |
| 9153 | 9158 | DRIVER( 4rosesa ) /* (c) 1999 Unknown */ |
| 9154 | 9159 | DRIVER( big10 ) /* (c) 198? Unknown */ |
| 9155 | DRIVER( bingor1 ) /* (c) 198? Unknown */ | |
| 9156 | DRIVER( bingor2 ) /* (c) 198? Unknown */ | |
| 9157 | DRIVER( bingor3 ) /* (c) 198? Unknown */ | |
| 9158 | DRIVER( bingor4 ) /* (c) 198? Unknown */ | |
| 9160 | DRIVER( bingor1 ) /* (c) 2002 Unknown */ | |
| 9161 | DRIVER( bingor2 ) /* (c) 2002 Unknown */ | |
| 9162 | DRIVER( bingor3 ) /* (c) 2002 Unknown */ | |
| 9163 | DRIVER( bingor4 ) /* (c) 2002 Unknown */ | |
| 9164 | DRIVER( bingor5 ) /* (c) 2002 Unknown */ | |
| 9159 | 9165 | |
| 9160 | 9166 | /* InterFlip / Recreativos Franco */ |
| 9161 | 9167 | DRIVER( videopkr ) /* (c) 1984 InterFlip */ |
| r6049 | r6050 | |
| 9547 | 9553 | /* Hi-Soft */ |
| 9548 | 9554 | DRIVER( himesiki ) /* (c) 1989 Hi-Soft */ |
| 9549 | 9555 | |
| 9550 | /* Hi-Lo Poker-based */ | |
| 9551 | DRIVER( gtipoker ) /* (c) 1983 GTI Inc */ | |
| 9556 | /* Draw Poker Hi-Lo based */ | |
| 9552 | 9557 | DRIVER( norautp ) /* (c) 1988? Noraut Ltd */ |
| 9553 | 9558 | DRIVER( norautjp ) /* (c) 1988? Noraut Ltd */ |
| 9554 | 9559 | DRIVER( norautrh ) /* (c) 1988? Noraut Ltd */ |
| 9555 | 9560 | DRIVER( norautu ) /* (c) 1988? Noraut Ltd */ |
| 9556 | 9561 | DRIVER( norautv3 ) /* (c) 1988? Noraut Ltd */ |
| 9557 | 9562 | DRIVER( norautpn ) /* (c) 1990? unknown */ |
| 9563 | DRIVER( pma ) /* PMA */ | |
| 9564 | DRIVER( dphl ) /* (c) M. Kramer Inc. 1983 */ | |
| 9565 | DRIVER( dphla ) /* unknown */ | |
| 9566 | DRIVER( gtipoker ) /* (c) 1983 GTI Inc */ | |
| 9567 | DRIVER( tpoker2 ) /* (c) 1993 Micro Manufacturing, Inc. */ | |
| 9558 | 9568 | |
| 9559 | 9569 | /* Sanki Denshi Kogyo */ |
| 9560 | 9570 | DRIVER( pachifev ) /* (c) 1983? */ |
| r6049 | r6050 | |
| 9586 | 9596 | //DRIVER( mfish_8 ) /* (c) 2002 */ |
| 9587 | 9597 | //DRIVER( mfish_9 ) /* (c) 2002 */ |
| 9588 | 9598 | //DRIVER( mfish_10 ) /* (c) 2002 */ |
| 9589 | | |
| 9599 | | |
| 9590 | 9600 | DRIVER( mfish_12 ) /* (c) 2002 */ |
| 9591 | 9601 | DRIVER( mfish_12a ) /* (c) 2002 */ |
| 9592 | 9602 | //DRIVER( mfish_13 ) /* (c) 2002 */ |
| r6049 | r6050 | |
| 9638 | 9648 | //DRIVER( garage_3 ) /* (c) 2004 */ |
| 9639 | 9649 | DRIVER( garage_4 ) /* (c) 2004 */ |
| 9640 | 9650 | DRIVER( garage_4a ) /* (c) 2004 */ |
| 9651 | DRIVER( garage_4b ) /* (c) 2004 */ | |
| 9641 | 9652 | DRIVER( garage_5 ) /* (c) 2004 */ |
| 9642 | 9653 | DRIVER( garage_5a ) /* (c) 2004 */ |
| 9643 | 9654 | |
| r6049 | r6050 | |
| 9651 | 9662 | /* Sweet Life */ |
| 9652 | 9663 | DRIVER( sweetl ) /* (c) 2004 */ |
| 9653 | 9664 | DRIVER( sweetla ) /* (c) 2004 */ |
| 9665 | DRIVER( sweetlb ) /* (c) 2004 */ | |
| 9654 | 9666 | |
| 9655 | 9667 | /* Resident */ |
| 9656 | 9668 | //DRIVER( resdnt ) /* (c) 2004 */ |
| r6049 | r6050 | |
| 9663 | 9675 | |
| 9664 | 9676 | /* Pirate */ |
| 9665 | 9677 | //DRIVER( pirate ) /* (c) 2005 */ |
| 9666 | DRIVER( pirate_1 ) /* (c) 2005 */ | |
| 9667 | //DRIVER( pirate_2 )/* (c) 2005 */ | |
| 9678 | DRIVER( pirate_2 ) /* (c) 2005 */ | |
| 9679 | DRIVER( pirate_3 ) /* (c) 2005 */ | |
| 9668 | 9680 | |
| 9681 | /* Pirate 2 */ | |
| 9682 | DRIVER( pirate2 ) /* (c) 2006 */ | |
| 9683 | DRIVER( pirate2a ) /* (c) 2006 */ | |
| 9684 | DRIVER( pirate2b ) /* (c) 2006 */ | |
| 9685 | DRIVER( pirate2c ) /* (c) 2006 */ | |
| 9686 | DRIVER( pirate2d ) /* (c) 2006 */ | |
| 9687 | DRIVER( pirate2e ) /* (c) 2006 */ | |
| 9688 | ||
| 9669 | 9689 | /* Island 2 */ |
| 9670 | 9690 | DRIVER( island2 ) /* (c) 2006 */ |
| 9671 | 9691 | DRIVER( island2a ) /* (c) 2006 */ |
| r6049 | r6050 | |
| 9674 | 9694 | DRIVER( keks ) /* (c) 2006 */ |
| 9675 | 9695 | DRIVER( keksa ) /* (c) 2006 */ |
| 9676 | 9696 | DRIVER( keksb ) /* (c) 2006 */ |
| 9697 | DRIVER( keksc ) /* (c) 2006 */ | |
| 9677 | 9698 | DRIVER( keks_2 ) /* (c) 2006 */ |
| 9678 | 9699 | DRIVER( keks_2a ) /* (c) 2006 */ |
| 9700 | DRIVER( keks_2b ) /* (c) 2006 */ | |
| 9679 | 9701 | |
| 9680 | 9702 | /* Drivers below are mechanical games, usually with no video display, requiring external artwork to function. |
| 9681 | 9703 | These are currently mostly 'fruit machine' style games, although this may later be extended to system logic |
| r6049 | r6050 | |
|---|---|---|
| 147 | 147 | WRITE8_DEVICE_HANDLER( spacwalk_audio_2_w ); |
| 148 | 148 | |
| 149 | 149 | MACHINE_DRIVER_EXTERN( shuffle_audio ); |
| 150 | WRITE8_HANDLER( shuffle_audio_1_w ); | |
| 151 | WRITE8_HANDLER( shuffle_audio_2_w ); | |
| 150 | WRITE8_DEVICE_HANDLER( shuffle_audio_1_w ); | |
| 151 | WRITE8_DEVICE_HANDLER( shuffle_audio_2_w ); | |
| 152 | 152 | |
| 153 | 153 | MACHINE_DRIVER_EXTERN( dogpatch_audio ); |
| 154 | 154 | WRITE8_HANDLER( dogpatch_audio_w ); |
| r6049 | r6050 | |
|---|---|---|
| 3 | 3 | ARKUNK=0, /* unknown bootlegs for inclusion of possible new sets */ |
| 4 | 4 | ARKANGC, |
| 5 | 5 | ARKANGC2, |
| 6 | BLOCK2, | |
| 6 | 7 | ARKBLOCK, |
| 7 | 8 | ARKBLOC2, |
| 8 | 9 | ARKGCBL, |
| r6049 | r6050 | |
| 47 | 48 | extern CUSTOM_INPUT( arkanoid_68705_input_r ); |
| 48 | 49 | extern CUSTOM_INPUT( arkanoid_input_mux ); |
| 49 | 50 | |
| 51 | extern READ8_HANDLER( arkanoid_bootleg_f000_r ); | |
| 50 | 52 | extern READ8_HANDLER( arkanoid_bootleg_f002_r ); |
| 51 | 53 | extern WRITE8_HANDLER( arkanoid_bootleg_d018_w ); |
| 52 | 54 | extern READ8_HANDLER( arkanoid_bootleg_d008_r ); |
| r6049 | r6050 | |
|---|---|---|
| 1 | 1 | /* Todo, reorganise, cleanup etc.*/ |
| 2 | 2 | |
| 3 | /*----------- defined in drivers/megaplay.c -----------*/ | |
| 4 | ||
| 5 | extern UINT16 *ic36_ram; | |
| 6 | extern UINT8 bios_6204; | |
| 7 | extern UINT8 bios_ctrl[6]; | |
| 8 | ||
| 9 | /*----------- defined in drivers/megatech.c -----------*/ | |
| 10 | ||
| 11 | extern UINT32 bios_ctrl_inputs; | |
| 12 | ||
| 13 | /*----------- defined in drivers/genesis.c -----------*/ | |
| 14 | ||
| 15 | extern UINT8 *genesis_z80_ram; | |
| 16 | extern UINT16 *genesis_68k_ram; | |
| 17 | extern MACHINE_START( genesis ); | |
| 18 | extern MACHINE_RESET( genesis ); | |
| 19 | extern WRITE16_HANDLER ( genesis_io_w ); | |
| 20 | extern UINT16 *genesis_io_ram; | |
| 21 | extern READ16_HANDLER(genesis_ctrl_r); | |
| 22 | extern READ16_HANDLER ( megaplay_68k_to_z80_r ); | |
| 23 | extern READ8_HANDLER ( genesis_z80_r ); | |
| 24 | extern READ8_HANDLER ( genesis_z80_bank_r ); | |
| 25 | extern WRITE8_HANDLER ( genesis_z80_w ); | |
| 26 | extern WRITE16_HANDLER(genesis_ctrl_w); | |
| 27 | extern WRITE16_HANDLER ( genesis_68k_to_z80_w ); | |
| 28 | extern READ16_HANDLER ( genesis_68k_to_z80_r ); | |
| 29 | extern INTERRUPT_GEN( genesis_vblank_interrupt ); | |
| 30 | extern void genesis_irq2_interrupt(const device_config *device, int state); | |
| 31 | ||
| 32 | 3 | /*----------- defined in video/genesis.c -----------*/ |
| 33 | 4 | |
| 34 | 5 | extern UINT8 genesis_vdp_regs[]; |
| r6049 | r6050 | |
| 36 | 7 | extern UINT16 genesis_sp_pal_lookup[]; |
| 37 | 8 | |
| 38 | 9 | VIDEO_START( genesis ); |
| 39 | VIDEO_START( segac2 ); | |
| 40 | 10 | |
| 41 | 11 | VIDEO_UPDATE( genesis ); |
| 42 | VIDEO_UPDATE( segac2 ); | |
| 43 | VIDEO_UPDATE( megaplay ); | |
| 44 | 12 | |
| 45 | void segac2_enable_display(running_machine *machine, int enable); | |
| 46 | ||
| 47 | 13 | void system18_vdp_start(running_machine *machine); |
| 48 | 14 | void system18_vdp_update(bitmap_t *bitmap, const rectangle *cliprect); |
| 49 | 15 |
| r6049 | r6050 | |
|---|---|---|
| 1103 | 1103 | $(DRIVERS)/coolridr.o \ |
| 1104 | 1104 | $(DRIVERS)/deniam.o $(VIDEO)/deniam.o \ |
| 1105 | 1105 | $(DRIVERS)/dotrikun.o $(VIDEO)/dotrikun.o \ |
| 1106 | $( | |
| 1106 | $( | |
| 1107 | 1107 | $(DRIVERS)/gpworld.o \ |
| 1108 | 1108 | $(DRIVERS)/hikaru.o \ |
| 1109 | 1109 | $(DRIVERS)/hshavoc.o \ |
| r6049 | r6050 | |
|---|---|---|
| 7 | 7 | #define STATE_VDW 2 |
| 8 | 8 | #define STATE_VCR 3 |
| 9 | 9 | |
| 10 | /* todo: replace this with the PAIR structure | |
| 10 | /* todo: replace this with the PAIR structure | |
| 11 | 11 | typedef union |
| 12 | 12 | { |
| 13 | 13 | #ifdef LSB_FIRST |
| r6049 | r6050 | |
|---|---|---|
| 1512 | 1512 | gtia.r.but[i] &= (button_port >> i) & 1; |
| 1513 | 1513 | } |
| 1514 | 1514 | |
| 1515 | /* button registers for xl/xe */ | |
| 1516 | if (button_count == 2) | |
| 1517 | { | |
| 1518 | gtia.r.but[2] = 1; /* not used on xl/xe */ | |
| 1519 | gtia.r.but[3] = 0; /* 1 if external cartridge is inserted */ | |
| 1520 | } | |
| 1515 | /* specify buttons not relevant to this Atari variant */ | |
| 1516 | for (i = button_count; i < 4; i++) | |
| 1517 | gtia.r.but[i] = 1; | |
| 1521 | 1518 | |
| 1522 | 1519 | handle_keyboard(machine); |
| 1523 | 1520 |
| r6049 | r6050 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | Games running on this hardware: |
| 10 | 10 | |
| 11 | -- Z80 based -- | |
| 12 | ||
| 11 | 13 | * Noraut Poker, 1988, Noraut Ltd. |
| 12 | 14 | * Noraut Joker Poker, 1988, Noraut Ltd. |
| 13 | 15 | * Noraut Red Hot Joker Poker, 1988, Noraut Ltd. |
| 14 | 16 | * Noraut Poker (NTX10A), 1988, Noraut Ltd. |
| 15 | 17 | * Noraut Joker Poker (V3.010a), 1988, Noraut Ltd. |
| 16 | * GTI Poker, 1983, GTI Inc. | |
| 17 | 18 | * Noraut Poker (bootleg), 198?, Unknown. |
| 19 | * PMA Poker, 198?, PMA. | |
| 18 | 20 | |
| 21 | -- 8080A based -- | |
| 19 | 22 | |
| 23 | * Draw Poker Hi-Lo, 1983, M. Kramer Manufacturing. | |
| 24 | * Draw Poker Hi-Lo (alt), 1983, Unknown. | |
| 25 | * GTI Poker, 1983, GTI Inc. | |
| 26 | * Turbo Poker 2, 1993, Micro Manufacturing, Inc. | |
| 27 | ||
| 28 | ||
| 29 | This hardware emulation opened a big can of worms. :) | |
| 30 | You can see the legal issues in the following link: | |
| 31 | http://www.altlaw.org/v1/cases/533481 | |
| 32 | ||
| 20 | 33 | Special thanks to Alan Griffin, that kindly helped providing good references |
| 21 | that allowed me to improve the system emulation. | |
| 34 | that allowed me to improve the Noraut system emulation. | |
| 22 | 35 | |
| 23 | 36 | |
| 24 | 37 | ******************************************************************************* |
| r6049 | r6050 | |
| 389 | 402 | |
| 390 | 403 | |
| 391 | 404 | ******************************************************************************* |
| 405 | ******************************************************************************* | |
| 392 | 406 | |
| 393 | 407 | |
| 408 | Draw Poker Hi-Lo (1983). | |
| 409 | "NYMF O II" hardware. | |
| 410 | M. Kramer Inc. | |
| 411 | ||
| 412 | PCB layout (Draw Poker Hi-Lo) | |
| 413 | ___________________________________________________________________________ | |
| 414 | | _________ ______ | | |
| 415 | | |HCF4093BE| SN74174N | U51 | NE555P 916C472X2PE ULN2003A | | |
| 416 | | | | |______| | | |
| 417 | | | | | | |
| 418 | | |MC14040 | 74123N SN74157N 74161N SN7486N ULN2003A | | |
| 419 | | | | | | |
| 420 | | | | | | |
| 421 | | |MWS5101 | SN7404N SN74166N 898-1-R 74161N ULN2003A |__ | |
| 422 | | | | __| | |
| 423 | | | | ______ _______ ___________ __| | |
| 424 | | |5101E-1 | | U31 | |DIP-SW | 74161N SN74157N |AM8255 APC | __| | |
| 425 | | |_________| |______| |_______| |___________| __| | |
| 426 | | ______ ___________ __| | |
| 427 | | | U26 | 2111A-2 2111A-2 74161N SN74157N | U20 | __| | |
| 428 | | |______| |___________| __| | |
| 429 | | ______ ______ ___________ __| | |
| 430 | | | U19 | | U18 | |AM8255 APC | 74161N SN74157N 898-1-R __| | |
| 431 | | |______| |______| |___________| __| | |
| 432 | | ______ __________ | | |
| 433 | | 74LS541N | U12 | |i D8228 | OSC 74161N SN7486N SN7404N | | |
| 434 | | |______| |__________| | | |
| 435 | | __________ | | |
| 436 | | DM7405N |i P8080A | SN74LS155AN iP8224 SN74157N 7411N 7474PC | | |
| 437 | | |__________| | | |
| 438 | |___________________________________________________________________________| | |
| 439 | ||
| 440 | OSC = 18.14 MHz | |
| 441 | ||
| 442 | U12 = AM2732 | |
| 443 | U18 = AM2732 | |
| 444 | U31 = AM2732A | |
| 445 | U51 = N82S129N | |
| 446 | ||
| 447 | U26, U19, U20 = unpopulated | |
| 448 | ||
| 449 | Edge connector is not JAMMA | |
| 450 | ||
| 451 | ||
| 452 | ******************************************************************************* | |
| 453 | ||
| 454 | ||
| 455 | Hardware Layout (Draw Poker Hi-Lo (alt)): | |
| 456 | ||
| 457 | Board layout/pcb tracks almost Identical to NORAUT boards. | |
| 458 | ||
| 459 | - CPU: 1x INTEL P8080A : L1087022 : INTEL '79. | |
| 460 | - RAM: 4x 2111A-2 Static Random Access Memory 256 x 4 bit. | |
| 461 | - I/O: 3x 8255 Peripeheral Interface Adapter. | |
| 462 | - Prg ROMs: 2x 2716 U11,U16 Eprom. | |
| 463 | - Gfx ROMs: 1x 2716 U27 Eprom :EXACT MATCH WITH NORAUT V3010A CHAR ROM. | |
| 464 | - Sound: Discrete. | |
| 465 | - Crystal: 1x 18.000 MHz. | |
| 466 | ||
| 467 | PCB silksceened: REV A. | |
| 468 | PCB MARKED: Solderside "81 16". | |
| 469 | Component side "J3 018". | |
| 470 | ||
| 471 | U11 2716 EPROM MARKED:"2B27". | |
| 472 | U16 2716 EPROM MARKED:"4D30". | |
| 473 | ||
| 474 | Frequency measured on CPU P8080A (pins 15 & 22) = 2.00056 MHz. | |
| 475 | ||
| 476 | No date information found on PCB or in Roms. | |
| 477 | Some dates found on some of the IC's | |
| 478 | U6: 1979 :SOLDERED TO BOARD | |
| 479 | U10:1975 :SOLDERED TO BOARD | |
| 480 | U15:1979 :SOLDERED TO BOARD | |
| 481 | U23:1981 :IN SOCKET | |
| 482 | U27:1977 :IN SOCKET | |
| 483 | ||
| 484 | ||
| 485 | ||
| 486 | PCB Layout (Draw Poker Hi-Lo (alt)): Edge Connector 36x2 | |
| 487 | ______________________________________________________________________________________________ | |
| 488 | | _________ _________ _____ ......... _________ | | |
| 489 | | |74LS174N | |74LS153N | |NE555| ......... |ULN2003A | | | |
| 490 | | NO IC |_________| |_________| |_____| 16-2-472 |_________| | | |
| 491 | | U46 U45 U44 U43 U42 U41 | | |
| 492 | | | | |
| 493 | | | | |
| 494 | | _________ _________ _________ _________ _________ | | |
| 495 | | |74LS157N | | 74153N | | 74161N | | 7486N | |ULN2003A | | | |
| 496 | | NO IC |_________| |_________| |_________| |_________| |_________| | | |
| 497 | | U40 U39 U38 U37 U36 U35 | | |
| 498 | | | | |
| 499 | | | 36 | |
| 500 | | _________ _________ 916C471X2PE _________ _________ _________ |___ | |
| 501 | | | 7404N | | 74166N | ......... | 74161N | | 74153N | |ULN2003A | ___| | |
| 502 | | |_________| |_________| ......... |_________| |_________| |_________| ___| | |
| 503 | | U34 U33 U32 U31 U30 U29 ___| | |
| 504 | | DIP SW x 8 ________________ ___| | |
| 505 | | _____________ _______________ _________ _________ | | ___| | |
| 506 | | _________ | | |1|2|3|4|5|6|7|8| | 74161N | | 74157N | | P8255A-5 | ___| | |
| 507 | | | 2111A-2 | | 2716 | |_|_|_|_|_|_|_|_| |_________| |_________| |________________| ___| | |
| 508 | | |_________| |_____________| U26 U25 U24 U23 ___| | |
| 509 | | U28 U27 ___| | |
| 510 | | ________________ ___| | |
| 511 | | | | ___| | |
| 512 | | _________ _________ _________ _________ _________ | D8255AC-5 | ___| | |
| 513 | | | 2111A-2 | | 2111A-2 | | 2111A-2 | | 74161N | | 74157N | |________________| ___| | |
| 514 | | |_________| |_________| |_________| |_________| |_________| U17 ___| | |
| 515 | | U22 U21 U20 U19 U18 ___| | |
| 516 | | ___| | |
| 517 | | ______________ ________________ ___| | |
| 518 | | | | | | _________ _________ 916C471X2PE ___| | |
| 519 | | | 2716 | | AM8255A PC | | 74161N | | 74157N | ......... ___| | |
| 520 | | |______________| |________________| |_________| |_________| ......... ___| | |
| 521 | | U16 U15 U14 U13 U12 ___| | |
| 522 | | | | |
| 523 | | ______________ ____________ _________ _________ _________ | 01 | |
| 524 | | | | | | | 74161N | | 7486N | | 7404N | | | |
| 525 | | | 2716 | | i P8228 | |_________| |_________| |_________| | | |
| 526 | | |______________| |____________| U9 U8 U7 | | |
| 527 | | U11 U10 XTAL | | |
| 528 | | .----. 18Mhz | | |
| 529 | | ____________________ __________ _________ _________ _________ _________ | | |
| 530 | | | | | 74155N | | i P8224 | | 74157N | | 7411N | | 7474N | | | |
| 531 | | | i P8080A | |__________| |_________| |_________| |_________| |_________| | | |
| 532 | | |____________________| U5 U4 U3 U2 U1 | | |
| 533 | | U6 | | |
| 534 | |______________________________________________________________________________________________| | |
| 535 | ||
| 536 | ||
| 537 | ||
| 538 | Noraut old Draw Poker Hi-Lo discrete audio circuitry | |
| 539 | ---------------------------------------------------- | |
| 540 | ||
| 541 | 3x ULN2003A (Darlington transistor array) | |
| 542 | 1x NE555P (Timer) | |
| 543 | 1x F 2N4401 (NPN General Purpose Amplifier) | |
| 544 | ||
| 545 | ||
| 546 | .------. .------------. .-------. | |
| 547 | | U17 | | NE555P | |2N4401 | | |
| 548 | | | 4| |3 R3 | | | |
| 549 | | PC7|------------------------------|RST OUT|-----ZZZZ-----|B E|-------> Audio Out. | |
| 550 | | PC6|----------. 6| |8 | C | | |
| 551 | | PC5|-----. |3-in .-----|THR VCC|-----------. '---+---' .----> Audio Out. | |
| 552 | | PC4|--. | .-+------. | 5| |7 | | | | |
| 553 | | | | | |ULN2003A| | .--|CVOLT DISC|--. | | | | |
| 554 | | | | | '-+------' | | | | | +------' --+-- | |
| 555 | | | | | |3-out C1 | | | GND | | | GND | |
| 556 | | 8255 | | | '--------||---+ | '-----+------' | | - | |
| 557 | | | | '--. | | |1 | | ' | |
| 558 | | | | |2-in | | | | | | |
| 559 | '------' | .--+-----. | | C5 | | | | |
| 560 | | |ULN2003A| | '---||---+ | | +5V | |
| 561 | | '--+-----' | | | | -+- | |
| 562 | | |2-out C2 | C4 | | C6 | | | |
| 563 | | '----------||---+------||---+-------. | .--||--+----' | |
| 564 | |2-in | | | | | | | |
| 565 | .-+------. | --+-- '-' | | |
| 566 | |ULN2003A| | GND | | | |
| 567 | '-+------' | - | | | |
| 568 | |2-out C3 | R1 ' | R2 | | |
| 569 | '----------------||---+----ZZZZ-------------+--ZZZZ--' | |
| 570 | ||
| 571 | ||
| 572 | ||
| 573 | R1 = 120 K ; Tolerance +/- 5% | |
| 574 | R2 = 1 K ; Tolerance +/- 5% | |
| 575 | R3 = 1 K ; Tolerance +/- 5% | |
| 576 | ||
| 577 | C1 = .01 Z | |
| 578 | C2 = .022 Z | |
| 579 | C3 = 503 ; 50.000 pf = 50 nf = 0.05 uf. | |
| 580 | C4 = .01 Z | |
| 581 | C5 = .01 Z | |
| 582 | C6 = .1 Z | |
| 583 | ||
| 584 | ||
| 585 | All Capacitors are Ceramic Disc. | |
| 586 | ||
| 587 | ---------------------------------------------------------------------------- | |
| 588 | ||
| 589 | Ports Map: | |
| 590 | ---------- | |
| 591 | ||
| 592 | U23: | |
| 593 | PPI-0 (); PortA IN. | |
| 594 | DIP Switches bank: | |
| 595 | ||
| 596 | 7654 3210 | |
| 597 | ---- ---x * DIP switch 8 | |
| 598 | ---- --x- * DIP switch 7 | |
| 599 | ---- -x-- * DIP switch 6 | |
| 600 | ---- x--- * DIP switch 5 | |
| 601 | ---x ---- * DIP switch 4 | |
| 602 | --x- ---- * DIP switch 3 | |
| 603 | -x-- ---- * DIP switch 2 | |
| 604 | x--- ---- * DIP switch 1 | |
| 605 | ||
| 606 | ||
| 607 | ******************************************************************************* | |
| 608 | ||
| 609 | ||
| 610 | Hardware Layout (Turbo Poker 2 by Micro MFG): | |
| 611 | ||
| 612 | ||
| 613 | - CPU: 1x NEC D8080AFC-1 (U42). | |
| 614 | - BUS: 1x 8224 (U43) | |
| 615 | - RAM: 2x 2111-1 Static Random Access Memory 256 x 4 bit (U33 & U34). | |
| 616 | - I/O: 3x Intel P8255A Peripeheral Interface Adapter (U31, U36 & U38). | |
| 617 | - Prg ROMs: 1x 27256 (U39). | |
| 618 | - Gfx ROMs: 1x 2732 (U30). | |
| 619 | - Sound: Discrete. | |
| 620 | - Crystal: 1x 18.000 MHz. | |
| 621 | ||
| 622 | ||
| 623 | Etched in copper on board: TP2 | |
| 624 | ||
| 625 | .U30 2732a ; stickered (c) 1993 MICRO MFG TURBO POKER CHAR, ROM. | |
| 626 | ||
| 627 | .U35 unknown ; stickered (c) 1993 MICRO MFG TP2#01 U35\IC4 16228 022194. | |
| 628 | ||
| 629 | Continuity errors when trying to read as a standard eprom. | |
| 630 | Silkscreened below the chip 'CUSTOM I.C.'. Looks like a normal EPROM. | |
| 631 | ||
| 632 | .U39 27256 ; stickered (c) 1993 MICRO MFG TURBO-2 U39-014 US UTBK 022190. | |
| 633 | ||
| 634 | .U38 8255 ; stickered MICRO MANUFACTURING, INC. DATE: 02-24-1994 SER# LKY-PCB-142728. | |
| 635 | ||
| 636 | .U37 MMI PAL12L6-2 ; Blue dot on it. Saved in Jedec format. | |
| 637 | ||
| 638 | .U44 DS1220AD-150 ; Dallas 2K x 8 CMOS nonvolatile SRAM. | |
| 639 | ||
| 640 | .U23 82S131 ; Bipolar PROM. | |
| 641 | ||
| 642 | ||
| 643 | ||
| 644 | 27256 @U39 Estimated U35 pinouts | |
| 645 | ||
| 646 | .----------. .----------. | |
| 647 | VPP -|01 28|- VCC GND -|01 28|- Pin 10 of U14 (7404) | |
| 648 | A12 -|02 27|- A14 VCC -|02 27|- A7 | |
| 649 | A7 -|03 26|- A13 VCC -|03 26|- A6 | |
| 650 | A6 -|04 25|- A8 N/C -|04 25|- A5 | |
| 651 | A5 -|05 24|- A9 Pull-up to pin 02 -|05 24|- A4 | |
| 652 | A4 -|06 23|- A11 VCC -|06 23|- A3 | |
| 653 | A3 -|07 22|- /OE N/C -|07 22|- A2 | |
| 654 | A2 -|08 21|- A10 Pin 9 of U37 PAL -|08 21|- A1 | |
| 655 | A1 -|09 20|- /CE Pin 8 of U37 PAL -|09 20|- A0 | |
| 656 | A0 -|10 19|- D7 Pin 24 of U42 (8080) -|10 19|- D7 | |
| 657 | D0 -|11 18|- D6 Pin 7 of U37 PAL -|11 18|- D6 | |
| 658 | D1 -|12 17|- D5 D0 -|12 17|- D5 | |
| 659 | D2 -|13 16|- D4 D1 -|13 16|- D4 | |
| 660 | GND -|14 15|- D3 D2 -|14 15|- D3 | |
| 661 | '----------' '----------' | |
| 662 | ||
| 663 | ||
| 664 | PCB Layout (Turbo Poker 2 by Micro MFG): Edge Connector 36x2 | |
| 665 | ___________________________________________________________________________________________________ | |
| 666 | | _________ _________ _________ _________ _________ _____ ________ _ | | |
| 667 | | | 74LS161 | | 74LS161 | | 74LS161 | | 74LS161 | | 74LS161 | | 555 | | KA2657 | / \ | | |
| 668 | | |_________| |_________| |_________| |_________| |_________| |_____| |________! | VR1 | | | |
| 669 | | U1 U2 U3 U4 U5 U6 U7 \ _ / | | |
| 670 | | | | |
| 671 | | _________ _________ _________ _________ _________ ________ | | |
| 672 | | | 74LS161 | | 74LS157 | | 74LS157 | | 74LS157 | | 74LS157 | | KA2657 | | | |
| 673 | | |_________| |_________| |_________| |_________| |_________| |________! | | |
| 674 | | U8 U9 U10 U11 U12 U13 | | |
| 675 | | | | |
| 676 | | _________ _________ _________ _________ _________ _________ ________ | 36 | |
| 677 | | | 74LS04P | | 74LS11N | | 74LS04P | | DV7486N | | DV7486N | | CTS8427 | | KA2657 | |___ | |
| 678 | | |_________| |_________| |_________| |_________| |_________| |_________| |________! ___| | |
| 679 | | U14 U15 U16 U17 U18 U19 (resnet) U20 ___| | |
| 680 | | ___| | |
| 681 | | _________ _________ _________ _________________ _________ _______________ ___| | |
| 682 | | | 74123 | | 74LS174 | | 82S131N | | PLD ?? (R dot) | | CTS8427 | |1|2|3|4|5|6|7|8| ___| | |
| 683 | | |_________| |_________| |_________| |_________________| |_________| |_|_|_|_|_|_|_|_| ___| | |
| 684 | | U21 U22 U23 U24 U25 (resnet) U26 (DIP SW x 8) ___| | |
| 685 | | ___| | |
| 686 | | _________ _________ _________ __________________ ________________________ ___| | |
| 687 | | | 7474N | | 74LS157 | | 74LS166 | | | | | ___| | |
| 688 | | |_________| |_________| |_________| | 2732A (char ROM) | | Intel P8255A | ___| | |
| 689 | | U27 U28 U29 |__________________| |________________________| ___| | |
| 690 | | U30 U31 ___| | |
| 691 | | _________ __________ __________ ____________________ ________________________ ___| | |
| 692 | | | 7474N | | SY2111-1 | | SY2111-1 | | | | | ___| | |
| 693 | | |_________| |__________| |__________| | Unknown custom ROM | | Intel P8255A | ___| | |
| 694 | | U32 U33 U34 |____________________| |________________________| ___| | |
| 695 | | U35 U36 ___| | |
| 696 | | _______________ ____________________ ____________________ ___| | |
| 697 | | |PAL12L6 (B dot)| | | | | ___| | |
| 698 | | |_______________| | 8255 (stickered) | | 27256 ROM | | | |
| 699 | | U37 |____________________| |____________________| __________ | 01 | |
| 700 | | U38 U39 | TRW 8022 | | | |
| 701 | | ____________ _____________________ ____________________ |__________| | | |
| 702 | | | Intel 8224 | | | | | U45 | | |
| 703 | | |____________| | NEC D8080AFC-1 | | 8224 Clock GEN | ___________________ | | |
| 704 | | U41 |_____________________| |____________________| | Dallas DS1220AD | | | |
| 705 | | ______ U42 U43 | Non Volatile SRAM | | | |
| 706 | | | Xtal | |___________________| | | |
| 707 | | | 18MHz| U44 | | |
| 708 | | |______| | | |
| 709 | |___________________________________________________________________________________________________| | |
| 710 | ||
| 711 | ||
| 712 | ||
| 713 | ******************************************************************************* | |
| 714 | ||
| 715 | ||
| 394 | 716 | *** Game Notes *** |
| 395 | 717 | |
| 396 | 718 | |
| r6049 | r6050 | |
| 414 | 736 | *** Memory Map *** |
| 415 | 737 | -------------------- |
| 416 | 738 | |
| 739 | ||
| 740 | Noraut HW: | |
| 741 | ||
| 417 | 742 | 0x0000 - 0x1FFF ; ROM space. |
| 418 | 0x | |
| 743 | 0x2000 - 0x23FF ; NVRAM. | |
| 419 | 744 | |
| 420 | 745 | 0x60 - 0x63 ; PPI 8255 0 - DIP Switches, lamps & counters. |
| 421 | 746 | 0xA0 - 0xA3 ; PPI 8255 1 - Regular Inputs, sound lines & remaining lamps. |
| 422 | 747 | 0xC0 - 0xC3 ; PPI 8255 2 - Video RAM access & other stuff. |
| 423 | 748 | |
| 424 | 749 | |
| 750 | DPHL HW: | |
| 751 | ||
| 752 | 0x0000 - 0x1FFF ; ROM space. | |
| 753 | 0x5000 - 0x53FF ; NVRAM. | |
| 754 | ||
| 755 | 0x7C - 0x7F ; PPI 8255 0 - DIP Switches, lamps & counters. | |
| 756 | 0xBC - 0xBF ; PPI 8255 1 - Regular Inputs, sound lines & remaining lamps. | |
| 757 | 0xDC - 0xDF ; PPI 8255 2 - Video RAM access & other stuff. | |
| 758 | ||
| 759 | ||
| 425 | 760 | ******************************************************************************* |
| 426 | 761 | |
| 427 | 762 | |
| r6049 | r6050 | |
| 524 | 859 | - Fixed the discrete sound system diagram, based on real sound references. |
| 525 | 860 | |
| 526 | 861 | |
| 862 | [2009-10-12] | |
| 863 | ||
| 864 | - Added Draw Poker Hi-Lo hardware support, based on 8080A CPU. | |
| 865 | - Mirrored the PPI's offsets to simplify/merge the hardware emulation. | |
| 866 | - Added hardware documentation and PCB layouts from both DPHL sets. | |
| 867 | - Added DPHL discrete sound circuitry scheme/documentation. | |
| 868 | - Added Turbo Poker 2 from Micro Manufacturing. | |
| 869 | - Added PMA poker. | |
| 870 | - Documented the Turbo Poker 2 hardware. | |
| 871 | - Added Turbo Poker 2 PCB layout from hi-res picture. | |
| 872 | - Switched to the new PPI core. | |
| 873 | - Commented out the 3rd PPI device till handshaked strobe lines can be | |
| 874 | properly emulated. For now, all VRAM access is through direct handlers. | |
| 875 | This allow to remove the hacks per set needed to boot the games. | |
| 876 | ||
| 877 | ||
| 527 | 878 | TODO: |
| 528 | 879 | |
| 529 | 880 | - Analize PPI-2 at 0xc0-0xc3. OBF handshake line (PC7) doesn't seems to work properly. |
| 881 | - Discrete sound to DPHL sets. | |
| 530 | 882 | - Find if wide chars are hardcoded or tied to a bit. |
| 531 | 883 | - Save support. |
| 532 | 884 | |
| r6049 | r6050 | |
| 534 | 886 | *******************************************************************************/ |
| 535 | 887 | |
| 536 | 888 | |
| 537 | #define MASTER_CLOCK XTAL_18_432MHz | |
| 538 | #define CPU_CLOCK MASTER_CLOCK / 8 /* 2.30275 MHz - Measured: 2.305 MHz */ | |
| 889 | #define NORAUT_MASTER_CLOCK XTAL_18_432MHz | |
| 890 | #define DPHL_MASTER_CLOCK XTAL_18MHz | |
| 891 | #define NORAUT_CPU_CLOCK NORAUT_MASTER_CLOCK / 8 /* 2.30275 MHz - Measured: 2.305 MHz */ | |
| 892 | #define DPHL_CPU_CLOCK DPHL_MASTER_CLOCK / 9 /* 2 MHz (from 8224) */ | |
| 539 | 893 | |
| 540 | 894 | #include "driver.h" |
| 541 | 895 | #include "cpu/z80/z80.h" |
| 542 | #include "machine/8255ppi.h" | |
| 896 | #include "cpu/i8085/i8085.h" | |
| 897 | #include "machine/i8255a.h" | |
| 543 | 898 | #include "norautp.h" |
| 544 | 899 | |
| 545 | 900 | #include "noraut11.lh" |
| r6049 | r6050 | |
| 697 | 1052 | PC0-PC2 could be set as input or output. |
| 698 | 1053 | */ |
| 699 | 1054 | |
| 700 | static READ8_DEVICE_HANDLER( ppi2_portc_r ) | |
| 701 | { | |
| 702 | UINT8 ppi2_pcmix = 0; | |
| 703 | UINT8 hndshk = 0x80; /* simulating the handshake lines (bits 3-7) */ | |
| 704 | ppi2_pcmix = (hndshk | (input_port_read(device->machine, "IN2") & 0x07)); | |
| 1055 | //static READ8_DEVICE_HANDLER( ppi2_portc_r ) | |
| 1056 | //{ | |
| 1057 | // UINT8 ppi2_pcmix = 0; | |
| 1058 | // UINT8 hndshk = 0x80; /* simulating the handshake lines (bits 3-7) */ | |
| 1059 | // ppi2_pcmix = (hndshk | (input_port_read(device->machine, "IN2") & 0x07)); | |
| 705 | 1060 | // popmessage("portc read: %02x", ppi2_pcmix); |
| 706 | 1061 | |
| 707 | return ppi2_pcmix; | |
| 708 | } | |
| 1062 | // return ppi2_pcmix; | |
| 709 | 1063 | |
| 710 | static WRITE8_DEVICE_HANDLER( ppi2_portc_w ) | |
| 1064 | // return (devtag_get_device(device->machine, "ppi8255_2") || (input_port_read(device->machine, "IN2") & 0x07)); | |
| 1065 | //} | |
| 1066 | ||
| 1067 | //static WRITE8_DEVICE_HANDLER( ppi2_portc_w ) | |
| 1068 | //{ | |
| 1069 | // /* PC0-PC2 don't seems to be connected to any output */ | |
| 1070 | // popmessage("portc write: %02x", data); | |
| 1071 | //} | |
| 1072 | ||
| 1073 | ||
| 1074 | /*game waits for /OBF signal (bit 7) to be set.*/ | |
| 1075 | static READ8_HANDLER( test_r ) | |
| 711 | 1076 | { |
| 712 | /* PC0-PC2 don't seems to be connected to any output */ | |
| 713 | // popmessage("portc write: %02x", data); | |
| 1077 | return 0xff; | |
| 714 | 1078 | } |
| 715 | 1079 | |
| 716 | static READ8_DEVICE_HANDLER( vram_data_r ) | |
| 1080 | static READ8_HANDLER( vram_data_r ) | |
| 1081 | //static READ8_DEVICE_HANDLER( vram_data_r ) | |
| 717 | 1082 | { |
| 718 | 1083 | return np_vram[np_addr]; |
| 719 | 1084 | } |
| 720 | 1085 | |
| 721 | static WRITE8_DEVICE_HANDLER( vram_data_w ) | |
| 1086 | static WRITE8_HANDLER( vram_data_w ) | |
| 1087 | //static WRITE8_DEVICE_HANDLER( vram_data_w ) | |
| 722 | 1088 | { |
| 723 | 1089 | np_vram[np_addr] = data & 0xff; |
| 1090 | ||
| 1091 | /* trigger 8255-2 port C bit 7 (/OBF) */ | |
| 1092 | // i8255a_pc7_w(devtag_get_device(device->machine, "ppi8255_2"), 0); | |
| 1093 | // i8255a_pc7_w(devtag_get_device(device->machine, "ppi8255_2"), 1); | |
| 1094 | ||
| 724 | 1095 | } |
| 725 | 1096 | |
| 726 | static WRITE8_DEVICE_HANDLER( vram_addr_w ) | |
| 1097 | static WRITE8_HANDLER( vram_addr_w ) | |
| 1098 | //static WRITE8_DEVICE_HANDLER( vram_addr_w ) | |
| 727 | 1099 | { |
| 728 | 1100 | np_addr = data; |
| 729 | 1101 | } |
| r6049 | r6050 | |
| 738 | 1110 | /************************* |
| 739 | 1111 | * Memory Map Information * |
| 740 | 1112 | *************************/ |
| 1113 | /* | |
| 741 | 1114 | |
| 1115 | CPU & PPI settings by set... | |
| 1116 | ||
| 1117 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1118 | | Set | CPU | PPI-0 offset | config | PPI-1 offset | config | PPI-2 offset | config | | |
| 1119 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1120 | | norautp | Z80 | 0x60-0x63 | 0x90 | 0xA0-0xA3 | 0x92 | 0xC0-0xC3 | 0xC1 (PC0-2 as input) | | |
| 1121 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1122 | | norautjp | Z80 | 0x60-0x63 | 0x90 | 0xA0-0xA3 | 0x92 | 0xC0-0xC3 | 0xC1 (PC0-2 as input) | | |
| 1123 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1124 | | norautrh | Z80 | 0x60-0x63 | 0x90 | 0xA0-0xA3 | 0x92 | 0xC0-0xC3 | 0xC0 | | |
| 1125 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1126 | | norautu | unknown | unknown | | unknown | | unknown | | | |
| 1127 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1128 | | norautv3 | Z80 | unknown | | unknown | | unknown | | | |
| 1129 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1130 | | gtipoker | 8080A | 0x7C-0x7F | 0x90 | 0xBC-0xBF | 0x92 | 0xDC-0xDF | 0xC0 | | |
| 1131 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1132 | | norautpn | Z80 | 0x60-0x63 | 0x90 | 0xA0-0xA3 | 0x92 | 0xC0-0xC3 | 0xC0 | | |
| 1133 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1134 | | dphl | 8080A | 0x7C-0x7F | 0x90 | 0xBC-0xBF | 0x92 | 0xDC-0xDF | 0xC0 | | |
| 1135 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1136 | | dphla | 8080A | 0x60-0x63 | 0x90 | 0xA0-0xA3 | 0x92 | 0xC0-0xC3 | 0xC0 | | |
| 1137 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1138 | | pma | Z80 | 0x7C-0x7F | 0x90 | 0xBC-0xBF | 0x92 | 0xDC-0xDF | 0xC0 | | |
| 1139 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1140 | | tpoker2 | 8080A | 0x7C-0x7F | 0x90 | 0xBC-0xBF | 0x92 | 0xDC-0xDF | 0xC0 | | |
| 1141 | +----------+---------+--------------+--------+--------------+--------+--------------+------------------------+ | |
| 1142 | ||
| 1143 | */ | |
| 742 | 1144 | static ADDRESS_MAP_START( norautp_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1145 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) | |
| 743 | 1146 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 744 | AM_RANGE(0x | |
| 1147 | AM_RANGE(0x2000, 0x23ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 745 | 1148 | ADDRESS_MAP_END |
| 746 | 1149 | |
| 747 | 1150 | static ADDRESS_MAP_START( norautp_portmap, ADDRESS_SPACE_IO, 8 ) |
| 748 | 1151 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 749 | AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) | |
| 750 | AM_RANGE(0xa0, 0xa3) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) | |
| 751 | AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w) | |
| 1152 | AM_RANGE(0x60, 0x63) AM_MIRROR(0x1c) AM_DEVREADWRITE("ppi8255_0", i8255a_r, i8255a_w) | |
| 1153 | AM_RANGE(0xa0, 0xa3) AM_MIRROR(0x1c) AM_DEVREADWRITE("ppi8255_1", i8255a_r, i8255a_w) | |
| 1154 | // AM_RANGE(0xc0, 0xc3) AM_MIRROR(0x3c) AM_DEVREADWRITE("ppi8255_2", i8255a_r, i8255a_w) | |
| 1155 | AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x3c) AM_READWRITE(vram_data_r, vram_data_w) | |
| 1156 | AM_RANGE(0xc1, 0xc1) AM_MIRROR(0x3c) AM_WRITE(vram_addr_w) | |
| 1157 | AM_RANGE(0xc2, 0xc2) AM_MIRROR(0x3c) AM_READ(test_r) | |
| 1158 | AM_RANGE(0xef, 0xef) AM_READ(test2_r) | |
| 752 | 1159 | ADDRESS_MAP_END |
| 753 | 1160 | |
| 754 | 1161 | /* |
| 755 | 1162 | Video RAM R/W: |
| 756 | 1163 | |
| 757 | c0 --> W ; data | |
| 1164 | c0 --> W ; data (hanshaked) | |
| 758 | 1165 | c1 --> W ; addressing |
| 759 | c2 --> R ; status | |
| 760 | c3 --> W ; alternate 00 & 01 (control?) | |
| 1166 | c2 --> R ; status (handshaking lines) + input (PC0-2) | |
| 1167 | c3 --> W ; PPI control + alternate 00 & 01 (PC1 out?) | |
| 761 | 1168 | |
| 1169 | PPI Mirror isn't accurate. | |
| 1170 | There are writes to 0xF7 and reads + compare to 0xEF. | |
| 1171 | Don't know what's supposed to be mirrored there. | |
| 1172 | ||
| 762 | 1173 | */ |
| 763 | 1174 | |
| 1175 | static ADDRESS_MAP_START( nortest1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1176 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) | |
| 1177 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 1178 | AM_RANGE(0x5000, 0x57ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 1179 | ADDRESS_MAP_END | |
| 1180 | ||
| 764 | 1181 | static ADDRESS_MAP_START( norautxp_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 765 | 1182 | AM_RANGE(0x0000, 0xcfff) AM_ROM /* need to be checked */ |
| 766 | 1183 | AM_RANGE(0xd000, 0xd3ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* need to be checked */ |
| r6049 | r6050 | |
| 768 | 1185 | |
| 769 | 1186 | static ADDRESS_MAP_START( norautxp_portmap, ADDRESS_SPACE_IO, 8 ) |
| 770 | 1187 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 771 | // AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) | |
| 772 | // AM_RANGE(0xa0, 0xa3) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) | |
| 773 | // AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w) | |
| 774 | 1188 | ADDRESS_MAP_END |
| 775 | 1189 | |
| 1190 | ||
| 1191 | /***** 8080 based ****/ | |
| 1192 | ||
| 1193 | static ADDRESS_MAP_START( dphl_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1194 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) /* A15 not connected */ | |
| 1195 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 1196 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 1197 | ADDRESS_MAP_END | |
| 1198 | ||
| 1199 | static ADDRESS_MAP_START( dphla_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1200 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) | |
| 1201 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 1202 | AM_RANGE(0x2000, 0x23ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 1203 | ADDRESS_MAP_END | |
| 1204 | ||
| 776 | 1205 | static ADDRESS_MAP_START( gtipoker_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1206 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) /* similar to DPHL */ | |
| 777 | 1207 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 778 | AM_RANGE(0x | |
| 1208 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 779 | 1209 | ADDRESS_MAP_END |
| 780 | 1210 | |
| 781 | static ADDRESS_MAP_START( gtipoker_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 782 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 783 | AM_RANGE(0x7c, 0x7f) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) | |
| 784 | AM_RANGE(0xbc, 0xbf) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) | |
| 785 | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w) | |
| 786 | AM_RANGE(0xef, 0xef) AM_READ(test2_r) | |
| 1211 | static ADDRESS_MAP_START( dphltest_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 1212 | // ADDRESS_MAP_GLOBAL_MASK(0x7fff) /* A15 not connected */ | |
| 1213 | AM_RANGE(0x0000, 0x6fff) AM_ROM | |
| 1214 | AM_RANGE(0x7000, 0x7fff) AM_RAM | |
| 1215 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 787 | 1216 | ADDRESS_MAP_END |
| 788 | 1217 | |
| 1218 | /* | |
| 1219 | DPHL | |
| 789 | 1220 | |
| 1221 | 7F -> 90 | |
| 1222 | BF -> 92 | |
| 1223 | DF -> C0 (hndshk) | |
| 1224 | ||
| 1225 | DPHLA | |
| 1226 | ||
| 1227 | 63 -> 90 | |
| 1228 | A3 -> 92 | |
| 1229 | C3 -> C0 (hndshk) | |
| 1230 | ||
| 1231 | */ | |
| 1232 | ||
| 790 | 1233 | /************************* |
| 791 | 1234 | * Input Ports * |
| 792 | 1235 | *************************/ |
| r6049 | r6050 | |
| 1004 | 1447 | * PPI 8255 (x3) Interface * |
| 1005 | 1448 | ************************************/ |
| 1006 | 1449 | |
| 1007 | static | |
| 1450 | static I | |
| 1008 | 1451 | { |
| 1009 | { /* (60-63) Mode 0 - Port A set as input */ | |
| 1010 | DEVCB_INPUT_PORT("DSW1"), /* Port A read */ | |
| 1011 | DEVCB_NULL, /* Port B read */ | |
| 1012 | DEVCB_NULL, /* Port C read */ | |
| 1013 | DEVCB_NULL, /* Port A write */ | |
| 1014 | DEVCB_HANDLER(mainlamps_w), /* Port B write */ | |
| 1015 | DEVCB_HANDLER(counterlamps_w) /* Port C write */ | |
| 1016 | }, | |
| 1017 | { /* (a0-a3) Mode 0 - Ports A & B set as input */ | |
| 1018 | DEVCB_INPUT_PORT("IN0"), /* Port A read */ | |
| 1019 | DEVCB_INPUT_PORT("IN1"), /* Port B read */ | |
| 1020 | DEVCB_NULL, /* Port C read */ | |
| 1021 | DEVCB_NULL, /* Port A write */ | |
| 1022 | DEVCB_NULL, /* Port B write */ | |
| 1023 | DEVCB_HANDLER(soundlamps_w) /* Port C write */ | |
| 1024 | }, | |
| 1025 | { /* (c0-c3) Group A Mode 2 (5-handshacked bidirectional port) | |
| 1026 | Group B Mode 0, output; (see below for lines PC0-PC2) */ | |
| 1027 | DEVCB_HANDLER(vram_data_r), /* Port A read */ | |
| 1028 | DEVCB_NULL, /* Port B read */ | |
| 1029 | DEVCB_HANDLER(ppi2_portc_r), /* Port C read */ | |
| 1030 | DEVCB_HANDLER(vram_data_w), /* Port A write (vram_data_w tied) */ | |
| 1031 | DEVCB_HANDLER(vram_addr_w), /* Port B write (vram_addr_w tied) */ | |
| 1032 | DEVCB_HANDLER(ppi2_portc_w) /* Port C write */ | |
| 1033 | } | |
| 1452 | /* (60-63) Mode 0 - Port A set as input */ | |
| 1453 | DEVCB_INPUT_PORT("DSW1"), /* Port A read */ | |
| 1454 | DEVCB_NULL, /* Port B read */ | |
| 1455 | DEVCB_NULL, /* Port C read */ | |
| 1456 | DEVCB_NULL, /* Port A write */ | |
| 1457 | DEVCB_HANDLER(mainlamps_w), /* Port B write */ | |
| 1458 | DEVCB_HANDLER(counterlamps_w) /* Port C write */ | |
| 1459 | }; | |
| 1460 | ||
| 1461 | static I8255A_INTERFACE (ppi8255_intf_1) | |
| 1462 | { | |
| 1463 | /* (a0-a3) Mode 0 - Ports A & B set as input */ | |
| 1464 | DEVCB_INPUT_PORT("IN0"), /* Port A read */ | |
| 1465 | DEVCB_INPUT_PORT("IN1"), /* Port B read */ | |
| 1466 | DEVCB_NULL, /* Port C read */ | |
| 1467 | DEVCB_NULL, /* Port A write */ | |
| 1468 | DEVCB_NULL, /* Port B write */ | |
| 1469 | DEVCB_HANDLER(soundlamps_w) /* Port C write */ | |
| 1470 | }; | |
| 1471 | ||
| 1472 | //static I8255A_INTERFACE (ppi8255_intf_2) | |
| 1473 | //{ | |
| 1474 | /* (c0-c3) Group A Mode 2 (5-lines handshacked bidirectional port) | |
| 1475 | Group B Mode 0, output; (see below for lines PC0-PC2) */ | |
| 1476 | // DEVCB_HANDLER(vram_data_r), /* Port A read (VRAM data read)*/ | |
| 1477 | // DEVCB_NULL, /* Port B read */ | |
| 1478 | // DEVCB_HANDLER(ppi2_portc_r), /* Port C read */ | |
| 1479 | // DEVCB_HANDLER(vram_data_w), /* Port A write (VRAM data write) */ | |
| 1480 | // DEVCB_HANDLER(vram_addr_w), /* Port B write (VRAM address write) */ | |
| 1481 | // DEVCB_HANDLER(ppi2_portc_w) /* Port C write */ | |
| 1482 | ||
| 1034 | 1483 | /* PPI-2 is configured as mixed mode2 and mode0 output. |
| 1035 | 1484 | It means that port A should be bidirectional and port B just as output. |
| 1036 | Port C as hshk regs, and P0-P2 as | |
| 1485 | Port C as hshk regs, and P0-P2 as in | |
| 1037 | 1486 | */ |
| 1038 | }; | |
| 1487 | //}; | |
| 1039 | 1488 | |
| 1040 | 1489 | |
| 1041 | 1490 | /************************* |
| r6049 | r6050 | |
| 1045 | 1494 | static MACHINE_DRIVER_START( norautp ) |
| 1046 | 1495 | |
| 1047 | 1496 | /* basic machine hardware */ |
| 1048 | MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK) | |
| 1497 | MDRV_CPU_ADD("maincpu", Z80, NORAUT_CPU_CLOCK) | |
| 1049 | 1498 | MDRV_CPU_PROGRAM_MAP(norautp_map) |
| 1050 | 1499 | MDRV_CPU_IO_MAP(norautp_portmap) |
| 1051 | 1500 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) |
| r6049 | r6050 | |
| 1053 | 1502 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 1054 | 1503 | |
| 1055 | 1504 | /* 3x 8255 */ |
| 1056 | MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) | |
| 1057 | MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) | |
| 1058 | MDRV_PPI8255_ADD( "ppi8255_2", ppi8255_intf[2] ) | |
| 1505 | MDRV_I8255A_ADD( "ppi8255_0", ppi8255_intf_0 ) | |
| 1506 | MDRV_I8255A_ADD( "ppi8255_1", ppi8255_intf_1 ) | |
| 1507 | // MDRV_I8255A_ADD( "ppi8255_2", ppi8255_intf_2 ) | |
| 1059 | 1508 | |
| 1060 | 1509 | /* video hardware */ |
| 1061 | 1510 | MDRV_SCREEN_ADD("screen", RASTER) |
| r6049 | r6050 | |
| 1084 | 1533 | |
| 1085 | 1534 | MDRV_CPU_MODIFY("maincpu") |
| 1086 | 1535 | MDRV_CPU_PROGRAM_MAP(norautxp_map) |
| 1087 | MDRV_CPU_IO_MAP(noraut | |
| 1536 | MDRV_CPU_IO_MAP(noraut | |
| 1088 | 1537 | |
| 1089 | 1538 | MACHINE_DRIVER_END |
| 1090 | 1539 | |
| 1091 | static MACHINE_DRIVER_START( | |
| 1540 | static MACHINE_DRIVER_START( n | |
| 1092 | 1541 | MDRV_IMPORT_FROM(norautp) |
| 1093 | 1542 | |
| 1094 | 1543 | MDRV_CPU_MODIFY("maincpu") |
| 1544 | MDRV_CPU_PROGRAM_MAP(nortest1_map) | |
| 1545 | MDRV_CPU_IO_MAP(norautp_portmap) | |
| 1546 | ||
| 1547 | MACHINE_DRIVER_END | |
| 1548 | ||
| 1549 | ||
| 1550 | /**** 8080A based ****/ | |
| 1551 | ||
| 1552 | static MACHINE_DRIVER_START( dphl ) | |
| 1553 | /* basic machine hardware */ | |
| 1554 | MDRV_CPU_ADD("maincpu", 8080, DPHL_CPU_CLOCK) | |
| 1555 | MDRV_CPU_PROGRAM_MAP(dphl_map) | |
| 1556 | MDRV_CPU_IO_MAP(norautp_portmap) | |
| 1557 | ||
| 1558 | /* 3x 8255 */ | |
| 1559 | MDRV_I8255A_ADD( "ppi8255_0", ppi8255_intf_0 ) | |
| 1560 | MDRV_I8255A_ADD( "ppi8255_1", ppi8255_intf_1 ) | |
| 1561 | // MDRV_I8255A_ADD( "ppi8255_2", ppi8255_intf_2 ) | |
| 1562 | ||
| 1563 | /* video hardware */ | |
| 1564 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 1565 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1566 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1567 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1568 | MDRV_SCREEN_SIZE(32*16, 32*16) | |
| 1569 | MDRV_SCREEN_VISIBLE_AREA(3*16, 31*16-1, (0*16) + 8, 16*16-1) | |
| 1570 | ||
| 1571 | MDRV_GFXDECODE(norautp) | |
| 1572 | ||
| 1573 | MDRV_PALETTE_INIT(norautp) | |
| 1574 | MDRV_PALETTE_LENGTH(8) | |
| 1575 | MDRV_VIDEO_START(norautp) | |
| 1576 | MDRV_VIDEO_UPDATE(norautp) | |
| 1577 | ||
| 1578 | /* sound hardware */ | |
| 1579 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1580 | MDRV_SOUND_ADD("discrete", DISCRETE, 0) | |
| 1581 | MDRV_SOUND_CONFIG_DISCRETE(norautp) | |
| 1582 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1583 | MACHINE_DRIVER_END | |
| 1584 | ||
| 1585 | static MACHINE_DRIVER_START( gtipoker ) | |
| 1586 | MDRV_IMPORT_FROM(dphl) | |
| 1587 | ||
| 1588 | MDRV_CPU_MODIFY("maincpu") | |
| 1095 | 1589 | MDRV_CPU_PROGRAM_MAP(gtipoker_map) |
| 1096 | MDRV_CPU_IO_MAP(gtipoker_portmap) | |
| 1590 | MDRV_CPU_IO_MAP(norautp_portmap) | |
| 1591 | // MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) | |
| 1097 | 1592 | |
| 1098 | 1593 | MACHINE_DRIVER_END |
| 1099 | 1594 | |
| 1595 | static MACHINE_DRIVER_START( dphla ) | |
| 1596 | MDRV_IMPORT_FROM(dphl) | |
| 1100 | 1597 | |
| 1598 | MDRV_CPU_MODIFY("maincpu") | |
| 1599 | MDRV_CPU_PROGRAM_MAP(dphla_map) | |
| 1600 | MDRV_CPU_IO_MAP(norautp_portmap) | |
| 1601 | ||
| 1602 | MACHINE_DRIVER_END | |
| 1603 | ||
| 1604 | static MACHINE_DRIVER_START( dphltest ) | |
| 1605 | MDRV_IMPORT_FROM(dphl) | |
| 1606 | ||
| 1607 | MDRV_CPU_MODIFY("maincpu") | |
| 1608 | MDRV_CPU_PROGRAM_MAP(dphltest_map) | |
| 1609 | MDRV_CPU_IO_MAP(norautp_portmap) | |
| 1610 | ||
| 1611 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 1612 | ||
| 1613 | MACHINE_DRIVER_END | |
| 1614 | ||
| 1615 | ||
| 1101 | 1616 | /************************* |
| 1102 | 1617 | * Rom Load * |
| 1103 | 1618 | *************************/ |
| r6049 | r6050 | |
| 1292 | 1807 | ROM_LOAD( "gu27.bin", 0x0800, 0x0800, CRC(174a5eec) SHA1(44d84a0cf29a0bf99674d95084c905d3bb0445ad) ) |
| 1293 | 1808 | ROM_END |
| 1294 | 1809 | |
| 1810 | /* | |
| 1295 | 1811 | |
| 1812 | Draw Poker Hi-Lo (1983). | |
| 1813 | "NYMF O II" hardware. | |
| 1814 | M. Kramer Inc. | |
| 1815 | ||
| 1816 | */ | |
| 1817 | ||
| 1818 | ROM_START( dphl ) | |
| 1819 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1820 | ROM_LOAD( "dphl_6468.u12", 0x0000, 0x1000, CRC(d8c4fe5c) SHA1(6bc745fefb8a3a21ca281d519895828047526de7) ) | |
| 1821 | ROM_LOAD( "dphl_36e3.u18", 0x1000, 0x1000, CRC(06cf6789) SHA1(587d883c399348b518e3be4d1dc2581824055328) ) | |
| 1822 | ||
| 1823 | ROM_REGION( 0x1000, "gfx", 0 ) | |
| 1824 | // ROM_FILL( 0x0000, 0x0800, 0xff ) | |
| 1825 | ROM_LOAD( "dphl_model_2_cgi_3939.u31", 0x0000, 0x1000, CRC(2028db2c) SHA1(0f81bb71e88c60df3817f58c28715ce2ea01ad4d) ) | |
| 1826 | ||
| 1827 | ROM_REGION( 0x0100, "proms", 0 ) | |
| 1828 | ROM_LOAD( "98ce.u51", 0x0000, 0x0100, CRC(812dc1f1) SHA1(b2af33ff36f2eca2f782bc2239bc9e54c2564f6a) ) | |
| 1829 | ROM_END | |
| 1830 | ||
| 1831 | ROM_START( dphla ) | |
| 1832 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1833 | ROM_LOAD( "2b27.u11", 0x0000, 0x0800, CRC(3a7ece95) SHA1(bc7c89e3f490da0723b3a7617ab9a747f8db7ea7) ) | |
| 1834 | ROM_LOAD( "4d30.u16", 0x0800, 0x0800, CRC(32594684) SHA1(cda1ed09ec30082d23e690058261523e0d34938e) ) | |
| 1835 | ||
| 1836 | ROM_REGION( 0x1000, "gfx", 0 ) | |
| 1837 | ROM_FILL( 0x0000, 0x0800, 0xff ) | |
| 1838 | ROM_LOAD( "char.u27", 0x0800, 0x0800, CRC(174a5eec) SHA1(44d84a0cf29a0bf99674d95084c905d3bb0445ad) ) | |
| 1839 | ROM_END | |
| 1840 | ||
| 1841 | /* | |
| 1842 | ||
| 1843 | PCB silkscreened PMA-32-C. | |
| 1844 | Someone had written "poker" on it. | |
| 1845 | ||
| 1846 | CPU: LH0080 (Sharp Z80). | |
| 1847 | I/O: 3x PPI 8255. | |
| 1848 | Xtal: 18 MHz. | |
| 1849 | NVRAM: Yes, battery attached. | |
| 1850 | ||
| 1851 | ROMs: 2x 2732 (E4 & E5). | |
| 1852 | 1x 2716 (J2). | |
| 1853 | ||
| 1854 | PROM: tb24s10n (D3) read as 82s129. | |
| 1855 | ||
| 1856 | */ | |
| 1857 | ROM_START( pma ) | |
| 1858 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1859 | ROM_LOAD( "pma.e5", 0x0000, 0x1000, CRC(e05ab5b9) SHA1(8bd13e8ed723ac256545f19bef4fa3fe507ab9d5) ) | |
| 1860 | ROM_RELOAD( 0x1000, 0x1000 ) | |
| 1861 | ROM_LOAD( "pma.e4", 0x2000, 0x1000, CRC(0f8b11fc) SHA1(7292b0ac368c469ff2e1ede1765c08f1ccc1a36c) ) | |
| 1862 | ||
| 1863 | ROM_REGION( 0x1000, "gfx", 0 ) | |
| 1864 | ROM_FILL( 0x0000, 0x0800, 0xff ) | |
| 1865 | ROM_LOAD( "pma.j2", 0x0800, 0x0800, CRC(412fc492) SHA1(094ea0ffd0c22274cfe164f07c009ffe022331fd) ) | |
| 1866 | ||
| 1867 | ROM_REGION( 0x0200, "proms", 0 ) | |
| 1868 | ROM_LOAD( "pma.d3", 0x0000, 0x0200, CRC(6e172c11) SHA1(b52439a5075cc68ae2792946a5ce973d9f8e4104) ) | |
| 1869 | ROM_END | |
| 1870 | ||
| 1871 | /* | |
| 1872 | ||
| 1873 | Turbo Poker 2 by Micro MFG. | |
| 1874 | ||
| 1875 | - CPU: 1x NEC D8080AFC-1 (U42). | |
| 1876 | - BUS: 1x 8224 (U43) | |
| 1877 | - RAM: 2x 2111-1 Static Random Access Memory 256 x 4 bit (U33 & U34). | |
| 1878 | - I/O: 3x Intel P8255A Peripeheral Interface Adapter (U31, U36 & U38). | |
| 1879 | - Prg ROMs: 1x 27256 (U39). | |
| 1880 | - Gfx ROMs: 1x 2732 (U30). | |
| 1881 | - Sound: Discrete. | |
| 1882 | - Crystal: 1x 18.000 MHz. | |
| 1883 | ||
| 1884 | */ | |
| 1885 | ROM_START( tpoker2 ) | |
| 1886 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 1887 | ROM_LOAD( "tp2.u39", 0x0000, 0x8000, CRC(543149fe) SHA1(beb61a27c2797341e23e020e754d63fde3b4fbb2) ) | |
| 1888 | ||
| 1889 | ROM_REGION( 0x1000, "gfx", 0 ) | |
| 1890 | ROM_LOAD( "tp2.u30", 0x0000, 0x1000, CRC(6df86e08) SHA1(a451f71db7b59500b99207234ef95793afc11f03) ) | |
| 1891 | ||
| 1892 | ROM_REGION( 0x0800, "other", 0 ) | |
| 1893 | ROM_LOAD( "tp2.u44", 0x0000, 0x0800, CRC(6b5453b7) SHA1(6793952800de067fd76b889f4f7c62c8474b8c3a) ) | |
| 1894 | ||
| 1895 | ROM_REGION( 0x0400, "proms", 0 ) | |
| 1896 | ROM_LOAD( "tp2.u23", 0x0000, 0x0400, CRC(0222124f) SHA1(5cd8d24ee8e6525a5f9e6a93fa8854f36f4319ee) ) | |
| 1897 | ||
| 1898 | ROM_REGION( 0x0034, "plds", 0 ) | |
| 1899 | ROM_LOAD( "tp2_pld.u37", 0x0000, 0x0034, CRC(25651948) SHA1(62cd4d73c6ca8ea5d4beb9ae262d1383f8149462) ) | |
| 1900 | ROM_END | |
| 1901 | ||
| 1902 | ||
| 1296 | 1903 | /************************** |
| 1297 | 1904 | * Driver Init * |
| 1298 | 1905 | **************************/ |
| r6049 | r6050 | |
| 1307 | 1914 | */ |
| 1308 | 1915 | static DRIVER_INIT( norautrh ) |
| 1309 | 1916 | { |
| 1310 | UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1311 | ROM[0x1110] = 0x00; | |
| 1312 | ROM[0x1111] = 0x00; | |
| 1917 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1918 | // ROM[0x1110] = 0x00; | |
| 1919 | // ROM[0x1111] = 0x00; | |
| 1313 | 1920 | } |
| 1314 | 1921 | |
| 1315 | 1922 | static DRIVER_INIT( norautpn ) |
| 1316 | 1923 | { |
| 1317 | UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1318 | ROM[0x0827] = 0x00; | |
| 1319 | ROM[0x0828] = 0x00; | |
| 1924 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1925 | // ROM[0x0827] = 0x00; | |
| 1926 | // ROM[0x0828] = 0x00; | |
| 1320 | 1927 | } |
| 1321 | 1928 | |
| 1929 | static DRIVER_INIT( norautu ) | |
| 1930 | { | |
| 1931 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1932 | // ROM[0x083c] = 0x00; | |
| 1933 | // ROM[0x083d] = 0x00; | |
| 1934 | // ROM[0x083e] = 0x00; | |
| 1935 | } | |
| 1936 | ||
| 1322 | 1937 | static DRIVER_INIT( gtipoker ) |
| 1323 | 1938 | { |
| 1324 | 1939 | // UINT8 *ROM = memory_region(machine, "maincpu"); |
| 1325 | 1940 | // ROM[0x0cc6] = 0x00; |
| 1326 | 1941 | // ROM[0x0cc7] = 0x00; |
| 1942 | // ROM[0x0cc8] = 0x00; | |
| 1943 | // ROM[0x10a5] = 0x00; | |
| 1944 | // ROM[0x10a6] = 0x00; | |
| 1945 | // ROM[0x10a7] = 0x00; | |
| 1327 | 1946 | } |
| 1328 | 1947 | |
| 1948 | static DRIVER_INIT( dphl ) | |
| 1949 | { | |
| 1950 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1951 | // ROM[0x1510] = 0x00; | |
| 1952 | // ROM[0x1511] = 0x00; | |
| 1953 | // ROM[0x1512] = 0x00; | |
| 1954 | } | |
| 1329 | 1955 | |
| 1956 | static DRIVER_INIT( dphla ) | |
| 1957 | { | |
| 1958 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 1959 | // ROM[0x0b09] = 0x00; | |
| 1960 | // ROM[0x0b0a] = 0x00; | |
| 1961 | // ROM[0x0b0b] = 0x00; | |
| 1962 | } | |
| 1963 | ||
| 1964 | ||
| 1330 | 1965 | /************************* |
| 1331 | 1966 | * Game Drivers * |
| 1332 | 1967 | *************************/ |
| 1333 | 1968 | |
| 1334 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 1335 | GAMEL( 1988, norautp, 0, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker", 0, layout_noraut11 ) | |
| 1336 | GAMEL( 1988, norautjp, norautp, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker", 0, layout_noraut11 ) | |
| 1337 | GAMEL( 1988, norautrh, 0, norautp, norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker", 0, layout_noraut12 ) | |
| 1338 | GAME( 1988, norautu, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)", GAME_NOT_WORKING ) | |
| 1339 | GAME( 1988, norautv3, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NOT_WORKING ) | |
| 1340 | GAME( 1983, gtipoker, 0, gtipoker, norautpn, gtipoker, ROT0, "GTI Inc", "GTI Poker", GAME_NOT_WORKING ) | |
| 1969 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 1970 | GAMEL( 1988, norautp, 0, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker", 0, layout_noraut11 ) | |
| 1971 | GAMEL( 1988, norautjp, norautp, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker", 0, layout_noraut11 ) | |
| 1972 | GAMEL( 1988, norautrh, 0, norautp, norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker", 0, layout_noraut12 ) | |
| 1973 | GAME( 1988, norautu, 0, norautxp, norautp, norautu, ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)", GAME_NOT_WORKING ) | |
| 1974 | GAME( 1988, norautv3, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NOT_WORKING ) | |
| 1975 | GAME( 1983, pma, 0, nortest1, norautp, 0, ROT0, "PMA", "PMA Poker", GAME_NOT_WORKING ) | |
| 1341 | 1976 | |
| 1342 | 1977 | /*The following has everything uncertain, seems a bootleg/hack and doesn't have any identification strings in program rom. */ |
| 1343 | GAMEL( 198?, norautpn, norautp, norautp, norautpn, norautpn, ROT0, "bootleg?", "Noraut Poker (bootleg)", 0, layout_noraut12 ) | |
| 1978 | GAMEL( 198?, norautpn, norautp, norautp, norautpn, norautpn, ROT0, "bootleg?", "Noraut Poker (bootleg)", 0, layout_noraut12 ) | |
| 1979 | ||
| 1980 | /* The following ones are 'Draw Poker Hi-Lo', running in a i8080a based hardware */ | |
| 1981 | GAME( 1983, dphl, 0, dphl, norautp, dphl, ROT0, "M. Kramer Manufacturing.", "Draw Poker Hi-Lo (M.Kramer)", GAME_NOT_WORKING ) | |
| 1982 | GAME( 1983, dphla, 0, dphla, norautp, dphla, ROT0, "Unknown", "Draw Poker Hi-Lo (alt)", GAME_NOT_WORKING ) | |
| 1983 | ||
| 1984 | GAME( 1983, gtipoker, 0, gtipoker, norautpn, gtipoker, ROT0, "GTI Inc", "GTI Poker", GAME_NOT_WORKING ) | |
| 1985 | GAME( 1993, tpoker2, 0, dphltest, norautp, 0, ROT0, "Micro Manufacturing, Inc.", "Turbo Poker 2", GAME_NOT_WORKING ) |
| r6049 | r6050 | |
|---|---|---|
| 1951 | 1951 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_WRITE(mb14241_0_shift_count_w) |
| 1952 | 1952 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_WRITE(mb14241_0_shift_data_w) |
| 1953 | 1953 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_WRITE(watchdog_reset_w) |
| 1954 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_1_w) | |
| 1955 | AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_2_w) | |
| 1954 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_DEVWRITE("discrete", shuffle_audio_1_w) | |
| 1955 | AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_DEVWRITE("discrete", shuffle_audio_2_w) | |
| 1956 | 1956 | ADDRESS_MAP_END |
| 1957 | 1957 | |
| 1958 | 1958 | |
| r6049 | r6050 | |
| 2005 | 2005 | MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL))) |
| 2006 | 2006 | |
| 2007 | 2007 | /* audio hardware */ |
| 2008 | | |
| 2008 | | |
| 2009 | 2009 | |
| 2010 | 2010 | MACHINE_DRIVER_END |
| 2011 | 2011 | |
| r6049 | r6050 | |
| 3183 | 3183 | /* 630 */ GAMEL(1978, clowns1, clowns, clowns, clowns1, 0, ROT0, "Midway", "Clowns (rev. 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE , layout_clowns ) |
| 3184 | 3184 | /* 640 */ GAMEL(1978, spacwalk, 0, spacwalk, spacwalk, 0, ROT0, "Midway", "Space Walk", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_spacwalk ) |
| 3185 | 3185 | /* 642 */ GAME( 1978, einning, 0, dplay, einning, 0, ROT0, "Midway", "Extra Inning", GAME_SUPPORTS_SAVE ) |
| 3186 | /* 643 */ GAME( 1978, shuffle, 0, shuffle, shuffle, 0, ROT90, "Midway", "Shuffleboard", GAME_ | |
| 3186 | /* 643 */ GAME( 1978, shuffle, 0, shuffle, shuffle, 0, ROT90, "Midway", "Shuffleboard", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 3187 | 3187 | /* 644 */ GAME( 1977, dogpatch, 0, dogpatch, dogpatch, 0, ROT0, "Midway", "Dog Patch", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 3188 | 3188 | /* 645 */ GAME( 1980, spcenctr, 0, spcenctr, spcenctr, 0, ROT0, "Midway", "Space Encounters", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 3189 | 3189 | /* 652 */ GAMEL(1979, phantom2, 0, phantom2, phantom2, 0, ROT0, "Midway", "Phantom II", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE , layout_hoa0a0ff ) |
| r6049 | r6050 | |
|---|---|---|
| 1392 | 1392 | DISCRETE_OP_AMP_FILTER(NODE_30, 1, NODE_04, NODE_NC, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &btime_opamp_desc) |
| 1393 | 1393 | |
| 1394 | 1394 | DISCRETE_MIXER2(NODE_40, 1, NODE_22, NODE_30, &btime_sound_mixer_desc) |
| 1395 | DISCRETE_CRFILTER(NODE_41, | |
| 1395 | DISCRETE_CRFILTER(NODE_41, | |
| 1396 | 1396 | |
| 1397 | 1397 | /* Amplifier is upc1181H3 |
| 1398 | 1398 | * |
| r6049 | r6050 | |
| 1405 | 1405 | */ |
| 1406 | 1406 | |
| 1407 | 1407 | /* Assuming a 4 Ohm impedance speaker */ |
| 1408 | DISCRETE_CRFILTER(NODE_43, | |
| 1408 | DISCRETE_CRFILTER(NODE_43, | |
| 1409 | 1409 | |
| 1410 | 1410 | DISCRETE_OUTPUT(NODE_43, 32767.0 / 5. * 35.0) |
| 1411 | 1411 |
| r6049 | r6050 | |
|---|---|---|
| 40 | 40 | #include "sound/2612intf.h" |
| 41 | 41 | #include "sound/sn76496.h" |
| 42 | 42 | |
| 43 | #include " | |
| 43 | #include "megadriv.h" | |
| 44 | 44 | |
| 45 | #define MASTER_CLOCK 53693100 | |
| 46 | ||
| 47 | ||
| 48 | 45 | static INPUT_PORTS_START( hshavoc ) |
| 49 | 46 | PORT_START("IN0") /* 16bit */ |
| 50 | 47 | PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) |
| r6049 | r6050 | |
| 97 | 94 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 98 | 95 | INPUT_PORTS_END |
| 99 | 96 | |
| 100 | static ADDRESS_MAP_START( topshoot_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 101 | AM_RANGE(0x000000, 0x0fffff) AM_ROM /* Cartridge Program Rom */ | |
| 102 | AM_RANGE(0x200000, 0x201fff) AM_WRITENOP // tested | |
| 103 | AM_RANGE(0x202000, 0x2023ff) AM_RAM // tested | |
| 104 | AM_RANGE(0xa00000, 0xa0ffff) AM_READWRITE(genesis_68k_to_z80_r, genesis_68k_to_z80_w) | |
| 105 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ | |
| 106 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) | |
| 107 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(genesis_vdp_r, genesis_vdp_w) /* VDP Access */ | |
| 108 | AM_RANGE(0xe00000, 0xe1ffff) AM_ROMBANK(3) | |
| 109 | AM_RANGE(0xfe0000, 0xfeffff) AM_RAMBANK(4) | |
| 110 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_BASE(&genesis_68k_ram) /* Main Ram */ | |
| 111 | ADDRESS_MAP_END | |
| 112 | 97 | |
| 113 | ||
| 114 | static ADDRESS_MAP_START( genesis_z80_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 115 | AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1) AM_BASE(&genesis_z80_ram) | |
| 116 | AM_RANGE(0x2000, 0x3fff) AM_RAMBANK(2) /* mirror */ | |
| 117 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE(genesis_z80_r, genesis_z80_w) | |
| 118 | AM_RANGE(0x8000, 0xffff) AM_READ(genesis_z80_bank_r) | |
| 119 | // AM_RANGE(0x8000, 0xffff) AM_WRITE(genesis_z80_bank_w) | |
| 120 | ADDRESS_MAP_END | |
| 121 | ||
| 122 | ||
| 123 | static MACHINE_DRIVER_START( genesis_base ) | |
| 124 | /*basic machine hardware */ | |
| 125 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 7) | |
| 126 | MDRV_CPU_VBLANK_INT("screen", genesis_vblank_interrupt) | |
| 127 | ||
| 128 | MDRV_CPU_ADD("genesis_snd_z80", Z80, MASTER_CLOCK / 15) | |
| 129 | MDRV_CPU_PROGRAM_MAP(genesis_z80_map) | |
| 130 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) /* from vdp at scanline 0xe0 */ | |
| 131 | ||
| 132 | MDRV_QUANTUM_TIME(HZ(6000)) | |
| 133 | ||
| 134 | MDRV_MACHINE_START(genesis) | |
| 135 | MDRV_MACHINE_RESET(genesis) | |
| 136 | ||
| 137 | /* video hardware */ | |
| 138 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 139 | ||
| 140 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 141 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 142 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 143 | MDRV_SCREEN_SIZE(342,262) | |
| 144 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 145 | ||
| 146 | MDRV_PALETTE_LENGTH(64) | |
| 147 | ||
| 148 | MDRV_VIDEO_START(genesis) | |
| 149 | MDRV_VIDEO_UPDATE(genesis) | |
| 150 | ||
| 151 | /* sound hardware */ | |
| 152 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 153 | ||
| 154 | MDRV_SOUND_ADD("ym", YM3438, MASTER_CLOCK/7) | |
| 155 | MDRV_SOUND_ROUTE(0, "mono", 0.50) | |
| 156 | MDRV_SOUND_ROUTE(1, "mono", 0.50) | |
| 157 | MACHINE_DRIVER_END | |
| 158 | ||
| 159 | ||
| 160 | static MACHINE_DRIVER_START( hshavoc ) | |
| 161 | /* basic machine hardware */ | |
| 162 | MDRV_IMPORT_FROM( genesis_base ) | |
| 163 | MDRV_CPU_MODIFY("maincpu") | |
| 164 | MDRV_CPU_PROGRAM_MAP(topshoot_map) | |
| 165 | ||
| 166 | /* sound hardware */ | |
| 167 | MDRV_SOUND_ADD("sn", SN76496, MASTER_CLOCK/15) | |
| 168 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 169 | MACHINE_DRIVER_END | |
| 170 | ||
| 171 | 98 | ROM_START( hshavoc ) |
| 172 | 99 | ROM_REGION( 0x200000, "maincpu", 0 ) |
| 173 | 100 | ROM_LOAD16_BYTE( "d-25.11a", 0x000000, 0x080000, CRC(6a155060) SHA1(ecb47bd428786e50e300a062b5038f943419a389) ) |
| r6049 | r6050 | |
| 186 | 113 | ROM_REGION( 0x200000, "maincpu", 0 ) |
| 187 | 114 | ROM_LOAD( "hsh.rom", 0x000000, 0x100000, CRC(17be551c) SHA1(0dc1969098716ba332978b89356f62961417682b) ) |
| 188 | 115 | ROM_END |
| 116 | ||
| 189 | 117 | #endif |
| 190 | 118 | |
| 191 | static READ16_HANDLER( vdp_fake_r ) | |
| 192 | { | |
| 193 | return mame_rand(space->machine); | |
| 194 | } | |
| 195 | ||
| 196 | static DRIVER_INIT(genesis) | |
| 197 | { | |
| 198 | /* hack -- fix vdp emulation instead */ | |
| 199 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xC00004, 0xC00005, 0, 0, vdp_fake_r); | |
| 200 | ||
| 201 | memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") ); | |
| 202 | memory_set_bankptr(machine, 4, genesis_68k_ram ); | |
| 203 | } | |
| 204 | ||
| 205 | 119 | static DRIVER_INIT(hshavoc) |
| 206 | 120 | { |
| 207 | 121 | |
| r6049 | r6050 | |
| 210 | 124 | |
| 211 | 125 | static const UINT16 typedat[16] = { |
| 212 | 126 | 1,1,1,1, 1,1,1,1, |
| 213 | 1,0,0,1, 1,0,1,1 | |
| 214 | }; | |
| 127 | 1,0,0,1, 1,0,1,1 }; | |
| 215 | 128 | |
| 216 | 129 | /* this decryption is wrong / incomplete, maybe it uses slightly different decryption for opcodes / data */ |
| 217 | 130 | /* I think the PIC that exists on the PCB controls a state-based encryption... there is a large amount |
| r6049 | r6050 | |
| 222 | 135 | |
| 223 | 136 | int rom_size = 0xe8000; |
| 224 | 137 | |
| 225 | for (x=0;x<rom_size/2;x++) | |
| 138 | for (x = 0; x < rom_size / 2; x++) | |
| 226 | 139 | { |
| 227 | 140 | src[x] = BITSWAP16(src[x], |
| 228 | ||
| 141 | 7, 15,6, 14, | |
| 229 | 142 | 5, 2, 1, 10, |
| 230 | 143 | 13,4, 12,3, |
| 231 | 11,0, 8, 9 | |
| 232 | ); | |
| 144 | 11,0, 8, 9 ); | |
| 233 | 145 | |
| 234 | 146 | |
| 147 | if (typedat[x & 0xf] == 1) | |
| 148 | src[x] = src[x] ^ 0x0501; | |
| 149 | else | |
| 150 | src[x] = src[x] ^ 0x0406; | |
| 235 | 151 | |
| 236 | 152 | |
| 237 | if (typedat[x&0xf]==1) src[x] = src[x]^0x0501; | |
| 238 | else src[x] = src[x]^0x0406; | |
| 153 | if (src[x] & 0x0400) | |
| 154 | src[x] ^= 0x0200; | |
| 239 | 155 | |
| 240 | ||
| 241 | if(src[x]&0x0400) src[x]^=0x0200; | |
| 242 | ||
| 243 | ||
| 244 | if (typedat[x&0xf]==0) | |
| 156 | if (typedat[x & 0xf] == 0) | |
| 245 | 157 | { |
| 246 | if(src[x]&0x0100) src[x]^=0x0004; | |
| 158 | if (src[x] & 0x0100) | |
| 159 | src[x] ^= 0x0004; | |
| 247 | 160 | |
| 248 | 161 | src[x] = BITSWAP16(src[x], 15,14,13,12, |
| 249 | 11,9, 10,8, | |
| 250 | 7, 6, 5, 4, | |
| 251 | 3, 2, 1, 0); | |
| 162 | 11,9, 10,8, | |
| 163 | 7, 6, 5, 4, | |
| 164 | 3, 2, 1, 0 ); | |
| 252 | 165 | } |
| 253 | ||
| 254 | 166 | } |
| 255 | 167 | |
| 256 | 168 | /* START e? from e80000 to end you need THIS ALONE to match the genesis rom */ |
| 257 | for (x=rom_size/2;x<0x100000/2;x++) | |
| 169 | for (x = rom_size / 2; x < 0x100000 / 2; x++) | |
| 258 | 170 | { |
| 259 | 171 | src[x] = BITSWAP16(src[x], |
| 260 | ||
| 172 | 7, 15,6, 14, | |
| 261 | 173 | 5, 2, 1, 10, |
| 262 | 174 | 13,4, 12,3, |
| 263 | 11,0, 8, 9 | |
| 264 | ); | |
| 175 | 11,0, 8, 9 ); | |
| 265 | 176 | |
| 266 | 177 | src[x] = BITSWAP16(src[x], |
| 267 | 15, 14,13, 12, | |
| 268 | 11, 10, 9, 2, | |
| 269 | 7,6, 5,4, | |
| 270 | 3,8, 0, 1 | |
| 271 | ); | |
| 272 | ||
| 178 | 15,14,13,12, | |
| 179 | 11,10,9, 2, | |
| 180 | 7, 6, 5, 4, | |
| 181 | 3, 8, 0, 1 ); | |
| 273 | 182 | } |
| 274 | 183 | /* EMD e80000 - end */ |
| 275 | 184 | |
| 276 | src[0]^=0x0107; | |
| 277 | src[1]^=0x0107; | |
| 278 | src[2]^=0x0107; | |
| 279 | src[3]^=0x0707; //? 0701 not 0107 .. conditional 0x600 extra xor?, different 'typemap' ?? | |
| 185 | src[0] ^= 0x0107; | |
| 186 | src[1] ^= 0x0107; | |
| 187 | src[2] ^= 0x0107; | |
| 188 | src[3] ^= 0x0707; //? 0701 not 0107 .. conditional 0x600 extra xor?, different 'typemap' ?? | |
| 280 | 189 | |
| 281 | 190 | /* I'm pretty sure c42 is where the startup code is located, comparing genesis version |
| 282 | 191 | and this there is at least one jump in the genesis version to the startup code which |
| r6049 | r6050 | |
| 285 | 194 | there are several blocks of code like this, all appear to end with a normal rts instruction |
| 286 | 195 | tho... |
| 287 | 196 | */ |
| 288 | for (x=0xc42/2;x<0xc9a/2;x++) | |
| 197 | for (x = 0xc42 / 2; x < 0xc9a / 2; x++) | |
| 289 | 198 | { |
| 290 | src[x]^=0x0107; //? seems conditional.. | |
| 199 | src[x] ^= 0x0107; //? seems conditional.. | |
| 291 | 200 | |
| 292 | 201 | src[x] = BITSWAP16(src[x], |
| 293 | 15, 13,14, 12, | |
| 294 | 11, 10, 9, 0, | |
| 295 | 8,6, 5,4, | |
| 296 | 3,2, 1, 7 | |
| 297 | ); // probably wrong | |
| 202 | 15,13,14,12, | |
| 203 | 11,10,9, 0, | |
| 204 | 8, 6, 5, 4, | |
| 205 | 3, 2, 1, 7 ); // probably wrong | |
| 298 | 206 | |
| 299 | src[x]^=0x0001; // wrong.. | |
| 300 | ||
| 207 | src[x] ^= 0x0001; // wrong.. | |
| 301 | 208 | } |
| 302 | 209 | |
| 303 | 210 | /* Uncommented until actively worked on |
| 304 | 211 | { |
| 305 | 212 | FILE*FP; |
| 306 | 213 | |
| 307 | FP=fopen("hshavoc.dump","wb"); | |
| 214 | FP = fopen("hshavoc.dump", "wb"); | |
| 308 | 215 | |
| 309 | fwrite(src, rom_size/2, 2, FP); | |
| 216 | fwrite(src, rom_size / 2, 2, FP); | |
| 310 | 217 | fclose(FP); |
| 311 | 218 | } |
| 312 | 219 | */ |
| 313 | 220 | |
| 221 | memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x201fff, 0, 0, SMH_NOP); | |
| 314 | 222 | |
| 315 | DRIVER_INIT_CALL( | |
| 223 | DRIVER_INIT_CALL(megadriv); | |
| 316 | 224 | |
| 317 | 225 | } |
| 318 | 226 | |
| 319 | 227 | |
| 320 | 228 | |
| 321 | GAME( 1993, hshavoc, 0, hshavoc, hshavoc, hshavoc, ROT0, "Data East", "High Seas Havoc",GAME_NOT_WORKING ) | |
| 322 | //GAME( 1993, hshavoc2, hshavoc, hshavoc, hshavoc, genesis, ROT0, "Data East", "High Seas Havoc (Genesis ROM)",GAME_NOT_WORKING ) | |
| 229 | GAME( 1993, hshavoc, 0, md_bootleg, hshavoc, hshavoc, ROT0, "Data East", "High Seas Havoc",GAME_NOT_WORKING ) | |
| 230 | //GAME( 1993, hshavoc2, hshavoc, md_bootleg, hshavoc, genesis, ROT0, "Data East", "High Seas Havoc (Genesis ROM)",GAME_NOT_WORKING ) |
| r6049 | r6050 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | TODO: |
| 9 | 9 | - correct I/O chip emulation |
| 10 | - dips | |
| 11 | 10 | - is game speed ok? a bit slow sometimes |
| 12 | 11 | |
| 13 | 12 | -- |
| r6049 | r6050 | |
| 89 | 88 | |
| 90 | 89 | static INPUT_PORTS_START( attckufo ) |
| 91 | 90 | PORT_START("DSW") |
| 92 | PORT_DIPNAME( 0x03, 0x0 | |
| 91 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 93 | 92 | PORT_DIPSETTING( 0x00, "3" ) |
| 94 | 93 | PORT_DIPSETTING( 0x01, "4" ) |
| 95 | 94 | PORT_DIPSETTING( 0x02, "5" ) |
| 96 | 95 | PORT_DIPSETTING( 0x03, "6" ) |
| 97 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 98 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 99 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 100 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 101 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 102 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 103 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 104 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 105 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 106 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 107 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 108 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 109 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 110 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 111 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 96 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) | |
| 97 | PORT_DIPSETTING( 0x04, "1000" ) | |
| 98 | PORT_DIPSETTING( 0x00, "1500" ) | |
| 99 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) | |
| 100 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 101 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 102 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 112 | 103 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 113 | 104 | |
| 114 | 105 | PORT_START("INPUT") |
| 115 | 106 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 116 | 107 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 117 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 108 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 118 | 109 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 119 | 110 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 120 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 111 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 121 | 112 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) |
| 122 | 113 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 123 | 114 | INPUT_PORTS_END |
| r6049 | r6050 | |
| 161 | 152 | |
| 162 | 153 | ROM_REGION( 0x400, "user1", 0 ) |
| 163 | 154 | ROM_COPY( "maincpu", 0x02000, 0x00000, 0x400) |
| 164 | ||
| 165 | 155 | ROM_END |
| 166 | 156 | |
| 167 | GAME( 1980, attckufo, 0, attckufo, attckufo, 0, ROT270, "Ryoto Electric Co.", "Attack Ufo", 0) | |
| 168 | ||
| 157 | GAME( 1980, attckufo, 0, attckufo, attckufo, 0, ROT270, "Ryoto Electric Co.", "Attack Ufo", 0) |
| r6049 | r6050 | |
|---|---|---|
| 3558 | 3558 | ROM_LOAD16_WORD_SWAP( "mpr21973.5", 0x1000000, 0x0400000, CRC(b0f23f14) SHA1(4e7076c29fd57bb3ef9af50a6104e39ecda94e06) )// good |
| 3559 | 3559 | ROM_END |
| 3560 | 3560 | |
| 3561 | ROM_START( danchiq ) | |
| 3562 | STV_BIOS | |
| 3563 | ||
| 3564 | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ | |
| 3565 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(e216bfc8) SHA1(7a08fa32281e272dbf5e7daea50a1800cc225c1b) )//ic 7 | |
| 3566 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(b95aa5ac) SHA1(2766c5414643034a0f6d746050557516bd3753df) )//ic 2 | |
| 3567 | ROM_LOAD16_WORD_SWAP( "ic26", 0x0600000, 0x0200000, CRC(df6ebd48) SHA1(fcccafbee1b8b952b07ed0e7e86219eed9cf4a93) ) | |
| 3568 | ROM_LOAD16_WORD_SWAP( "ic28", 0x0800000, 0x0200000, CRC(cf6a2b76) SHA1(1f7522d446d57b78d099bae553133d5e7e54ff70) )//ic 3 | |
| 3569 | ROM_LOAD16_WORD_SWAP( "ic30", 0x0a00000, 0x0200000, CRC(0b6a9901) SHA1(b4c335199d3e49a9ae5d474b10130abc4718cdf9) ) | |
| 3570 | ROM_LOAD16_WORD_SWAP( "ic32", 0x0c00000, 0x0200000, CRC(0b4604f5) SHA1(547cba4a80baf126e87f87529aa933587643d359) )//ic 4 | |
| 3571 | ROM_LOAD16_WORD_SWAP( "ic34", 0x0e00000, 0x0200000, CRC(616e20fa) SHA1(45c175e79b5701db9726d157ff92eee368f4bbf9) ) | |
| 3572 | ROM_LOAD16_WORD_SWAP( "ic36", 0x1000000, 0x0200000, CRC(43474e08) SHA1(30b3ede287d5de93c6e0219bfd0a5d7ed5b6a958) )//ic 5 | |
| 3573 | ROM_LOAD16_WORD_SWAP( "ic23", 0x1200000, 0x0200000, CRC(d080eb71) SHA1(9c39b887697c8872f0cb655cff24282ad3b90e9b) ) | |
| 3574 | ROM_LOAD16_WORD_SWAP( "ic25", 0x1400000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) )//(Untested) | |
| 3575 | ROM_END | |
| 3576 | ||
| 3561 | 3577 | ROM_START( mausuke ) |
| 3562 | 3578 | STV_BIOS |
| 3563 | 3579 | |
| r6049 | r6050 | |
| 3807 | 3823 | GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3808 | 3824 | GAME( 1995, critcrsh, stvbios, stv, critcrsh, stv, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3809 | 3825 | GAME( 1999, danchih, stvbios, stv, stvmp, danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 3826 | GAME( 2000, danchiq, stvbios, stv, stv, danchih, ROT0, "Altron", "Danchi de Quiz Okusan Yontaku Desuyo! (J 001128 V1.200)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) | |
| 3810 | 3827 | GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 3811 | 3828 | GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 3812 | 3829 | GAME( 1995, ejihon, stvbios, stv, stv, stv, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| r6049 | r6050 | |
|---|---|---|
| 92 | 92 | #include "rendlay.h" |
| 93 | 93 | |
| 94 | 94 | #include "segamsys.h" |
| 95 | #include "genesis.h" | |
| 96 | 95 | #include "megadriv.h" |
| 97 | 96 | |
| 97 | static struct _mtech_bios mtech_bios; | |
| 98 | ||
| 98 | 99 | /* Megatech BIOS specific */ |
| 99 | static UINT32 bios_port_ctrl; | |
| 100 | 100 | static UINT8* megatech_banked_ram; |
| 101 | static int current_game_is_sms; // is the current game SMS based (running on genesis z80, in VDP compatibility mode) | |
| 102 | UINT32 bios_ctrl_inputs; | |
| 103 | 101 | |
| 104 | 102 | #define MASTER_CLOCK 53693100 |
| 105 | 103 | |
| r6049 | r6050 | |
| 108 | 106 | PORT_INCLUDE(megadriv) |
| 109 | 107 | |
| 110 | 108 | PORT_START("BIOS_IN0") // port 6 |
| 111 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) | |
| 112 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 113 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 114 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 115 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 116 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 117 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 118 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 119 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 120 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 121 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 122 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 123 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 124 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 125 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 126 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 127 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 128 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 129 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 109 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) | |
| 110 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 111 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 112 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 113 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 114 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 115 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 116 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 117 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 118 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 119 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 120 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 121 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 122 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 123 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 124 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 125 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 126 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 127 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 130 | 128 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 131 | 129 | |
| 132 | 130 | PORT_START("BIOS_IN1") // port 6 |
| r6049 | r6050 | |
| 141 | 139 | |
| 142 | 140 | PORT_START("BIOS_DSW0") |
| 143 | 141 | PORT_DIPNAME( 0x02, 0x02, "Coin slot 3" ) |
| 144 | PORT_DIPSETTING ( 0x00, "Inhibit" ) | |
| 145 | PORT_DIPSETTING ( 0x02, "Accept" ) | |
| 142 | PORT_DIPSETTING( 0x00, "Inhibit" ) | |
| 143 | PORT_DIPSETTING( 0x02, "Accept" ) | |
| 146 | 144 | PORT_DIPNAME( 0x01, 0x01, "Coin slot 4" ) |
| 147 | PORT_DIPSETTING ( 0x00, "Inhibit" ) | |
| 148 | PORT_DIPSETTING ( 0x01, "Accept" ) | |
| 145 | PORT_DIPSETTING( 0x00, "Inhibit" ) | |
| 146 | PORT_DIPSETTING( 0x01, "Accept" ) | |
| 149 | 147 | PORT_DIPNAME( 0x1c, 0x1c, "Coin slot 3/4 value" ) |
| 150 | 148 | PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) ) |
| 151 | 149 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| r6049 | r6050 | |
| 203 | 201 | |
| 204 | 202 | |
| 205 | 203 | PORT_START("BIOS_J1") |
| 206 | PORT_DIPNAME( 0x0001, 0x0001, "5" ) | |
| 207 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 208 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 209 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 210 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 211 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 212 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 213 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 214 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 215 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 216 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 217 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 218 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 219 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 220 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 221 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 222 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 223 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 224 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 225 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 226 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 227 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 228 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 229 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 204 | PORT_DIPNAME( 0x0001, 0x0001, "5" ) | |
| 205 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 206 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 207 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) | |
| 208 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 209 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 210 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) | |
| 211 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 212 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 213 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) | |
| 214 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 215 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 216 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) | |
| 217 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 218 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 219 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 220 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 221 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 222 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 223 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 224 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 225 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 226 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 227 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 230 | 228 | |
| 231 | 229 | INPUT_PORTS_END |
| 232 | 230 | |
| 233 | 231 | /* MEGATECH specific */ |
| 234 | 232 | |
| 235 | static UINT8 mt_cart_select_reg; | |
| 236 | ||
| 237 | 233 | static READ8_HANDLER( megatech_instr_r ) |
| 238 | 234 | { |
| 239 | UINT8* instr = memory_region(space->machine, "mtbios")+0x8000; | |
| 235 | UINT8* instr = memory_region(space->machine, "mtbios") + 0x8000; | |
| 240 | 236 | |
| 241 | return instr[offset/2]; | |
| 237 | return instr[offset / 2]; | |
| 242 | 238 | // else |
| 243 | 239 | // return 0xff; |
| 244 | 240 | } |
| 245 | 241 | |
| 246 | 242 | static READ8_HANDLER( megatech_cart_select_r ) |
| 247 | 243 | { |
| 248 | return | |
| 244 | return | |
| 249 | 245 | } |
| 250 | 246 | |
| 251 | 247 | #ifdef UNUSED_FUNCTION |
| r6049 | r6050 | |
| 298 | 294 | if (bios_region[0x8000]==2) |
| 299 | 295 | { |
| 300 | 296 | printf("SMS cart!!, CPU not running\n"); |
| 301 | current_game_is_sms = 1; | |
| 297 | mtech_bios.current_game_is_sms = 1; | |
| 302 | 298 | megatech_set_genz80_as_sms_standard_map(machine, "genesis_snd_z80", MAPPER_STANDARD); |
| 303 | 299 | cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_HALT, CLEAR_LINE); |
| 304 | 300 | cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_RESET, CLEAR_LINE); |
| r6049 | r6050 | |
| 308 | 304 | else if (bios_region[0x8000]==1) |
| 309 | 305 | { |
| 310 | 306 | printf("Genesis Cart, CPU0 running\n"); |
| 311 | current_game_is_sms = 0; | |
| 307 | mtech_bios.current_game_is_sms = 0; | |
| 312 | 308 | megatech_set_megadrive_z80_as_megadrive_z80(machine, "genesis_snd_z80"); |
| 313 | 309 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, CLEAR_LINE); |
| 314 | 310 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, CLEAR_LINE); |
| r6049 | r6050 | |
| 326 | 322 | // cputag_set_input_line(machine, "genesis_snd_z80", INPUT_LINE_RESET, ASSERT_LINE); |
| 327 | 323 | |
| 328 | 324 | /* no cart.. */ |
| 329 | memset(memory_region(machine, "mtbios")+0x8000, 0x00, 0x8000); | |
| 325 | memset(memory_region(machine, "mtbios") + 0x8000, 0x00, 0x8000); | |
| 330 | 326 | memset(memory_region(machine, "maincpu"), 0x00, 0x300000); |
| 331 | 327 | } |
| 332 | 328 | |
| r6049 | r6050 | |
| 342 | 338 | |
| 343 | 339 | // printf("megatech_instr_w %02x\n",data); |
| 344 | 340 | |
| 345 | mt_cart_select_reg = data; | |
| 341 | mtech_bios.mt_cart_select_reg = data; | |
| 346 | 342 | |
| 347 | 343 | |
| 348 | megatech_select_game(space->machine, mt_cart_select_reg); | |
| 344 | megatech_select_game(space->machine, mtech_bios.mt_cart_select_reg); | |
| 349 | 345 | |
| 350 | 346 | /* |
| 351 | if (mt_cart_select_reg==2) | |
| 347 | if (mtech_bios.mtech_bios.mt_cart_select_reg == 2) | |
| 352 | 348 | { |
| 353 | 349 | printf("game 2 selected\n"); |
| 354 | memcpy(memory_region(space->machine, "mtbios")+0x8000, memory_region(space->machine, "inst0"), 0x8000); | |
| 350 | memcpy(memory_region(space->machine, "mtbios") + 0x8000, memory_region(space->machine, "inst0"), 0x8000); | |
| 355 | 351 | } |
| 356 | // else if (mt_cart_select_reg==0) | |
| 352 | // else if (mtech_bios.mt_cart_select_reg == 0) | |
| 357 | 353 | // { |
| 358 | 354 | // printf("game 0 selected\n"); |
| 359 | // memcpy(memory_region(space->machine, "mtbios")+0x8000, memory_region(space->machine, "inst2"), 0x8000); | |
| 355 | // memcpy(memory_region(space->machine, "mtbios") + 0x8000, memory_region(space->machine, "inst2"), 0x8000); | |
| 360 | 356 | // } |
| 361 | else if (mt_cart_select_reg==6) | |
| 357 | else if (mtech_bios.mt_cart_select_reg == 6) | |
| 362 | 358 | { |
| 363 | 359 | printf("game 6 selected\n"); |
| 364 | memcpy(memory_region(space->machine, "mtbios")+0x8000, memory_region(space->machine, "user6"), 0x8000); | |
| 360 | memcpy(memory_region(space->machine, "mtbios") + 0x8000, memory_region(space->machine, "user6"), 0x8000); | |
| 365 | 361 | } |
| 366 | 362 | else |
| 367 | 363 | { |
| 368 | memset(memory_region(space->machine, "mtbios")+0x8000, 0x00, 0x8000); | |
| 364 | memset(memory_region(space->machine, "mtbios" )+ 0x8000, 0x00, 0x8000); | |
| 369 | 365 | } |
| 370 | 366 | */ |
| 371 | 367 | |
| r6049 | r6050 | |
| 378 | 374 | if(offset == 0) |
| 379 | 375 | return 0; |
| 380 | 376 | if(offset == 2) |
| 381 | return bios_ctrl[offset] & 0xfe; | |
| 377 | return mtech_bios.bios_ctrl[offset] & 0xfe; | |
| 382 | 378 | |
| 383 | return bios_ctrl[offset]; | |
| 379 | return mtech_bios.bios_ctrl[offset]; | |
| 384 | 380 | } |
| 385 | 381 | |
| 386 | 382 | static WRITE8_HANDLER( bios_ctrl_w ) |
| 387 | 383 | { |
| 388 | 384 | if(offset == 1) |
| 389 | 385 | { |
| 390 | bios_ctrl_inputs = data & 0x04; // Genesis/SMS input ports disable bit | |
| 386 | mtech_bios.bios_ctrl_inputs = data & 0x04; // Genesis/SMS input ports disable bit | |
| 391 | 387 | } |
| 392 | bios_ctrl[offset] = data; | |
| 388 | mtech_bios.bios_ctrl[offset] = data; | |
| 393 | 389 | } |
| 394 | 390 | |
| 395 | 391 | |
| 396 | static int mt_bank_bank_pos = 0; | |
| 397 | static int mt_bank_partial = 0; | |
| 398 | static int mt_bank_addr = 0; | |
| 399 | ||
| 400 | 392 | /* this sets 0x300000 which may indicate that the 68k can see the instruction rom |
| 401 | 393 | there, this limiting the max game rom capacity to 3meg. */ |
| 402 | 394 | static WRITE8_HANDLER (mt_z80_bank_w) |
| 403 | 395 | { |
| 404 | mt_bank_partial |= (data & 0x01)<<23; // add new bit to partial address | |
| 405 | mt_bank_bank_pos++; | |
| 396 | mtech_bios.mt_bank_partial |= (data & 0x01) << 23; // add new bit to partial address | |
| 397 | mtech_bios.mt_bank_bank_pos++; | |
| 406 | 398 | |
| 407 | if (mt_bank_bank_pos<9) | |
| 399 | if (mtech_bios.mt_bank_bank_pos < 9) | |
| 408 | 400 | { |
| 409 | mt_bank_partial >>= 1; | |
| 401 | mtech_bios.mt_bank_partial >>= 1; | |
| 410 | 402 | } |
| 411 | 403 | else |
| 412 | 404 | { |
| 413 | mt_bank_bank_pos = 0; | |
| 414 | mt_bank_addr = mt_bank_partial; | |
| 415 | mt_bank_partial = 0; | |
| 416 | printf("MT z80 bank set to %08x\n",mt_bank_addr); | |
| 405 | mtech_bios.mt_bank_bank_pos = 0; | |
| 406 | mtech_bios.mt_bank_addr = mtech_bios.mt_bank_partial; | |
| 407 | mtech_bios.mt_bank_partial = 0; | |
| 408 | printf("MT z80 bank set to %08x\n", mtech_bios.mt_bank_addr); | |
| 417 | 409 | |
| 418 | 410 | } |
| 419 | 411 | } |
| 420 | 412 | |
| 421 | 413 | static READ8_HANDLER( megatech_banked_ram_r ) |
| 422 | 414 | { |
| 423 | return megatech_banked_ram[offset + 0x1000 * (mt_cart_select_reg&0x7) | |
| 415 | return megatech_banked_ram[offset + 0x1000 * (mtech_bios.mt_cart_select_reg & 0x07) | |
| 424 | 416 | } |
| 425 | 417 | |
| 426 | 418 | static WRITE8_HANDLER( megatech_banked_ram_w ) |
| 427 | 419 | { |
| 428 | megatech_banked_ram[offset + 0x1000 * (mt_cart_select_reg&0x7) | |
| 420 | megatech_banked_ram[offset + 0x1000 * (mtech_bios.mt_cart_select_reg & 0x07) | |
| 429 | 421 | } |
| 430 | 422 | |
| 431 | 423 | |
| r6049 | r6050 | |
| 450 | 442 | |
| 451 | 443 | static WRITE8_HANDLER (megatech_bios_port_ctrl_w) |
| 452 | 444 | { |
| 453 | bios_port_ctrl = data; | |
| 445 | mtech_bios.bios_port_ctrl = data; | |
| 454 | 446 | } |
| 455 | 447 | |
| 456 | 448 | static READ8_HANDLER (megatech_bios_joypad_r) |
| 457 | 449 | { |
| 458 | return megatech_bios_port_cc_dc_r(space->machine,offset,bios_port_ctrl); | |
| 450 | return megatech_bios_port_cc_dc_r(space->machine, offset, mtech_bios.bios_port_ctrl); | |
| 459 | 451 | } |
| 460 | 452 | |
| 461 | 453 | |
| 462 | 454 | |
| 463 | 455 | static WRITE8_HANDLER (megatech_bios_port_7f_w) |
| 464 | 456 | { |
| 465 | // popmessage("CPU #3: I/O port 0x7F write, data %02x",data); | |
| 457 | // popmessage("CPU #3: I/O port 0x7F write, data %02x", data); | |
| 466 | 458 | } |
| 467 | 459 | |
| 468 | 460 | |
| r6049 | r6050 | |
| 501 | 493 | if (screen == megadriv_screen) |
| 502 | 494 | { |
| 503 | 495 | /* if we're running an sms game then use the SMS update.. maybe this should be moved to the megadrive emulation core as compatibility mode is a feature of the chip */ |
| 504 | if (!current_game_is_sms) VIDEO_UPDATE_CALL(megadriv); | |
| 496 | if (!mtech_bios.current_game_is_sms) VIDEO_UPDATE_CALL(megadriv); | |
| 505 | 497 | else VIDEO_UPDATE_CALL(megatech_md_sms); |
| 506 | 498 | } |
| 507 | 499 | else if (screen == menu_screen) VIDEO_UPDATE_CALL(megatech_bios); |
| r6049 | r6050 | |
| 510 | 502 | |
| 511 | 503 | static VIDEO_EOF(mtnew) |
| 512 | 504 | { |
| 513 | if (!current_game_is_sms) VIDEO_EOF_CALL(megadriv); | |
| 505 | if (!mtech_bios.current_game_is_sms) VIDEO_EOF_CALL(megadriv); | |
| 514 | 506 | else VIDEO_EOF_CALL(megatech_md_sms); |
| 515 | 507 | VIDEO_EOF_CALL(megatech_bios); |
| 516 | 508 | } |
| 517 | 509 | |
| 518 | 510 | static MACHINE_RESET(mtnew) |
| 519 | 511 | { |
| 512 | mtech_bios.mt_bank_bank_pos = 0; | |
| 513 | mtech_bios.mt_bank_partial = 0; | |
| 514 | mtech_bios.mt_bank_addr = 0; | |
| 515 | ||
| 520 | 516 | MACHINE_RESET_CALL(megadriv); |
| 521 | 517 | MACHINE_RESET_CALL(megatech_bios); |
| 522 | 518 | MACHINE_RESET_CALL(megatech_md_sms); |
| r6049 | r6050 | |
|---|---|---|
| 549 | 549 | INPUT_PORTS_END |
| 550 | 550 | |
| 551 | 551 | |
| 552 | static INPUT_PORTS_START( | |
| 552 | static INPUT_PORTS_START( | |
| 553 | 553 | PORT_START("IN0") |
| 554 | 554 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 555 | 555 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 556 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 557 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 558 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 559 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 560 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 561 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 556 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 557 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 558 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 559 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) | |
| 560 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL | |
| 561 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 562 | 562 | |
| 563 | 563 | PORT_START("IN1") |
| 564 | 564 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 565 | 565 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 566 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 567 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 568 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 569 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 566 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 567 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 568 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 569 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL | |
| 570 | 570 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_A ) ) |
| 571 | 571 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) |
| 572 | 572 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) |
| r6049 | r6050 | |
| 575 | 575 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) |
| 576 | 576 | |
| 577 | 577 | PORT_START("IN2") |
| 578 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life ) ) | |
| 579 | PORT_DIPSETTING( 0x00, "15000" ) | |
| 580 | PORT_DIPSETTING( 0x01, "20000" ) | |
| 578 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) /* Likely Bonus Life */ | |
| 579 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 580 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 581 | 581 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) ) |
| 582 | 582 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 583 | 583 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) |
| r6049 | r6050 | |
| 587 | 587 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) |
| 588 | 588 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 589 | 589 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| 590 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 591 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 592 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 593 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 594 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 595 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 596 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 597 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 598 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 599 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 600 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 601 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 602 | INPUT_PORTS_END | |
| 603 | ||
| 604 | ||
| 605 | static INPUT_PORTS_START( pacmanbl ) | |
| 606 | PORT_INCLUDE(articms) | |
| 607 | ||
| 608 | PORT_MODIFY("IN0") | |
| 609 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 610 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 611 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 612 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 613 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 615 | ||
| 616 | PORT_MODIFY("IN1") | |
| 617 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 618 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 619 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 620 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 621 | ||
| 622 | PORT_MODIFY("IN2") | |
| 623 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life ) ) | |
| 624 | PORT_DIPSETTING( 0x00, "15000" ) | |
| 625 | PORT_DIPSETTING( 0x01, "20000" ) | |
| 590 | 626 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 591 | 627 | INPUT_PORTS_END |
| 592 | 628 | |
| 593 | 629 | |
| 630 | static INPUT_PORTS_START( phoenxp2 ) | |
| 631 | PORT_INCLUDE(articms) | |
| 632 | INPUT_PORTS_END | |
| 633 | ||
| 634 | ||
| 635 | static INPUT_PORTS_START( atlantib ) | |
| 636 | PORT_INCLUDE(articms) | |
| 637 | ||
| 638 | PORT_MODIFY("IN1") | |
| 639 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coin_A ) ) /* These are backwards compared to the other sets??? */ | |
| 640 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 641 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 642 | ||
| 643 | PORT_MODIFY("IN2") | |
| 644 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) /* These are backwards compared to the other sets??? */ | |
| 645 | PORT_DIPSETTING( 0x04, "3" ) | |
| 646 | PORT_DIPSETTING( 0x00, "5" ) | |
| 647 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) /* These are backwards compared to the other sets??? */ | |
| 648 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) | |
| 649 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 650 | INPUT_PORTS_END | |
| 651 | ||
| 652 | ||
| 594 | 653 | static INPUT_PORTS_START( devilfsg ) |
| 595 | 654 | PORT_INCLUDE(pacmanbl) |
| 596 | 655 | |
| r6049 | r6050 | |
| 1199 | 1258 | |
| 1200 | 1259 | PORT_MODIFY("IN1") |
| 1201 | 1260 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_noise_r, NULL) /* NOISE line */ |
| 1261 | PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Coinage ) ) | |
| 1262 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) ) | |
| 1263 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) | |
| 1264 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) | |
| 1265 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 1202 | 1266 | |
| 1203 | 1267 | PORT_MODIFY("IN2") |
| 1204 | 1268 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) |
| r6049 | r6050 | |
| 2768 | 2832 | ROM_LOAD( "omega1k.bin", 0x0800, 0x0800, CRC(36de42c6) SHA1(6fd93d439e3b8eab62049f925d9e8f8deeda2ae3) ) |
| 2769 | 2833 | |
| 2770 | 2834 | ROM_REGION( 0x0020, "proms", 0 ) |
| 2771 | ROM_LOAD( "6331-1j.86", 0x0000, 0x0020, | |
| 2835 | ROM_LOAD( "mmi6331-1j.86", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) | |
| 2772 | 2836 | ROM_END |
| 2773 | 2837 | |
| 2774 | 2838 | |
| r6049 | r6050 | |
| 3087 | 3151 | ROM_LOAD( "l06_prom.bin", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) |
| 3088 | 3152 | ROM_END |
| 3089 | 3153 | |
| 3090 | ||
| 3091 | ROM_START( streakng ) | |
| 3092 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3093 | ROM_LOAD( "sk1", 0x0000, 0x1000, CRC(c8866ccb) SHA1(1fc8bc643ecbfa86a50448d79b299f5a3dd586c5) ) | |
| 3094 | ROM_LOAD( "sk2", 0x1000, 0x1000, CRC(7caea29b) SHA1(5b3946ee914b1637db9046abf92d66ceaeb4fc5f) ) | |
| 3095 | ROM_LOAD( "sk3", 0x2000, 0x1000, CRC(7b4bfa76) SHA1(9223bec0c1cc39bc84670869b2a4fab0d0167c6e) ) | |
| 3096 | ROM_LOAD( "sk4", 0x3000, 0x1000, CRC(056fc921) SHA1(de8525571e5a82ddf74dd57b1a6c5bc9f2d2c0fe) ) | |
| 3097 | ||
| 3098 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3099 | ROM_LOAD( "sk5", 0x0000, 0x1000, CRC(d27f1e0c) SHA1(c3b4ae55a93516b034a16c9f943b360b24c933d6) ) | |
| 3100 | ||
| 3101 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3102 | ROM_LOAD( "sk6", 0x0000, 0x1000, CRC(a7089588) SHA1(e76242b043b1d8f060f669da3ddeee3d10122cdb) ) | |
| 3103 | ||
| 3104 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3105 | ROM_LOAD( "sk.bpr", 0x0000, 0x0020, CRC(bce79607) SHA1(49d60fde149240bcd025f721b0fbbbdbc549a42f) ) | |
| 3106 | ROM_END | |
| 3107 | ||
| 3108 | ROM_START( pacmanbl ) /* Galaxian bootleg hardware known as Artic Multi-System */ | |
| 3109 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3110 | ROM_LOAD( "blpac1b", 0x0000, 0x0800, CRC(6718df42) SHA1(ee15c3f583d381fba4878f824f83d04479a0cee5) ) | |
| 3111 | ROM_LOAD( "blpac2b", 0x0800, 0x0800, CRC(33be3648) SHA1(50175889cf37fe8a81c931e009b55d10f8d0444a) ) | |
| 3112 | ROM_LOAD( "blpac3b", 0x1000, 0x0800, CRC(f98c0ceb) SHA1(4faf8b2fb3f109d1196a9ea256328485074a31b9) ) | |
| 3113 | ROM_LOAD( "blpac4b", 0x1800, 0x0800, CRC(a9cd0082) SHA1(f44ff1ad15d5ee3096f8f44f9c605f32ae2737d9) ) | |
| 3114 | ROM_LOAD( "blpac5b", 0x2000, 0x0800, CRC(6d475afc) SHA1(4fe6bde352c7dd9572fefaae4b59640b4f4eb8ba) ) | |
| 3115 | ROM_LOAD( "blpac6b", 0x2800, 0x0800, CRC(cbe863d3) SHA1(97a2ffa6ab33e6061c664dcd1ee57c86a456782f) ) | |
| 3116 | ROM_LOAD( "blpac7b", 0x3000, 0x0800, CRC(7daef758) SHA1(4dc8ec0ea8fc04d5bffc1c1335407729309c17f0) ) | |
| 3117 | ||
| 3118 | /* note from f205v: on the PCB I have, 10b and 11b have been joined into one single 2732 EPROM labeled "pmc31" | |
| 3119 | The same goes for 9b and 12b, joined into one single 2732 EPROM labeled "pmc42" */ | |
| 3120 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3121 | ROM_LOAD( "blpac12b", 0x0000, 0x0800, CRC(b2ed320b) SHA1(680a6fdcb65cc2d88d10bc85e0b2628f43375c5c) ) | |
| 3122 | ROM_LOAD( "blpac11b", 0x0800, 0x0800, CRC(ab88b2c4) SHA1(d0c829ea8021eae81a2b82d36c35ad8258b115e0) ) | |
| 3123 | ||
| 3124 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3125 | ROM_LOAD( "blpac10b", 0x0000, 0x0800, CRC(44a45b72) SHA1(8abd0684a01d6c23ef5cf5f0765458f982316acf) ) | |
| 3126 | ROM_LOAD( "blpac9b", 0x0800, 0x0800, CRC(fa84659f) SHA1(20c212723f9062f052539190dfe3fc41577543eb) ) | |
| 3127 | ||
| 3128 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3129 | ROM_LOAD( "blpaccp", 0x0000, 0x0020, CRC(24652bc4) SHA1(d89575f3749c75dc963317fe451ffeffd9856e4d) ) /* same as pisces */ | |
| 3130 | ROM_END | |
| 3131 | ||
| 3132 | /* content is the same as the above bootleg, but arranged differently in the roms */ | |
| 3133 | ROM_START( pacmanbla ) | |
| 3134 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3135 | ROM_LOAD( "rom1.bin", 0x0000, 0x0800, CRC(75e4f967) SHA1(8bdb5ab2b3f978c578f1498b64bb16d2cb292ef2) ) | |
| 3136 | ROM_CONTINUE(0x2000,0x800) | |
| 3137 | ROM_LOAD( "rom2.bin", 0x0800, 0x0800, CRC(5b2e4293) SHA1(bb925491e315d2e6bb9e756bdf664d173f83cd58) ) | |
| 3138 | ROM_CONTINUE(0x2800,0x800) | |
| 3139 | ROM_LOAD( "rom3.bin", 0x1000, 0x0800, CRC(c06e30a4) SHA1(00d8d114bd4e0b689e75e312c93f6c7b8492426e) ) | |
| 3140 | ROM_CONTINUE(0x3000,0x800) | |
| 3141 | ROM_LOAD( "rom4.bin", 0x1800, 0x0800, CRC(592b4ba8) SHA1(52a559344f70cd8a3a87de71de2bae57c885641a) ) | |
| 3142 | ROM_CONTINUE(0x3800,0x800) | |
| 3143 | ||
| 3144 | ROM_REGION( 0x2000, "tempgfx", 0 ) | |
| 3145 | ROM_LOAD( "rom5.bin", 0x0000, 0x1000, CRC(f2d8c01e) SHA1(d4a5789476fa7859bb936df10590775e97e87578) ) | |
| 3146 | ROM_LOAD( "rom6.bin", 0x1000, 0x1000, CRC(346a1720) SHA1(e152c9161f4e8ef53153b9c4a8ecef9fdbbe2463) ) | |
| 3147 | ||
| 3148 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3149 | ROM_COPY( "tempgfx", 0x0800, 0x0000, 0x0800 ) | |
| 3150 | ROM_COPY( "tempgfx", 0x1800, 0x0800, 0x0800 ) | |
| 3151 | ||
| 3152 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3153 | ROM_COPY( "tempgfx", 0x0000, 0x0000, 0x0800 ) | |
| 3154 | ROM_COPY( "tempgfx", 0x1000, 0x0800, 0x0800 ) | |
| 3155 | ||
| 3156 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3157 | ROM_LOAD( "blpaccp", 0x0000, 0x0020, CRC(24652bc4) SHA1(d89575f3749c75dc963317fe451ffeffd9856e4d) ) /* same as pisces */ | |
| 3158 | ROM_END | |
| 3159 | ||
| 3160 | 3154 | ROM_START( devilfsg ) |
| 3161 | 3155 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 3162 | 3156 | ROM_LOAD( "dfish1.7f", 0x2000, 0x0800, CRC(2ab19698) SHA1(8450981d3cf3fa8abf2fb5487aa98b03a4cf03a1) ) |
| r6049 | r6050 | |
| 3258 | 3252 | ROM_END |
| 3259 | 3253 | |
| 3260 | 3254 | |
| 3255 | /************************************* | |
| 3256 | * | |
| 3257 | * ROM definitions | |
| 3258 | * Artic Multi-System (Galaxian bootleg hardware) | |
| 3259 | * About 20 games were available on this system, some unique! | |
| 3260 | * | |
| 3261 | *************************************/ | |
| 3261 | 3262 | |
| 3263 | ROM_START( streakng ) | |
| 3264 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3265 | ROM_LOAD( "sk1", 0x0000, 0x1000, CRC(c8866ccb) SHA1(1fc8bc643ecbfa86a50448d79b299f5a3dd586c5) ) | |
| 3266 | ROM_LOAD( "sk2", 0x1000, 0x1000, CRC(7caea29b) SHA1(5b3946ee914b1637db9046abf92d66ceaeb4fc5f) ) | |
| 3267 | ROM_LOAD( "sk3", 0x2000, 0x1000, CRC(7b4bfa76) SHA1(9223bec0c1cc39bc84670869b2a4fab0d0167c6e) ) | |
| 3268 | ROM_LOAD( "sk4", 0x3000, 0x1000, CRC(056fc921) SHA1(de8525571e5a82ddf74dd57b1a6c5bc9f2d2c0fe) ) | |
| 3269 | ||
| 3270 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3271 | ROM_LOAD( "sk5", 0x0000, 0x1000, CRC(d27f1e0c) SHA1(c3b4ae55a93516b034a16c9f943b360b24c933d6) ) | |
| 3272 | ||
| 3273 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3274 | ROM_LOAD( "sk6", 0x0000, 0x1000, CRC(a7089588) SHA1(e76242b043b1d8f060f669da3ddeee3d10122cdb) ) | |
| 3275 | ||
| 3276 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3277 | ROM_LOAD( "sk.bpr", 0x0000, 0x0020, CRC(bce79607) SHA1(49d60fde149240bcd025f721b0fbbbdbc549a42f) ) | |
| 3278 | ROM_END | |
| 3279 | ||
| 3280 | ROM_START( pacmanbl ) /* Artic Multi-System */ | |
| 3281 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3282 | ROM_LOAD( "1", 0x0000, 0x0800, CRC(6718df42) SHA1(ee15c3f583d381fba4878f824f83d04479a0cee5) ) | |
| 3283 | ROM_LOAD( "2", 0x0800, 0x0800, CRC(33be3648) SHA1(50175889cf37fe8a81c931e009b55d10f8d0444a) ) | |
| 3284 | ROM_LOAD( "3", 0x1000, 0x0800, CRC(f98c0ceb) SHA1(4faf8b2fb3f109d1196a9ea256328485074a31b9) ) | |
| 3285 | ROM_LOAD( "4", 0x1800, 0x0800, CRC(a9cd0082) SHA1(f44ff1ad15d5ee3096f8f44f9c605f32ae2737d9) ) | |
| 3286 | ROM_LOAD( "5", 0x2000, 0x0800, CRC(6d475afc) SHA1(4fe6bde352c7dd9572fefaae4b59640b4f4eb8ba) ) | |
| 3287 | ROM_LOAD( "6", 0x2800, 0x0800, CRC(cbe863d3) SHA1(97a2ffa6ab33e6061c664dcd1ee57c86a456782f) ) | |
| 3288 | ROM_LOAD( "7", 0x3000, 0x0800, CRC(7daef758) SHA1(4dc8ec0ea8fc04d5bffc1c1335407729309c17f0) ) | |
| 3289 | /* 0x3800, 0x0800 not populated */ | |
| 3290 | ||
| 3291 | /* note from f205v: on the PCB I have, 10b and 11b have been joined into one single 2732 EPROM labeled "pmc31" | |
| 3292 | The same goes for 9b and 12b, joined into one single 2732 EPROM labeled "pmc42" */ | |
| 3293 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3294 | ROM_LOAD( "12", 0x0000, 0x0800, CRC(b2ed320b) SHA1(680a6fdcb65cc2d88d10bc85e0b2628f43375c5c) ) | |
| 3295 | ROM_LOAD( "11", 0x0800, 0x0800, CRC(ab88b2c4) SHA1(d0c829ea8021eae81a2b82d36c35ad8258b115e0) ) | |
| 3296 | ||
| 3297 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3298 | ROM_LOAD( "10", 0x0000, 0x0800, CRC(44a45b72) SHA1(8abd0684a01d6c23ef5cf5f0765458f982316acf) ) | |
| 3299 | ROM_LOAD( "9", 0x0800, 0x0800, CRC(fa84659f) SHA1(20c212723f9062f052539190dfe3fc41577543eb) ) | |
| 3300 | ||
| 3301 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3302 | ROM_LOAD( "sn74s288n.6l", 0x0000, 0x0020, CRC(24652bc4) SHA1(d89575f3749c75dc963317fe451ffeffd9856e4d) ) /* same as pisces */ | |
| 3303 | ROM_END | |
| 3304 | ||
| 3305 | ROM_START( pacmanbla ) /* content is the same as the above bootleg, but arranged differently in the roms */ | |
| 3306 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3307 | ROM_LOAD( "rom1.bin", 0x0000, 0x0800, CRC(75e4f967) SHA1(8bdb5ab2b3f978c578f1498b64bb16d2cb292ef2) ) | |
| 3308 | ROM_CONTINUE(0x2000,0x800) | |
| 3309 | ROM_LOAD( "rom2.bin", 0x0800, 0x0800, CRC(5b2e4293) SHA1(bb925491e315d2e6bb9e756bdf664d173f83cd58) ) | |
| 3310 | ROM_CONTINUE(0x2800,0x800) | |
| 3311 | ROM_LOAD( "rom3.bin", 0x1000, 0x0800, CRC(c06e30a4) SHA1(00d8d114bd4e0b689e75e312c93f6c7b8492426e) ) | |
| 3312 | ROM_CONTINUE(0x3000,0x800) | |
| 3313 | ROM_LOAD( "rom4.bin", 0x1800, 0x0800, CRC(592b4ba8) SHA1(52a559344f70cd8a3a87de71de2bae57c885641a) ) | |
| 3314 | ROM_CONTINUE(0x3800,0x800) | |
| 3315 | ||
| 3316 | ROM_REGION( 0x2000, "tempgfx", 0 ) | |
| 3317 | ROM_LOAD( "rom5.bin", 0x0000, 0x1000, CRC(f2d8c01e) SHA1(d4a5789476fa7859bb936df10590775e97e87578) ) | |
| 3318 | ROM_LOAD( "rom6.bin", 0x1000, 0x1000, CRC(346a1720) SHA1(e152c9161f4e8ef53153b9c4a8ecef9fdbbe2463) ) | |
| 3319 | ||
| 3320 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3321 | ROM_COPY( "tempgfx", 0x0800, 0x0000, 0x0800 ) | |
| 3322 | ROM_COPY( "tempgfx", 0x1800, 0x0800, 0x0800 ) | |
| 3323 | ||
| 3324 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3325 | ROM_COPY( "tempgfx", 0x0000, 0x0000, 0x0800 ) | |
| 3326 | ROM_COPY( "tempgfx", 0x1000, 0x0800, 0x0800 ) | |
| 3327 | ||
| 3328 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3329 | ROM_LOAD( "sn74s288n.6l", 0x0000, 0x0020, CRC(24652bc4) SHA1(d89575f3749c75dc963317fe451ffeffd9856e4d) ) /* same as pisces */ | |
| 3330 | ROM_END | |
| 3331 | ||
| 3332 | ROM_START( phoenxp2 ) /* Artic Multi-System */ | |
| 3333 | /* Large birds never appeared 'whole' even when they were displayed correctly on real hardware, this may be a rom error, or something else. */ | |
| 3334 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3335 | ROM_LOAD( "1", 0x0000, 0x0800, CRC(f6dcfd51) SHA1(8475726dbbf0dd13581f457a5379956424dc2862) ) | |
| 3336 | ROM_LOAD( "2", 0x0800, 0x0800, CRC(de951936) SHA1(657d2c595a5864d8c9a51926ab7bfa0a7068e2b2) ) | |
| 3337 | ROM_LOAD( "3", 0x1000, 0x0800, CRC(7a3af2da) SHA1(49e9ad7115e71839d1d027552d08c7831a617b4a) ) | |
| 3338 | ROM_LOAD( "4", 0x1800, 0x0800, CRC(c820ad32) SHA1(b5286d49f6578dfeffdf429e7d52321f4813e03c) ) | |
| 3339 | ROM_LOAD( "5", 0x2000, 0x0800, CRC(08e83233) SHA1(44159e0f3fb717b726b6b5c77da32391c1cdd04d) ) | |
| 3340 | ROM_LOAD( "6", 0x2800, 0x0800, CRC(f31fb9d6) SHA1(bdfb5427869940ed6b8e2667a6c1f410a9a41b87) ) | |
| 3341 | ROM_LOAD( "7", 0x3000, 0x0800, CRC(d3a480c1) SHA1(d1e4fe83b49f918285009f09df38c6555a686823) ) | |
| 3342 | ROM_LOAD( "8", 0x3800, 0x0800, CRC(edf9779e) SHA1(c1e7307c59f15bebac3e29b41135fe9f18fc9a06) ) | |
| 3343 | ||
| 3344 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3345 | ROM_LOAD( "10", 0x0000, 0x0800, CRC(9b570016) SHA1(44fd2b1caeecdc5200d63c35636f0a605943d30c) ) | |
| 3346 | ROM_LOAD( "9", 0x0800, 0x0800, CRC(1a657b1f) SHA1(42149dafdde7d9104f0bddda2223bfc211d0154a) ) | |
| 3347 | ||
| 3348 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3349 | ROM_LOAD( "12", 0x0000, 0x0800, BAD_DUMP CRC(73956244) SHA1(e464b587b5ed636816cc9688593f5b6005cb5216) ) /* possible bad_dump... seems to be missing graphics */ | |
| 3350 | ROM_LOAD( "11", 0x0800, 0x0800, CRC(7a2b48e5) SHA1(f559799c685dd2cb9de06a356bee95b7d6ffadfc) ) | |
| 3351 | ||
| 3352 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3353 | ROM_LOAD( "sn74s288n.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) /* same as 'Omega' */ | |
| 3354 | ROM_END | |
| 3355 | ||
| 3356 | ROM_START( atlantisb ) /* Artic Multi-System */ | |
| 3357 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 3358 | ROM_LOAD( "1", 0x0000, 0x0800, CRC(2b612351) SHA1(cfd244946190c062146716c0417c35be216943e4) ) /* aka "subfury" */ | |
| 3359 | ROM_LOAD( "2", 0x0800, 0x0800, CRC(b1c970e9) SHA1(1e12a1d34453b01ff5ef4d9530a90f476fc34631) ) | |
| 3360 | /* 0x1000, 0x0800 not populated */ | |
| 3361 | ROM_LOAD( "3", 0x1800, 0x0800, CRC(63c3783e) SHA1(e3a7a8bb2c108d3e1e1403017c72963afcd23813) ) | |
| 3362 | ROM_LOAD( "4", 0x2000, 0x0800, CRC(45f7cf34) SHA1(d1e0e0be6dec377b684625bdfdc5a3a8af847492) ) | |
| 3363 | ROM_LOAD( "5", 0x2800, 0x0800, CRC(f335b96b) SHA1(17daa6d9bc916081f3c6cbdfe5b4960177dc7c9b) ) | |
| 3364 | ROM_LOAD( "6", 0x3000, 0x0800, CRC(a50bf8d5) SHA1(5bca98e1c0838d27ec66bf4b906877977b212b6d) ) | |
| 3365 | /* 0x3800, 0x0800 not populated */ | |
| 3366 | ||
| 3367 | ROM_REGION( 0x1000, "gfx1", 0 ) | |
| 3368 | ROM_LOAD( "8", 0x0000, 0x0800, CRC(55cd5acd) SHA1(b3e2ce71d4e48255d44cd451ee015a7234a108c8) ) | |
| 3369 | ROM_LOAD( "7", 0x0800, 0x0800, CRC(72e773b8) SHA1(6ce178df3bd6a4177c68761572a13a56d222c48f) ) | |
| 3370 | ||
| 3371 | ROM_REGION( 0x1000, "gfx2", 0 ) | |
| 3372 | /* 0x000, 0x0800 not populated */ | |
| 3373 | /* 0x000, 0x0800 not populated */ | |
| 3374 | ||
| 3375 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 3376 | ROM_LOAD( "sn74s288n.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) | |
| 3377 | ROM_END | |
| 3378 | ||
| 3379 | ||
| 3262 | 3380 | /************************************* |
| 3263 | 3381 | * |
| 3264 | 3382 | * ROM definitions |
| r6049 | r6050 | |
| 4032 | 4150 | |
| 4033 | 4151 | ROM_START( froggers1 ) |
| 4034 | 4152 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 4035 | ROM_LOAD( "frogger.26", 0x0000, 0x1000, CRC(597696d6) SHA1(e7e021776cad00f095a1ebbef407b7c0a8f5d835) ) | |
| 4153 | ROM_LOAD( "frogger.26", 0x0000, 0x1000, CRC(597696d6) SHA1(e7e021776cad00f095a1ebbef407b7c0a8f5d835) ) /* We need the correct Sega "EPR" labels for these 3 */ | |
| 4036 | 4154 | ROM_LOAD( "frogger.27", 0x1000, 0x1000, CRC(b6e6fcc3) SHA1(5e8692f2b0c7f4b3642b3ee6670e1c3b20029cdc) ) |
| 4037 | 4155 | ROM_LOAD( "frogger.34", 0x2000, 0x1000, CRC(ed866bab) SHA1(24e1bbde44eb5480b7a0570fa0dc1de388cb95ba) ) |
| 4038 | 4156 | |
| 4039 | 4157 | ROM_REGION( 0x10000, "audiocpu", 0 ) |
| 4040 | ROM_LOAD( "frogger.608", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) | |
| 4041 | ROM_LOAD( "frogger.609", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) | |
| 4042 | ROM_LOAD( "frogger.610", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) | |
| 4158 | ROM_LOAD( "epr-608.ic32", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) | |
| 4159 | ROM_LOAD( "epr-609.ic33", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) | |
| 4160 | ROM_LOAD( "epr-610.ic34", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) | |
| 4043 | 4161 | |
| 4044 | 4162 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 4045 | ROM_LOAD( "frogger.607", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) | |
| 4046 | ROM_LOAD( "frogger.606", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) ) | |
| 4163 | ROM_LOAD( "epr-607.ic101", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) | |
| 4164 | ROM_LOAD( "epr-606.ic102", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) ) | |
| 4047 | 4165 | |
| 4048 | 4166 | ROM_REGION( 0x0020, "proms", 0 ) |
| 4049 | 4167 | ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) |
| r6049 | r6050 | |
| 4051 | 4169 | |
| 4052 | 4170 | ROM_START( froggers2 ) |
| 4053 | 4171 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 4054 | ROM_LOAD( "frogger.ic5", 0x0000, 0x1000, CRC(efab0c79) SHA1(68c99b6cdcb9396bb473739a62ffc009b4bf57d5) ) | |
| 4055 | ROM_LOAD( "frogger.ic6", 0x1000, 0x1000, CRC(aeca9c13) SHA1(cdf560adbd7f2813e86e378da7781cccf7928a44) ) | |
| 4056 | ROM_LOAD( "frogger.ic7", 0x2000, 0x1000, CRC(dd251066) SHA1(4612e1fe1ab7182a277140b1a1976cc17e0746a5) ) | |
| 4057 | ROM_LOAD( "frogger.ic8", 0x3000, 0x1000, CRC(bf293a02) SHA1(be94e9f5caa74c3de6fd95bd20928f4a9c514227) ) | |
| 4172 | ROM_LOAD( "epr-1012.ic5", 0x0000, 0x1000, CRC(efab0c79) SHA1(68c99b6cdcb9396bb473739a62ffc009b4bf57d5) ) | |
| 4173 | ROM_LOAD( "epr-1013.ic6", 0x1000, 0x1000, CRC(aeca9c13) SHA1(cdf560adbd7f2813e86e378da7781cccf7928a44) ) | |
| 4174 | ROM_LOAD( "epr-1014.ic7", 0x2000, 0x1000, CRC(dd251066) SHA1(4612e1fe1ab7182a277140b1a1976cc17e0746a5) ) | |
| 4175 | ROM_LOAD( "epr-1018.ic8", 0x3000, 0x1000, CRC(bf293a02) SHA1(be94e9f5caa74c3de6fd95bd20928f4a9c514227) ) | |
| 4058 | 4176 | |
| 4059 | 4177 | ROM_REGION( 0x10000, "audiocpu", 0 ) |
| 4060 | ROM_LOAD( "frogger.608", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) | |
| 4061 | ROM_LOAD( "frogger.609", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) | |
| 4062 | ROM_LOAD( "frogger.610", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) | |
| 4178 | ROM_LOAD( "epr-608.ic32", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) | |
| 4179 | ROM_LOAD( "epr-609.ic33", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) | |
| 4180 | ROM_LOAD( "epr-610.ic34", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) | |
| 4063 | 4181 | |
| 4064 | 4182 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 4065 | ROM_LOAD( "frogger.607", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) | |
| 4066 | ROM_LOAD( "frogger.606", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) ) | |
| 4183 | ROM_LOAD( "epr-607.ic101", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) | |
| 4184 | ROM_LOAD( "epr-606.ic102", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) ) | |
| 4067 | 4185 | |
| 4068 | 4186 | ROM_REGION( 0x0020, "proms", 0 ) |
| 4069 | 4187 | ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) |
| r6049 | r6050 | |
| 4081 | 4199 | ROM_LOAD( "epr-1035.43", 0x1000, 0x0800, CRC(14e74148) SHA1(0023394e971f191c41ff20b47835f1dafb924d15) ) |
| 4082 | 4200 | |
| 4083 | 4201 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 4084 | ROM_LOAD( "frogger.607", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) | |
| 4202 | ROM_LOAD( "frogger.607", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) /* We need the correct Sega "EPR" label for this one */ | |
| 4085 | 4203 | ROM_LOAD( "epr-1036.1k", 0x0800, 0x0800, CRC(658745f8) SHA1(e4e5c3e011c8a7233a36d29e10e08905873500aa) ) |
| 4086 | 4204 | |
| 4087 | 4205 | ROM_REGION( 0x0020, "proms", 0 ) |
| r6049 | r6050 | |
| 5153 | 5271 | /* similar to pisces, but with different video banking characteristics */ |
| 5154 | 5272 | GAME( 1981, batman2, phoenix, galaxian, batman2, batman2, ROT270, "bootleg", "Batman Part 2", GAME_SUPPORTS_SAVE ) |
| 5155 | 5273 | |
| 5156 | /* separate tile/sprite ROMs */ | |
| 5274 | /* Artic Multi-System games - separate tile/sprite ROMs */ | |
| 5157 | 5275 | GAME( 1981, streakng, 0, pacmanbl, streakng, galaxian, ROT90, "Shoei", "Streaking", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 5158 | 5276 | GAME( 1981, pacmanbl, puckman, pacmanbl, pacmanbl, pacmanbl, ROT270, "bootleg", "Pac-Man (Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE ) |
| 5159 | 5277 | GAME( 1981, pacmanbla,puckman, pacmanbl, pacmanbl, pacmanbl, ROT270, "bootleg", "Pac-Man (Galaxian hardware, set 2)", GAME_SUPPORTS_SAVE ) |
| 5278 | GAME( 1981, phoenxp2, 0, pacmanbl, phoenxp2, galaxian, ROT270, "bootleg", "Phoenix Part 2", GAME_SUPPORTS_SAVE ) | |
| 5279 | GAME( 1981, atlantisb,atlantis, galaxian, atlantib, galaxian, ROT270, "bootleg", "Battle of Atlantis (bootleg)", GAME_SUPPORTS_SAVE ) // I don't know if this should have a starfield... | |
| 5160 | 5280 | |
| 5161 | 5281 | /* separate tile/sprite ROMs, plus INT instead of NMI */ |
| 5162 | 5282 | GAME( 1984, devilfsg, devilfsh, pacmanbl, devilfsg, devilfsg, ROT270, "Vision / Artic", "Devil Fish (Galaxian hardware, bootleg?)", GAME_SUPPORTS_SAVE ) |
| r6049 | r6050 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | Supported games : |
| 14 | 14 | ================== |
| 15 | Syvalion (C) 1988 Taito | |
| 16 | Record Breaker (C) 1988 Taito | |
| 17 | Dynamite League (C) 1990 Taito | |
| 15 | Syvalion (C) 1988 Taito | |
| 16 | Record Breaker / Go For The Gold (C) 1988 Taito | |
| 17 | Dynamite League (C) 1990 Taito | |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | System specs : |
| r6049 | r6050 | |
| 67 | 67 | (see code at 0x002af8). Another write to this address is done at 0x002a96. |
| 68 | 68 | |
| 69 | 69 | |
| 70 | 2) 'recordbr' | |
| 70 | 2) 'recordbr' and 'gogold' | |
| 71 | 71 | |
| 72 | 72 | - Region stored at 0x07fffe.w |
| 73 | - Title stored at 0x07ff9a.w : | |
| 74 | * 0x0000 : "Go For The Gold" | |
| 75 | * 0x0001 : "Recordbreaker" | |
| 73 | 76 | - Sets : |
| 74 | * 'recordbr' : region = 0x0003 | |
| 77 | * 'recordbr' : region = 0x0003 and title = 0x0001 | |
| 78 | * 'gogold' : region = 0x0001 and title = 0x0000 | |
| 75 | 79 | - Coinage relies on the region (code at 0x00144a) : |
| 76 | * 0x0001 (Japan), 0x0002 (US), 0x0005 (US, Romstar licence) use TAITO_COINAGE_JAPAN_OLD | |
| 80 | * 0x0001 (Japan), 0x0002 (US), 0x0005 (World, Romstar licence) and | |
| 81 | 0x0006 (US, Romstar licence) use TAITO_COINAGE_JAPAN_OLD | |
| 77 | 82 | * 0x0003 (World), 0x0004 (licenced to xxx) and |
| 78 | 83 | 0x0007 (licenced to PHOENIX ELECTRONICS CO.) use TAITO_COINAGE_WORLD |
| 79 | - Notice screen only if region = 0x0001 | |
| 84 | - Notice screen only if region = 0x0000 or region = 0x0001 | |
| 80 | 85 | |
| 86 | - Debug Mode (from Shimapong) | |
| 87 | 1. Hold Service Switch at boot (key "9") | |
| 88 | 2. Input the following sequence at the "Service Switch Error" message screen: | |
| 89 | 1P Start, 1P Start, 1P Start, Service Switch, 1P Start | |
| 81 | 90 | |
| 91 | ||
| 82 | 92 | 3) 'dleague' |
| 83 | 93 | |
| 84 | 94 | - Region stored at 0x05fffe.w |
| r6049 | r6050 | |
| 122 | 132 | Recordbr: missing hand of opponent when he ends in swimming |
| 123 | 133 | race and you're still on the blocks. Bug? |
| 124 | 134 | |
| 125 | Recordbr: loads of unmapped IOC reads and writes. | |
| 135 | Recordbr: loads of unmapped IOC reads and writes. Need to map Player 3 & 4 controls. | |
| 126 | 136 | |
| 137 | what is the rom loaded into region user1? (see go gold / dynamite league) | |
| 138 | some kind of zoom table? | |
| 139 | ||
| 127 | 140 | ****************************************************************************/ |
| 128 | 141 | |
| 129 | 142 | |
| r6049 | r6050 | |
| 414 | 427 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* IPT_BUTTON4 (PL2) in service mode */ |
| 415 | 428 | INPUT_PORTS_END |
| 416 | 429 | |
| 430 | ||
| 431 | static INPUT_PORTS_START( gogold ) | |
| 432 | PORT_INCLUDE(recordbr) | |
| 433 | ||
| 434 | PORT_MODIFY("DSWA") | |
| 435 | TAITO_COINAGE_JAPAN_OLD | |
| 436 | INPUT_PORTS_END | |
| 437 | ||
| 417 | 438 | static INPUT_PORTS_START( dleague ) |
| 418 | 439 | /* 0x200000 -> 0x100526.b ($526,A5) */ |
| 419 | 440 | PORT_START("DSWA") |
| r6049 | r6050 | |
| 503 | 524 | |
| 504 | 525 | static GFXDECODE_START( dleague ) |
| 505 | 526 | GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 32 ) |
| 506 | GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32*16, 16 ) // seems to be bogus...? | |
| 507 | 527 | GFXDECODE_END |
| 508 | 528 | |
| 509 | 529 | |
| r6049 | r6050 | |
| 688 | 708 | |
| 689 | 709 | ROM_START( recordbr ) |
| 690 | 710 | ROM_REGION( 0x80000, "maincpu", 0 ) /* main cpu */ |
| 691 | ROM_LOAD16_BYTE( "b56-17.rom", 0x00000, 0x20000, CRC(3e0a9c35) SHA1(900a741b2abbbbe883b9d78162a88b4397af1a56) ) | |
| 692 | ROM_LOAD16_BYTE( "b56-16.rom", 0x00001, 0x20000, CRC(b447f12c) SHA1(58ee30337836f260c7fbda728dac93f06d861ec4) ) | |
| 693 | ROM_LOAD16_BYTE( "b56-15.rom", 0x40000, 0x20000, CRC(b346e282) SHA1(f6b4a2e9093a33d19c2eaf3ef9801179f39a83a3) ) | |
| 694 | ROM_LOAD16_BYTE( "b56-21.rom", 0x40001, 0x20000, CRC(e5f63790) SHA1(b81db7690a989146c438609d9633ddcb1fd219dd) ) | |
| 711 | ROM_LOAD16_BYTE( "b56-17.bin", 0x00000, 0x20000, CRC(3e0a9c35) SHA1(900a741b2abbbbe883b9d78162a88b4397af1a56) ) | |
| 712 | ROM_LOAD16_BYTE( "b56-16.bin", 0x00001, 0x20000, CRC(b447f12c) SHA1(58ee30337836f260c7fbda728dac93f06d861ec4) ) | |
| 713 | ROM_LOAD16_BYTE( "b56-15.bin", 0x40000, 0x20000, CRC(b346e282) SHA1(f6b4a2e9093a33d19c2eaf3ef9801179f39a83a3) ) | |
| 714 | ROM_LOAD16_BYTE( "b56-21.bin", 0x40001, 0x20000, CRC(e5f63790) SHA1(b81db7690a989146c438609d9633ddcb1fd219dd) ) | |
| 695 | 715 | |
| 696 | 716 | ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */ |
| 697 | ROM_LOAD( "b56-19. | |
| 717 | ROM_LOAD( "b56-19.bin", 0x00000, 0x04000, CRC(c68085ee) SHA1(78634216a622a08c20dae0422283c4a7ed360546) ) | |
| 698 | 718 | ROM_CONTINUE( 0x10000, 0x0c000 ) |
| 699 | 719 | |
| 700 | 720 | ROM_REGION( 0x400000, "gfx1", 0 ) |
| 701 | ROM_LOAD16_BYTE( "b56-04", 0x000000, 0x20000, CRC(f7afdff0) SHA1(8f8ea0e8da20913426ff3b58d7bb63bd352d3fb4) ) | |
| 702 | ROM_LOAD16_BYTE( "b56-08", 0x000001, 0x20000, CRC(c9f0d38a) SHA1(aa22f1a06e00f90c546eebcd8b42da3e3c7d0781) ) | |
| 703 | ROM_LOAD16_BYTE( "b56-03", 0x100000, 0x20000, CRC(4045fd44) SHA1(a84be9eedba7aed30d4f2841016784f8024d9443) ) | |
| 704 | ROM_LOAD16_BYTE( "b56-07", 0x100001, 0x20000, CRC(0c76e4c8) SHA1(e50d1bd6e8ec967ba03bd14097a9bd560aa2decc) ) | |
| 705 | ROM_LOAD16_BYTE( "b56-02", 0x200000, 0x20000, CRC(68c604ec) SHA1(75b26bfa53efa63b9c7a026f4226213364550cad) ) | |
| 706 | ROM_LOAD16_BYTE( "b56-06", 0x200001, 0x20000, CRC(5fbcd302) SHA1(22e7d835643945d501edc693dbe4efc8d4d074a7) ) | |
| 707 | ROM_LOAD16_BYTE( "b56-01.rom", 0x300000, 0x20000, CRC(766b7260) SHA1(f7d7176af614f06e8c66e890e4d194ffb6f7af73) ) | |
| 708 | ROM_LOAD16_BYTE( "b56-05.rom", 0x300001, 0x20000, CRC(ed390378) SHA1(0275e5ead206028bfcff7ecbe11c7ab961e648ea) ) | |
| 721 | ROM_LOAD16_BYTE( "b56-04.bin", 0x000000, 0x20000, CRC(f7afdff0) SHA1(8f8ea0e8da20913426ff3b58d7bb63bd352d3fb4) ) | |
| 722 | ROM_LOAD16_BYTE( "b56-08.bin", 0x000001, 0x20000, CRC(c9f0d38a) SHA1(aa22f1a06e00f90c546eebcd8b42da3e3c7d0781) ) | |
| 723 | ROM_LOAD16_BYTE( "b56-03.bin", 0x100000, 0x20000, CRC(4045fd44) SHA1(a84be9eedba7aed30d4f2841016784f8024d9443) ) | |
| 724 | ROM_LOAD16_BYTE( "b56-07.bin", 0x100001, 0x20000, CRC(0c76e4c8) SHA1(e50d1bd6e8ec967ba03bd14097a9bd560aa2decc) ) | |
| 725 | ROM_LOAD16_BYTE( "b56-02.bin", 0x200000, 0x20000, CRC(68c604ec) SHA1(75b26bfa53efa63b9c7a026f4226213364550cad) ) | |
| 726 | ROM_LOAD16_BYTE( "b56-06.bin", 0x200001, 0x20000, CRC(5fbcd302) SHA1(22e7d835643945d501edc693dbe4efc8d4d074a7) ) | |
| 727 | ROM_LOAD16_BYTE( "b56-01.bin", 0x300000, 0x20000, CRC(766b7260) SHA1(f7d7176af614f06e8c66e890e4d194ffb6f7af73) ) | |
| 728 | ROM_LOAD16_BYTE( "b56-05.bin", 0x300001, 0x20000, CRC(ed390378) SHA1(0275e5ead206028bfcff7ecbe11c7ab961e648ea) ) | |
| 709 | 729 | |
| 710 | 730 | ROM_REGION( 0x80000, "ym.deltat", 0 ) /* samples */ |
| 711 | 731 | ROM_LOAD( "b56-09.bin", 0x00000, 0x80000, CRC(7fd9ee68) SHA1(edc4455b3f6a6f30f418d03c6e53af875542a325) ) |
| 712 | 732 | |
| 713 | 733 | ROM_REGION( 0x80000, "ym", 0 ) /* samples */ |
| 714 | 734 | ROM_LOAD( "b56-10.bin", 0x00000, 0x80000, CRC(de1bce59) SHA1(aa3aea30d6f53e60d9a0d4ec767e1b261d5efc8a) ) |
| 735 | ||
| 736 | ROM_REGION( 0x02000, "user1", 0 ) /* zoom table / mixing? */ | |
| 737 | ROM_LOAD( "b56-18.bin", 0x00000, 0x02000, CRC(c88f0bbe) SHA1(18c87c744fbeca35d13033e50f62e5383eb4ec2c) ) | |
| 715 | 738 | ROM_END |
| 716 | 739 | |
| 740 | ROM_START( gogold ) | |
| 741 | ROM_REGION( 0x80000, "maincpu", 0 ) /* main cpu */ | |
| 742 | ROM_LOAD16_BYTE( "b56-17.bin", 0x00000, 0x20000, CRC(3e0a9c35) SHA1(900a741b2abbbbe883b9d78162a88b4397af1a56) ) | |
| 743 | ROM_LOAD16_BYTE( "b56-16.bin", 0x00001, 0x20000, CRC(b447f12c) SHA1(58ee30337836f260c7fbda728dac93f06d861ec4) ) | |
| 744 | ROM_LOAD16_BYTE( "b56-15.bin", 0x40000, 0x20000, CRC(b346e282) SHA1(f6b4a2e9093a33d19c2eaf3ef9801179f39a83a3) ) | |
| 745 | ROM_LOAD16_BYTE( "b56-14.bin", 0x40001, 0x20000, CRC(b6c195b9) SHA1(80541d9a686fdc1850d764d8e00ba03526e7174c) ) | |
| 746 | ||
| 747 | ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */ | |
| 748 | ROM_LOAD( "b56-19.bin", 0x00000, 0x04000, CRC(c68085ee) SHA1(78634216a622a08c20dae0422283c4a7ed360546) ) | |
| 749 | ROM_CONTINUE( 0x10000, 0x0c000 ) | |
| 750 | ||
| 751 | ROM_REGION( 0x400000, "gfx1", 0 ) | |
| 752 | ROM_LOAD16_BYTE( "b56-04.bin", 0x000000, 0x20000, CRC(f7afdff0) SHA1(8f8ea0e8da20913426ff3b58d7bb63bd352d3fb4) ) | |
| 753 | ROM_LOAD16_BYTE( "b56-08.bin", 0x000001, 0x20000, CRC(c9f0d38a) SHA1(aa22f1a06e00f90c546eebcd8b42da3e3c7d0781) ) | |
| 754 | ROM_LOAD16_BYTE( "b56-03.bin", 0x100000, 0x20000, CRC(4045fd44) SHA1(a84be9eedba7aed30d4f2841016784f8024d9443) ) | |
| 755 | ROM_LOAD16_BYTE( "b56-07.bin", 0x100001, 0x20000, CRC(0c76e4c8) SHA1(e50d1bd6e8ec967ba03bd14097a9bd560aa2decc) ) | |
| 756 | ROM_LOAD16_BYTE( "b56-02.bin", 0x200000, 0x20000, CRC(68c604ec) SHA1(75b26bfa53efa63b9c7a026f4226213364550cad) ) | |
| 757 | ROM_LOAD16_BYTE( "b56-06.bin", 0x200001, 0x20000, CRC(5fbcd302) SHA1(22e7d835643945d501edc693dbe4efc8d4d074a7) ) | |
| 758 | ROM_LOAD16_BYTE( "b56-01.bin", 0x300000, 0x20000, CRC(766b7260) SHA1(f7d7176af614f06e8c66e890e4d194ffb6f7af73) ) | |
| 759 | ROM_LOAD16_BYTE( "b56-05.bin", 0x300001, 0x20000, CRC(ed390378) SHA1(0275e5ead206028bfcff7ecbe11c7ab961e648ea) ) | |
| 760 | ||
| 761 | ROM_REGION( 0x80000, "ym.deltat", 0 ) /* samples */ | |
| 762 | ROM_LOAD( "b56-09.bin", 0x00000, 0x80000, CRC(7fd9ee68) SHA1(edc4455b3f6a6f30f418d03c6e53af875542a325) ) | |
| 763 | ||
| 764 | ROM_REGION( 0x80000, "ym", 0 ) /* samples */ | |
| 765 | ROM_LOAD( "b56-10.bin", 0x00000, 0x80000, CRC(de1bce59) SHA1(aa3aea30d6f53e60d9a0d4ec767e1b261d5efc8a) ) | |
| 766 | ||
| 767 | ROM_REGION( 0x02000, "user1", 0 ) /* zoom table / mixing? */ | |
| 768 | ROM_LOAD( "b56-18.bin", 0x00000, 0x02000, CRC(c88f0bbe) SHA1(18c87c744fbeca35d13033e50f62e5383eb4ec2c) ) | |
| 769 | ROM_END | |
| 770 | ||
| 717 | 771 | ROM_START( dleague ) |
| 718 | 772 | ROM_REGION( 0x60000, "maincpu", 0 ) |
| 719 | 773 | ROM_LOAD16_BYTE( "c02-19a.33", 0x00000, 0x20000, CRC(7e904e45) SHA1(04ac470c973753e71fba3998099a88ab0e6fcbab) ) |
| r6049 | r6050 | |
| 739 | 793 | ROM_LOAD16_BYTE( "c02-09.9", 0x380000, 0x20000, CRC(a614d234) SHA1(dc68a6a8cf89ab82edc571853249643aa304d37f) ) |
| 740 | 794 | ROM_LOAD16_BYTE( "c02-13.20", 0x380001, 0x20000, CRC(8eb3194d) SHA1(98290f77a03826cdf7c8238dd35da1f9349d5cf5) ) |
| 741 | 795 | |
| 742 | ROM_REGION( 0x02000, " | |
| 796 | ROM_REGION( 0x02000, "user1", 0 ) /* zoom table / mixing? */ | |
| 743 | 797 | ROM_LOAD( "c02-18.22", 0x00000, 0x02000, CRC(c88f0bbe) SHA1(18c87c744fbeca35d13033e50f62e5383eb4ec2c) ) |
| 744 | 798 | |
| 745 | 799 | ROM_REGION( 0x80000, "ym", 0 ) /* samples */ |
| r6049 | r6050 | |
| 750 | 804 | /* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME */ |
| 751 | 805 | GAME( 1988, syvalion, 0, syvalion, syvalion, 0, ROT0, "Taito Corporation", "Syvalion (Japan)", 0 ) |
| 752 | 806 | GAME( 1988, recordbr, 0, recordbr, recordbr, 0, ROT0, "Taito Corporation Japan", "Recordbreaker (World)", 0 ) |
| 807 | GAME( 1988, gogold, recordbr, recordbr, gogold, 0, ROT0, "Taito Corporation", "Go For The Gold (Japan)", 0 ) | |
| 753 | 808 | GAME( 1990, dleague, 0, dleague, dleague, 0, ROT0, "Taito Corporation", "Dynamite League (Japan)", 0 ) |
| r6049 | r6050 | |
|---|---|---|
| 1 | ||
| 2 | 1 | /* |
| 3 | 2 | |
| 4 | 3 | Sun Mixing board, looks like a hacked up Genesis clone. |
| r6049 | r6050 | |
| 139 | 138 | #include "sound/sn76496.h" |
| 140 | 139 | #include "sound/2612intf.h" |
| 141 | 140 | |
| 142 | #include " | |
| 141 | #include "megadriv.h" | |
| 143 | 142 | |
| 144 | ||
| 145 | 143 | static INPUT_PORTS_START( topshoot ) /* Top Shooter Input Ports */ |
| 146 | 144 | PORT_START("IN0") /* 16bit */ |
| 147 | 145 | PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) |
| r6049 | r6050 | |
| 194 | 192 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 195 | 193 | INPUT_PORTS_END |
| 196 | 194 | |
| 197 | static ADDRESS_MAP_START( topshoot_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 198 | AM_RANGE(0x000000, 0x0fffff) AM_ROM /* Cartridge Program Rom */ | |
| 199 | // AM_RANGE(0x200000, 0x20007f) AM_RAM | |
| 200 | AM_RANGE(0x200000, 0x2023ff) AM_RAM // tested | |
| 201 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("IN0") // ?? | |
| 202 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ | |
| 203 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) | |
| 204 | AM_RANGE(0xa10000, 0xa1001f) AM_READ_PORT("IN0") | |
| 205 | AM_RANGE(0xa11100, 0xa11101) AM_READ_PORT("IN0") // ?? | |
| 206 | AM_RANGE(0xa00000, 0xa0ffff) AM_READWRITE(genesis_68k_to_z80_r, genesis_68k_to_z80_w) | |
| 207 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(genesis_vdp_r, genesis_vdp_w) /* VDP Access */ | |
| 208 | AM_RANGE(0xe00000, 0xe1ffff) AM_ROMBANK(3) | |
| 209 | AM_RANGE(0xfe0000, 0xfeffff) AM_RAMBANK(4) | |
| 210 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_BASE(&genesis_68k_ram)/* Main Ram */ | |
| 211 | ADDRESS_MAP_END | |
| 212 | 195 | |
| 213 | static ADDRESS_MAP_START( genesis_z80_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 214 | AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1) AM_BASE(&genesis_z80_ram) | |
| 215 | AM_RANGE(0x2000, 0x3fff) AM_RAMBANK(2) /* mirror */ | |
| 216 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE(genesis_z80_r, genesis_z80_w) | |
| 217 | AM_RANGE(0x8000, 0xffff) AM_READ(genesis_z80_bank_r) //AM_WRITE(genesis_z80_bank_w) | |
| 218 | ADDRESS_MAP_END | |
| 219 | ||
| 220 | ||
| 221 | static MACHINE_DRIVER_START( genesis_base ) | |
| 222 | /*basic machine hardware */ | |
| 223 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 7) | |
| 224 | MDRV_CPU_VBLANK_INT("screen", genesis_vblank_interrupt) | |
| 225 | ||
| 226 | MDRV_CPU_ADD("genesis_snd_z80", Z80, MASTER_CLOCK / 15) | |
| 227 | MDRV_CPU_PROGRAM_MAP(genesis_z80_map) | |
| 228 | MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) /* from vdp at scanline 0xe0 */ | |
| 229 | ||
| 230 | MDRV_QUANTUM_TIME(HZ(6000)) | |
| 231 | ||
| 232 | MDRV_MACHINE_START(genesis) | |
| 233 | MDRV_MACHINE_RESET(genesis) | |
| 234 | ||
| 235 | /* video hardware */ | |
| 236 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 237 | ||
| 238 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 239 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 240 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 241 | MDRV_SCREEN_SIZE(342,262) | |
| 242 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 243 | ||
| 244 | MDRV_PALETTE_LENGTH(64) | |
| 245 | ||
| 246 | MDRV_VIDEO_START(genesis) | |
| 247 | MDRV_VIDEO_UPDATE(genesis) | |
| 248 | ||
| 249 | /* sound hardware */ | |
| 250 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 251 | ||
| 252 | MDRV_SOUND_ADD("ym", YM3438, MASTER_CLOCK/7) | |
| 253 | MDRV_SOUND_ROUTE(0, "mono", 0.50) | |
| 254 | MDRV_SOUND_ROUTE(1, "mono", 0.50) | |
| 255 | MACHINE_DRIVER_END | |
| 256 | ||
| 257 | ||
| 258 | static MACHINE_DRIVER_START( topshoot ) | |
| 259 | /* basic machine hardware */ | |
| 260 | MDRV_IMPORT_FROM( genesis_base ) | |
| 261 | MDRV_CPU_MODIFY("maincpu") | |
| 262 | MDRV_CPU_PROGRAM_MAP(topshoot_map) | |
| 263 | ||
| 264 | /* video hardware */ | |
| 265 | MDRV_VIDEO_START(genesis) | |
| 266 | MDRV_SCREEN_MODIFY("screen") | |
| 267 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 268 | ||
| 269 | /* sound hardware */ | |
| 270 | MDRV_SOUND_ADD("sn", SN76496, MASTER_CLOCK/15) | |
| 271 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 272 | MACHINE_DRIVER_END | |
| 273 | ||
| 274 | 196 | ROM_START( topshoot ) /* Top Shooter (c)1995 Sun Mixing */ |
| 275 | 197 | ROM_REGION( 0x200000, "maincpu", 0 ) |
| 276 | 198 | ROM_LOAD16_BYTE( "tc574000ad_u11_2.bin", 0x000000, 0x080000, CRC(b235c4d9) SHA1(fbb308a5f6e769f3277824cb6a3b50c308969ac2) ) |
| 277 | 199 | ROM_LOAD16_BYTE( "tc574000ad_u12_1.bin", 0x000001, 0x080000, CRC(e826f6ad) SHA1(23ec8bb608f954d3b915f061e7076c0c63b8259e) ) |
| 278 | 200 | ROM_END |
| 279 | 201 | |
| 280 | static READ16_HANDLER( vdp_fake_r ) | |
| 281 | { | |
| 282 | return mame_rand(space->machine); | |
| 283 | } | |
| 284 | ||
| 285 | 202 | static DRIVER_INIT(topshoot) |
| 286 | 203 | { |
| 287 | /* hack -- fix vdp emulation instead */ | |
| 288 | memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xC00004, 0xC00005, 0, 0, vdp_fake_r); | |
| 204 | /* set up preliminary input ports (not working yet!) */ | |
| 205 | memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x400004, 0x400005, 0, 0, "IN0"); //correct? | |
| 206 | memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa11100, 0xa11101, 0, 0, "IN0"); //correct? | |
| 289 | 207 | |
| 290 | memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") ); | |
| 291 | memory_set_bankptr(machine, 4, genesis_68k_ram ); | |
| 208 | DRIVER_INIT_CALL(megadriv); | |
| 292 | 209 | } |
| 293 | 210 | |
| 294 | 211 | |
| 295 | 212 | /* Sun Mixing Hardware, very close to actual Genesis */ |
| 296 | GAME( 1995, topshoot, 0, | |
| 213 | GAME( 1995, topshoot, 0, md_bo |
| r6049 | r6050 | |
|---|---|---|
| 54 | 54 | #include "sound/sn76496.h" |
| 55 | 55 | |
| 56 | 56 | #include "deprecat.h" |
| 57 | #include "genesis.h" | |
| 58 | 57 | #include "megadriv.h" |
| 59 | 58 | #include "segamsys.h" |
| 60 | 59 | |
| 61 | 60 | #define MASTER_CLOCK 53693100 |
| 62 | 61 | |
| 63 | /* Megaplay BIOS specific */ | |
| 64 | #define MP_ROM 0x10 | |
| 65 | #define MP_GAME 0 | |
| 66 | 62 | |
| 67 | static UINT32 bios_bank; // ROM bank selection | |
| 68 | static UINT16 game_banksel; // Game bank selection | |
| 69 | static UINT32 bios_mode = MP_ROM; // determines whether ROM banks or Game data | |
| 70 | // is to read from 0x8000-0xffff | |
| 71 | static UINT32 mp_bios_bank_addr; | |
| 63 | struct _mplay_bios mplay_bios; | |
| 64 | static UINT16 *genesis_io_ram; | |
| 72 | 65 | |
| 73 | static UINT32 bios_width; // determines the way the game info ROM is read | |
| 74 | UINT8 bios_ctrl[6]; | |
| 75 | static UINT8 bios_6600; | |
| 76 | UINT8 bios_6204; | |
| 77 | static UINT8 bios_6403; | |
| 78 | static UINT8 bios_6404; | |
| 79 | 66 | static UINT8* ic3_ram; |
| 80 | 67 | |
| 81 | 68 | static UINT8* ic37_ram; |
| r6049 | r6050 | |
| 132 | 119 | } |
| 133 | 120 | #endif |
| 134 | 121 | |
| 135 | static UINT32 readpos = 1; // serial bank selection position (9-bit) | |
| 136 | ||
| 137 | 122 | static INPUT_PORTS_START ( megaplay ) |
| 138 | PORT_START("P1_1") /* Player 1 Controls - part 1 */ | |
| 139 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 140 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 141 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) | |
| 142 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) | |
| 143 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 144 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 145 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 146 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 123 | PORT_INCLUDE( md_common ) | |
| 147 | 124 | |
| 148 | PORT_START("P1_2") /* Player 1 Controls - part 2 */ | |
| 149 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 150 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 151 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 152 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 153 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 154 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 155 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 156 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 157 | ||
| 158 | PORT_START("P2_1") /* Player 2 Controls - part 1 */ | |
| 159 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 160 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 161 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 162 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 163 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 164 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 165 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 166 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 167 | ||
| 168 | PORT_START("P2_2") /* Player 2 Controls - part 2 */ | |
| 169 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 170 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 171 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 172 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 173 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 174 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 176 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 177 | ||
| 178 | 125 | PORT_START("TEST") |
| 179 | 126 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) |
| 180 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 1") PORT_CODE(KEYCODE_W) | |
| 181 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 2") PORT_CODE(KEYCODE_E) | |
| 182 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 3") PORT_CODE(KEYCODE_R) | |
| 183 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 4") PORT_CODE(KEYCODE_T) | |
| 184 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 5") PORT_CODE(KEYCODE_Y) | |
| 127 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 1") PORT_CODE(KEYCODE_W) | |
| 128 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 2") PORT_CODE(KEYCODE_E) | |
| 129 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 3") PORT_CODE(KEYCODE_R) | |
| 130 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 4") PORT_CODE(KEYCODE_T) | |
| 131 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 5") PORT_CODE(KEYCODE_Y) | |
| 185 | 132 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 6") PORT_CODE(KEYCODE_U) |
| 186 | 133 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 187 | 134 | |
| 188 | 135 | PORT_START("COIN") |
| 189 | 136 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 190 | 137 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 191 | PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 192 | PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 193 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 194 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 195 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 196 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 138 | PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 139 | PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 140 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 141 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 142 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 143 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 197 | 144 | |
| 198 | 145 | /* Caused 01081: |
| 199 | 146 | * PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| r6049 | r6050 | |
| 202 | 149 | |
| 203 | 150 | PORT_START("DSW0") |
| 204 | 151 | PORT_DIPNAME( 0x0f, 0x0f, "Coin slot 1" ) PORT_DIPLOCATION("SW1:1,2,3,4") |
| 205 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 206 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 207 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 208 | PORT_DIPSETTING( 0x05, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) | |
| 209 | PORT_DIPSETTING( 0x04, "2 coins/1 credit - 4 coins/3 credits" ) | |
| 210 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 211 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 212 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 213 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 214 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 215 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 216 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 217 | PORT_DIPSETTING( 0x03, "1 coin/1 credit - 5 coins/6 credits" ) | |
| 218 | PORT_DIPSETTING( 0x02, "1 coin/1 credit - 4 coins/5 credits" ) | |
| 219 | PORT_DIPSETTING( 0x01, "1 coin/1 credit - 2 coins/3 credits" ) | |
| 220 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 152 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) | |
| 153 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) | |
| 154 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) | |
| 155 | PORT_DIPSETTING( 0x05, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) | |
| 156 | PORT_DIPSETTING( 0x04, "2 coins/1 credit - 4 coins/3 credits" ) | |
| 157 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 158 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) | |
| 159 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 160 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 161 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 162 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 163 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 164 | PORT_DIPSETTING( 0x03, "1 coin/1 credit - 5 coins/6 credits" ) | |
| 165 | PORT_DIPSETTING( 0x02, "1 coin/1 credit - 4 coins/5 credits" ) | |
| 166 | PORT_DIPSETTING( 0x01, "1 coin/1 credit - 2 coins/3 credits" ) | |
| 167 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) | |
| 221 | 168 | |
| 222 | 169 | PORT_DIPNAME( 0xf0, 0xf0, "Coin slot 2" ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 223 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 224 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 225 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 226 | PORT_DIPSETTING( 0x50, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) | |
| 227 | PORT_DIPSETTING( 0x40, "2 coins/1 credit - 4 coins/3 credits" ) | |
| 228 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 229 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 230 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 231 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 232 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 233 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 234 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 235 | PORT_DIPSETTING( 0x30, "1 coin/1 credit - 5 coins/6 credits" ) | |
| 236 | PORT_DIPSETTING( 0x20, "1 coin/1 credit - 4 coins/5 credits" ) | |
| 237 | PORT_DIPSETTING( 0x10, "1 coin/1 credit - 2 coins/3 credits" ) | |
| 238 | PORT_DIPSETTING( 0x00, " 1 coin/1 credit" ) | |
| 170 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) | |
| 171 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) | |
| 172 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) | |
| 173 | PORT_DIPSETTING( 0x50, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) | |
| 174 | PORT_DIPSETTING( 0x40, "2 coins/1 credit - 4 coins/3 credits" ) | |
| 175 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 176 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) | |
| 177 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 178 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 179 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 180 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 181 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 182 | PORT_DIPSETTING( 0x30, "1 coin/1 credit - 5 coins/6 credits" ) | |
| 183 | PORT_DIPSETTING( 0x20, "1 coin/1 credit - 4 coins/5 credits" ) | |
| 184 | PORT_DIPSETTING( 0x10, "1 coin/1 credit - 2 coins/3 credits" ) | |
| 185 | PORT_DIPSETTING( 0x00, " 1 coin/1 credit" ) | |
| 239 | 186 | |
| 240 | 187 | PORT_START("DSW1") /* DSW C (per game settings) */ |
| 241 | 188 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") |
| 242 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 243 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 189 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 190 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 244 | 191 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2") |
| 245 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 246 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 192 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 193 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 247 | 194 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3") |
| 248 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 249 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 195 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 196 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 250 | 197 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:4") |
| 251 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 252 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 198 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 199 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 253 | 200 | INPUT_PORTS_END |
| 254 | 201 | |
| 255 | 202 | static INPUT_PORTS_START ( mp_sonic ) |
| r6049 | r6050 | |
| 257 | 204 | |
| 258 | 205 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 259 | 206 | PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2") |
| 260 | PORT_DIPSETTING( 0x00, "4" ) | |
| 261 | PORT_DIPSETTING( 0x01, "3" ) | |
| 262 | PORT_DIPSETTING( 0x02, "2" ) | |
| 263 | PORT_DIPSETTING( 0x03, "1" ) | |
| 207 | PORT_DIPSETTING( 0x00, "4" ) | |
| 208 | PORT_DIPSETTING( 0x01, "3" ) | |
| 209 | PORT_DIPSETTING( 0x02, "2" ) | |
| 210 | PORT_DIPSETTING( 0x03, "1" ) | |
| 264 | 211 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 265 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 266 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) | |
| 267 | PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) | |
| 268 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) | |
| 212 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 213 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) | |
| 214 | PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) | |
| 215 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) | |
| 269 | 216 | // Who knows... |
| 270 | 217 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) |
| 271 | 218 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| r6049 | r6050 | |
| 278 | 225 | |
| 279 | 226 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 280 | 227 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:1") |
| 281 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) | |
| 282 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 228 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) | |
| 229 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 283 | 230 | PORT_DIPNAME( 0x02, 0x00, "Life" ) PORT_DIPLOCATION("SW3:2") |
| 284 | PORT_DIPSETTING( 0x02, "1" ) | |
| 285 | PORT_DIPSETTING( 0x00, "2" ) | |
| 231 | PORT_DIPSETTING( 0x02, "1" ) | |
| 232 | PORT_DIPSETTING( 0x00, "2" ) | |
| 286 | 233 | PORT_DIPNAME( 0x04, 0x04, "Initial Players" ) PORT_DIPLOCATION("SW3:3") |
| 287 | PORT_DIPSETTING( 0x00, "1" ) | |
| 288 | PORT_DIPSETTING( 0x04, "2" ) | |
| 234 | PORT_DIPSETTING( 0x00, "1" ) | |
| 235 | PORT_DIPSETTING( 0x04, "2" ) | |
| 289 | 236 | PORT_DIPNAME( 0x08, 0x00, "Timer" ) PORT_DIPLOCATION("SW3:4") |
| 290 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 291 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 237 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 238 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 292 | 239 | // Who knows... |
| 293 | 240 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) |
| 294 | 241 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| r6049 | r6050 | |
| 302 | 249 | |
| 303 | 250 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 304 | 251 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW3:1") |
| 305 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) | |
| 306 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) | |
| 252 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) | |
| 253 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) | |
| 307 | 254 | PORT_DIPNAME( 0x02, 0x02, "2P Mode Games" ) PORT_DIPLOCATION("SW3:2") |
| 308 | PORT_DIPSETTING( 0x02, "1" ) | |
| 309 | PORT_DIPSETTING( 0x00, "3" ) | |
| 255 | PORT_DIPSETTING( 0x02, "1" ) | |
| 256 | PORT_DIPSETTING( 0x00, "3" ) | |
| 310 | 257 | PORT_DIPNAME( 0x0c, 0x0c, "Speed / Difficulty" ) PORT_DIPLOCATION("SW3:3,4") |
| 311 | PORT_DIPSETTING( 0x08, "Slow" ) | |
| 312 | PORT_DIPSETTING( 0x0c, "Middle" ) | |
| 313 | PORT_DIPSETTING( 0x04, "Fast" ) | |
| 314 | PORT_DIPSETTING( 0x00, "Max" ) | |
| 258 | PORT_DIPSETTING( 0x08, "Slow" ) | |
| 259 | PORT_DIPSETTING( 0x0c, "Middle" ) | |
| 260 | PORT_DIPSETTING( 0x04, "Fast" ) | |
| 261 | PORT_DIPSETTING( 0x00, "Max" ) | |
| 315 | 262 | // Who knows... |
| 316 | 263 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) |
| 317 | 264 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| r6049 | r6050 | |
| 325 | 272 | |
| 326 | 273 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 327 | 274 | PORT_DIPNAME( 0x01, 0x01, "Time" ) PORT_DIPLOCATION("SW3:1") |
| 328 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) | |
| 329 | PORT_DIPSETTING( 0x00, "Short" ) | |
| 275 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) | |
| 276 | PORT_DIPSETTING( 0x00, "Short" ) | |
| 330 | 277 | PORT_DIPNAME( 0x0e, 0x08, "Level" ) PORT_DIPLOCATION("SW3:2,3,4") |
| 331 | PORT_DIPSETTING( 0x00, "0" ) | |
| 332 | PORT_DIPSETTING( 0x02, "0" ) | |
| 333 | PORT_DIPSETTING( 0x04, "5" ) | |
| 334 | PORT_DIPSETTING( 0x06, "4" ) | |
| 335 | PORT_DIPSETTING( 0x08, "3" ) | |
| 336 | PORT_DIPSETTING( 0x0a, "2" ) | |
| 337 | PORT_DIPSETTING( 0x0c, "1" ) | |
| 338 | PORT_DIPSETTING( 0x0e, "0" ) | |
| 278 | PORT_DIPSETTING( 0x00, "0" ) | |
| 279 | PORT_DIPSETTING( 0x02, "0" ) | |
| 280 | PORT_DIPSETTING( 0x04, "5" ) | |
| 281 | PORT_DIPSETTING( 0x06, "4" ) | |
| 282 | PORT_DIPSETTING( 0x08, "3" ) | |
| 283 | PORT_DIPSETTING( 0x0a, "2" ) | |
| 284 | PORT_DIPSETTING( 0x0c, "1" ) | |
| 285 | PORT_DIPSETTING( 0x0e, "0" ) | |
| 339 | 286 | INPUT_PORTS_END |
| 340 | 287 | |
| 341 | 288 | static INPUT_PORTS_START ( mp_sor2 ) |
| r6049 | r6050 | |
| 343 | 290 | |
| 344 | 291 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 345 | 292 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") |
| 346 | PORT_DIPSETTING( 0x00, "4" ) | |
| 347 | PORT_DIPSETTING( 0x01, "3" ) | |
| 348 | PORT_DIPSETTING( 0x02, "2" ) | |
| 349 | PORT_DIPSETTING( 0x03, "1" ) | |
| 293 | PORT_DIPSETTING( 0x00, "4" ) | |
| 294 | PORT_DIPSETTING( 0x01, "3" ) | |
| 295 | PORT_DIPSETTING( 0x02, "2" ) | |
| 296 | PORT_DIPSETTING( 0x03, "1" ) | |
| 350 | 297 | PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 351 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) | |
| 352 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 353 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 354 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 298 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) | |
| 299 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 300 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 301 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 355 | 302 | INPUT_PORTS_END |
| 356 | 303 | |
| 357 | 304 | static INPUT_PORTS_START ( mp_bio ) |
| r6049 | r6050 | |
| 359 | 306 | |
| 360 | 307 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 361 | 308 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") |
| 362 | PORT_DIPSETTING( 0x00, "5" ) | |
| 363 | PORT_DIPSETTING( 0x01, "4" ) | |
| 364 | PORT_DIPSETTING( 0x02, "2" ) | |
| 365 | PORT_DIPSETTING( 0x03, "3" ) | |
| 309 | PORT_DIPSETTING( 0x00, "5" ) | |
| 310 | PORT_DIPSETTING( 0x01, "4" ) | |
| 311 | PORT_DIPSETTING( 0x02, "2" ) | |
| 312 | PORT_DIPSETTING( 0x03, "3" ) | |
| 366 | 313 | PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 367 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) | |
| 368 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 369 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 370 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 314 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) | |
| 315 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 316 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 317 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 371 | 318 | INPUT_PORTS_END |
| 372 | 319 | |
| 373 | 320 | static INPUT_PORTS_START ( mp_gslam ) |
| r6049 | r6050 | |
| 375 | 322 | |
| 376 | 323 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 377 | 324 | PORT_DIPNAME( 0x07, 0x04, DEF_STR ( Game_Time ) ) PORT_DIPLOCATION("SW3:1,2,3") |
| 378 | PORT_DIPSETTING( 0x00, "5:00" ) | |
| 379 | PORT_DIPSETTING( 0x01, "4:30" ) | |
| 380 | PORT_DIPSETTING( 0x02, "4:00" ) | |
| 381 | PORT_DIPSETTING( 0x03, "3:30" ) | |
| 382 | PORT_DIPSETTING( 0x04, "3:00" ) | |
| 383 | PORT_DIPSETTING( 0x05, "2:30" ) | |
| 384 | PORT_DIPSETTING( 0x06, "2:00" ) | |
| 385 | PORT_DIPSETTING( 0x07, "1:30" ) | |
| 325 | PORT_DIPSETTING( 0x00, "5:00" ) | |
| 326 | PORT_DIPSETTING( 0x01, "4:30" ) | |
| 327 | PORT_DIPSETTING( 0x02, "4:00" ) | |
| 328 | PORT_DIPSETTING( 0x03, "3:30" ) | |
| 329 | PORT_DIPSETTING( 0x04, "3:00" ) | |
| 330 | PORT_DIPSETTING( 0x05, "2:30" ) | |
| 331 | PORT_DIPSETTING( 0x06, "2:00" ) | |
| 332 | PORT_DIPSETTING( 0x07, "1:30" ) | |
| 386 | 333 | PORT_DIPNAME( 0x08, 0x08, "2P-Play Continue" ) PORT_DIPLOCATION("SW3:4") |
| 387 | PORT_DIPSETTING( 0x00, "1 Credit" ) | |
| 388 | PORT_DIPSETTING( 0x08, "2 Credits" ) | |
| 334 | PORT_DIPSETTING( 0x00, "1 Credit" ) | |
| 335 | PORT_DIPSETTING( 0x08, "2 Credits" ) | |
| 389 | 336 | INPUT_PORTS_END |
| 390 | 337 | |
| 391 | 338 | static INPUT_PORTS_START ( mp_mazin ) |
| r6049 | r6050 | |
| 393 | 340 | |
| 394 | 341 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 395 | 342 | PORT_DIPNAME( 0x01, 0x01, "Initial Player" ) PORT_DIPLOCATION("SW3:1") |
| 396 | PORT_DIPSETTING( 0x01, "2" ) | |
| 397 | PORT_DIPSETTING( 0x00, "1" ) | |
| 343 | PORT_DIPSETTING( 0x01, "2" ) | |
| 344 | PORT_DIPSETTING( 0x00, "1" ) | |
| 398 | 345 | PORT_DIPNAME( 0x02, 0x02, "Initial Player" ) PORT_DIPLOCATION("SW3:2") |
| 399 | PORT_DIPSETTING( 0x02, "1" ) | |
| 400 | PORT_DIPSETTING( 0x00, "4" ) | |
| 346 | PORT_DIPSETTING( 0x02, "1" ) | |
| 347 | PORT_DIPSETTING( 0x00, "4" ) | |
| 401 | 348 | PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3") |
| 402 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 403 | PORT_DIPSETTING( 0x00, DEF_STR ( Normal ) ) | |
| 349 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 350 | PORT_DIPSETTING( 0x00, DEF_STR ( Normal ) ) | |
| 404 | 351 | PORT_DIPNAME( 0x08, 0x08, "Title" ) PORT_DIPLOCATION("SW3:4") |
| 405 | PORT_DIPSETTING( 0x08, "EUROPE" ) | |
| 406 | PORT_DIPSETTING( 0x00, "U.S.A" ) | |
| 352 | PORT_DIPSETTING( 0x08, "EUROPE" ) | |
| 353 | PORT_DIPSETTING( 0x00, "U.S.A" ) | |
| 407 | 354 | INPUT_PORTS_END |
| 408 | 355 | |
| 409 | 356 | static INPUT_PORTS_START ( mp_soni2 ) |
| r6049 | r6050 | |
| 411 | 358 | |
| 412 | 359 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 413 | 360 | PORT_DIPNAME( 0x03, 0x01, "Initial Players (Normal mode)" ) PORT_DIPLOCATION("SW3:1,2") |
| 414 | PORT_DIPSETTING( 0x00, "4" ) | |
| 415 | PORT_DIPSETTING( 0x01, "3" ) | |
| 416 | PORT_DIPSETTING( 0x02, "2" ) | |
| 417 | PORT_DIPSETTING( 0x03, "1" ) | |
| 361 | PORT_DIPSETTING( 0x00, "4" ) | |
| 362 | PORT_DIPSETTING( 0x01, "3" ) | |
| 363 | PORT_DIPSETTING( 0x02, "2" ) | |
| 364 | PORT_DIPSETTING( 0x03, "1" ) | |
| 418 | 365 | PORT_DIPNAME( 0x0c, 0x0c, "Initial Players (Dual mode)" ) PORT_DIPLOCATION("SW3:3,4") |
| 419 | PORT_DIPSETTING( 0x00, "4" ) | |
| 420 | PORT_DIPSETTING( 0x04, "2" ) | |
| 421 | PORT_DIPSETTING( 0x08, "1" ) | |
| 422 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 366 | PORT_DIPSETTING( 0x00, "4" ) | |
| 367 | PORT_DIPSETTING( 0x04, "2" ) | |
| 368 | PORT_DIPSETTING( 0x08, "1" ) | |
| 369 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 423 | 370 | INPUT_PORTS_END |
| 424 | 371 | |
| 425 | 372 | static INPUT_PORTS_START ( mp_shnb3 ) |
| r6049 | r6050 | |
| 427 | 374 | |
| 428 | 375 | PORT_MODIFY("DSW1") /* DSW C (per game settings) */ |
| 429 | 376 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") |
| 430 | PORT_DIPSETTING( 0x00, "4" ) | |
| 431 | PORT_DIPSETTING( 0x01, "3" ) | |
| 432 | PORT_DIPSETTING( 0x02, "2" ) | |
| 433 | PORT_DIPSETTING( 0x03, "1" ) | |
| 377 | PORT_DIPSETTING( 0x00, "4" ) | |
| 378 | PORT_DIPSETTING( 0x01, "3" ) | |
| 379 | PORT_DIPSETTING( 0x02, "2" ) | |
| 380 | PORT_DIPSETTING( 0x03, "1" ) | |
| 434 | 381 | PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 435 | PORT_DIPSETTING( 0x00, "Expert" ) | |
| 436 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 437 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 438 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 382 | PORT_DIPSETTING( 0x00, "Expert" ) | |
| 383 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) | |
| 384 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) | |
| 385 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) | |
| 439 | 386 | INPUT_PORTS_END |
| 440 | 387 | |
| 441 | 388 | /*MEGAPLAY specific*/ |
| 442 | 389 | |
| 443 | 390 | static READ8_HANDLER( megaplay_bios_banksel_r ) |
| 444 | 391 | { |
| 445 | return bios_bank; | |
| 392 | return mplay_bios.bios_bank; | |
| 446 | 393 | } |
| 447 | 394 | |
| 448 | 395 | static WRITE8_HANDLER( megaplay_bios_banksel_w ) |
| r6049 | r6050 | |
| 452 | 399 | It should be possible to multiplex different game ROMs at |
| 453 | 400 | 0x000000-0x3fffff based on these bits. |
| 454 | 401 | */ |
| 455 | bios_bank = data; | |
| 456 | bios_mode = MP_ROM; | |
| 402 | mplay_bios.bios_bank = data; | |
| 403 | mplay_bios.bios_mode = MP_ROM; | |
| 457 | 404 | // logerror("BIOS: ROM bank %i selected [0x%02x]\n",bios_bank >> 6, data); |
| 458 | 405 | } |
| 459 | 406 | |
| 460 | 407 | static READ8_HANDLER( megaplay_bios_gamesel_r ) |
| 461 | 408 | { |
| 462 | return bios_6403; | |
| 409 | return mplay_bios.bios_6403; | |
| 463 | 410 | } |
| 464 | 411 | |
| 465 | 412 | static WRITE8_HANDLER( megaplay_bios_gamesel_w ) |
| 466 | 413 | { |
| 467 | bios_6403 = data; | |
| 414 | mplay_bios.bios_6403 = data; | |
| 468 | 415 | |
| 469 | 416 | // logerror("BIOS: 0x6403 write: 0x%02x\n",data); |
| 470 | bios_mode = data & 0x10; | |
| 417 | mplay_bios.bios_mode = data & 0x10; | |
| 471 | 418 | } |
| 472 | 419 | |
| 473 | ||
| 474 | /* Old code, todo, update the new code instead */ | |
| 475 | ||
| 476 | static READ16_HANDLER ( OLD_megaplay_genesis_io_r ) | |
| 420 | static WRITE16_HANDLER( megaplay_io_write ) | |
| 477 | 421 | { |
| 478 | /* 8-bit only, data is mirrored in both halves */ | |
| 479 | ||
| 480 | UINT8 return_value = 0; | |
| 481 | ||
| 482 | switch (offset) | |
| 483 | { | |
| 484 | case 0: | |
| 485 | /* Charles MacDonald ( http://cgfm2.emuviews.com/ ) | |
| 486 | D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan) | |
| 487 | D6 : Video type is 1= PAL, 0= NTSC | |
| 488 | D5 : Sega CD unit is 1= not present, 0= connected. | |
| 489 | D4 : Unused (always returns zero) | |
| 490 | D3 : Bit 3 of version number | |
| 491 | D2 : Bit 2 of version number | |
| 492 | D1 : Bit 1 of version number | |
| 493 | D0 : Bit 0 of version number | |
| 494 | */ | |
| 495 | return_value = 0x80; /* ? megatech is usa? */ | |
| 496 | break; | |
| 497 | ||
| 498 | case 1: /* port A data (joypad 1) */ | |
| 499 | ||
| 500 | if (genesis_io_ram[offset] & 0x40) | |
| 501 | return_value = input_port_read(space->machine, "P1_1") & (genesis_io_ram[4]^0xff); | |
| 502 | else | |
| 503 | { | |
| 504 | return_value = input_port_read(space->machine, "P1_2") & (genesis_io_ram[4]^0xff); | |
| 505 | return_value |= input_port_read(space->machine, "P1_1") & 0x03; | |
| 506 | } | |
| 507 | return_value = (genesis_io_ram[offset] & 0x80) | return_value; | |
| 508 | // logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f); | |
| 509 | break; | |
| 510 | ||
| 511 | case 2: /* port B data (joypad 2) */ | |
| 512 | ||
| 513 | if (genesis_io_ram[offset] & 0x40) | |
| 514 | return_value = input_port_read(space->machine, "P2_1") & (genesis_io_ram[5]^0xff); | |
| 515 | else | |
| 516 | { | |
| 517 | return_value = input_port_read(space->machine, "P2_2") & (genesis_io_ram[5]^0xff); | |
| 518 | return_value |= input_port_read(space->machine, "P2_1") & 0x03; | |
| 519 | } | |
| 520 | return_value = (genesis_io_ram[offset] & 0x80) | return_value; | |
| 521 | // logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f); | |
| 522 | break; | |
| 523 | ||
| 524 | // case 3: /* port C data */ | |
| 525 | // return_value = bios_6402 << 3; | |
| 526 | // break; | |
| 527 | ||
| 528 | default: | |
| 529 | return_value = genesis_io_ram[offset]; | |
| 530 | ||
| 531 | } | |
| 532 | return return_value | return_value << 8; | |
| 422 | if (offset == 0x03) | |
| 423 | megadrive_io_data_regs[2] = (data & megadrive_io_ctrl_regs[2]) | (megadrive_io_data_regs[2] & ~megadrive_io_ctrl_regs[2]); | |
| 424 | else | |
| 425 | megadriv_68k_io_write(space, offset & 0x1f, data, 0xffff); | |
| 533 | 426 | } |
| 534 | 427 | |
| 535 | static | |
| 428 | static | |
| 536 | 429 | { |
| 537 | // logerror ("write io offset :%02x data %04x PC: 0x%06x\n",offset,data,cpu_get_previouspc(space->cpu)); | |
| 538 | ||
| 539 | switch (offset) | |
| 540 | { | |
| 541 | case 0x00: | |
| 542 | /*??*/ | |
| 543 | break; | |
| 544 | ||
| 545 | case 0x01:/* port A data */ | |
| 546 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x04])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x04])); | |
| 547 | break; | |
| 548 | ||
| 549 | case 0x02: /* port B data */ | |
| 550 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x05])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x05])); | |
| 551 | break; | |
| 552 | ||
| 553 | case 0x03: /* port C data */ | |
| 554 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x06])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x06])); | |
| 555 | bios_6204 = data & 0x07; | |
| 556 | break; | |
| 557 | ||
| 558 | case 0x04: /* port A control */ | |
| 559 | genesis_io_ram[offset] = data; | |
| 560 | break; | |
| 561 | ||
| 562 | case 0x05: /* port B control */ | |
| 563 | genesis_io_ram[offset] = data; | |
| 564 | break; | |
| 565 | ||
| 566 | case 0x06: /* port C control */ | |
| 567 | genesis_io_ram[offset] = data; | |
| 568 | break; | |
| 569 | ||
| 570 | case 0x07: /* port A TxData */ | |
| 571 | genesis_io_ram[offset] = data; | |
| 572 | break; | |
| 573 | ||
| 574 | default: | |
| 575 | genesis_io_ram[offset] = data; | |
| 576 | } | |
| 430 | if (offset == 0x03) | |
| 431 | return megadrive_io_data_regs[2]; | |
| 432 | else | |
| 433 | return megadriv_68k_io_read(space, offset & 0x1f, 0xffff); | |
| 577 | 434 | } |
| 578 | 435 | |
| 579 | 436 | static READ8_HANDLER( bank_r ) |
| r6049 | r6050 | |
| 581 | 438 | UINT32 fulladdress; |
| 582 | 439 | UINT8* bank = memory_region(space->machine, "mtbios"); |
| 583 | 440 | |
| 584 | fulladdress = mp_bios_bank_addr + offset; | |
| 441 | fulladdress = mplay_bios.mp_bios_bank_addr + offset; | |
| 585 | 442 | |
| 586 | 443 | |
| 587 | 444 | if ((fulladdress >= 0x000000) && (fulladdress <= 0x3fffff)) // ROM Addresses |
| 588 | 445 | { |
| 589 | if(bios_mode & MP_ROM) | |
| 446 | if (mplay_bios.bios_mode & MP_ROM) | |
| 590 | 447 | { |
| 591 | int sel = (bios_bank >> 6) & 0x03; | |
| 448 | int sel = (mplay_bios.bios_bank >> 6) & 0x03; | |
| 592 | 449 | |
| 593 | if(sel == 0) | |
| 450 | if (sel == 0) | |
| 594 | 451 | return 0xff; |
| 595 | 452 | else |
| 596 | return bank[0x10000 + (sel-1)*0x8000 + offset]; | |
| 453 | return bank[0x10000 + (sel - 1) * 0x8000 + offset]; | |
| 597 | 454 | } |
| 598 | else if(bios_width & 0x08) | |
| 455 | else if (mplay_bios.bios_width & 0x08) | |
| 599 | 456 | { |
| 600 | 457 | if(offset >= 0x2000) |
| 601 | 458 | return ic36_ram[offset - 0x2000]; |
| 602 | 459 | else |
| 603 | return ic37_ram[(0x2000 * (bios_bank & 0x03)) + offset]; | |
| 460 | return ic37_ram[(0x2000 * (mplay_bios.bios_bank & 0x03)) + offset]; | |
| 604 | 461 | } |
| 605 | 462 | else |
| 606 | 463 | { |
| 607 | return memory_region(space->machine, "maincpu")[fulladdress^1]; | |
| 464 | return memory_region(space->machine, "maincpu")[fulladdress ^ 1]; | |
| 608 | 465 | } |
| 609 | 466 | } |
| 610 | else if(fulladdress>=0xa10000 && fulladdress<=0xa1001f) // IO Acess | |
| 467 | else if (fulladdress >= 0xa10000 && fulladdress <= 0xa1001f) // IO Acess | |
| 611 | 468 | { |
| 612 | return | |
| 469 | return | |
| 613 | 470 | } |
| 614 | 471 | else |
| 615 | 472 | { |
| 616 | printf("bank_r fulladdress %08x\n",fulladdress); | |
| 473 | printf("bank_r fulladdress %08x\n", fulladdress); | |
| 617 | 474 | return 0x00; |
| 618 | 475 | } |
| 619 | 476 | |
| 620 | 477 | } |
| 621 | 478 | |
| 622 | static WRITE8_HANDLER | |
| 479 | static WRITE8_HANDLER | |
| 623 | 480 | { |
| 624 | 481 | UINT32 fulladdress; |
| 625 | fulladdress = mp_bios_bank_addr + offset; | |
| 482 | fulladdress = mplay_bios.mp_bios_bank_addr + offset; | |
| 626 | 483 | |
| 627 | 484 | if ((fulladdress >= 0x000000) && (fulladdress <= 0x3fffff)) // ROM / Megaplay Custom Addresses |
| 628 | 485 | { |
| 629 | if(offset <= 0x1fff && (bios_width & 0x08)) | |
| 486 | if (offset <= 0x1fff && (mplay_bios.bios_width & 0x08)) | |
| 630 | 487 | { |
| 631 | ic37_ram[(0x2000 * (bios_bank & 0x03)) + offset] = data; | |
| 488 | ic37_ram[(0x2000 * (mplay_bios.bios_bank & 0x03)) + offset] = data; | |
| 632 | 489 | } |
| 633 | 490 | |
| 634 | if(offset >= 0x2000 && (bios_width & 0x08)) | |
| 491 | if(offset >= 0x2000 && (mplay_bios.bios_width & 0x08)) | |
| 635 | 492 | { |
| 636 | 493 | // ic36_ram[offset] = data; |
| 637 | 494 | ic36_ram[offset - 0x2000] = data; |
| 638 | 495 | } |
| 639 | 496 | } |
| 640 | else if(fulladdress>=0xa10000 && fulladdress<=0xa1001f) // IO Access | |
| 497 | else if (fulladdress >= 0xa10000 && fulladdress <=0xa1001f) // IO Access | |
| 641 | 498 | { |
| 642 | | |
| 499 | | |
| 643 | 500 | } |
| 644 | 501 | else |
| 645 | 502 | { |
| 646 | printf("bank_w fulladdress %08x\n",fulladdress); | |
| 503 | printf("bank_w fulladdress %08x\n", fulladdress); | |
| 647 | 504 | } |
| 648 | 505 | } |
| 649 | 506 | |
| 650 | 507 | |
| 508 | /* Megaplay BIOS handles regs[2] at start in a different way compared to megadrive */ | |
| 509 | /* other io data/ctrl regs are dealt with exactly like in the console */ | |
| 510 | ||
| 651 | 511 | static READ8_HANDLER( megaplay_bios_6402_r ) |
| 652 | 512 | { |
| 653 | return genesis_io_ram[3];// & 0xfe; | |
| 654 | // return bios_6402;// & 0xfe; | |
| 513 | return megadrive_io_data_regs[2];// & 0xfe; | |
| 655 | 514 | } |
| 656 | 515 | |
| 657 | 516 | static WRITE8_HANDLER( megaplay_bios_6402_w ) |
| 658 | 517 | { |
| 659 | genesis_io_ram[3] = (genesis_io_ram[3] & 0x07) | ((data & 0x70) >> 1); | |
| 660 | // bios_6402 = (data >> 4) & 0x07; | |
| 661 | // logerror("BIOS: 0x6402 write: 0x%02x\n",data); | |
| 518 | megadrive_io_data_regs[2] = (megadrive_io_data_regs[2] & 0x07) | ((data & 0x70) >> 1); | |
| 519 | // logerror("BIOS: 0x6402 write: 0x%02x\n", data); | |
| 662 | 520 | } |
| 663 | 521 | |
| 664 | static READ8_HANDLER( megaplay_bios_6 | |
| 522 | static READ8_HANDLER( megaplay_bios_6204_r ) | |
| 665 | 523 | { |
| 666 | // logerror("BIOS: 0x6404 read: returned 0x%02x\n",bios_6404 | (bios_6403 & 0x10) >> 4); | |
| 667 | return (bios_6404 & 0xfe) | ((bios_6403 & 0x10) >> 4); | |
| 668 | // return bios_6404 | (bios_6403 & 0x10) >> 4; | |
| 524 | return (megadrive_io_data_regs[2]); | |
| 525 | // return (mplay_bios.bios_width & 0xf8) + (mplay_bios.bios_6204 & 0x07); | |
| 669 | 526 | } |
| 670 | 527 | |
| 671 | static WRITE8_HANDLER( megaplay_bios_ | |
| 528 | static WRITE8_HANDLER( megaplay_bios_width_w ) | |
| 672 | 529 | { |
| 673 | if(((bios_6404 & 0x0c) == 0x00) && ((data & 0x0c) == 0x0c)) | |
| 674 | cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE); | |
| 675 | bios_6404 = data; | |
| 676 | ||
| 677 | // logerror("BIOS: 0x6404 write: 0x%02x\n",data); | |
| 530 | mplay_bios.bios_width = data; | |
| 531 | megadrive_io_data_regs[2] = (megadrive_io_data_regs[2] & 0x07) | ((data & 0xf8)); | |
| 532 | // logerror("BIOS: 0x6204 - Width write: %02x\n", data); | |
| 678 | 533 | } |
| 679 | 534 | |
| 680 | static READ8_HANDLER( megaplay_bios_6 | |
| 535 | static READ8_HANDLER( megaplay_bios_6404_r ) | |
| 681 | 536 | { |
| 682 | return (genesis_io_ram[3]); | |
| 683 | // return (bios_width & 0xf8) + (bios_6204 & 0x07); | |
| 537 | // logerror("BIOS: 0x6404 read: returned 0x%02x\n",bios_6404 | (bios_6403 & 0x10) >> 4); | |
| 538 | return (mplay_bios.bios_6404 & 0xfe) | ((mplay_bios.bios_6403 & 0x10) >> 4); | |
| 539 | // return mplay_bios.bios_6404 | (mplay_bios.bios_6403 & 0x10) >> 4; | |
| 684 | 540 | } |
| 685 | 541 | |
| 686 | static WRITE8_HANDLER( megaplay_bios_ | |
| 542 | static WRITE8_HANDLER( megaplay_bios_6404 | |
| 687 | 543 | { |
| 688 | bios_width = data; | |
| 689 | genesis_io_ram[3] = (genesis_io_ram[3] & 0x07) | ((data & 0xf8)); | |
| 544 | if(((mplay_bios.bios_6404 & 0x0c) == 0x00) && ((data & 0x0c) == 0x0c)) | |
| 545 | cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE); | |
| 546 | mplay_bios.bios_6404 = data; | |
| 690 | 547 | |
| 691 | // logerror("BIOS: 0x6 | |
| 548 | // logerror("BIOS: 0x6404 | |
| 692 | 549 | } |
| 693 | 550 | |
| 694 | 551 | static READ8_HANDLER( megaplay_bios_6600_r ) |
| r6049 | r6050 | |
| 697 | 554 | 0x6600 appears to be used to check for extra slots being used. |
| 698 | 555 | Enter the following line in place of the return statement in this |
| 699 | 556 | function to make the BIOS check all 4 slots (3 and 4 will be "not used") |
| 700 | return (bios_6600 & 0xfe) | (bios_bank & 0x01); | |
| 557 | return (mplay_bios.bios_6600 & 0xfe) | (mplay_bios.bios_bank & 0x01); | |
| 701 | 558 | */ |
| 702 | return bios_6600;// & 0xfe; | |
| 559 | return mplay_bios.bios_6600;// & 0xfe; | |
| 703 | 560 | } |
| 704 | 561 | |
| 705 | 562 | static WRITE8_HANDLER( megaplay_bios_6600_w ) |
| 706 | 563 | { |
| 707 | bios_6600 = data; | |
| 564 | mplay_bios.bios_6600 = data; | |
| 708 | 565 | // logerror("BIOS: 0x6600 write: 0x%02x\n",data); |
| 709 | 566 | } |
| 710 | 567 | |
| 711 | 568 | static WRITE8_HANDLER( megaplay_game_w ) |
| 712 | 569 | { |
| 713 | if(readpos == 1) | |
| 714 | game_banksel = 0; | |
| 715 | game_banksel |= (1 << (readpos-1)) * (data & 0x01); | |
| 570 | if (mplay_bios.readpos == 1) | |
| 571 | mplay_bios.game_banksel = 0; | |
| 572 | mplay_bios.game_banksel |= (1 << (mplay_bios.readpos - 1)) * (data & 0x01); | |
| 716 | 573 | |
| 717 | readpos++; | |
| 718 | if(readpos > 9) | |
| 574 | mplay_bios.readpos++; | |
| 575 | ||
| 576 | if (mplay_bios.readpos > 9) | |
| 719 | 577 | { |
| 720 | bios_mode = MP_GAME; | |
| 721 | readpos = 1; | |
| 722 | // popmessage("Game bank selected: 0x%03x",game_banksel); | |
| 723 | logerror("BIOS [0x%04x]: 68K address space bank selected: 0x%03x\n",cpu_get_previouspc(space->cpu),game_banksel); | |
| 578 | mplay_bios.bios_mode = MP_GAME; | |
| 579 | mplay_bios.readpos = 1; | |
| 580 | // popmessage("Game bank selected: 0x%03x", mplay_bios.game_banksel); | |
| 581 | logerror("BIOS [0x%04x]: 68K address space bank selected: 0x%03x\n", cpu_get_previouspc(space->cpu), mplay_bios.game_banksel); | |
| 724 | 582 | } |
| 725 | 583 | |
| 726 | mp_bios_bank_addr = ( ( mp_bios_bank_addr >> 1 ) | ( data << 23 ) ) & 0xff8000; | |
| 727 | ||
| 728 | ||
| 584 | mplay_bios.mp_bios_bank_addr = ((mplay_bios.mp_bios_bank_addr >> 1) | (data << 23)) & 0xff8000; | |
| 729 | 585 | } |
| 730 | 586 | |
| 731 | 587 | static ADDRESS_MAP_START( megaplay_bios_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r6049 | r6050 | |
| 754 | 610 | void segae_vdp_ctrl_w ( UINT8 chip, UINT8 data ); |
| 755 | 611 | void segae_vdp_data_w ( running_machine *machine, UINT8 chip, UINT8 data ); |
| 756 | 612 | |
| 757 | #if 0 | |
| 758 | static READ8_HANDLER (megaplay_bios_port_be_bf_r) | |
| 759 | { | |
| 760 | UINT8 temp = 0; | |
| 761 | ||
| 762 | switch (offset) | |
| 763 | { | |
| 764 | case 0: /* port 0xbe, VDP 1 DATA Read */ | |
| 765 | temp = segae_vdp_data_r(0); break ; | |
| 766 | case 1: /* port 0xbf, VDP 1 CTRL Read */ | |
| 767 | temp = segae_vdp_ctrl_r(0); break ; | |
| 768 | } | |
| 769 | return temp; | |
| 770 | } | |
| 771 | ||
| 772 | static WRITE8_HANDLER (megaplay_bios_port_be_bf_w) | |
| 773 | { | |
| 774 | switch (offset) | |
| 775 | { | |
| 776 | case 0: /* port 0xbe, VDP 1 DATA Write */ | |
| 777 | segae_vdp_data_w(space->machine, 0, data); break; | |
| 778 | case 1: /* port 0xbf, VDP 1 CTRL Write */ | |
| 779 | segae_vdp_ctrl_w(0, data); break; | |
| 780 | } | |
| 781 | } | |
| 782 | #endif | |
| 783 | ||
| 784 | 613 | static ADDRESS_MAP_START( megaplay_bios_io_map, ADDRESS_SPACE_IO, 8 ) |
| 785 | 614 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 786 | 615 | AM_RANGE(0x7f, 0x7f) AM_DEVWRITE("sn2", sn76496_w) /* SN76489 */ |
| r6049 | r6050 | |
| 811 | 640 | //extern VIDEO_EOF(megadriv); |
| 812 | 641 | static MACHINE_RESET( mpnew ) |
| 813 | 642 | { |
| 814 | mp_bios_bank_addr = 0; | |
| 643 | mplay_bios.bios_mode = MP_ROM; | |
| 644 | mplay_bios.mp_bios_bank_addr = 0; | |
| 645 | mplay_bios.readpos = 1; | |
| 815 | 646 | MACHINE_RESET_CALL(megadriv); |
| 816 | 647 | MACHINE_RESET_CALL(megatech_bios); |
| 817 | 648 | } |
| r6049 | r6050 | |
| 1005 | 836 | ROM_END |
| 1006 | 837 | |
| 1007 | 838 | |
| 1008 | static void m | |
| 839 | static void m | |
| 1009 | 840 | { |
| 1010 | 841 | UINT8 *src = memory_region(machine, "mtbios"); |
| 1011 | 842 | UINT8 *instruction_rom = memory_region(machine, "user1"); |
| r6049 | r6050 | |
| 1013 | 844 | int offs; |
| 1014 | 845 | |
| 1015 | 846 | |
| 1016 | memmove(src+0x10000,src+0x8000,0x18000); // move bios.. | |
| 847 | memmove(src + 0x10000, src + 0x8000, 0x18000); // move bios.. | |
| 1017 | 848 | |
| 1018 | 849 | /* copy game instruction rom to main map.. maybe this should just be accessed |
| 1019 | 850 | through a handler instead?.. */ |
| 1020 | for (offs=0;offs<0x8000;offs++) | |
| 851 | for (offs = 0; offs < 0x8000; offs++) | |
| 1021 | 852 | { |
| 1022 | 853 | UINT8 dat; |
| 1023 | 854 | |
| 1024 | dat=instruction_rom[offs]; | |
| 855 | dat = instruction_rom[offs]; | |
| 1025 | 856 | |
| 1026 | game_rom[0x300000+offs*2] = dat; | |
| 1027 | game_rom[0x300001+offs*2] = dat; | |
| 857 | game_rom[0x300000 + offs * 2] = dat; | |
| 858 | game_rom[0x300001 + offs * 2] = dat; | |
| 1028 | 859 | |
| 1029 | 860 | } |
| 1030 | 861 | } |
| 1031 | 862 | |
| 1032 | 863 | static READ16_HANDLER( megadriv_68k_read_z80_extra_ram ) |
| 1033 | 864 | { |
| 1034 | return ic36_ram[(offset<<1)^1] | (ic36_ram[(offset<<1)]<<8); | |
| 865 | return ic36_ram[(offset << 1) ^ 1] | (ic36_ram[(offset << 1)] << 8); | |
| 1035 | 866 | } |
| 1036 | 867 | |
| 1037 | 868 | static WRITE16_HANDLER( megadriv_68k_write_z80_extra_ram ) |
| 1038 | 869 | { |
| 1039 | 870 | if (!ACCESSING_BITS_0_7) // byte (MSB) access |
| 1040 | 871 | { |
| 1041 | ic36_ram[(offset<<1)] = (data & 0xff00) >> 8; | |
| 872 | ic36_ram[(offset << 1)] = (data & 0xff00) >> 8; | |
| 1042 | 873 | } |
| 1043 | 874 | else if (!ACCESSING_BITS_8_15) |
| 1044 | 875 | { |
| 1045 | ic36_ram[(offset<<1)^1] = (data & 0x00ff); | |
| 876 | ic36_ram[(offset << 1) ^ 1] = (data & 0x00ff); | |
| 1046 | 877 | } |
| 1047 | 878 | else // for WORD access only the MSB is used, LSB is ignored |
| 1048 | 879 | { |
| 1049 | ic36_ram[(offset<<1)] = (data & 0xff00) >> 8; | |
| 880 | ic36_ram[(offset << 1)] = (data & 0xff00) >> 8; | |
| 1050 | 881 | } |
| 1051 | 882 | } |
| 1052 | 883 | |
| r6049 | r6050 | |
| 1054 | 885 | static DRIVER_INIT (megaplay) |
| 1055 | 886 | { |
| 1056 | 887 | /* to support the old code.. */ |
| 1057 | ic36_ram = auto_alloc_array(machine, UINT16, 0x10000/2); | |
| 888 | ic36_ram = auto_alloc_array(machine, UINT16, 0x10000 / 2); | |
| 1058 | 889 | ic37_ram = auto_alloc_array(machine, UINT8, 0x10000); |
| 1059 | genesis_io_ram = auto_alloc_array(machine, UINT16, 0x20/2); | |
| 890 | genesis_io_ram = auto_alloc_array(machine, UINT16, 0x20 / 2); | |
| 1060 | 891 | |
| 1061 | DRIVER_INIT_CALL(megadrij); | |
| 1062 | megplay_stat(machine); | |
| 892 | DRIVER_INIT_CALL(mpnew); | |
| 1063 | 893 | |
| 894 | mplay_start(machine); | |
| 895 | ||
| 1064 | 896 | /* for now ... */ |
| 1065 | memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa10000, 0xa1001f, 0, 0, | |
| 897 | memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa10000, 0xa1001f, 0, 0, | |
| 1066 | 898 | |
| 1067 | 899 | /* megaplay has ram shared with the bios cpu here */ |
| 1068 | 900 | memory_install_readwrite8_handler(cputag_get_address_space(machine, "genesis_snd_z80", ADDRESS_SPACE_PROGRAM), 0x2000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(7), (write8_space_func)SMH_BANK(7)); |
| r6049 | r6050 | |
| 1103 | 935 | didn't have original Sega part numbers it's probably a converted TWC cart |
| 1104 | 936 | */ |
| 1105 | 937 | |
| 1106 | /* -- */ GAME( 1993, megaplay, 0, mpnew, megaplay, megaplay, ROT0, "Sega", "Mega Play BIOS", GAME_IS_BIOS_ROOT ) | |
| 938 | /* -- */ GAME( 1993, megaplay, 0, mpnew, megaplay, megaplay, ROT0, "Sega", "Mega Play BIOS", GAME_IS_BIOS_ROOT ) | |
| 1107 | 939 | /* 01 */ GAME( 1993, mp_sonic, megaplay, mpnew, mp_sonic, megaplay, ROT0, "Sega", "Sonic The Hedgehog (Mega Play)" , 0 ) |
| 1108 | 940 | /* 02 */ GAME( 1993, mp_gaxe2, megaplay, mpnew, mp_gaxe2, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play)" , 0 ) |
| 1109 | 941 | /* 03 */ GAME( 1993, mp_gslam, megaplay, mpnew, mp_gslam, megaplay, ROT0, "Sega", "Grand Slam (Mega Play)",0 ) |
| 1110 | /* 04 */ GAME( 1993, mp_twc, megaplay, mpnew, mp_twc, megaplay, ROT0, "Sega", "Tecmo World Cup (Mega Play)" , 0 ) | |
| 1111 | /* 05 */ GAME( 1993, mp_sor2, megaplay, mpnew, mp_sor2, megaplay, ROT0, "Sega", "Streets of Rage II (Mega Play)" , 0 ) | |
| 942 | /* 04 */ GAME( 1993, mp_twc, megaplay, mpnew, mp_twc, megaplay, ROT0, "Sega", "Tecmo World Cup (Mega Play)" , 0 ) | |
| 943 | /* 05 */ GAME( 1993, mp_sor2, megaplay, mpnew, mp_sor2, megaplay, ROT0, "Sega", "Streets of Rage II (Mega Play)" , 0 ) | |
| 1112 | 944 | /* 06 */ GAME( 1993, mp_bio, megaplay, mpnew, mp_bio, megaplay, ROT0, "Sega", "Bio-hazard Battle (Mega Play)" , 0 ) |
| 1113 | 945 | /* 07 */ GAME( 1993, mp_soni2, megaplay, mpnew, mp_soni2, megaplay, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega Play)" , 0 ) |
| 1114 | 946 | /* 08 */ |
| r6049 | r6050 | |
| 1126 | 958 | the numbering prior to 'Streets of Rage 2' |
| 1127 | 959 | |
| 1128 | 960 | */ |
| 1129 |
| r6049 | r6050 | |
|---|---|---|
| 435 | 435 | |
| 436 | 436 | memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0xffff, 0, 0, multigam3_mmc3_rom_switch_w ); |
| 437 | 437 | |
| 438 | memory_set_bankptr(machine, 1, multigmc_mmc3_6000_ram); | |
| 438 | memory_set_bankptr(machine, 10, multigmc_mmc3_6000_ram); | |
| 439 | 439 | |
| 440 | 440 | multigam3_mmc3_banks[0] = 0x1e; |
| 441 | 441 | multigam3_mmc3_banks[1] = 0x1f; |
| r6049 | r6050 | |
| 450 | 450 | { |
| 451 | 451 | if (multigam_game_gfx_bank & 0x80) |
| 452 | 452 | { |
| 453 | set_videorom_bank(space->machine, 0, 8, (multigam_game_gfx_bank & 0x | |
| 453 | set_videorom_bank(space->machine, 0, 8, (multigam_game_gfx_bank & 0x3c) + (data & 0x3), 8); | |
| 454 | 454 | } |
| 455 | 455 | else |
| 456 | 456 | { |
| r6049 | r6050 | |
| 458 | 458 | } |
| 459 | 459 | }; |
| 460 | 460 | |
| 461 | static WRITE8_HANDLER(multigm3_switch_gfx_rom) | |
| 462 | { | |
| 463 | set_videorom_bank(space->machine, 0, 8, data & 0x3f, 8); | |
| 464 | set_mirroring(data & 0x40 ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); | |
| 465 | multigam_game_gfx_bank = data; | |
| 466 | }; | |
| 467 | ||
| 461 | 468 | static WRITE8_HANDLER(multigm3_switch_prg_rom) |
| 462 | 469 | { |
| 463 | 470 | /* switch PRG rom */ |
| r6049 | r6050 | |
| 472 | 479 | else |
| 473 | 480 | { |
| 474 | 481 | memory_install_write8_handler(space, 0x8000, 0xffff, 0, 0, multigm3_mapper2_w ); |
| 475 | memory_set_bankptr(space->machine, 1, memory_region(space->machine, "maincpu") + 0x6000); | |
| 482 | memory_set_bankptr(space->machine, 10, memory_region(space->machine, "maincpu") + 0x6000); | |
| 476 | 483 | } |
| 477 | 484 | |
| 478 | 485 | if (data & 0x80) |
| r6049 | r6050 | |
| 507 | 514 | AM_RANGE(0x4017, 0x4017) AM_READ(multigam_IN1_r) AM_DEVWRITE("nes", psg_4017_w) /* IN1 - input port 2 / PSG second control register */ |
| 508 | 515 | AM_RANGE(0x5001, 0x5001) AM_WRITE(multigm3_switch_prg_rom) |
| 509 | 516 | AM_RANGE(0x5002, 0x5002) AM_WRITENOP |
| 510 | AM_RANGE(0x5003, 0x5003) AM_WRITE(multig | |
| 517 | AM_RANGE(0x5003, 0x5003) AM_WRITE(multig | |
| 511 | 518 | AM_RANGE(0x5000, 0x5ffe) AM_ROM |
| 512 | 519 | AM_RANGE(0x5fff, 0x5fff) AM_READ_PORT("IN0") |
| 513 | AM_RANGE(0x6000, 0x7fff) AM_RAMBANK(1) | |
| 520 | AM_RANGE(0x6000, 0x7fff) AM_RAMBANK(10) | |
| 514 | 521 | AM_RANGE(0x6fff, 0x6fff) AM_WRITENOP /* 0x00 in attract mode, 0xff during play */ |
| 515 | 522 | AM_RANGE(0x8000, 0xffff) AM_ROM AM_WRITE(multigm3_mapper2_w) |
| 516 | 523 | ADDRESS_MAP_END |
| r6049 | r6050 | |
|---|---|---|
| 1 | /* | |
| 1 | /* | |
| 2 | 2 | |
| 3 | Bingo Roll / Bell Star | |
| 4 | ||
| 5 | ||
| 6 | ***************************************************** | |
| 7 | ||
| 8 | ||
| 9 | PCB Layout (Bell Star V3): | |
| 10 | ||
| 11 | ___________________________________________ | |
| 12 | ____________________| | | | | | | | | | | | | | | | | | | | | | |____________________ | |
| 13 | | 22x2 edge connector | | |
| 14 | | ___________ ___________ ___________ | | |
| 15 | | | 9CANH1M | | 9CANH1M | | 9CANH1M | | | |
| 16 | | | ULN2003AN | | ULN2003AN | | ULN2003AN | | | |
| 17 | | |___________| |___________| |___________| | | |
| 18 | | | | |
| 19 | | _______ ______________________________ | | |
| 20 | | |JM04AB | | | | | |
| 21 | | |LM/386N| | P8256AH L6140860 | | | |
| 22 | | |_______| | | | | |
| 23 | | | Intel 1975 | | | |
| 24 | | |______________________________| | | |
| 25 | | | | |
| 26 | | ____________ ___________ ____________ ____________ | | |
| 27 | | | 9BARTCK | | YMZ284-D | | 898-3-R10K | | 898-3-R10K | | | |
| 28 | | | SN74HCTD0N | | 9814QAAA | | | | | | | |
| 29 | | |____________| |___________| |____________| |____________| | | |
| 30 | | | | |
| 31 | | _____ _______________ | | |
| 32 | || | | | _____________ _____________ | | |
| 33 | || | | MHS E | | 86AEY4K | | 86AEY4K | | | |
| 34 | || | | S-82716-4 | | SN74HCT540N | | SN74HCT540N | | | |
| 35 | || (1) | | 8944 | |_____________| |_____________| | | |
| 36 | || | | | _____________ _____________ _________ | | |
| 37 | || | | | | 83C931K | | 83C931K | | 88A59LM | | | |
| 38 | || | | | | SN74HCT573N | | SN74HCT573N | | LM339N | | | |
| 39 | || | | | |_____________| |_____________| |_________| | | |
| 40 | ||_____| |_______________| | | |
| 41 | | | | |
| 42 | | _______________ ________________ ________________ | | |
| 43 | | | | | Bell Star V3 | | Bell Star V3 | | | |
| 44 | | | N800186-12 | | V.3.6.02 L | | V.3.6.02 H | | | |
| 45 | | | 9941GPA BR | | TMS27C256-10 | | TMS27C256-10 | | | |
| 46 | | | 8944 | |________________| |________________| | | |
| 47 | | | AMD | ________________ ________________ | | |
| 48 | | | INTEL '78 '82 | | B.S. Grafik | | B.S. Grafik | | | |
| 49 | | | | | 11.10.02 L | | 11.10.02 H | | | |
| 50 | | | | | M27C256B | | M27C256B | | | |
| 51 | | |_______________| |________________| |________________| | | |
| 52 | | | | |
| 53 | | ________________ ________________ | | |
| 54 | | _____________ | HY62256B | | HY62256B | | | |
| 55 | | | 83C931K | | LP-70 | | LP-70 | | | |
| 56 | | | SN74HCT573N | | 9846B KOREA | | 9846B KOREA | | | |
| 57 | | |_____________| |________________| |________________| | | |
| 58 | | | | |
| 59 | | _____________________ | | |
| 60 | | | 74HCT540N | __________ ________ __________ _______ | | |
| 61 | | | C5944ME / Hnn9931 D | | 86A4CY | |74HCT08N| | 06F6L9K | |ADM690 | | | |
| 62 | | |_____________________| |SN74HCT02N| |D0945PS | |SN74HCT32N| |AN/9927| | | |
| 63 | | |__________| |________| |__________| |_______| | | |
| 64 | | | | |
| 65 | | ______________ __________ ________________ | | |
| 66 | | | PIC 16C54C | | | | | | | |
| 67 | | | 04/P | | 24C04A | | 3.6 V. BATTERY | | | |
| 68 | | |______________| |__________| |________________| | | |
| 69 | | | | |
| 70 | |_____________________________________________________________________________________| | |
| 71 | ||
| 72 | ||
| 73 | (1) Siemens HYB5141758J-60 (Germany). | |
| 74 | ||
| 75 | - 1x Xtal 16 MHz. | |
| 76 | - 1x Xtal ?? MHz. | |
| 77 | ||
| 78 | ||
| 79 | Etched in copper: | |
| 80 | ||
| 81 | "VIP-3 PALOMA ELEKTRONIK" | |
| 82 | "gruber electronic gmbh" | |
| 83 | "KMG-Layout 007051" | |
| 84 | "Rev 1.0" | |
| 85 | "0103 VIP 3" | |
| 86 | ||
| 87 | ||
| 88 | ***************************************************** | |
| 89 | ||
| 90 | Pinout: | |
| 91 | ||
| 92 | ROLLING JOKER+ / BELL STAR+ | |
| 93 | ||
| 94 | +--------------------+----------------------+ | |
| 95 | | Solder | Component | | |
| 96 | +----------------+---+----+-----------------+ | |
| 97 | | GND | A | 1 | GND | | |
| 98 | | GND | B | 2 | GND | | |
| 99 | | GND | C | 3 | GND | | |
| 100 | | +5 Volt | D | 4 | +5 Volt | | |
| 101 | | +12 Volt | E | 5 | +12 Volt | | |
| 102 | | Lamp Hold1 | F | 6 | Lamp Start | | |
| 103 | | Lamp Hold2 | H | 7 | Lamp Hold5 | | |
| 104 | | Lamp Clear | J | 8 | Lamp Hold4 | | |
| 105 | | Coin 1 | K | 9 | Lamp Hold3 | | |
| 106 | | Counter In | L | 10 | Remote | | |
| 107 | | Counter Out | M | 11 | Button Hold1 | | |
| 108 | |Counter Remote | N | 12 | Button Clear | | |
| 109 | | Button Hold5 | P | 13 | Button Start | | |
| 110 | | Owner Bookk. | R | 14 | Rental Bookk. | | |
| 111 | | Button Hold2 | S | 15 | Button Hold4 | | |
| 112 | | Coin 2 | T | 16 | Button Hold3 | | |
| 113 | | nc | U | 17 | Hopper Count | | |
| 114 | | nc | V | 18 | Hopper Drive | | |
| 115 | | Video Green | W | 19 | Video Red | | |
| 116 | | Video Sync | X | 20 | Video Blue | | |
| 117 | | Speaker 1(+) | Y | 21 | Video Ground | | |
| 118 | | Credit Clear | Z | 22 | Speaker 1(-) | | |
| 119 | +----------------+---+----+-----------------+ | |
| 120 | ||
| 121 | ****************************************************/ | |
| 122 | ||
| 123 | ||
| 3 | 124 | #include "driver.h" |
| 4 | 125 | #include "cpu/i86/i86.h" |
| 5 | 126 | #include "cpu/pic16c5x/pic16c5x.h" |
| r6049 | r6050 | |
| 266 | 387 | ROM_LOAD( "bingor4_24c04a.bin", 0x000000, 0x200, CRC(38cf70a9) SHA1(ba9a1640200963e2d58d761edc13a24fa5ef44c2) ) |
| 267 | 388 | ROM_END |
| 268 | 389 | |
| 269 | GAME( 199?, bingor1, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bellstar? (set 1)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 270 | GAME( 199?, bingor2, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bellstar? (set 2)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 271 | GAME( 199?, bingor3, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bellstar? (set 3)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 272 | GAME( 199?, bingor4, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bellstar? (set 4)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 390 | /* | |
| 391 | ||
| 392 | BellStar V3 | |
| 393 | Same as bingor3, but with different program ROMs | |
| 394 | ||
| 395 | */ | |
| 396 | ||
| 397 | ROM_START( bingor5 ) /* BellStar V3 */ | |
| 398 | ROM_REGION( 0x20000, "boot_prg", ROMREGION_ERASE00 ) /* i186 code */ | |
| 399 | ROM_LOAD16_BYTE( "bellstar_v3_v.3.6.02_l.bin", 0x010000, 0x08000, CRC(56b84a5d) SHA1(1bda4fb972b4f0f0575089b545bf15dfea859948) ) | |
| 400 | ROM_LOAD16_BYTE( "bellstar_v3_v.3.6.02_h.bin", 0x010001, 0x08000, CRC(d6945bb8) SHA1(b620f1b547be03c4609bff8d06111d0ea425bae8) ) | |
| 401 | ||
| 402 | ROM_REGION( 0x20000, "gfx", ROMREGION_ERASE00 ) /* blitter data? */ | |
| 403 | ROM_LOAD16_BYTE( "b.s.grafik_11.10.02_l.bin", 0x000000, 0x08000, CRC(a8b22477) SHA1(92d638f0f188a43f14487989cf42195311fb2c35) ) //half size? | |
| 404 | ROM_LOAD16_BYTE( "b.s.grafik_11.10.02_h.bin", 0x000001, 0x08000, CRC(969d201c) SHA1(7705ceb383ef122538ebf8046041d1c24ec9b9a4) ) | |
| 405 | ||
| 406 | ROM_REGION( 0x20000, "pic", 0 ) /* protection? */ | |
| 407 | ROM_LOAD( "pic16c54c.bin", 0x000, 0x400, CRC(5a507be6) SHA1(f4fbfb7e7516eecab32d96b3a34ad88395edac9e) ) | |
| 408 | ||
| 409 | ROM_REGION( 0x20000, "eeprom", 0 ) /* eeprom */ | |
| 410 | ROM_LOAD( "bingor5_24c04a.bin", 0x000000, 0x200, CRC(fcff2d26) SHA1(aec1ddd38149404741a057c74bf84bfb4a8e4aa1) ) | |
| 411 | ROM_END | |
| 412 | ||
| 413 | ||
| 414 | ||
| 415 | GAME( 2002, bingor1, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bell Star? (set 1)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 416 | GAME( 2002, bingor2, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bell Star? (set 2)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 417 | GAME( 2002, bingor3, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bell Star? (set 3)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 418 | GAME( 2002, bingor4, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bell Star? (set 4)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 419 | GAME( 2002, bingor5, 0, bingor, bingor, 0, ROT0, "<unknown>", "Bingo Roll / Bell Star V3? (set 5)", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| r6049 | r6050 | |
|---|---|---|
| 227 | 227 | static READ32_HANDLER(backfire_eeprom_r) |
| 228 | 228 | { |
| 229 | 229 | /* some kind of screen indicator? checked by backfira set before it will boot */ |
| 230 | int backfire_screen = mame_rand(space->machine)&1; | |
| 231 | return ((eeprom_read_bit()<<24) | input_port_read(space->machine, "IN0") | |
| 232 | | ((input_port_read(space->machine, "IN2") & ~0x40) <<16) | |
| 233 | | ((input_port_read(space->machine, "IN3") & 0x40) <<16)) ^ (backfire_screen << 26) ; | |
| 230 | int backfire_screen = mame_rand(space->machine) & 1; | |
| 231 | return ((eeprom_read_bit() << 24) | input_port_read(space->machine, "IN0") | |
| 232 | | ((input_port_read(space->machine, "IN2") & 0xbf) << 16) | |
| 233 | | ((input_port_read(space->machine, "IN3") & 0x40) << 16)) ^ (backfire_screen << 26) ; | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | static READ32_HANDLER(backfire_control2_r) |
| 237 | 237 | { |
| 238 | // logerror("%08x:Read eprom %08x (%08x)\n",cpu_get_pc(space->cpu),offset<<1,mem_mask); | |
| 239 | return (eeprom_read_bit()<<24) | input_port_read(space->machine, "IN1") | (input_port_read(space->machine, "IN1")<<16); | |
| 238 | // logerror("%08x:Read eprom %08x (%08x)\n", cpu_get_pc(space->cpu), offset << 1, mem_mask); | |
| 239 | return (eeprom_read_bit() << 24) | input_port_read(space->machine, "IN1") | (input_port_read(space->machine, "IN1") << 16); | |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | #ifdef UNUSED_FUNCTION |
| 243 | 243 | static READ32_HANDLER(backfire_control3_r) |
| 244 | 244 | { |
| 245 | // logerror("%08x:Read eprom %08x (%08x)\n",cpu_get_pc(space->cpu),offset<<1,mem_mask); | |
| 246 | return (eeprom_read_bit()<<24) | input_port_read(space->machine, "IN2") | (input_port_read(space->machine, "IN2")<<16); | |
| 245 | // logerror("%08x:Read eprom %08x (%08x)\n", cpu_get_pc(space->cpu), offset << 1, mem_mask); | |
| 246 | return (eeprom_read_bit() << 24) | input_port_read(space->machine, "IN2") | (input_port_read(space->machine, "IN2") << 16); | |
| 247 | 247 | } |
| 248 | 248 | #endif |
| 249 | 249 |
| r6049 | r6050 | |
|---|---|---|
| 1 | /* | |
| 1 | /* | |
| 2 | 2 | |
| 3 | four ALTERA chips - they are probably video processors | |
| 4 | main CPU is z80 for sure, ROM is placed near it | |
| 5 | there are banked ROMs 8kb each, consisted of several banks | |
| 3 | Igrosoft gambling hardware | |
| 4 | ||
| 5 | +--+ +-----+ +-----------------------------------+ | |
| 6 | +--+ +-+PRINT+-+ | | |
| 7 | | +--------------+ | | |
| 8 | | | Z80B | | | |
| 9 | | VOL +----+---------+ | | |
| 10 | +-+ +-----------+ | PRG ROM | | | |
| 11 | | | KC89C72 | +---------+ | | |
| 12 | +-+ +-----------+ | M48T35Y | 24MHz -+ | |
| 13 | | +---------+ ADM690 V| | |
| 14 | | |---Connector------------------| G| | |
| 15 | |E A| | |
| 16 | |d -+ | |
| 17 | |g | | |
| 18 | |e | | |
| 19 | | | | |
| 20 | |C | | |
| 21 | |o | | |
| 22 | |n | | |
| 23 | |n | | |
| 24 | |e | | |
| 25 | |c Connector | | |
| 26 | |t |---Connector------------------| | | |
| 27 | |o +------+ +------+ +------+ +------+ | | |
| 28 | |r |ALTERA| |ALTERA| |ALTERA| |ALTERA| R | | |
| 29 | | | EPM | | EPM | | EPM | | EPM | A | | |
| 30 | | | 3032 | | 3032 | | 3032 | | 3032 | M | | |
| 31 | | +------+ +------+ +------+ +------+ | | |
| 32 | +-+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ | | |
| 33 | | | | | | | | | | | | | | | | | | | | |
| 34 | +-+ | 8 | | 7 | | 6 | | 5 | | 4 | | 3 | | 2 | | 1 | | | |
| 35 | | | | | | | | | | | | | | | | | | | | |
| 36 | | | | | | | | | | | | | | | | | | | | |
| 37 | | +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ | | |
| 38 | +---------------------------------------------------+ | |
| 39 | ||
| 40 | "Head" sub board: | |
| 41 | +------------------------------+ | |
| 42 | ||--Connector-----------------|| | |
| 43 | | 61256AK-15 | | |
| 44 | | | | |
| 45 | | +---------+ | | |
| 46 | | | ALTERA | | | |
| 47 | | | MAX | | | |
| 48 | | | EPM3256 | | | |
| 49 | | | | | | |
| 50 | | +---------+ | | |
| 51 | | | | |
| 52 | | Connector | | |
| 53 | ||--Connector-----------------|| | |
| 54 | +------------------------------+ | |
| 55 | ||
| 56 | CPU: Z80 | |
| 57 | Video: ALTERA EPM3032ALC44-10 (x4) + ALTERA MAX EPM3256AOC208-10 (on the HEAD sub board) | |
| 58 | Sound: File KC98C72 (compatible to YM2149 / AY3-9810) | |
| 59 | OSC: 24MHz | |
| 60 | RAM: UMC UM61256AK-15 (x2 on mainboard, one on the HEAD) | |
| 61 | NVRAM: Timekeeper M48T35-70PC1 | |
| 62 | Other: ADM ADM690AN (Microprocessor Supervisory Circuit AKA Watchdog timer) | |
| 63 | VGA connector for video output | |
| 64 | ||
| 65 | Edge Connector is 36 count dual (IE: both sides) JAMMA-like connection (standard 8-liner??) | |
| 66 | ||
| 6 | 67 | RAM has E000 address |
| 7 | the sound is PSG - AY3-8910 analog (http://pt.wikipedia.org/wiki/KC89C72) | |
| 8 | z80 CPU is complete with indexed registers | |
| 9 | video - VGA | |
| 10 | 68 | |
| 11 | 69 | To Init the games |
| 12 | 70 | |
| r6049 | r6050 | |
| 30 | 88 | Todo: |
| 31 | 89 | ------------------------------------------------------------------------- |
| 32 | 90 | Hook up Lamps |
| 33 | Emulate the RTC (real time clock) | |
| 34 | 91 | |
| 35 | 92 | |
| 36 | 93 | NOTE: |
| r6049 | r6050 | |
| 41 | 98 | but not the CRC32 hash. These sets are excluded using the 'ALL_REVISIONS' |
| 42 | 99 | "#if" statements but listed in the driver below. |
| 43 | 100 | |
| 101 | Banking addresses are likely controlled via a GAL/PAL and was added at some | |
| 102 | point to try and prevent rom swaps and conversions. Many of the hacked sets | |
| 103 | below are simply made to the banking address to run on other boards. | |
| 104 | ||
| 105 | Bank addresses | |
| 106 | --------------------- | |
| 107 | Island 2 E1 | |
| 108 | Gnome E5 | |
| 109 | Sweet Life 2 E8 | |
| 110 | Fruit Coctail 2 EA | |
| 111 | Multi Fish F8 | |
| 112 | Crazy Monkey F9 | |
| 113 | Fruit Coctail F9 | |
| 114 | Garage F9 | |
| 115 | Resident F9 | |
| 116 | Lucky Hunter F9 | |
| 117 | Rock Climber F9 | |
| 118 | Roll Fruit F9 | |
| 119 | Pirate FA | |
| 120 | Sweet Life FA | |
| 121 | Island FB | |
| 122 | Keks FC | |
| 123 | Pirate 2 FD | |
| 124 | ||
| 44 | 125 | */ |
| 45 | 126 | |
| 46 | 127 | #define ALL_REVISIONS 0 |
| r6049 | r6050 | |
| 88 | 169 | 0); |
| 89 | 170 | } |
| 90 | 171 | |
| 91 | ||
| 92 | 172 | static VIDEO_START(multfish) |
| 93 | 173 | { |
| 94 | 174 | multfish_vid = auto_alloc_array(machine, UINT8, multfish_VIDRAM_SIZE); |
| r6049 | r6050 | |
| 107 | 187 | tilemap_set_scroll_cols(multfish_reel_tilemap, 64); |
| 108 | 188 | } |
| 109 | 189 | |
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | 190 | static VIDEO_UPDATE(multfish) |
| 115 | 191 | { |
| 116 | 192 | int i; |
| r6049 | r6050 | |
| 209 | 285 | otherrambk = data & 0xf0; |
| 210 | 286 | } |
| 211 | 287 | |
| 212 | ||
| 213 | 288 | static READ8_HANDLER( ray_r ) |
| 214 | 289 | { |
| 215 | 290 | // the games read the raster beam position as part of the hardware checks.. |
| r6049 | r6050 | |
| 238 | 313 | multfish_hopper_motor = data & 0x10; //0x10 Hopper Motor (33B) |
| 239 | 314 | } |
| 240 | 315 | |
| 316 | INLINE UINT8 make_bcd(UINT8 data) | |
| 317 | { | |
| 318 | return ((data / 10) << 4) | (data % 10); | |
| 319 | } | |
| 241 | 320 | |
| 321 | static READ8_HANDLER(multfish_rtc_r) | |
| 322 | { | |
| 323 | mame_system_time systime; | |
| 324 | ||
| 325 | mame_get_current_datetime(space->machine, &systime); | |
| 326 | switch (offset) | |
| 327 | { | |
| 328 | case 0: | |
| 329 | return 0; | |
| 330 | case 1: | |
| 331 | return make_bcd(systime.local_time.second); | |
| 332 | case 2: | |
| 333 | return make_bcd(systime.local_time.minute); | |
| 334 | case 3: | |
| 335 | return make_bcd(systime.local_time.hour); | |
| 336 | case 4: | |
| 337 | return make_bcd(systime.local_time.weekday); | |
| 338 | case 5: | |
| 339 | return make_bcd(systime.local_time.mday); | |
| 340 | case 6: | |
| 341 | return make_bcd(systime.local_time.month+1); | |
| 342 | case 7: | |
| 343 | return make_bcd(systime.local_time.year % 100); | |
| 344 | default: | |
| 345 | return 0; | |
| 346 | } | |
| 347 | } | |
| 348 | ||
| 349 | static WRITE8_HANDLER(multfish_rtc_w) | |
| 350 | { | |
| 351 | ||
| 352 | } | |
| 353 | ||
| 354 | ||
| 242 | 355 | static ADDRESS_MAP_START( multfish_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 243 | 356 | AM_RANGE(0x0000, 0x7fff) AM_READWRITE(SMH_ROM, multfish_vid_w) |
| 244 | 357 | AM_RANGE(0x8000, 0xbfff) AM_READWRITE(SMH_BANK(1), SMH_ROM ) |
| 245 | AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 358 | AM_RANGE(0xc000, 0xdff7) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 359 | AM_RANGE(0xdff8, 0xdfff) AM_READWRITE(multfish_rtc_r, multfish_rtc_w) | |
| 246 | 360 | AM_RANGE(0xe000, 0xffff) AM_READWRITE(bankedram_r, bankedram_w) |
| 247 | 361 | ADDRESS_MAP_END |
| 248 | 362 | |
| r6049 | r6050 | |
| 405 | 519 | //popmessage("multfish_f3_w %02x",data); |
| 406 | 520 | } |
| 407 | 521 | |
| 408 | ||
| 409 | 522 | static WRITE8_HANDLER( multfish_f4_w ) |
| 410 | 523 | { |
| 411 | 524 | //popmessage("multfish_f4_w %02x",data); // display enable? |
| r6049 | r6050 | |
| 438 | 551 | |
| 439 | 552 | AM_RANGE(0x90, 0x90) AM_READ(ray_r) |
| 440 | 553 | |
| 441 | AM_RANGE(0xe1, 0xe1) AM_WRITE(multfish_bank_w) | |
| 442 | AM_RANGE(0xe5, 0xe5) AM_WRITE(multfish_bank_w) | |
| 443 | AM_RANGE(0xe8, 0xe8) AM_WRITE(multfish_bank_w) // mirror banking for some games | |
| 444 | AM_RANGE(0xea, 0xea) AM_WRITE(multfish_bank_w) // mirror banking for some games | |
| 554 | AM_RANGE(0xd0, 0xd0) AM_WRITE(multfish_bank_w) // rollfr_3a banking | |
| 555 | AM_RANGE(0xe1, 0xe1) AM_WRITE(multfish_bank_w) // Island 2 banking | |
| 556 | AM_RANGE(0xe5, 0xe5) AM_WRITE(multfish_bank_w) // Gnome banking | |
| 557 | AM_RANGE(0xe8, 0xe8) AM_WRITE(multfish_bank_w) // Sweet Life 2 banking | |
| 558 | AM_RANGE(0xea, 0xea) AM_WRITE(multfish_bank_w) // Fruit Cocktail 2 banking | |
| 445 | 559 | |
| 446 | 560 | AM_RANGE(0xf1, 0xf1) AM_WRITE(multfish_rambank_w) |
| 447 | 561 | AM_RANGE(0xf3, 0xf3) AM_WRITE(multfish_f3_w) // from 00->01 at startup, irq enable maybe? |
| r6049 | r6050 | |
| 452 | 566 | ADDRESS_MAP_END |
| 453 | 567 | |
| 454 | 568 | |
| 455 | ||
| 456 | ||
| 457 | 569 | static const gfx_layout tiles16x16_layout = |
| 458 | 570 | { |
| 459 | 571 | 16,16, |
| r6049 | r6050 | |
| 473 | 585 | }; |
| 474 | 586 | |
| 475 | 587 | |
| 476 | ||
| 477 | 588 | static GFXDECODE_START( multfish ) |
| 478 | 589 | GFXDECODE_ENTRY( "gfx", 0, tiles16x16_layout, 0, 16 ) |
| 479 | 590 | GFXDECODE_END |
| r6049 | r6050 | |
| 525 | 636 | MACHINE_DRIVER_END |
| 526 | 637 | |
| 527 | 638 | |
| 528 | ||
| 529 | 639 | /********************************************************* |
| 530 | 640 | Multifish |
| 531 | 641 | **********************************************************/ |
| r6049 | r6050 | |
| 577 | 687 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(29f1a326) SHA1(5e268411cab888c0727aaf8ae7d0b435d2efd189) ) |
| 578 | 688 | ROM_END |
| 579 | 689 | |
| 580 | ROM_START( mfish_3a ) // 021124 | |
| 690 | ROM_START( mfish_3a ) // 021124 bank F9 | |
| 581 | 691 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 582 | 692 | ROM_LOAD( "mf021124a.rom", 0x00000, 0x40000, CRC(31344b4e) SHA1(33c7f30b55d22c087a02e840456d475177df8bf1) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 583 | 693 | |
| r6049 | r6050 | |
| 697 | 807 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(9afdc2d3) SHA1(b112fd2005354c9f97d77030bdb6f99d7b5c8050) ) |
| 698 | 808 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(29f1a326) SHA1(5e268411cab888c0727aaf8ae7d0b435d2efd189) ) |
| 699 | 809 | ROM_END |
| 810 | #endif | |
| 700 | 811 | |
| 701 | 812 | ROM_START( mfish_11 ) // 031124 |
| 702 | 813 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 703 | ROM_LOAD( "mf031124.rom", 0x00000, 0x40000, | |
| 814 | ROM_LOAD( "mf031124.rom", 0x00000, 0x40000, CRC( | |
| 704 | 815 | |
| 705 | 816 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 706 | 817 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(2f2a7367) SHA1(ce7ee9ca4f374ec61edc3b89d4752f0edb64a910) ) |
| r6049 | r6050 | |
| 712 | 823 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(9afdc2d3) SHA1(b112fd2005354c9f97d77030bdb6f99d7b5c8050) ) |
| 713 | 824 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(29f1a326) SHA1(5e268411cab888c0727aaf8ae7d0b435d2efd189) ) |
| 714 | 825 | ROM_END |
| 715 | #endif | |
| 716 | 826 | |
| 717 | 827 | ROM_START( mfish_12 ) // 040308 |
| 718 | 828 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| r6049 | r6050 | |
| 729 | 839 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(29f1a326) SHA1(5e268411cab888c0727aaf8ae7d0b435d2efd189) ) |
| 730 | 840 | ROM_END |
| 731 | 841 | |
| 732 | ROM_START( mfish_12a ) // 040308 | |
| 842 | ROM_START( mfish_12a ) // 040308 bank F9 | |
| 733 | 843 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 734 | 844 | ROM_LOAD( "mf040308a.rom", 0x00000, 0x40000, CRC(44537648) SHA1(7bce6085778ff0b21c052ae91703de3b78b8eed0) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 735 | 845 | |
| r6049 | r6050 | |
| 876 | 986 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(6fdb6fd5) SHA1(f40916112365de258956ec033aff79aae1f58690) ) |
| 877 | 987 | ROM_END |
| 878 | 988 | |
| 879 | ROM_START( crzmon_7a ) // 031110 | |
| 989 | ROM_START( crzmon_7a ) // 031110 backdoor | |
| 880 | 990 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 881 | 991 | ROM_LOAD( "cm031110a.rom", 0x00000, 0x40000, CRC(80666246) SHA1(e15a210b11ba769ca4fd637c962932417555dc0e) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 882 | 992 | |
| r6049 | r6050 | |
| 891 | 1001 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(6fdb6fd5) SHA1(f40916112365de258956ec033aff79aae1f58690) ) |
| 892 | 1002 | ROM_END |
| 893 | 1003 | |
| 894 | ROM_START( crzmon_7b ) // 031110 | |
| 1004 | ROM_START( crzmon_7b ) // 031110 backdoor | |
| 895 | 1005 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 896 | 1006 | ROM_LOAD( "cm031110b.rom", 0x00000, 0x40000, CRC(bb6f4f85) SHA1(a2f44632f857392eb422412b55a19decae4c8620) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 897 | 1007 | |
| r6049 | r6050 | |
| 921 | 1031 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(6fdb6fd5) SHA1(f40916112365de258956ec033aff79aae1f58690) ) |
| 922 | 1032 | ROM_END |
| 923 | 1033 | |
| 924 | ROM_START( crzmon_8a ) // 050120 | |
| 1034 | ROM_START( crzmon_8a ) // 050120 backdoor | |
| 925 | 1035 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 926 | 1036 | ROM_LOAD( "cm050120a.rom", 0x00000, 0x40000, CRC(e20a6997) SHA1(50e0f0f354dd6db2be64d42e36b4043915c4276b) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 927 | 1037 | |
| r6049 | r6050 | |
| 936 | 1046 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(6fdb6fd5) SHA1(f40916112365de258956ec033aff79aae1f58690) ) |
| 937 | 1047 | ROM_END |
| 938 | 1048 | |
| 1049 | ROM_START( crzmon_8b ) // 050120 changed version text to 070315 | |
| 1050 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1051 | ROM_LOAD( "cm050120b.rom", 0x00000, 0x40000, CRC(9350d184) SHA1(ccb79bb6c5e9025d64fe07c02334c43d75ee3334) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1052 | ||
| 1053 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1054 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(683f2be3) SHA1(6fdba4ec07752bf049787a11638895352e9d5f10) ) | |
| 1055 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(e21ce6a4) SHA1(942ffe323ddbcaaad887cb5bc9f356550926083b) ) | |
| 1056 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(c3d0e3d5) SHA1(5b0cb436c6b0bac1213c1df56702fa7f16856106) ) | |
| 1057 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(f79df52c) SHA1(b99fa9f61849b62668bf9edff1c80212a9108b15) ) | |
| 1058 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(9d4d2a94) SHA1(c714e110de628b343dfc7fff23befaa1276056a9) ) | |
| 1059 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(a15f0fee) SHA1(3f06d5a1a41e1335bcc7586a5ea95b9b734155c0) ) | |
| 1060 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(715a2528) SHA1(6c4c72592568ecbaa9518fb7271d2714dd22dbbb) ) | |
| 1061 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(6fdb6fd5) SHA1(f40916112365de258956ec033aff79aae1f58690) ) | |
| 1062 | ROM_END | |
| 1063 | ||
| 939 | 1064 | /********************************************************* |
| 940 | 1065 | Fruit Cocktail |
| 941 | 1066 | |
| r6049 | r6050 | |
| 1036 | 1161 | ROM_LOAD( "8b", 0x380000, 0x80000, CRC(d282e42e) SHA1(eac9c3eaef39b1805f863ade5da47d6274d20a55) ) |
| 1037 | 1162 | ROM_END |
| 1038 | 1163 | |
| 1039 | ROM_START( fcockt_6a ) // 040216 | |
| 1164 | ROM_START( fcockt_6a ) // 040216 bank F8 | |
| 1040 | 1165 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1041 | 1166 | ROM_LOAD( "fc040216a.rom", 0x00000, 0x40000, CRC(58e7a0c6) SHA1(8022f92af05e9ff6999ff936bad6048d6c264086) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1042 | 1167 | |
| r6049 | r6050 | |
| 1051 | 1176 | ROM_LOAD( "8b", 0x380000, 0x80000, CRC(d282e42e) SHA1(eac9c3eaef39b1805f863ade5da47d6274d20a55) ) |
| 1052 | 1177 | ROM_END |
| 1053 | 1178 | |
| 1054 | ROM_START( fcockt_6b ) // 040216 | |
| 1179 | ROM_START( fcockt_6b ) // 040216 backdoor | |
| 1055 | 1180 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1056 | 1181 | ROM_LOAD( "fc040216b.rom", 0x00000, 0x40000, CRC(0f6bcf03) SHA1(6c8765f836f1d899aec3be9c842d5064fd70a435) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1057 | 1182 | |
| r6049 | r6050 | |
| 1081 | 1206 | ROM_LOAD( "8b", 0x380000, 0x80000, CRC(d282e42e) SHA1(eac9c3eaef39b1805f863ade5da47d6274d20a55) ) |
| 1082 | 1207 | ROM_END |
| 1083 | 1208 | |
| 1084 | ROM_START( fcockt_7a ) // 050118 | |
| 1209 | ROM_START( fcockt_7a ) // 050118 backdoor | |
| 1085 | 1210 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1086 | 1211 | ROM_LOAD( "fc050118a.rom", 0x00000, 0x40000, CRC(eb2bd908) SHA1(b8e9ef469767fb9e95ff181876ffeaee4b7b9361) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1087 | 1212 | |
| r6049 | r6050 | |
| 1181 | 1306 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(1bdf6252) SHA1(7b5ae82a95a744b236e109024d47b526dccf9c14) ) |
| 1182 | 1307 | ROM_END |
| 1183 | 1308 | |
| 1184 | ROM_START( lhaunt_4a ) // 031111 | |
| 1309 | ROM_START( lhaunt_4a ) // 031111 backdoor | |
| 1185 | 1310 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1186 | 1311 | ROM_LOAD( "lh031111a.rom", 0x00000, 0x40000, CRC(83d487c9) SHA1(5b88745d06acba542e2d0660298c9058f2bdfa3f) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1187 | 1312 | |
| r6049 | r6050 | |
| 1211 | 1336 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(1bdf6252) SHA1(7b5ae82a95a744b236e109024d47b526dccf9c14) ) |
| 1212 | 1337 | ROM_END |
| 1213 | 1338 | |
| 1214 | ROM_START( lhaunt_5a ) // 040216 | |
| 1339 | ROM_START( lhaunt_5a ) // 040216 backdoor | |
| 1215 | 1340 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1216 | 1341 | ROM_LOAD( "lh040216a.rom", 0x00000, 0x40000, CRC(2a6c7ff9) SHA1(4a0137c7df5003e8fd843d5489d416d15f001f46) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1217 | 1342 | |
| r6049 | r6050 | |
| 1241 | 1366 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(1bdf6252) SHA1(7b5ae82a95a744b236e109024d47b526dccf9c14) ) |
| 1242 | 1367 | ROM_END |
| 1243 | 1368 | |
| 1244 | ROM_START( lhaunt_6a ) // 040825 | |
| 1369 | ROM_START( lhaunt_6a ) // 040825 backdoor | |
| 1245 | 1370 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1246 | 1371 | ROM_LOAD( "lh040825a.rom", 0x00000, 0x40000, CRC(18ba5704) SHA1(3c77ed129db0e5181217167b76292f8e4ee78728) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1247 | 1372 | |
| r6049 | r6050 | |
| 1326 | 1451 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(90c5416b) SHA1(583bfb517bc2e30d7b7903aa19fc3b4b5188d7d2) ) |
| 1327 | 1452 | ROM_END |
| 1328 | 1453 | |
| 1329 | ROM_START( garage_4a ) // 040219 | |
| 1454 | ROM_START( garage_4a ) // 040219 backdoor | |
| 1330 | 1455 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1331 | 1456 | ROM_LOAD( "gg040219a.rom", 0x00000, 0x40000, CRC(e16b213a) SHA1(af0d78116d985efe5f09eb86eb67df2535765527) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1332 | 1457 | |
| r6049 | r6050 | |
| 1341 | 1466 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(90c5416b) SHA1(583bfb517bc2e30d7b7903aa19fc3b4b5188d7d2) ) |
| 1342 | 1467 | ROM_END |
| 1343 | 1468 | |
| 1344 | ROM_START( garage_ | |
| 1469 | ROM_START( garage_4b ) // 040219 changed version text to 070329 | |
| 1345 | 1470 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1471 | ROM_LOAD( "gg040219b.rom", 0x00000, 0x40000, CRC(b8ebf3b6) SHA1(14c5263571123d251125723b32861bef578de67b) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1472 | ||
| 1473 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1474 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(57acd4bc) SHA1(8796f463787c359cce6ac09c1b6895f871bbb7c9) ) | |
| 1475 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(6d591fa3) SHA1(ddbdf87e0e88dc848b963fbfcb6e14d7b3b9efdc) ) | |
| 1476 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(6a15eeda) SHA1(ac35a20893b0518a159207401f6b7f58e3de45fa) ) | |
| 1477 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(38f2cd3c) SHA1(5a4463ac352e4e340c6aaa61102841541e9f4c48) ) | |
| 1478 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(5bf85bc5) SHA1(ff9d2b9cbcd2af6f5fda972e387820d830c196a9) ) | |
| 1479 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(e5082b26) SHA1(6547409d39dd51498ce8e3f82ff813a8ac3c6522) ) | |
| 1480 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(dfa2ceb1) SHA1(ec7de8a8f6e7785a563df973841cc1f1603f79fc) ) | |
| 1481 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(90c5416b) SHA1(583bfb517bc2e30d7b7903aa19fc3b4b5188d7d2) ) | |
| 1482 | ROM_END | |
| 1483 | ||
| 1484 | ROM_START( garage_5 ) // 050311 | |
| 1485 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1346 | 1486 | ROM_LOAD( "gg050311.rom", 0x00000, 0x40000, CRC(405aee88) SHA1(356a8c309434ae4ad6b6fab97aeaece8aa60a730) ) |
| 1347 | 1487 | |
| 1348 | 1488 | ROM_REGION( 0x400000, "gfx", 0 ) |
| r6049 | r6050 | |
| 1356 | 1496 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(90c5416b) SHA1(583bfb517bc2e30d7b7903aa19fc3b4b5188d7d2) ) |
| 1357 | 1497 | ROM_END |
| 1358 | 1498 | |
| 1359 | ROM_START( garage_5a ) // 050311 | |
| 1499 | ROM_START( garage_5a ) // 050311 backdoor | |
| 1360 | 1500 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1361 | 1501 | ROM_LOAD( "gg050311a.rom", 0x00000, 0x40000, CRC(874a2c27) SHA1(9bf586314f375c2c6f7d79557cc777ac3559cb64) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1362 | 1502 | |
| r6049 | r6050 | |
| 1490 | 1630 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(75954355) SHA1(e6ef2b70d859b61e8e3d1751de8558b8778e502d) ) |
| 1491 | 1631 | ROM_END |
| 1492 | 1632 | |
| 1633 | ROM_START( sweetlb ) // 041220 bank F9, changed version text to 070412 | |
| 1634 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1635 | ROM_LOAD( "sl041220b.rom", 0x00000, 0x40000, CRC(53f1a0e1) SHA1(a00a8e8d95bd2be27313c1421d40120ee79ff29d) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1636 | ||
| 1637 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1638 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(a096c786) SHA1(81f6b083cb089e9412a8506889196354c670d945) ) | |
| 1639 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(c5e1e22c) SHA1(973ad27681a0f3beee7084b1b85fc9deb79d638e) ) | |
| 1640 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(af335323) SHA1(b8afdce231a8ec0f313cc47e00a27f05461bbbc4) ) | |
| 1641 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(a35c7503) SHA1(78f7a868660bbaa066e8e9e341db52018aaf3af1) ) | |
| 1642 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(e2d6b632) SHA1(65d05e55671b8c335cae2dfbf6a6f5bd8cc90e2c) ) | |
| 1643 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(d34e0905) SHA1(cc4afe64fb9052a31f759be41ff07a727e0a9093) ) | |
| 1644 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(978b67bb) SHA1(87357d5832588f00272bd76df736c06c599f3853) ) | |
| 1645 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(75954355) SHA1(e6ef2b70d859b61e8e3d1751de8558b8778e502d) ) | |
| 1646 | ROM_END | |
| 1647 | ||
| 1493 | 1648 | /********************************************************* |
| 1494 | 1649 | Resident |
| 1495 | 1650 | |
| r6049 | r6050 | |
| 1674 | 1829 | ROM_END |
| 1675 | 1830 | #endif |
| 1676 | 1831 | |
| 1677 | ROM_START( pirate_ | |
| 1832 | ROM_START( pirate_2 ) // 060210 | |
| 1678 | 1833 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1679 | 1834 | ROM_LOAD( "pr060210.rom", 0x00000, 0x40000, CRC(5684d67d) SHA1(4cbd103bcd071df26830d56760ef477b9a652857) ) |
| 1680 | 1835 | |
| r6049 | r6050 | |
| 1689 | 1844 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(cc2edac2) SHA1(24bacd9e092a83945a8def3a254ec66758d71ff5) ) |
| 1690 | 1845 | ROM_END |
| 1691 | 1846 | |
| 1847 | ROM_START( pirate_3 ) // 060803 | |
| 1848 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1849 | ROM_LOAD( "pr060803.rom", 0x00000, 0x40000, CRC(1de68707) SHA1(99dd3c5186ed8ba6c17e9f5479df93173da527e0) ) | |
| 1850 | ||
| 1851 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1852 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(d2199619) SHA1(8c67ef7d0e305ae0783302ba9a1cb56cdcf4bc09) ) | |
| 1853 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(ce5c6548) SHA1(ef1cd6ae36cc1abcf010762dc89a255cd817d016) ) | |
| 1854 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(d6a8338d) SHA1(6a0e41309dc909decf8bd49cf13cbeca95f0314a) ) | |
| 1855 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(590b8cf6) SHA1(b2778f6e1b7bcf7f33ced43f999eff983e5a6af4) ) | |
| 1856 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(bf9f1267) SHA1(b0947bd7d31301ffbe80cbaf1e96c3476f6f9ca3) ) | |
| 1857 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(b0cdf7eb) SHA1(cf6bd20fb40cf0d87eeb6f1502fb73d9760c9140) ) | |
| 1858 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(6c4a9510) SHA1(e10bf8475ff7c73ba90b904b9214b285a5b2669f) ) | |
| 1859 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(cc2edac2) SHA1(24bacd9e092a83945a8def3a254ec66758d71ff5) ) | |
| 1860 | ROM_END | |
| 1861 | ||
| 1862 | ||
| 1692 | 1863 | /********************************************************* |
| 1864 | Pirate 2 | |
| 1865 | **********************************************************/ | |
| 1866 | ||
| 1867 | ROM_START( pirate2 ) // 061005 | |
| 1868 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1869 | ROM_LOAD( "pr2_061005.rom", 0x00000, 0x40000, CRC(4ad0a29a) SHA1(72950da5f201a393a4761a8696cfc210725df23f) ) | |
| 1870 | ||
| 1871 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1872 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1873 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1874 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1875 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1876 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1877 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1878 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1879 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1880 | ROM_END | |
| 1881 | ||
| 1882 | ROM_START( pirate2a ) // 061005 bank F9 | |
| 1883 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1884 | ROM_LOAD( "pr2_061005a.rom", 0x00000, 0x40000, CRC(2271eb23) SHA1(6a3e01b59df08a23e5f53ee9b9e473b9f5f5e3b6) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1885 | ||
| 1886 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1887 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1888 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1889 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1890 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1891 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1892 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1893 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1894 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1895 | ROM_END | |
| 1896 | ||
| 1897 | ROM_START( pirate2b ) // 061005 bank F9, skip raster beam position check | |
| 1898 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1899 | ROM_LOAD( "pr2_061005b.rom", 0x00000, 0x40000, CRC(379f890e) SHA1(0fd05c1bf08fd3e6694f18ffe2ea9741cf465617) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1900 | ||
| 1901 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1902 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1903 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1904 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1905 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1906 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1907 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1908 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1909 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1910 | ROM_END | |
| 1911 | ||
| 1912 | ROM_START( pirate2c ) // 061005 bank F9, changed version text to 070126 | |
| 1913 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1914 | ROM_LOAD( "pr2_061005c.rom", 0x00000, 0x40000, CRC(7c4339df) SHA1(80e2f97629bc963f044c1697c65777a3fd038edc) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1915 | ||
| 1916 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1917 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1918 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1919 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1920 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1921 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1922 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1923 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1924 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1925 | ROM_END | |
| 1926 | ||
| 1927 | ROM_START( pirate2d ) // 061005 bank F9, changed version text to 070126 | |
| 1928 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1929 | ROM_LOAD( "pr2_061005d.rom", 0x00000, 0x40000, CRC(16620bb2) SHA1(bf3a26b06595e51fa37f2f8099a12e906a6ca439) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1930 | ||
| 1931 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1932 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1933 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1934 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1935 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1936 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1937 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1938 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1939 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1940 | ROM_END | |
| 1941 | ||
| 1942 | ROM_START( pirate2e ) // 061005 bank F9, changed version text to 070126, skip some start tests | |
| 1943 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 1944 | ROM_LOAD( "pr2_061005e.rom", 0x00000, 0x40000, CRC(f36edf02) SHA1(25ff61eb80b54298037b4a90d7fc93e8530e0815) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 1945 | ||
| 1946 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 1947 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(106e7cba) SHA1(289a3ae38b895c83600c920bee0c2dd46e941eac) ) | |
| 1948 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(076a290f) SHA1(2f9bb74e081262e535c8ed9a31589d6a919f5d15) ) | |
| 1949 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(13a91fe7) SHA1(6e127b3827a9271ad19986714747be9367125f62) ) | |
| 1950 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(5ac8c531) SHA1(1da91b9a71a9a8681577342660bfa85e5bbc99bc) ) | |
| 1951 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(98012c74) SHA1(2a5b466353eef3a5cfc9f98eceb7523b00d0204a) ) | |
| 1952 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(366e1465) SHA1(440230d5306c4b424f27839b7fb9c8a5bb922dcc) ) | |
| 1953 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(21fb963e) SHA1(e3f7fb13f326699e34aebcc3ee07016f7cfe6e46) ) | |
| 1954 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(40c59448) SHA1(774af0f376864ec5948904df338bc7493eaed392) ) | |
| 1955 | ROM_END | |
| 1956 | ||
| 1957 | /********************************************************* | |
| 1693 | 1958 | Keks |
| 1694 | 1959 | |
| 1695 | 1960 | Roms 1-4 were changed after the 070119 update. |
| r6049 | r6050 | |
| 1702 | 1967 | ROM_LOAD( "ks060328.rom", 0x00000, 0x40000, CRC(bcf77f77) SHA1(26b09994907c41be957a0b7442cfb1807b27d7be) ) |
| 1703 | 1968 | |
| 1704 | 1969 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 1705 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1706 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1707 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1708 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1709 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1710 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1711 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1712 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1970 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1971 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1972 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1973 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1974 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1975 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1976 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1977 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1713 | 1978 | ROM_END |
| 1714 | 1979 | |
| 1715 | ROM_START( keksa ) // 060328 | |
| 1980 | ROM_START( keksa ) // 060328 bank F9 | |
| 1716 | 1981 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1717 | 1982 | ROM_LOAD( "ks060328a.rom", 0x00000, 0x40000, CRC(7b387386) SHA1(d6bfc3b0d1f74723902d96dbcb69865cb5274cd0) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1718 | 1983 | |
| 1719 | 1984 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 1720 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1721 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1722 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1723 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1724 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1725 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1726 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1727 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1985 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1986 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1987 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1988 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1989 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1990 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1991 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1992 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1728 | 1993 | ROM_END |
| 1729 | 1994 | |
| 1730 | ROM_START( keksb ) // 060328 | |
| 1995 | ROM_START( keksb ) // 060328 backdoor | |
| 1731 | 1996 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1732 | 1997 | ROM_LOAD( "ks060328b.rom", 0x00000, 0x40000, CRC(661c7ee9) SHA1(f07902c4a3ba5fce5bc7fe666d90deb852e40b4c) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1733 | 1998 | |
| 1734 | 1999 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 1735 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1736 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1737 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1738 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1739 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1740 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1741 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1742 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 2000 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 2001 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 2002 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 2003 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 2004 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 2005 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 2006 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 2007 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1743 | 2008 | ROM_END |
| 1744 | 2009 | |
| 2010 | ROM_START( keksc ) // 060328 bank F9, changed version text to 070119 | |
| 2011 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 2012 | ROM_LOAD( "ks060328c.rom", 0x00000, 0x40000, CRC(fc70d26e) SHA1(0430ad20b797412967c2e82779eb7f0e9170f77c) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 2013 | ||
| 2014 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 2015 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 2016 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 2017 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 2018 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 2019 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 2020 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 2021 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 2022 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 2023 | ROM_END | |
| 2024 | ||
| 1745 | 2025 | ROM_START( keks_2 ) // 060403 |
| 1746 | 2026 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1747 | 2027 | ROM_LOAD( "ks060403.rom", 0x00000, 0x40000, CRC(7abb9392) SHA1(f7a0ba5bcc7566f706e911486fa9cf3e62b86b8b) ) |
| 1748 | 2028 | |
| 1749 | 2029 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 1750 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1751 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1752 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1753 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1754 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1755 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1756 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1757 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 2030 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 2031 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 2032 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 2033 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 2034 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 2035 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 2036 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 2037 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1758 | 2038 | ROM_END |
| 1759 | 2039 | |
| 1760 | ROM_START( keks_2a ) // 060403 | |
| 2040 | ROM_START( keks_2a ) // 060403 bank F9 | |
| 1761 | 2041 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked |
| 1762 | 2042 | ROM_LOAD( "ks060403a.rom", 0x00000, 0x40000, CRC(bd749f63) SHA1(dc3ba624b186370896d3ecf5968a82a17aa019d0) ) /* Not officially listed on Igrosoft's web site hash page */ |
| 1763 | 2043 | |
| 1764 | 2044 | ROM_REGION( 0x400000, "gfx", 0 ) |
| 1765 | ROM_LOAD( "1", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 1766 | ROM_LOAD( "2", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 1767 | ROM_LOAD( "3", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 1768 | ROM_LOAD( "4", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 1769 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 1770 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 1771 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 1772 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 2045 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 2046 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 2047 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 2048 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 2049 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 2050 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 2051 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 2052 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 1773 | 2053 | ROM_END |
| 1774 | 2054 | |
| 2055 | ROM_START( keks_2b ) // 060403 bank F9, changed version text to 070119 | |
| 2056 | ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked | |
| 2057 | ROM_LOAD( "ks060403b.rom", 0x00000, 0x40000, CRC(d089de90) SHA1(9208f411cd97fef89b52019f9655e7d006f91303) ) /* Not officially listed on Igrosoft's web site hash page */ | |
| 2058 | ||
| 2059 | ROM_REGION( 0x400000, "gfx", 0 ) | |
| 2060 | ROM_LOAD( "1a", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) ) | |
| 2061 | ROM_LOAD( "2a", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) ) | |
| 2062 | ROM_LOAD( "3a", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) ) | |
| 2063 | ROM_LOAD( "4a", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) ) | |
| 2064 | ROM_LOAD( "5", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) ) | |
| 2065 | ROM_LOAD( "6", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) ) | |
| 2066 | ROM_LOAD( "7", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) ) | |
| 2067 | ROM_LOAD( "8", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) ) | |
| 2068 | ROM_END | |
| 2069 | ||
| 1775 | 2070 | /* |
| 1776 | 2071 | |
| 1777 | 2072 | Note: |
| 1778 | 2073 | |
| 1779 | 2074 | Only the first set of a given revision is listed in Igrosoft's official hashes list. |
| 1780 | 2075 | |
| 1781 | It is not known if the alternate sets are hacks or were intended for different regions. | |
| 1782 | It looks like the difference are in the payout percentage / odds | |
| 2076 | The sets which differs from the originals by 5-6 bytes are bootlegs that simply change | |
| 2077 | the banking address. Usually to convert a Crazy Monkey PCB which use the address "F9". | |
| 2078 | Software exists to automatic modify any program rom's banking address for any PCB. | |
| 2079 | This has resulted in dozens of different bootleg versions floating around the net. | |
| 1783 | 2080 | |
| 2081 | Some sets simply changed the version text to show a newer version. This was likely done | |
| 2082 | so the opperator appears to be running a version that meets the standards of the changed | |
| 2083 | gambling law (see below). | |
| 2084 | ||
| 2085 | Sets marked as "backdoor" are identical to originals, but have added code. This code is | |
| 2086 | activated by a secret sequence of actions that leads to a guaranteed win, or dramatically | |
| 2087 | increases odds for winning. These backdoor version were commonly used by administrators | |
| 2088 | or PCB sellers to steal money from the slots owners. | |
| 2089 | Software does exist to automatically add the backdoor code and allows for custom key | |
| 2090 | sequences. As a result of this, there is also software to dectect the backdoor code | |
| 2091 | in program roms. | |
| 2092 | ||
| 1784 | 2093 | Most games had a revision in early 2007 to meet the standards of the "Government gambling control" |
| 1785 | 2094 | law of The Russian Federation No 244-03 of Dec 29, 2006 |
| 1786 | 2095 | |
| 1787 | From Igrosoft's web site about version types (IE: some version have "M" in them): | |
| 2096 | From Igrosoft's web site about version types (IE: some version have "M" in them): | |
| 1788 | 2097 | |
| 1789 | 2098 | * Two software versions are shown, one of them corresponds to Russian legislation, |
| 1790 | 2099 | the other one (with the letter m) is for the countries without such restrictions. |
| r6049 | r6050 | |
| 1793 | 2102 | |
| 1794 | 2103 | GAME( 2002, mfish_3, 0, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021124, set 1)", 0 ) |
| 1795 | 2104 | GAME( 2002, mfish_3a, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021124, set 2)", 0 ) |
| 1796 | GAME( 2002, mfish_12, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040308, set 1)", 0 ) | |
| 1797 | GAME( 2002, mfish_12a, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040308, set 2)", 0 ) | |
| 2105 | GAME( 2002, mfish_11, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031124)", 0 ) /* World */ | |
| 2106 | GAME( 2002, mfish_12, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040308)", 0 ) /* World */ | |
| 2107 | GAME( 2002, mfish_12a, mfish_3, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040308, banking address hack)", 0 ) // bank F9 | |
| 1798 | 2108 | #if ALL_REVISIONS |
| 1799 | GAME( 2002, mfish, 0, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021120)", 0 ) | |
| 1800 | GAME( 2002, mfish_2, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021121)", 0 ) | |
| 1801 | GAME( 2002, mfish_4, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021219)", 0 ) | |
| 1802 | GAME( 2002, mfish_5, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021227)", 0 ) | |
| 1803 | GAME( 2002, mfish_6, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030124)", 0 ) | |
| 1804 | GAME( 2002, mfish_7, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030511)", 0 ) | |
| 1805 | GAME( 2002, mfish_8, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030522)", 0 ) | |
| 1806 | GAME( 2002, mfish_9, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031026)", 0 ) | |
| 1807 | GAME( 2002, mfish_10, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031117)", 0 ) | |
| 1808 | GAME( 2002, mfish_11, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031124)", 0 ) | |
| 1809 | GAME( 2002, mfish_13, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040316)", 0 ) | |
| 2109 | GAME( 2002, mfish, 0, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021120)", 0 ) /* World */ | |
| 2110 | GAME( 2002, mfish_2, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021121)", 0 ) /* World */ | |
| 2111 | GAME( 2002, mfish_4, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021219)", 0 ) /* World */ | |
| 2112 | GAME( 2002, mfish_5, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (021227)", 0 ) /* World */ | |
| 2113 | GAME( 2002, mfish_6, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030124)", 0 ) /* World */ | |
| 2114 | GAME( 2002, mfish_7, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030511)", 0 ) /* World */ | |
| 2115 | GAME( 2002, mfish_8, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (030522)", 0 ) /* World */ | |
| 2116 | GAME( 2002, mfish_9, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031026)", 0 ) /* World */ | |
| 2117 | GAME( 2002, mfish_10, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (031117)", 0 ) /* World */ | |
| 2118 | GAME( 2002, mfish_13, mfish, multfish, multfish, 0, ROT0, "Igro", "Multi Fish (040316)", 0 ) /* World */ | |
| 1810 | 2119 | #endif |
| 1811 | 2120 | |
| 1812 | GAME( 2003, crzmon_7, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110, set 1)", 0 ) | |
| 1813 | GAME( 2003, crzmon_7a, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110, set 2)", 0 ) | |
| 1814 | GAME( 2003, crzmon_7b, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110, set 3)", 0 ) | |
| 1815 | GAME( 2003, crzmon_8, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (050120, set 1)", 0 ) | |
| 1816 | GAME( 2003, crzmon_8a, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (050120, set 2)", 0 ) | |
| 2121 | GAME( 2003, crzmon_7, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110)", 0 ) /* World */ | |
| 2122 | GAME( 2003, crzmon_7a, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110, backdoor set 1)", 0 ) // backdoor | |
| 2123 | GAME( 2003, crzmon_7b, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031110, backdoor set 2)", 0 ) // backdoor | |
| 2124 | GAME( 2003, crzmon_8, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (050120)", 0 ) /* World */ | |
| 2125 | GAME( 2003, crzmon_8a, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (050120, backdoor)", 0 ) // backdoor | |
| 2126 | GAME( 2003, crzmon_8b, crzmon_7, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (050120, changed version text)", 0 ) // changed version text to 070315 | |
| 1817 | 2127 | #if ALL_REVISIONS |
| 1818 | GAME( 2003, crzmon, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030217)", 0 ) | |
| 1819 | GAME( 2003, crzmon_2, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030225)", 0 ) | |
| 1820 | GAME( 2003, crzmon_3, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030227)", 0 ) | |
| 1821 | GAME( 2003, crzmon_4, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030404)", 0 ) | |
| 1822 | GAME( 2003, crzmon_5, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030421)", 0 ) | |
| 1823 | GAME( 2003, crzmon_6, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031016)", 0 ) | |
| 2128 | GAME( 2003, crzmon, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030217)", 0 ) /* World */ | |
| 2129 | GAME( 2003, crzmon_2, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030225)", 0 ) /* World */ | |
| 2130 | GAME( 2003, crzmon_3, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030227)", 0 ) /* World */ | |
| 2131 | GAME( 2003, crzmon_4, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030404)", 0 ) /* World */ | |
| 2132 | GAME( 2003, crzmon_5, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (030421)", 0 ) /* World */ | |
| 2133 | GAME( 2003, crzmon_6, crzmon, multfish, multfish, 0, ROT0, "Igrosoft", "Crazy Monkey (031016)", 0 ) /* World */ | |
| 1824 | 2134 | #endif |
| 1825 | 2135 | |
| 1826 | GAME( 2003, fcockt_6, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216, set 1)", 0 ) | |
| 1827 | GAME( 2003, fcockt_6a, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216, set 2)", 0 ) | |
| 1828 | GAME( 2003, fcockt_6b, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216, set 3)", 0 ) | |
| 1829 | GAME( 2003, fcockt_7, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (050118, set 1)", 0 ) | |
| 1830 | GAME( 2003, fcockt_7a, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (050118, set 2)", 0 ) | |
| 1831 | GAME( 2003, fcockt_8, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (060111)", 0 ) | |
| 2136 | GAME( 2003, fcockt_6, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216)", 0 ) /* World */ | |
| 2137 | GAME( 2003, fcockt_6a, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216, banking address hack)", 0 ) // bank F8 | |
| 2138 | GAME( 2003, fcockt_6b, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (040216, backdoor)", 0 ) // backdoor | |
| 2139 | GAME( 2003, fcockt_7, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (050118)", 0 ) /* World */ | |
| 2140 | GAME( 2003, fcockt_7a, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (050118, backdoor)", 0 ) // backdoor | |
| 2141 | GAME( 2003, fcockt_8, fcockt_6, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (060111)", 0 ) /* World */ | |
| 1832 | 2142 | #if ALL_REVISIONS |
| 1833 | GAME( 2003, fcockt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030505)", 0 ) | |
| 1834 | GAME( 2003, fcockt_2, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030512)", 0 ) | |
| 1835 | GAME( 2003, fcockt_3, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030623)", 0 ) | |
| 1836 | GAME( 2003, fcockt_4, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (031028)", 0 ) | |
| 1837 | GAME( 2003, fcockt_5, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (031111)", 0 ) | |
| 2143 | GAME( 2003, fcockt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030505)", 0 ) /* World */ | |
| 2144 | GAME( 2003, fcockt_2, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030512)", 0 ) /* World */ | |
| 2145 | GAME( 2003, fcockt_3, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (030623)", 0 ) /* World */ | |
| 2146 | GAME( 2003, fcockt_4, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (031028)", 0 ) /* World */ | |
| 2147 | GAME( 2003, fcockt_5, fcockt, multfish, multfish, 0, ROT0, "Igrosoft", "Fruit Cocktail (031111)", 0 ) /* World */ | |
| 1838 | 2148 | #endif |
| 1839 | 2149 | |
| 1840 | GAME( 2003, lhaunt_4, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (031111, set 1)", 0 ) | |
| 1841 | GAME( 2003, lhaunt_4a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (031111, set 2)", 0 ) | |
| 1842 | GAME( 2003, lhaunt_5, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040216. set 1)", 0 ) | |
| 1843 | GAME( 2003, lhaunt_5a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040216, set 2)", 0 ) | |
| 1844 | GAME( 2003, lhaunt_6, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040825, set 1)", 0 ) | |
| 1845 | GAME( 2003, lhaunt_6a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040825, set 2)", 0 ) | |
| 2150 | GAME( 2003, lhaunt_4, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (031111)", 0 ) /* World */ | |
| 2151 | GAME( 2003, lhaunt_4a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (031111, backdoor)", 0 ) // backdoor | |
| 2152 | GAME( 2003, lhaunt_5, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040216)", 0 ) /* World */ | |
| 2153 | GAME( 2003, lhaunt_5a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040216, backdoor)", 0 ) // backdoor | |
| 2154 | GAME( 2003, lhaunt_6, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040825)", 0 ) /* World */ | |
| 2155 | GAME( 2003, lhaunt_6a, lhaunt_4, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (040825, backdoor)", 0 ) // backdoor | |
| 1846 | 2156 | #if ALL_REVISIONS |
| 1847 | GAME( 2003, lhaunt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (030707)", 0 ) | |
| 1848 | GAME( 2003, lhaunt_2, lhaunt, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (030804)", 0 ) | |
| 1849 | GAME( 2003, lhaunt_3, lhaunt, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (031027)", 0 ) | |
| 2157 | GAME( 2003, lhaunt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (030707)", 0 ) /* World */ | |
| 2158 | GAME( 2003, lhaunt_2, lhaunt, multfish, multfish, 0, ROT0, "Igrosoft", "Lucky Haunter (030804)", 0 ) /* World */ | |
| 1850 | 2159 | #endif |
| 1851 | 2160 | |
| 1852 | 2161 | #if ALL_REVISIONS |
| 1853 | GAME( 2003, rollfr, 0, multfish, rollfr, 0, ROT0, "Igrosoft", "Roll Fruit (030821)", 0 ) | |
| 2162 | GAME( 2003, rollfr, 0, multfish, rollfr, 0, ROT0, "Igrosoft", "Roll Fruit (030821)", 0 ) /* World */ | |
| 1854 | 2163 | #endif |
| 1855 | GAME( 2003, rollfr_2, 0, multfish, rollfr, 0, ROT0, "Igrosoft", "Roll Fruit (040318)", 0 ) | |
| 2164 | GAME( 2003, rollfr_2, 0, multfish, rollfr, 0, ROT0, "Igrosoft", "Roll Fruit (040318)", 0 ) /* World */ | |
| 1856 | 2165 | |
| 1857 | GAME( 2004, garage_4, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040219, set 1)", 0 ) | |
| 1858 | GAME( 2004, garage_4a, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040219, set 2)", 0 ) | |
| 1859 | GAME( 2004, garage_5, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (050311, set 1)", 0 ) | |
| 1860 | GAME( 2004, garage_5a, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (050311, set 2)", 0 ) | |
| 2166 | GAME( 2004, garage_4, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040219)", 0 ) /* World */ | |
| 2167 | GAME( 2004, garage_4a, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040219, backdoor)", 0 ) // backdoor | |
| 2168 | GAME( 2004, garage_4b, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040219, changed version text)", 0 ) // changed version text to 070329 | |
| 2169 | GAME( 2004, garage_5, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (050311)", 0 ) /* World */ | |
| 2170 | GAME( 2004, garage_5a, garage_4, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (050311, backdoor)", 0 ) // backdoor | |
| 1861 | 2171 | #if ALL_REVISIONS |
| 1862 | GAME( 2004, garage, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040122)", 0 ) | |
| 1863 | GAME( 2004, garage_2, garage, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040123)", 0 ) | |
| 1864 | GAME( 2004, garage_3, garage, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040216)", 0 ) | |
| 2172 | GAME( 2004, garage, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040122)", 0 ) /* World */ | |
| 2173 | GAME( 2004, garage_2, garage, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040123)", 0 ) /* World */ | |
| 2174 | GAME( 2004, garage_3, garage, multfish, multfish, 0, ROT0, "Igrosoft", "Garage (040216)", 0 ) /* World */ | |
| 1865 | 2175 | #endif |
| 1866 | 2176 | |
| 1867 | GAME( 2004, rclimb_3, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827, set 1)", 0 ) | |
| 1868 | GAME( 2004, rclimb_3a, rclimb_3, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827, set 2)", 0 ) | |
| 1869 | GAME( 2004, rclimb_3b, rclimb_3, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827, set 3)", 0 ) // new service menu | |
| 2177 | GAME( 2004, rclimb_3, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827)", 0 ) /* World */ | |
| 2178 | GAME( 2004, rclimb_3a, rclimb_3, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827, backdoor)", 0 ) // backdoor | |
| 2179 | GAME( 2004, rclimb_3b, rclimb_3, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040827, new service menu)", 0 ) // new service menu | |
| 1870 | 2180 | #if ALL_REVISIONS |
| 1871 | GAME( 2004, rclimb, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040815)", 0 ) | |
| 1872 | GAME( 2004, rclimb_2, rclimb, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040823)", 0 ) | |
| 2181 | GAME( 2004, rclimb, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040815)", 0 ) /* World */ | |
| 2182 | GAME( 2004, rclimb_2, rclimb, multfish, multfish, 0, ROT0, "Igrosoft", "Rock Climber (040823)", 0 ) /* World */ | |
| 1873 | 2183 | #endif |
| 1874 | 2184 | |
| 1875 | GAME( 2004, sweetl, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Sweet Life (041220, set 1)", 0 ) | |
| 1876 | GAME( 2004, sweetla, sweetl, multfish, multfish, 0, ROT0, "Igrosoft", "Sweet Life (041220, set 2)", 0 ) | |
| 2185 | GAME( 2004, sweetl, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Sweet Life (041220)", 0 ) | |
| 2186 | GAME( 2004, sweetla, sweetl, multfish, multfish, 0, ROT0, "Igrosoft", "Sweet Life (041220, backdoor)", 0 ) // backdoor | |
| 2187 | GAME( 2004, sweetlb, sweetl, multfish, multfish, 0, ROT0, "Igrosoft", "Sweet Life (041220, banking address hack, changed version text)", 0 ) // bank F9, changed version text to 070412 | |
| 1877 | 2188 | |
| 1878 | 2189 | #if ALL_REVISIONS |
| 1879 | GAME( 2004, resdnt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040415)", 0 ) | |
| 2190 | GAME( 2004, resdnt, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040415)", 0 ) /* World */ | |
| 1880 | 2191 | #endif |
| 1881 | GAME( 2004, resdnt_2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040513, set 1)", 0 ) | |
| 1882 | GAME( 2004, resdnt_2a, resdnt_2, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040513, set 2)", 0 ) | |
| 2192 | GAME( 2004, resdnt_2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040513)", 0 ) /* World */ | |
| 2193 | GAME( 2004, resdnt_2a, resdnt_2, multfish, multfish, 0, ROT0, "Igrosoft", "Resident (040513, backdoor)", 0 ) // backdoor | |
| 1883 | 2194 | |
| 1884 | GAME( 2005, island, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Island (050713, set 1)", 0 ) | |
| 1885 | GAME( 2005, islanda, island, multfish, multfish, 0, ROT0, "Igrosoft", "Island (050713, set 2)", 0 ) | |
| 2195 | GAME( 2005, island, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Island (050713)", 0 ) /* World */ | |
| 2196 | GAME( 2005, islanda, island, multfish, multfish, 0, ROT0, "Igrosoft", "Island (050713, backdoor)", 0 ) // backdoor | |
| 1886 | 2197 | |
| 1887 | GAME( 2005, pirate_1, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (060210)", 0 ) | |
| 2198 | GAME( 2005, pirate_2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (060210)", 0 ) /* World */ | |
| 2199 | GAME( 2005, pirate_3, pirate_2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (060803)", 0 ) /* World */ | |
| 1888 | 2200 | #if ALL_REVISIONS |
| 1889 | GAME( 2005, pirate, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (051229)", 0 ) | |
| 1890 | GAME( 2005, pirate_2, pirate, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (060803)", 0 ) | |
| 2201 | GAME( 2005, pirate, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate (051229)", 0 ) /* World */ | |
| 1891 | 2202 | #endif |
| 1892 | 2203 | |
| 1893 | GAME( 2006, island2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Island 2 (060529, set 1)", 0 ) | |
| 1894 | GAME( 2006, island2a, island2, multfish, multfish, 0, ROT0, "Igrosoft", "Island 2 (060529, set 2)", 0 ) | |
| 2204 | GAME( 2006, pirate2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005)", 0 ) /* World */ | |
| 2205 | GAME( 2006, pirate2a, pirate2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005, banking address hack set 1)", 0 ) // bank F9 | |
| 2206 | GAME( 2006, pirate2b, pirate2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005, banking address hack set 2)", 0 ) // bank F9, skip raster beam position check | |
| 2207 | GAME( 2006, pirate2c, pirate2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005, banking address hack, changed version text set 1)", 0 ) // bank F9, changed version text to 070126 | |
| 2208 | GAME( 2006, pirate2d, pirate2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005, banking address hack, changed version text set 2)", 0 ) // bank F9, changed version text to 070126 | |
| 2209 | GAME( 2006, pirate2e, pirate2, multfish, multfish, 0, ROT0, "Igrosoft", "Pirate 2 (061005, banking address hack, changed version text set 3)", 0 ) // bank F9, changed version text to 070126, skip some start tests | |
| 1895 | 2210 | |
| 1896 | GAME( 2006, keks, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, set 1)", 0 ) | |
| 1897 | GAME( 2006, keksa, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, set 2)", 0 ) | |
| 1898 | GAME( 2006, keksb, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, set 3)", 0 ) | |
| 1899 | GAME( 2006, keks_2, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060403. set 1)", 0 ) | |
| 1900 | GAME( 2006, keks_2a, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060403, set 2)", 0 ) | |
| 2211 | GAME( 2006, island2, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Island 2 (060529)", 0 ) /* World */ | |
| 2212 | GAME( 2006, island2a, island2, multfish, multfish, 0, ROT0, "Igrosoft", "Island 2 (060529, banking address hack)", 0 ) // bank F9 (not standard, game does not work) | |
| 2213 | ||
| 2214 | GAME( 2006, keks, 0, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328)", 0 ) /* World */ | |
| 2215 | GAME( 2006, keksa, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, banking address hack)", 0 ) // bank F9 | |
| 2216 | GAME( 2006, keksb, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, backdoor)", 0 ) // backdoor | |
| 2217 | GAME( 2006, keksc, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060328, banking address hack, changed version text)", 0 ) // bank F9, changed version text to 070119 | |
| 2218 | GAME( 2006, keks_2, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060403)", 0 ) /* World */ | |
| 2219 | GAME( 2006, keks_2a, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060403, banking address hack)", 0 ) // bank F9 | |
| 2220 | GAME( 2006, keks_2b, keks, multfish, multfish, 0, ROT0, "Igrosoft", "Keks (060403, banking address hack, changed version text)", 0 ) // bank F9, changed version text to 070119 |
| r6049 | r6050 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | #define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff] |
| 80 | 80 | |
| 81 | /* the same on all systems? */ | |
| 82 | #define MASTER_CLOCK_NTSC 53693175 | |
| 83 | #define MASTER_CLOCK_PAL 53203424 | |
| 84 | ||
| 85 | #define SEGACD_CLOCK 12500000 | |
| 86 | ||
| 87 | 81 | #define HAZE_MD 0 // to make appear / disappear the Region DipSwitch |
| 88 | 82 | |
| 89 | 83 | /* timing details */ |
| r6049 | r6050 | |
| 1390 | 1384 | return retvalue; |
| 1391 | 1385 | } |
| 1392 | 1386 | |
| 1393 | ||
| 1387 | ||
| 1394 | 1388 | { |
| 1395 | 1389 | //mame_printf_debug("megadriv_68k_YM2612_read %02x %04x\n",offset,mem_mask); |
| 1396 | 1390 | if ( (genz80.z80_has_bus==0) && (genz80.z80_is_reset==0) ) |
| r6049 | r6050 | |
| 1408 | 1402 | |
| 1409 | 1403 | |
| 1410 | 1404 | |
| 1411 | ||
| 1405 | ||
| 1412 | 1406 | { |
| 1413 | 1407 | //mame_printf_debug("megadriv_68k_YM2612_write %02x %04x %04x\n",offset,data,mem_mask); |
| 1414 | 1408 | if ( (genz80.z80_has_bus==0) && (genz80.z80_is_reset==0) ) |
| r6049 | r6050 | |
| 1484 | 1478 | |
| 1485 | 1479 | */ |
| 1486 | 1480 | |
| 1487 | ||
| 1481 | ||
| 1488 | 1482 | PORT_START("PAD1") /* Joypad 1 (3 button + start) NOT READ DIRECTLY */ |
| 1489 | 1483 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 1490 | 1484 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| r6049 | r6050 | |
| 1802 | 1796 | } |
| 1803 | 1797 | |
| 1804 | 1798 | |
| 1805 | ||
| 1799 | ||
| 1806 | 1800 | { |
| 1807 | 1801 | UINT8 retdata; |
| 1808 | 1802 | |
| r6049 | r6050 | |
| 1920 | 1914 | } |
| 1921 | 1915 | |
| 1922 | 1916 | |
| 1923 | ||
| 1924 | static WRITE16_HANDLER( megadriv_68k_io_write ) | |
| 1917 | WRITE16_HANDLER( megadriv_68k_io_write ) | |
| 1925 | 1918 | { |
| 1926 | 1919 | // mame_printf_debug("IO Write #%02x data %04x mem_mask %04x\n",offset,data,mem_mask); |
| 1927 | 1920 | |
| r6049 | r6050 | |
| 1970 | 1963 | |
| 1971 | 1964 | |
| 1972 | 1965 | static ADDRESS_MAP_START( megadriv_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1973 | AM_RANGE(0x000000 | |
| 1966 | AM_RANGE(0x000000 | |
| 1974 | 1967 | /* (0x000000 - 0x3fffff) == GAME ROM (4Meg Max, Some games have special banking too) */ |
| 1975 | 1968 | |
| 1976 | AM_RANGE(0xa00000 , 0xa01fff) AM_READWRITE(megadriv_68k_read_z80_ram,megadriv_68k_write_z80_ram) | |
| 1977 | AM_RANGE(0xa02000 , 0xa03fff) AM_WRITE(megadriv_68k_write_z80_ram) | |
| 1978 | AM_RANGE(0xa04000 , 0xa04003) AM_DEVREADWRITE8("ym", megadriv_68k_YM2612_read,megadriv_68k_YM2612_write, 0xffff) | |
| 1969 | AM_RANGE(0xa00000, 0xa01fff) AM_READWRITE(megadriv_68k_read_z80_ram,megadriv_68k_write_z80_ram) | |
| 1970 | AM_RANGE(0xa02000, 0xa03fff) AM_WRITE(megadriv_68k_write_z80_ram) | |
| 1971 | AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8("ym", megadriv_68k_YM2612_read,megadriv_68k_YM2612_write, 0xffff) | |
| 1979 | 1972 | |
| 1980 | AM_RANGE(0xa06000 | |
| 1973 | AM_RANGE(0xa06000 | |
| 1981 | 1974 | |
| 1982 | AM_RANGE(0xa10000 | |
| 1975 | AM_RANGE(0xa10000 | |
| 1983 | 1976 | |
| 1984 | AM_RANGE(0xa11100 , 0xa11101) AM_READWRITE(megadriv_68k_check_z80_bus,megadriv_68k_req_z80_bus) | |
| 1985 | AM_RANGE(0xa11200 , 0xa11201) AM_WRITE(megadriv_68k_req_z80_reset) | |
| 1977 | AM_RANGE(0xa11100, 0xa11101) AM_READWRITE(megadriv_68k_check_z80_bus,megadriv_68k_req_z80_bus) | |
| 1978 | AM_RANGE(0xa11200, 0xa11201) AM_WRITE(megadriv_68k_req_z80_reset) | |
| 1986 | 1979 | |
| 1987 | 1980 | /* these are fake - remove allocs in VIDEO_START to use these to view ram instead */ |
| 1988 | // AM_RANGE(0xb00000 , 0xb0ffff) AM_RAM AM_BASE(&megadrive_vdp_vram) | |
| 1989 | // AM_RANGE(0xb10000 , 0xb1007f) AM_RAM AM_BASE(&megadrive_vdp_vsram) | |
| 1990 | // AM_RANGE(0xb10100 , 0xb1017f) AM_RAM AM_BASE(&megadrive_vdp_cram) | |
| 1981 | // AM_RANGE(0xb00000, 0xb0ffff) AM_RAM AM_BASE(&megadrive_vdp_vram) | |
| 1982 | // AM_RANGE(0xb10000, 0xb1007f) AM_RAM AM_BASE(&megadrive_vdp_vsram) | |
| 1983 | // AM_RANGE(0xb10100, 0xb1017f) AM_RAM AM_BASE(&megadrive_vdp_cram) | |
| 1991 | 1984 | |
| 1992 | AM_RANGE(0xc00000 , 0xc0001f) AM_READWRITE(megadriv_vdp_r,megadriv_vdp_w) | |
| 1993 | AM_RANGE(0xd00000 , 0xd0001f) AM_READWRITE(megadriv_vdp_r,megadriv_vdp_w) // the earth defend | |
| 1985 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(megadriv_vdp_r,megadriv_vdp_w) | |
| 1986 | AM_RANGE(0xd00000, 0xd0001f) AM_READWRITE(megadriv_vdp_r,megadriv_vdp_w) // the earth defend | |
| 1994 | 1987 | |
| 1995 | AM_RANGE(0xe00000 , 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE(&megadrive_ram) | |
| 1996 | // AM_RANGE(0xff0000 , 0xffffff) AM_READ(SMH_RAM) | |
| 1988 | AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE(&megadrive_ram) | |
| 1989 | // AM_RANGE(0xff0000, 0xffffff) AM_READ(SMH_RAM) | |
| 1997 | 1990 | /* 0xe00000 - 0xffffff) == MAIN RAM (64kb, Mirrored, most games use ff0000 - ffffff) */ |
| 1998 | 1991 | ADDRESS_MAP_END |
| 1999 | 1992 | |
| r6049 | r6050 | |
| 2309 | 2302 | } |
| 2310 | 2303 | |
| 2311 | 2304 | static ADDRESS_MAP_START( megadriv_z80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 2312 | AM_RANGE(0x0000 , 0x1fff) AM_RAMBANK(1) AM_MIRROR(0x2000) // RAM can be accessed by the 68k | |
| 2313 | AM_RANGE(0x4000 , 0x4003) AM_DEVREADWRITE("ym", ym2612_r,ym2612_w) | |
| 2305 | AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1) AM_MIRROR(0x2000) // RAM can be accessed by the 68k | |
| 2306 | AM_RANGE(0x4000, 0x4003) AM_DEVREADWRITE("ym", ym2612_r,ym2612_w) | |
| 2314 | 2307 | |
| 2315 | AM_RANGE(0x6000 , 0x6000) AM_WRITE(megadriv_z80_z80_bank_w) | |
| 2316 | AM_RANGE(0x6001 , 0x6001) AM_WRITE(megadriv_z80_z80_bank_w) // wacky races uses this address | |
| 2308 | AM_RANGE(0x6000, 0x6000) AM_WRITE(megadriv_z80_z80_bank_w) | |
| 2309 | AM_RANGE(0x6001, 0x6001) AM_WRITE(megadriv_z80_z80_bank_w) // wacky races uses this address | |
| 2317 | 2310 | |
| 2318 | AM_RANGE(0x6100 | |
| 2311 | AM_RANGE(0x6100 | |
| 2319 | 2312 | |
| 2320 | AM_RANGE(0x7f00 | |
| 2313 | AM_RANGE(0x7f00 | |
| 2321 | 2314 | |
| 2322 | AM_RANGE(0x8000 | |
| 2315 | AM_RANGE(0x8000 | |
| 2323 | 2316 | ADDRESS_MAP_END |
| 2324 | 2317 | |
| 2325 | 2318 | static ADDRESS_MAP_START( megadriv_z80_io_map, ADDRESS_SPACE_IO, 8 ) |
| 2326 | 2319 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2327 | AM_RANGE(0x0000 | |
| 2320 | AM_RANGE(0x0000 | |
| 2328 | 2321 | ADDRESS_MAP_END |
| 2329 | 2322 | |
| 2323 | ||
| 2324 | /************************************ Megadrive Bootlegs *************************************/ | |
| 2325 | ||
| 2326 | // smaller ROM region because some bootlegs check for RAM there | |
| 2327 | static ADDRESS_MAP_START( md_bootleg_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 2328 | AM_RANGE(0x000000, 0x0fffff) AM_ROM /* Cartridge Program Rom */ | |
| 2329 | AM_RANGE(0x200000, 0x2023ff) AM_RAM // tested | |
| 2330 | ||
| 2331 | AM_RANGE(0xa00000, 0xa01fff) AM_READWRITE(megadriv_68k_read_z80_ram, megadriv_68k_write_z80_ram) | |
| 2332 | AM_RANGE(0xa02000, 0xa03fff) AM_WRITE(megadriv_68k_write_z80_ram) | |
| 2333 | AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8("ym", megadriv_68k_YM2612_read, megadriv_68k_YM2612_write, 0xffff) | |
| 2334 | AM_RANGE(0xa06000, 0xa06001) AM_WRITE(megadriv_68k_z80_bank_write) | |
| 2335 | ||
| 2336 | AM_RANGE(0xa10000, 0xa1001f) AM_READWRITE(megadriv_68k_io_read, megadriv_68k_io_write) | |
| 2337 | AM_RANGE(0xa11100, 0xa11101) AM_READWRITE(megadriv_68k_check_z80_bus, megadriv_68k_req_z80_bus) | |
| 2338 | AM_RANGE(0xa11200, 0xa11201) AM_WRITE(megadriv_68k_req_z80_reset) | |
| 2339 | ||
| 2340 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(megadriv_vdp_r, megadriv_vdp_w) | |
| 2341 | AM_RANGE(0xd00000, 0xd0001f) AM_READWRITE(megadriv_vdp_r, megadriv_vdp_w) // the earth defend | |
| 2342 | ||
| 2343 | AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE(&megadrive_ram) | |
| 2344 | ADDRESS_MAP_END | |
| 2345 | ||
| 2346 | MACHINE_DRIVER_START( md_bootleg ) | |
| 2347 | MDRV_IMPORT_FROM(megadriv) | |
| 2348 | ||
| 2349 | MDRV_CPU_MODIFY("maincpu") | |
| 2350 | MDRV_CPU_PROGRAM_MAP(md_bootleg_map) | |
| 2351 | MACHINE_DRIVER_END | |
| 2352 | ||
| 2353 | ||
| 2330 | 2354 | /****************************************** 32X related ******************************************/ |
| 2331 | 2355 | |
| 2332 | 2356 | /**********************************************************************************************/ |
| r6049 | r6050 | |
| 3333 | 3357 | ADDRESS_MAP_END |
| 3334 | 3358 | |
| 3335 | 3359 | static ADDRESS_MAP_START( segacd_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 3336 | AM_RANGE(0x0000000 | |
| 3360 | AM_RANGE(0x0000000 | |
| 3337 | 3361 | ADDRESS_MAP_END |
| 3338 | 3362 | |
| 3339 | 3363 | |
| r6049 | r6050 | |
| 3635 | 3659 | } |
| 3636 | 3660 | |
| 3637 | 3661 | static ADDRESS_MAP_START( svp_ssp_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 3638 | AM_RANGE(0x0000 , 0x03ff) AM_ROMBANK(3) | |
| 3639 | AM_RANGE(0x0400 , 0xffff) AM_ROMBANK(4) | |
| 3662 | AM_RANGE(0x0000, 0x03ff) AM_ROMBANK(3) | |
| 3663 | AM_RANGE(0x0400, 0xffff) AM_ROMBANK(4) | |
| 3640 | 3664 | ADDRESS_MAP_END |
| 3641 | 3665 | |
| 3642 | 3666 | static ADDRESS_MAP_START( svp_ext_map, ADDRESS_SPACE_IO, 16 ) |
| 3643 | 3667 | ADDRESS_MAP_GLOBAL_MASK(0xf) |
| 3644 | AM_RANGE(0*2 , 0*2+1) AM_READWRITE(read_PM0, write_PM0) | |
| 3645 | AM_RANGE(1*2 , 1*2+1) AM_READWRITE(read_PM1, write_PM1) | |
| 3646 | AM_RANGE(2*2 , 2*2+1) AM_READWRITE(read_PM2, write_PM2) | |
| 3647 | AM_RANGE(3*2 , 3*2+1) AM_READWRITE(read_XST, write_XST) | |
| 3648 | AM_RANGE(4*2 , 4*2+1) AM_READWRITE(read_PM4, write_PM4) | |
| 3649 | AM_RANGE(6*2 , 6*2+1) AM_READWRITE(read_PMC, write_PMC) | |
| 3650 | AM_RANGE(7*2 , 7*2+1) AM_READWRITE(read_AL, write_AL) | |
| 3668 | AM_RANGE(0*2, 0*2+1) AM_READWRITE(read_PM0, write_PM0) | |
| 3669 | AM_RANGE(1*2, 1*2+1) AM_READWRITE(read_PM1, write_PM1) | |
| 3670 | AM_RANGE(2*2, 2*2+1) AM_READWRITE(read_PM2, write_PM2) | |
| 3671 | AM_RANGE(3*2, 3*2+1) AM_READWRITE(read_XST, write_XST) | |
| 3672 | AM_RANGE(4*2, 4*2+1) AM_READWRITE(read_PM4, write_PM4) | |
| 3673 | AM_RANGE(6*2, 6*2+1) AM_READWRITE(read_PMC, write_PMC) | |
| 3674 | AM_RANGE(7*2, 7*2+1) AM_READWRITE(read_AL, write_AL) | |
| 3651 | 3675 | ADDRESS_MAP_END |
| 3652 | 3676 | |
| 3653 | 3677 | |
| r6049 | r6050 | |
| 6344 | 6368 | hazemdchoice_megadriv_framerate = 50; |
| 6345 | 6369 | } |
| 6346 | 6370 | |
| 6371 | DRIVER_INIT( mpnew ) | |
| 6372 | { | |
| 6373 | DRIVER_INIT_CALL(megadrij); | |
| 6374 | megadrive_io_read_data_port_ptr = megadrive_io_read_data_port_3button; | |
| 6375 | megadrive_io_write_data_port_ptr = megadrive_io_write_data_port_3button; | |
| 6376 | } | |
| 6347 | 6377 | |
| 6348 | 6378 | /* used by megatech */ |
| 6349 | 6379 | static READ8_HANDLER( z80_unmapped_port_r ) |
| r6049 | r6050 | |
| 6590 | 6620 | GAME( 1994, segacd, 0, genesis_scd, megadriv, megadriv,ROT0, "Sega", "Sega-CD Model 2 BIOS V2.11 (U)", GAME_NOT_WORKING ) |
| 6591 | 6621 | GAME( 1994, 32x_scd, 0, genesis_32x_scd, megadriv, _32x, ROT0, "Sega", "Sega-CD Model 2 BIOS V2.11 (U) (with 32X)", GAME_NOT_WORKING ) |
| 6592 | 6622 | GAME( 1994, g_virr, 0, megdsvp, megadriv, megadriv, ROT0, "Sega", "Virtua Racing (U) [!]", 0 ) |
| 6593 | GAME( 1994, g_virrj , g_virr, megdsvp, megadriv, megadrij, ROT0, "Sega", "Virtua Racing (J) [!]", 0 ) | |
| 6594 | GAME( 1994, g_virre , g_virr, megdsvppal, megadriv, megadrie, ROT0, "Sega", "Virtua Racing (E) [!]", 0 ) | |
| 6623 | GAME( 1994, g_virrj, g_virr, megdsvp, megadriv, megadrij, ROT0, "Sega", "Virtua Racing (J) [!]", 0 ) | |
| 6624 | GAME( 1994, g_virre, g_virr, megdsvppal, megadriv, megadrie, ROT0, "Sega", "Virtua Racing (E) [!]", 0 ) | |
| 6595 | 6625 | GAME( 1994, g_virrea, g_virr, megdsvppal, megadriv, megadrie, ROT0, "Sega", "Virtua Racing (E) [a1]", 0 ) |
| 6596 | 6626 | #endif |
| 6597 | 6627 |
| r6049 | r6050 | |
|---|---|---|
| 1 | #define MASTER_CLOCK_NTSC 53693175 | |
| 2 | #define MASTER_CLOCK_PAL 53203424 | |
| 3 | #define SEGACD_CLOCK 12500000 | |
| 4 | ||
| 5 | ||
| 1 | 6 | extern DRIVER_INIT( megadriv_c2 ); |
| 2 | 7 | extern DRIVER_INIT( megadrie ); |
| 3 | 8 | extern DRIVER_INIT( megadriv ); |
| r6049 | r6050 | |
| 3 | 8 | extern DRIVER_INIT( megadrij ); |
| 4 | 9 | extern DRIVER_INIT( _32x ); |
| 10 | extern DRIVER_INIT( mpnew ); | |
| 5 | 11 | |
| 6 | INPUT_PORTS_EXTERN(megadriv); | |
| 7 | INPUT_PORTS_EXTERN(aladbl); | |
| 8 | INPUT_PORTS_EXTERN(megadri6); | |
| 9 | INPUT_PORTS_EXTERN(ssf2ghw); | |
| 10 | INPUT_PORTS_EXTERN(megdsvp); | |
| 12 | INPUT_PORTS_EXTERN( md_common ); | |
| 13 | INPUT_PORTS_EXTERN( megadriv ); | |
| 14 | INPUT_PORTS_EXTERN( aladbl ); | |
| 15 | INPUT_PORTS_EXTERN( megadri6 ); | |
| 16 | INPUT_PORTS_EXTERN( ssf2ghw ); | |
| 17 | INPUT_PORTS_EXTERN( megdsvp ); | |
| 11 | 18 | |
| 12 | 19 | MACHINE_DRIVER_EXTERN( megdsvppal ); |
| 13 | MACHINE_DRIVER_EXTERN(megadriv); | |
| 14 | MACHINE_DRIVER_EXTERN(megadpal); | |
| 15 | MACHINE_DRIVER_EXTERN(megdsvp); | |
| 20 | MACHINE_DRIVER_EXTERN( megadriv ); | |
| 21 | MACHINE_DRIVER_EXTERN( megadpal ); | |
| 22 | MACHINE_DRIVER_EXTERN( megdsvp ); | |
| 16 | 23 | MACHINE_DRIVER_EXTERN( genesis_32x ); |
| 17 | 24 | MACHINE_DRIVER_EXTERN( genesis_32x_pal ); |
| 18 | 25 | MACHINE_DRIVER_EXTERN( genesis_scd ); |
| 19 | 26 | MACHINE_DRIVER_EXTERN( genesis_32x_scd ); |
| 27 | MACHINE_DRIVER_EXTERN( md_bootleg ); // for topshoot.c & hshavoc.c | |
| 20 | 28 | |
| 21 | 29 | extern UINT16* megadriv_backupram; |
| r6049 | r6050 | |
| 27 | 35 | |
| 28 | 36 | void megatech_set_megadrive_z80_as_megadrive_z80(running_machine *machine, const char* tag); |
| 29 | 37 | |
| 30 | extern READ8_HANDLER (megatech_sms_ioport_dc_r); | |
| 31 | extern READ8_HANDLER (megatech_sms_ioport_dd_r); | |
| 38 | extern READ8_HANDLER( megatech_sms_ioport_dc_r ); | |
| 39 | extern READ8_HANDLER( megatech_sms_ioport_dd_r ); | |
| 32 | 40 | |
| 33 | 41 | extern READ16_HANDLER( megadriv_vdp_r ); |
| 34 | 42 | extern WRITE16_HANDLER( megadriv_vdp_w ); |
| 35 | 43 | |
| 36 | MACHINE_RESET( megadriv ); | |
| 37 | VIDEO_START( megadriv ); | |
| 38 | VIDEO_UPDATE( megadriv ); | |
| 39 | VIDEO_EOF( megadriv ); | |
| 44 | /* These handlers are needed by megaplay.c */ | |
| 45 | extern READ16_HANDLER( megadriv_68k_io_read ); | |
| 46 | extern WRITE16_HANDLER( megadriv_68k_io_write ); | |
| 40 | 47 | |
| 41 | /* Needed to create external input handlers (see e.g. MESS) */ | |
| 48 | /* These handlers are needed by puckpkmn.c for his memory map */ | |
| 49 | extern READ8_DEVICE_HANDLER( megadriv_68k_YM2612_read); | |
| 50 | extern WRITE8_DEVICE_HANDLER( megadriv_68k_YM2612_write); | |
| 42 | 51 | |
| 52 | /* These are needed to create external input handlers (see e.g. MESS) */ | |
| 53 | /* Regs are also used by Megaplay! */ | |
| 43 | 54 | extern UINT8 (*megadrive_io_read_data_port_ptr)(running_machine *machine, int offset); |
| 44 | 55 | extern void (*megadrive_io_write_data_port_ptr)(running_machine *machine, int offset, UINT16 data); |
| 45 | 56 | extern UINT8 megadrive_io_data_regs[3]; |
| 46 | 57 | extern UINT8 megadrive_io_ctrl_regs[3]; |
| 47 | 58 | |
| 59 | MACHINE_RESET( megadriv ); | |
| 60 | VIDEO_START( megadriv ); | |
| 61 | VIDEO_UPDATE( megadriv ); | |
| 62 | VIDEO_EOF( megadriv ); | |
| 63 | ||
| 64 | ||
| 48 | 65 | extern UINT16* megadrive_vdp_palette_lookup; |
| 49 | 66 | extern UINT16* megadrive_vdp_palette_lookup_sprite; // for C2 |
| 50 | 67 | extern UINT16* megadrive_vdp_palette_lookup_shadow; |
| r6049 | r6050 | |
| 56 | 73 | extern int genvdp_use_cram; |
| 57 | 74 | extern int genesis_always_irq6; |
| 58 | 75 | extern int genesis_other_hacks; |
| 76 | ||
| 77 | ||
| 78 | /* Megaplay - Megatech specific */ | |
| 79 | /* It might be possible to move the following structs in the drivers */ | |
| 80 | ||
| 81 | #define MP_ROM 0x10 | |
| 82 | #define MP_GAME 0 | |
| 83 | ||
| 84 | struct _mplay_bios /* once all the regs are saved in this structure, it would be better to reorganize it a bit... */ | |
| 85 | { | |
| 86 | UINT32 bios_mode; // determines whether ROM banks or Game data | |
| 87 | // is to read from 0x8000-0xffff | |
| 88 | ||
| 89 | UINT32 bios_bank; // ROM bank selection | |
| 90 | UINT16 game_banksel; // Game bank selection | |
| 91 | UINT32 readpos; // serial bank selection position (9-bit) | |
| 92 | UINT32 mp_bios_bank_addr; | |
| 93 | ||
| 94 | UINT32 bios_width; // determines the way the game info ROM is read | |
| 95 | UINT8 bios_ctrl[6]; | |
| 96 | UINT8 bios_6600; | |
| 97 | UINT8 bios_6403; | |
| 98 | UINT8 bios_6404; | |
| 99 | }; | |
| 100 | ||
| 101 | extern struct _mplay_bios mplay_bios; // defined in megaplay.c | |
| 102 | ||
| 103 | struct _mtech_bios /* once all the regs are saved in this structure, it would be better to reorganize it a bit... */ | |
| 104 | { | |
| 105 | UINT8 mt_cart_select_reg; | |
| 106 | UINT32 bios_port_ctrl; | |
| 107 | int current_game_is_sms; // is the current game SMS based (running on genesis z80, in VDP compatibility mode) | |
| 108 | UINT32 bios_ctrl_inputs; | |
| 109 | UINT8 bios_ctrl[6]; | |
| 110 | ||
| 111 | int mt_bank_bank_pos; | |
| 112 | int mt_bank_partial; | |
| 113 | int mt_bank_addr; | |
| 114 | }; |
| r6049 | r6050 | |
|---|---|---|
| 1709 | 1709 | /* belongs here. */ |
| 1710 | 1710 | |
| 1711 | 1711 | /* Input impedance of a M51516L is typically 30k (datasheet) */ |
| 1712 | DISCRETE_CRFILTER(NODE_40, | |
| 1712 | DISCRETE_CRFILTER(NODE_40, | |
| 1713 | 1713 | |
| 1714 | 1714 | DISCRETE_OUTPUT(NODE_40, 10.0 ) |
| 1715 | 1715 |
| r6049 | r6050 | |
|---|---|---|
| 4290 | 4290 | ROM_LOAD64_WORD_SWAP( "epr21216c.19", 0x000002, 0x200000, CRC(867d3a0f) SHA1(15ba12099eaa2cfd1d6cd985805df69c48441fb2) ) |
| 4291 | 4291 | ROM_LOAD64_WORD_SWAP( "epr21217c.20", 0x000000, 0x200000, CRC(ea8c30ce) SHA1(e076e32ba9134c63c7a5fb826eba4735774e3ab3) ) |
| 4292 | 4292 | |
| 4293 | /* IC1-8 should be 64MBit */ | |
| 4294 | ||
| 4295 | 4293 | // CROM0 |
| 4296 | ROM_LOAD64_WORD_SWAP( "mpr21134.1", 0x800006, 0x400000, BAD_DUMP CRC(7bfe21a4) SHA1(accbb4272da313f4bd2b897f3f395f5523e7a3f4) ) | |
| 4297 | ROM_LOAD64_WORD_SWAP( "mpr21135.2", 0x800004, 0x400000, BAD_DUMP CRC(972f4b4f) SHA1(fa6b9d1ef3a213cedbe42705de015f6ae8c216b6) ) | |
| 4298 | ROM_LOAD64_WORD_SWAP( "mpr21136.3", 0x800002, 0x400000, BAD_DUMP CRC(5d563fba) SHA1(1f157b25e70438f1cfc04bbe8c83afa0e3858c2a) ) | |
| 4299 | ROM_LOAD64_WORD_SWAP( "mpr21137.4", 0x800000, 0x400000, BAD_DUMP CRC(707e5921) SHA1(a38ac947860d0cf7ad40b641135f1fb203e3df67) ) | |
| 4294 | ROM_LOAD64_WORD_SWAP( "mpr21134.1", 0x800006, 0x800000, CRC(65399935) SHA1(ae9f6a462009e6e47f59bc6aa344ae691d0eebc9) ) | |
| 4295 | ROM_LOAD64_WORD_SWAP( "mpr21135.2", 0x800004, 0x800000, CRC(f3fa7c50) SHA1(5ad8bd436fa3523b79ff342d896ad05e305ab385) ) | |
| 4296 | ROM_LOAD64_WORD_SWAP( "mpr21136.3", 0x800002, 0x800000, CRC(b730fe50) SHA1(abafcd5bec9aa7d8b550749aa6c2a48723238386) ) | |
| 4297 | ROM_LOAD64_WORD_SWAP( "mpr21137.4", 0x800000, 0x800000, CRC(3572d417) SHA1(cef3f4b6834276a07124359dced8aae902c1eb50) ) | |
| 4300 | 4298 | |
| 4301 | 4299 | // CROM1 |
| 4302 | ROM_LOAD64_WORD_SWAP( "mpr21138.5", 0x2800006, 0x400000, BAD_DUMP CRC(48619c98) SHA1(34e0d10ea6c6a9dca3e1440e248ab0ec7bad0d8e) ) | |
| 4303 | ROM_LOAD64_WORD_SWAP( "mpr21139.6", 0x2800004, 0x400000, BAD_DUMP CRC(0425ba5d) SHA1(a2f347268279182e1be08a600d862adc49f3f3b4) ) | |
| 4304 | ROM_LOAD64_WORD_SWAP( "mpr21140.7", 0x2800002, 0x400000, BAD_DUMP CRC(df574950) SHA1(816f3c60f0cbcda3278e4acf99176af93e7c9b4b) ) | |
| 4305 | ROM_LOAD64_WORD_SWAP( "mpr21141.8", 0x2800000, 0x400000, BAD_DUMP CRC(d6a51bf1) SHA1(cb3196a7f9b378c755d4b29b01a97612d7d7a8d5) ) | |
| 4300 | ROM_LOAD64_WORD_SWAP( "mpr21138.5", 0x2800006, 0x800000, CRC(a9a2de2c) SHA1(102532458bdf600f32e9e45a57c51ed5a9c4f33a) ) | |
| 4301 | ROM_LOAD64_WORD_SWAP( "mpr21139.6", 0x2800004, 0x800000, CRC(06d441f5) SHA1(9e5a843143a3373c61bfda975a24b449b0a2c749) ) | |
| 4302 | ROM_LOAD64_WORD_SWAP( "mpr21140.7", 0x2800002, 0x800000, CRC(1390746d) SHA1(618d80e714e9a47489674a8624e389bdfa09923a) ) | |
| 4303 | ROM_LOAD64_WORD_SWAP( "mpr21141.8", 0x2800000, 0x800000, CRC(1d0763cb) SHA1(4cc6b8b218399ed7ca0ee1b677896f120ae0aeac) ) | |
| 4306 | 4304 | |
| 4307 | 4305 | // CROM2 |
| 4308 | 4306 | ROM_LOAD64_WORD_SWAP( "mpr21142.9", 0x4800006, 0x400000, CRC(da35cd51) SHA1(6b89c79a4e207d4bb3fe36e918f41d09915facaa) ) |
| r6049 | r6050 | |
|---|---|---|
| 310 | 310 | |
| 311 | 311 | DISCRETE_MIXER3(NODE_30, 1, NODE_21, NODE_22, NODE_23, &ironhors_mixer_desc) |
| 312 | 312 | |
| 313 | DISCRETE_RCFILTER(NODE_31, | |
| 313 | DISCRETE_RCFILTER(NODE_31, | |
| 314 | 314 | DISCRETE_MIXER2(NODE_33, 1, NODE_30, NODE_31, &ironhors_mixer_desc_final) |
| 315 | 315 | |
| 316 | 316 | DISCRETE_OUTPUT(NODE_33, 5.0 ) |
| r6049 | r6050 | |
|---|---|---|
| 48 | 48 | #include "sound/sn76496.h" |
| 49 | 49 | #include "sound/2612intf.h" |
| 50 | 50 | |
| 51 | #include " | |
| 51 | #include "megadriv.h" | |
| 52 | 52 | |
| 53 | #define MASTER_CLOCK 53693100 | |
| 54 | 53 | |
| 55 | static UINT16* main_ram; | |
| 56 | ||
| 57 | 54 | /* Puckman Pockimon Input Ports */ |
| 58 | ||
| 59 | 55 | static INPUT_PORTS_START( puckpkmn ) |
| 60 | 56 | PORT_START("P2") /* $700011.b */ |
| 61 | 57 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r6049 | r6050 | |
| 131 | 127 | |
| 132 | 128 | |
| 133 | 129 | static ADDRESS_MAP_START( puckpkmn_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 134 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 130 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 135 | 131 | AM_RANGE(0x700010, 0x700011) AM_READ_PORT("P2") |
| 136 | 132 | AM_RANGE(0x700012, 0x700013) AM_READ_PORT("P1") |
| 137 | 133 | AM_RANGE(0x700014, 0x700015) AM_READ_PORT("UNK") |
| 138 | 134 | AM_RANGE(0x700016, 0x700017) AM_READ_PORT("DSW1") |
| 139 | 135 | AM_RANGE(0x700018, 0x700019) AM_READ_PORT("DSW2") |
| 140 | AM_RANGE(0x700022, 0x700023) AM_DEVREADWRITE8("oki", okim6295_r,okim6295_w, 0x00ff) /* M6295 Sound Chip Status Register/Writes */ | |
| 141 | AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8("ym", ym3438_r,ym3438_w, 0xffff) /* Ym3438 Sound Chip Status Register */ | |
| 142 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(genesis_vdp_r,genesis_vdp_w) /* VDP Access */ | |
| 143 | AM_RANGE(0xe00000, 0xe1ffff) AM_ROMBANK(1) /* VDP sees the roms here */ | |
| 144 | AM_RANGE(0xfe0000, 0xfeffff) AM_RAMBANK(2) /* VDP sees the ram here */ | |
| 145 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_BASE(&main_ram) /* Main Ram */ | |
| 136 | AM_RANGE(0x700022, 0x700023) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff) | |
| 137 | AM_RANGE(0xa04000, 0xa04003) AM_DEVREADWRITE8("ym", megadriv_68k_YM2612_read, megadriv_68k_YM2612_write, 0xffff) | |
| 138 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(megadriv_vdp_r, megadriv_vdp_w) | |
| 139 | AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_BASE(&megadrive_ram) | |
| 146 | 140 | |
| 147 | 141 | /* Unknown reads/writes: */ |
| 148 | AM_RANGE(0xa00000, 0xa00551) AM_WRITENOP | |
| 142 | AM_RANGE(0xa00000, 0xa00551) AM_WRITENOP | |
| 149 | 143 | // AM_RANGE(0xa10000, 0xa10001) AM_READNOP /* ? once */ |
| 150 | AM_RANGE(0xa10002, 0xa10005) AM_NOP /* ? alternative way of reading inputs ? */ | |
| 151 | AM_RANGE(0xa11100, 0xa11101) AM_NOP /* ? */ | |
| 144 | AM_RANGE(0xa10002, 0xa10005) AM_NOP /* ? alternative way of reading inputs ? */ | |
| 145 | AM_RANGE(0xa11100, 0xa11101) AM_NOP /* ? */ | |
| 152 | 146 | // AM_RANGE(0xa10008, 0xa1000d) AM_WRITENOP /* ? once */ |
| 153 | 147 | // AM_RANGE(0xa14000, 0xa14003) AM_WRITENOP /* ? once */ |
| 154 | AM_RANGE(0xa11200, 0xa11201) AM_WRITENOP | |
| 148 | AM_RANGE(0xa11200, 0xa11201) AM_WRITENOP | |
| 155 | 149 | ADDRESS_MAP_END |
| 156 | 150 | |
| 157 | 151 | |
| 158 | static const ym3438_interface ym3438_intf = | |
| 159 | { | |
| 160 | genesis_irq2_interrupt /* IRQ handler */ | |
| 161 | }; | |
| 162 | ||
| 163 | 152 | static MACHINE_DRIVER_START( puckpkmn ) |
| 153 | MDRV_IMPORT_FROM( megadriv ) | |
| 164 | 154 | |
| 165 | /* basic machine hardware */ | |
| 166 | MDRV_CPU_ADD("maincpu",M68000, MASTER_CLOCK/7) /*???*/ | |
| 155 | MDRV_CPU_MODIFY("maincpu") | |
| 167 | 156 | MDRV_CPU_PROGRAM_MAP(puckpkmn_map) |
| 168 | MDRV_CPU_VBLANK_INT("screen", genesis_vblank_interrupt) | |
| 169 | 157 | |
| 170 | MDRV_MACHINE_START(genesis) | |
| 171 | MDRV_MACHINE_RESET(genesis) | |
| 158 | MDRV_DEVICE_REMOVE("genesis_snd_z80") | |
| 172 | 159 | |
| 173 | /* video hardware */ | |
| 174 | MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 175 | ||
| 176 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 177 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 178 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 179 | MDRV_SCREEN_SIZE(342,262) | |
| 180 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 181 | MDRV_PALETTE_LENGTH(64) | |
| 182 | ||
| 183 | MDRV_VIDEO_START(genesis) | |
| 184 | MDRV_VIDEO_UPDATE(genesis) | |
| 185 | ||
| 186 | /* sound hardware */ | |
| 187 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 188 | ||
| 189 | MDRV_SOUND_ADD("ym", YM3438, MASTER_CLOCK/7) | |
| 190 | MDRV_SOUND_CONFIG(ym3438_intf) | |
| 191 | MDRV_SOUND_ROUTE(0, "mono", 0.50) | |
| 192 | MDRV_SOUND_ROUTE(1, "mono", 0.50) | |
| 193 | ||
| 194 | MDRV_SOUND_ADD("sn", SN76496, MASTER_CLOCK/15) | |
| 195 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 196 | ||
| 197 | /* sound hardware */ | |
| 198 | 160 | MDRV_SOUND_ADD("oki", OKIM6295, 1056000) |
| 199 | 161 | MDRV_SOUND_CONFIG(okim6295_interface_pin7high) // clock frequency & pin 7 not verified |
| 200 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 162 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) | |
| 163 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) | |
| 201 | 164 | MACHINE_DRIVER_END |
| 202 | 165 | |
| 203 | 166 | /* Genie's Hardware (contains no real sega parts) */ |
| r6049 | r6050 | |
| 283 | 246 | for (i = 0; i < len; i++) |
| 284 | 247 | rom[i] = BITSWAP8(rom[i],1,4,2,0,7,5,3,6); |
| 285 | 248 | |
| 286 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") ); // VDP reads the roms from here | |
| 287 | memory_set_bankptr(machine, 2, main_ram ); // VDP reads the ram from here | |
| 249 | DRIVER_INIT_CALL(megadriv); | |
| 288 | 250 | } |
| 289 | 251 | |
| 290 | 252 | ROM_START( puckpkmn ) /* Puckman Pockimon (c)2000 Genie */ |
| r6049 | r6050 | |
|---|---|---|
| 236 | 236 | * You are told be to able to select your starting level from level 1 to level 32 |
| 237 | 237 | (ingame bug - check code at 0x3425) |
| 238 | 238 | |
| 239 | 2 | |
| 239 | 2b) 'arkangc2' | |
| 240 | 240 | |
| 241 | 241 | - "(c) Game Corporation 1986". |
| 242 | 242 | - Displays the "Arkanoid" title but routine to display "BLOCK" with bricks exists. |
| r6049 | r6050 | |
| 265 | 265 | (ingame bug - check unused code at 0x2f00 instead of standard text) |
| 266 | 266 | But you can still press the buttons and test the paddle and the Dip Switches. |
| 267 | 267 | |
| 268 | 2c) ' | |
| 268 | 2c) ' | |
| 269 | 269 | |
| 270 | - " S. P. A. CO. ". | |
| 271 | - Displays "BLOCK II" with "bricks". | |
| 272 | - Colored bricks have been replaced with aliens (ripped from "Space Invaders" ?) | |
| 273 | - No standard hardware test and no "NOTICE" screen. | |
| 274 | - Specific hardware test which reads back at 0xf000 values written to 0xd018 | |
| 275 | (check code at 0x035e); the game enters a loop until good values are returned. | |
| 276 | - No reads from 0xf002. | |
| 277 | - Reads bit 1 from 0xd008. | |
| 278 | - "Continue" Dip Switch has been replaced by sort of "Debug" Dip Switch as in 'arkangc'; | |
| 279 | however, this has no effect due to newly patched code at 0x06e9 ! | |
| 280 | - You can select your starting level (between 1 and 30) | |
| 281 | but they aren't displayed like in the original Japanese set we have ('arknoidj'). | |
| 282 | - Levels 1, 2, 3, 4, 6, 7, 11, 14, 30, 31 and 32 differ from original Japanese version; | |
| 283 | level 1 starts at a different offset (0x90a8 instead of 0xbf15). | |
| 284 | - Complerely different initials on high-scores table, but scores and rounds | |
| 285 | are the same as in the original Japanese set we have ('arknoidj'). | |
| 286 | - There seems to be code to edit levels (check code at 0x8082), but the routines | |
| 287 | don't seem to be called anymore. | |
| 288 | - Known bugs : | |
| 289 | * The paddle isn't centered when starting a new life and / or level; | |
| 290 | it doesn't "backup" the paddle position when a life is lost as well | |
| 291 | (I can't tell at the moment if it's an ingame bug or not) | |
| 292 | So the paddle can sometimes appear in the left wall ! | |
| 293 | * The "test mode" display is completely corrupted | |
| 294 | (ingame bug - check unused code at 0x2f00 instead of standard text) | |
| 295 | But you can still press the buttons and test the paddle and the Dip Switches. | |
| 296 | ||
| 297 | 2d) 'arkblock' | |
| 298 | ||
| 270 | 299 | - Same as 'arkangc', the only difference is that it displays "BLOCK" with bricks |
| 271 | 300 | instead of displaying the "Arkanoid" title : |
| 272 | 301 | |
| 273 | Z:\MAME\dasm>diff arkangc.asm arkbloc | |
| 302 | Z:\MAME\dasm>diff arkangc.asm arkblock.asm | |
| 274 | 303 | 8421,8422c8421,8424 |
| 275 | 304 | < 32EF: 21 80 03 ld hl,$0380 |
| 276 | 305 | < 32F2: CD D1 20 call $20D1 |
| r6049 | r6050 | |
| 280 | 309 | > 32F3: C9 ret |
| 281 | 310 | > 32F4: 14 inc d |
| 282 | 311 | |
| 283 | 2 | |
| 312 | 2e) 'arkbloc2' | |
| 284 | 313 | |
| 285 | 314 | - "(c) Game Corporation 1986". |
| 286 | 315 | - Displays "BLOCK" with bricks. |
| r6049 | r6050 | |
| 301 | 330 | * You are told be to able to select your starting level from level 1 to level 32 |
| 302 | 331 | (ingame bug - check code at 0x3425) |
| 303 | 332 | |
| 304 | 2 | |
| 333 | 2f) 'arkgcbl' | |
| 305 | 334 | |
| 306 | 335 | - "1986 ARKANOID 1986". |
| 307 | 336 | - Displays the "Arkanoid" title but routine to display "BLOCK" with bricks exists. |
| r6049 | r6050 | |
| 326 | 355 | * Sound in "Demo Mode" if 1 coin is inserted (ingame bug - check code at 0x0283) |
| 327 | 356 | * Red square on upper middle left "led" when it is supposed to be yellow (ingame bug) |
| 328 | 357 | |
| 329 | 2 | |
| 358 | 2g) 'paddle2' | |
| 330 | 359 | |
| 331 | 360 | - Different title, year, and inside texts but routine to display "BLOCK" with bricks exists. |
| 332 | 361 | - No hardware test and no "NOTICE" screen. |
| r6049 | r6050 | |
| 432 | 461 | * 'arkmcubl' |
| 433 | 462 | This way, even if emulation isn't perfect, people can try them and report bugs. |
| 434 | 463 | |
| 464 | ||
| 465 | Stephh's log (2009.10.07) : | |
| 466 | ||
| 467 | - Added set : | |
| 468 | * 'block2' | |
| 469 | ||
| 435 | 470 | *************************************************************************** |
| 436 | 471 | |
| 437 | 472 | Stephh's notes on 'tetrsark' (based on the game Z80 code and some tests) : |
| r6049 | r6050 | |
| 611 | 646 | |
| 612 | 647 | PORT_MODIFY("SYSTEM") |
| 613 | 648 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Some bootlegs need it to be 1 */ |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_ | |
| 649 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Some bootlegs need it to be 0 */ | |
| 615 | 650 | INPUT_PORTS_END |
| 616 | 651 | |
| 617 | 652 | static INPUT_PORTS_START( arkangc ) |
| r6049 | r6050 | |
| 632 | 667 | PORT_DIPSETTING( 0x00, DEF_STR ( Normal ) ) /* 0xc462 = 0x06 - Level 2 same as level 30 */ |
| 633 | 668 | INPUT_PORTS_END |
| 634 | 669 | |
| 670 | static INPUT_PORTS_START( block2 ) | |
| 671 | PORT_INCLUDE( arkatayt ) | |
| 672 | ||
| 673 | PORT_MODIFY("DSW") | |
| 674 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:8" ) /* Speed at 0xc462 (code at 0x06fc) : always = 0x06 */ | |
| 675 | INPUT_PORTS_END | |
| 676 | ||
| 635 | 677 | static INPUT_PORTS_START( arkgcbl ) |
| 636 | 678 | PORT_INCLUDE( arkatayt ) |
| 637 | 679 | |
| r6049 | r6050 | |
| 981 | 1023 | ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ |
| 982 | 1024 | ROM_END |
| 983 | 1025 | |
| 1026 | ROM_START( block2 ) | |
| 1027 | ROM_REGION( 0x18000, "maincpu", 0 ) | |
| 1028 | ROM_LOAD( "1.bin", 0x00000, 0x8000, CRC(2b026cae) SHA1(73d1d5d3e6d65fbe378ce85ff501610573ae5e95) ) | |
| 1029 | ROM_LOAD( "2.bin", 0x08000, 0x8000, CRC(e3843fea) SHA1(8c654dcf78d9e4f4c6a7a7d384fdf622536234c1) ) | |
| 1030 | ||
| 1031 | ROM_REGION( 0x8000, "unknown", 0 ) /* is it more data or something else like sound or palette ? not Z80 code nor levels anyway */ | |
| 1032 | ROM_LOAD( "3.bin", 0x00000, 0x8000, CRC(e336c219) SHA1(e1dce37727e7084a83e73f15a138312ab6224061) ) | |
| 1033 | ||
| 1034 | ROM_REGION( 0x18000, "gfx1", 0 ) | |
| 1035 | ROM_LOAD( "4.bin", 0x00000, 0x8000, CRC(6d2c6123) SHA1(26f32099d363ab2c8505722513638b827e49a8fc) ) | |
| 1036 | ROM_LOAD( "5.bin", 0x08000, 0x8000, CRC(09a1f9d9) SHA1(c7e21aba6efb51c5501aa1428f6d9a817cb86555) ) | |
| 1037 | ROM_LOAD( "6.bin", 0x10000, 0x8000, CRC(dfb9f7e2) SHA1(8d938ee6f8dcac0a564d5fa7cd5da34e0db07c71) ) | |
| 1038 | ||
| 1039 | // no proms were present in this set.. assumed to be the same | |
| 1040 | ROM_REGION( 0x0600, "proms", 0 ) | |
| 1041 | ROM_LOAD( "a75-07.bpr", 0x0000, 0x0200, CRC(0af8b289) SHA1(6bc589e8a609b4cf450aebedc8ce02d5d45c970f) ) /* red component */ | |
| 1042 | ROM_LOAD( "a75-08.bpr", 0x0200, 0x0200, CRC(abb002fb) SHA1(c14f56b8ef103600862e7930709d293b0aa97a73) ) /* green component */ | |
| 1043 | ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ | |
| 1044 | ROM_END | |
| 1045 | ||
| 984 | 1046 | ROM_START( arkblock ) |
| 985 | 1047 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 986 | 1048 | ROM_LOAD( "ark-6.bin", 0x0000, 0x8000, CRC(0be015de) SHA1(f4209085b59d2c96a62ac9657c7bf097da55362b) ) |
| r6049 | r6050 | |
| 1125 | 1187 | |
| 1126 | 1188 | static void arkanoid_bootleg_init( running_machine *machine ) |
| 1127 | 1189 | { |
| 1190 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf000, 0xf000, 0, 0, arkanoid_bootleg_f000_r ); | |
| 1128 | 1191 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf002, 0xf002, 0, 0, arkanoid_bootleg_f002_r ); |
| 1129 | 1192 | memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd018, 0xd018, 0, 0, arkanoid_bootleg_d018_w ); |
| 1130 | 1193 | memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd008, 0xd008, 0, 0, arkanoid_bootleg_d008_r ); |
| r6049 | r6050 | |
| 1142 | 1205 | arkanoid_bootleg_init(machine); |
| 1143 | 1206 | } |
| 1144 | 1207 | |
| 1208 | static DRIVER_INIT( block2 ) | |
| 1209 | { | |
| 1210 | // the graphics on this bootleg have the data scrambled | |
| 1211 | int tile; | |
| 1212 | UINT8* srcgfx = memory_region(machine,"gfx1"); | |
| 1213 | UINT8* buffer = alloc_array_or_die(UINT8, 0x18000); | |
| 1214 | ||
| 1215 | for (tile=0;tile<0x3000;tile++) | |
| 1216 | { | |
| 1217 | int srctile; | |
| 1218 | ||
| 1219 | // combine these into a single swap.. | |
| 1220 | srctile = BITSWAP16(tile,15,14,13,12, | |
| 1221 | 11,10,9,8, | |
| 1222 | 7,5,6,3, | |
| 1223 | 1,2,4,0); | |
| 1224 | ||
| 1225 | srctile = BITSWAP16(srctile,15,14,13,12, | |
| 1226 | 11,9,10,5, | |
| 1227 | 7,6,8,4, | |
| 1228 | 3,2,1,0); | |
| 1229 | ||
| 1230 | srctile = srctile^0xd4; | |
| 1231 | ||
| 1232 | memcpy(&buffer[tile*8], &srcgfx[srctile*8], 8); | |
| 1233 | } | |
| 1234 | ||
| 1235 | memcpy(srcgfx,buffer,0x18000); | |
| 1236 | ||
| 1237 | arkanoid_bootleg_id = BLOCK2; | |
| 1238 | arkanoid_bootleg_init(machine); | |
| 1239 | } | |
| 1240 | ||
| 1145 | 1241 | static DRIVER_INIT( arkblock ) |
| 1146 | 1242 | { |
| 1147 | 1243 | arkanoid_bootleg_id = ARKBLOCK; |
| r6049 | r6050 | |
| 1183 | 1279 | |
| 1184 | 1280 | /* Game Drivers */ |
| 1185 | 1281 | |
| 1186 | GAME( 1986, arkanoid, 0, arkanoid, arkanoid, 0, ROT90, "Taito Corporation Japan", "Arkanoid (World)", GAME_SUPPORTS_SAVE ) | |
| 1187 | GAME( 1986, arkanoidu, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US)", GAME_SUPPORTS_SAVE ) | |
| 1188 | GAME( 1986, arkanoiduo,arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US, older)", GAME_SUPPORTS_SAVE ) | |
| 1189 | GAME( 1986, arkanoidj, arkanoid, arkanoid, arknoidj, 0, ROT90, "Taito Corporation", "Arkanoid (Japan)", GAME_SUPPORTS_SAVE ) | |
| 1190 | GAME( 1986, arkmcubl, arkanoid, arkanoid, arknoidj, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU)", GAME_SUPPORTS_SAVE ) | |
| 1191 | GAME( 1986, ark1ball, arkanoid, arkanoid, ark1ball, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU, harder)", GAME_SUPPORTS_SAVE ) | |
| 1192 | GAME( 1986, arkangc, arkanoid, bootleg, arkangc, arkangc, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 1)", GAME_SUPPORTS_SAVE ) | |
| 1193 | GAME( 1986, arkangc2, arkanoid, bootleg, arkangc2, arkangc2, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 2)", GAME_SUPPORTS_SAVE ) | |
| 1194 | GAME( 1986, arkblock, arkanoid, bootleg, arkangc, arkblock, ROT90, "bootleg", "Block (Game Corporation bootleg, set 1)", GAME_SUPPORTS_SAVE ) | |
| 1195 | GAME( 1986, arkbloc2, arkanoid, bootleg, arkangc, arkbloc2, ROT90, "bootleg", "Block (Game Corporation bootleg, set 2)", GAME_SUPPORTS_SAVE ) | |
| 1196 | GAME( 1986, arkgcbl, arkanoid, bootleg, arkgcbl, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware)", GAME_SUPPORTS_SAVE ) | |
| 1197 | GAME( 1988, paddle2, arkanoid, bootleg, paddle2, paddle2, ROT90, "bootleg", "Paddle 2 (bootleg on Block hardware)", GAME_SUPPORTS_SAVE ) | |
| 1198 | GAME( 1986, arkatayt, arkanoid, bootleg, arkatayt, 0, ROT90, "bootleg", "Arkanoid (Tayto bootleg)", GAME_SUPPORTS_SAVE ) | |
| 1199 | GAME( 1986, arktayt2, arkanoid, bootleg, arktayt2, 0, ROT90, "bootleg", "Arkanoid (Tayto bootleg, harder)", GAME_SUPPORTS_SAVE ) | |
| 1200 | GAME( 1987, arkatour, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Tournament Arkanoid (US)", GAME_SUPPORTS_SAVE ) | |
| 1201 | GAME( 19??, tetrsark, 0, bootleg, tetrsark, tetrsark, ROT0, "D.R. Korea", "Tetris (D.R. Korea)", GAME_SUPPORTS_SAVE ) | |
| 1282 | GAME( 1986, arkanoid, 0, arkanoid, arkanoid, 0, ROT90, "Taito Corporation Japan", "Arkanoid (World)", GAME_SUPPORTS_SAVE ) | |
| 1283 | GAME( 1986, arkanoidu, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US)", GAME_SUPPORTS_SAVE ) | |
| 1284 | GAME( 1986, arkanoiduo, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Arkanoid (US, older)", GAME_SUPPORTS_SAVE ) | |
| 1285 | GAME( 1986, arkanoidj, arkanoid, arkanoid, arknoidj, 0, ROT90, "Taito Corporation", "Arkanoid (Japan)", GAME_SUPPORTS_SAVE ) | |
| 1286 | GAME( 1986, arkmcubl, arkanoid, arkanoid, arknoidj, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU)", GAME_SUPPORTS_SAVE ) | |
| 1287 | GAME( 1986, ark1ball, arkanoid, arkanoid, ark1ball, 0, ROT90, "bootleg", "Arkanoid (bootleg with MCU, harder)", GAME_SUPPORTS_SAVE ) | |
| 1288 | GAME( 1986, arkangc, arkanoid, bootleg, arkangc, arkangc, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 1)", GAME_SUPPORTS_SAVE ) | |
| 1289 | GAME( 1986, arkangc2, arkanoid, bootleg, arkangc2, arkangc2, ROT90, "bootleg", "Arkanoid (Game Corporation bootleg, set 2)", GAME_SUPPORTS_SAVE ) | |
| 1290 | GAME( 1986, block2, arkanoid, bootleg, block2, block2, ROT90, "bootleg", "Block 2 (S.P.A. CO. bootleg)", GAME_SUPPORTS_SAVE ) | |
| 1291 | GAME( 1986, arkblock, arkanoid, bootleg, arkangc, arkblock, ROT90, "bootleg", "Block (Game Corporation bootleg, set 1)", GAME_SUPPORTS_SAVE ) | |
| 1292 | GAME( 1986, arkbloc2, arkanoid, bootleg, arkangc, arkbloc2, ROT90, "bootleg", "Block (Game Corporation bootleg, set 2)", GAME_SUPPORTS_SAVE ) | |
| 1293 | GAME( 1986, arkgcbl, arkanoid, bootleg, arkgcbl, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware)", GAME_SUPPORTS_SAVE ) | |
| 1294 | GAME( 1988, paddle2, arkanoid, bootleg, paddle2, paddle2, ROT90, "bootleg", "Paddle 2 (bootleg on Block hardware)", GAME_SUPPORTS_SAVE ) | |
| 1295 | GAME( 1986, arkatayt, arkanoid, bootleg, arkatayt, 0, ROT90, "bootleg", "Arkanoid (Tayto bootleg)", GAME_SUPPORTS_SAVE ) | |
| 1296 | GAME( 1986, arktayt2, arkanoid, bootleg, arktayt2, 0, ROT90, "bootleg", "Arkanoid (Tayto bootleg, harder)", GAME_SUPPORTS_SAVE ) | |
| 1297 | GAME( 1987, arkatour, arkanoid, arkanoid, arkanoid, 0, ROT90, "Taito America Corporation (Romstar license)", "Tournament Arkanoid (US)", GAME_SUPPORTS_SAVE ) | |
| 1298 | GAME( 19??, tetrsark, 0, bootleg, tetrsark, tetrsark, ROT0, "D.R. Korea", "Tetris (D.R. Korea)", GAME_SUPPORTS_SAVE ) |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // miniwork.c - Minimal core work item functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #include "osdcore.h" |
| r6049 | r6050 | |
| 69 | 101 | // osd_work_item_queue |
| 70 | 102 | //============================================================ |
| 71 | 103 | |
| 72 | osd_work_item *osd_work_item_queue(osd_work_queue *queue, osd_work_callback callback, void *param, UINT32 flags) | |
| 104 | osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_callback callback, INT32 numitems, void *parambase, INT32 paramstep, UINT32 flags) | |
| 73 | 105 | { |
| 74 | 106 | osd_work_item *item; |
| 107 | int itemnum; | |
| 75 | 108 | |
| 76 | 109 | // allocate memory to hold the result |
| 77 | 110 | item = malloc(sizeof(*item)); |
| 78 | 111 | if (item == NULL) |
| 79 | 112 | return NULL; |
| 80 | 113 | |
| 81 | // execute the call directly | |
| 82 | item->result = (*callback)(param, 0); | |
| 114 | // loop over all requested items | |
| 115 | for (itemnum = 0; itemnum < numitems; itemnum++) | |
| 116 | { | |
| 117 | // execute the call directly | |
| 118 | item->result = (*callback)(parambase, 0); | |
| 119 | ||
| 120 | // advance the param | |
| 121 | parambase = (UINT8 *)parambase + paramstep; | |
| 122 | } | |
| 123 | ||
| 124 | // free the item if requested | |
| 125 | if (flags & WORK_ITEM_FLAG_AUTO_RELEASE) | |
| 126 | { | |
| 127 | free(item); | |
| 128 | item = NULL; | |
| 129 | } | |
| 83 | 130 | return item; |
| 84 | 131 | } |
| 85 | 132 |
| r0 | r6050 | |
|---|---|---|
| 1 | //============================================================ | |
| 2 | // | |
| 3 | // minimain.c - Main function for mini OSD | |
| 4 | // | |
| 5 | //============================================================ | |
| 6 | // | |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 40 | //============================================================ | |
| 41 | ||
| 42 | #include "osdepend.h" | |
| 43 | #include "render.h" | |
| 44 | #include "clifront.h" | |
| 45 | #include "mame.h" | |
| 46 | ||
| 47 | ||
| 48 | //============================================================ | |
| 49 | // CONSTANTS | |
| 50 | //============================================================ | |
| 51 | ||
| 52 | // we fake a keyboard with the following keys | |
| 53 | enum | |
| 54 | { | |
| 55 | KEY_ESCAPE, | |
| 56 | KEY_P1_START, | |
| 57 | KEY_BUTTON_1, | |
| 58 | KEY_BUTTON_2, | |
| 59 | KEY_BUTTON_3, | |
| 60 | KEY_JOYSTICK_U, | |
| 61 | KEY_JOYSTICK_D, | |
| 62 | KEY_JOYSTICK_L, | |
| 63 | KEY_JOYSTICK_R, | |
| 64 | KEY_TOTAL | |
| 65 | }; | |
| 66 | ||
| 67 | ||
| 68 | //============================================================ | |
| 69 | // GLOBALS | |
| 70 | //============================================================ | |
| 71 | ||
| 72 | // a single rendering target | |
| 73 | static render_target *our_target; | |
| 74 | ||
| 75 | // a single input device | |
| 76 | static input_device *keyboard_device; | |
| 77 | ||
| 78 | // the state of each key | |
| 79 | static UINT8 keyboard_state[KEY_TOTAL]; | |
| 80 | ||
| 81 | ||
| 82 | //============================================================ | |
| 83 | // FUNCTION PROTOTYPES | |
| 84 | //============================================================ | |
| 85 | ||
| 86 | static INT32 keyboard_get_state(void *device_internal, void *item_internal); | |
| 87 | ||
| 88 | ||
| 89 | //============================================================ | |
| 90 | // main | |
| 91 | //============================================================ | |
| 92 | ||
| 93 | int main(int argc, char *argv[]) | |
| 94 | { | |
| 95 | // cli_execute does the heavy lifting; if we have osd-specific options, we | |
| 96 | // would pass them as the third parameter here | |
| 97 | return cli_execute(argc, argv, NULL); | |
| 98 | } | |
| 99 | ||
| 100 | ||
| 101 | //============================================================ | |
| 102 | // osd_init | |
| 103 | //============================================================ | |
| 104 | ||
| 105 | void osd_init(running_machine *machine) | |
| 106 | { | |
| 107 | // initialize the video system by allocating a rendering target | |
| 108 | our_target = render_target_alloc(machine, NULL, 0); | |
| 109 | if (our_target == NULL) | |
| 110 | fatalerror("Error creating render target"); | |
| 111 | ||
| 112 | // nothing yet to do to initialize sound, since we don't have any | |
| 113 | // sound updates are handled by osd_update_audio_stream() below | |
| 114 | ||
| 115 | // initialize the input system by adding devices | |
| 116 | // let's pretend like we have a keyboard device | |
| 117 | keyboard_device = input_device_add(machine, DEVICE_CLASS_KEYBOARD, "Keyboard", NULL); | |
| 118 | if (keyboard_device == NULL) | |
| 119 | fatalerror("Error creating keyboard device"); | |
| 120 | ||
| 121 | // our faux keyboard only has a couple of keys (corresponding to the | |
| 122 | // common defaults) | |
| 123 | input_device_item_add(keyboard_device, "Esc", &keyboard_state[KEY_ESCAPE], ITEM_ID_ESC, keyboard_get_state); | |
| 124 | input_device_item_add(keyboard_device, "P1", &keyboard_state[KEY_P1_START], ITEM_ID_1, keyboard_get_state); | |
| 125 | input_device_item_add(keyboard_device, "B1", &keyboard_state[KEY_BUTTON_1], ITEM_ID_LCONTROL, keyboard_get_state); | |
| 126 | input_device_item_add(keyboard_device, "B2", &keyboard_state[KEY_BUTTON_2], ITEM_ID_LALT, keyboard_get_state); | |
| 127 | input_device_item_add(keyboard_device, "B3", &keyboard_state[KEY_BUTTON_3], ITEM_ID_SPACE, keyboard_get_state); | |
| 128 | input_device_item_add(keyboard_device, "JoyU", &keyboard_state[KEY_JOYSTICK_U], ITEM_ID_UP, keyboard_get_state); | |
| 129 | input_device_item_add(keyboard_device, "JoyD", &keyboard_state[KEY_JOYSTICK_D], ITEM_ID_DOWN, keyboard_get_state); | |
| 130 | input_device_item_add(keyboard_device, "JoyL", &keyboard_state[KEY_JOYSTICK_L], ITEM_ID_LEFT, keyboard_get_state); | |
| 131 | input_device_item_add(keyboard_device, "JoyR", &keyboard_state[KEY_JOYSTICK_R], ITEM_ID_RIGHT, keyboard_get_state); | |
| 132 | ||
| 133 | // hook up the debugger log | |
| 134 | // add_logerror_callback(machine, output_oslog); | |
| 135 | } | |
| 136 | ||
| 137 | ||
| 138 | //============================================================ | |
| 139 | // osd_wait_for_debugger | |
| 140 | //============================================================ | |
| 141 | ||
| 142 | void osd_wait_for_debugger(const device_config *device, int firststop) | |
| 143 | { | |
| 144 | // we don't have a debugger, so we just return here | |
| 145 | } | |
| 146 | ||
| 147 | ||
| 148 | //============================================================ | |
| 149 | // osd_update | |
| 150 | //============================================================ | |
| 151 | ||
| 152 | void osd_update(running_machine *machine, int skip_redraw) | |
| 153 | { | |
| 154 | const render_primitive_list *primlist; | |
| 155 | int minwidth, minheight; | |
| 156 | ||
| 157 | // get the minimum width/height for the current layout | |
| 158 | render_target_get_minimum_size(our_target, &minwidth, &minheight); | |
| 159 | ||
| 160 | // make that the size of our target | |
| 161 | render_target_set_bounds(our_target, minwidth, minheight, 0); | |
| 162 | ||
| 163 | // get the list of primitives for the target at the current size | |
| 164 | primlist = render_target_get_primitives(our_target); | |
| 165 | ||
| 166 | // lock them, and then render them | |
| 167 | osd_lock_acquire(primlist->lock); | |
| 168 | // do the drawing here | |
| 169 | osd_lock_release(primlist->lock); | |
| 170 | ||
| 171 | // after 5 seconds, exit | |
| 172 | if (attotime_compare(timer_get_time(machine), attotime_make(5, 0)) > 0) | |
| 173 | mame_schedule_exit(machine); | |
| 174 | } | |
| 175 | ||
| 176 | ||
| 177 | //============================================================ | |
| 178 | // osd_update_audio_stream | |
| 179 | //============================================================ | |
| 180 | ||
| 181 | void osd_update_audio_stream(running_machine *machine, INT16 *buffer, int samples_this_frame) | |
| 182 | { | |
| 183 | // if we had actual sound output, we would copy the | |
| 184 | // interleaved stereo samples to our sound stream | |
| 185 | } | |
| 186 | ||
| 187 | ||
| 188 | //============================================================ | |
| 189 | // osd_set_mastervolume | |
| 190 | //============================================================ | |
| 191 | ||
| 192 | void osd_set_mastervolume(int attenuation) | |
| 193 | { | |
| 194 | // if we had actual sound output, we would adjust the global | |
| 195 | // volume in response to this function | |
| 196 | } | |
| 197 | ||
| 198 | ||
| 199 | //============================================================ | |
| 200 | // osd_customize_input_type_list | |
| 201 | //============================================================ | |
| 202 | ||
| 203 | void osd_customize_input_type_list(input_type_desc *typelist) | |
| 204 | { | |
| 205 | // This function is called on startup, before reading the | |
| 206 | // configuration from disk. Scan the list, and change the | |
| 207 | // default control mappings you want. It is quite possible | |
| 208 | // you won't need to change a thing. | |
| 209 | } | |
| 210 | ||
| 211 | ||
| 212 | //============================================================ | |
| 213 | // keyboard_get_state | |
| 214 | //============================================================ | |
| 215 | ||
| 216 | static INT32 keyboard_get_state(void *device_internal, void *item_internal) | |
| 217 | { | |
| 218 | // this function is called by the input system to get the current key | |
| 219 | // state; it is specified as a callback when adding items to input | |
| 220 | // devices | |
| 221 | UINT8 *keystate = (UINT8 *)item_internal; | |
| 222 | return *keystate; | |
| 223 | } |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minimisc.c - Minimal core miscellaneous functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #include "osdcore.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Minimal OSD makefile |
| 6 | 6 | # |
| 7 | # Copyright Nicola Salmoria and the MAME Team. | |
| 8 | # Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ########################################################################### | |
| 9 | 8 | # |
| 9 | # Copyright Aaron Giles | |
| 10 | # All rights reserved. | |
| 11 | # | |
| 12 | # Redistribution and use in source and binary forms, with or without | |
| 13 | # modification, are permitted provided that the following conditions are | |
| 14 | # met: | |
| 15 | # | |
| 16 | # * Redistributions of source code must retain the above copyright | |
| 17 | # notice, this list of conditions and the following disclaimer. | |
| 18 | # * Redistributions in binary form must reproduce the above copyright | |
| 19 | # notice, this list of conditions and the following disclaimer in | |
| 20 | # the documentation and/or other materials provided with the | |
| 21 | # distribution. | |
| 22 | # * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | # used to endorse or promote products derived from this software | |
| 24 | # without specific prior written permission. | |
| 25 | # | |
| 26 | # THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | # DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | # POSSIBILITY OF SUCH DAMAGE. | |
| 37 | # | |
| 10 | 38 | ########################################################################### |
| 11 | 39 | |
| 12 | 40 | |
| 13 | 41 | #------------------------------------------------- |
| 42 | # object and source roots | |
| 43 | #------------------------------------------------- | |
| 44 | ||
| 45 | MINISRC = $(SRC)/osd/$(OSD) | |
| 46 | MINIOBJ = $(OBJ)/osd/$(OSD) | |
| 47 | ||
| 48 | OBJDIRS += $(MINIOBJ) | |
| 49 | ||
| 50 | ||
| 51 | ||
| 52 | #------------------------------------------------- | |
| 14 | 53 | # OSD core library |
| 15 | 54 | #------------------------------------------------- |
| 16 | 55 | |
| 17 | 56 | OSDCOREOBJS = \ |
| 18 | $(OBJ)/$(MAMEOS)/minidir.o \ | |
| 19 | $(OBJ)/$(MAMEOS)/minifile.o \ | |
| 20 | $(OBJ)/$(MAMEOS)/minimisc.o \ | |
| 21 | $(OBJ)/$(MAMEOS)/minisync.o \ | |
| 22 | $(OBJ)/$(MAMEOS)/minitime.o \ | |
| 23 | $(OBJ)/$(MAMEOS)/miniwork.o \ | |
| 57 | $(MINIOBJ)/minidir.o \ | |
| 58 | $(MINIOBJ)/minifile.o \ | |
| 59 | $(MINIOBJ)/minimisc.o \ | |
| 60 | $(MINIOBJ)/minisync.o \ | |
| 61 | $(MINIOBJ)/minitime.o \ | |
| 62 | $(MINIOBJ)/miniwork.o \ | |
| 63 | ||
| 64 | ||
| 65 | ||
| 66 | #------------------------------------------------- | |
| 67 | # OSD mini library | |
| 68 | #------------------------------------------------- | |
| 69 | ||
| 70 | OSDOBJS = \ | |
| 71 | $(MINIOBJ)/minimain.o | |
| 72 | ||
| 73 | ||
| 74 | ||
| 75 | #------------------------------------------------- | |
| 76 | # rules for building the libaries | |
| 77 | #------------------------------------------------- | |
| 78 | ||
| 79 | $(LIBOCORE): $(OSDCOREOBJS) | |
| 80 | ||
| 81 | $(LIBOSD): $(OSDOBJS) |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minisync.c - Minimal core synchronization functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #include "osdcore.h" |
| r6049 | r6050 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 1 | //============================================================ | |
| 2 | // | |
| 3 | // minidir.c - Minimal core directory access functions | |
| 4 | // | |
| 5 | //============================================================ | |
| 6 | // | |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 40 | //============================================================ | |
| 2 | 41 | |
| 3 | minidir.c - Minimal core directory access functions | |
| 4 | ||
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ||
| 8 | ***************************************************************************/ | |
| 9 | ||
| 10 | 42 | #include "osdcore.h" |
| 11 | 43 | |
| 12 | 44 | |
| r6049 | r6050 | |
| 43 | 75 | // since there are no standard C library routines for walking directories, |
| 44 | 76 | // we do nothing |
| 45 | 77 | } |
| 78 | ||
| 79 | ||
| 80 | //============================================================ | |
| 81 | // osd_is_absolute_path | |
| 82 | //============================================================ | |
| 83 | ||
| 84 | int osd_is_absolute_path(const char *path) | |
| 85 | { | |
| 86 | // assume no for everything | |
| 87 | return FALSE; | |
| 88 | } |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minitime.c - Minimal core timing functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #include "osdepend.h" |
| r6049 | r6050 | |
| 34 | 66 | |
| 35 | 67 | |
| 36 | 68 | //============================================================ |
| 37 | // get_profile_ticks | |
| 38 | //============================================================ | |
| 39 | ||
| 40 | osd_ticks_t get_profile_ticks(void) | |
| 41 | { | |
| 42 | // on x86 platforms, we should return the value of RDTSC here | |
| 43 | // generically, we fall back to clock(), which hopefully is | |
| 44 | // fast | |
| 45 | return clock(); | |
| 46 | } | |
| 47 | ||
| 48 | ||
| 49 | //============================================================ | |
| 50 | 69 | // osd_sleep |
| 51 | 70 | //============================================================ |
| 52 | 71 |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minifile.c - Minimal core file access functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #include "osdcore.h" |
| r6049 | r6050 | |
| 50 | 82 | |
| 51 | 83 | |
| 52 | 84 | //============================================================ |
| 85 | // osd_close | |
| 86 | //============================================================ | |
| 87 | ||
| 88 | file_error osd_close(osd_file *file) | |
| 89 | { | |
| 90 | // close the file handle | |
| 91 | fclose((FILE *)file); | |
| 92 | return FILERR_NONE; | |
| 93 | } | |
| 94 | ||
| 95 | ||
| 96 | //============================================================ | |
| 53 | 97 | // osd_read |
| 54 | 98 | //============================================================ |
| 55 | 99 | |
| r6049 | r6050 | |
| 90 | 134 | |
| 91 | 135 | |
| 92 | 136 | //============================================================ |
| 93 | // osd_ | |
| 137 | // osd_rmfil | |
| 94 | 138 | //============================================================ |
| 95 | 139 | |
| 96 | file_error osd_ | |
| 140 | file_error osd_rmfil | |
| 97 | 141 | { |
| 98 | // close the file handle | |
| 99 | fclose((FILE *)file); | |
| 100 | return FILERR_NONE; | |
| 142 | return remove(filename) ? FILERR_FAILURE : FILERR_NONE; | |
| 101 | 143 | } |
| 102 | 144 | |
| 103 | 145 |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core OS-dependent code interface. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | The prototypes in this file describe the interfaces that the MAME core |
| r6049 | r6050 | |
| 352 | 380 | -----------------------------------------------------------------------------*/ |
| 353 | 381 | osd_ticks_t osd_ticks(void); |
| 354 | 382 | |
| 383 | ||
| 355 | 384 | /*----------------------------------------------------------------------------- |
| 356 | 385 | osd_ticks_per_second: return the number of ticks per second |
| 357 | 386 | |
| r6049 | r6050 | |
| 366 | 395 | -----------------------------------------------------------------------------*/ |
| 367 | 396 | osd_ticks_t osd_ticks_per_second(void); |
| 368 | 397 | |
| 398 | ||
| 369 | 399 | /*----------------------------------------------------------------------------- |
| 370 | 400 | osd_sleep: sleep for the specified time interval |
| 371 | 401 |
| r6049 | r6050 | |
|---|---|---|
| 5 | 5 | Common definitions shared by the OSD layer. This includes the most |
| 6 | 6 | fundamental integral types as well as compiler-specific tweaks. |
| 7 | 7 | |
| 8 | Copyright Nicola Salmoria and the MAME Team. | |
| 9 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 8 | **************************************************************************** | |
| 10 | 9 | |
| 10 | Copyright Aaron Giles | |
| 11 | All rights reserved. | |
| 12 | ||
| 13 | Redistribution and use in source and binary forms, with or without | |
| 14 | modification, are permitted provided that the following conditions are | |
| 15 | met: | |
| 16 | ||
| 17 | * Redistributions of source code must retain the above copyright | |
| 18 | notice, this list of conditions and the following disclaimer. | |
| 19 | * Redistributions in binary form must reproduce the above copyright | |
| 20 | notice, this list of conditions and the following disclaimer in | |
| 21 | the documentation and/or other materials provided with the | |
| 22 | distribution. | |
| 23 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 24 | used to endorse or promote products derived from this software | |
| 25 | without specific prior written permission. | |
| 26 | ||
| 27 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 28 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 30 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 32 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 34 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 35 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 36 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 37 | POSSIBILITY OF SUCH DAMAGE. | |
| 38 | ||
| 11 | 39 | ***************************************************************************/ |
| 12 | 40 | |
| 13 | 41 | #pragma once |
| r6049 | r6050 | |
| 50 | 78 | #define ATTR_CONST __attribute__((const)) |
| 51 | 79 | #define ATTR_FORCE_INLINE __attribute__((always_inline)) |
| 52 | 80 | #define ATTR_NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) |
| 53 | #define UNEXPECTED(exp) __builtin_expect((exp), 0) | |
| 81 | #define UNEXPECTED(exp) __builtin_expect(!!(exp), 0) | |
| 82 | #define EXPECTED(exp) __builtin_expect(!!(exp), 1) | |
| 54 | 83 | #define RESTRICT __restrict__ |
| 55 | 84 | #define SETJMP_GNUC_PROTECT() (void)__builtin_return_address(1) |
| 56 | 85 | #ifndef TYPES_COMPATIBLE |
| r6049 | r6050 | |
| 66 | 95 | #define ATTR_FORCE_INLINE |
| 67 | 96 | #define ATTR_NONNULL(...) |
| 68 | 97 | #define UNEXPECTED(exp) (exp) |
| 98 | #define EXPECTED(exp) (exp) | |
| 69 | 99 | #define RESTRICT |
| 70 | 100 | #define SETJMP_GNUC_PROTECT() do {} while (0) |
| 71 | 101 | #ifndef TYPES_COMPATIBLE |
| r6049 | r6050 | |
| 158 | 188 | #define S64(val) val |
| 159 | 189 | #endif |
| 160 | 190 | |
| 191 | ||
| 192 | /* Concatenate/extract 32-bit halves of 64-bit values */ | |
| 193 | #define CONCAT_64(hi,lo) (((UINT64)(hi) << 32) | (UINT32)(lo)) | |
| 194 | #define EXTRACT_64HI(val) ((UINT32)((val) >> 32)) | |
| 195 | #define EXTRACT_64LO(val) ((UINT32)(val)) | |
| 196 | ||
| 197 | ||
| 161 | 198 | /* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ |
| 162 | 199 | #if (defined(__MINGW32__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))) || defined(_MSVC_VER) |
| 163 | 200 | #define I64FMT "I64" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | OS-dependent code interface. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | The prototypes in this file describe the interfaces that the MAME core |
| r6049 | r6050 | |
|---|---|---|
| 1 | 1 | //============================================================ |
| 2 | 2 | // |
| 3 | // strconv. | |
| 3 | // strconv.c - Win32 string conversion | |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // output.c - Win32 implementation of MAME output routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 1 | 1 | //============================================================ |
| 2 | 2 | // |
| 3 | // d | |
| 3 | // d | |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | #ifndef __WIN_DRAWD3DI__ | |
| 11 | #define __WIN_DRAWD3DI__ | |
| 42 | #ifndef __WIN_D3DINTF__ | |
| 43 | #define __WIN_D3DINTF__ | |
| 12 | 44 | |
| 13 | 45 | |
| 14 | 46 | //============================================================ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutil.h - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WINUTIL__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // strconv.h - Win32 string conversion |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WIN_STRCONV__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // output.h - Win32 implementation of MAME output routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WINDOWS_OUTPUT_H__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // wintime.c - Win32 OSD core timing functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawnone.c - stub "nothing" drawer |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Windows-specific makefile |
| 6 | 6 | # |
| 7 | # Copyright Nicola Salmoria and the MAME Team. | |
| 8 | # Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ########################################################################### | |
| 9 | 8 | # |
| 9 | # Copyright Aaron Giles | |
| 10 | # All rights reserved. | |
| 11 | # | |
| 12 | # Redistribution and use in source and binary forms, with or without | |
| 13 | # modification, are permitted provided that the following conditions are | |
| 14 | # met: | |
| 15 | # | |
| 16 | # * Redistributions of source code must retain the above copyright | |
| 17 | # notice, this list of conditions and the following disclaimer. | |
| 18 | # * Redistributions in binary form must reproduce the above copyright | |
| 19 | # notice, this list of conditions and the following disclaimer in | |
| 20 | # the documentation and/or other materials provided with the | |
| 21 | # distribution. | |
| 22 | # * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | # used to endorse or promote products derived from this software | |
| 24 | # without specific prior written permission. | |
| 25 | # | |
| 26 | # THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | # DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | # POSSIBILITY OF SUCH DAMAGE. | |
| 37 | # | |
| 10 | 38 | ########################################################################### |
| 11 | 39 | |
| 12 | 40 |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winprefix.h - Win32 prefix file, included by ALL files |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #define _WIN32_WINNT 0x0501 |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawgdi.c - Win32 GDI drawing |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // d3d8intf.c - Direct3D 8.1 abstraction layer |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // d3d9intf.c - Direct3D 9 abstraction layer |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // sound.c - Win32 implementation of MAME sound routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winsync.c - Win32 OSD core synchronization functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
| 169 | 201 | { |
| 170 | 202 | return InterlockedExchangeAdd((LONG *) ptr, delta) + delta; |
| 171 | 203 | } |
| 172 |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // Inline implementations for MSVC compiler. |
| 6 | 6 | // |
| 7 | // Copyright Nicola Salmoria and the MAME Team. | |
| 8 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | //============================================================ | |
| 9 | 8 | // |
| 9 | // Copyright Aaron Giles | |
| 10 | // All rights reserved. | |
| 11 | // | |
| 12 | // Redistribution and use in source and binary forms, with or | |
| 13 | // without modification, are permitted provided that the | |
| 14 | // following conditions are met: | |
| 15 | // | |
| 16 | // * Redistributions of source code must retain the above | |
| 17 | // copyright notice, this list of conditions and the | |
| 18 | // following disclaimer. | |
| 19 | // * Redistributions in binary form must reproduce the | |
| 20 | // above copyright notice, this list of conditions and | |
| 21 | // the following disclaimer in the documentation and/or | |
| 22 | // other materials provided with the distribution. | |
| 23 | // * Neither the name 'MAME' nor the names of its | |
| 24 | // contributors may be used to endorse or promote | |
| 25 | // products derived from this software without specific | |
| 26 | // prior written permission. | |
| 27 | // | |
| 28 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 29 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 30 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 31 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 32 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 34 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 35 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 36 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 37 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 38 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 39 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 40 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 41 | // | |
| 10 | 42 | //============================================================ |
| 11 | 43 | |
| 12 | 44 | #ifndef __EIVC__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // vconv.c - VC++ parameter conversion code |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #define WIN32_LEAN_AND_MEAN |
| r6049 | r6050 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 1 | //============================================================ | |
| 2 | // | |
| 3 | // windir.c - Win32 OSD core directory access functions | |
| 4 | // | |
| 5 | //============================================================ | |
| 6 | // | |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 40 | //============================================================ | |
| 2 | 41 | |
| 3 | windir.c - Win32 OSD core directory access functions | |
| 4 | ||
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ||
| 8 | ***************************************************************************/ | |
| 9 | ||
| 10 | 42 | // standard windows headers |
| 11 | 43 | #define WIN32_LEAN_AND_MEAN |
| 12 | 44 | #include <windows.h> |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winfile.c - Win32 OSD core file access functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // sound.h - Win32 implementation of MAME sound routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WIN_SOUND__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // input.c - Win32 implementation of MAME input routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // For testing purposes: force DirectInput |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winwork.c - Win32 OSD core work item functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // x86 inline implementations for MSVC compiler. |
| 6 | 6 | // |
| 7 | // Copyright Nicola Salmoria and the MAME Team. | |
| 8 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | //============================================================ | |
| 9 | 8 | // |
| 9 | // Copyright Aaron Giles | |
| 10 | // All rights reserved. | |
| 11 | // | |
| 12 | // Redistribution and use in source and binary forms, with or | |
| 13 | // without modification, are permitted provided that the | |
| 14 | // following conditions are met: | |
| 15 | // | |
| 16 | // * Redistributions of source code must retain the above | |
| 17 | // copyright notice, this list of conditions and the | |
| 18 | // following disclaimer. | |
| 19 | // * Redistributions in binary form must reproduce the | |
| 20 | // above copyright notice, this list of conditions and | |
| 21 | // the following disclaimer in the documentation and/or | |
| 22 | // other materials provided with the distribution. | |
| 23 | // * Neither the name 'MAME' nor the names of its | |
| 24 | // contributors may be used to endorse or promote | |
| 25 | // products derived from this software without specific | |
| 26 | // prior written permission. | |
| 27 | // | |
| 28 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 29 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 30 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 31 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 32 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 34 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 35 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 36 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 37 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 38 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 39 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 40 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 41 | // | |
| 10 | 42 | //============================================================ |
| 11 | 43 | |
| 12 | 44 | #ifndef __EIVCX86__ |
| r6049 | r6050 | |
|---|---|---|
| 1 | //============================================================ | |
| 1 | 2 | // |
| 2 | 3 | // mame.rc - Minimal resource file for Win32 MAME |
| 3 | 4 | // |
| 4 | // Copyright Nicola Salmoria and the MAME Team. | |
| 5 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 6 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 40 | //============================================================ | |
| 7 | 41 | |
| 8 | 42 | #define NOWINRES |
| 9 | 43 | #include "windows.h" |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmain.c - Win32 main program |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 3 | 3 | // ledutil.c - Win32 example code that tracks changing |
| 4 | 4 | // outputs and updates the keyboard LEDs in response |
| 5 | 5 | // |
| 6 | // Copyright Nicola Salmoria and the MAME Team. | |
| 7 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 6 | //============================================================ | |
| 8 | 7 | // |
| 8 | // Copyright Aaron Giles | |
| 9 | // All rights reserved. | |
| 10 | // | |
| 11 | // Redistribution and use in source and binary forms, with or | |
| 12 | // without modification, are permitted provided that the | |
| 13 | // following conditions are met: | |
| 14 | // | |
| 15 | // * Redistributions of source code must retain the above | |
| 16 | // copyright notice, this list of conditions and the | |
| 17 | // following disclaimer. | |
| 18 | // * Redistributions in binary form must reproduce the | |
| 19 | // above copyright notice, this list of conditions and | |
| 20 | // the following disclaimer in the documentation and/or | |
| 21 | // other materials provided with the distribution. | |
| 22 | // * Neither the name 'MAME' nor the names of its | |
| 23 | // contributors may be used to endorse or promote | |
| 24 | // products derived from this software without specific | |
| 25 | // prior written permission. | |
| 26 | // | |
| 27 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 28 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 29 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 30 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 31 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 32 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 33 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 34 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 35 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 36 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 37 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 38 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 39 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 40 | // | |
| 9 | 41 | //============================================================ |
| 10 | 42 | // |
| 11 | 43 | // This is sample code. To use it as a starting point, you |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutf8.c - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // input.h - Win32 implementation of MAME input routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __INPUT_H |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // debugwin.c - Win32 debug window handling |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawdd.c - Win32 DirectDraw implementation |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // video.c - Win32 video handling |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // window.c - Win32 window handling |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #define LOG_THREADS 0 |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmain.h - Win32 main program and core headers |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winalloc.c - Win32 memory allocation routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // debugwin.h - Win32 debug window handling |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WIN_DEBUGWIN__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmisc.c - Win32 OSD core miscellaneous functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutf8.h - Win32 UTF-8 wrappers |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WINUTF8__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // video.h - Win32 implementation of MAME video routines |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WIN_VIDEO__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // window.h - Win32 window handling |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | #ifndef __WIN_WINDOW__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // Inline implementations for non-GCC Win32 compilers |
| 6 | 6 | // |
| 7 | // Copyright Nicola Salmoria and the MAME Team. | |
| 8 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | //============================================================ | |
| 9 | 8 | // |
| 9 | // Copyright Aaron Giles | |
| 10 | // All rights reserved. | |
| 11 | // | |
| 12 | // Redistribution and use in source and binary forms, with or | |
| 13 | // without modification, are permitted provided that the | |
| 14 | // following conditions are met: | |
| 15 | // | |
| 16 | // * Redistributions of source code must retain the above | |
| 17 | // copyright notice, this list of conditions and the | |
| 18 | // following disclaimer. | |
| 19 | // * Redistributions in binary form must reproduce the | |
| 20 | // above copyright notice, this list of conditions and | |
| 21 | // the following disclaimer in the documentation and/or | |
| 22 | // other materials provided with the distribution. | |
| 23 | // * Neither the name 'MAME' nor the names of its | |
| 24 | // contributors may be used to endorse or promote | |
| 25 | // products derived from this software without specific | |
| 26 | // prior written permission. | |
| 27 | // | |
| 28 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 29 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 30 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 31 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 32 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 33 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 34 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 35 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 36 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 37 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 38 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 39 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 40 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 41 | // | |
| 10 | 42 | //============================================================ |
| 11 | 43 | |
| 12 | 44 | #ifndef __OSINLINE__ |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawd3d.c - Win32 Direct3D implementation |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // Useful info: |
| r6049 | r6050 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutil.c - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 5 | //============================================================ | |
| 7 | 6 | // |
| 7 | // Copyright Aaron Giles | |
| 8 | // All rights reserved. | |
| 9 | // | |
| 10 | // Redistribution and use in source and binary forms, with or | |
| 11 | // without modification, are permitted provided that the | |
| 12 | // following conditions are met: | |
| 13 | // | |
| 14 | // * Redistributions of source code must retain the above | |
| 15 | // copyright notice, this list of conditions and the | |
| 16 | // following disclaimer. | |
| 17 | // * Redistributions in binary form must reproduce the | |
| 18 | // above copyright notice, this list of conditions and | |
| 19 | // the following disclaimer in the documentation and/or | |
| 20 | // other materials provided with the distribution. | |
| 21 | // * Neither the name 'MAME' nor the names of its | |
| 22 | // contributors may be used to endorse or promote | |
| 23 | // products derived from this software without specific | |
| 24 | // prior written permission. | |
| 25 | // | |
| 26 | // THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND | |
| 27 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 28 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 29 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
| 30 | // EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 32 | // DAMAGE (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 33 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 34 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| 35 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 36 | // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 37 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
| 38 | // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 39 | // | |
| 8 | 40 | //============================================================ |
| 9 | 41 | |
| 10 | 42 | // standard windows headers |
| r6049 | r6050 | |
|---|---|---|
| 369 | 369 | |
| 370 | 370 | int debug_cpu_translate(const address_space *space, int intention, offs_t *address) |
| 371 | 371 | { |
| 372 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 373 | if (info->translate != NULL) | |
| 374 | return (*info->translate)(space->cpu, space->spacenum, intention, address); | |
| 375 | else | |
| 376 | return TRUE; | |
| 372 | if (space->cpu != NULL && space->cpu->type == CPU) | |
| 373 | { | |
| 374 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 375 | if (info->translate != NULL) | |
| 376 | return (*info->translate)(space->cpu, space->spacenum, intention, address); | |
| 377 | } | |
| 378 | return TRUE; | |
| 377 | 379 | } |
| 378 | 380 | |
| 379 | 381 | |
| r6049 | r6050 | |
| 1334 | 1336 | |
| 1335 | 1337 | UINT8 debug_read_byte(const address_space *space, offs_t address, int apply_translation) |
| 1336 | 1338 | { |
| 1339 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1337 | 1340 | debugcpu_private *global = space->machine->debugcpu_data; |
| 1338 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1339 | 1341 | UINT64 custom; |
| 1340 | 1342 | UINT8 result; |
| 1341 | 1343 | |
| r6049 | r6050 | |
| 1350 | 1352 | result = 0xff; |
| 1351 | 1353 | |
| 1352 | 1354 | /* if there is a custom read handler, and it returns TRUE, use that value */ |
| 1353 | else if (info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 1, &custom)) | |
| 1355 | else if (info != NULL && info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 1, &custom)) | |
| 1354 | 1356 | result = custom; |
| 1355 | 1357 | |
| 1356 | 1358 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1392 | 1394 | /* otherwise, this proceeds like the byte case */ |
| 1393 | 1395 | else |
| 1394 | 1396 | { |
| 1395 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1397 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1396 | 1398 | UINT64 custom; |
| 1397 | 1399 | |
| 1398 | 1400 | /* all accesses from this point on are for the debugger */ |
| r6049 | r6050 | |
| 1403 | 1405 | result = 0xffff; |
| 1404 | 1406 | |
| 1405 | 1407 | /* if there is a custom read handler, and it returns TRUE, use that value */ |
| 1406 | else if (info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 2, &custom)) | |
| 1408 | else if (info != NULL && info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 2, &custom)) | |
| 1407 | 1409 | result = custom; |
| 1408 | 1410 | |
| 1409 | 1411 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1447 | 1449 | /* otherwise, this proceeds like the byte case */ |
| 1448 | 1450 | else |
| 1449 | 1451 | { |
| 1450 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1452 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1451 | 1453 | UINT64 custom; |
| 1452 | 1454 | |
| 1453 | 1455 | /* all accesses from this point on are for the debugger */ |
| r6049 | r6050 | |
| 1458 | 1460 | result = 0xffffffff; |
| 1459 | 1461 | |
| 1460 | 1462 | /* if there is a custom read handler, and it returns TRUE, use that value */ |
| 1461 | else if (info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 4, &custom)) | |
| 1463 | else if (info != NULL && info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 4, &custom)) | |
| 1462 | 1464 | result = custom; |
| 1463 | 1465 | |
| 1464 | 1466 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1502 | 1504 | /* otherwise, this proceeds like the byte case */ |
| 1503 | 1505 | else |
| 1504 | 1506 | { |
| 1505 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1507 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1506 | 1508 | UINT64 custom; |
| 1507 | 1509 | |
| 1508 | 1510 | /* all accesses from this point on are for the debugger */ |
| r6049 | r6050 | |
| 1513 | 1515 | result = ~(UINT64)0; |
| 1514 | 1516 | |
| 1515 | 1517 | /* if there is a custom read handler, and it returns TRUE, use that value */ |
| 1516 | else if (info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 8, &custom)) | |
| 1518 | else if (info != NULL && info->read != NULL && (*info->read)(space->cpu, space->spacenum, address, 8, &custom)) | |
| 1517 | 1519 | result = custom; |
| 1518 | 1520 | |
| 1519 | 1521 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1554 | 1556 | |
| 1555 | 1557 | void debug_write_byte(const address_space *space, offs_t address, UINT8 data, int apply_translation) |
| 1556 | 1558 | { |
| 1559 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1557 | 1560 | debugcpu_private *global = space->machine->debugcpu_data; |
| 1558 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1559 | 1561 | |
| 1560 | 1562 | /* mask against the logical byte mask */ |
| 1561 | 1563 | address &= space->logbytemask; |
| r6049 | r6050 | |
| 1568 | 1570 | ; |
| 1569 | 1571 | |
| 1570 | 1572 | /* if there is a custom write handler, and it returns TRUE, use that */ |
| 1571 | else if (info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 1, data)) | |
| 1573 | else if (info != NULL && info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 1, data)) | |
| 1572 | 1574 | ; |
| 1573 | 1575 | |
| 1574 | 1576 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1611 | 1613 | /* otherwise, this proceeds like the byte case */ |
| 1612 | 1614 | else |
| 1613 | 1615 | { |
| 1614 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1616 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1615 | 1617 | |
| 1616 | 1618 | /* all accesses from this point on are for the debugger */ |
| 1617 | 1619 | memory_set_debugger_access(space, global->debugger_access = TRUE); |
| r6049 | r6050 | |
| 1621 | 1623 | ; |
| 1622 | 1624 | |
| 1623 | 1625 | /* if there is a custom write handler, and it returns TRUE, use that */ |
| 1624 | else if (info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 2, data)) | |
| 1626 | else if (info != NULL && info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 2, data)) | |
| 1625 | 1627 | ; |
| 1626 | 1628 | |
| 1627 | 1629 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1665 | 1667 | /* otherwise, this proceeds like the byte case */ |
| 1666 | 1668 | else |
| 1667 | 1669 | { |
| 1668 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1670 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1669 | 1671 | |
| 1670 | 1672 | /* all accesses from this point on are for the debugger */ |
| 1671 | 1673 | memory_set_debugger_access(space, global->debugger_access = TRUE); |
| r6049 | r6050 | |
| 1675 | 1677 | ; |
| 1676 | 1678 | |
| 1677 | 1679 | /* if there is a custom write handler, and it returns TRUE, use that */ |
| 1678 | else if (info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 4, data)) | |
| 1680 | else if (info != NULL && info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 4, data)) | |
| 1679 | 1681 | ; |
| 1680 | 1682 | |
| 1681 | 1683 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
| 1719 | 1721 | /* otherwise, this proceeds like the byte case */ |
| 1720 | 1722 | else |
| 1721 | 1723 | { |
| 1722 | cpu_debug_data *info = cpu_get_debug_data(space->cpu); | |
| 1724 | cpu_debug_data *info = (space->cpu->type == CPU) ? cpu_get_debug_data(space->cpu) : NULL; | |
| 1723 | 1725 | |
| 1724 | 1726 | /* all accesses from this point on are for the debugger */ |
| 1725 | 1727 | memory_set_debugger_access(space, global->debugger_access = TRUE); |
| r6049 | r6050 | |
| 1729 | 1731 | ; |
| 1730 | 1732 | |
| 1731 | 1733 | /* if there is a custom write handler, and it returns TRUE, use that */ |
| 1732 | else if (info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 8, data)) | |
| 1734 | else if (info != NULL && info->write != NULL && (*info->write)(space->cpu, space->spacenum, address, 8, data)) | |
| 1733 | 1735 | ; |
| 1734 | 1736 | |
| 1735 | 1737 | /* otherwise, call the byte reading function for the translated address */ |
| r6049 | r6050 | |
|---|---|---|
| 2392 | 2392 | astring *tempstring = astring_alloc(); |
| 2393 | 2393 | memory_subview_item *head = NULL; |
| 2394 | 2394 | memory_subview_item **tailptr = &head; |
| 2395 | const device_config *c | |
| 2395 | const device_config *device | |
| 2396 | 2396 | int spacenum; |
| 2397 | 2397 | const char *rgntag; |
| 2398 | 2398 | int curindex = 0; |
| 2399 | 2399 | int itemnum; |
| 2400 | 2400 | |
| 2401 | /* first add all the CPUs' address spaces */ | |
| 2402 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 2401 | /* first add all the device's address spaces */ | |
| 2402 | for (device = machine->config->devicelist; device != NULL; device = device->next) | |
| 2403 | 2403 | for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++) |
| 2404 | 2404 | { |
| 2405 | const address_space *space = | |
| 2405 | const address_space *space = m | |
| 2406 | 2406 | if (space != NULL) |
| 2407 | 2407 | { |
| 2408 | 2408 | memory_subview_item *subview; |
| 2409 | 2409 | |
| 2410 | 2410 | /* determine the string and allocate a subview large enough */ |
| 2411 | astring_printf(tempstring, "CPU '%s' (%s) %s memory", cpu->tag, cpu_get_name(cpu), space->name); | |
| 2411 | if (device->type == CPU) | |
| 2412 | astring_printf(tempstring, "CPU '%s' (%s) %s memory", device->tag, device_get_name(device), space->name); | |
| 2413 | else | |
| 2414 | astring_printf(tempstring, "%s '%s' space #%d memory", device_get_name(device), device->tag, spacenum); | |
| 2412 | 2415 | subview = (memory_subview_item *)auto_alloc_array_clear(machine, UINT8, sizeof(*subview) + astring_len(tempstring)); |
| 2413 | 2416 | |
| 2414 | 2417 | /* populate the subview */ |
| r6049 | r6050 | |
| 2886 | 2889 | int recompute = view->recompute; |
| 2887 | 2890 | |
| 2888 | 2891 | /* handle expression changes */ |
| 2889 | if (debug_view_expression_changed_value(view, &memdata->expression, (space != NULL) ? space->cpu : NULL)) | |
| 2892 | if (debug_view_expression_changed_value(view, &memdata->expression, (space != NULL && space->cpu != NULL && space->cpu->type == CPU) ? space->cpu : NULL)) | |
| 2890 | 2893 | { |
| 2891 | 2894 | recompute = TRUE; |
| 2892 | 2895 | view->topleft.y = (memdata->expression.result - memdata->byte_offset) / memdata->bytes_per_row; |
| r6049 | r6050 | |
|---|---|---|
| 12 | 12 | #ifndef __TEXTBUF_H__ |
| 13 | 13 | #define __TEXTBUF_H__ |
| 14 | 14 | |
| 15 | #include "osd_cpu.h" | |
| 16 | 15 | |
| 17 | ||
| 18 | 16 | /*************************************************************************** |
| 19 | 17 | TYPE DEFINITIONS |
| 20 | 18 | ***************************************************************************/ |
| r6049 | r6050 | |
|---|---|---|
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | ||
| 11 | pmmu_translate_addr: perform 68851/68030-style PMMU address translation | |
| 12 | 12 | */ |
| 13 | 13 | INLINE UINT32 pmmu_translate_addr(m68ki_cpu_core *m68k, UINT32 addr_in) |
| 14 | 14 | { |
| 15 | UINT32 addr_out, tbl_entry, tbl_entry2, tamode, tbmode; | |
| 15 | UINT32 addr_out, tbl_entry = 0, tbl_entry2, tamode = 0, tbmode = 0; | |
| 16 | 16 | UINT32 root_aptr, root_limit, tofs, is, abits, bbits, cbits; |
| 17 | 17 | UINT32 resolved, tptr, shift; |
| 18 | 18 | |
| r6049 | r6050 | |
| 37 | 37 | bbits = (m68k->mmu_tc>>8)&0xf; |
| 38 | 38 | cbits = (m68k->mmu_tc>>4)&0xf; |
| 39 | 39 | |
| 40 | // | |
| 40 | // logerror("PMMU: tcr %08x limit %08x aptr %08x is %x abits %d bbits %d cbits %d\n", m68k->mmu_tc, root_limit, root_aptr, is, abits, bbits, cbits); | |
| 41 | 41 | |
| 42 | 42 | // get table A offset |
| 43 | 43 | tofs = (addr_in<<is)>>(32-abits); |
| 44 | ||
| 45 | // find out what format table A is | |
| 44 | ||
| 45 | // find out what format table A is | |
| 46 | 46 | switch (root_limit & 3) |
| 47 | 47 | { |
| 48 | 48 | case 0: // invalid, should cause MMU exception |
| r6049 | r6050 | |
| 52 | 52 | |
| 53 | 53 | case 2: // valid 4 byte descriptors |
| 54 | 54 | tofs *= 4; |
| 55 | // | |
| 55 | // logerror("PMMU: reading table A entry at %08x\n", tofs + (root_aptr & 0xfffffffc)); | |
| 56 | 56 | tbl_entry = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc)); |
| 57 | 57 | tamode = tbl_entry & 3; |
| 58 | // | |
| 58 | // logerror("PMMU: addr %08x entry %08x mode %x tofs %x\n", addr_in, tbl_entry, tamode, tofs); | |
| 59 | 59 | break; |
| 60 | 60 | |
| 61 | 61 | case 3: // valid 8 byte descriptors |
| 62 | 62 | tofs *= 8; |
| 63 | // | |
| 63 | // logerror("PMMU: reading table A entries at %08x\n", tofs + (root_aptr & 0xfffffffc)); | |
| 64 | 64 | tbl_entry2 = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc)); |
| 65 | 65 | tbl_entry = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc)+4); |
| 66 | 66 | tamode = tbl_entry2 & 3; |
| 67 | // | |
| 67 | // logerror("PMMU: addr %08x entry %08x entry2 %08x mode %x tofs %x\n", addr_in, tbl_entry, tbl_entry2, tamode, tofs); | |
| 68 | 68 | break; |
| 69 | 69 | } |
| 70 | 70 | |
| r6049 | r6050 | |
| 78 | 78 | case 0: // invalid, should cause MMU exception |
| 79 | 79 | fatalerror("680x0 PMMU: Unhandled Table A mode %d (addr_in %08x)\n", tamode, addr_in); |
| 80 | 80 | break; |
| 81 | ||
| 81 | ||
| 82 | 82 | case 2: // 4-byte table B descriptor |
| 83 | 83 | tofs *= 4; |
| 84 | // | |
| 84 | // logerror("PMMU: reading table B entry at %08x\n", tofs + tptr); | |
| 85 | 85 | tbl_entry = memory_read_dword_32be(m68k->program, tofs + tptr); |
| 86 | 86 | tbmode = tbl_entry & 3; |
| 87 | // | |
| 87 | // logerror("PMMU: addr %08x entry %08x mode %x tofs %x\n", addr_in, tbl_entry, tbmode, tofs); | |
| 88 | 88 | break; |
| 89 | 89 | |
| 90 | 90 | case 3: // 8-byte table B descriptor |
| 91 | 91 | tofs *= 8; |
| 92 | // | |
| 92 | // logerror("PMMU: reading table B entries at %08x\n", tofs + tptr); | |
| 93 | 93 | tbl_entry2 = memory_read_dword_32be(m68k->program, tofs + tptr); |
| 94 | 94 | tbl_entry = memory_read_dword_32be(m68k->program, tofs + tptr + 4); |
| 95 | 95 | tbmode = tbl_entry2 & 3; |
| 96 | // | |
| 96 | // logerror("PMMU: addr %08x entry %08x entry2 %08x mode %x tofs %x\n", addr_in, tbl_entry, tbl_entry2, tbmode, tofs); | |
| 97 | 97 | break; |
| 98 | 98 | |
| 99 | 99 | case 1: // early termination descriptor |
| r6049 | r6050 | |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | // | |
| 129 | // if ((addr_in < 0x40000000) || (addr_in > 0x4fffffff)) printf("PMMU: [%08x] => [%08x]\n", addr_in, addr_out); | |
| 130 | 130 | |
| 131 | 131 | return addr_out; |
| 132 | 132 | } |
| r6049 | r6050 | |
| 144 | 144 | tblA @ 043ffcc0: |
| 145 | 145 | |
| 146 | 146 | 043ffcc0 0001fc0a 043ffcb0 => 00000019 04000019 |
| 147 | 043ffcc8 7ffffc18 00000000 | |
| 148 | 043ffcd0 7ffffc18 00000000 | |
| 149 | 043ffcd8 7ffffc18 00000000 | |
| 150 | 043ffce0 7ffffc18 00000000 | |
| 151 | 043ffce8 7ffffc18 00000000 | |
| 152 | 043ffcf0 7ffffc18 00000000 | |
| 153 | 043ffcf8 7ffffc18 00000000 | |
| 147 | 043ffcc8 7ffffc18 00000000 | |
| 148 | 043ffcd0 7ffffc18 00000000 | |
| 149 | 043ffcd8 7ffffc18 00000000 | |
| 150 | 043ffce0 7ffffc18 00000000 | |
| 151 | 043ffce8 7ffffc18 00000000 | |
| 152 | 043ffcf0 7ffffc18 00000000 | |
| 153 | 043ffcf8 7ffffc18 00000000 | |
| 154 | 154 | 043ffd00 7ffffc19 40000000 |
| 155 | 155 | 043ffd08 7ffffc19 48000000 |
| 156 | 156 | 043ffd10 7ffffc59 50000000 |
| r6049 | r6050 | |
|---|---|---|
| 8014 | 8014 | { |
| 8015 | 8015 | modes = m68ki_read_imm_16(m68k); |
| 8016 | 8016 | ea = M68KMAKE_GET_EA_AY_32; |
| 8017 | ||
| 8017 | ||
| 8018 | 8018 | if ((modes & 0xfde0) == 0x2000) // PLOAD |
| 8019 | 8019 | { |
| 8020 | 8020 | logerror("680x0: unhandled PLOAD\n"); |
| r6049 | r6050 | |
|---|---|---|
| 1087 | 1087 | static UINT8 read_byte_32_mmu(const address_space *space, offs_t address) |
| 1088 | 1088 | { |
| 1089 | 1089 | m68ki_cpu_core *m68k = get_safe_token(space->cpu); |
| 1090 | ||
| 1090 | ||
| 1091 | 1091 | if (m68k->pmmu_enabled) |
| 1092 | 1092 | { |
| 1093 | 1093 | address = pmmu_translate_addr(m68k, address); |
| r6049 | r6050 | |
| 1099 | 1099 | static void write_byte_32_mmu(const address_space *space, offs_t address, UINT8 data) |
| 1100 | 1100 | { |
| 1101 | 1101 | m68ki_cpu_core *m68k = get_safe_token(space->cpu); |
| 1102 | ||
| 1102 | ||
| 1103 | 1103 | if (m68k->pmmu_enabled) |
| 1104 | 1104 | { |
| 1105 | 1105 | address = pmmu_translate_addr(m68k, address); |
| r6049 | r6050 | |
| 1111 | 1111 | static UINT16 read_immediate_16_mmu(const address_space *space, offs_t address) |
| 1112 | 1112 | { |
| 1113 | 1113 | m68ki_cpu_core *m68k = get_safe_token(space->cpu); |
| 1114 | ||
| 1114 | ||
| 1115 | 1115 | if (m68k->pmmu_enabled) |
| 1116 | 1116 | { |
| 1117 | 1117 | address = pmmu_translate_addr(m68k, address); |
| r6049 | r6050 | |
|---|---|---|
| 516 | 516 | else \ |
| 517 | 517 | { \ |
| 518 | 518 | INT32 *rd2 = &R##REG(tms,DSTREG(op)+1); \ |
| 519 | INT64 dividend = COMBINE_64_32_32(*rd1, *rd2); \ | |
| 520 | INT64 quotient = DIV_64_64_32(dividend, *rs); \ | |
| 521 | INT32 remainder = MOD_32_64_32(dividend, *rs); \ | |
| 519 | INT64 dividend = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \ | |
| 520 | INT64 quotient = dividend / *rs; \ | |
| 521 | INT32 remainder = dividend % *rs; \ | |
| 522 | 522 | UINT32 signbits = (INT32)quotient >> 31; \ |
| 523 | if ( | |
| 523 | if (EXTRACT_ | |
| 524 | 524 | { \ |
| 525 | 525 | SET_V_LOG(tms, 1); \ |
| 526 | 526 | } \ |
| r6049 | r6050 | |
| 564 | 564 | else \ |
| 565 | 565 | { \ |
| 566 | 566 | INT32 *rd2 = &R##REG(tms,DSTREG(op)+1); \ |
| 567 | UINT64 dividend = COMBINE_U64_U32_U32(*rd1, *rd2); \ | |
| 568 | UINT64 quotient = DIV_U64_U64_U32(dividend, *rs); \ | |
| 569 | UINT32 remainder = MOD_U32_U64_U32(dividend, *rs); \ | |
| 570 | if (HI32_U32_U64(quotient) != 0) \ | |
| 567 | UINT64 dividend = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \ | |
| 568 | UINT64 quotient = dividend / (UINT32)*rs; \ | |
| 569 | UINT32 remainder = dividend % (UINT32)*rs; \ | |
| 570 | if (EXTRACT_64HI(quotient) != 0) \ | |
| 571 | 571 | { \ |
| 572 | 572 | SET_V_LOG(tms, 1); \ |
| 573 | 573 | } \ |
| r6049 | r6050 | |
| 730 | 730 | \ |
| 731 | 731 | SEXTEND(m1, FW(tms,1)); \ |
| 732 | 732 | CLR_NZ(tms); \ |
| 733 | product = | |
| 733 | product = mul_ | |
| 734 | 734 | SET_Z_LOG(tms, product == 0); \ |
| 735 | 735 | SET_N_BIT(tms, product >> 32, 31); \ |
| 736 | 736 | \ |
| 737 | *rd1 = HI32_32_64(product); \ | |
| 738 | R##REG(tms,DSTREG(op)|1) = LO32_32_64(product); \ | |
| 737 | *rd1 = EXTRACT_64HI(product); \ | |
| 738 | R##REG(tms,DSTREG(op)|1) = EXTRACT_64LO(product); \ | |
| 739 | 739 | \ |
| 740 | 740 | COUNT_CYCLES(tms,20); \ |
| 741 | 741 | } |
| r6049 | r6050 | |
| 750 | 750 | \ |
| 751 | 751 | ZEXTEND(m1, FW(tms,1)); \ |
| 752 | 752 | CLR_Z(tms); \ |
| 753 | product = | |
| 753 | product = mulu_ | |
| 754 | 754 | SET_Z_LOG(tms, product == 0); \ |
| 755 | 755 | \ |
| 756 | *rd1 = HI32_32_64(product); \ | |
| 757 | R##REG(tms,DSTREG(op)|1) = LO32_32_64(product); \ | |
| 756 | *rd1 = EXTRACT_64HI(product); \ | |
| 757 | R##REG(tms,DSTREG(op)|1) = EXTRACT_64LO(product); \ | |
| 758 | 758 | \ |
| 759 | 759 | COUNT_CYCLES(tms,21); \ |
| 760 | 760 | } |
| r6049 | r6050 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "debugger.h" |
| 11 | #include "osd_cpu.h" | |
| 12 | 11 | #include "tms34010.h" |
| 13 | 12 | |
| 14 | 13 |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | #define __TMS57002_H__ |
| 5 | 5 | |
| 6 | 6 | #include "cpuintrf.h" |
| 7 | #include "osd_cpu.h" | |
| 8 | 7 | #include "driver.h" |
| 9 | 8 | |
| 10 | 9 | enum { |
| r6049 | r6050 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | |
| 7 | 7 | #include "cpuintrf.h" |
| 8 | #include "osd_cpu.h" | |
| 9 | 8 | #include "driver.h" |
| 10 | 9 | |
| 11 | 10 | enum |
| r6049 | r6050 | |
|---|---|---|
| 215 | 215 | #include "cpuexec.h" |
| 216 | 216 | #include "eminline.h" |
| 217 | 217 | #include "e132xs.h" |
| 218 | #include "osd_cpu.h" | |
| 219 | 218 | |
| 220 | 219 | #ifdef MAME_DEBUG |
| 221 | 220 | #define DEBUG_PRINTF(x) do { mame_printf_debug x; } while (0) |
| r6049 | r6050 | |
| 1793 | 1792 | SET_DREG(SREG); |
| 1794 | 1793 | SET_DREGF(SREGF); |
| 1795 | 1794 | |
| 1796 | tmp = CO | |
| 1795 | tmp = CO | |
| 1797 | 1796 | SET_Z( tmp == 0 ? 1 : 0 ); |
| 1798 | 1797 | SET_N( SIGN_BIT(SREG) ); |
| 1799 | 1798 | |
| r6049 | r6050 | |
| 1817 | 1816 | { |
| 1818 | 1817 | UINT64 dividend; |
| 1819 | 1818 | |
| 1820 | dividend = CO | |
| 1819 | dividend = CO | |
| 1821 | 1820 | |
| 1822 | 1821 | if( SREG == 0 ) |
| 1823 | 1822 | { |
| r6049 | r6050 | |
| 1866 | 1865 | { |
| 1867 | 1866 | INT64 dividend; |
| 1868 | 1867 | |
| 1869 | dividend = (INT64) CO | |
| 1868 | dividend = (INT64) CO | |
| 1870 | 1869 | |
| 1871 | 1870 | if( SREG == 0 || (DREG & 0x80000000) ) |
| 1872 | 1871 | { |
| r6049 | r6050 | |
| 2535 | 2534 | high_order = DREG; |
| 2536 | 2535 | low_order = DREGF; |
| 2537 | 2536 | |
| 2538 | val = CO | |
| 2537 | val = CO | |
| 2539 | 2538 | |
| 2540 | 2539 | if( N_VALUE ) |
| 2541 | 2540 | SET_C((val >> (N_VALUE - 1)) & 1); |
| r6049 | r6050 | |
| 2544 | 2543 | |
| 2545 | 2544 | val >>= N_VALUE; |
| 2546 | 2545 | |
| 2547 | high_order = HI32_32_64(val); | |
| 2548 | low_order = LO32_32_64(val); | |
| 2546 | high_order = EXTRACT_64HI(val); | |
| 2547 | low_order = EXTRACT_64LO(val); | |
| 2549 | 2548 | |
| 2550 | 2549 | SET_DREG(high_order); |
| 2551 | 2550 | SET_DREGF(low_order); |
| r6049 | r6050 | |
| 2571 | 2570 | high_order = DREG; |
| 2572 | 2571 | low_order = DREGF; |
| 2573 | 2572 | |
| 2574 | val = CO | |
| 2573 | val = CO | |
| 2575 | 2574 | |
| 2576 | 2575 | if( n ) |
| 2577 | 2576 | SET_C((val >> (n - 1)) & 1); |
| r6049 | r6050 | |
| 2580 | 2579 | |
| 2581 | 2580 | val >>= n; |
| 2582 | 2581 | |
| 2583 | high_order = HI32_32_64(val); | |
| 2584 | low_order = LO32_32_64(val); | |
| 2582 | high_order = EXTRACT_64HI(val); | |
| 2583 | low_order = EXTRACT_64LO(val); | |
| 2585 | 2584 | |
| 2586 | 2585 | SET_DREG(high_order); |
| 2587 | 2586 | SET_DREGF(low_order); |
| r6049 | r6050 | |
| 2624 | 2623 | high_order = DREG; |
| 2625 | 2624 | low_order = DREGF; |
| 2626 | 2625 | |
| 2627 | val = CO | |
| 2626 | val = CO | |
| 2628 | 2627 | |
| 2629 | 2628 | if( N_VALUE ) |
| 2630 | 2629 | SET_C((val >> (N_VALUE - 1)) & 1); |
| r6049 | r6050 | |
| 2673 | 2672 | high_order = DREG; |
| 2674 | 2673 | low_order = DREGF; |
| 2675 | 2674 | |
| 2676 | val = CO | |
| 2675 | val = CO | |
| 2677 | 2676 | |
| 2678 | 2677 | if( n ) |
| 2679 | 2678 | SET_C((val >> (n - 1)) & 1); |
| r6049 | r6050 | |
| 2745 | 2744 | high_order = DREG; |
| 2746 | 2745 | low_order = DREGF; |
| 2747 | 2746 | |
| 2748 | val = CO | |
| 2747 | val = CO | |
| 2749 | 2748 | SET_C( (N_VALUE)?(((val<<(N_VALUE-1))&U64(0x8000000000000000))?1:0):0); |
| 2750 | 2749 | mask = ((((UINT64)1) << (32 - N_VALUE)) - 1) ^ 0xffffffff; |
| 2751 | 2750 | tmp = high_order << N_VALUE; |
| r6049 | r6050 | |
| 2758 | 2757 | |
| 2759 | 2758 | val <<= N_VALUE; |
| 2760 | 2759 | |
| 2761 | high_order = HI32_32_64(val); | |
| 2762 | low_order = LO32_32_64(val); | |
| 2760 | high_order = EXTRACT_64HI(val); | |
| 2761 | low_order = EXTRACT_64LO(val); | |
| 2763 | 2762 | |
| 2764 | 2763 | SET_DREG(high_order); |
| 2765 | 2764 | SET_DREGF(low_order); |
| r6049 | r6050 | |
| 2789 | 2788 | |
| 2790 | 2789 | mask = ((((UINT64)1) << (32 - n)) - 1) ^ 0xffffffff; |
| 2791 | 2790 | |
| 2792 | val = CO | |
| 2791 | val = CO | |
| 2793 | 2792 | SET_C( (n)?(((val<<(n-1))&U64(0x8000000000000000))?1:0):0); |
| 2794 | 2793 | tmp = high_order << n; |
| 2795 | 2794 | |
| r6049 | r6050 | |
| 2801 | 2800 | |
| 2802 | 2801 | val <<= n; |
| 2803 | 2802 | |
| 2804 | high_order = HI32_32_64(val); | |
| 2805 | low_order = LO32_32_64(val); | |
| 2803 | high_order = EXTRACT_64HI(val); | |
| 2804 | low_order = EXTRACT_64LO(val); | |
| 2806 | 2805 | |
| 2807 | 2806 | SET_DREG(high_order); |
| 2808 | 2807 | SET_DREGF(low_order); |
| r6049 | r6050 | |
| 4055 | 4054 | { |
| 4056 | 4055 | INT64 result; |
| 4057 | 4056 | |
| 4058 | result = (INT64)CO | |
| 4057 | result = (INT64)CO | |
| 4059 | 4058 | |
| 4060 | 4059 | vals = result >> 32; |
| 4061 | 4060 | vald = result & 0xffffffff; |
| r6049 | r6050 | |
| 4079 | 4078 | { |
| 4080 | 4079 | INT64 result; |
| 4081 | 4080 | |
| 4082 | result = (INT64)CO | |
| 4081 | result = (INT64)CO | |
| 4083 | 4082 | |
| 4084 | 4083 | vals = result >> 32; |
| 4085 | 4084 | vald = result & 0xffffffff; |
| r6049 | r6050 | |
| 4103 | 4102 | { |
| 4104 | 4103 | INT64 result; |
| 4105 | 4104 | |
| 4106 | result = (INT64)CO | |
| 4105 | result = (INT64)CO | |
| 4107 | 4106 | |
| 4108 | 4107 | vals = result >> 32; |
| 4109 | 4108 | vald = result & 0xffffffff; |
| r6049 | r6050 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | #include "debugger.h" |
| 47 | 47 | #include "z8000.h" |
| 48 | #include "osd_cpu.h" | |
| 49 | 48 | |
| 50 | 49 | #define VERBOSE 0 |
| 51 | 50 |
| r6049 | r6050 | |
|---|---|---|
| 5300 | 5300 | static void ZB1_dddd_0111(z8000_state *cpustate) |
| 5301 | 5301 | { |
| 5302 | 5302 | GET_DST(OP0,NIB2); |
| 5303 | cpustate->RQ(dst) = COMBINE_U64_U32_U32((cpustate->RQ(dst) & S32) ? | |
| 5304 | 0xfffffffful : 0, LO32_U32_U64(cpustate->RQ(dst))); | |
| 5303 | cpustate->RQ(dst) = CONCAT_64((cpustate->RQ(dst) & S32) ? | |
| 5304 | 0xfffffffful : 0, EXTRACT_64LO(cpustate->RQ(dst))); | |
| 5305 | 5305 | } |
| 5306 | 5306 | |
| 5307 | 5307 | /****************************************** |
| r6049 | r6050 | |
|---|---|---|
| 64 | 64 | */ |
| 65 | 65 | |
| 66 | 66 | #include "debugger.h" |
| 67 | #include "osd_cpu.h" | |
| 68 | 67 | #include "psx.h" |
| 69 | 68 | |
| 70 | 69 | #define LOG_BIOSCALL ( 0 ) |
| r6049 | r6050 | |
| 1146 | 1145 | { |
| 1147 | 1146 | case MULTIPLIER_OPERATION_MULT: |
| 1148 | 1147 | { |
| 1149 | INT64 result = MUL_64_32_32( (INT32)psxcpu->multiplier_operand1, (INT32)psxcpu->multiplier_operand2 ); | |
| 1150 | psxcpu->lo = LO32_32_64( result ); | |
| 1151 | psxcpu->hi = HI32_32_64( result ); | |
| 1148 | INT64 result = mul_32x32( (INT32)psxcpu->multiplier_operand1, (INT32)psxcpu->multiplier_operand2 ); | |
| 1149 | psxcpu->lo = EXTRACT_64LO( result ); | |
| 1150 | psxcpu->hi = EXTRACT_64HI( result ); | |
| 1152 | 1151 | } |
| 1153 | 1152 | break; |
| 1154 | 1153 | |
| 1155 | 1154 | case MULTIPLIER_OPERATION_MULTU: |
| 1156 | 1155 | { |
| 1157 | UINT64 result = MUL_U64_U32_U32( psxcpu->multiplier_operand1, psxcpu->multiplier_operand2 ); | |
| 1158 | psxcpu->lo = LO32_U32_U64( result ); | |
| 1159 | psxcpu->hi = HI32_U32_U64( result ); | |
| 1156 | UINT64 result = mulu_32x32( psxcpu->multiplier_operand1, psxcpu->multiplier_operand2 ); | |
| 1157 | psxcpu->lo = EXTRACT_64LO( result ); | |
| 1158 | psxcpu->hi = EXTRACT_64HI( result ); | |
| 1160 | 1159 | } |
| 1161 | 1160 | break; |
| 1162 | 1161 |
| r6049 | r6050 | |
|---|---|---|
| 147 | 147 | UINT16 STR0, STR1; |
| 148 | 148 | UINT8 IFR; |
| 149 | 149 | UINT8 RPTC; |
| 150 | PAIR ACC; | |
| 150 | PAIR ACC; | |
| 151 | 151 | PAIR Preg; |
| 152 | 152 | UINT16 Treg; |
| 153 | 153 | UINT16 AR[8]; |
| r6049 | r6050 | |
|---|---|---|
| 222 | 222 | |
| 223 | 223 | /* reset globals */ |
| 224 | 224 | strdata->stream_tailptr = &strdata->stream_head; |
| 225 | strdata->update_attoseconds = STREAMS_UPDATE_ | |
| 225 | strdata->update_attoseconds = STREAMS_UPDATE_ATTOTIME | |
| 226 | 226 | |
| 227 | 227 | /* set the global pointer */ |
| 228 | 228 | machine->streams_data = strdata; |
| r6049 | r6050 | |
|---|---|---|
| 19 | 19 | CONSTANTS |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | |
| 22 | #define STREAMS_UPDATE_FREQUENCY ATTOTIME_IN_HZ(50) | |
| 22 | #define STREAMS_UPDATE_FREQUENCY (50) | |
| 23 | #define STREAMS_UPDATE_ATTOTIME ATTOTIME_IN_HZ(STREAMS_UPDATE_FREQUENCY) | |
| 23 | 24 | |
| 24 | 25 | |
| 25 | 26 |
| r6049 | r6050 | |
|---|---|---|
| 1309 | 1309 | /* if we have a valid game driver, parse game-specific INI files */ |
| 1310 | 1310 | if (driver != NULL) |
| 1311 | 1311 | { |
| 1312 | #ifndef MESS | |
| 1313 | 1312 | const game_driver *parent = driver_get_clone(driver); |
| 1314 | 1313 | const game_driver *gparent = (parent != NULL) ? driver_get_clone(parent) : NULL; |
| 1315 | 1314 | const device_config *device; |
| r6049 | r6050 | |
| 1350 | 1349 | parse_ini_file(options, gparent->name, OPTION_PRIORITY_GPARENT_INI); |
| 1351 | 1350 | if (parent != NULL) |
| 1352 | 1351 | parse_ini_file(options, parent->name, OPTION_PRIORITY_PARENT_INI); |
| 1353 | #endif | |
| 1354 | 1352 | parse_ini_file(options, driver->name, OPTION_PRIORITY_DRIVER_INI); |
| 1355 | 1353 | } |
| 1356 | 1354 | } |
| r6049 | r6050 | |
|---|---|---|
| 36 | 36 | * |
| 37 | 37 | *************************************/ |
| 38 | 38 | |
| 39 | static void task_check(discrete_task *task, | |
| 39 | static void task_check(discrete_task *task, | |
| 40 | 40 | { |
| 41 | 41 | int inputnum; |
| 42 | 42 | const linked_list_entry *node_entry; |
| r6049 | r6050 | |
| 76 | 76 | if (task->numbuffered >= DISCRETE_MAX_TASK_OUTPUTS) |
| 77 | 77 | fatalerror("dso_task_start - Number of maximum buffered nodes exceeded"); |
| 78 | 78 | |
| 79 | task->node_buf[task->numbuffered] = auto_alloc_array(task_node->info->device->machine, double, 2048); | |
| 79 | task->node_buf[task->numbuffered] = auto_alloc_array(task_node->info->device->machine, double, | |
| 80 | ((task_node->info->sample_rate + STREAMS_UPDATE_FREQUENCY) / STREAMS_UPDATE_FREQUENCY)); | |
| 80 | 81 | task->source[task->numbuffered] = (double *) dest_node->input[inputnum]; |
| 81 | 82 | task->nodes[task->numbuffered] = discrete_find_node(task_node->info, inputnode); |
| 82 | 83 | i = task->numbuffered; |
| r6049 | r6050 | |
| 87 | 88 | /* register into source list */ |
| 88 | 89 | source = auto_alloc(dest_node->info->device->machine, discrete_source_node); |
| 89 | 90 | linked_list_add(dest_node->info, |
| 90 | | |
| 91 | | |
| 91 | 92 | source); |
| 92 | 93 | source->task = task; |
| 93 | 94 | source->output_node = i; |
| r6049 | r6050 | |
| 137 | 138 | const linked_list_entry *entry; |
| 138 | 139 | |
| 139 | 140 | /* update source node buffer */ |
| 140 | for (entry = task->source_list; entry != | |
| 141 | for (entry = task->source_list; entry != NULL; entry = entry->next) | |
| 141 | 142 | { |
| 142 | 143 | discrete_source_node *sn = (discrete_source_node *) entry->ptr; |
| 143 | 144 | sn->buffer = *sn->ptr++; |
| r6049 | r6050 | |
|---|---|---|
| 34 | 34 | struct dss_input_context |
| 35 | 35 | { |
| 36 | 36 | stream_sample_t *ptr; /* current in ptr for stream */ |
| 37 | UINT8 data; /* data written */ | |
| 38 | 37 | double gain; /* node gain */ |
| 39 | 38 | double offset; /* node offset */ |
| 39 | UINT8 data; /* data written */ | |
| 40 | 40 | UINT8 is_stream; |
| 41 | 41 | UINT8 is_buffered; |
| 42 | 42 | UINT32 stream_in_number; |
| r6049 | r6050 | |
| 155 | 155 | INT32 rawportval = input_port_read_direct(context->port); |
| 156 | 156 | |
| 157 | 157 | /* only recompute if the value changed from last time */ |
| 158 | if (rawportval != context->lastpval) | |
| 158 | if (UNEXPECTED(rawportval != context->lastpval)) | |
| 159 | 159 | { |
| 160 | 160 | double portval = (double)(rawportval - context->pmin) * context->pscale; |
| 161 | 161 | double scaledval = portval * context->scale + context->min; |
| r6049 | r6050 | |
| 288 | 288 | /* the context pointer is set to point to the current input stream data in discrete_stream_update */ |
| 289 | 289 | struct dss_input_context *context = (struct dss_input_context *)node->context; |
| 290 | 290 | |
| 291 | if (context->ptr) | |
| 291 | if (EXPECTED(context->ptr)) | |
| 292 | 292 | { |
| 293 | 293 | node->output[0] = (*context->ptr) * context->gain + context->offset; |
| 294 | 294 | context->ptr++; |
| r6049 | r6050 | |
| 302 | 302 | struct dss_input_context *context = (struct dss_input_context *)node->context; |
| 303 | 303 | |
| 304 | 304 | context->ptr = NULL; |
| 305 | | |
| 305 | | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | static DISCRETE_START(dss_input_stream) |
| r6049 | r6050 | |
|---|---|---|
| 175 | 175 | double exponent_d[2]; /* Discharge exponents based on function F3 */ |
| 176 | 176 | double exponent2[2]; /* Discharge/charge exponents based on function F4 */ |
| 177 | 177 | double exponent3[2]; /* Discharge/charge exponents based on function F5 */ |
| 178 | double exponent4; /* Discharge/charge exponents for c4 */ | |
| 178 | 179 | double v_cap1; /* charge on cap c1 */ |
| 179 | 180 | double v_cap2; /* charge on cap c2 */ |
| 180 | 181 | double v_cap3; /* charge on cap c3 */ |
| 182 | double v_cap4; /* charge on cap c4 */ | |
| 181 | 183 | double r67; /* = r6 + r7 (for easy use later) */ |
| 184 | UINT8 has_c4; | |
| 185 | UINT8 has_r4; | |
| 182 | 186 | }; |
| 183 | 187 | |
| 184 | 188 | |
| r6049 | r6050 | |
| 1087 | 1091 | double v_ref = info->vRef; |
| 1088 | 1092 | double rI = info->rI; |
| 1089 | 1093 | |
| 1090 | if (DST_MIXER__ENABLE) | |
| 1094 | if (EXPECTED(DST_MIXER__ENABLE)) | |
| 1091 | 1095 | { |
| 1092 | 1096 | r_total = context->r_total; |
| 1093 | 1097 | |
| 1094 | if (context->r_node_bit_flag != 0) | |
| 1098 | if (UNEXPECTED(context->r_node_bit_flag != 0)) | |
| 1095 | 1099 | { |
| 1096 | 1100 | /* loop and do any high pass filtering for connected caps */ |
| 1097 | 1101 | /* but first see if there is an r_node for the current path */ |
| r6049 | r6050 | |
| 1157 | 1161 | bit_mask = bit_mask << 1; |
| 1158 | 1162 | } |
| 1159 | 1163 | } |
| 1160 | else if (c_bit_flag != 0) | |
| 1164 | else if (UNEXPECTED(c_bit_flag != 0)) | |
| 1161 | 1165 | { |
| 1162 | 1166 | /* no r_nodes, so just do high pass filtering */ |
| 1163 | 1167 | for (bit = 0; bit < context->size; bit++) |
| r6049 | r6050 | |
| 1176 | 1180 | else |
| 1177 | 1181 | { |
| 1178 | 1182 | /* no r_nodes or c_nodes, mixing only */ |
| 1179 | if (type == DISC_MIXER_IS_OP_AMP) | |
| 1183 | if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP)) | |
| 1180 | 1184 | { |
| 1181 | 1185 | for (bit = 0; bit < context->size; bit++) |
| 1182 | 1186 | i += ( v_ref - DST_MIXER__IN(bit) ) / info->r[bit]; |
| r6049 | r6050 | |
| 1188 | 1192 | } |
| 1189 | 1193 | } |
| 1190 | 1194 | |
| 1191 | if (type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1195 | if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP_WITH_RI)) | |
| 1192 | 1196 | i += v_ref / rI; |
| 1193 | 1197 | |
| 1194 | 1198 | r_total = 1.0 / r_total; |
| r6049 | r6050 | |
| 1197 | 1201 | * If op-amp then summing formula is used. */ |
| 1198 | 1202 | v = i * ((type == DISC_MIXER_IS_OP_AMP) ? info->rF : r_total); |
| 1199 | 1203 | |
| 1200 | if (type == DISC_MIXER_IS_OP_AMP_WITH_RI) | |
| 1204 | if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP_WITH_RI)) | |
| 1201 | 1205 | v = v_ref + (context->gain * (v_ref - v)); |
| 1202 | 1206 | |
| 1203 | 1207 | /* Do the low pass filtering for cF */ |
| 1204 | if (info->cF != 0) | |
| 1208 | if (EXPECTED(info->cF != 0)) | |
| 1205 | 1209 | { |
| 1206 | if (r_node_bit_flag != 0) | |
| 1210 | if (UNEXPECTED(r_node_bit_flag != 0)) | |
| 1207 | 1211 | { |
| 1208 | 1212 | /* Re-calculate exponent if resistor nodes are used */ |
| 1209 | 1213 | context->exponent_c_f = RC_CHARGE_EXP(r_total * info->cF); |
| r6049 | r6050 | |
| 1213 | 1217 | } |
| 1214 | 1218 | |
| 1215 | 1219 | /* Do the high pass filtering for cAmp */ |
| 1216 | if (info->cAmp != 0) | |
| 1220 | if (EXPECTED(info->cAmp != 0)) | |
| 1217 | 1221 | { |
| 1218 | 1222 | context->v_cap_amp += (v - context->v_cap_amp) * context->exponent_c_amp; |
| 1219 | 1223 | v -= context->v_cap_amp; |
| r6049 | r6050 | |
| 1404 | 1408 | /* If the state is triggered we will need to countdown later */ |
| 1405 | 1409 | int do_count = context->state; |
| 1406 | 1410 | |
| 1407 | if (DST_ONESHOT__RESET) | |
| 1411 | if (UNEXPECTED(DST_ONESHOT__RESET)) | |
| 1408 | 1412 | { |
| 1409 | 1413 | /* Hold in Reset */ |
| 1410 | 1414 | node->output[0] = 0; |
| r6049 | r6050 | |
| 1413 | 1417 | else |
| 1414 | 1418 | { |
| 1415 | 1419 | /* are we at an edge? */ |
| 1416 | if (trigger != context->last_trig) | |
| 1420 | if (UNEXPECTED(trigger != context->last_trig)) | |
| 1417 | 1421 | { |
| 1418 | 1422 | /* There has been a trigger edge */ |
| 1419 | 1423 | context->last_trig = trigger; |
| r6049 | r6050 | |
| 1441 | 1445 | } |
| 1442 | 1446 | } |
| 1443 | 1447 | |
| 1444 | if (do_count) | |
| 1448 | if (UNEXPECTED(do_count)) | |
| 1445 | 1449 | { |
| 1446 | 1450 | context->countdown -= node->info->sample_time; |
| 1447 | 1451 | if(context->countdown <= 0.0) |
| r6049 | r6050 | |
| 2023 | 2027 | i_pos += context->v_cap3 / info->r11; |
| 2024 | 2028 | } |
| 2025 | 2029 | |
| 2026 | ||
| 2027 | 2030 | /* Calculate output current. */ |
| 2028 | 2031 | i_out = i_pos - i_neg; |
| 2029 | 2032 | if (i_out < 0) i_out = 0; |
| 2033 | ||
| 2030 | 2034 | /* Convert to voltage for final output. */ |
| 2031 | node->output[0] = i_out * info->r4; | |
| 2035 | if (context->has_c4) | |
| 2036 | { | |
| 2037 | if (context->has_r4) | |
| 2038 | { | |
| 2039 | /* voltage across r4 charging cap */ | |
| 2040 | i_out *= info->r4; | |
| 2041 | /* exponential charge */ | |
| 2042 | context->v_cap4 += (i_out - context->v_cap4) * context->exponent4; | |
| 2043 | } | |
| 2044 | else | |
| 2045 | /* linear charge */ | |
| 2046 | context->v_cap4 += i_out / context->exponent4; | |
| 2047 | if (context->v_cap4 < 0) | |
| 2048 | context->v_cap4 = 0; | |
| 2049 | node->output[0] = context->v_cap4; | |
| 2050 | } | |
| 2051 | else | |
| 2052 | node->output[0] = i_out * info->r4; | |
| 2053 | ||
| 2054 | ||
| 2055 | ||
| 2032 | 2056 | /* Clip the output if needed. */ |
| 2033 | 2057 | if (node->output[0] > context->v_out_max) node->output[0] = context->v_out_max; |
| 2034 | 2058 | } |
| r6049 | r6050 | |
| 2063 | 2087 | context->v_trig2 = (info->v2 - 0.6 - OP_AMP_NORTON_VBE) * RES_VOLTAGE_DIVIDER(info->r8, info->r9); |
| 2064 | 2088 | context->exponent2[0] = RC_CHARGE_EXP(info->r9 * info->c2); |
| 2065 | 2089 | context->exponent2[1] = RC_CHARGE_EXP(RES_2_PARALLEL(info->r8, info->r9) * info->c2); |
| 2066 | context->v_cap3 = 0; | |
| 2067 | context->v_trig3 = (info->v3 - 0.6 - OP_AMP_NORTON_VBE) * RES_VOLTAGE_DIVIDER(info->r10, info->r11); | |
| 2090 | context->v_cap3 = 0; | |
| 2091 | context->v_trig3 = (info->v3 - 0.6 - OP_AMP_NORTON_VBE) * RES_VOLTAGE_DIVIDER(info->r10, info->r11); | |
| 2068 | 2092 | context->exponent3[0] = RC_CHARGE_EXP(info->r11 * info->c3); |
| 2069 | 2093 | context->exponent3[1] = RC_CHARGE_EXP(RES_2_PARALLEL(info->r10, info->r11) * info->c3); |
| 2094 | context->v_cap4 = 0; | |
| 2095 | if (info->r4 != 0) context->has_r4 = 1; | |
| 2096 | if (info->c4 != 0) context->has_c4 = 1; | |
| 2097 | if (context->has_r4 && context->has_c4) | |
| 2098 | context->exponent4 = RC_CHARGE_EXP(info->r4 * info->c4); | |
| 2070 | 2099 | |
| 2071 | 2100 | DISCRETE_STEP_CALL(dst_tvca_op_amp); |
| 2072 | 2101 | } |
| r6049 | r6050 | |
|---|---|---|
| 40 | 40 | #include "discrete.h" |
| 41 | 41 | #include "eminline.h" |
| 42 | 42 | |
| 43 | ||
| 44 | 43 | /************************************* |
| 45 | 44 | * |
| 46 | * | |
| 45 | * Performance | |
| 47 | 46 | * |
| 48 | 47 | *************************************/ |
| 49 | 48 | |
| 50 | #define DISCRETE_DEBUGLOG (0) | |
| 49 | /* | |
| 50 | * Normally, the discrete core processes 960 samples per update. | |
| 51 | * With the various buffers involved, this on a Core2 is not as | |
| 52 | * performant as processing 240 samples 4 times. | |
| 53 | * The setting most probably depends on CPU and which modules are | |
| 54 | * run and how many tasks are defined. | |
| 55 | * | |
| 56 | * Values < 32 exhibit poor performance (too much overhead) while | |
| 57 | * Values > 500 have a slightly worse performace (too much cache misses?). | |
| 58 | */ | |
| 51 | 59 | |
| 60 | #define MAX_SAMPLES_PER_TASK_SLICE (240) | |
| 52 | 61 | |
| 53 | 62 | /************************************* |
| 54 | 63 | * |
| 55 | * | |
| 64 | * Debuggi | |
| 56 | 65 | * |
| 57 | 66 | *************************************/ |
| 58 | 67 | |
| 59 | #define DISCRETE_ | |
| 68 | #define DISCRETE_DEBUGLO | |
| 60 | 69 | |
| 70 | ||
| 61 | 71 | /************************************* |
| 62 | 72 | * |
| 63 | * | |
| 73 | * P | |
| 64 | 74 | * |
| 65 | 75 | *************************************/ |
| 66 | 76 | |
| 67 | typedef struct _task_info task_info; | |
| 68 | struct _task_info | |
| 69 | { | |
| 70 | discrete_task *task; | |
| 71 | int samples; | |
| 72 | }; | |
| 77 | #define DISCRETE_PROFILING (0) | |
| 73 | 78 | |
| 74 | ||
| 75 | 79 | /************************************* |
| 76 | 80 | * |
| 77 | 81 | * Prototypes |
| r6049 | r6050 | |
| 80 | 84 | |
| 81 | 85 | static void init_nodes(discrete_info *info, const linked_list_entry *block_list, const device_config *device); |
| 82 | 86 | static void find_input_nodes(const discrete_info *info); |
| 83 | static node_description *discrete_find_node(const discrete_info *info, | |
| 87 | static node_description *discrete_find_node(const discrete_info *info, | |
| 84 | 88 | static DEVICE_RESET( discrete ); |
| 85 | 89 | static STREAM_UPDATE( discrete_stream_update ); |
| 86 | 90 | static STREAM_UPDATE( buffer_stream_update ); |
| 87 | 91 | |
| 92 | static int profiling = DISCRETE_PROFILING; | |
| 88 | 93 | |
| 89 | 94 | /************************************* |
| 90 | 95 | * |
| r6049 | r6050 | |
| 313 | 318 | { |
| 314 | 319 | const linked_list_entry *entry; |
| 315 | 320 | |
| 316 | if ( | |
| 321 | if ( | |
| 317 | 322 | { |
| 318 | osd_ticks_t last = get_profile_ticks(); | |
| 319 | ||
| 320 | 323 | for (entry = list; entry != NULL; entry = entry->next) |
| 321 | 324 | { |
| 322 | 325 | node_description *node = (node_description *) entry->ptr; |
| 323 | 326 | |
| 324 | node->run_time -= last; | |
| 325 | (*node->module->step)(node); | |
| 326 | last = get_profile_ticks(); | |
| 327 | node->run_time += last; | |
| 327 | /* Now step the node */ | |
| 328 | (*node->step)(node); | |
| 328 | 329 | } |
| 329 | 330 | } |
| 330 | 331 | else |
| 331 | 332 | { |
| 333 | osd_ticks_t last = get_profile_ticks(); | |
| 334 | ||
| 332 | 335 | for (entry = list; entry != NULL; entry = entry->next) |
| 333 | 336 | { |
| 334 | 337 | node_description *node = (node_description *) entry->ptr; |
| 335 | 338 | |
| 336 | /* Now step the node */ | |
| 337 | (*node->module->step)(node); | |
| 339 | node->run_time -= last; | |
| 340 | (*node->step)(node); | |
| 341 | last = get_profile_ticks(); | |
| 342 | node->run_time += last; | |
| 338 | 343 | } |
| 339 | 344 | } |
| 340 | 345 | } |
| r6049 | r6050 | |
| 599 | 604 | |
| 600 | 605 | osd_work_queue_free(info->queue); |
| 601 | 606 | |
| 602 | if ( | |
| 607 | if (profiling | |
| 603 | 608 | { |
| 604 | 609 | display_profiling(info); |
| 605 | 610 | } |
| r6049 | r6050 | |
| 648 | 653 | (*node->module->reset)(node); |
| 649 | 654 | |
| 650 | 655 | /* otherwise, just step it */ |
| 651 | else if (node->module->step) | |
| 652 | (*node->module->step)(node); | |
| 656 | else if (node->step) | |
| 657 | (*node->step)(node); | |
| 653 | 658 | } |
| 654 | 659 | } |
| 655 | 660 | |
| r6049 | r6050 | |
| 661 | 666 | |
| 662 | 667 | static void *task_callback(void *param, int threadid) |
| 663 | 668 | { |
| 664 | const | |
| 669 | const linked_list_entry *list = (linked_list_entry *) param; | |
| 665 | 670 | const linked_list_entry *entry; |
| 666 | discrete_task *task = ti->task; | |
| 667 | int samples, i; | |
| 671 | int samples; | |
| 668 | 672 | |
| 669 | /* set up task buffers */ | |
| 670 | for (i = 0; i < task->numbuffered; i++) | |
| 671 | task->ptr[i] = task->node_buf[i]; | |
| 672 | ||
| 673 | /* initialize sources */ | |
| 674 | for (entry = task->source_list; entry != 0; entry = entry->next) | |
| 673 | do | |
| 675 | 674 | { |
| 676 | discrete_source_node *sn = (discrete_source_node *) entry->ptr; | |
| 677 | sn->ptr = sn->task->node_buf[sn->output_node]; | |
| 678 | } | |
| 675 | for (entry = list; entry != 0; entry = entry->next) | |
| 676 | { | |
| 677 | discrete_task *task = (discrete_task *) entry->ptr; | |
| 678 | INT32 prev_id; | |
| 679 | 679 | |
| 680 | samples = ti->samples; | |
| 681 | while (samples-- > 0) | |
| 682 | { | |
| 683 | /* step */ | |
| 684 | step_nodes_in_list(task->list); | |
| 685 | } | |
| 680 | /* try to lock */ | |
| 681 | prev_id = compare_exchange32(&task->threadid, -1, threadid); | |
| 682 | if (prev_id == -1 && task->threadid == threadid) | |
| 683 | { | |
| 684 | linked_list_entry *src_entry; | |
| 686 | 685 | |
| 687 | free(param); | |
| 686 | samples = MIN(task->samples, MAX_SAMPLES_PER_TASK_SLICE); | |
| 687 | ||
| 688 | /* check dependencies */ | |
| 689 | for (src_entry = task->source_list; src_entry != NULL; src_entry = src_entry->next) | |
| 690 | { | |
| 691 | discrete_source_node *sn = (discrete_source_node *) src_entry->ptr; | |
| 692 | int avail; | |
| 693 | ||
| 694 | avail = sn->task->ptr[sn->output_node] - sn->ptr; | |
| 695 | if (avail < samples) | |
| 696 | samples = avail; | |
| 697 | } | |
| 698 | ||
| 699 | task->samples -= samples; | |
| 700 | while (samples > 0) | |
| 701 | { | |
| 702 | /* step */ | |
| 703 | step_nodes_in_list(task->list); | |
| 704 | samples--; | |
| 705 | } | |
| 706 | if (task->samples == 0) | |
| 707 | { | |
| 708 | return NULL; | |
| 709 | } | |
| 710 | task->threadid = -1; | |
| 711 | } | |
| 712 | } | |
| 713 | } while (1); | |
| 714 | ||
| 688 | 715 | return NULL; |
| 689 | 716 | } |
| 690 | 717 | |
| r6049 | r6050 | |
| 706 | 733 | { |
| 707 | 734 | discrete_info *info = (discrete_info *)param; |
| 708 | 735 | const linked_list_entry *entry; |
| 709 | int outputnum, task_group; | |
| 736 | int outputnum; | |
| 737 | //, task_group; | |
| 710 | 738 | |
| 711 | 739 | if (samples == 0) |
| 712 | 740 | return; |
| r6049 | r6050 | |
| 724 | 752 | context->ptr = (stream_sample_t *) inputs[context->stream_in_number]; |
| 725 | 753 | } |
| 726 | 754 | |
| 727 | for (task_group = 0; task_group < DISCRETE_MAX_TASK_GROUPS; task_group++) | |
| 755 | /* Setup tasks */ | |
| 756 | for (entry = info->task_list; entry != 0; entry = entry->next) | |
| 728 | 757 | { |
| 729 | /* Queue tasks */ | |
| 730 | for (entry = info->task_list; entry != 0; entry = entry->next) | |
| 731 | { | |
| 732 | discrete_task *task = (discrete_task *) entry->ptr; | |
| 758 | discrete_task *task = (discrete_task *) entry->ptr; | |
| 759 | linked_list_entry *src_entry; | |
| 760 | int i; | |
| 733 | 761 | |
| 734 | if (task->task_group == task_group) | |
| 735 | { | |
| 736 | task_info *ti = (task_info *)malloc(sizeof(task_info)); | |
| 762 | task->samples = samples; | |
| 763 | task->threadid = -1; | |
| 737 | 764 | |
| 738 | /* Fire task */ | |
| 739 | ti->task = task; | |
| 740 | ti->samples = samples; | |
| 741 | osd_work_item_queue(info->queue, task_callback, (void *) ti, WORK_ITEM_FLAG_AUTO_RELEASE); | |
| 742 | } | |
| 765 | /* set up task buffers */ | |
| 766 | for (i = 0; i < task->numbuffered; i++) | |
| 767 | task->ptr[i] = task->node_buf[i]; | |
| 768 | ||
| 769 | /* initialize sources */ | |
| 770 | for (src_entry = task->source_list; src_entry != 0; src_entry = src_entry->next) | |
| 771 | { | |
| 772 | discrete_source_node *sn = (discrete_source_node *) src_entry->ptr; | |
| 773 | sn->ptr = sn->task->node_buf[sn->output_node]; | |
| 743 | 774 | } |
| 744 | /* and wait for them */ | |
| 745 | osd_work_queue_wait(info->queue, osd_ticks_per_second()*10); | |
| 746 | 775 | } |
| 747 | 776 | |
| 748 | | |
| 777 | | |
| 749 | 778 | { |
| 779 | /* Fire a work item for each task */ | |
| 780 | osd_work_item_queue(info->queue, task_callback, (void *) info->task_list, WORK_ITEM_FLAG_AUTO_RELEASE); | |
| 781 | } | |
| 782 | osd_work_queue_wait(info->queue, osd_ticks_per_second()*10); | |
| 783 | ||
| 784 | if (profiling) | |
| 785 | { | |
| 750 | 786 | info->total_samples += samples; |
| 751 | 787 | info->total_stream_updates++; |
| 752 | 788 | } |
| r6049 | r6050 | |
| 822 | 858 | node->custom = custom->custom; |
| 823 | 859 | } |
| 824 | 860 | |
| 861 | /* copy initial / default step function */ | |
| 862 | node->step = node->module->step; | |
| 863 | ||
| 825 | 864 | /* allocate memory if necessary */ |
| 826 | 865 | if (node->module->contextsize) |
| 827 | 866 | node->context = auto_alloc_array_clear(device->machine, UINT8, node->module->contextsize); |
| r6049 | r6050 | |
| 895 | 934 | |
| 896 | 935 | /* our running order just follows the order specified */ |
| 897 | 936 | /* does the node step ? */ |
| 898 | if (node-> | |
| 937 | if (node-> | |
| 899 | 938 | { |
| 900 | 939 | /* do we belong to a task? */ |
| 901 | 940 | if (task_node_list_ptr == NULL) |
| r6049 | r6050 | |
| 939 | 978 | * |
| 940 | 979 | *************************************/ |
| 941 | 980 | |
| 981 | /* attempt to group all static node parameters together. | |
| 982 | * Has a negative impact on performance - but it should | |
| 983 | * reduce memory bandwidth - this is weird. */ | |
| 984 | ||
| 985 | #if 0 | |
| 986 | static double dbuf[10240] = { 0.0, 1.0 }; | |
| 987 | static int dbufptr = 2; | |
| 988 | ||
| 989 | static double *getDoublePtr(double val) | |
| 990 | { | |
| 991 | int i; | |
| 992 | for (i=0; i<dbufptr; i+=1) | |
| 993 | { | |
| 994 | if (dbuf[i] == val) | |
| 995 | { | |
| 996 | return &dbuf[i]; | |
| 997 | } | |
| 998 | } | |
| 999 | dbuf[dbufptr] = val; | |
| 1000 | dbufptr+=1; | |
| 1001 | return &dbuf[dbufptr-1]; | |
| 1002 | } | |
| 1003 | #endif | |
| 1004 | ||
| 942 | 1005 | static void find_input_nodes(const discrete_info *info) |
| 943 | 1006 | { |
| 944 | 1007 | const linked_list_entry *entry; |
| r6049 | r6050 | |
| 979 | 1042 | } |
| 980 | 1043 | else |
| 981 | 1044 | { |
| 982 | node->input[inputnum] = &(block->initial[inputnum]); | |
| 1045 | node->input[inputnum] = &(node->block->initial[inputnum]); | |
| 1046 | //node->input[inputnum] = getDoublePtr(node->block->initial[inputnum]); | |
| 983 | 1047 | } |
| 984 | 1048 | } |
| 985 | 1049 | } |
| r6049 | r6050 | |
|---|---|---|
| 285 | 285 | * DISCRETE_FILTER1(NODE,ENAB,INP0,FREQ,TYPE) |
| 286 | 286 | * DISCRETE_FILTER2(NODE,ENAB,INP0,FREQ,DAMP,TYPE) |
| 287 | 287 | * |
| 288 | * DISCRETE_CRFILTER(NODE,ENAB,IN0,RVAL,CVAL) | |
| 289 | * DISCRETE_CRFILTER_VREF(NODE,ENAB,IN0,RVAL,CVAL,VREF) | |
| 288 | * DISCRETE_CRFILTER(NODE,IN0,RVAL,CVAL) | |
| 289 | * DISCRETE_CRFILTER_VREF(NODE,IN0,RVAL,CVAL,VREF) | |
| 290 | 290 | * DISCRETE_OP_AMP_FILTER(NODE,ENAB,INP0,INP1,TYPE,INFO) |
| 291 | 291 | * DISCRETE_RCDISC(NODE,ENAB,IN0,RVAL,CVAL) |
| 292 | 292 | * DISCRETE_RCDISC2(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) |
| r6049 | r6050 | |
| 295 | 295 | * DISCRETE_RCDISC5(NODE,ENAB,IN0,RVAL,CVAL) |
| 296 | 296 | * DISCRETE_RCINTEGRATE(NODE,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) |
| 297 | 297 | * DISCRETE_RCDISC_MODULATED(NODE,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) |
| 298 | * DISCRETE_RCFILTER(NODE,ENAB,IN0,RVAL,CVAL) | |
| 299 | * DISCRETE_RCFILTER_VREF(NODE,ENAB,IN0,RVAL,CVAL,VREF) | |
| 298 | * DISCRETE_RCFILTER(NODE,IN0,RVAL,CVAL) | |
| 299 | * DISCRETE_RCFILTER_VREF(NODE,IN0,RVAL,CVAL,VREF) | |
| 300 | 300 | * |
| 301 | 301 | * DISCRETE_555_ASTABLE(NODE,RESET,R1,R2,C,OPTIONS) |
| 302 | 302 | * DISCRETE_555_ASTABLE_CV(NODE,RESET,R1,R2,C,CTRLV,OPTIONS) |
| r6049 | r6050 | |
| 2115 | 2115 | * input 1 node or static value, |
| 2116 | 2116 | * address of discrete_op_amp_tvca_info structure) |
| 2117 | 2117 | * |
| 2118 | * discrete_op_amp_tvca_info = { r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, c1, c2, c3, v1, v2, v3, vP, f0, f1, f2, f3, f4, f5} | |
| 2118 | * discrete_op_amp_tvca_info = { r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, c1, c2, c3, c4, v1, v2, v3, vP, f0, f1, f2, f3, f4, f5} | |
| 2119 | 2119 | * |
| 2120 | 2120 | * Note: Set all unused components to 0. |
| 2121 | 2121 | * Set all unused functions to DISC_OP_AMP_TRIGGER_FUNCTION_NONE |
| r6049 | r6050 | |
| 2125 | 2125 | * vP is the op-amp B+. |
| 2126 | 2126 | * |
| 2127 | 2127 | * r2a |
| 2128 | * IN0 >----ZZZZ-----. r1 | |
| 2129 | * .----. | vP >------ZZZZ---. | |
| 2130 | * | F0 |----+ | | |
| 2131 | * '----' | r2b | r4 | |
| 2132 | * r3a '---------------ZZZZ---+---ZZZZ--. | |
| 2128 | * IN0 >----ZZZZ-----. r1 c4 | |
| 2129 | * .----. | vP >------ZZZZ---+---||----. | |
| 2130 | * | F0 |----+ | | | |
| 2131 | * '----' | r2b | r4 | | |
| 2132 | * r3a '---------------ZZZZ---+---ZZZZ--+ | |
| 2133 | 2133 | * IN1 >----ZZZZ---. | | |
| 2134 | 2134 | * .----. | r3b | |\ | |
| 2135 | 2135 | * | F1 |--+-----------------ZZZZ---+ | \ | |
| r6049 | r6050 | |
| 2223 | 2223 | * |
| 2224 | 2224 | * .------------. |
| 2225 | 2225 | * | | |
| 2226 | * | |
| 2226 | * | |
| 2227 | 2227 | * | | |
| 2228 | * INPUT1 - | |
| 2228 | * INPUT1 -0------}| --| |-+-- | | |
| 2229 | 2229 | * | C | |----} Netlist node |
| 2230 | * RVAL - | |
| 2230 | * RVAL -1------}| Z | | |
| 2231 | 2231 | * | Z R | |
| 2232 | * CVAL - | |
| 2232 | * CVAL -2------}| | | | |
| 2233 | 2233 | * | vRef | |
| 2234 | 2234 | * '------------' |
| 2235 | 2235 | * |
| 2236 | 2236 | * Declaration syntax |
| 2237 | 2237 | * |
| 2238 | 2238 | * DISCRETE_CRFILTER(name of node, |
| 2239 | * enable | |
| 2240 | 2239 | * input node (or value) |
| 2241 | * resistor value in OHMS | |
| 2242 | * capacitor value in FARADS) | |
| 2240 | * resistor node or static value in OHMS | |
| 2241 | * capacitor node or static value in FARADS) | |
| 2243 | 2242 | * |
| 2244 | 2243 | * DISCRETE_CRFILTER_VREF(name of node, |
| 2245 | * enable | |
| 2246 | 2244 | * input node (or value) |
| 2247 | 2245 | * resistor value in OHMS |
| 2248 | 2246 | * capacitor value in FARADS, |
| 2249 | * vRef static value) | |
| 2247 | * vRef node or static value) | |
| 2250 | 2248 | * |
| 2251 | 2249 | * Example config line |
| 2252 | 2250 | * |
| 2253 | * DISCRETE_CRFILTER(NODE_11, | |
| 2251 | * DISCRETE_CRFILTER(NODE_11, | |
| 2254 | 2252 | * |
| 2255 | * Defines a | |
| 2253 | * Defines a | |
| 2256 | 2254 | * the input is fed from NODE_10. |
| 2257 | 2255 | * |
| 2258 | 2256 | * This can be also thought of as a high pass filter with a 3dB cutoff |
| r6049 | r6050 | |
| 2478 | 2476 | *********************************************************************** |
| 2479 | 2477 | * |
| 2480 | 2478 | * DISCRETE_RCDISC - Simple single pole RC discharge network |
| 2479 | * DISCRETE_RCFILTER_VREF - Same but refrenced to vRef not 0V | |
| 2481 | 2480 | * |
| 2482 | 2481 | * .------------. |
| 2483 | 2482 | * | | |
| 2484 | * | |
| 2483 | * | |
| 2485 | 2484 | * | | |
| 2486 | * INPUT1 - | |
| 2485 | * INPUT1 -0------>| -ZZZZ-+-- | | |
| 2487 | 2486 | * | R | |----> Netlist node |
| 2488 | * RVAL - | |
| 2487 | * RVAL -1------>| --- | | |
| 2489 | 2488 | * | ---C | |
| 2490 | * CVAL -3------>| | | | |
| 2491 | * | | | |
| 2489 | * CVAL -2------>| | | | |
| 2490 | * | vref | | |
| 2492 | 2491 | * '------------' |
| 2493 | 2492 | * |
| 2494 | 2493 | * Declaration syntax |
| 2495 | 2494 | * |
| 2496 | 2495 | * DISCRETE_RCFILTER(name of node, |
| 2497 | * enable, | |
| 2498 | 2496 | * input node (or value), |
| 2499 | 2497 | * resistor value in OHMS, |
| 2500 | 2498 | * capacitor value in FARADS) |
| 2501 | 2499 | * |
| 2500 | * DISCRETE_RCFILTER_VREF(name of node, | |
| 2501 | * input node (or value) | |
| 2502 | * resistor value in OHMS | |
| 2503 | * capacitor value in FARADS, | |
| 2504 | * vRef node or static value) | |
| 2505 | * | |
| 2502 | 2506 | * Example config line |
| 2503 | 2507 | * |
| 2504 | * DISCRETE_RCDISC(NODE_11, | |
| 2508 | * DISCRETE_RCDISC(NODE_11, | |
| 2505 | 2509 | * |
| 2506 | * When enabled by NODE_10, C discharges from 10v as indicated by RC | |
| 2507 | * of 100R & 1uF. | |
| 2510 | * C discharges from 10v as indicated by RC of 100R & 1uF. | |
| 2508 | 2511 | * |
| 2509 | 2512 | *********************************************************************** |
| 2510 | 2513 | * |
| r6049 | r6050 | |
| 3409 | 3412 | #define RC_DISCHARGE_EXP_DT(rc, dt) (exp(-(dt) / (rc))) |
| 3410 | 3413 | #define RC_DISCHARGE_NEG_EXP_DT(rc, dt) (exp((dt) / (rc))) |
| 3411 | 3414 | |
| 3415 | #define FREQ_OF_555(_r1, _r2, _c) (1.49 / ((_r1 + 2 * _r2) * _c)) | |
| 3416 | ||
| 3412 | 3417 | /************************************* |
| 3413 | 3418 | * |
| 3414 | 3419 | * Interface & Naming |
| r6049 | r6050 | |
| 3447 | 3452 | #define DISCRETE_MAX_INPUTS 10 |
| 3448 | 3453 | #define DISCRETE_MAX_OUTPUTS 8 |
| 3449 | 3454 | #define DISCRETE_MAX_TASK_OUTPUTS 8 |
| 3450 | #define DISCRETE_MAX_TASK_GROUPS | |
| 3455 | #define DISCRETE_MAX_TASK_GROUPS 10 | |
| 3451 | 3456 | |
| 3452 | 3457 | |
| 3453 | 3458 | /************************************* |
| r6049 | r6050 | |
| 3715 | 3720 | |
| 3716 | 3721 | struct _node_description |
| 3717 | 3722 | { |
| 3723 | /* this declaration order seems to be optimal */ | |
| 3718 | 3724 | double output[DISCRETE_MAX_OUTPUTS]; /* The node's last output value */ |
| 3719 | 3725 | |
| 3726 | DISCRETE_FUNC((*step)); /* Called to execute one time delta of output update */ | |
| 3727 | void * context; /* Contextual information specific to this node type */ | |
| 3728 | ||
| 3729 | const double * input[DISCRETE_MAX_INPUTS]; /* Addresses of Input values */ | |
| 3720 | 3730 | int active_inputs; /* Number of active inputs on this node type */ |
| 3721 | 3731 | int input_is_node; /* Bit Flags. 1 in bit location means input_is_node */ |
| 3722 | const double * input[DISCRETE_MAX_INPUTS]; /* Addresses of Input values */ | |
| 3723 | 3732 | |
| 3724 | void * context; /* Contextual information specific to this node type */ | |
| 3725 | 3733 | const void * custom; /* Custom function specific initialisation data */ |
| 3726 | 3734 | |
| 3727 | 3735 | const discrete_module *module; /* Node's module info */ |
| 3736 | const discrete_info *info; /* Points to the parent */ | |
| 3728 | 3737 | const discrete_sound_block *block; /* Points to the node's setup block. */ |
| 3729 | const discrete_info *info; /* Points to the parent */ | |
| 3730 | 3738 | |
| 3731 | 3739 | osd_ticks_t run_time; |
| 3732 | 3740 | }; |
| r6049 | r6050 | |
| 3745 | 3753 | typedef struct _linked_list_entry linked_list_entry; |
| 3746 | 3754 | struct _linked_list_entry |
| 3747 | 3755 | { |
| 3756 | linked_list_entry *next; | |
| 3748 | 3757 | const void *ptr; |
| 3749 | linked_list_entry *next; | |
| 3750 | 3758 | }; |
| 3751 | 3759 | |
| 3752 | 3760 | typedef struct _discrete_task discrete_task; |
| r6049 | r6050 | |
| 3754 | 3762 | { |
| 3755 | 3763 | const linked_list_entry *list; |
| 3756 | 3764 | |
| 3757 | int task_group; | |
| 3758 | int numbuffered; | |
| 3759 | double *ptr[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3760 | double *node_buf[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3761 | node_description *nodes[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3762 | double *source[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3765 | volatile INT32 threadid; | |
| 3766 | volatile int samples; | |
| 3763 | 3767 | |
| 3764 | 3768 | /* list of source nodes */ |
| 3765 | linked_list_entry *source_list; /* discrete_source_node */ | |
| 3769 | linked_list_entry *source_list; /* discrete_source_node */ | |
| 3770 | ||
| 3771 | int task_group; | |
| 3772 | int numbuffered; | |
| 3773 | double *ptr[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3774 | const double *source[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3775 | ||
| 3776 | double *node_buf[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3777 | const node_description *nodes[DISCRETE_MAX_TASK_OUTPUTS]; | |
| 3766 | 3778 | }; |
| 3767 | 3779 | |
| 3768 | 3780 | typedef struct _discrete_source_node discrete_source_node; |
| 3769 | 3781 | struct _discrete_source_node |
| 3770 | 3782 | { |
| 3771 | 3783 | const discrete_task *task; |
| 3784 | const double *ptr; | |
| 3772 | 3785 | int output_node; |
| 3773 | 3786 | double buffer; |
| 3774 | double *ptr; | |
| 3775 | 3787 | }; |
| 3776 | 3788 | |
| 3777 | 3789 | struct _discrete_info |
| r6049 | r6050 | |
| 3980 | 3992 | double c1; |
| 3981 | 3993 | double c2; |
| 3982 | 3994 | double c3; |
| 3995 | double c4; | |
| 3983 | 3996 | double v1; |
| 3984 | 3997 | double v2; |
| 3985 | 3998 | double v3; |
| r6049 | r6050 | |
| 4436 | 4449 | #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" }, |
| 4437 | 4450 | /* Component specific */ |
| 4438 | 4451 | #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" }, |
| 4439 | #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" }, | |
| 4440 | #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" }, | |
| 4452 | #define DISCRETE_CRFILTER(NODE,INP0,RVAL,CVAL) { NODE, DST_CRFILTER , 4, { INP0,RVAL,CVAL }, { INP0,RVAL,CVAL }, NULL, "DISCRETE_CRFILTER" }, | |
| 4453 | #define DISCRETE_CRFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) { NODE, DST_CRFILTER , 5, { INP0,RVAL,CVAL,VREF }, { INP0,RVAL,CVAL,VREF }, NULL, "DISCRETE_CRFILTER_VREF" }, | |
| 4441 | 4454 | #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" }, |
| 4442 | 4455 | #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" }, |
| 4443 | 4456 | #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" }, |
| r6049 | r6050 | |
| 4445 | 4458 | #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" }, |
| 4446 | 4459 | #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" }, |
| 4447 | 4460 | #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" }, |
| 4448 | #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" }, | |
| 4461 | #define DISCRETE_RCFILTER(NODE,INP0,RVAL,CVAL) { NODE, DST_RCFILTER , 3, { INP0,RVAL,CVAL }, { INP0,RVAL,CVAL }, NULL, "DISCRETE_RCFILTER" }, | |
| 4462 | #define DISCRETE_RCFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) { NODE, DST_RCFILTER , 4, { INP0,RVAL,CVAL,VREF }, { INP0,RVAL,CVAL,VREF }, NULL, "DISCRETE_RCFILTER_VREF" }, | |
| 4449 | 4463 | #define DISCRETE_RCFILTER_SW(NODE,ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4) { NODE, DST_RCFILTER_SW, 8, { ENAB,INP0,SW,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 }, NULL, "DISCRETE_RCFILTER_SW" }, |
| 4450 | #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" }, | |
| 4451 | 4464 | #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" }, |
| 4452 | 4465 | /* For testing - seem to be buggered. Use versions not ending in N. */ |
| 4453 | 4466 | #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" }, |
| r6049 | r6050 | |
|---|---|---|
| 172 | 172 | double v_cap = context->cap_voltage; /* Current voltage on capacitor, before dt */ |
| 173 | 173 | double v_cap_next = 0; /* Voltage on capacitor, after dt */ |
| 174 | 174 | double v_charge, exponent = 0; |
| 175 | int update_exponent = 0; | |
| 175 | UINT8 flip_flop = context->flip_flop; | |
| 176 | UINT8 update_exponent = 0; | |
| 176 | 177 | |
| 177 | 178 | /* put commonly used stuff in local variables for speed */ |
| 178 | 179 | double threshold = context->threshold; |
| r6049 | r6050 | |
| 199 | 200 | /* Since the thresholds may have changed we need to update the FF */ |
| 200 | 201 | if (v_cap >= threshold) |
| 201 | 202 | { |
| 202 | | |
| 203 | | |
| 203 | 204 | count_f++; |
| 204 | 205 | } |
| 205 | 206 | else |
| 206 | 207 | if (v_cap <= trigger) |
| 207 | 208 | { |
| 208 | | |
| 209 | | |
| 209 | 210 | count_r++; |
| 210 | 211 | } |
| 211 | 212 | } |
| r6049 | r6050 | |
| 245 | 246 | */ |
| 246 | 247 | if (DSD_555_ASTBL__C == 0) |
| 247 | 248 | { |
| 248 | | |
| 249 | | |
| 249 | 250 | /* The voltage goes high because the cap circuit is open. */ |
| 250 | 251 | v_cap_next = v_charge; |
| 251 | 252 | v_cap = v_charge; |
| r6049 | r6050 | |
| 269 | 270 | /* Keep looping until all toggling in time sample is used up. */ |
| 270 | 271 | do |
| 271 | 272 | { |
| 272 | if ( | |
| 273 | if ( | |
| 273 | 274 | { |
| 274 | 275 | if (DSD_555_ASTBL__R1 == 0) |
| 275 | 276 | { |
| r6049 | r6050 | |
| 298 | 299 | /* calculate the overshoot time */ |
| 299 | 300 | dt = context->t_rc_charge * log(1.0 / (1.0 - ((v_cap_next - threshold) / (v_charge - v_cap)))); |
| 300 | 301 | x_time = dt; |
| 301 | v_cap = threshold; | |
| 302 | context->flip_flop = 0; | |
| 302 | v_cap_next = threshold; | |
| 303 | flip_flop = 0; | |
| 303 | 304 | count_f++; |
| 304 | 305 | update_exponent = 1; |
| 305 | 306 | } |
| r6049 | r6050 | |
| 330 | 331 | if (v_cap_next < trigger) |
| 331 | 332 | dt = context->t_rc_discharge * log(1.0 / (1.0 - ((trigger - v_cap_next) / v_cap))); |
| 332 | 333 | x_time = dt; |
| 333 | v_cap = trigger; | |
| 334 | context->flip_flop = 1; | |
| 334 | v_cap_next = trigger; | |
| 335 | flip_flop = 1; | |
| 335 | 336 | count_r++; |
| 336 | 337 | update_exponent = 1; |
| 337 | 338 | } |
| 338 | 339 | } |
| 340 | v_cap = v_cap_next; | |
| 339 | 341 | } while(dt); |
| 340 | 342 | |
| 341 | context->cap_voltage = v_cap | |
| 343 | context->cap_voltage = v_cap | |
| 342 | 344 | } |
| 343 | 345 | |
| 344 | 346 | /* Convert last switch time to a ratio */ |
| r6049 | r6050 | |
| 347 | 349 | switch (context->output_type) |
| 348 | 350 | { |
| 349 | 351 | case DISC_555_OUT_SQW: |
| 350 | node->output[0] = context->flip_flop * context->v_out_high + context->ac_shift; | |
| 352 | if (count_f + count_r >= 2) | |
| 353 | /* force at least 1 toggle */ | |
| 354 | node->output[0] = context->flip_flop ? 0 : context->v_out_high; | |
| 355 | else | |
| 356 | node->output[0] = flip_flop * context->v_out_high; | |
| 357 | node->output[0] += context->ac_shift; | |
| 351 | 358 | break; |
| 352 | 359 | case DISC_555_OUT_CAP: |
| 353 | node->output[0] = v_cap | |
| 360 | node->output[0] = v_cap | |
| 354 | 361 | /* Fake it to AC if needed */ |
| 355 | 362 | if (context->output_is_ac) |
| 356 | 363 | node->output[0] -= threshold * 3.0 /4.0; |
| 357 | 364 | break; |
| 358 | 365 | case DISC_555_OUT_ENERGY: |
| 359 | 366 | if (x_time == 0) x_time = 1.0; |
| 360 | node->output[0] = context->v_out_high * ( | |
| 367 | node->output[0] = context->v_out_high * ( | |
| 361 | 368 | node->output[0] += context->ac_shift; |
| 362 | 369 | break; |
| 363 | 370 | case DISC_555_OUT_LOGIC_X: |
| 364 | node->output[0] = | |
| 371 | node->output[0] = | |
| 365 | 372 | break; |
| 366 | 373 | case DISC_555_OUT_COUNT_F_X: |
| 367 | 374 | node->output[0] = count_f ? count_f + x_time : count_f; |
| r6049 | r6050 | |
| 376 | 383 | node->output[0] = count_r; |
| 377 | 384 | break; |
| 378 | 385 | } |
| 386 | context->flip_flop = flip_flop; | |
| 379 | 387 | } |
| 380 | 388 | |
| 381 | 389 | static DISCRETE_RESET(dsd_555_astbl) |
| r6049 | r6050 | |
| 679 | 687 | double v_vcharge_limit; /* vIn and the junction voltage limit the max charging voltage from i */ |
| 680 | 688 | double r_temp; /* play thing */ |
| 681 | 689 | double exponent; |
| 682 | int update_exponent, update_t_rc; | |
| 690 | UINT8 update_exponent, update_t_rc; | |
| 691 | UINT8 flip_flop = context->flip_flop; | |
| 683 | 692 | |
| 684 | 693 | |
| 685 | if (DSD_555_CC__RESET) | |
| 694 | if (UNEXPECTED(DSD_555_CC__RESET)) | |
| 686 | 695 | { |
| 687 | 696 | /* We are in RESET */ |
| 688 | 697 | node->output[0] = 0; |
| r6049 | r6050 | |
| 752 | 761 | if (context->type <= 1) |
| 753 | 762 | { |
| 754 | 763 | /* Standard constant current charge */ |
| 755 | if ( | |
| 764 | if ( | |
| 756 | 765 | { |
| 757 | 766 | if (i == 0) |
| 758 | 767 | { |
| r6049 | r6050 | |
| 788 | 797 | /* calculate the overshoot time */ |
| 789 | 798 | dt = DSD_555_CC__C * (v_cap_next - context->threshold) / i; |
| 790 | 799 | x_time = dt; |
| 791 | v_cap = context->threshold; | |
| 792 | context->flip_flop = 0; | |
| 800 | v_cap_next = context->threshold; | |
| 801 | flip_flop = 0; | |
| 793 | 802 | count_f++; |
| 794 | 803 | update_exponent = 1; |
| 795 | 804 | } |
| r6049 | r6050 | |
| 827 | 836 | { |
| 828 | 837 | dt = t_rc * log(1.0 / (1.0 - ((context->trigger - v_cap_next) / v_cap))); |
| 829 | 838 | x_time = dt; |
| 830 | v_cap = context->trigger; | |
| 831 | context->flip_flop = 1; | |
| 839 | v_cap_next = context->trigger; | |
| 840 | flip_flop = 1; | |
| 832 | 841 | count_r++; |
| 833 | 842 | update_exponent = 1; |
| 834 | 843 | } |
| r6049 | r6050 | |
| 836 | 845 | else /* Immediate discharge. No change in dt. */ |
| 837 | 846 | { |
| 838 | 847 | x_time = dt; |
| 839 | v_cap = context->trigger; | |
| 840 | context->flip_flop = 1; | |
| 848 | v_cap_next = context->trigger; | |
| 849 | flip_flop = 1; | |
| 841 | 850 | count_r++; |
| 842 | 851 | } |
| 843 | 852 | } |
| 844 | 853 | else |
| 845 | 854 | { |
| 846 | 855 | /* The constant current gets changed to a voltage due to a load resistor. */ |
| 847 | if ( | |
| 856 | if ( | |
| 848 | 857 | { |
| 849 | 858 | if ((i == 0) && (DSD_555_CC__RBIAS == 0)) |
| 850 | 859 | { |
| r6049 | r6050 | |
| 890 | 899 | /* calculate the overshoot time */ |
| 891 | 900 | dt = t_rc * log(1.0 / (1.0 - ((v_cap_next - context->threshold) / (v - v_cap)))); |
| 892 | 901 | x_time = dt; |
| 893 | v_cap = context->threshold; | |
| 894 | context->flip_flop = 0; | |
| 902 | v_cap_next = context->threshold; | |
| 903 | flip_flop = 0; | |
| 895 | 904 | count_f++; |
| 896 | 905 | update_exponent = 1; |
| 897 | 906 | } |
| r6049 | r6050 | |
| 918 | 927 | /* calculate the overshoot time */ |
| 919 | 928 | dt = t_rc * log(1.0 / (1.0 - ((context->trigger - v_cap_next) / v_cap))); |
| 920 | 929 | x_time = dt; |
| 921 | v_cap = context->trigger; | |
| 922 | context->flip_flop = 1; | |
| 930 | v_cap_next = context->trigger; | |
| 931 | flip_flop = 1; | |
| 923 | 932 | count_r++; |
| 924 | 933 | update_exponent = 1; |
| 925 | 934 | } |
| r6049 | r6050 | |
| 927 | 936 | else /* Immediate discharge. No change in dt. */ |
| 928 | 937 | { |
| 929 | 938 | x_time = dt; |
| 930 | v_cap = context->trigger; | |
| 931 | context->flip_flop = 1; | |
| 939 | v_cap_next = context->trigger; | |
| 940 | flip_flop = 1; | |
| 932 | 941 | count_r++; |
| 933 | 942 | } |
| 934 | 943 | } |
| 944 | v_cap = v_cap_next; | |
| 935 | 945 | } while(dt); |
| 936 | 946 | |
| 937 | context->cap_voltage = v_cap | |
| 947 | context->cap_voltage = v_cap | |
| 938 | 948 | |
| 939 | 949 | /* Convert last switch time to a ratio */ |
| 940 | 950 | x_time = x_time / node->info->sample_time; |
| r6049 | r6050 | |
| 942 | 952 | switch (context->output_type) |
| 943 | 953 | { |
| 944 | 954 | case DISC_555_OUT_SQW: |
| 945 | if (count_r && (~context->type & 0x01)) | |
| 946 | { | |
| 947 | /* There has been an immediate discharge, so keep low for 1 sample. */ | |
| 948 | node->output[0] = 0; | |
| 949 | } | |
| 955 | if (count_f + count_r >= 2) | |
| 956 | /* force at least 1 toggle */ | |
| 957 | node->output[0] = context->flip_flop ? 0 : context->v_out_high; | |
| 950 | 958 | else |
| 951 | node->output[0] = | |
| 959 | node->output[0] = | |
| 952 | 960 | /* Fake it to AC if needed */ |
| 953 | 961 | node->output[0] += context->ac_shift; |
| 954 | 962 | break; |
| 955 | 963 | case DISC_555_OUT_CAP: |
| 956 | node->output[0] = v_cap | |
| 964 | node->output[0] = v_cap | |
| 957 | 965 | break; |
| 958 | 966 | case DISC_555_OUT_ENERGY: |
| 959 | 967 | if (x_time == 0) x_time = 1.0; |
| 960 | node->output[0] = context->v_out_high * ( | |
| 968 | node->output[0] = context->v_out_high * ( | |
| 961 | 969 | node->output[0] += context->ac_shift; |
| 962 | 970 | break; |
| 963 | 971 | case DISC_555_OUT_LOGIC_X: |
| 964 | node->output[0] = | |
| 972 | node->output[0] = | |
| 965 | 973 | break; |
| 966 | 974 | case DISC_555_OUT_COUNT_F_X: |
| 967 | 975 | node->output[0] = count_f ? count_f + x_time : count_f; |
| r6049 | r6050 | |
| 976 | 984 | node->output[0] = count_r; |
| 977 | 985 | break; |
| 978 | 986 | } |
| 987 | context->flip_flop = flip_flop; | |
| 979 | 988 | } |
| 980 | 989 | |
| 981 | 990 | static DISCRETE_RESET(dsd_555_cc) |
| r6049 | r6050 | |
| 1714 | 1723 | |
| 1715 | 1724 | sample_t = node->info->sample_time; /* Change in time */ |
| 1716 | 1725 | //dt = LS624_T(DSD_LS624__C, DSD_LS624__VRNG, DSD_LS624__VMOD) / 2.0; |
| 1717 | if (DSD_LS624__VMOD > 0.001) | |
| 1726 | if (EXPECTED(DSD_LS624__VMOD > 0.001)) | |
| 1718 | 1727 | dt = 0.5 / LS624_F(DSD_LS624__VMOD); |
| 1719 | 1728 | else |
| 1720 | 1729 | /* close enough to 0, so we can speed things up by no longer call pow() */ |
| 1721 | 1730 | dt = context->dt_vmod_at_0; |
| 1722 | 1731 | t = context->remain; |
| 1723 | 1732 | en += (double) context->state * t; |
| 1724 | while (t + dt <= sample_t) | |
| 1733 | while (EXPECTED(t + dt <= sample_t)) | |
| 1725 | 1734 | { |
| 1726 | 1735 | en += (double) context->state * dt; |
| 1727 | 1736 | context->state = (1 - context->state); |
| r6049 | r6050 | |
| 1741 | 1750 | break; |
| 1742 | 1751 | case DISC_LS624_OUT_LOGIC: |
| 1743 | 1752 | /* filter out randomness */ |
| 1744 | if (cntf + cntr > 1) | |
| 1753 | if (UNEXPECTED(cntf + cntr > 1)) | |
| 1745 | 1754 | node->output[0] = 1; |
| 1746 | 1755 | else |
| 1747 | 1756 | node->output[0] = context->state; |
| r6049 | r6050 | |
|---|---|---|
| 199 | 199 | max = DSS_COUNTER__MAX; |
| 200 | 200 | |
| 201 | 201 | ds_clock = DSS_COUNTER__CLOCK; |
| 202 | if (context->clock_type == DISC_CLK_IS_FREQ) | |
| 202 | if (UNEXPECTED(context->clock_type == DISC_CLK_IS_FREQ)) | |
| 203 | 203 | { |
| 204 | 204 | /* We need to keep clocking the internal clock even if disabled. */ |
| 205 | 205 | cycles = (context->t_left + node->info->sample_time) * ds_clock; |
| r6049 | r6050 | |
| 215 | 215 | |
| 216 | 216 | |
| 217 | 217 | /* If reset enabled then set output to the reset value. No x_time in reset. */ |
| 218 | if (DSS_COUNTER__RESET) | |
| 218 | if (UNEXPECTED(DSS_COUNTER__RESET)) | |
| 219 | 219 | { |
| 220 | 220 | context->count = DSS_COUNTER__INIT; |
| 221 | 221 | node->output[0] = context->count; |
| r6049 | r6050 | |
| 226 | 226 | * Only count if module is enabled. |
| 227 | 227 | * This has the effect of holding the output at it's current value. |
| 228 | 228 | */ |
| 229 | if (DSS_COUNTER__ENABLE) | |
| 229 | if (EXPECTED(DSS_COUNTER__ENABLE)) | |
| 230 | 230 | { |
| 231 | 231 | last_count = context->count; |
| 232 | 232 | |
| r6049 | r6050 | |
| 260 | 260 | |
| 261 | 261 | node->output[0] = context->is_7492 ? disc_7492_count[context->count] : context->count; |
| 262 | 262 | |
| 263 | if (context->count != last_count) | |
| 263 | if (EXPECTED(context->count != last_count)) | |
| 264 | 264 | { |
| 265 | 265 | /* the x_time is only output if the output changed. */ |
| 266 | 266 | switch (context->out_type) |
| r6049 | r6050 | |
| 759 | 759 | UINT8 force_charge = 0; |
| 760 | 760 | UINT8 enable = DSS_OP_AMP_OSC__ENABLE; |
| 761 | 761 | UINT8 update_exponent = 0; |
| 762 | UINT8 flip_flop = context->flip_flop; | |
| 762 | 763 | int count_f = 0; |
| 763 | 764 | int count_r = 0; |
| 764 | 765 | |
| r6049 | r6050 | |
| 837 | 838 | /* we need to mix any bias and all modulation voltages together. */ |
| 838 | 839 | charge[0] = context->i_fixed; |
| 839 | 840 | v = DSS_OP_AMP_OSC__VMOD1 - OP_AMP_NORTON_VBE; |
| 841 | if (v < 0) v = 0; | |
| 840 | 842 | charge[0] += v / info->r1; |
| 841 | 843 | if (info->r6 != 0) |
| 842 | 844 | { |
| r6049 | r6050 | |
| 859 | 861 | { |
| 860 | 862 | if (context->is_linear_charge) |
| 861 | 863 | { |
| 862 | if (( | |
| 864 | if (( | |
| 863 | 865 | { |
| 864 | 866 | /* Charging */ |
| 865 | 867 | /* iC=C*dv/dt works out to dv=iC*dt/C */ |
| r6049 | r6050 | |
| 869 | 871 | /* has it charged past upper limit? */ |
| 870 | 872 | if (v_cap_next > context->threshold_high) |
| 871 | 873 | { |
| 872 | context->flip_flop = context->flip_flop_xor; | |
| 873 | if (context->flip_flop) | |
| 874 | flip_flop = context->flip_flop_xor; | |
| 875 | if (flip_flop) | |
| 874 | 876 | count_r++; |
| 875 | 877 | else |
| 876 | 878 | count_f++; |
| r6049 | r6050 | |
| 885 | 887 | /* calculate the overshoot time */ |
| 886 | 888 | dt = info->c * (v_cap_next - context->threshold_high) / charge[1]; |
| 887 | 889 | x_time = dt; |
| 888 | v_cap = context->threshold_high; | |
| 890 | v_cap_next = context->threshold_high; | |
| 889 | 891 | } |
| 890 | 892 | } |
| 891 | 893 | } |
| r6049 | r6050 | |
| 898 | 900 | /* has it discharged past lower limit? */ |
| 899 | 901 | if (v_cap_next < context->threshold_low) |
| 900 | 902 | { |
| 901 | context->flip_flop = !context->flip_flop_xor; | |
| 902 | if (context->flip_flop) | |
| 903 | flip_flop = !context->flip_flop_xor; | |
| 904 | if (flip_flop) | |
| 903 | 905 | count_r++; |
| 904 | 906 | else |
| 905 | 907 | count_f++; |
| 906 | 908 | /* calculate the overshoot time */ |
| 907 | 909 | dt = info->c * (context->threshold_low - v_cap_next) / charge[0]; |
| 908 | 910 | x_time = dt; |
| 909 | v_cap = context->threshold_low; | |
| 911 | v_cap_next = context->threshold_low; | |
| 910 | 912 | } |
| 911 | 913 | } |
| 912 | 914 | } |
| r6049 | r6050 | |
| 917 | 919 | else |
| 918 | 920 | exponent = context->charge_exp; |
| 919 | 921 | |
| 920 | if ( | |
| 922 | if ( | |
| 921 | 923 | { |
| 922 | 924 | /* Charging */ |
| 923 | 925 | v_cap_next = v_cap + ((context->v_out_high - v_cap) * exponent); |
| r6049 | r6050 | |
| 929 | 931 | dt = context->charge_rc * log(1.0 / (1.0 - ((v_cap_next - context->threshold_high) / (context->v_out_high - v_cap)))); |
| 930 | 932 | x_time = dt; |
| 931 | 933 | v_cap_next = 0; |
| 932 | v_cap = context->threshold_high; | |
| 933 | context->flip_flop = 0; | |
| 934 | v_cap_next = context->threshold_high; | |
| 935 | flip_flop = 0; | |
| 934 | 936 | count_f++; |
| 935 | 937 | update_exponent = 1; |
| 936 | 938 | } |
| r6049 | r6050 | |
| 946 | 948 | { |
| 947 | 949 | dt = context->charge_rc * log(1.0 / (1.0 - ((context->threshold_low - v_cap_next) / v_cap))); |
| 948 | 950 | x_time = dt; |
| 949 | v_cap = context->threshold_low; | |
| 950 | context->flip_flop = 1; | |
| 951 | v_cap_next = context->threshold_low; | |
| 952 | flip_flop = 1; | |
| 951 | 953 | count_r++; |
| 952 | 954 | update_exponent = 1; |
| 953 | 955 | } |
| 954 | 956 | } |
| 955 | 957 | } |
| 956 | | |
| 958 | | |
| 957 | 959 | } while(dt); |
| 960 | context->v_cap = v_cap; | |
| 958 | 961 | |
| 959 | 962 | x_time = dt / node->info->sample_time; |
| 960 | 963 | |
| 961 | 964 | switch (context->output_type) |
| 962 | 965 | { |
| 963 | 966 | case DISC_OP_AMP_OSCILLATOR_OUT_CAP: |
| 964 | node->output[0] = v_cap | |
| 967 | node->output[0] = v_cap | |
| 965 | 968 | break; |
| 966 | 969 | case DISC_OP_AMP_OSCILLATOR_OUT_ENERGY: |
| 967 | 970 | if (x_time == 0) x_time = 1.0; |
| 968 | node->output[0] = context->v_out_high * ( | |
| 971 | node->output[0] = context->v_out_high * ( | |
| 969 | 972 | break; |
| 970 | 973 | case DISC_OP_AMP_OSCILLATOR_OUT_SQW: |
| 971 | node->output[0] = context->flip_flop * context->v_out_high ; | |
| 974 | if (count_f + count_r >= 2) | |
| 975 | /* force at least 1 toggle */ | |
| 976 | node->output[0] = context->flip_flop ? 0 : context->v_out_high; | |
| 977 | else | |
| 978 | node->output[0] = flip_flop * context->v_out_high; | |
| 972 | 979 | break; |
| 973 | 980 | case DISC_OP_AMP_OSCILLATOR_OUT_COUNT_F_X: |
| 974 | 981 | node->output[0] = count_f ? count_f + x_time : count_f; |
| r6049 | r6050 | |
| 980 | 987 | node->output[0] = context->flip_flop + x_time; |
| 981 | 988 | break; |
| 982 | 989 | } |
| 990 | context->flip_flop = flip_flop; | |
| 983 | 991 | } |
| 984 | 992 | |
| 985 | 993 | static DISCRETE_RESET(dss_op_amp_osc) |
| r6049 | r6050 | |
|---|---|---|
| 96 | 96 | |
| 97 | 97 | struct dst_rcfilter_context |
| 98 | 98 | { |
| 99 | double vCap; | |
| 100 | double rc; | |
| 99 | 101 | double exponent; |
| 100 | | |
| 102 | UINT8 | |
| 101 | 103 | }; |
| 102 | 104 | |
| 103 | 105 | struct dst_rcfilter_sw_context |
| r6049 | r6050 | |
| 137 | 139 | * input[4] - Voltage reference. Usually 0V. |
| 138 | 140 | * |
| 139 | 141 | ************************************************************************/ |
| 140 | #define DST_CRFILTER__ENABLE DISCRETE_INPUT(0) | |
| 141 | #define DST_CRFILTER__IN DISCRETE_INPUT(1) | |
| 142 | #define DST_CRFILTER__R DISCRETE_INPUT(2) | |
| 143 | #define DST_CRFILTER__C DISCRETE_INPUT(3) | |
| 144 | #define DST_CRFILTER__VREF DISCRETE_INPUT(4) | |
| 142 | #define DST_CRFILTER__IN DISCRETE_INPUT(0) | |
| 143 | #define DST_CRFILTER__R DISCRETE_INPUT(1) | |
| 144 | #define DST_CRFILTER__C DISCRETE_INPUT(2) | |
| 145 | #define DST_CRFILTER__VREF DISCRETE_INPUT(3) | |
| 145 | 146 | |
| 146 | 147 | static DISCRETE_STEP(dst_crfilter) |
| 147 | 148 | { |
| 148 | 149 | struct dst_rcfilter_context *context = (struct dst_rcfilter_context *)node->context; |
| 149 | 150 | |
| 150 | if( | |
| 151 | if (UNEXPEC | |
| 151 | 152 | { |
| 152 | node->output[0] = DST_CRFILTER__IN - context->vCap; | |
| 153 | context->vCap += ((DST_CRFILTER__IN - DST_CRFILTER__VREF) - context->vCap) * context->exponent; | |
| 153 | double rc = DST_CRFILTER__R * DST_CRFILTER__C; | |
| 154 | if (rc != context->rc) | |
| 155 | { | |
| 156 | context->rc = rc; | |
| 157 | context->exponent = RC_CHARGE_EXP(rc); | |
| 158 | } | |
| 154 | 159 | } |
| 155 | else | |
| 156 | { | |
| 157 | node->output[0] = 0; | |
| 158 | } | |
| 160 | ||
| 161 | node->output[0] = DST_CRFILTER__IN - context->vCap; | |
| 162 | //context->vCap += ((DST_CRFILTER__IN - context->vRef) - context->vCap) * context->exponent; | |
| 163 | context->vCap += (node->output[0] - DST_CRFILTER__VREF) * context->exponent; | |
| 159 | 164 | } |
| 160 | 165 | |
| 161 | 166 | static DISCRETE_RESET(dst_crfilter) |
| 162 | 167 | { |
| 163 | 168 | struct dst_rcfilter_context *context = (struct dst_rcfilter_context *)node->context; |
| 164 | 169 | |
| 165 | context->exponent = RC_CHARGE_EXP(DST_CRFILTER__R * DST_CRFILTER__C); | |
| 166 | context->vCap = 0; | |
| 170 | context->has_rc_nodes = node->input_is_node & 0x6; | |
| 171 | context->rc = DST_CRFILTER__R * DST_CRFILTER__C; | |
| 172 | context->exponent = RC_CHARGE_EXP(context->rc); | |
| 173 | context->vCap = 0; | |
| 167 | 174 | node->output[0] = DST_CRFILTER__IN; |
| 168 | 175 | } |
| 169 | 176 | |
| r6049 | r6050 | |
| 503 | 510 | context->exponentC2 = RC_CHARGE_EXP(context->rTotal * info->c2); |
| 504 | 511 | break; |
| 505 | 512 | case DISC_OP_AMP_FILTER_IS_BAND_PASS_1M | DISC_OP_AMP_IS_NORTON: |
| 506 | context->rTotal = 1.0 / (1.0 / info->r1 + 1.0 / info->r2); | |
| 513 | if (info->r2 == 0) | |
| 514 | context->rTotal = info->r1; | |
| 515 | else | |
| 516 | context->rTotal = RES_2_PARALLEL(info->r1, info->r2); | |
| 507 | 517 | case DISC_OP_AMP_FILTER_IS_BAND_PASS_1M: |
| 508 | 518 | { |
| 509 | 519 | double fc = 1.0 / (2 * M_PI * sqrt(context->rTotal * info->rF * info->c1 * info->c2)); |
| r6049 | r6050 | |
| 1014 | 1024 | * input[4] - Voltage reference. Usually 0V. |
| 1015 | 1025 | * |
| 1016 | 1026 | ************************************************************************/ |
| 1017 | #define DST_RCFILTER__ENABLE DISCRETE_INPUT(0) | |
| 1018 | #define DST_RCFILTER__VIN DISCRETE_INPUT(1) | |
| 1019 | #define DST_RCFILTER__R DISCRETE_INPUT(2) | |
| 1020 | #define DST_RCFILTER__C DISCRETE_INPUT(3) | |
| 1021 | #define DST_RCFILTER__VREF DISCRETE_INPUT(4) | |
| 1027 | #define DST_RCFILTER__VIN DISCRETE_INPUT(0) | |
| 1028 | #define DST_RCFILTER__R DISCRETE_INPUT(1) | |
| 1029 | #define DST_RCFILTER__C DISCRETE_INPUT(2) | |
| 1030 | #define DST_RCFILTER__VREF DISCRETE_INPUT(3) | |
| 1022 | 1031 | |
| 1023 | 1032 | static DISCRETE_STEP(dst_rcfilter) |
| 1024 | 1033 | { |
| 1025 | 1034 | struct dst_rcfilter_context *context = (struct dst_rcfilter_context *)node->context; |
| 1026 | 1035 | |
| 1036 | if (UNEXPECTED(context->has_rc_nodes)) | |
| 1037 | { | |
| 1038 | double rc = DST_RCFILTER__R * DST_RCFILTER__C; | |
| 1039 | if (rc != context->rc) | |
| 1040 | { | |
| 1041 | context->rc = rc; | |
| 1042 | context->exponent = RC_CHARGE_EXP(rc); | |
| 1043 | } | |
| 1044 | } | |
| 1045 | ||
| 1027 | 1046 | /************************************************************************/ |
| 1028 | 1047 | /* Next Value = PREV + (INPUT_VALUE - PREV)*(1-(EXP(-TIMEDELTA/RC))) */ |
| 1029 | 1048 | /************************************************************************/ |
| 1030 | 1049 | |
| 1031 | if(DST_RCFILTER__ENABLE) | |
| 1032 | { | |
| 1033 | context->vCap += ((DST_RCFILTER__VIN - DST_RCFILTER__VREF - context->vCap) * context->exponent); | |
| 1034 | node->output[0] = context->vCap + DST_RCFILTER__VREF; | |
| 1035 | } | |
| 1036 | else | |
| 1037 | { | |
| 1038 | node->output[0] = 0; | |
| 1039 | } | |
| 1050 | context->vCap += ((DST_RCFILTER__VIN - node->output[0]) * context->exponent); | |
| 1051 | node->output[0] = context->vCap + DST_RCFILTER__VREF; | |
| 1040 | 1052 | } |
| 1041 | 1053 | |
| 1054 | static DISCRETE_STEP(dst_rcfilter_fast) | |
| 1055 | { | |
| 1056 | struct dst_rcfilter_context *context = (struct dst_rcfilter_context *)node->context; | |
| 1057 | node->output[0] += ((DST_RCFILTER__VIN - node->output[0]) * context->exponent); | |
| 1058 | } | |
| 1059 | ||
| 1042 | 1060 | static DISCRETE_RESET(dst_rcfilter) |
| 1043 | 1061 | { |
| 1044 | 1062 | struct dst_rcfilter_context *context = (struct dst_rcfilter_context *)node->context; |
| 1045 | 1063 | |
| 1046 | context->exponent = RC_CHARGE_EXP(DST_RCFILTER__R * DST_RCFILTER__C); | |
| 1064 | context->has_rc_nodes = node->input_is_node & 0x6; | |
| 1065 | context->rc = DST_RCFILTER__R * DST_RCFILTER__C; | |
| 1066 | context->exponent = RC_CHARGE_EXP(context->rc); | |
| 1047 | 1067 | context->vCap = 0; |
| 1048 | 1068 | node->output[0] = 0; |
| 1069 | if (!context->has_rc_nodes && DST_RCFILTER__VREF == 0) | |
| 1070 | node->step = DISCRETE_STEP_NAME(dst_rcfilter_fast); | |
| 1049 | 1071 | } |
| 1050 | 1072 | |
| 1051 | 1073 | /************************************************************************ |
| r6049 | r6050 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | /* allocate a global timer for sound timing */ |
| 211 | 211 | global->update_timer = timer_alloc(machine, sound_update, NULL); |
| 212 | timer_adjust_periodic(global->update_timer, STREAMS_UPDATE_ | |
| 212 | timer_adjust_periodic(global->update_timer, STREAMS_UPDATE_ATTOTIME | |
| 213 | 213 | |
| 214 | 214 | /* finally, do all the routing */ |
| 215 | 215 | VPRINTF(("route_sound\n")); |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Palette handling functions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ******************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "palette.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME hard disk implementation, with differencing files |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | MAME Compressed Hunks of Data file format |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "chd.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core options code code |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __OPTIONS_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core palette routines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | MAME Compressed Hunks of Data file format |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME CD-ROM utilties - build IDE and SCSI CD-ROMs on top of this |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | IMPORTANT: |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "aviio.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME cd-rom implementation |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parse Philips codes and other data from VBI lines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "osdcore.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __AVIIO_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parse Philips codes and other data from VBI lines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core string functions used throughout MAME. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ****************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "corestr.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | PNG reading functions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 10 | 11 | |
| 11 | *********************************************************************/ | |
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 12 | 15 | |
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 38 | ***************************************************************************/ | |
| 39 | ||
| 13 | 40 | #include <math.h> |
| 14 | 41 | #include <zlib.h> |
| 15 | 42 | #include "png.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Unicode related functions |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 10 | *********************************************************************/ | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | 11 | |
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 38 | ***************************************************************************/ | |
| 39 | ||
| 12 | 40 | #include "unicode.h" |
| 13 | 41 | |
| 14 | 42 |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core string functions used throughout MAME. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Miscellaneous utility code |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 10 | ****************************************************************************/ | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | 11 | |
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 38 | ***************************************************************************/ | |
| 39 | ||
| 12 | 40 | #include "coreutil.h" |
| 13 | 41 | |
| 14 | 42 |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | PNG file management. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 11 | 11 | functions that convert UTF-8 and UTF-16 char clusters to and from |
| 12 | 12 | singular 32-bit Unicode chars. |
| 13 | 13 | |
| 14 | Copyright Nicola Salmoria and the MAME Team. | |
| 15 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 14 | **************************************************************************** | |
| 16 | 15 | |
| 17 | *********************************************************************/ | |
| 16 | Copyright Aaron Giles | |
| 17 | All rights reserved. | |
| 18 | 18 | |
| 19 | Redistribution and use in source and binary forms, with or without | |
| 20 | modification, are permitted provided that the following conditions are | |
| 21 | met: | |
| 22 | ||
| 23 | * Redistributions of source code must retain the above copyright | |
| 24 | notice, this list of conditions and the following disclaimer. | |
| 25 | * Redistributions in binary form must reproduce the above copyright | |
| 26 | notice, this list of conditions and the following disclaimer in | |
| 27 | the documentation and/or other materials provided with the | |
| 28 | distribution. | |
| 29 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 30 | used to endorse or promote products derived from this software | |
| 31 | without specific prior written permission. | |
| 32 | ||
| 33 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 34 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 35 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 36 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 37 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 38 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 39 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 40 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 41 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 42 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 43 | POSSIBILITY OF SUCH DAMAGE. | |
| 44 | ||
| 45 | ***************************************************************************/ | |
| 46 | ||
| 19 | 47 | #pragma once |
| 20 | 48 | |
| 21 | 49 | #ifndef UNICODE_H |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Miscellaneous utility code |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parser for .JED files into raw fusemaps. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | Binary file format: |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | XML file parsing code. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "xmlfile.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parser for .JED files into raw fusemaps. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __JEDPARSE_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | XML file parsing code. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions to manipulate data within ZIP files. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "osdcore.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Allocated string manipulation functions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ****************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "astring.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Resource pool code |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include <stdarg.h> |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ZIP file management. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Allocated string manipulation functions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core bitmap routines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "bitmap.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Abstract object pool management |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __POOL_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core bitmap routines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | Maximum codelength is officially (alphabetsize - 1). This would be 255 bits |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Audio/video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | Each frame is compressed as a unit. The raw data is of the form: |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | File access functions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "corefile.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Huffman compression routines. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __HUFFMAN_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME hard disk implementation, with differencing files |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include "harddisk.h" |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Audio/video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #ifndef __AVCOMP_H__ |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core options code code |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #include <stdarg.h> |
| r6049 | r6050 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core file I/O interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r6049 | r6050 | |
|---|---|---|
| 203 | 203 | DISCRETE_INPUT_DATA(NODE_01) |
| 204 | 204 | |
| 205 | 205 | DISCRETE_DAC_R1(NODE_02, NODE_01, DEFAULT_TTL_V_LOGIC_1, &osi600_dac) |
| 206 | DISCRETE_CRFILTER(NODE_03, | |
| 206 | DISCRETE_CRFILTER(NODE_03, | |
| 207 | 207 | DISCRETE_OUTPUT(NODE_03, 100) |
| 208 | 208 | DISCRETE_GAIN(NODE_04, NODE_03, 32767.0/5) |
| 209 | 209 | DISCRETE_OUTPUT(NODE_04, 100) |
| r6049 | r6050 | |
|---|---|---|
| 7 | 7 | - P8000 (not working) [Matt Knoth, Fabio Priuli] |
| 8 | 8 | |
| 9 | 9 | |
| 10 | ||
| 10 | 11 | Systems Promoted from GAME_NOT_WORKING: |
| 11 | 12 | --------------------------------------- |
| 12 | 13 | - Atari 800XL [Mariusz Wojcieszek] |
| r6049 | r6050 | |
| 16 | 17 | - Nokia MikroMikko 1 M6 [Curt Coder, Kara Trace] |
| 17 | 18 | |
| 18 | 19 | |
| 20 | ||
| 19 | 21 | Skeleton drivers: |
| 20 | 22 | ----------------- |
| 21 | 23 | - Cosmicos |
| r6049 | r6050 | |
| 74 | 76 | |
| 75 | 77 | Source Changes: |
| 76 | 78 | ---------------- |
| 77 | - The core is based on MAME 0.134u | |
| 79 | - The core is based on MAME 0.134u3. This incorporates all features of the | |
| 78 | 80 | update to this core. [MAME team] |
| 79 | 81 | |
| 80 | 82 | - Moved implementation to device. [Miodrag Milanovic] |
| Previous | 15994 Revisions | Next |