| Previous | 15994 Revisions | Next |
| r1491 Tuesday 8th January, 2008 at 01:52:30 UTC by Nathan Woods |
|---|
| Updated to MAME 0.122u4 core |
| [ROOT] | makefile |
| [docs] | messnew.txt |
| [src/build] | build.mak file2str.c png2bdc.c |
| [src/emu] | attotime.c attotime.h audit.c audit.h cheat.c cheat.h clifront.c clifront.h config.c config.h cpuexec.c cpuexec.h cpuint.c cpuint.h cpuintrf.c cpuintrf.h debugger.h drawgfx.c drawgfx.h driver.c driver.h eigccppc.h eigccx86.h eminline.h emu.mak emuopts.c emuopts.h emupal.c emupal.h fileio.c fileio.h hash.c hash.h info.c info.h inptport.c inptport.h input.c input.h inputseq.c inputseq.h mame.c mame.h mamecore.c mamecore.h memconv.h memory.c memory.h output.c output.h profiler.c profiler.h render.c render.h rendersw.c rendfont.c rendfont.h rendlay.c rendlay.h rendutil.c rendutil.h restrack.c restrack.h romload.c romload.h sndintrf.c sndintrf.h sound.c sound.h state.c state.h streams.c streams.h tilemap.c tilemap.h timer.c timer.h ui.c ui.h uigfx.c uigfx.h uimenu.c uimenu.h uitext.c uitext.h validity.c video.c video.h |
| [src/emu/audio] | generic.c generic.h |
| [src/emu/cpu] | cpu.mak drcfe.c drcfe.h x64drc.c x64drc.h x86drc.c x86drc.h x86emit.h x86log.c x86log.h |
| [src/emu/cpu/adsp2100] | adsp2100.c |
| [src/emu/cpu/alph8201] | 8201dasm.c alph8201.c alph8201.h |
| [src/emu/cpu/arm] | arm.c |
| [src/emu/cpu/arm7] | arm7.c arm7.h arm7core.c arm7core.h arm7dasm.c arm7exec.c |
| [src/emu/cpu/asap] | asap.c |
| [src/emu/cpu/ccpu] | ccpu.c |
| [src/emu/cpu/cdp1802] | 1802dasm.c cdp1802.c |
| [src/emu/cpu/cop400] | 410ops.c 420ops.c cop400.h cop410.c cop410ds.c cop420.c cop420ds.c |
| [src/emu/cpu/cp1610] | cp1610.c cp1610.h |
| [src/emu/cpu/f8] | f8.c f8.h |
| [src/emu/cpu/g65816] | g65816.c g65816.h g65816ds.c g65816ds.h |
| [src/emu/cpu/h6280] | 6280dasm.c h6280.c h6280.h h6280ops.h tblh6280.c |
| [src/emu/cpu/hd6309] | 6309dasm.c hd6309.c |
| [src/emu/cpu/i386] | i386.c |
| [src/emu/cpu/i8039] | 8039dasm.c i8039.c i8039.h |
| [src/emu/cpu/i8051] | 8051dasm.c i8051.c i8051.h |
| [src/emu/cpu/i8085] | 8085dasm.c i8085.c |
| [src/emu/cpu/i8x41] | i8x41.c i8x41.h |
| [src/emu/cpu/jaguar] | jaguar.c |
| [src/emu/cpu/konami] | konami.c |
| [src/emu/cpu/lh5801] | 5801dasm.c lh5801.c lh5801.h |
| [src/emu/cpu/m37710] | m37710.c m7700ds.h |
| [src/emu/cpu/m6502] | 6502dasm.c ill02.h m4510.c m4510.h m6502.c m6502.h m6509.c m6509.h m65ce02.c m65ce02.h ops02.h ops09.h ops4510.h opsc02.h opsce02.h t6502.c t6509.c t6510.c t65c02.c t65ce02.c t65sc02.c tn2a03.c |
| [src/emu/cpu/m68000] | m68k.h m68k_in.c m68kconf.h m68kcpu.c m68kcpu.h m68kdasm.c m68kmake.c m68kmame.c |
| [src/emu/cpu/m6809] | 6809dasm.c m6809.c |
| [src/emu/cpu/mb86233] | mb86233.c |
| [src/emu/cpu/mb88xx] | mb88xx.c |
| [src/emu/cpu/mc68hc11] | mc68hc11.c |
| [src/emu/cpu/minx] | minx.c |
| [src/emu/cpu/mips] | mdrc64.c mdrcold.c mips3com.c mips3drc.c mips3fe.c mips3fe.h psx.c r3000.c |
| [src/emu/cpu/pic16c5x] | 16c5xdsm.c dis16c5x.c pic16c5x.c pic16c5x.h |
| [src/emu/cpu/powerpc] | drc_ops.c ppc.c ppcdrc.c |
| [src/emu/cpu/rsp] | rsp.c |
| [src/emu/cpu/s2650] | s2650.c |
| [src/emu/cpu/saturn] | saturn.c saturn.h saturnds.c |
| [src/emu/cpu/sc61860] | sc61860.c sc61860.h scdasm.c scops.c |
| [src/emu/cpu/se3208] | se3208.c |
| [src/emu/cpu/sh2] | sh2.c sh2.h |
| [src/emu/cpu/sh4] | sh4.c |
| [src/emu/cpu/sharc] | sharc.c |
| [src/emu/cpu/sm8500] | sm8500.c |
| [src/emu/cpu/spc700] | spc700.c spc700ds.c spc700ds.h |
| [src/emu/cpu/t11] | t11.c t11ops.c t11table.c |
| [src/emu/cpu/tms32010] | 32010dsm.c dis32010.c tms32010.c tms32010.h |
| [src/emu/cpu/tms32025] | 32025dsm.c dis32025.c tms32025.c tms32025.h |
| [src/emu/cpu/tms32031] | tms32031.c |
| [src/emu/cpu/tms32051] | tms32051.c |
| [src/emu/cpu/tms34010] | 34010fld.c 34010gfx.c 34010ops.c 34010ops.h 34010tbl.c dis34010.c tms34010.c tms34010.h |
| [src/emu/cpu/tms7000] | tms7000.c tms7000.h tms70op.c tms70tb.c |
| [src/emu/cpu/tms9900] | 9900dasm.c |
| [src/emu/cpu/upd7810] | 7810dasm.c 7810ops.c 7810tbl.c upd7810.c |
| [src/emu/cpu/z180] | z180.c z180dasm.c |
| [src/emu/cpu/z80] | z80.c z80dasm.c |
| [src/emu/cpu/z8000] | 8000dasm.c z8000.c z8000cpu.h z8000ops.c z8000tbl.c |
| [src/emu/cpu/z80gb] | z80gb.c z80gbd.c |
| [src/emu/debug] | debugcmd.c debugcmd.h debugcmt.c debugcmt.h debugcon.c debugcon.h debugcpu.c debugcpu.h debughlp.c debughlp.h debugvw.c debugvw.h express.c express.h textbuf.c textbuf.h |
| [src/emu/drivers] | empty.c xtal.h |
| [src/emu/machine] | 6522via.c 8257dma.h generic.c generic.h laserdsc.c laserdsc.h z80ctc.c z80ctc.h z80dma.c* z80dma.h* z80pio.c z80pio.h z80sio.c z80sio.h |
| [src/emu/sound] | 2151intf.c 2203intf.c 2413intf.c 2608intf.c 2610intf.c 2612intf.c 262intf.c 3812intf.c 5110intf.c 5220intf.c astrocde.c ay8910.c beep.c bsmt2000.c c140.c c352.c c6280.c cdda.c cdp1869.c cem3394.c custom.c dac.c discrete.c dmadac.c es5503.c es5506.c es8712.c flt_rc.c flt_vol.c fm.c fmopl.c gaelco.c hc55516.c ics2115.c iremga20.c k005289.c k007232.c k051649.c k053260.c k054539.c msm5205.c msm5232.c multipcm.c n63701x.c namco.c namco52.c namcona.c nes_apu.c okim6295.c pokey.c pokey.h psx.c qsound.c rf5c400.c rf5c68.c s14001a.c saa1099.c samples.c scsp.c segapcm.c sid.c sid6581.c sidw6581.h sn76477.c sn76496.c sound.mak sp0250.c sp0256.c sp0256.h speaker.c st0016.c tiaintf.c tiasound.c tiasound.h tms3615.c tms36xx.c upd7759.c vlm5030.c votrax.c vrender0.c wave.c x1_010.c ym2413.c ym2413.h ymf262.c ymf271.c ymf278b.c ymz280b.c |
| [src/emu/video] | generic.c generic.h resnet.c resnet.h rgbgen.h rgbsse.h rgbutil.h rgbvmx.h s2636.c s2636.h vector.c |
| [src/lib] | lib.mak |
| [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 sha1.c sha1.h unicode.c unicode.h unzip.c unzip.h xmlfile.c xmlfile.h |
| [src/mame] | mame.mak mamedriv.c tiny.c tiny.mak |
| [src/mame/audio] | atarijsa.c atarijsa.h carnival.c dcs.c scramble.c segasnd.c snes.c starwars.c williams.c williams.h |
| [src/mame/drivers] | arcadecl.c arkanoid.c atarifb.c atarig1.c atarig42.c atarigx2.c atarisy1.c batman.c beathead.c bfm_sc2.c bking2.c blstroid.c bnstars.c bogeyman.c btoads.c buggychl.c cherrym.c cherrym2.c cinemat.c cninja.c cps1.c cps2.c cps3.c cubocd32.c cvs.c cyberbal.c dkong.c eprom.c equites.c exidy.c funworld.c gamecstl.c gauntlet.c harddriv.c hyprduel.c igs_m027.c itech32.c jpmimpct.c ladybug.c laserbat.c liberate.c lvcards.c malzak.c mario.c mediagx.c metro.c midvunit.c midyunit.c midzeus.c model3.c ms32.c namcoic.c namcos1.c naomi.c neodrvr.c neogeo.c offtwall.c othunder.c peplus.c quasar.c rampart.c scramble.c segas16a.c segas24.c seta.c seta2.c skullxbo.c skychut.c stactics.c starwars.c suprridr.c surpratk.c taitojc.c taitowlf.c tatsumi.c tehkanwc.c thunderj.c toaplan2.c toobin.c vball.c vicdual.c vindictr.c viper.c xybots.c zac2650.c zn.c |
| [src/mame/etc] | jrcrypt.c |
| [src/mame/includes] | amiga.h atarifb.h cubocd32.h cvs.h* dc.h exidy.h galaxian.h itech32.h mario.h neogeo.h rampart.h skychut.h* suprridr.h tatsumi.h |
| [src/mame/layout] | neogeo.lay* |
| [src/mame/machine] | atarifb.c atarigen.c atarigen.h buggychl.c cubocd32.c dc.c fd1089.c fddebug.c mathbox.c mathbox.h mc8123.c midyunit.c slapstic.c starwars.c stvcd.c tatsumi.c |
| [src/mame/video] | arcadecl.c arkanoid.c atarifb.c atarig1.c atarig42.c atarigt.c atarigx2.c atarirle.c atarirle.h atarisy1.c btoads.c cvs.c dc.c exidy.c flkatck.c itech32.c kingobox.c konamiic.c konamiic.h malzak.c mario.c matmania.c midvunit.c n64.c neogeo.c ninjaw.c othunder.c ppu2c0x.c quasar.c rampart.c skychut.c suprridr.c taitoic.c tatsumi.c zac2650.c |
| [src/osd] | osdcomm.h osdcore.h osdepend.h |
| [src/osd/osdmini] | minidir.c minifile.c minimisc.c minisync.c minitime.c miniwork.c osd_cpu.h 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 main.c mame.rc osd_cpu.h osinline.h output.c output.h sound.c sound.h strconv.c strconv.h vconv.c verinfo.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 |
| [src/tools] | chdcd.c chdcd.h chdman.c jedutil.c makemeta.c regrep.c romcmp.c src2html.c srcclean.c tools.mak |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Super-simple PNG to BDC file generator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # MAME build tools makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Simple file to string converter. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | --------------------------------------------------------------------------- |
| 13 | 13 | |
| 14 | Copyright | |
| 14 | Copyright | |
| 15 | 15 | |
| 16 | 16 | OpenSPC is free software; you can redistribute it and/or modify |
| 17 | 17 | it under the terms of the GNU Lesser General Public License as published by |
| r1490 | r1491 | |
|---|---|---|
| 39 | 39 | #include "machine/atarigen.h" |
| 40 | 40 | #include "audio/atarijsa.h" |
| 41 | 41 | |
| 42 | ||
| 43 | #define JSA_MASTER_CLOCK XTAL_3_579545MHz | |
| 44 | ||
| 45 | ||
| 42 | 46 | static UINT8 *bank_base; |
| 43 | 47 | static UINT8 *bank_source_data; |
| 44 | 48 | |
| 45 | 49 | static UINT8 speech_data; |
| 46 | 50 | static UINT8 last_ctl; |
| 47 | 51 | |
| 48 | static UINT8 cpu_num; | |
| 49 | static UINT8 input_port; | |
| 52 | static int cpu_num; | |
| 50 | 53 | static UINT8 test_port; |
| 51 | 54 | static UINT16 test_mask; |
| 52 | 55 | |
| r1490 | r1491 | |
| 101 | 104 | * |
| 102 | 105 | *************************************/ |
| 103 | 106 | |
| 104 | void atarijsa_init( | |
| 107 | void atarijsa_init(r | |
| 105 | 108 | { |
| 106 | 109 | int i; |
| 107 | 110 | |
| 108 | 111 | /* copy in the parameters */ |
| 109 | cpu_num = cpunum; | |
| 110 | input_port = inputport; | |
| 112 | cpu_num = mame_find_cpu_index(machine, "jsa"); | |
| 113 | assert_always(cpu_num != -1, "Could not find JSA CPU!"); | |
| 111 | 114 | test_port = testport; |
| 112 | 115 | test_mask = testmask; |
| 113 | 116 | |
| 114 | 117 | /* predetermine the bank base */ |
| 115 | bank_base = &memory_region(REGION_CPU1+cpunum)[0x03000]; | |
| 116 | bank_source_data = &memory_region(REGION_CPU1+cpunum)[0x10000]; | |
| 118 | bank_base = &memory_region(REGION_CPU1+cpu_num)[0x03000]; | |
| 119 | bank_source_data = &memory_region(REGION_CPU1+cpu_num)[0x10000]; | |
| 117 | 120 | |
| 118 | 121 | /* determine which sound hardware is installed */ |
| 119 | 122 | has_tms5220 = has_oki6295 = has_pokey = has_ym2151 = 0; |
| r1490 | r1491 | |
| 141 | 144 | /* install POKEY memory handlers */ |
| 142 | 145 | if (has_pokey) |
| 143 | 146 | { |
| 144 | memory_install_read8_handler(cpunum, ADDRESS_SPACE_PROGRAM, 0x2c00, 0x2c0f, 0, 0, pokey1_r); | |
| 145 | memory_install_write8_handler(cpunum, ADDRESS_SPACE_PROGRAM, 0x2c00, 0x2c0f, 0, 0, pokey1_w); | |
| 147 | memory_install_read8_handler(cpu_num, ADDRESS_SPACE_PROGRAM, 0x2c00, 0x2c0f, 0, 0, pokey1_r); | |
| 148 | memory_install_write8_handler(cpu_num, ADDRESS_SPACE_PROGRAM, 0x2c00, 0x2c0f, 0, 0, pokey1_w); | |
| 146 | 149 | } |
| 147 | 150 | |
| 148 | 151 | init_save_state(); |
| r1490 | r1491 | |
| 218 | 221 | 0x02 = coin 2 |
| 219 | 222 | 0x01 = coin 1 |
| 220 | 223 | */ |
| 221 | result = readinputport | |
| 224 | result = readinputportby | |
| 222 | 225 | if (!(readinputport(test_port) & test_mask)) result ^= 0x80; |
| 223 | 226 | if (atarigen_cpu_to_sound_ready) result ^= 0x40; |
| 224 | 227 | if (atarigen_sound_to_cpu_ready) result ^= 0x20; |
| r1490 | r1491 | |
| 282 | 285 | if (((data ^ last_ctl) & 0x02) && (data & 0x02)) |
| 283 | 286 | tms5220_data_w(0, speech_data); |
| 284 | 287 | count = 5 | ((data >> 2) & 2); |
| 285 | tms5220_set_frequency(A | |
| 288 | tms5220_set_frequency(JSA_MASTER | |
| 286 | 289 | } |
| 287 | 290 | |
| 288 | 291 | /* coin counters */ |
| r1490 | r1491 | |
| 345 | 348 | 0x02 = coin 2 |
| 346 | 349 | 0x01 = coin 1 |
| 347 | 350 | */ |
| 348 | result = readinputport | |
| 351 | result = readinputportby | |
| 349 | 352 | if (!(readinputport(test_port) & test_mask)) result ^= 0x80; |
| 350 | 353 | if (atarigen_cpu_to_sound_ready) result ^= 0x40; |
| 351 | 354 | if (atarigen_sound_to_cpu_ready) result ^= 0x20; |
| r1490 | r1491 | |
| 464 | 467 | 0x02 = coin L (active high) |
| 465 | 468 | 0x01 = coin R (active high) |
| 466 | 469 | */ |
| 467 | result = readinputport | |
| 470 | result = readinputportby | |
| 468 | 471 | if (!(readinputport(test_port) & test_mask)) result ^= 0x90; |
| 469 | 472 | if (atarigen_cpu_to_sound_ready) result ^= 0x40; |
| 470 | 473 | if (atarigen_sound_to_cpu_ready) result ^= 0x20; |
| r1490 | r1491 | |
| 601 | 604 | 0x02 = coin L (active high) |
| 602 | 605 | 0x01 = coin R (active high) |
| 603 | 606 | */ |
| 604 | result = readinputport | |
| 607 | result = readinputportby | |
| 605 | 608 | if (!(readinputport(test_port) & test_mask)) result ^= 0x90; |
| 606 | 609 | if (atarigen_cpu_to_sound_ready) result ^= 0x40; |
| 607 | 610 | if (atarigen_sound_to_cpu_ready) result ^= 0x20; |
| r1490 | r1491 | |
| 729 | 732 | * |
| 730 | 733 | *************************************/ |
| 731 | 734 | |
| 732 | static ADDRESS_MAP_START( atarijsa1_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 733 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_RAM) | |
| 734 | AM_RANGE(0x2000, 0x2001) AM_READ(YM2151_status_port_0_r) | |
| 735 | AM_RANGE(0x2800, 0x2bff) AM_READ(jsa1_io_r) | |
| 736 | AM_RANGE(0x3000, 0xffff) AM_READ(MRA8_ROM) | |
| 737 | ADDRESS_MAP_END | |
| 738 | ||
| 739 | ||
| 740 | static ADDRESS_MAP_START( atarijsa1_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 741 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_RAM) | |
| 735 | static ADDRESS_MAP_START( atarijsa1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 736 | AM_RANGE(0x0000, 0x1fff) AM_RAM | |
| 742 | 737 | AM_RANGE(0x2000, 0x2000) AM_WRITE(YM2151_register_port_0_w) |
| 743 | 738 | AM_RANGE(0x2001, 0x2001) AM_WRITE(YM2151_data_port_0_w) |
| 744 | AM_RANGE(0x2800, 0x2bff) AM_WRITE(jsa1_io_w) | |
| 745 | AM_RANGE(0x3000, 0xffff) AM_WRITE(MWA8_ROM) | |
| 746 | ADDRESS_MAP_END | |
| 747 | ||
| 748 | ||
| 749 | static ADDRESS_MAP_START( atarijsa2_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 750 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_RAM) | |
| 751 | 739 | AM_RANGE(0x2000, 0x2001) AM_READ(YM2151_status_port_0_r) |
| 752 | AM_RANGE(0x2800, 0x2bff) AM_READ(jsa2_io_r) | |
| 753 | AM_RANGE(0x3000, 0xffff) AM_READ(MRA8_ROM) | |
| 740 | AM_RANGE(0x2800, 0x2bff) AM_READWRITE(jsa1_io_r, jsa1_io_w) | |
| 741 | AM_RANGE(0x3000, 0xffff) AM_ROM | |
| 754 | 742 | ADDRESS_MAP_END |
| 755 | 743 | |
| 756 | 744 | |
| 757 | static ADDRESS_MAP_START( atarijsa2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 758 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_RAM) | |
| 745 | static ADDRESS_MAP_START( atarijsa2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 746 | AM_RANGE(0x0000, 0x1fff) AM_RAM | |
| 759 | 747 | AM_RANGE(0x2000, 0x2000) AM_WRITE(YM2151_register_port_0_w) |
| 760 | 748 | AM_RANGE(0x2001, 0x2001) AM_WRITE(YM2151_data_port_0_w) |
| 761 | AM_RANGE(0x2800, 0x2bff) AM_WRITE(jsa2_io_w) | |
| 762 | AM_RANGE(0x3000, 0xffff) AM_WRITE(MWA8_ROM) | |
| 749 | AM_RANGE(0x2000, 0x2001) AM_READ(YM2151_status_port_0_r) | |
| 750 | AM_RANGE(0x2800, 0x2bff) AM_READWRITE(jsa2_io_r, jsa2_io_w) | |
| 751 | AM_RANGE(0x3000, 0xffff) AM_ROM | |
| 763 | 752 | ADDRESS_MAP_END |
| 764 | 753 | |
| 765 | 754 | |
| r1490 | r1491 | |
| 808 | 797 | MACHINE_DRIVER_START( jsa_i_stereo ) |
| 809 | 798 | |
| 810 | 799 | /* basic machine hardware */ |
| 811 | MDRV_CPU_ADD_TAG("jsa", M6502, ATARI_CLOCK_3MHz/2) | |
| 812 | MDRV_CPU_PROGRAM_MAP(atarijsa1_readmem,atarijsa1_writemem) | |
| 813 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)ATARI_CLOCK_3MHz/4/16/16/14) | |
| 800 | MDRV_CPU_ADD_TAG("jsa", M6502, JSA_MASTER_CLOCK/2) | |
| 801 | MDRV_CPU_PROGRAM_MAP(atarijsa1_map,0) | |
| 802 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14) | |
| 814 | 803 | |
| 815 | 804 | /* sound hardware */ |
| 816 | 805 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 817 | 806 | |
| 818 | MDRV_SOUND_ADD_TAG("ym", YM2151, A | |
| 807 | MDRV_SOUND_ADD_TAG("ym", YM2151, JSA_MASTER | |
| 819 | 808 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 820 | 809 | MDRV_SOUND_ROUTE(0, "left", 0.60) |
| 821 | 810 | MDRV_SOUND_ROUTE(1, "right", 0.60) |
| r1490 | r1491 | |
| 829 | 818 | MDRV_IMPORT_FROM(jsa_i_stereo) |
| 830 | 819 | |
| 831 | 820 | /* sound hardware */ |
| 832 | MDRV_SOUND_REPLACE("ym", YM2151, A | |
| 821 | MDRV_SOUND_REPLACE("ym", YM2151, JSA_MASTER | |
| 833 | 822 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 834 | 823 | MDRV_SOUND_ROUTE(0, "right", 0.60) |
| 835 | 824 | MDRV_SOUND_ROUTE(1, "left", 0.60) |
| r1490 | r1491 | |
| 843 | 832 | MDRV_IMPORT_FROM(jsa_i_stereo) |
| 844 | 833 | |
| 845 | 834 | /* sound hardware */ |
| 846 | MDRV_SOUND_ADD(POKEY, A | |
| 835 | MDRV_SOUND_ADD(POKEY, JSA_MASTER | |
| 847 | 836 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.40) |
| 848 | 837 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.40) |
| 849 | 838 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
| 853 | 842 | MACHINE_DRIVER_START( jsa_i_mono_speech ) |
| 854 | 843 | |
| 855 | 844 | /* basic machine hardware */ |
| 856 | MDRV_CPU_ADD_TAG("jsa", M6502, ATARI_CLOCK_3MHz/2) | |
| 857 | MDRV_CPU_PROGRAM_MAP(atarijsa1_readmem,atarijsa1_writemem) | |
| 858 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)ATARI_CLOCK_3MHz/4/16/16/14) | |
| 845 | MDRV_CPU_ADD_TAG("jsa", M6502, JSA_MASTER_CLOCK/2) | |
| 846 | MDRV_CPU_PROGRAM_MAP(atarijsa1_map,0) | |
| 847 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14) | |
| 859 | 848 | |
| 860 | 849 | /* sound hardware */ |
| 861 | 850 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 862 | 851 | |
| 863 | MDRV_SOUND_ADD_TAG("ym", YM2151, A | |
| 852 | MDRV_SOUND_ADD_TAG("ym", YM2151, JSA_MASTER | |
| 864 | 853 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 865 | 854 | MDRV_SOUND_ROUTE(0, "mono", 0.60) |
| 866 | 855 | MDRV_SOUND_ROUTE(1, "mono", 0.60) |
| 867 | 856 | |
| 868 | MDRV_SOUND_ADD(TMS5220, A | |
| 857 | MDRV_SOUND_ADD(TMS5220, JSA_MASTER | |
| 869 | 858 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 870 | 859 | MACHINE_DRIVER_END |
| 871 | 860 | |
| r1490 | r1491 | |
| 874 | 863 | MACHINE_DRIVER_START( jsa_ii_mono ) |
| 875 | 864 | |
| 876 | 865 | /* basic machine hardware */ |
| 877 | MDRV_CPU_ADD_TAG("jsa", M6502, ATARI_CLOCK_3MHz/2) | |
| 878 | MDRV_CPU_PROGRAM_MAP(atarijsa2_readmem,atarijsa2_writemem) | |
| 879 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)ATARI_CLOCK_3MHz/4/16/16/14) | |
| 866 | MDRV_CPU_ADD_TAG("jsa", M6502, JSA_MASTER_CLOCK/2) | |
| 867 | MDRV_CPU_PROGRAM_MAP(atarijsa2_map,0) | |
| 868 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14) | |
| 880 | 869 | |
| 881 | 870 | /* sound hardware */ |
| 882 | 871 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 883 | 872 | |
| 884 | MDRV_SOUND_ADD_TAG("ym", YM2151, A | |
| 873 | MDRV_SOUND_ADD_TAG("ym", YM2151, JSA_MASTER | |
| 885 | 874 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 886 | 875 | MDRV_SOUND_ROUTE(0, "mono", 0.60) |
| 887 | 876 | MDRV_SOUND_ROUTE(1, "mono", 0.60) |
| 888 | 877 | |
| 889 | MDRV_SOUND_ADD_TAG("adpcm", OKIM6295, A | |
| 878 | MDRV_SOUND_ADD_TAG("adpcm", OKIM6295, JSA_MASTER | |
| 890 | 879 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 891 | 880 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 892 | 881 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
| 917 | 906 | MACHINE_DRIVER_START( jsa_iiis_stereo ) |
| 918 | 907 | |
| 919 | 908 | /* basic machine hardware */ |
| 920 | MDRV_CPU_ADD_TAG("jsa", M6502, A | |
| 909 | MDRV_CPU_ADD_TAG("jsa", M6502, JSA_MASTER | |
| 921 | 910 | MDRV_CPU_PROGRAM_MAP(atarijsa3s_map,0) |
| 922 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)A | |
| 911 | MDRV_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER | |
| 923 | 912 | |
| 924 | 913 | /* sound hardware */ |
| 925 | 914 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 926 | 915 | |
| 927 | MDRV_SOUND_ADD_TAG("ym", YM2151, A | |
| 916 | MDRV_SOUND_ADD_TAG("ym", YM2151, JSA_MASTER | |
| 928 | 917 | MDRV_SOUND_CONFIG(ym2151_interface) |
| 929 | 918 | MDRV_SOUND_ROUTE(0, "left", 0.60) |
| 930 | 919 | MDRV_SOUND_ROUTE(1, "right", 0.60) |
| 931 | 920 | |
| 932 | MDRV_SOUND_ADD(OKIM6295, A | |
| 921 | MDRV_SOUND_ADD(OKIM6295, JSA_MASTER | |
| 933 | 922 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 934 | 923 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.75) |
| 935 | 924 | |
| 936 | MDRV_SOUND_ADD(OKIM6295, A | |
| 925 | MDRV_SOUND_ADD(OKIM6295, JSA_MASTER | |
| 937 | 926 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 938 | 927 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.75) |
| 939 | 928 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | |
| 8 | ||
| 9 | #define ATARI_CLOCK_3MHz 3579000 | |
| 10 | ||
| 11 | ||
| 12 | void atarijsa_init(int cpunum, int inputport, int testport, int testmask); | |
| 8 | void atarijsa_init(running_machine *machine, int testport, int testmask); | |
| 13 | 9 | void atarijsa3_init_adpcm(int region); |
| 14 | 10 | void atarijsa_reset(void); |
| 15 | 11 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Sound boards for early Sega G-80 based games. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*****************************************************************************/ |
| 2 | 2 | /* */ |
| 3 | /* (C) Copyright | |
| 3 | /* (C) Copyright Peter J.C.Clare */ | |
| 4 | 4 | /* */ |
| 5 | 5 | /*****************************************************************************/ |
| 6 | 6 | /* */ |
| r1490 | r1491 | |
|---|---|---|
| 32 | 32 | #include "sound/dac.h" |
| 33 | 33 | |
| 34 | 34 | |
| 35 | #define NARC_MASTER_CLOCK XTAL_8MHz | |
| 36 | #define NARC_FM_CLOCK XTAL_3_579545MHz | |
| 37 | ||
| 38 | #define CVSD_MASTER_CLOCK XTAL_8MHz | |
| 39 | #define CVSD_FM_CLOCK XTAL_3_579545MHz | |
| 40 | ||
| 41 | #define ADPCM_MASTER_CLOCK XTAL_8MHz | |
| 42 | #define ADPCM_FM_CLOCK XTAL_3_579545MHz | |
| 43 | ||
| 44 | ||
| 45 | ||
| 35 | 46 | /*************************************************************************** |
| 36 | 47 | STATIC GLOBALS |
| 37 | 48 | ****************************************************************************/ |
| r1490 | r1491 | |
| 39 | 50 | static UINT8 williams_sound_int_state; |
| 40 | 51 | |
| 41 | 52 | static UINT8 audio_talkback; |
| 53 | static UINT8 audio_sync; | |
| 42 | 54 | |
| 43 | 55 | static INT8 sound_cpunum; |
| 44 | 56 | static INT8 soundalt_cpunum; |
| r1490 | r1491 | |
| 177 | 189 | ****************************************************************************/ |
| 178 | 190 | |
| 179 | 191 | MACHINE_DRIVER_START( williams_cvsd_sound ) |
| 180 | MDRV_CPU_ADD_TAG("cvsd", M6809, | |
| 192 | MDRV_CPU_ADD_TAG("cvsd", M6809E, CVSD_MASTER_CLOCK/4) | |
| 181 | 193 | MDRV_CPU_PROGRAM_MAP(williams_cvsd_map,0) |
| 182 | 194 | |
| 183 | 195 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 184 | 196 | |
| 185 | MDRV_SOUND_ADD(YM2151, | |
| 197 | MDRV_SOUND_ADD(YM2151, CVSD_FM_CLOCK) | |
| 186 | 198 | MDRV_SOUND_CONFIG(cvsd_ym2151_interface) |
| 187 | 199 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 188 | 200 | |
| r1490 | r1491 | |
| 195 | 207 | |
| 196 | 208 | |
| 197 | 209 | MACHINE_DRIVER_START( williams_narc_sound ) |
| 198 | MDRV_CPU_ADD_TAG("narc1", M6809, | |
| 210 | MDRV_CPU_ADD_TAG("narc1", M6809E, NARC_MASTER_CLOCK/4) | |
| 199 | 211 | MDRV_CPU_PROGRAM_MAP(williams_narc_master_map,0) |
| 200 | 212 | |
| 201 | MDRV_CPU_ADD_TAG("narc2", M6809, | |
| 213 | MDRV_CPU_ADD_TAG("narc2", M6809E, NARC_MASTER_CLOCK/4) | |
| 202 | 214 | MDRV_CPU_PROGRAM_MAP(williams_narc_slave_map,0) |
| 203 | 215 | |
| 204 | 216 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 205 | 217 | |
| 206 | MDRV_SOUND_ADD(YM2151, | |
| 218 | MDRV_SOUND_ADD(YM2151, NARC_FM_CLOCK) | |
| 207 | 219 | MDRV_SOUND_CONFIG(adpcm_ym2151_interface) |
| 208 | 220 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.10) |
| 209 | 221 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.10) |
| r1490 | r1491 | |
| 223 | 235 | |
| 224 | 236 | |
| 225 | 237 | MACHINE_DRIVER_START( williams_adpcm_sound ) |
| 226 | MDRV_CPU_ADD_TAG("adpcm", M6809, | |
| 238 | MDRV_CPU_ADD_TAG("adpcm", M6809E, ADPCM_MASTER_CLOCK/4) | |
| 227 | 239 | MDRV_CPU_PROGRAM_MAP(williams_adpcm_map,0) |
| 228 | 240 | |
| 229 | 241 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 230 | 242 | |
| 231 | MDRV_SOUND_ADD(YM2151, | |
| 243 | MDRV_SOUND_ADD(YM2151, ADPCM_FM_CLOCK) | |
| 232 | 244 | MDRV_SOUND_CONFIG(adpcm_ym2151_interface) |
| 233 | 245 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 234 | 246 | |
| 235 | 247 | MDRV_SOUND_ADD(DAC, 0) |
| 236 | 248 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 237 | 249 | |
| 238 | MDRV_SOUND_ADD(OKIM6295, | |
| 250 | MDRV_SOUND_ADD(OKIM6295, ADPCM_MASTER_CLOCK/8) | |
| 239 | 251 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) // clock frequency & pin 7 not verified |
| 240 | 252 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 241 | 253 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
| 322 | 334 | /* register for save states */ |
| 323 | 335 | state_save_register_global(williams_sound_int_state); |
| 324 | 336 | state_save_register_global(audio_talkback); |
| 337 | state_save_register_global(audio_sync); | |
| 325 | 338 | } |
| 326 | 339 | |
| 327 | 340 | |
| r1490 | r1491 | |
| 529 | 542 | } |
| 530 | 543 | |
| 531 | 544 | |
| 545 | static TIMER_CALLBACK( narc_sync_clear ) | |
| 546 | { | |
| 547 | audio_sync &= ~param; | |
| 548 | } | |
| 549 | ||
| 532 | 550 | static WRITE8_HANDLER( narc_master_sync_w ) |
| 533 | 551 | { |
| 552 | timer_set(double_to_attotime(TIME_OF_74LS123(180000, 0.000001)), NULL, 0x01, narc_sync_clear); | |
| 553 | audio_sync |= 0x01; | |
| 534 | 554 | logerror("Master sync = %02X\n", data); |
| 535 | 555 | } |
| 536 | 556 | |
| r1490 | r1491 | |
| 543 | 563 | |
| 544 | 564 | static WRITE8_HANDLER( narc_slave_sync_w ) |
| 545 | 565 | { |
| 566 | timer_set(double_to_attotime(TIME_OF_74LS123(180000, 0.000001)), NULL, 0x02, narc_sync_clear); | |
| 567 | audio_sync |= 0x02; | |
| 546 | 568 | logerror("Slave sync = %02X\n", data); |
| 547 | 569 | } |
| 548 | 570 | |
| r1490 | r1491 | |
| 584 | 606 | } |
| 585 | 607 | |
| 586 | 608 | |
| 609 | int williams_narc_talkback_r(void) | |
| 610 | { | |
| 611 | return audio_talkback | (audio_sync << 8); | |
| 612 | } | |
| 587 | 613 | |
| 614 | ||
| 615 | ||
| 588 | 616 | /*************************************************************************** |
| 589 | 617 | ADPCM READ/WRITE HANDLERS |
| 590 | 618 | ****************************************************************************/ |
| r1490 | r1491 | |
| 601 | 629 | } |
| 602 | 630 | |
| 603 | 631 | |
| 632 | static TIMER_CALLBACK( clear_irq_state ) | |
| 633 | { | |
| 634 | williams_sound_int_state = 0; | |
| 635 | } | |
| 636 | ||
| 637 | ||
| 604 | 638 | static READ8_HANDLER( adpcm_command_r ) |
| 605 | 639 | { |
| 606 | 640 | cpunum_set_input_line(sound_cpunum, M6809_IRQ_LINE, CLEAR_LINE); |
| 607 | williams_sound_int_state = 0; | |
| 641 | ||
| 642 | /* don't clear the external IRQ state for a short while; this allows the | |
| 643 | self-tests to pass */ | |
| 644 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, clear_irq_state); | |
| 608 | 645 | return soundlatch_r(0); |
| 609 | 646 | } |
| 610 | 647 | |
| r1490 | r1491 | |
| 628 | 665 | { |
| 629 | 666 | cpunum_set_input_line(sound_cpunum, M6809_IRQ_LINE, ASSERT_LINE); |
| 630 | 667 | williams_sound_int_state = 1; |
| 668 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); | |
| 631 | 669 | } |
| 632 | 670 | } |
| 633 | 671 | |
| r1490 | r1491 | |
| 645 | 683 | else |
| 646 | 684 | cpunum_set_input_line(sound_cpunum, INPUT_LINE_RESET, CLEAR_LINE); |
| 647 | 685 | } |
| 686 | ||
| 687 | ||
| 688 | int williams_adpcm_sound_irq_r(void) | |
| 689 | { | |
| 690 | return williams_sound_int_state; | |
| 691 | } |
| r1490 | r1491 | |
|---|---|---|
| 15 | 15 | void williams_adpcm_init(void); |
| 16 | 16 | void williams_adpcm_data_w(int data); |
| 17 | 17 | void williams_adpcm_reset_w(int state); |
| 18 | int williams_adpcm_sound_irq_r(void); | |
| 18 | 19 | |
| 19 | 20 | void williams_narc_init(void); |
| 20 | 21 | void williams_narc_data_w(int data); |
| 21 | 22 | void williams_narc_reset_w(int state); |
| 22 | ||
| 23 | int williams_narc_talkback_r(void); |
| r1490 | r1491 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | 13 | |
| 14 | ||
| 15 | 14 | #include "driver.h" |
| 16 | 15 | #include "cpu/z80/z80.h" |
| 17 | 16 | #include "machine/7474.h" |
| 18 | 17 | #include "sound/flt_rc.h" |
| 18 | #include "sound/5110intf.h" | |
| 19 | #include "sound/tms5110.h" | |
| 20 | #include "sound/ay8910.h" | |
| 19 | 21 | #include "includes/galaxian.h" |
| 20 | 22 | |
| 23 | #define AD2083_TMS5110_CLOCK XTAL_640kHz | |
| 21 | 24 | |
| 22 | 25 | /* The timer clock in Scramble which feeds the upper 4 bits of */ |
| 23 | 26 | /* AY-3-8910 port A is based on the same clock */ |
| r1490 | r1491 | |
| 252 | 255 | } |
| 253 | 256 | |
| 254 | 257 | |
| 258 | /*************************************************************************** | |
| 259 | AD2083 TMS5110 implementation (still wrong!) | |
| 260 | ||
| 261 | ROMA: BIT1: Hypersoni ? | |
| 262 | ROMA: BIT2: Two thousand eighty three | |
| 263 | ROMA: BIT4: Atomic City Attack | |
| 264 | ROMA: BIT5: Thank you, please try again | |
| 265 | ROMA: BIT6: Two, one, fire | |
| 266 | ROMA: BIT7: Hyperjump | |
| 267 | ROMB: BIT1: Noise (Explosion ?) | |
| 268 | ROMB: BIT2: Welcome to the top 20 | |
| 269 | ROMB: BIT4: Atomic City Attack | |
| 270 | ROMB: BIT5: Noise (Explosion ?) | |
| 271 | ROMB: BIT6: Keep going pressing | |
| 272 | ROMB: BIT7: You are the new champion | |
| 273 | ||
| 274 | The circuit consist of | |
| 275 | ||
| 276 | 2x 2532 32Kbit roms | |
| 277 | 2x 74LS393 quad 4bit counters to address roms | |
| 278 | 1x 74LS174 hex-d-flipflops to latch control byte | |
| 279 | 2x 74LS139 decoder to decode rom selects | |
| 280 | 1x 74LS161 8bit input multiplexor to select sound bit from rom data | |
| 281 | 1x 74LS00 quad nand to decode signals (unknown) to latch control byte | |
| 282 | ==> 74LS139 | |
| 283 | 1x 74LS16 quad open collector inverters | |
| 284 | 1x 74S288 32x8 Prom | |
| 285 | ||
| 286 | The prom obviously is used to provide the right timing when | |
| 287 | fetching data bits. This circuit should be comparable to bagman. | |
| 288 | ||
| 289 | Prom | |
| 290 | Q0 ==> NC | |
| 291 | Q1 ==> PDC | |
| 292 | Q2 ==> CTL2/CTL8 (Speak/Reset) | |
| 293 | Q7 ==> Reset Counters (LS393) | |
| 294 | Q8 ==> Trigger Logic | |
| 295 | ||
| 296 | ***************************************************************************/ | |
| 297 | ||
| 298 | /* | |
| 299 | * Alt1 Alt2 | |
| 300 | * 1 ==> C B Bit select | |
| 301 | * 2 ==> B C Bit select | |
| 302 | * 3 ==> A A Bit select | |
| 303 | * 4 ==> B1 Rom select | |
| 304 | * 5 ==> A1 Rom select | |
| 305 | * | |
| 306 | * ALT1 ALT2 | |
| 307 | * 321 CBA CBA | |
| 308 | * 000 000 000 | |
| 309 | * 001 100 010 | |
| 310 | * 010 010 100 | |
| 311 | * 011 110 110 | |
| 312 | * 100 001 001 | |
| 313 | * 101 101 011 | |
| 314 | * 110 011 101 | |
| 315 | * 111 111 111 | |
| 316 | * | |
| 317 | * Alt1 provides more sensible sound. Both Alt1 and Alt2 are | |
| 318 | * possible on PCB so Alt2 is left in for documentation. | |
| 319 | * | |
| 320 | */ | |
| 321 | ||
| 322 | static UINT32 speech_rom_address; | |
| 323 | static UINT32 speech_rom_address_hi; | |
| 324 | static UINT8 speech_rom_bit; | |
| 325 | static UINT8 speech_cnt; | |
| 326 | ||
| 327 | static TIMER_CALLBACK( ad2083_step ) | |
| 328 | { | |
| 329 | /* only 16 bytes needed ... Stored here since | |
| 330 | * prom is a bad dump | |
| 331 | */ | |
| 332 | static const int prom[16] = {0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, | |
| 333 | 0x02, 0x00, 0x40, 0x00, 0x04, 0x06, 0x04, 0x84 }; | |
| 334 | UINT8 ctrl; | |
| 335 | ||
| 336 | if (param == 0) | |
| 337 | { | |
| 338 | if (speech_cnt < 0x10) | |
| 339 | { | |
| 340 | /* Just reset and exit */ | |
| 341 | speech_cnt = 0; | |
| 342 | return; | |
| 343 | } | |
| 344 | speech_cnt = 0; | |
| 345 | } | |
| 346 | ctrl = prom[speech_cnt++]; | |
| 347 | ||
| 348 | if (ctrl & 0x40) | |
| 349 | speech_rom_address = 0; | |
| 350 | ||
| 351 | tms5110_CTL_w(0, ctrl & 0x04 ? TMS5110_CMD_SPEAK : TMS5110_CMD_RESET); | |
| 352 | tms5110_PDC_w(0, ctrl & 0x02 ? 0 : 1); | |
| 353 | ||
| 354 | if (!(ctrl & 0x80)) | |
| 355 | timer_set(ATTOTIME_IN_HZ(AD2083_TMS5110_CLOCK / 2),NULL,1,ad2083_step); | |
| 356 | } | |
| 357 | ||
| 358 | static int ad2083_speech_rom_read_bit(void) | |
| 359 | { | |
| 360 | UINT8 *ROM = memory_region(REGION_SOUND1); | |
| 361 | int bit; | |
| 362 | ||
| 363 | speech_rom_address %= 4096; | |
| 364 | ||
| 365 | bit = (ROM[speech_rom_address | speech_rom_address_hi] >> speech_rom_bit) & 1; | |
| 366 | speech_rom_address++; | |
| 367 | ||
| 368 | return bit; | |
| 369 | } | |
| 370 | ||
| 371 | static WRITE8_HANDLER( ad2083_tms5110_ctrl_w ) | |
| 372 | { | |
| 373 | int tbl[8] = {0,4,2,6,1,5,3,7}; | |
| 374 | ||
| 375 | speech_rom_bit = tbl[data & 0x07]; | |
| 376 | switch (data>>3) | |
| 377 | { | |
| 378 | case 0x00: | |
| 379 | logerror("Rom 0 select .. \n"); | |
| 380 | break; | |
| 381 | case 0x01: | |
| 382 | /* Rom 2 select */ | |
| 383 | speech_rom_address_hi = 0x1000; | |
| 384 | break; | |
| 385 | case 0x02: | |
| 386 | logerror("Rom 1 select\n"); | |
| 387 | break; | |
| 388 | case 0x03: | |
| 389 | /* Rom 3 select */ | |
| 390 | speech_rom_address_hi = 0x0000; | |
| 391 | break; | |
| 392 | } | |
| 393 | timer_set(attotime_zero,NULL,0,ad2083_step); | |
| 394 | } | |
| 395 | ||
| 396 | static const struct TMS5110interface ad2083_tms5110_interface = | |
| 397 | { | |
| 398 | TMS5110_IS_5110A, | |
| 399 | -1, /* rom_region */ | |
| 400 | ad2083_speech_rom_read_bit /* M0 callback function. Called whenever chip requests a single bit of data */ | |
| 401 | }; | |
| 402 | ||
| 403 | ||
| 404 | static const struct AY8910interface ad2083_ay8910_interface_1 = | |
| 405 | { | |
| 406 | scramble_portB_r | |
| 407 | }; | |
| 408 | ||
| 409 | static const struct AY8910interface ad2083_ay8910_interface_2 = | |
| 410 | { | |
| 411 | hotshock_soundlatch_r | |
| 412 | }; | |
| 413 | ||
| 414 | static ADDRESS_MAP_START( ad2083_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 415 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 416 | AM_RANGE(0x8000, 0x83ff) AM_RAM | |
| 417 | ADDRESS_MAP_END | |
| 418 | ||
| 419 | static ADDRESS_MAP_START( ad2083_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 420 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 421 | AM_RANGE(0x01, 0x01) AM_WRITE(ad2083_tms5110_ctrl_w) | |
| 422 | AM_RANGE(0x10, 0x10) AM_WRITE(AY8910_control_port_0_w) | |
| 423 | AM_RANGE(0x20, 0x20) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 424 | AM_RANGE(0x40, 0x40) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 425 | AM_RANGE(0x80, 0x80) AM_WRITE(AY8910_control_port_1_w) | |
| 426 | ADDRESS_MAP_END | |
| 427 | ||
| 428 | static SOUND_START( ad2083 ) | |
| 429 | { | |
| 430 | speech_rom_address = 0; | |
| 431 | speech_rom_address_hi = 0; | |
| 432 | speech_rom_bit = 0; | |
| 433 | speech_cnt = 0x10; | |
| 434 | ||
| 435 | state_save_register_global(speech_rom_address); | |
| 436 | state_save_register_global(speech_rom_address_hi); | |
| 437 | state_save_register_global(speech_rom_bit); | |
| 438 | state_save_register_global(speech_cnt); | |
| 439 | } | |
| 440 | ||
| 441 | MACHINE_DRIVER_START( ad2083_audio ) | |
| 442 | ||
| 443 | MDRV_CPU_ADD(Z80, 14318000/8) /* 1.78975 MHz */ | |
| 444 | MDRV_CPU_PROGRAM_MAP(ad2083_sound_map,0) | |
| 445 | MDRV_CPU_IO_MAP(ad2083_sound_io_map,0) | |
| 446 | ||
| 447 | MDRV_SOUND_START(ad2083) | |
| 448 | ||
| 449 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 450 | MDRV_SOUND_ADD(AY8910, 14318000/8) | |
| 451 | MDRV_SOUND_CONFIG(ad2083_ay8910_interface_1) | |
| 452 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) | |
| 453 | ||
| 454 | MDRV_SOUND_ADD(AY8910, 14318000/8) | |
| 455 | MDRV_SOUND_CONFIG(ad2083_ay8910_interface_2) | |
| 456 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) | |
| 457 | ||
| 458 | MDRV_SOUND_ADD(TMS5110, AD2083_TMS5110_CLOCK) | |
| 459 | MDRV_SOUND_CONFIG(ad2083_tms5110_interface) | |
| 460 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 461 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Atari Star Wars hardware |
| 4 | 4 | |
| 5 | This file is Copyright | |
| 5 | This file is Copyright | |
| 6 | 6 | Modified by Frank Palazzolo for sound support |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 774 | 774 | |
| 775 | 775 | static TIMER_CALLBACK( dcs_reset ) |
| 776 | 776 | { |
| 777 | if (LOG_DCS_IO) | |
| 778 | logerror("dcs_reset\n"); | |
| 779 | ||
| 777 | 780 | /* reset the memory banking */ |
| 778 | 781 | switch (dcs.rev) |
| 779 | 782 | { |
| r1490 | r1491 | |
| 892 | 895 | state_save_register_global(transfer.sum); |
| 893 | 896 | state_save_register_global(transfer.fifo_entries); |
| 894 | 897 | |
| 895 | state_save_register_global_pointer(dcs_sram, 0x8000*4 / sizeof(dcs_sram[0])); | |
| 898 | if (dcs_sram != NULL) | |
| 899 | state_save_register_global_pointer(dcs_sram, 0x8000*4 / sizeof(dcs_sram[0])); | |
| 896 | 900 | } |
| 897 | 901 | |
| 898 | 902 | |
| 899 | 903 | void dcs_init(void) |
| 900 | 904 | { |
| 901 | dcs_register_state(); | |
| 902 | 905 | memset(&dcs, 0, sizeof(dcs)); |
| 906 | dcs_sram = NULL; | |
| 903 | 907 | |
| 904 | 908 | /* find the DCS CPU and the sound ROMs */ |
| 905 | 909 | dcs.cpunum = mame_find_cpu_index(Machine, "dcs"); |
| r1490 | r1491 | |
| 919 | 923 | /* non-RAM based automatically acks */ |
| 920 | 924 | dcs.auto_ack = TRUE; |
| 921 | 925 | |
| 926 | /* register for save states */ | |
| 927 | dcs_register_state(); | |
| 928 | ||
| 922 | 929 | /* reset the system */ |
| 923 | 930 | dcs_reset(Machine, NULL, 0); |
| 924 | 931 | } |
| r1490 | r1491 | |
|---|---|---|
| 68 | 68 | static TIMER_CALLBACK(akiko_dma_proc); |
| 69 | 69 | static TIMER_CALLBACK(akiko_frame_proc); |
| 70 | 70 | |
| 71 | void amiga_akiko_i | |
| 71 | static void amiga_akiko_exi | |
| 72 | 72 | { |
| 73 | if( akiko.cdrom ) { | |
| 74 | cdrom_close(akiko.cdrom); | |
| 75 | akiko.cdrom = (cdrom_file *)NULL; | |
| 76 | } | |
| 77 | } | |
| 78 | ||
| 79 | void amiga_akiko_init(running_machine* machine) | |
| 80 | { | |
| 73 | 81 | i2cmem_init( 0, I2CMEM_SLAVE_ADDRESS, NVRAM_PAGE_SIZE, NVRAM_SIZE, NULL ); |
| 74 | 82 | |
| 75 | 83 | akiko.c2p_input_index = 0; |
| r1490 | r1491 | |
| 99 | 107 | akiko.dma_timer = timer_alloc(akiko_dma_proc, NULL); |
| 100 | 108 | akiko.frame_timer = timer_alloc(akiko_frame_proc, NULL); |
| 101 | 109 | |
| 110 | add_exit_callback(machine, amiga_akiko_exit); | |
| 111 | ||
| 102 | 112 | /* create the TOC table */ |
| 103 | 113 | if ( akiko.cdrom != NULL && cdrom_get_last_track(akiko.cdrom) ) |
| 104 | 114 | { |
| r1490 | r1491 | |
|---|---|---|
| 22 | 22 | The FD1089 design is clearly derived from the MC8123. The MC8123 is a Z80 so it |
| 23 | 23 | made sense to encrypt all 8 data bits and use 12 of the 16 address bits. It makes |
| 24 | 24 | a lot less sense to encrypt only half of the 16 data bits; using 12 of the 24 |
| 25 | address bits might be ok, but not in the way t | |
| 25 | address bits might be ok, but not in the way it | |
| 26 | 26 | bits to use was probably dictated by the need to not encrypt data in certain areas |
| 27 | 27 | of the address space, so they had to include the top 8 bits of the address. |
| 28 | 28 | However this means that if you pick e.g. area 000000-00FFFF, where most of the |
| r1490 | r1491 | |
| 32 | 32 | and security. Also, since only 8 of the 16 bits are encrypted, it is very easy |
| 33 | 33 | to use the unencrypted ones to search for known sequences of code or data. |
| 34 | 34 | |
| 35 | It is almost certain that a linear congruential generator was used to generate | |
| 36 | the keys, like for MC8123 and FD1094, however this hasn't been figured out yet. | |
| 37 | The keys that control decryption are currently arbitrarily assigned so the only | |
| 38 | thing one can expect is that there should be a fixed 256 entries table to map the | |
| 39 | LCG output to the current arbitrary keys. | |
| 35 | 40 | |
| 41 | Note that when both FD1089A and FD1089B versions of a game exist, they use the | |
| 42 | same key. There are small differences in the current keys (only bit 2 of some | |
| 43 | values) which are caused by the arbitrary assignment of keys. | |
| 44 | ||
| 36 | 45 | Known games that use this CPU are: |
| 37 | 46 | |
| 38 | 47 | CPU # Status Game Notes |
| r1490 | r1491 | |
| 41 | 50 | 317-0018 [1] Action Fighter |
| 42 | 51 | 317-0021? [2] Alex Kidd |
| 43 | 52 | 317-0022 [1] Dunk Shot |
| 44 | 317-0028 [2] Defense | |
| 45 | 317-0033 [1] Alien Syndrome | |
| 46 | 317-0167 [2] Aurail | |
| 53 | 317-0028 [2] Defense same key as 317-0028 | |
| 54 | 317-0033 [1] Alien Syndrome same key as 317-0037 | |
| 55 | 317-0167 [2] Aurail same key as 317-0168 | |
| 47 | 56 | |
| 48 | 57 | FD1089B |
| 49 | 58 | 317-0013A [1] Enduro Racer |
| 50 | 59 | 317-0024 [2] Time Scanner FD1089B 6J2 317-0024 |
| 51 | 317-0027 [2] SDI | |
| 60 | 317-0027 [2] SDI same key as 317-0027 | |
| 52 | 61 | 317-0034 [1] Super Hang-On |
| 53 | 317-0168 [1] Aurail | |
| 62 | 317-0037 [2] Alien Syndrome same key as 317-0033 | |
| 63 | 317-0168 [1] Aurail same key as 317-0167 | |
| 54 | 64 | 317-5021 [3] Sukeban Jansi Ryuko |
| 55 | 65 | |
| 56 | 66 | [1] Complete |
| r1490 | r1491 | |
| 4230 | 4240 | }; |
| 4231 | 4241 | |
| 4232 | 4242 | |
| 4243 | /* 317-0037 FD1089B */ | |
| 4244 | static const UINT8 key_0037[0x2000] = | |
| 4245 | { | |
| 4246 | /* data */ | |
| 4247 | 0xe7,0x57,0x69,0xa4,0x29,0x6c,0x18,0xa3,0x64,0x71,0x11,0x55,0x16,0x59,0xaa,0x2c, | |
| 4248 | 0x53,0xb4,0x82,0xce,0x26,0x3f,0xfb,0x44,0xaa,0xac,0xc9,0x76,0x63,0xc6,0x55,0x6e, | |
| 4249 | 0xbd,0x9e,0x8a,0x31,0x46,0x6a,0x4e,0x22,0x8a,0xca,0x31,0x48,0x84,0x3e,0x69,0x7c, | |
| 4250 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4251 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4252 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4253 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4254 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4255 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4256 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4257 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4258 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4259 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4260 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4261 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4262 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4263 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4264 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4265 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4266 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4267 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4268 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4269 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4270 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4271 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4272 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4273 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4274 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4275 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4276 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4277 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4278 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4279 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4280 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4281 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4282 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4283 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4284 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4285 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4286 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4287 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4288 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4289 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4290 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4291 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4292 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4293 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4294 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4295 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4296 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4297 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4298 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4299 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4300 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4301 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4302 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4303 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4304 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4305 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4306 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4307 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4308 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4309 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4310 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4311 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4312 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4313 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4314 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4315 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4316 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4317 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4318 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4319 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4320 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4321 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4322 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4323 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4324 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4325 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4326 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4327 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4328 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4329 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4330 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4331 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4332 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4333 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4334 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4335 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4336 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4337 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4338 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4339 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4340 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4341 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4342 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4343 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4344 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4345 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4346 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4347 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4348 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4349 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4350 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4351 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4352 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4353 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4354 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4355 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4356 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4357 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4358 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4359 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4360 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4361 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4362 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4363 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4364 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4365 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4366 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4367 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4368 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4369 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4370 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4371 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4372 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4373 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4374 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4375 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4376 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4377 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4378 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4379 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4380 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4381 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4382 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4383 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4384 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4385 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4386 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4387 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4388 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4389 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4390 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4391 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4392 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4393 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4394 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4395 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4396 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4397 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4398 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4399 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4400 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4401 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4402 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4403 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4404 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4405 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4406 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4407 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4408 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4409 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4410 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4411 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4412 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4413 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4414 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4415 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4416 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4417 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4418 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4419 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4420 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4421 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4422 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4423 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4424 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4425 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4426 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4427 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4428 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4429 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4430 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4431 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4432 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4433 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4434 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4435 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4436 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4437 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4438 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4439 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4440 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4441 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4442 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4443 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4444 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4445 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4446 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4447 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4448 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4449 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4450 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4451 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4452 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4453 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4454 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4455 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4456 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4457 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4458 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4459 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4460 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4461 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4462 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4463 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4464 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4465 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4466 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4467 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4468 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4469 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4470 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4471 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4472 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4473 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4474 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4475 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4476 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4477 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4478 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4479 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4480 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4481 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4482 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4483 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4484 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4485 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4486 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4487 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4488 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4489 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4490 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4491 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4492 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4493 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4494 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4495 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4496 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4497 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4498 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4499 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4500 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4501 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4502 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4503 | ||
| 4504 | /* opcodes */ | |
| 4505 | 0xf1,0x4e,0xd0,0xeb,0x26,0xd6,0x7d,0xaf,0x37,0x2f,0x78,0xd9,0xb4,0xad,0x7f,0x9d, | |
| 4506 | 0x57,0x96,0xb0,0xaa,0xd5,0x38,0xfe,0xc7,0x22,0x89,0x93,0x8c,0xc4,0x19,0x3f,0x1d, | |
| 4507 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4508 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4509 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4510 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4511 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4512 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4513 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4514 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4515 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4516 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4517 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4518 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4519 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4520 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4521 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4522 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4523 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4524 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4525 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4526 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4527 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4528 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4529 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4530 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4531 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4532 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4533 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4534 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4535 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4536 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4537 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4538 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4539 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4540 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4541 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4542 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4543 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4544 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4545 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4546 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4547 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4548 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4549 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4550 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4551 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4552 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4553 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4554 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4555 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4556 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4557 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4558 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4559 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4560 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4561 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4562 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4563 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4564 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4565 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4566 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4567 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4568 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4569 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4570 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4571 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4572 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4573 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4574 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4575 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4576 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4577 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4578 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4579 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4580 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4581 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4582 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4583 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4584 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4585 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4586 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4587 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4588 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4589 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4590 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4591 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4592 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4593 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4594 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4595 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4596 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4597 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4598 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4599 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4600 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4601 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4602 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4603 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4604 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4605 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4606 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4607 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4608 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4609 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4610 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4611 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4612 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4613 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4614 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4615 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4616 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4617 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4618 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4619 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4620 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4621 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4622 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4623 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4624 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4625 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4626 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4627 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4628 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4629 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4630 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4631 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4632 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4633 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4634 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4635 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4636 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4637 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4638 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4639 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4640 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4641 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4642 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4643 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4644 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4645 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4646 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4647 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4648 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4649 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4650 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4651 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4652 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4653 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4654 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4655 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4656 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4657 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4658 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4659 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4660 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4661 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4662 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4663 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4664 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4665 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4666 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4667 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4668 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4669 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4670 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4671 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4672 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4673 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4674 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4675 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4676 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4677 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4678 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4679 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4680 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4681 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4682 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4683 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4684 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4685 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4686 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4687 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4688 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4689 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4690 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4691 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4692 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4693 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4694 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4695 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4696 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4697 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4698 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4699 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4700 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4701 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4702 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4703 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4704 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4705 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4706 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4707 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4708 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4709 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4710 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4711 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4712 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4713 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4714 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4715 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4716 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4717 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4718 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4719 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4720 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4721 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4722 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4723 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4724 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4725 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4726 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4727 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4728 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4729 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4730 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4731 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4732 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4733 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4734 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4735 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4736 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4737 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4738 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4739 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4740 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4741 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4742 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4743 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4744 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4745 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4746 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4747 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4748 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4749 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4750 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4751 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4752 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4753 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4754 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4755 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4756 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4757 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4758 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4759 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4760 | 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , | |
| 4761 | }; | |
| 4762 | ||
| 4763 | ||
| 4233 | 4764 | /* 317-0034 FD1089B */ |
| 4234 | 4765 | static const UINT8 key_0034[0x2000] = |
| 4235 | 4766 | { |
| r1490 | r1491 | |
| 6595 | 7126 | sys16_decrypt(key_0034,FD1089B); |
| 6596 | 7127 | } |
| 6597 | 7128 | |
| 7129 | void fd1089_decrypt_0037(void) | |
| 7130 | { | |
| 7131 | sys16_decrypt(key_0037,FD1089B); | |
| 7132 | } | |
| 7133 | ||
| 6598 | 7134 | void fd1089_decrypt_0167(void) |
| 6599 | 7135 | { |
| 6600 | 7136 | sys16_decrypt(key_0167,FD1089A); |
| r1490 | r1491 | |
|---|---|---|
| 170 | 170 | static WRITE16_HANDLER( term2_sound_w ) |
| 171 | 171 | { |
| 172 | 172 | if (offset == 0) |
| 173 | term2_analog_select = (data >> | |
| 173 | term2_analog_select = (data >> 12 | |
| 174 | 174 | |
| 175 | williams_adpcm_reset_w((~data & 0x100) >> 1); | |
| 175 | 176 | williams_adpcm_data_w(data); |
| 176 | 177 | } |
| 177 | 178 | |
| r1490 | r1491 | |
| 330 | 331 | } |
| 331 | 332 | |
| 332 | 333 | |
| 334 | ||
| 333 | 335 | /************************************* |
| 334 | 336 | * |
| 335 | 337 | * Y-unit init (CVSD) |
| r1490 | r1491 | |
| 563 | 565 | |
| 564 | 566 | case SOUND_CVSD_SMALL: |
| 565 | 567 | case SOUND_CVSD: |
| 568 | williams_cvsd_reset_w((~data & 0x100) >> 8); | |
| 566 | 569 | williams_cvsd_data_w((data & 0xff) | ((data & 0x200) >> 1)); |
| 567 | 570 | break; |
| 568 | 571 | |
| 569 | 572 | case SOUND_ADPCM: |
| 573 | williams_adpcm_reset_w((~data & 0x100) >> 8); | |
| 570 | 574 | williams_adpcm_data_w(data); |
| 571 | 575 | break; |
| 572 | 576 |
| r1490 | r1491 | |
|---|---|---|
| 1237 | 1237 | cr3 = cr4 = 0; |
| 1238 | 1238 | |
| 1239 | 1239 | // first 4 bytes = FAD |
| 1240 | finfbuf[0] = | |
| 1240 | finfbuf[0] = | |
| 1241 | 1241 | finfbuf[1] = (curdir[temp].firstfad>>16)&0xff; |
| 1242 | 1242 | finfbuf[2] = (curdir[temp].firstfad>>8)&0xff; |
| 1243 | 1243 | finfbuf[3] = (curdir[temp].firstfad&0xff); |
| r1490 | r1491 | |
| 1557 | 1557 | free((void *)curdir); |
| 1558 | 1558 | curdir = (direntryT *)NULL; |
| 1559 | 1559 | } |
| 1560 | ||
| 1561 | if (cdrom) | |
| 1562 | { | |
| 1563 | cdrom_close(cdrom); | |
| 1564 | cdrom = (cdrom_file *)NULL; | |
| 1565 | } | |
| 1560 | 1566 | } |
| 1561 | 1567 | |
| 1562 | 1568 | static void cd_readTOC(void) |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | #include "mamecore.h" |
| 8 | 8 | #include "driver.h" |
| 9 | 9 | #include "dc.h" |
| 10 | #include "cpu/sh4/sh4.h" | |
| 10 | 11 | |
| 11 | 12 | #define DEBUG_REGISTERS (1) |
| 12 | 13 | |
| r1490 | r1491 | |
| 115 | 116 | MAPLE_STATUS = 0x21, |
| 116 | 117 | }; |
| 117 | 118 | |
| 118 | ||
| 119 | ||
| 119 | 120 | static UINT32 maple_regs[0x100/4]; |
| 121 | static UINT32 dc_rtcregister[4]; | |
| 120 | 122 | |
| 123 | static UINT32 maple0x82answer[]= | |
| 124 | { | |
| 125 | 0x07200083,0x2d353133,0x39343136,0x20202020,0x59504f43,0x48474952,0x45532054,0x45204147, | |
| 126 | 0x05200083,0x5245544e,0x53495250,0x43205345,0x544c2c4f,0x20202e44,0x38393931,0x5c525043 | |
| 127 | }; | |
| 128 | ||
| 121 | 129 | // register decode helper |
| 122 | 130 | |
| 123 | 131 | INLINE int decode_reg_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift) |
| r1490 | r1491 | |
| 126 | 134 | |
| 127 | 135 | *shift = 0; |
| 128 | 136 | |
| 137 | // non 32-bit accesses have not yet been seen here, we need to know when they are | |
| 138 | if ((mem_mask != U64(0x00000000ffffffff)) && (mem_mask != U64(0xffffffff00000000))) | |
| 139 | { | |
| 140 | assert_always(0, "Wrong mask!\n"); | |
| 141 | } | |
| 142 | ||
| 129 | 143 | if (mem_mask == U64(0x00000000ffffffff)) |
| 130 | 144 | { |
| 131 | 145 | reg++; |
| r1490 | r1491 | |
| 135 | 149 | return reg; |
| 136 | 150 | } |
| 137 | 151 | |
| 138 | // I/O functions | |
| 152 | int compute_interrupt_level(void) | |
| 153 | { | |
| 154 | UINT32 ln,lx,le; | |
| 139 | 155 | |
| 156 | ln=sysctrl_regs[SB_ISTNRM] & sysctrl_regs[SB_IML6NRM]; | |
| 157 | lx=sysctrl_regs[SB_ISTEXT] & sysctrl_regs[SB_IML6EXT]; | |
| 158 | le=sysctrl_regs[SB_ISTERR] & sysctrl_regs[SB_IML6ERR]; | |
| 159 | if (ln | lx | le) | |
| 160 | { | |
| 161 | return 6; | |
| 162 | } | |
| 163 | ||
| 164 | ln=sysctrl_regs[SB_ISTNRM] & sysctrl_regs[SB_IML4NRM]; | |
| 165 | lx=sysctrl_regs[SB_ISTEXT] & sysctrl_regs[SB_IML4EXT]; | |
| 166 | le=sysctrl_regs[SB_ISTERR] & sysctrl_regs[SB_IML4ERR]; | |
| 167 | if (ln | lx | le) | |
| 168 | { | |
| 169 | return 4; | |
| 170 | } | |
| 171 | ||
| 172 | ln=sysctrl_regs[SB_ISTNRM] & sysctrl_regs[SB_IML2NRM]; | |
| 173 | lx=sysctrl_regs[SB_ISTEXT] & sysctrl_regs[SB_IML2EXT]; | |
| 174 | le=sysctrl_regs[SB_ISTERR] & sysctrl_regs[SB_IML2ERR]; | |
| 175 | if (ln | lx | le) | |
| 176 | { | |
| 177 | return 2; | |
| 178 | } | |
| 179 | ||
| 180 | return 0; | |
| 181 | } | |
| 182 | ||
| 183 | void update_interrupt_status(void) | |
| 184 | { | |
| 185 | int level; | |
| 186 | ||
| 187 | if (sysctrl_regs[SB_ISTERR]) | |
| 188 | { | |
| 189 | sysctrl_regs[SB_ISTNRM] |= 0x80000000; | |
| 190 | } | |
| 191 | else | |
| 192 | { | |
| 193 | sysctrl_regs[SB_ISTNRM] &= 0x7fffffff; | |
| 194 | } | |
| 195 | ||
| 196 | if (sysctrl_regs[SB_ISTEXT]) | |
| 197 | { | |
| 198 | sysctrl_regs[SB_ISTNRM] |= 0x40000000; | |
| 199 | } | |
| 200 | else | |
| 201 | { | |
| 202 | sysctrl_regs[SB_ISTNRM] &= 0xbfffffff; | |
| 203 | } | |
| 204 | ||
| 205 | level=compute_interrupt_level(); | |
| 206 | cpunum_set_info_int(0,CPUINFO_INT_SH4_IRLn_INPUT,15-level); | |
| 207 | } | |
| 208 | ||
| 140 | 209 | READ64_HANDLER( dc_sysctrl_r ) |
| 141 | 210 | { |
| 142 | 211 | int reg; |
| r1490 | r1491 | |
| 145 | 214 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 146 | 215 | |
| 147 | 216 | #if DEBUG_SYSCTRL |
| 148 | mame_printf_verbose("SYSCTRL: read %x @ %x (reg %x: %s), mask %llx (PC=%x)\n", sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, activecpu_get_pc()); | |
| 217 | if ((reg != 0x40) && (reg != 0x42)) // filter out IRQ status reads | |
| 218 | { | |
| 219 | mame_printf_verbose("SYSCTRL: read %x @ %x (reg %x: %s), mask %llx (PC=%x)\n", sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, activecpu_get_pc()); | |
| 220 | } | |
| 149 | 221 | #endif |
| 150 | 222 | |
| 151 | 223 | return (UINT64)sysctrl_regs[reg] << shift; |
| r1490 | r1491 | |
| 155 | 227 | { |
| 156 | 228 | int reg; |
| 157 | 229 | UINT64 shift; |
| 230 | UINT32 old,dat; | |
| 231 | struct sh4_ddt_dma ddtdata; | |
| 158 | 232 | |
| 159 | 233 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 234 | dat = (UINT32)(data >> shift); | |
| 235 | old = sysctrl_regs[reg]; | |
| 236 | sysctrl_regs[reg] = dat; // 5f6800+off*4=dat | |
| 237 | switch (reg) | |
| 238 | { | |
| 239 | case SB_C2DST: | |
| 240 | ddtdata.destination=sysctrl_regs[SB_C2DSTAT]; | |
| 241 | ddtdata.length=sysctrl_regs[SB_C2DLEN]; | |
| 242 | ddtdata.size=1; | |
| 243 | ddtdata.direction=0; | |
| 244 | ddtdata.channel=2; | |
| 245 | ddtdata.mode=25; //011001 | |
| 246 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); | |
| 247 | sysctrl_regs[SB_C2DSTAT]=sysctrl_regs[SB_C2DSTAT]+ddtdata.length; | |
| 248 | sysctrl_regs[SB_C2DLEN]=0; | |
| 249 | sysctrl_regs[SB_C2DST]=0; | |
| 250 | sysctrl_regs[SB_ISTNRM] |= (1 << 19); | |
| 251 | break; | |
| 160 | 252 | |
| 253 | case SB_ISTNRM: | |
| 254 | sysctrl_regs[SB_ISTNRM] = old & ~(dat | 0xC0000000); // bits 31,30 ro | |
| 255 | break; | |
| 256 | ||
| 257 | case SB_ISTEXT: | |
| 258 | sysctrl_regs[SB_ISTEXT] = old; | |
| 259 | break; | |
| 260 | ||
| 261 | case SB_ISTERR: | |
| 262 | sysctrl_regs[SB_ISTERR] = old & ~dat; | |
| 263 | break; | |
| 264 | } | |
| 265 | update_interrupt_status(); | |
| 266 | ||
| 161 | 267 | #if DEBUG_SYSCTRL |
| 162 | mame_printf_verbose("SYSCTRL: write %llx to %x (reg %x: %s), mask %llx\n", data>>shift, offset, reg, sysctrl_names[reg], mem_mask); | |
| 268 | if ((reg != 0x40) && (reg != 0x42)) // filter out IRQ acks | |
| 269 | { | |
| 270 | mame_printf_verbose("SYSCTRL: write %llx to %x (reg %x: %s), mask %llx\n", data>>shift, offset, reg, sysctrl_names[reg], mem_mask); | |
| 271 | } | |
| 163 | 272 | #endif |
| 164 | ||
| 165 | sysctrl_regs[reg] |= data >> shift; | |
| 166 | 273 | } |
| 167 | 274 | |
| 168 | 275 | READ64_HANDLER( dc_maple_r ) |
| r1490 | r1491 | |
| 179 | 286 | { |
| 180 | 287 | int reg; |
| 181 | 288 | UINT64 shift; |
| 289 | UINT32 old,dat; | |
| 290 | struct sh4_ddt_dma ddtdata; | |
| 291 | UINT32 buff[512]; | |
| 292 | UINT32 endflag,port,pattern,length,command,dap,sap,destination; | |
| 293 | int chk; | |
| 294 | int a; | |
| 182 | 295 | |
| 183 | 296 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 297 | dat = (UINT32)(data >> shift); | |
| 298 | old = maple_regs[reg]; | |
| 184 | 299 | |
| 185 | 300 | #if DEBUG_MAPLE |
| 186 | 301 | mame_printf_verbose("MAPLE: write %llx to %x (reg %x: %s), mask %llx\n", data >> shift, offset, reg, maple_names[reg], mem_mask); |
| 187 | 302 | #endif |
| 188 | 303 | |
| 189 | maple_regs[reg] |= data >> shift; | |
| 304 | maple_regs[reg] = dat; // 5f6c00+reg*4=dat | |
| 305 | switch (reg) | |
| 306 | { | |
| 307 | case SB_MDST: | |
| 308 | maple_regs[reg] = old; | |
| 309 | if (!(old & 1) && (dat & 1)) // 0 -> 1 | |
| 310 | { | |
| 311 | if (!(maple_regs[SB_MDTSEL] & 1)) | |
| 312 | { | |
| 313 | maple_regs[reg] = 1; | |
| 314 | dat=maple_regs[SB_MDSTAR]; | |
| 315 | while (1) // do transfers | |
| 316 | { | |
| 317 | ddtdata.source=dat; | |
| 318 | ddtdata.length=3; | |
| 319 | ddtdata.size=4; | |
| 320 | ddtdata.buffer=buff; | |
| 321 | ddtdata.direction=0; | |
| 322 | ddtdata.channel= -1; | |
| 323 | ddtdata.mode= -1; | |
| 324 | cpunum_set_info_ptr(0, CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, &ddtdata); | |
| 325 | ||
| 326 | maple_regs[reg] = 0; | |
| 327 | endflag=buff[0] & 0x80000000; | |
| 328 | port=(buff[0] >> 16) & 3; | |
| 329 | pattern=(buff[0] >> 8) & 7; | |
| 330 | length=buff[0] & 255; | |
| 331 | destination=buff[1]; | |
| 332 | command=buff[2] & 255; | |
| 333 | dap=(buff[2] >> 8) & 255; | |
| 334 | sap=(buff[2] >> 16) & 255; | |
| 335 | buff[0]=0; | |
| 336 | ddtdata.size=4; | |
| 337 | ||
| 338 | if (pattern == 0) | |
| 339 | { | |
| 340 | switch (command) | |
| 341 | { | |
| 342 | case 1: | |
| 343 | ddtdata.length=1; | |
| 344 | break; | |
| 345 | case 3: | |
| 346 | ddtdata.length=1; | |
| 347 | break; | |
| 348 | case 0x80: // compute checksum | |
| 349 | ddtdata.length=length; | |
| 350 | ddtdata.direction=0; | |
| 351 | ddtdata.channel= -1; | |
| 352 | ddtdata.mode=-1; | |
| 353 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); | |
| 354 | chk=0; | |
| 355 | for (a=1;a < length;a++) | |
| 356 | { | |
| 357 | chk=chk+(signed char)(buff[a] & 255); | |
| 358 | chk=chk+(signed char)((buff[a] >> 8) & 255); | |
| 359 | chk=chk+(signed char)((buff[a] >> 16) & 255); | |
| 360 | chk=chk+(signed char)((buff[a] >> 24) & 255); | |
| 361 | } | |
| 362 | chk=chk+(buff[0] & 255); | |
| 363 | chk=chk+((buff[0] >> 8) & 255); | |
| 364 | chk=chk+((buff[0] >> 16) & 255); | |
| 365 | chk=chk+((buff[0] >> 24) & 255); | |
| 366 | buff[1]=chk; | |
| 367 | ddtdata.length=2; | |
| 368 | break; | |
| 369 | case 0x82: // get license string | |
| 370 | for (a=0;a < 16;a++) | |
| 371 | { | |
| 372 | buff[a]=maple0x82answer[a]; | |
| 373 | } | |
| 374 | ddtdata.length=16; | |
| 375 | break; | |
| 376 | case 0x86: | |
| 377 | ddtdata.length=length; | |
| 378 | ddtdata.direction=0; | |
| 379 | ddtdata.channel= -1; | |
| 380 | ddtdata.mode=-1; | |
| 381 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); | |
| 382 | ||
| 383 | if ((buff[0] & 0xff) == 3) | |
| 384 | { | |
| 385 | buff[1]=0x14131211; | |
| 386 | for (a=0;a < 31;a++) | |
| 387 | { | |
| 388 | buff[2+a]=buff[1+a]+0x04040404; | |
| 389 | } | |
| 390 | buff[1]=0x1413b1b9; // put checksum | |
| 391 | buff[5]=0x8ab82221; // put checksum | |
| 392 | ddtdata.length=0x84/4; | |
| 393 | } | |
| 394 | else if (((buff[0] & 0xff) == 0x31) || ((buff[0] & 0xff) == 0xb) || ((buff[0] & 0xff) == 0x1)) | |
| 395 | { | |
| 396 | ddtdata.length=1; | |
| 397 | } | |
| 398 | else if ((buff[0] & 0xff) == 0x17) // send command into jvs serial bus !!! | |
| 399 | { | |
| 400 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f0,d9, 0 | |
| 401 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f1,01, 0 | |
| 402 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,01,1,10, 01,0 | |
| 403 | switch (buff[2] & 0xff) // jvs command | |
| 404 | { | |
| 405 | case 0xf0: | |
| 406 | case 0xf1: | |
| 407 | case 0x10: | |
| 408 | break; | |
| 409 | } | |
| 410 | buff[1]=0xe4e3e2e1; | |
| 411 | ddtdata.length=2; | |
| 412 | } | |
| 413 | else if ((buff[0] & 0xff) == 0x15) | |
| 414 | { | |
| 415 | // 15,0,0,0 | |
| 416 | buff[1]=0xA4A3A2A1; | |
| 417 | for (a=0;a < 7;a++) | |
| 418 | { | |
| 419 | buff[2+a]=buff[1+a]+0x04040404; | |
| 420 | } | |
| 421 | buff[1]=buff[1] | 0x0c000000; | |
| 422 | buff[2]=buff[2] & 0xFFCFFFFF; | |
| 423 | ||
| 424 | a=readinputport(0); // mettere qui tasti | |
| 425 | buff[2]=buff[2] | (a << 20); | |
| 426 | *(((unsigned char *)buff)+0x18)=0; | |
| 427 | *(((unsigned char *)buff)+0x1d)=1; | |
| 428 | *(((unsigned char *)buff)+0x16)=0x8e; | |
| 429 | ddtdata.length=9; | |
| 430 | } | |
| 431 | else if ((buff[0] & 0xff) == 0x21) | |
| 432 | { | |
| 433 | // 21,*c295407 (77),*c295404,*c295405,*c295406,0,1,0 | |
| 434 | ddtdata.length=1; | |
| 435 | } | |
| 436 | else //0x27 | |
| 437 | { | |
| 438 | ddtdata.length=1; | |
| 439 | } | |
| 440 | break; | |
| 441 | } | |
| 442 | } | |
| 443 | ddtdata.destination=destination; | |
| 444 | ddtdata.buffer=buff; | |
| 445 | ddtdata.direction=1; | |
| 446 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); | |
| 447 | ||
| 448 | if (endflag) | |
| 449 | { | |
| 450 | break; | |
| 451 | } | |
| 452 | // skip fixed packet header | |
| 453 | dat += 8; | |
| 454 | // skip transfer data | |
| 455 | dat += ((command & 0xff) + 1) * 4; | |
| 456 | } // do transfers | |
| 457 | maple_regs[reg] = 0; | |
| 458 | } | |
| 459 | } | |
| 460 | break; | |
| 461 | } | |
| 462 | #if DEBUG_MAPLE | |
| 463 | mame_printf_verbose("MAPLE: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 464 | #endif | |
| 190 | 465 | } |
| 191 | 466 | |
| 192 | 467 | READ64_HANDLER( dc_gdrom_r ) |
| 193 | 468 | { |
| 469 | UINT32 off; | |
| 470 | ||
| 471 | if ((int)mem_mask & 1) | |
| 472 | { | |
| 473 | off=(offset << 1) | 1; | |
| 474 | } | |
| 475 | else | |
| 476 | { | |
| 477 | off=offset << 1; | |
| 478 | } | |
| 479 | ||
| 480 | if (off*4 == 0x4c) | |
| 481 | return -1; | |
| 482 | if (off*4 == 8) | |
| 483 | return 0; | |
| 484 | ||
| 194 | 485 | return 0; |
| 195 | 486 | } |
| 196 | 487 | |
| 197 | 488 | WRITE64_HANDLER( dc_gdrom_w ) |
| 198 | 489 | { |
| 490 | UINT32 dat,off; | |
| 491 | ||
| 492 | if ((int)mem_mask & 1) | |
| 493 | { | |
| 494 | dat=(UINT32)(data >> 32); | |
| 495 | off=(offset << 1) | 1; | |
| 496 | } | |
| 497 | else | |
| 498 | { | |
| 499 | dat=(UINT32)data; | |
| 500 | off=offset << 1; | |
| 501 | } | |
| 502 | ||
| 199 | 503 | mame_printf_verbose("GDROM: write %llx to %x, mask %llx\n", data, offset, mem_mask); |
| 200 | 504 | } |
| 201 | 505 | |
| r1490 | r1491 | |
| 236 | 540 | |
| 237 | 541 | WRITE64_HANDLER( dc_rtc_w ) |
| 238 | 542 | { |
| 543 | UINT32 dat,off; | |
| 544 | UINT32 old; | |
| 545 | ||
| 546 | if ((int)mem_mask & 1) { | |
| 547 | dat=(UINT32)(data >> 32); | |
| 548 | off=(offset << 1) | 1; | |
| 549 | } else { | |
| 550 | dat=(UINT32)data; | |
| 551 | off=offset << 1; | |
| 552 | } | |
| 553 | old = dc_rtcregister[off]; | |
| 554 | dc_rtcregister[off] = dat & 0xFFFF; // 5f6c00+off*4=dat | |
| 555 | /* switch (off) | |
| 556 | { | |
| 557 | case RTC1: | |
| 558 | if (dc_rtcregister[RTC3]) | |
| 559 | dc_rtcregister[RTC3] = 0; | |
| 560 | else | |
| 561 | dc_rtcregister[off] = old; | |
| 562 | break; | |
| 563 | case RTC2: | |
| 564 | if (dc_rtcregister[RTC3] == 0) | |
| 565 | dc_rtcregister[off] = old; | |
| 566 | break; | |
| 567 | case RTC3: | |
| 568 | dc_rtcregister[RTC3] &= 1; | |
| 569 | break; | |
| 570 | }*/ | |
| 239 | 571 | mame_printf_verbose("RTC: write %llx to %x, mask %llx\n", data, offset, mem_mask); |
| 240 | 572 | } |
| 241 | 573 | |
| 242 | ||
| 574 | /*static | |
| 243 | 575 | { |
| 244 | return 0; | |
| 245 | } | |
| 576 | dc_rtcregister[RTC2] = (dc_rtcregister[RTC2] + 1) & 0xFFFF; | |
| 577 | if (dc_rtcregister[RTC2] == 0) | |
| 578 | dc_rtcregister[RTC1] = (dc_rtcregister[RTC1] + 1) & 0xFFFF; | |
| 579 | }*/ | |
| 246 | 580 | |
| 247 | WRITE64_HANDLER( dc_aica_reg_w ) | |
| 248 | { | |
| 249 | mame_printf_verbose("AICA REG: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 250 | } | |
| 251 | ||
| 252 | 581 | MACHINE_RESET( dc ) |
| 253 | 582 | { |
| 254 | 583 | /* halt the ARM7 */ |
| r1490 | r1491 | |
| 256 | 585 | |
| 257 | 586 | memset(sysctrl_regs, 0, sizeof(sysctrl_regs)); |
| 258 | 587 | memset(maple_regs, 0, sizeof(maple_regs)); |
| 588 | memset(dc_rtcregister, 0, sizeof(dc_rtcregister)); | |
| 259 | 589 | |
| 260 | sysctrl_regs[ | |
| 590 | sysctrl_regs[SB_SBREV] = 0x0b | |
| 261 | 591 | } |
| 262 | 592 | |
| 263 | // called at vblank | |
| 264 | void dc_vblank( void ) | |
| 593 | READ64_HANDLER( dc_aica_reg_r ) | |
| 265 | 594 | { |
| 266 | // is system control set for automatic polling on VBL? | |
| 267 | if ((maple_regs[MAPLE_SYSCTRL] & 0xffff0000) == 0x3a980000) | |
| 268 | { | |
| 269 | // is enabled? | |
| 270 | if (maple_regs[MAPLE_DMAENABLE] == 1) | |
| 271 | { | |
| 272 | // is started? | |
| 273 | if (maple_regs[MAPLE_DMASTART] == 1) | |
| 274 | { | |
| 275 | UINT32 cmd, dest, addr = maple_regs[MAPLE_DMACMD]; | |
| 595 | int reg; | |
| 596 | UINT64 shift; | |
| 276 | 597 | |
| 277 | // process the command list | |
| 278 | // first word: bit 31 set = last command in list, 16-17 = port, 8-10 = pattern, 0-7 = xfer length | |
| 279 | // second word: destination address | |
| 280 | // third word: what to send to port A | |
| 281 | cmd = 0; | |
| 282 | while (!(cmd & 0x80000000)) | |
| 283 | { | |
| 284 | // read command word | |
| 285 | cmd = program_read_dword(addr); | |
| 598 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 286 | 599 | |
| 287 | dest = program_read_dword(addr+4); | |
| 600 | // logerror("dc_aica_reg_r: Unmapped read %08x\n", 0x700000+reg*4); | |
| 601 | return 0; | |
| 602 | } | |
| 288 | 603 | |
| 289 | // just indicate "no connection" for now | |
| 290 | program_write_dword(dest, 0); | |
| 291 | program_write_dword(dest+4, 0xffffffff); | |
| 604 | WRITE64_HANDLER( dc_aica_reg_w ) | |
| 605 | { | |
| 606 | int reg; | |
| 607 | UINT64 shift; | |
| 608 | UINT32 dat; | |
| 292 | 609 | |
| 293 | // skip fixed packet header | |
| 294 | addr += 8; | |
| 295 | // skip transfer data | |
| 296 | addr += ((cmd & 0xff) + 1) * 4; | |
| 297 | } | |
| 610 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 611 | dat = (UINT32)(data >> shift); | |
| 298 | 612 | |
| 299 | ||
| 300 | #if DEBUG_MAPLE | |
| 301 | mame_printf_verbose("MAPLE: automatic read, table @ %x\n", addr); | |
| 302 | #endif | |
| 303 | ||
| 304 | // indicate transfer completed | |
| 305 | maple_regs[MAPLE_DMASTART] = 0; | |
| 306 | } | |
| 613 | if (reg == (0x2c00/4)) | |
| 614 | { | |
| 615 | if (dat & 1) | |
| 616 | { | |
| 617 | /* halt the ARM7 */ | |
| 618 | cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 307 | 619 | } |
| 308 | } | |
| 620 | else | |
| 621 | { | |
| 622 | /* it's alive ! */ | |
| 623 | cpunum_set_input_line(1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 624 | } | |
| 625 | } | |
| 626 | mame_printf_verbose("AICA REG: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 309 | 627 | } |
| 310 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | FD1094 decryption helper routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | |
| 5 | 5 | static UINT8 from_main,from_mcu; |
| 6 | static int mcu_sent | |
| 6 | static int mcu_sent | |
| 7 | 7 | |
| 8 | MACHINE_RESET( buggychl ) | |
| 9 | { | |
| 10 | mcu_sent = 0; | |
| 11 | main_sent = 0; | |
| 12 | cpunum_set_input_line(2,0,CLEAR_LINE); | |
| 13 | } | |
| 8 | 14 | |
| 15 | ||
| 9 | 16 | /*************************************************************************** |
| 10 | 17 | |
| 11 | 18 | Buggy CHallenge 68705 protection interface |
| r1490 | r1491 | |
|---|---|---|
| 62 | 62 | 317-0042 Opa Opa B31FD0 1C00 |
| 63 | 63 | 317-0043 Wonder Boy Monster Land 640708 1C00 |
| 64 | 64 | 317-0054 Shinobi (sound CPU) NEC MC-8123B 652 088992 1800 |
| 65 | 317-0057 Fantasy Zone 2 ADFACE | |
| 65 | 317-0057 Fantasy Zone 2 ADFACE | |
| 66 | 66 | 317-0064 Ufo Senshi Yohko Chan 880603 1C00 |
| 67 | 67 | 317-0066 Altered Beast (sound CPU) ED8600 1800 |
| 68 | 68 | 317-5012 Ganbare Chinsan Ooshoubu NEC MC-8123A 804B54 1C00 |
| r1490 | r1491 | |
| 77 | 77 | |
| 78 | 78 | static int decrypt_type0(int val,int param,int swap) |
| 79 | 79 | { |
| 80 | int a = val; | |
| 80 | if (swap == 0) val = BITSWAP8(val,7,5,3,1,2,0,6,4); | |
| 81 | if (swap == 1) val = BITSWAP8(val,5,3,7,2,1,0,4,6); | |
| 82 | if (swap == 2) val = BITSWAP8(val,0,3,4,6,7,1,5,2); | |
| 83 | if (swap == 3) val = BITSWAP8(val,0,7,3,2,6,4,1,5); | |
| 81 | 84 | |
| 82 | if (swap == 1) a = BITSWAP8(a,5,4,3,6,7,1,2,0); | |
| 83 | if (swap == 2) a = BITSWAP8(a,0,5,3,2,4,7,6,1); | |
| 84 | if (swap == 3) a = BITSWAP8(a,0,1,7,5,3,6,2,4); | |
| 85 | if (BIT(param,3) && BIT(val,7)) | |
| 86 | val ^= (1<<5)|(1<<3)|(1<<0); | |
| 85 | 87 | |
| 86 | val = 0x1c; | |
| 87 | if (BIT(a,0)) val ^= 0x23; | |
| 88 | if (BIT(a,1)) val ^= 0x08; | |
| 89 | if (BIT(a,2)) val ^= 0x04; | |
| 90 | if (BIT(a,3)) val ^= 0x20; | |
| 91 | if (BIT(a,4)) val ^= 0x01; | |
| 92 | if (BIT(a,6)) val ^= 0x10; | |
| 93 | if (BIT(a,5)) | |
| 94 | { | |
| 95 | val ^= 0x73; | |
| 88 | if (BIT(param,2) && BIT(val,6)) | |
| 89 | val ^= (1<<7)|(1<<2)|(1<<1); | |
| 96 | 90 | |
| 97 | if (param & 0x40) | |
| 98 | { | |
| 99 | val ^= 0xb3; | |
| 100 | if (param & 0x01) val ^= 0x40; | |
| 101 | if (param & 0x04) val ^= 0x40; | |
| 102 | if (param & 0x08) val ^= 0x40; | |
| 103 | } | |
| 104 | if (~param & 0x02) | |
| 105 | { | |
| 106 | val ^= 0xb3; | |
| 107 | if (param & 0x01) val ^= 0x40; | |
| 108 | if (param & 0x04) val ^= 0x40; | |
| 109 | if (param & 0x08) val ^= 0x40; | |
| 110 | } | |
| 111 | if (param & 0x01) | |
| 112 | { | |
| 113 | val ^= 0xb3; | |
| 114 | if (param & 0x01) val ^= 0x40; | |
| 115 | if (param & 0x04) val ^= 0x40; | |
| 116 | if (param & 0x08) val ^= 0x40; | |
| 117 | } | |
| 118 | } | |
| 91 | if (BIT(val,6)) val ^= (1<<7); | |
| 119 | 92 | |
| 120 | if (BIT(a,7)) | |
| 121 | { | |
| 122 | val ^= 0x80; | |
| 93 | if (BIT(param,1) && BIT(val,7)) | |
| 94 | val ^= (1<<6); | |
| 123 | 95 | |
| 124 | if (param & 0x01) val ^= 0x40; | |
| 125 | if (param & 0x02) val ^= 0x25; | |
| 126 | if (param & 0x04) val ^= 0x40; | |
| 127 | if (param & 0x08) val ^= 0x40; | |
| 128 | if (param & 0x40) val ^= 0x25; | |
| 129 | if (param & 0x80) val ^= 0x25; | |
| 130 | } | |
| 96 | if (BIT(val,2)) val ^= (1<<5)|(1<<0); | |
| 131 | 97 | |
| 132 | if (param & 0x01) val ^= 0xe3; | |
| 133 | if (param & 0x02) val ^= 0x23; | |
| 134 | if (param & 0x04) val ^= 0xc0; | |
| 135 | if (param & 0x08) val ^= 0xc0; | |
| 136 | if (param & 0x40) val ^= 0x23; | |
| 98 | val ^= (1<<4)|(1<<3)|(1<<1); | |
| 137 | 99 | |
| 138 | if (param & 0x01) | |
| 139 | val ^= 0x21; | |
| 140 | else | |
| 141 | val = BITSWAP8(val,7,6,5,3,2,1,4,0); | |
| 100 | if (BIT(param,2)) val ^= (1<<5)|(1<<2)|(1<<0); | |
| 101 | if (BIT(param,1)) val ^= (1<<7)|(1<<6); | |
| 102 | if (BIT(param,0)) val ^= (1<<5)|(1<<0); | |
| 142 | 103 | |
| 104 | if (BIT(param,0)) val = BITSWAP8(val,7,6,5,1,4,3,2,0); | |
| 105 | ||
| 143 | 106 | return val; |
| 144 | 107 | } |
| 145 | 108 | |
| 146 | static int decrypt_type1(int val,int param,int swap) | |
| 109 | ||
| 110 | static int decrypt_type1a(int val,int param,int swap) | |
| 147 | 111 | { |
| 148 | if (BIT(~param,2) ^ BIT(param,0)) | |
| 149 | { | |
| 150 | int a = val; | |
| 112 | if (swap == 0) val = BITSWAP8(val,4,2,6,5,3,7,1,0); | |
| 113 | if (swap == 1) val = BITSWAP8(val,6,0,5,4,3,2,1,7); | |
| 114 | if (swap == 2) val = BITSWAP8(val,2,3,6,1,4,0,7,5); | |
| 115 | if (swap == 3) val = BITSWAP8(val,6,5,1,3,2,7,0,4); | |
| 151 | 116 | |
| 152 | if (swap == 0) a = BITSWAP8(a,7,4,2,0,5,3,6,1); | |
| 153 | if (swap == 1) a = BITSWAP8(a,2,6,0,7,4,3,5,1); | |
| 154 | if (swap == 2) a = BITSWAP8(a,0,2,3,5,1,4,6,7); | |
| 117 | if (BIT(param,2)) val = BITSWAP8(val,7,6,1,5,3,2,4,0); | |
| 155 | 118 | |
| 156 | if (BIT(~param,6) ^ BIT(param,1) ^ BIT(param,0)) | |
| 157 | a = BITSWAP8(a,7,6,5,4,0,2,3,1); | |
| 119 | if (BIT(val,1)) val ^= (1<<0); | |
| 120 | if (BIT(val,6)) val ^= (1<<3); | |
| 121 | if (BIT(val,7)) val ^= (1<<6)|(1<<3); | |
| 122 | if (BIT(val,2)) val ^= (1<<6)|(1<<3)|(1<<1); | |
| 123 | if (BIT(val,4)) val ^= (1<<7)|(1<<6)|(1<<2); | |
| 158 | 124 | |
| 159 | val = 0x4b; | |
| 160 | if (BIT(a,0)) val ^= 0x20; | |
| 161 | if (BIT(a,1)) val ^= 0xd4; | |
| 162 | if (BIT(a,2)) val ^= 0x08; | |
| 163 | if (BIT(a,3)) val ^= 0x03; | |
| 164 | if (BIT(a,4)) val ^= 0x01; | |
| 165 | if (BIT(a,5)) val ^= 0x48; | |
| 166 | if (BIT(a,6)) val ^= 0xd8; | |
| 167 | if (BIT(a,7)) val ^= 0x5e; | |
| 125 | if (BIT(val,7) ^ BIT(val,2)) | |
| 126 | val ^= (1<<4); | |
| 168 | 127 | |
| 169 | if (param & 0x01) val ^= 0x48; | |
| 170 | if (param & 0x02) val ^= 0x84; | |
| 171 | if (param & 0x04) val ^= 0x48; | |
| 172 | if (param & 0x08) val ^= 0x48; | |
| 173 | if (param & 0x40) val ^= 0x84; | |
| 174 | if (param & 0x80) val ^= 0x84; | |
| 128 | val ^= (1<<6)|(1<<3)|(1<<1)|(1<<0); | |
| 175 | 129 | |
| 176 | if (param & 0x01) val = BITSWAP8(val,7,6,1,4,3,2,5,0); | |
| 130 | if (BIT(param,3)) val ^= (1<<7)|(1<<2); | |
| 131 | if (BIT(param,1)) val ^= (1<<6)|(1<<3); | |
| 177 | 132 | |
| 178 | return val; | |
| 179 | } | |
| 180 | else | |
| 181 | { | |
| 182 | int a = val; | |
| 133 | if (BIT(param,0)) val = BITSWAP8(val,7,6,1,4,3,2,5,0); | |
| 183 | 134 | |
| 184 | if (swap == 1) a = BITSWAP8(a,3,4,7,6,5,1,2,0); | |
| 185 | if (swap == 2) a = BITSWAP8(a,3,5,0,1,7,2,6,4); | |
| 186 | if (swap == 3) a = BITSWAP8(a,4,2,0,5,3,6,7,1); | |
| 135 | return val; | |
| 136 | } | |
| 187 | 137 | |
| 188 | val = 0x51; | |
| 189 | if (BIT(a,0)) val ^= 0x42; | |
| 190 | if (BIT(a,1)) val ^= 0x84; | |
| 191 | if (BIT(a,2)) val ^= 0x70; | |
| 192 | if (BIT(a,3)) val ^= 0xa4; | |
| 193 | if (BIT(a,4)) val ^= 0x22; | |
| 194 | if (BIT(a,5)) val ^= 0xcf; | |
| 195 | if (BIT(a,6)) val ^= 0x04; | |
| 196 | if (BIT(a,7)) val ^= 0x47; | |
| 138 | static int decrypt_type1b(int val,int param,int swap) | |
| 139 | { | |
| 140 | if (swap == 0) val = BITSWAP8(val,1,0,3,2,5,6,4,7); | |
| 141 | if (swap == 1) val = BITSWAP8(val,2,0,5,1,7,4,6,3); | |
| 142 | if (swap == 2) val = BITSWAP8(val,6,4,7,2,0,5,1,3); | |
| 143 | if (swap == 3) val = BITSWAP8(val,7,1,3,6,0,2,5,4); | |
| 197 | 144 | |
| 198 | if (BIT(a,7) && BIT(a,6)) | |
| 199 | val ^= 0xf4; | |
| 145 | if (BIT(val,2) && BIT(val,0)) | |
| 146 | val ^= (1<<7)|(1<<4); | |
| 200 | 147 | |
| 201 | if (param & 0x01) val ^= 0x96; | |
| 202 | if (param & 0x02) val ^= 0xdb; | |
| 203 | if (param & 0x04) val ^= 0x18; | |
| 204 | if (param & 0x08) val ^= 0x18; | |
| 205 | if (param & 0x40) val ^= 0xdb; | |
| 206 | if (param & 0x80) val ^= 0x12; | |
| 148 | if (BIT(val,7)) val ^= (1<<2); | |
| 149 | if (BIT(val,5)) val ^= (1<<7)|(1<<2); | |
| 150 | if (BIT(val,1)) val ^= (1<<5); | |
| 151 | if (BIT(val,6)) val ^= (1<<1); | |
| 152 | if (BIT(val,4)) val ^= (1<<6)|(1<<5); | |
| 153 | if (BIT(val,0)) val ^= (1<<6)|(1<<2)|(1<<1); | |
| 154 | if (BIT(val,3)) val ^= (1<<7)|(1<<6)|(1<<2)|(1<<1)|(1<<0); | |
| 207 | 155 | |
| 208 | return val; | |
| 209 | } | |
| 156 | val ^= (1<<6)|(1<<4)|(1<<0); | |
| 157 | ||
| 158 | if (BIT(param,3)) val ^= (1<<4)|(1<<1); | |
| 159 | if (BIT(param,2)) val ^= (1<<7)|(1<<6)|(1<<3)|(1<<0); | |
| 160 | if (BIT(param,1)) val ^= (1<<4)|(1<<3); | |
| 161 | if (BIT(param,0)) val ^= (1<<6)|(1<<2)|(1<<1)|(1<<0); | |
| 162 | ||
| 163 | return val; | |
| 210 | 164 | } |
| 211 | 165 | |
| 212 | static int decrypt_type2(int val,int param,int swap) | |
| 166 | static int decrypt_type2a(int val,int param,int swap) | |
| 213 | 167 | { |
| 214 | if (BIT(~param,2) ^ BIT(param,0)) | |
| 215 | { | |
| 216 | int a = val; | |
| 168 | if (swap == 0) val = BITSWAP8(val,0,1,4,3,5,6,2,7); | |
| 169 | if (swap == 1) val = BITSWAP8(val,6,3,0,5,7,4,1,2); | |
| 170 | if (swap == 2) val = BITSWAP8(val,1,6,4,5,0,3,7,2); | |
| 171 | if (swap == 3) val = BITSWAP8(val,4,6,7,5,2,3,1,0); | |
| 217 | 172 | |
| 218 | if (swap == 1) a = BITSWAP8(a,2,4,7,0,5,1,3,6); | |
| 219 | if (swap == 2) a = BITSWAP8(a,2,3,0,4,5,7,6,1); | |
| 220 | if (swap == 3) a = BITSWAP8(a,0,3,2,7,5,1,6,4); | |
| 173 | if (BIT(val,3) || (BIT(param,1) && BIT(val,2))) | |
| 174 | val = BITSWAP8(val,6,0,7,4,3,2,1,5); | |
| 221 | 175 | |
| 222 | val = 0xea; | |
| 223 | if (BIT(a,0)) val ^= 0xa0; | |
| 224 | if (BIT(a,1)) val ^= 0x80; | |
| 225 | if (BIT(a,2)) val ^= 0x18; | |
| 226 | if (BIT(a,3)) val ^= 0x07; | |
| 227 | if (BIT(a,4)) val ^= 0x41; | |
| 228 | if (BIT(a,5)) val ^= 0x04; | |
| 229 | if (BIT(a,6)) val ^= 0x10; | |
| 230 | if (BIT(a,7)) val ^= 0x60; | |
| 176 | if (BIT(val,5)) val ^= (1<<7); | |
| 177 | if (BIT(val,6)) val ^= (1<<5); | |
| 178 | if (BIT(val,0)) val ^= (1<<6); | |
| 179 | if (BIT(val,4)) val ^= (1<<3)|(1<<0); | |
| 180 | if (BIT(val,1)) val ^= (1<<2); | |
| 231 | 181 | |
| 232 | if (!BIT(a,5) && ((~param & 0x08) || !BIT(a,6))) | |
| 233 | { | |
| 234 | if (BIT(a,0)) val ^= 0x20; | |
| 235 | if (BIT(a,7)) val ^= 0x21; | |
| 236 | if (BIT(a,1)) val ^= 0xe0; | |
| 237 | if (BIT(a,4)) val ^= 0xe1; | |
| 238 | } | |
| 182 | val ^= (1<<7)|(1<<6)|(1<<5)|(1<<4)|(1<<1); | |
| 239 | 183 | |
| 240 | if (param & 0x01) val ^= 0x1f; | |
| 241 | if (param & 0x02) val ^= 0x1f; | |
| 242 | if (param & 0x40) val ^= 0x1f; | |
| 184 | if (BIT(param,2)) val ^= (1<<4)|(1<<3)|(1<<2)|(1<<1)|(1<<0); | |
| 243 | 185 | |
| 244 | if (BIT(param,6) ^ BIT(param,1) ^ BIT(param,7)) | |
| 245 | { | |
| 246 | if (param & 0x01) | |
| 247 | val = BITSWAP8(val,7,6,5,2,1,3,4,0); | |
| 248 | else | |
| 249 | val = BITSWAP8(val,7,6,5,3,4,1,2,0); | |
| 250 | } | |
| 186 | if (BIT(param,3)) | |
| 187 | { | |
| 188 | if (BIT(param,0)) | |
| 189 | val = BITSWAP8(val,7,6,5,3,4,1,2,0); | |
| 251 | 190 | else |
| 252 | { | |
| 253 | if (~param & 0x01) | |
| 254 | val = BITSWAP8(val,7,6,5,1,2,4,3,0); | |
| 255 | } | |
| 256 | ||
| 257 | return val; | |
| 191 | val = BITSWAP8(val,7,6,5,1,2,4,3,0); | |
| 258 | 192 | } |
| 259 | 193 | else |
| 260 | 194 | { |
| 261 | // only 0x20 possible encryptions for this method - all others have 0x40 | |
| 195 | if (BIT(param,0)) | |
| 196 | val = BITSWAP8(val,7,6,5,2,1,3,4,0); | |
| 197 | } | |
| 262 | 198 | |
| 263 | int a = val; | |
| 199 | return val; | |
| 200 | } | |
| 264 | 201 | |
| 265 | if (swap == 1) a = BITSWAP8(a,3,4,7,5,1,6,0,2); | |
| 266 | if (swap == 2) a = BITSWAP8(a,2,1,6,4,5,7,3,0); | |
| 267 | if (swap == 3) a = BITSWAP8(a,7,0,4,3,2,1,5,6); | |
| 202 | static int decrypt_type2b(int val,int param,int swap) | |
| 203 | { | |
| 204 | // only 0x20 possible encryptions for this method - all others have 0x40 | |
| 205 | // this happens because BIT(param,2) cancels the other three | |
| 268 | 206 | |
| 269 | val = 0x0e; | |
| 270 | if (BIT(a,0)) val ^= 0x33; | |
| 271 | if (BIT(a,1)) val ^= 0x8e; | |
| 272 | if (BIT(a,2)) val ^= 0x01; | |
| 273 | if (BIT(a,3)) val ^= 0xe0; | |
| 274 | if (BIT(a,4)) val ^= 0x5b; | |
| 275 | if (BIT(a,5)) val ^= 0xea; | |
| 276 | if (BIT(a,6)) val ^= 0x58; | |
| 277 | if (BIT(a,7)) val ^= 0x0e; | |
| 207 | if (swap == 0) val = BITSWAP8(val,1,3,4,6,5,7,0,2); | |
| 208 | if (swap == 1) val = BITSWAP8(val,0,1,5,4,7,3,2,6); | |
| 209 | if (swap == 2) val = BITSWAP8(val,3,5,4,1,6,2,0,7); | |
| 210 | if (swap == 3) val = BITSWAP8(val,5,2,3,0,4,7,6,1); | |
| 278 | 211 | |
| 279 | if (BIT(a,1) && BIT(a,5)) | |
| 280 | val ^= 0xa8; | |
| 212 | if (BIT(val,7) && BIT(val,3)) | |
| 213 | val ^= (1<<6)|(1<<4)|(1<<0); | |
| 281 | 214 | |
| 282 | if (BIT(a,6)) | |
| 283 | { | |
| 284 | if (BIT(a,0) ^ BIT(a,4) ^ BIT(a,1)) | |
| 285 | val ^= 0x11; | |
| 286 | } | |
| 287 | if (BIT(a,1)) | |
| 288 | { | |
| 289 | if (!BIT(a,5)) | |
| 290 | { | |
| 291 | if (BIT(a,0) ^ BIT(a,4)) | |
| 292 | val ^= 0x11; | |
| 293 | } | |
| 294 | } | |
| 215 | if (BIT(val,7)) val ^= (1<<2); | |
| 216 | if (BIT(val,5)) val ^= (1<<7)|(1<<3); | |
| 217 | if (BIT(val,1)) val ^= (1<<5); | |
| 218 | if (BIT(val,4)) val ^= (1<<7)|(1<<5)|(1<<3)|(1<<1); | |
| 295 | 219 | |
| 296 | if (param & 0x01) val ^= 0xca; | |
| 297 | if (param & 0x02) val ^= 0xa4; | |
| 298 | if (param & 0x08) val ^= 0x80; | |
| 299 | if (param & 0x40) val ^= 0xa4; | |
| 300 | if (param & 0x80) val ^= 0x4a; | |
| 220 | if (BIT(val,7) && BIT(val,5)) | |
| 221 | val ^= (1<<4)|(1<<0); | |
| 301 | 222 | |
| 302 | return val; | |
| 303 | } | |
| 223 | if (BIT(val,5) && BIT(val,1)) | |
| 224 | val ^= (1<<4)|(1<<0); | |
| 225 | ||
| 226 | if (BIT(val,6)) val ^= (1<<7)|(1<<5); | |
| 227 | if (BIT(val,3)) val ^= (1<<7)|(1<<6)|(1<<5)|(1<<1); | |
| 228 | if (BIT(val,2)) val ^= (1<<3)|(1<<1); | |
| 229 | ||
| 230 | val ^= (1<<7)|(1<<3)|(1<<2)|(1<<1); | |
| 231 | ||
| 232 | if (BIT(param,3)) val ^= (1<<6)|(1<<3)|(1<<1); | |
| 233 | if (BIT(param,2)) val ^= (1<<7)|(1<<6)|(1<<5)|(1<<3)|(1<<2)|(1<<1); // same as the other three combined | |
| 234 | if (BIT(param,1)) val ^= (1<<7); | |
| 235 | if (BIT(param,0)) val ^= (1<<5)|(1<<2); | |
| 236 | ||
| 237 | return val; | |
| 304 | 238 | } |
| 305 | 239 | |
| 306 | static int decrypt_type3(int val,int param,int swap) | |
| 240 | static int decrypt_type3a(int val,int param,int swap) | |
| 307 | 241 | { |
| 308 | if (BIT(~param,2) ^ BIT(param,0)) | |
| 309 | { | |
| 310 | int a = val; | |
| 242 | if (swap == 0) val = BITSWAP8(val,5,3,1,7,0,2,6,4); | |
| 243 | if (swap == 1) val = BITSWAP8(val,3,1,2,5,4,7,0,6); | |
| 244 | if (swap == 2) val = BITSWAP8(val,5,6,1,2,7,0,4,3); | |
| 245 | if (swap == 3) val = BITSWAP8(val,5,6,7,0,4,2,1,3); | |
| 311 | 246 | |
| 312 | if (swap == 0) a = BITSWAP8(a,2,4,7,0,5,1,3,6); | |
| 313 | if (swap == 2) a = BITSWAP8(a,0,3,2,7,5,1,6,4); | |
| 314 | if (swap == 3) a = BITSWAP8(a,2,3,0,4,5,7,6,1); | |
| 247 | if (BIT(val,2)) val ^= (1<<7)|(1<<5)|(1<<4); | |
| 248 | if (BIT(val,3)) val ^= (1<<0); | |
| 315 | 249 | |
| 316 | if (BIT(param,6) ^ BIT(param,1) ^ BIT(param,7)) | |
| 317 | a = BITSWAP8(a,7,6,5,4,2,3,1,0); | |
| 250 | if (BIT(param,0)) val = BITSWAP8(val,7,2,5,4,3,1,0,6); | |
| 318 | 251 | |
| 319 | if (BIT(a,4)) | |
| 320 | a = BITSWAP8(a,7,6,5,4,2,3,1,0); | |
| 252 | if (BIT(val,1)) val ^= (1<<6)|(1<<0); | |
| 253 | if (BIT(val,3)) val ^= (1<<4)|(1<<2)|(1<<1); | |
| 321 | 254 | |
| 322 | val = 0x78; | |
| 323 | if (BIT(a,2)) val ^= 0x26; | |
| 324 | if (BIT(a,3)) val ^= 0x80; | |
| 325 | if (BIT(a,5)) val ^= 0x10; | |
| 326 | if (param & 0x01) | |
| 327 | { | |
| 328 | if (BIT(a,0)) val ^= 0x04; | |
| 329 | if (BIT(a,1)) val ^= 0x01; | |
| 330 | if (BIT(a,4)) val ^= 0x5d; | |
| 331 | if (BIT(a,6)) val ^= 0x43; | |
| 332 | if (BIT(a,7)) val ^= 0xf6; | |
| 333 | } | |
| 334 | else | |
| 335 | { | |
| 336 | if (BIT(a,0)) val ^= 0x43; | |
| 337 | if (BIT(a,1)) val ^= 0x40; | |
| 338 | if (BIT(a,4)) val ^= 0x1f; | |
| 339 | if (BIT(a,6)) val ^= 0x01; | |
| 340 | if (BIT(a,7)) val ^= 0xb2; | |
| 341 | } | |
| 255 | if (BIT(param,3)) val ^= (1<<4)|(1<<3); | |
| 342 | 256 | |
| 343 | if (param & 0x01) val ^= 0x81; | |
| 344 | if (param & 0x02) val ^= 0x98; | |
| 345 | if (param & 0x08) val ^= 0x10; | |
| 346 | if (param & 0x40) val ^= 0x98; | |
| 347 | if (param & 0x80) val ^= 0x18; | |
| 257 | if (BIT(val,3)) val = BITSWAP8(val,5,6,7,4,3,2,1,0); | |
| 348 | 258 | |
| 349 | return val; | |
| 350 | } | |
| 351 | else | |
| 352 | { | |
| 353 | int a = val; | |
| 259 | if (BIT(val,5)) val ^= (1<<2)|(1<<1); | |
| 354 | 260 | |
| 355 | if (swap == 0) a = BITSWAP8(a,3,4,7,5,1,6,0,2); | |
| 356 | if (swap == 2) a = BITSWAP8(a,7,0,4,3,2,1,5,6); | |
| 357 | if (swap == 3) a = BITSWAP8(a,2,1,6,4,5,7,3,0); | |
| 261 | val ^= (1<<6)|(1<<5)|(1<<4)|(1<<3); | |
| 358 | 262 | |
| 359 | if (BIT(param,6) ^ BIT(param,1) ^ BIT(param,7)) | |
| 360 | { | |
| 361 | val = 0xaa; | |
| 362 | if (param & 0x01) val ^= 0x04; | |
| 363 | if (param & 0x80) val ^= 0x04; | |
| 263 | if (BIT(param,2)) val ^= (1<<7); | |
| 264 | if (BIT(param,1)) val ^= (1<<4); | |
| 265 | if (BIT(param,0)) val ^= (1<<0); | |
| 364 | 266 | |
| 365 | if (BIT(a,0)) val ^= 0xd6; | |
| 366 | if (BIT(a,1)) val ^= 0x30; | |
| 367 | if (BIT(a,2)) val ^= 0x11; | |
| 368 | if (BIT(a,3)) val ^= 0x04; | |
| 369 | if (BIT(a,4)) val ^= 0x08; | |
| 370 | if (BIT(a,5)) val ^= 0x42; | |
| 371 | if (BIT(a,6)) val ^= 0xc6; | |
| 372 | if (BIT(a,7)) val ^= 0x03; | |
| 373 | } | |
| 374 | else | |
| 375 | { | |
| 376 | val = 0xac; | |
| 377 | if (param & 0x01) val ^= 0x01; | |
| 378 | if (param & 0x80) val ^= 0x01; | |
| 267 | return val; | |
| 268 | } | |
| 379 | 269 | |
| 380 | if (BIT(a,0)) val ^= 0x54; | |
| 381 | if (BIT(a,1)) val ^= 0x08; | |
| 382 | if (BIT(a,2)) val ^= 0x82; | |
| 383 | if (BIT(a,3)) val ^= 0x01; | |
| 384 | if (BIT(a,4)) val ^= 0x30; | |
| 385 | if (BIT(a,5)) val ^= 0x40; | |
| 386 | if (BIT(a,6)) val ^= 0x52; | |
| 387 | if (BIT(a,7)) val ^= 0x86; | |
| 388 | } | |
| 270 | static int decrypt_type3b(int val,int param,int swap) | |
| 271 | { | |
| 272 | if (swap == 0) val = BITSWAP8(val,3,7,5,4,0,6,2,1); | |
| 273 | if (swap == 1) val = BITSWAP8(val,7,5,4,6,1,2,0,3); | |
| 274 | if (swap == 2) val = BITSWAP8(val,7,4,3,0,5,1,6,2); | |
| 275 | if (swap == 3) val = BITSWAP8(val,2,6,4,1,3,7,0,5); | |
| 389 | 276 | |
| 390 | if (param & 0x01) val ^= 0x08; | |
| 391 | if (param & 0x08) val ^= 0x80; | |
| 277 | if (BIT(val,2)) val ^= (1<<7); | |
| 392 | 278 | |
| 393 | if (BIT(a,2) ^ BIT(a,7)) | |
| 394 | { | |
| 395 | if (BIT(a,4) ^ BIT(a,1)) | |
| 396 | val ^= 0x38; | |
| 279 | if (BIT(val,7)) val = BITSWAP8(val,7,6,3,4,5,2,1,0); | |
| 397 | 280 | |
| 398 | if (BIT(a,0) ^ BIT(a,5) ^ BIT(a,6)) | |
| 399 | val ^= 0x02; | |
| 400 | } | |
| 281 | if (BIT(param,3)) val ^= (1<<7); | |
| 401 | 282 | |
| 402 | return val; | |
| 403 | } | |
| 404 | } | |
| 283 | if (BIT(val,4)) val ^= (1<<6); | |
| 284 | if (BIT(val,1)) val ^= (1<<6)|(1<<4)|(1<<2); | |
| 405 | 285 | |
| 286 | if (BIT(val,7) && BIT(val,6)) | |
| 287 | val ^= (1<<1); | |
| 406 | 288 | |
| 407 | static int decrypt(int val,int param,int opcode) | |
| 289 | if (BIT(val,7)) val ^= (1<<1); | |
| 290 | ||
| 291 | if (BIT(param,3)) val ^= (1<<7); | |
| 292 | if (BIT(param,2)) val ^= (1<<0); | |
| 293 | ||
| 294 | if (BIT(param,3)) val = BITSWAP8(val,4,6,3,2,5,0,1,7); | |
| 295 | ||
| 296 | if (BIT(val,4)) val ^= (1<<1); | |
| 297 | if (BIT(val,5)) val ^= (1<<4); | |
| 298 | if (BIT(val,7)) val ^= (1<<2); | |
| 299 | ||
| 300 | val ^= (1<<5)|(1<<3)|(1<<2); | |
| 301 | ||
| 302 | if (BIT(param,1)) val ^= (1<<7); | |
| 303 | if (BIT(param,0)) val ^= (1<<3); | |
| 304 | ||
| 305 | return val; | |
| 306 | } | |
| 307 | ||
| 308 | static int decrypt(int val, int key, int opcode) | |
| 408 | 309 | { |
| 409 | 310 | int type = 0; |
| 410 | 311 | int swap = 0; |
| 312 | int param = 0; | |
| 411 | 313 | |
| 412 | | |
| 314 | key | |
| 413 | 315 | |
| 414 | 316 | // no encryption |
| 415 | if ( | |
| 317 | if (key | |
| 416 | 318 | return val; |
| 417 | 319 | |
| 418 | type ^= BIT(param,0) << 0; | |
| 419 | type ^= BIT(param,1) << 0; | |
| 420 | type ^= BIT(param,2) << 0; | |
| 421 | type ^= BIT(param,4) << 0; | |
| 422 | type ^= BIT(param,4) << 1; | |
| 423 | type ^= BIT(param,5) << 1; | |
| 320 | type ^= BIT(key,0) << 0; | |
| 321 | type ^= BIT(key,2) << 0; | |
| 322 | type ^= BIT(key,0) << 1; | |
| 323 | type ^= BIT(key,1) << 1; | |
| 324 | type ^= BIT(key,2) << 1; | |
| 325 | type ^= BIT(key,4) << 1; | |
| 326 | type ^= BIT(key,4) << 2; | |
| 327 | type ^= BIT(key,5) << 2; | |
| 424 | 328 | |
| 425 | swap ^= BIT(param,0) << 0; | |
| 426 | swap ^= BIT(param,1) << 0; | |
| 427 | swap ^= BIT(param,2) << 1; | |
| 428 | swap ^= BIT(param,3) << 1; | |
| 329 | swap ^= BIT(key,0) << 0; | |
| 330 | swap ^= BIT(key,1) << 0; | |
| 331 | swap ^= BIT(key,2) << 1; | |
| 332 | swap ^= BIT(key,3) << 1; | |
| 429 | 333 | |
| 334 | param ^= BIT(key,0) << 0; | |
| 335 | param ^= BIT(key,0) << 1; | |
| 336 | param ^= BIT(key,2) << 1; | |
| 337 | param ^= BIT(key,3) << 1; | |
| 338 | param ^= BIT(key,0) << 2; | |
| 339 | param ^= BIT(key,1) << 2; | |
| 340 | param ^= BIT(key,6) << 2; | |
| 341 | param ^= BIT(key,1) << 3; | |
| 342 | param ^= BIT(key,6) << 3; | |
| 343 | param ^= BIT(key,7) << 3; | |
| 344 | ||
| 430 | 345 | if (!opcode) |
| 431 | 346 | { |
| 432 | param ^= 1<<0; | |
| 433 | param ^= 1<<1; | |
| 434 | param ^= 1<<3; | |
| 435 | param ^= 1<<7; | |
| 347 | param ^= 1 << 0; | |
| 348 | type ^= 1 << 0; | |
| 436 | 349 | } |
| 437 | 350 | |
| 438 | 351 | switch (type) |
| 439 | 352 | { |
| 440 | 353 | default: |
| 441 | 354 | case 0: return decrypt_type0(val,param,swap); |
| 442 | ||
| 443 | case 1: return decrypt_type1(val,param,swap); | |
| 444 | ||
| 445 | case 2: return decrypt_type2(val,param,swap); | |
| 446 | ||
| 447 | case 3: return decrypt_type3(val,param,swap); | |
| 355 | case 1: return decrypt_type0(val,param,swap); | |
| 356 | case 2: return decrypt_type1a(val,param,swap); | |
| 357 | case 3: return decrypt_type1b(val,param,swap); | |
| 358 | case 4: return decrypt_type2a(val,param,swap); | |
| 359 | case 5: return decrypt_type2b(val,param,swap); | |
| 360 | case 6: return decrypt_type3a(val,param,swap); | |
| 361 | case 7: return decrypt_type3b(val,param,swap); | |
| 448 | 362 | } |
| 449 | 363 | } |
| 450 | 364 |
| r1490 | r1491 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | static UINT8 atarigen_slapstic_num; |
| 73 | 73 | static UINT16 * atarigen_slapstic; |
| 74 | static UINT | |
| 74 | static UINT8 | |
| 75 | 75 | static void * atarigen_slapstic_bank0; |
| 76 | 76 | |
| 77 | 77 | static UINT8 sound_cpu_num; |
| r1490 | r1491 | |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | |
| 455 | static void slapstic_postload(void) | |
| 456 | { | |
| 457 | update_bank(slapstic_bank()); | |
| 458 | } | |
| 459 | ||
| 460 | ||
| 455 | 461 | /*--------------------------------------------------------------- |
| 456 | 462 | atarigen_slapstic_init: Installs memory handlers for the |
| 457 | 463 | slapstic and sets the chip number. |
| 458 | 464 | ---------------------------------------------------------------*/ |
| 459 | 465 | |
| 460 | void atarigen_slapstic_init(int cpunum, | |
| 466 | void atarigen_slapstic_init(int cpunum, offs_t base, offs_t mirror, int chipnum) | |
| 461 | 467 | { |
| 468 | /* reset in case we have no state */ | |
| 462 | 469 | atarigen_slapstic_num = chipnum; |
| 463 | 470 | atarigen_slapstic = NULL; |
| 464 | 471 | |
| 465 | 472 | /* if we have a chip, install it */ |
| 466 | if (chipnum) | |
| 473 | if (chipnum != 0) | |
| 467 | 474 | { |
| 468 | 475 | /* initialize the slapstic */ |
| 469 | 476 | slapstic_init(chipnum); |
| 470 | 477 | |
| 471 | 478 | /* install the memory handlers */ |
| 472 | atarigen_slapstic = memory_install_read16_handler(cpunum, ADDRESS_SPACE_PROGRAM, base, base + 0x7fff, 0, 0, atarigen_slapstic_r); | |
| 473 | atarigen_slapstic = memory_install_write16_handler(cpunum, ADDRESS_SPACE_PROGRAM, base, base + 0x7fff, 0, 0, atarigen_slapstic_w); | |
| 479 | atarigen_slapstic = memory_install_readwrite16_handler(cpunum, ADDRESS_SPACE_PROGRAM, base, base + 0x7fff, 0, mirror, atarigen_slapstic_r, atarigen_slapstic_w); | |
| 474 | 480 | |
| 475 | 481 | /* allocate memory for a copy of bank 0 */ |
| 476 | 482 | atarigen_slapstic_bank0 = auto_malloc(0x2000); |
| 477 | 483 | memcpy(atarigen_slapstic_bank0, atarigen_slapstic, 0x2000); |
| 484 | ||
| 485 | /* ensure we recopy memory for the bank */ | |
| 486 | atarigen_slapstic_bank = 0xff; | |
| 478 | 487 | } |
| 479 | 488 | } |
| 480 | 489 | |
| r1490 | r1491 | |
| 486 | 495 | |
| 487 | 496 | void atarigen_slapstic_reset(void) |
| 488 | 497 | { |
| 489 | if (atarigen_slapstic_num) | |
| 498 | if (atarigen_slapstic_num != 0) | |
| 490 | 499 | { |
| 491 | 500 | slapstic_reset(); |
| 492 | 501 | update_bank(slapstic_bank()); |
| r1490 | r1491 | |
| 722 | 731 | /* reset the sound write state */ |
| 723 | 732 | atarigen_sound_to_cpu_ready = 0; |
| 724 | 733 | atarigen_sound_int_ack_w(0, 0, 0); |
| 734 | ||
| 735 | /* allocate a high frequency timer until a response is generated */ | |
| 736 | /* the main CPU is *very* sensistive to the timing of the response */ | |
| 737 | cpu_boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST); | |
| 725 | 738 | } |
| 726 | 739 | |
| 727 | 740 | |
| r1490 | r1491 | |
| 1497 | 1510 | |
| 1498 | 1511 | state_save_register_global(playfield_latch); |
| 1499 | 1512 | state_save_register_global(playfield2_latch); |
| 1513 | ||
| 1514 | /* need a postload to reset the state */ | |
| 1515 | state_save_register_func_postload(slapstic_postload); | |
| 1500 | 1516 | } |
| r1490 | r1491 | |
|---|---|---|
| 17 | 17 | CONSTANTS |
| 18 | 18 | ##########################################################################*/ |
| 19 | 19 | |
| 20 | #define ATARI_CLOCK_14MHz 14318180 | |
| 21 | #define ATARI_CLOCK_20MHz 20000000 | |
| 22 | #define ATARI_CLOCK_32MHz 32000000 | |
| 23 | #define ATARI_CLOCK_50MHz 50000000 | |
| 20 | #define ATARI_CLOCK_14MHz XTAL_14_31818MHz | |
| 21 | #define ATARI_CLOCK_20MHz XTAL_20MHz | |
| 22 | #define ATARI_CLOCK_32MHz XTAL_32MHz | |
| 23 | #define ATARI_CLOCK_50MHz XTAL_50MHz | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | |
| r1490 | r1491 | |
| 134 | 134 | SLAPSTIC HANDLING |
| 135 | 135 | ---------------------------------------------------------------*/ |
| 136 | 136 | |
| 137 | void atarigen_slapstic_init(int cpunum, | |
| 137 | void atarigen_slapstic_init(int cpunum, offs_t base, offs_t mirror, int chipnum); | |
| 138 | 138 | void atarigen_slapstic_reset(void); |
| 139 | 139 | |
| 140 | 140 | WRITE16_HANDLER( atarigen_slapstic_w ); |
| r1490 | r1491 | |
|---|---|---|
| 352 | 352 | int r=YM2151_status_port_0_r(0); |
| 353 | 353 | |
| 354 | 354 | if (activecpu_get_pc()==0x2aca || activecpu_get_pc()==0x29fe |
| 355 | || activecpu_get_pc()==0xf9721) | |
| 355 | || activecpu_get_pc()==0xf9721 | |
| 356 | || activecpu_get_pc()==0x1b96 || activecpu_get_pc()==0x1c65) // BigFight | |
| 356 | 357 | return 0x80; |
| 357 | 358 | return r; |
| 358 | 359 | } |
| r1490 | r1491 | |
| 365 | 366 | |
| 366 | 367 | if (activecpu_get_pc()==0x2b70 || activecpu_get_pc()==0x2bb5 |
| 367 | 368 | || activecpu_get_pc()==0x2acc |
| 369 | || activecpu_get_pc()==0x1c79 // BigFight | |
| 370 | || activecpu_get_pc()==0x1cbe // BigFight | |
| 368 | 371 | || activecpu_get_pc()==0xf9881) |
| 369 | 372 | return 0xf; |
| 370 | if (activecpu_get_pc()==0x2ba3 || activecpu_get_pc()==0x2a9b || activecpu_get_pc()==0x2adc) | |
| 373 | if (activecpu_get_pc()==0x2ba3 || activecpu_get_pc()==0x2a9b || activecpu_get_pc()==0x2adc | |
| 374 | || activecpu_get_pc()==0x1cac) // BigFight | |
| 371 | 375 | return 0; |
| 372 | 376 | return r; |
| 373 | 377 | } |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | * mathbox.c: math box simulation (Battlezone/Red Baron/Tempest) |
| 3 | 3 | * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * |
| 6 | 6 | */ |
| 7 | 7 |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | * mathbox.h: math box simulation (Battlezone/Red Baron/Tempest) |
| 3 | 3 | * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * |
| 6 | 6 | */ |
| 7 | 7 |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Atari Star Wars hardware |
| 4 | 4 | |
| 5 | This file is Copyright | |
| 5 | This file is Copyright | |
| 6 | 6 | Modified by Frank Palazzolo for sound support |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 45 | 45 | if (data & 0x80) |
| 46 | 46 | { |
| 47 | 47 | /* Invert video */ |
| 48 | palette_set_color(Machine, | |
| 48 | palette_set_color(Machine,1,MAKE_RGB(0x00,0x00,0x00)); /* black */ | |
| 49 | 49 | palette_set_color(Machine,0,MAKE_RGB(0xff,0xff,0xff)); /* white */ |
| 50 | 50 | } |
| 51 | 51 | else |
| 52 | 52 | { |
| 53 | 53 | /* Regular video */ |
| 54 | 54 | palette_set_color(Machine,0,MAKE_RGB(0x00,0x00,0x00)); /* black */ |
| 55 | palette_set_color(Machine, | |
| 55 | palette_set_color(Machine,1,MAKE_RGB(0xff,0xff,0xff)); /* white */ | |
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | } |
| r1490 | r1491 | |
|---|---|---|
| 252 | 252 | * |
| 253 | 253 | *************************************/ |
| 254 | 254 | |
| 255 | enum | |
| 255 | enum | |
| 256 | 256 | { |
| 257 | 257 | DISABLED, |
| 258 | 258 | ENABLED, |
| r1490 | r1491 | |
| 773 | 773 | * |
| 774 | 774 | *************************************/ |
| 775 | 775 | |
| 776 | static enum state_type state; | |
| 777 | static INT8 current_bank; | |
| 778 | static int access_68k; | |
| 776 | static UINT8 state; | |
| 777 | static UINT8 current_bank; | |
| 778 | static UINT8 access_68k; | |
| 779 | 779 | |
| 780 | static INT8 alt_bank; | |
| 781 | static INT8 bit_bank; | |
| 782 | static INT8 add_bank; | |
| 780 | static UINT8 alt_bank; | |
| 781 | static UINT8 bit_bank; | |
| 782 | static UINT8 add_bank; | |
| 783 | 783 | static UINT8 bit_xor; |
| 784 | 784 | |
| 785 | 785 | static struct slapstic_data slapstic; |
| r1490 | r1491 | |
| 817 | 817 | /* see if we're 68k or 6502/6809 based */ |
| 818 | 818 | access_68k = (Machine->drv->cpu[0].type != CPU_M6809 && |
| 819 | 819 | Machine->drv->cpu[0].type != CPU_M6502); |
| 820 | ||
| 821 | /* save state */ | |
| 822 | state_save_register_item("slapstic", 0, state); | |
| 823 | state_save_register_item("slapstic", 0, current_bank); | |
| 824 | state_save_register_item("slapstic", 0, alt_bank); | |
| 825 | state_save_register_item("slapstic", 0, bit_bank); | |
| 826 | state_save_register_item("slapstic", 0, add_bank); | |
| 827 | state_save_register_item("slapstic", 0, bit_xor); | |
| 820 | 828 | } |
| 821 | 829 | |
| 822 | 830 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | mamedriv.c substitute file for "tiny" MAME builds. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | The list of used drivers. Drivers have to be included here to be recognized |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | mamedriv.c |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | The list of all available drivers. Drivers have to be included here to be |
| r1490 | r1491 | |
| 688 | 688 | DRIVER( shadowld ) /* (c) 1987 */ |
| 689 | 689 | DRIVER( youkaidk ) /* (c) 1987 (Japan new version) */ |
| 690 | 690 | DRIVER( yokaidko ) /* (c) 1987 (Japan old version) */ |
| 691 | DRIVER( dspirit ) /* (c) 1987 new version */ | |
| 692 | DRIVER( dspirito ) /* (c) 1987 old version */ | |
| 691 | DRIVER( dspirit ) /* (c) 1987 (Japan new version) */ | |
| 692 | DRIVER( dspirito ) /* (c) 1987 (Japan old version) */ | |
| 693 | DRIVER( dspirita ) /* (c) 1987 (Atari license) */ | |
| 693 | 694 | DRIVER( blazer ) /* (c) 1987 (Japan) */ |
| 694 | 695 | DRIVER( quester ) /* (c) 1987 (Japan) */ |
| 695 | 696 | DRIVER( pacmania ) /* (c) 1987 */ |
| r1490 | r1491 | |
| 1991 | 1992 | DRIVER( commandw ) /* prototype */ |
| 1992 | 1993 | |
| 1993 | 1994 | /* Taito JC System */ |
| 1994 | DRIVER( landgear ) /* E17 (c) 199? Taito Corporation */ | |
| 1995 | DRIVER( dendeg ) /* E35 (c) 199? Taito Corporation */ | |
| 1996 | DRIVER( dendegx ) /* E35 (c) 199? Taito Corporation */ | |
| 1997 | DRIVER( dendeg2 ) /* E52 (c) 199? Taito Corporation */ | |
| 1998 | DRIVER( dendeg2x ) /* E52 (c) 199? Taito Corporation */ | |
| 1999 | DRIVER( sidebs ) /* E23 (c) 199? Taito Corporation */ | |
| 2000 | DRIVER( sidebs2 ) /* E38 (c) 199? Taito Corporation */ | |
| 1995 | DRIVER( landgear ) /* E17 (c) 1995 Taito Corporation */ | |
| 1996 | DRIVER( dendeg ) /* E35 (c) 1996 Taito Corporation */ | |
| 1997 | DRIVER( dendegx ) /* E35 (c) 1996 Taito Corporation */ | |
| 1998 | DRIVER( dendeg2 ) /* E52 (c) 1998 Taito Corporation */ | |
| 1999 | DRIVER( dendeg2x ) /* E52 (c) 1998 Taito Corporation */ | |
| 2000 | DRIVER( sidebs ) /* E23 (c) 1996 Taito Corporation */ | |
| 2001 | DRIVER( sidebs2 ) /* E38 (c) 1997 Taito Corporation */ | |
| 2002 | DRIVER( dangcurv ) /* E09 (c) 1995 Taito Corporation */ | |
| 2001 | 2003 | |
| 2002 | 2004 | /* Taito "Wolf" System */ |
| 2003 | 2005 | DRIVER( pf2012 ) /* E59 (c) 1997 Taito */ |
| r1490 | r1491 | |
| 6015 | 6017 | /* Midway Zeus games */ |
| 6016 | 6018 | DRIVER( mk4 ) /* (c) 1997 Midway */ |
| 6017 | 6019 | DRIVER( mk4a ) /* (c) 1997 Midway */ |
| 6018 | DRIVER( invasn ) /* (c) 1999 Midway */ | |
| 6020 | DRIVER( invasnab ) /* (c) 1999 Midway */ | |
| 6021 | DRIVER( invasnv4 ) /* (c) 1999 Midway */ | |
| 6019 | 6022 | DRIVER( crusnexo ) /* (c) 1999 Midway */ |
| 6020 | 6023 | DRIVER( thegrid ) /* (c) 2001 Midway */ |
| 6021 | 6024 | |
| r1490 | r1491 | |
| 7313 | 7316 | DRIVER( hiryuken ) /* (c) 1985 Taito */ |
| 7314 | 7317 | |
| 7315 | 7318 | /* Tatsumi Games */ |
| 7316 | DRIVER( lockon ) /* (c) 1986 */ | |
| 7317 | DRIVER( apache3 ) /* (c) 1988 */ | |
| 7318 | DRIVER( roundup5 ) /* (c) 1989 */ | |
| 7319 | DRIVER( cyclwarr ) /* (c) 1991 */ | |
| 7319 | DRIVER( tx1 ) /* (c) 1983 Tatsumi */ | |
| 7320 | DRIVER( tx1a ) /* (c) 1983 Tatsumi */ | |
| 7321 | DRIVER( buggyboy ) /* (c) 1985 Tatsumi */ | |
| 7322 | DRIVER( buggybjr ) /* (c) 1986 Tatsumi */ | |
| 7323 | DRIVER( lockon ) /* (c) 1986 Tatsumi */ | |
| 7324 | /* Gray Out */ /* (c) 1987 Tatsumi */ | |
| 7325 | DRIVER( apache3 ) /* (c) 1988 Tatsumi */ | |
| 7326 | DRIVER( roundup5 ) /* (c) 1989 Tatsumi */ | |
| 7327 | DRIVER( cyclwarr ) /* (c) 1991 Tatsumi */ | |
| 7328 | DRIVER( bigfight ) /* (c) 1992 Tatsumi */ | |
| 7320 | 7329 | |
| 7321 | 7330 | /* Electronic Devices */ |
| 7322 | 7331 | DRIVER( mugsmash ) /* (c) Electronic Devices (Italy) / 3D Games (England) */ |
| r1490 | r1491 | |
| 7501 | 7510 | DRIVER( mosaic ) /* (c) 1990 Space */ |
| 7502 | 7511 | DRIVER( mosaica ) /* (c) 1990 Space + Fuuki license */ |
| 7503 | 7512 | DRIVER( gfire2 ) /* (c) 1992 Topis Corp */ |
| 7504 | DRIVER( tx1 ) /* (c) 1983 Tatsumi */ | |
| 7505 | DRIVER( tx1a ) /* (c) 1983 Tatsumi */ | |
| 7506 | DRIVER( buggyboy ) /* (c) 1985 Tatsumi */ | |
| 7507 | DRIVER( buggybjr ) /* (c) 1986 Tatsumi */ | |
| 7508 | 7513 | DRIVER( sprcros2 ) /* (c) 1986 GM Shoji */ |
| 7509 | 7514 | DRIVER( sprcrs2a ) /* (c) 1986 GM Shoji */ |
| 7510 | 7515 | DRIVER( gcpinbal ) /* (c) 1994 Excellent System */ |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | /*----------- defined in machine/cubocd32.c -----------*/ |
| 11 | 11 | |
| 12 | extern void amiga_akiko_init( | |
| 12 | extern void amiga_akiko_init(running_machine* machine); | |
| 13 | 13 | extern NVRAM_HANDLER( cd32 ); |
| 14 | 14 | extern READ32_HANDLER(amiga_akiko32_r); |
| 15 | 15 | extern WRITE32_HANDLER(amiga_akiko32_w); |
| r1490 | r1491 | |
|---|---|---|
| 235 | 235 | WRITE8_HANDLER( froggrmc_sh_irqtrigger_w ); |
| 236 | 236 | WRITE8_HANDLER( hotshock_sh_irqtrigger_w ); |
| 237 | 237 | |
| 238 | MACHINE_DRIVER_EXTERN( ad2083_audio ); | |
| 238 | 239 |
| r0 | r1491 | |
|---|---|---|
| 1 | extern UINT8 *cvs_color_ram; | |
| 2 | extern UINT8 *cvs_video_ram; | |
| 3 | extern UINT8 *cvs_bullet_ram; | |
| 4 | extern mame_bitmap *cvs_collision_bitmap; | |
| 5 | extern mame_bitmap *cvs_collision_background; | |
| 6 | extern int cvs_collision_register; | |
| 7 | ||
| 8 | ||
| 9 | INTERRUPT_GEN( cvs_interrupt ); | |
| 10 | PALETTE_INIT( cvs ); | |
| 11 | VIDEO_UPDATE( cvs ); | |
| 12 | VIDEO_START( cvs ); | |
| 13 | ||
| 14 | READ8_HANDLER( cvs_video_or_color_ram_r ); | |
| 15 | WRITE8_HANDLER( cvs_video_or_color_ram_w ); | |
| 16 | ||
| 17 | READ8_HANDLER( cvs_bullet_ram_or_palette_r ); | |
| 18 | WRITE8_HANDLER( cvs_bullet_ram_or_palette_w ); | |
| 19 | ||
| 20 | READ8_HANDLER( cvs_s2636_1_or_character_ram_r ); | |
| 21 | WRITE8_HANDLER( cvs_s2636_1_or_character_ram_w ); | |
| 22 | READ8_HANDLER( cvs_s2636_2_or_character_ram_r ); | |
| 23 | WRITE8_HANDLER( cvs_s2636_2_or_character_ram_w ); | |
| 24 | READ8_HANDLER( cvs_s2636_3_or_character_ram_r ); | |
| 25 | WRITE8_HANDLER( cvs_s2636_3_or_character_ram_w ); | |
| 26 | ||
| 27 | WRITE8_HANDLER( cvs_scroll_w ); | |
| 28 | WRITE8_HANDLER( cvs_video_fx_w ); | |
| 29 | ||
| 30 | READ8_HANDLER( cvs_collision_r ); | |
| 31 | READ8_HANDLER( cvs_collision_clear ); | |
| 32 | READ8_HANDLER( cvs_input_r ); |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | /*----------- defined in video/rampart.c -----------*/ |
| 9 | 9 | |
| 10 | WRITE16_HANDLER( rampart_bitmap_w ); | |
| 11 | ||
| 12 | 10 | VIDEO_START( rampart ); |
| 13 | 11 | VIDEO_UPDATE( rampart ); |
| 14 | 12 | |
| 15 | void rampart_bitmap_init(running_machine *machine, int _xdim, int _ydim); | |
| 16 | 13 | void rampart_bitmap_render(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect); |
| 17 | 14 | |
| 18 | 15 | extern UINT16 *rampart_bitmap; |
| r1490 | r1491 | |
|---|---|---|
| 140 | 140 | READ16_HANDLER( neogeo_video_register_r ); |
| 141 | 141 | WRITE16_HANDLER( neogeo_video_register_w ); |
| 142 | 142 | |
| 143 | void neogeo_set_display_po | |
| 143 | void neogeo_set_display_po | |
| 144 | 144 | |
| 145 | 145 | void neogeo_set_palette_bank(UINT8 data); |
| 146 | 146 | void neogeo_set_screen_dark(UINT8 data); |
| r1490 | r1491 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | void dc_vblank( void ); |
| 32 | 32 | |
| 33 | int compute_interrupt_level(void); | |
| 34 | void update_interrupt_status(void); | |
| 35 | ||
| 36 | extern UINT32 sysctrl_regs[0x200/4]; | |
| 37 | ||
| 38 | /*address*/ | |
| 39 | #define SB_C2DSTAT ((0x005F6800-0x005F6800)/4) | |
| 40 | #define SB_C2DLEN ((0x005F6804-0x005F6800)/4) | |
| 41 | #define SB_C2DST ((0x005F6808-0x005F6800)/4) | |
| 42 | #define SB_SBREV ((0x005F689c-0x005F6800)/4) | |
| 43 | #define SB_ISTNRM ((0x005F6900-0x005F6800)/4) | |
| 44 | #define SB_ISTEXT ((0x005F6904-0x005F6800)/4) | |
| 45 | #define SB_ISTERR ((0x005F6908-0x005F6800)/4) | |
| 46 | #define SB_IML2NRM ((0x005F6910-0x005F6800)/4) | |
| 47 | #define SB_IML2EXT ((0x005F6914-0x005F6800)/4) | |
| 48 | #define SB_IML2ERR ((0x005F6918-0x005F6800)/4) | |
| 49 | #define SB_IML4NRM ((0x005F6920-0x005F6800)/4) | |
| 50 | #define SB_IML4EXT ((0x005F6924-0x005F6800)/4) | |
| 51 | #define SB_IML4ERR ((0x005F6928-0x005F6800)/4) | |
| 52 | #define SB_IML6NRM ((0x005F6930-0x005F6800)/4) | |
| 53 | #define SB_IML6EXT ((0x005F6934-0x005F6800)/4) | |
| 54 | #define SB_IML6ERR ((0x005F6938-0x005F6800)/4) | |
| 55 | ||
| 56 | ||
| 57 | /*address*/ | |
| 58 | #define SB_MDSTAR ((0x005F6C04-0x005F6C00)/4) | |
| 59 | #define SB_MDST ((0x005F6C18-0x005F6C00)/4) | |
| 60 | #define SB_MDTSEL ((0x005F6C10-0x005F6C00)/4) | |
| 61 | #define SB_MSYS ((0x005F6C80-0x005F6C00)/4) | |
| 62 | ||
| 63 | ||
| 33 | 64 | /*----------- defined in video/dc.c -----------*/ |
| 34 | 65 | |
| 35 | 66 | READ64_HANDLER( pvr_ctrl_r ); |
| r1490 | r1491 | |
| 41 | 72 | VIDEO_START(dc); |
| 42 | 73 | VIDEO_UPDATE(dc); |
| 43 | 74 | |
| 75 | /*address*/ | |
| 76 | #define PVRID ((0x005F8000-0x005F8000)/4) | |
| 77 | #define REVISION ((0x005F8004-0x005F8000)/4) | |
| 78 | #define SOFTRESET ((0x005F8008-0x005F8000)/4) | |
| 79 | #define STARTRENDER ((0x005F8014-0x005F8000)/4) | |
| 80 | #define VO_BORDER_COL ((0x005F8040-0x005F8000)/4) | |
| 81 | #define VO_CONTROL ((0x005F80E8-0x005F8000)/4) | |
| 82 | #define SPG_STATUS ((0x005F810c-0x005F8000)/4) | |
| 83 | #define TA_LIST_INIT ((0x005F8144-0x005F8000)/4) | |
| 84 | ||
| 85 | ||
| 44 | 86 | #endif |
| r1490 | r1491 | |
|---|---|---|
| 17 | 17 | WRITE8_HANDLER( suprridr_fgdisable_w ); |
| 18 | 18 | WRITE8_HANDLER( suprridr_fgscrolly_w ); |
| 19 | 19 | WRITE8_HANDLER( suprridr_bgscrolly_w ); |
| 20 | int suprridr_is_screen_flipped(void); | |
| 20 | 21 | |
| 21 | 22 | WRITE8_HANDLER( suprridr_fgram_w ); |
| 22 | 23 | WRITE8_HANDLER( suprridr_bgram_w ); |
| r1490 | r1491 | |
|---|---|---|
| 57 | 57 | extern UINT8 exidy_collision_mask; |
| 58 | 58 | extern UINT8 exidy_collision_invert; |
| 59 | 59 | |
| 60 | extern UINT8 exidy_color_latch | |
| 60 | extern UINT8 *exidy_color_latch | |
| 61 | 61 | |
| 62 | 62 | VIDEO_START( exidy ); |
| 63 | 63 | VIDEO_EOF( exidy ); |
| r1490 | r1491 | |
| 66 | 66 | INTERRUPT_GEN( exidy_vblank_interrupt ); |
| 67 | 67 | INTERRUPT_GEN( teetert_vblank_interrupt ); |
| 68 | 68 | |
| 69 | WRITE8_HANDLER( exidy_characterram_w ); | |
| 70 | 69 | WRITE8_HANDLER( exidy_color_w ); |
| 71 | 70 | WRITE8_HANDLER( exidy_sprite1_xpos_w ); |
| 72 | 71 | WRITE8_HANDLER( exidy_sprite1_ypos_w ); |
| r0 | r1491 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | IREM M-10,M-11 and M-15 based hardware | |
| 4 | ||
| 5 | ****************************************************************************/ | |
| 6 | ||
| 7 | ||
| 8 | #define IREMM10_MASTER_CLOCK (25000000) | |
| 9 | ||
| 10 | #define IREMM10_CPU_CLOCK (IREMM10_MASTER_CLOCK/20) | |
| 11 | #define IREMM10_PIXEL_CLOCK (IREMM10_MASTER_CLOCK/5) | |
| 12 | #define IREMM10_HTOTAL (318) | |
| 13 | #define IREMM10_HBSTART (248) | |
| 14 | #define IREMM10_HBEND (8) | |
| 15 | #define IREMM10_VTOTAL (262) | |
| 16 | #define IREMM10_VBSTART (240) | |
| 17 | #define IREMM10_VBEND (16) | |
| 18 | ||
| 19 | #define IREMM15_MASTER_CLOCK (11730000) | |
| 20 | ||
| 21 | #define IREMM15_CPU_CLOCK (IREMM15_MASTER_CLOCK/10) | |
| 22 | #define IREMM15_PIXEL_CLOCK (IREMM15_MASTER_CLOCK/2) | |
| 23 | #define IREMM15_HTOTAL (372) | |
| 24 | #define IREMM15_HBSTART (256) | |
| 25 | #define IREMM15_HBEND (0) | |
| 26 | #define IREMM15_VTOTAL (262) | |
| 27 | #define IREMM15_VBSTART (240) | |
| 28 | #define IREMM15_VBEND (16) | |
| 29 | ||
| 30 | typedef struct _irem_state irem_state; | |
| 31 | struct _irem_state | |
| 32 | { | |
| 33 | /* memory pointers */ | |
| 34 | UINT8 * chargen; | |
| 35 | UINT8 * memory; | |
| 36 | UINT8 * rom; | |
| 37 | ||
| 38 | /* machine states */ | |
| 39 | ||
| 40 | /* sound state */ | |
| 41 | ||
| 42 | /* video state */ | |
| 43 | UINT8 bottomline; | |
| 44 | UINT8 flip; | |
| 45 | ||
| 46 | /* Specific states */ | |
| 47 | }; | |
| 48 | ||
| 49 | ||
| 50 | /*----------- defined in video/skychut.c -----------*/ | |
| 51 | ||
| 52 | ||
| 53 | WRITE8_HANDLER( skychut_colorram_w ); | |
| 54 | WRITE8_HANDLER( iremm15_chargen_w ); | |
| 55 | ||
| 56 | VIDEO_UPDATE( iremm10 ); | |
| 57 | VIDEO_UPDATE( iremm15 ); | |
| 58 | ||
| 59 | VIDEO_START( iremm10 ); | |
| 60 | VIDEO_START( iremm15 ); | |
| 61 |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | **************************************************************************/ |
| 7 | 7 | |
| 8 | #define VIDEO_CLOCK XTAL_8MHz /* video (pixel) clock */ | |
| 9 | #define CPU_CLOCK XTAL_12MHz /* clock for 68000-based systems */ | |
| 10 | #define CPU020_CLOCK XTAL_25MHz /* clock for 68EC020-based systems */ | |
| 11 | #define SOUND_CLOCK XTAL_16MHz /* clock for sound board */ | |
| 12 | #define TMS_CLOCK XTAL_40MHz /* TMS320C31 clocks on drivedge */ | |
| 13 | ||
| 14 | ||
| 8 | 15 | /*----------- defined in drivers/itech32.c -----------*/ |
| 9 | 16 | |
| 10 | 17 | void itech32_update_interrupts(int vint, int xint, int qint); |
| r1490 | r1491 | |
|---|---|---|
| 289 | 289 | #define MAX_PLANES 6 /* 0 to 6, inclusive ( but we count from 0 to 5 ) */ |
| 290 | 290 | |
| 291 | 291 | /* Clock speeds */ |
| 292 | #define AMIGA_68000_NTSC_CLOCK 7159090 /* Hz */ | |
| 293 | #define AMIGA_68000_PAL_CLOCK 7093790 /* Hz */ | |
| 294 | #define AMIGA_68EC020_NTSC_CLOCK 14318180 /* Hz */ | |
| 295 | #define AMIGA_68EC020_PAL_CLOCK 14187580 /* Hz */ | |
| 296 | #define CDTV_CLOCK_X1 28636363 /* Hz */ | |
| 297 | #define CDTV_CLOCK_X5 28375160 /* Hz */ | |
| 292 | #define AMIGA_68000_NTSC_CLOCK XTAL_28_63636MHz/4 | |
| 293 | #define AMIGA_68000_PAL_CLOCK XTAL_28_37516MHz/4 | |
| 294 | #define AMIGA_68EC020_NTSC_CLOCK XTAL_28_63636MHz/2 | |
| 295 | #define AMIGA_68EC020_PAL_CLOCK XTAL_28_37516MHz/2 | |
| 296 | #define CDTV_CLOCK_X1 XTAL_28_63636MHz | |
| 297 | #define CDTV_CLOCK_X5 XTAL_28_37516MHz | |
| 298 | 298 | |
| 299 | 299 | |
| 300 | 300 | #define ANGUS_CHIP_RAM_MASK 0x07fffe |
| r1490 | r1491 | |
|---|---|---|
| 46 | 46 | WRITE16_HANDLER( tatsumi_sprite_control_w ); |
| 47 | 47 | WRITE16_HANDLER( roundup5_text_w ); |
| 48 | 48 | WRITE16_HANDLER( roundup5_crt_w ); |
| 49 | READ16_HANDLER( cyclwarr_videoram_r ); | |
| 50 | WRITE16_HANDLER( cyclwarr_videoram_w ); | |
| 51 | READ16_HANDLER( cyclwarr_videoram2_r ); | |
| 52 | WRITE16_HANDLER( cyclwarr_videoram2_w ); | |
| 49 | READ16_HANDLER( cyclwarr_videoram0_r ); | |
| 50 | WRITE16_HANDLER( cyclwarr_videoram0_w ); | |
| 51 | READ16_HANDLER( cyclwarr_videoram1_r ); | |
| 52 | WRITE16_HANDLER( cyclwarr_videoram1_w ); | |
| 53 | 53 | READ16_HANDLER(roundup5_vram_r); |
| 54 | 54 | WRITE16_HANDLER(roundup5_vram_w); |
| 55 | 55 | WRITE16_HANDLER(apache3_palette_w); |
| 56 | 56 | |
| 57 | 57 | extern UINT16* tatsumi_sprite_control_ram; |
| 58 | extern UINT16 *cyclwarr_videoram, *cyclwarr_videoram | |
| 58 | extern UINT16 *cyclwarr_videoram0, *cyclwarr_videoram1; | |
| 59 | 59 | extern UINT16 *roundup_r_ram, *roundup_p_ram, *roundup_l_ram; |
| 60 | 60 | |
| 61 | 61 | VIDEO_START( apache3 ); |
| 62 | 62 | VIDEO_START( roundup5 ); |
| 63 | 63 | VIDEO_START( cyclwarr ); |
| 64 | VIDEO_START( bigfight ); | |
| 65 | ||
| 64 | 66 | VIDEO_UPDATE( roundup5 ); |
| 65 | 67 | VIDEO_UPDATE( apache3 ); |
| 66 | 68 | VIDEO_UPDATE( cyclwarr ); |
| 69 | VIDEO_UPDATE( bigfight ); | |
| 67 | 70 |
| r1490 | r1491 | |
|---|---|---|
| 53 | 53 | WRITE8_HANDLER( mario_gfxbank_w ); |
| 54 | 54 | WRITE8_HANDLER( mario_palettebank_w ); |
| 55 | 55 | WRITE8_HANDLER( mario_scroll_w ); |
| 56 | WRITE8_HANDLER( mario_flip_w ); | |
| 56 | 57 | |
| 57 | 58 | PALETTE_INIT( mario ); |
| 58 | 59 | VIDEO_START( mario ); |
| r1490 | r1491 | |
|---|---|---|
| 49 | 49 | extern UINT8 *atarifb_alphap2_vram; |
| 50 | 50 | extern UINT8 *atarifb_scroll_register; |
| 51 | 51 | |
| 52 | WRITE8_HANDLER( atarifb_scroll_w ); | |
| 53 | WRITE8_HANDLER( atarifb_alphap1_vram_w ); | |
| 54 | WRITE8_HANDLER( atarifb_alphap2_vram_w ); | |
| 55 | ||
| 56 | 52 | VIDEO_UPDATE( atarifb ); |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # MAME target makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
| 1685 | 1685 | |
| 1686 | 1686 | $(DRIVERS)/nbmj8688.o: $(LAYOUT)/nbmj8688.lh |
| 1687 | 1687 | |
| 1688 | $(DRIVERS)/neogeo.o: $(LAYOUT)/neogeo.lh | |
| 1689 | ||
| 1688 | 1690 | $(DRIVERS)/peplus.o: $(LAYOUT)/peplus.lh \ |
| 1689 | 1691 | $(LAYOUT)/pe_schip.lh \ |
| 1690 | 1692 | $(LAYOUT)/pe_poker.lh \ |
| r1490 | r1491 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | /************************************* |
| 24 | 24 | * |
| 25 | * Statics | |
| 26 | * | |
| 27 | *************************************/ | |
| 28 | ||
| 29 | static UINT8 *pfdirty; | |
| 30 | static mame_bitmap *pfbitmap; | |
| 31 | static int xdim, ydim; | |
| 32 | ||
| 33 | ||
| 34 | ||
| 35 | /************************************* | |
| 36 | * | |
| 37 | 25 | * Video system start |
| 38 | 26 | * |
| 39 | 27 | *************************************/ |
| r1490 | r1491 | |
| 77 | 65 | 0, /* callback routine for special entries */ |
| 78 | 66 | }; |
| 79 | 67 | |
| 80 | /* initialize the playfield */ | |
| 81 | rampart_bitmap_init(machine, 43*8, 30*8); | |
| 82 | ||
| 83 | 68 | /* initialize the motion objects */ |
| 84 | 69 | atarimo_init(machine, 0, &modesc); |
| 85 | 70 | |
| 86 | 71 | /* set the intial scroll offset */ |
| 87 | atarimo_set_xscroll(0, - | |
| 72 | atarimo_set_xscroll(0, -12); | |
| 88 | 73 | } |
| 89 | 74 | |
| 90 | 75 | |
| r1490 | r1491 | |
| 114 | 99 | for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++) |
| 115 | 100 | if (mo[x]) |
| 116 | 101 | { |
| 117 | /* not yet verified | |
| 118 | */ | |
| 102 | /* the PCB supports more complex priorities, but the PAL is not stuffed, so we get the default */ | |
| 119 | 103 | pf[x] = mo[x]; |
| 120 | 104 | |
| 121 | 105 | /* erase behind ourselves */ |
| r1490 | r1491 | |
| 129 | 113 | |
| 130 | 114 | /************************************* |
| 131 | 115 | * |
| 132 | * Bitmap initialization | |
| 133 | * | |
| 134 | *************************************/ | |
| 135 | ||
| 136 | void rampart_bitmap_init(running_machine *machine, int _xdim, int _ydim) | |
| 137 | { | |
| 138 | /* set the dimensions */ | |
| 139 | xdim = _xdim; | |
| 140 | ydim = _ydim; | |
| 141 | ||
| 142 | /* allocate dirty map */ | |
| 143 | pfdirty = auto_malloc(sizeof(pfdirty[0]) * ydim); | |
| 144 | memset(pfdirty, 1, sizeof(pfdirty[0]) * ydim); | |
| 145 | ||
| 146 | /* allocate playfield bitmap */ | |
| 147 | pfbitmap = auto_bitmap_alloc(xdim, ydim, machine->screen[0].format); | |
| 148 | } | |
| 149 | ||
| 150 | ||
| 151 | ||
| 152 | /************************************* | |
| 153 | * | |
| 154 | * Bitmap RAM write handler | |
| 155 | * | |
| 156 | *************************************/ | |
| 157 | ||
| 158 | WRITE16_HANDLER( rampart_bitmap_w ) | |
| 159 | { | |
| 160 | int oldword = rampart_bitmap[offset]; | |
| 161 | int newword = oldword; | |
| 162 | int x, y; | |
| 163 | ||
| 164 | COMBINE_DATA(&newword); | |
| 165 | if (oldword != newword) | |
| 166 | { | |
| 167 | rampart_bitmap[offset] = newword; | |
| 168 | ||
| 169 | /* track color usage */ | |
| 170 | x = offset % 256; | |
| 171 | y = offset / 256; | |
| 172 | if (x < xdim && y < ydim) | |
| 173 | pfdirty[y] = 1; | |
| 174 | } | |
| 175 | } | |
| 176 | ||
| 177 | ||
| 178 | ||
| 179 | /************************************* | |
| 180 | * | |
| 181 | 116 | * Bitmap rendering |
| 182 | 117 | * |
| 183 | 118 | *************************************/ |
| r1490 | r1491 | |
| 187 | 122 | int x, y; |
| 188 | 123 | |
| 189 | 124 | /* update any dirty scanlines */ |
| 190 | for (y = 0; y < ydim; y++) | |
| 191 | if (pfdirty[y]) | |
| 192 | { | |
| 193 | const UINT16 *src = &rampart_bitmap[256 * y]; | |
| 194 | UINT8 scanline[512]; | |
| 195 | UINT8 *dst = scanline; | |
| 125 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 126 | { | |
| 127 | const UINT16 *src = &rampart_bitmap[256 * y]; | |
| 128 | UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0); | |
| 196 | 129 | |
| 197 | /* regenerate the line */ | |
| 198 | for (x = 0; x < xdim / 2; x++) | |
| 199 | { | |
| 200 | int bits = *src++; | |
| 201 | *dst++ = bits >> 8; | |
| 202 | *dst++ = bits; | |
| 203 | } | |
| 204 | pfdirty[y] = 0; | |
| 205 | ||
| 206 | /* draw it */ | |
| 207 | draw_scanline8(pfbitmap, 0, y, xdim, scanline, machine->pens, -1); | |
| 130 | /* regenerate the line */ | |
| 131 | for (x = cliprect->min_x & ~1; x <= cliprect->max_x; x += 2) | |
| 132 | { | |
| 133 | int bits = src[(x - 8) / 2]; | |
| 134 | dst[x + 0] = bits >> 8; | |
| 135 | dst[x + 1] = bits & 0xff; | |
| 208 | 136 | } |
| 209 | ||
| 210 | /* copy the cached bitmap */ | |
| 211 | copybitmap(bitmap, pfbitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0); | |
| 137 | } | |
| 212 | 138 | } |
| r1490 | r1491 | |
|---|---|---|
| 75 | 75 | k007121_tilemap[0] = tilemap_create(get_tile_info_A,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); |
| 76 | 76 | k007121_tilemap[1] = tilemap_create(get_tile_info_B,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); |
| 77 | 77 | |
| 78 | k007121_clip[0] = machine->screen[0].visarea; | |
| 79 | k007121_clip[0].min_x += 40; | |
| 80 | ||
| 81 | k007121_clip[1] = machine->screen[0].visarea; | |
| 82 | k007121_clip[1].max_x = 39; | |
| 83 | k007121_clip[1].min_x = 0; | |
| 84 | 78 | } |
| 85 | 79 | |
| 86 | 80 | |
| r1490 | r1491 | |
| 144 | 138 | K007121_ctrlram[0][0x00],K007121_ctrlram[0][0x01],K007121_ctrlram[0][0x02],K007121_ctrlram[0][0x03],K007121_ctrlram[0][0x04],K007121_ctrlram[0][0x05],K007121_ctrlram[0][0x06],K007121_ctrlram[0][0x07], |
| 145 | 139 | K007121_ctrlram[1][0x00],K007121_ctrlram[1][0x01],K007121_ctrlram[1][0x02],K007121_ctrlram[1][0x03],K007121_ctrlram[1][0x04],K007121_ctrlram[1][0x05],K007121_ctrlram[1][0x06],K007121_ctrlram[1][0x07]); |
| 146 | 140 | #endif |
| 141 | if (k007121_flip_screen) | |
| 142 | { | |
| 143 | k007121_clip[0] = Machine->screen[0].visarea; | |
| 144 | k007121_clip[0].max_x -= 40; | |
| 147 | 145 | |
| 148 | /* set scroll registers */ | |
| 149 | tilemap_set_scrollx(k007121_tilemap[0],0,K007121_ctrlram[0][0x00] - 40); | |
| 150 | tilemap_set_scrolly(k007121_tilemap[0],0,K007121_ctrlram[0][0x02]); | |
| 146 | k007121_clip[1] = Machine->screen[0].visarea; | |
| 147 | k007121_clip[1].min_x = k007121_clip[1].max_x-40; | |
| 151 | 148 | |
| 149 | tilemap_set_scrollx(k007121_tilemap[0],0,K007121_ctrlram[0][0x00] - 56 ); | |
| 150 | tilemap_set_scrolly(k007121_tilemap[0],0,K007121_ctrlram[0][0x02]); | |
| 151 | tilemap_set_scrollx(k007121_tilemap[1],0,-16); | |
| 152 | } | |
| 153 | else | |
| 154 | { | |
| 155 | k007121_clip[0] = machine->screen[0].visarea; | |
| 156 | k007121_clip[0].min_x += 40; | |
| 157 | ||
| 158 | k007121_clip[1] = machine->screen[0].visarea; | |
| 159 | k007121_clip[1].max_x = 39; | |
| 160 | k007121_clip[1].min_x = 0; | |
| 161 | ||
| 162 | tilemap_set_scrollx(k007121_tilemap[0],0,K007121_ctrlram[0][0x00] - 40 ); | |
| 163 | tilemap_set_scrolly(k007121_tilemap[0],0,K007121_ctrlram[0][0x02]); | |
| 164 | tilemap_set_scrollx(k007121_tilemap[1],0,0); | |
| 165 | } | |
| 166 | ||
| 152 | 167 | /* compute clipping */ |
| 153 | 168 | final_clip[0] = k007121_clip[0]; |
| 154 | 169 | final_clip[1] = k007121_clip[1]; |
| r1490 | r1491 | |
|---|---|---|
| 1378 | 1378 | |
| 1379 | 1379 | logerror("Configure Screen: HTOTAL: %x HBSTART: %x HBEND: %x VTOTAL: %x VBSTART: %x VBEND: %x\n", |
| 1380 | 1380 | VIDEO_HTOTAL, VIDEO_HBLANK_START, VIDEO_HBLANK_END, VIDEO_VTOTAL, VIDEO_VBLANK_START, VIDEO_VBLANK_END); |
| 1381 | video_screen_configure(0, VIDEO_HTOTAL, VIDEO_VTOTAL, &visarea, | |
| 1381 | video_screen_configure(0, VIDEO_HTOTAL, VIDEO_VTOTAL, &visarea, HZ_TO_ATTOSECONDS(VIDEO_CLOCK) * VIDEO_HTOTAL * VIDEO_VTOTAL); | |
| 1382 | 1382 | } |
| 1383 | 1383 | break; |
| 1384 | 1384 | } |
| r1490 | r1491 | |
|---|---|---|
| 57 | 57 | collision_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); |
| 58 | 58 | |
| 59 | 59 | saa5050_vidram = auto_malloc(0x800); |
| 60 | s2636_1_ram = auto_malloc(0x100); | |
| 61 | s2636_2_ram = auto_malloc(0x100); | |
| 62 | 60 | } |
| 63 | 61 | |
| 64 | 62 | VIDEO_UPDATE( malzak ) |
| r1490 | r1491 | |
| 215 | 213 | s2636_x_offset = -16; |
| 216 | 214 | // s2636_y_offset = -8; |
| 217 | 215 | |
| 218 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,s2636_1_dirty,1,collision_bitmap); | |
| 219 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,s2636_2_dirty,2,collision_bitmap); | |
| 216 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,1,collision_bitmap); | |
| 217 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,2,collision_bitmap); | |
| 220 | 218 | return 0; |
| 221 | 219 | } |
| 222 | 220 |
| r1490 | r1491 | |
|---|---|---|
| 2378 | 2378 | xd = -x_offset; |
| 2379 | 2379 | yd = 8-y_offset; |
| 2380 | 2380 | |
| 2381 | ||
| 2381 | // the multi-screen games need this, check the alignment grid screens.. | |
| 2382 | 2382 | if (chips==2) /* Dual screen */ |
| 2383 | 2383 | { |
| 2384 | if (i==1) xd | |
| 2384 | if (i==1) xd -= ( | |
| 2385 | 2385 | } |
| 2386 | 2386 | if (chips==3) /* Triple screen */ |
| 2387 | 2387 | { |
| 2388 | if (i==1) xd += (286-multiscrn_xoffs); | |
| 2389 | if (i==2) xd += (572-multiscrn_xoffs*2); | |
| 2388 | if (i==1) xd -= multiscrn_xoffs; | |
| 2389 | if (i==2) xd -= multiscrn_xoffs*2; | |
| 2390 | 2390 | } |
| 2391 | #endif | |
| 2392 | 2391 | tilemap_set_scrolldx(TC0100SCN_tilemap[i][0][1], xd-16, -flip_xoffs -xd-16); |
| 2393 | 2392 | tilemap_set_scrolldy(TC0100SCN_tilemap[i][0][1], yd, -flip_yoffs -yd); |
| 2394 | 2393 | tilemap_set_scrolldx(TC0100SCN_tilemap[i][1][1], xd-16, -flip_xoffs -xd-16); |
| r1490 | r1491 | |
|---|---|---|
| 69 | 69 | 0, /* callback routine for special entries */ |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | /* initialize the playfield */ | |
| 73 | rampart_bitmap_init(machine, 43*8, 30*8); | |
| 74 | ||
| 75 | 72 | /* initialize the motion objects */ |
| 76 | 73 | atarimo_init(machine, 0, &modesc); |
| 77 | 74 |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | #include "driver.h" |
| 7 | 7 | #include "dc.h" |
| 8 | #include "cpu/sh4/sh4.h" | |
| 8 | 9 | |
| 9 | #define DEBUG_PVRCTRL (1) | |
| 10 | #define DEBUG_PVRTA (1) | |
| 10 | #define DEBUG_FIFO_POLY (0) | |
| 11 | #define DEBUG_PVRCTRL (0) | |
| 12 | #define DEBUG_PVRTA (0) | |
| 13 | #define DEBUG_PVRTA_REGS (0) | |
| 14 | #define DEBUG_PVRDLIST (0) | |
| 11 | 15 | |
| 12 | 16 | static UINT32 pvrctrl_regs[0x100/4]; |
| 13 | 17 | static UINT32 pvrta_regs[0x2000/4]; |
| 14 | 18 | |
| 15 | VIDEO_START(dc) | |
| 16 | { | |
| 17 | memset(pvrctrl_regs, 0, sizeof(pvrctrl_regs)); | |
| 18 | memset(pvrta_regs, 0, sizeof(pvrta_regs)); | |
| 19 | UINT64 *dc_texture_ram; | |
| 20 | static UINT32 tafifo_buff[32]; | |
| 21 | static int tafifo_pos, tafifo_mask, tafifo_vertexwords, tafifo_listtype; | |
| 22 | static int start_render_received; | |
| 19 | 23 | |
| 20 | pvrta_regs[0] = 0x17fd11db; // vendor and device ID of HOLLY chip | |
| 21 | pvrta_regs[1] = 1; // chip revision | |
| 22 | } | |
| 23 | ||
| 24 | VIDEO_UPDATE(dc) | |
| 24 | struct testsprites | |
| 25 | 25 | { |
| 26 | dc_vblank(); | |
| 26 | int positionx, positiony; | |
| 27 | int sizex, sizey; | |
| 28 | UINT32 textureaddress; | |
| 29 | float u, v, du, dv; | |
| 30 | int texturemode; | |
| 31 | int texturesizex, texturesizey, texturesizes, texturepf; | |
| 32 | } showsprites[2048]; | |
| 27 | 33 | |
| 28 | return 0; | |
| 29 | } | |
| 34 | static int testsprites_size, toerasesprites; | |
| 35 | static UINT32 dilated0[11][1024]; | |
| 36 | static UINT32 dilated1[11][1024]; | |
| 37 | static int dilatechose[64]; | |
| 30 | 38 | |
| 31 | 39 | // register decode helper |
| 32 | ||
| 33 | 40 | INLINE int decode_reg_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift) |
| 34 | 41 | { |
| 35 | 42 | int reg = offset * 2; |
| 36 | 43 | |
| 37 | 44 | *shift = 0; |
| 38 | 45 | |
| 46 | // non 32-bit accesses have not yet been seen here, we need to know when they are | |
| 47 | if ((mem_mask != U64(0x00000000ffffffff)) && (mem_mask != U64(0xffffffff00000000))) | |
| 48 | { | |
| 49 | assert_always(0, "Wrong mask!\n"); | |
| 50 | } | |
| 51 | ||
| 39 | 52 | if (mem_mask == U64(0x00000000ffffffff)) |
| 40 | 53 | { |
| 41 | 54 | reg++; |
| r1490 | r1491 | |
| 80 | 93 | |
| 81 | 94 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 82 | 95 | |
| 96 | switch (reg) | |
| 97 | { | |
| 98 | case SPG_STATUS: | |
| 99 | pvrta_regs[reg] = (video_screen_get_vblank(0) << 13) | (video_screen_get_hblank(0) << 12) | (video_screen_get_vpos(0) & 0x3ff); | |
| 100 | break; | |
| 101 | } | |
| 102 | ||
| 83 | 103 | #if DEBUG_PVRTA |
| 84 | 104 | mame_printf_verbose("PVRTA: read %x @ %x (reg %x), mask %llx (PC=%x)\n", pvrta_regs[reg], offset, reg, mem_mask, activecpu_get_pc()); |
| 85 | 105 | #endif |
| 86 | ||
| 87 | 106 | return (UINT64)pvrta_regs[reg] << shift; |
| 88 | 107 | } |
| 89 | 108 | |
| r1490 | r1491 | |
| 91 | 110 | { |
| 92 | 111 | int reg; |
| 93 | 112 | UINT64 shift; |
| 113 | UINT32 old,dat; | |
| 94 | 114 | |
| 95 | 115 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 116 | dat = (UINT32)(data >> shift); | |
| 117 | old = pvrta_regs[reg]; | |
| 118 | pvrta_regs[reg] = dat; // 5f8000+reg*4=dat | |
| 119 | switch (reg) | |
| 120 | { | |
| 121 | case SOFTRESET: | |
| 122 | #if DEBUG_PVRTA_REGS | |
| 123 | if (dat & 1) | |
| 124 | { | |
| 125 | mame_printf_verbose("pvr_ta_w: TA soft reset\n"); | |
| 126 | } | |
| 127 | if (dat & 2) | |
| 128 | { | |
| 129 | mame_printf_verbose("pvr_ta_w: Core Pipeline soft reset\n"); | |
| 130 | } | |
| 131 | if (dat & 4) | |
| 132 | { | |
| 133 | mame_printf_verbose("pvr_ta_w: sdram I/F soft reset\n"); | |
| 134 | } | |
| 135 | #endif | |
| 136 | break; | |
| 137 | case STARTRENDER: | |
| 138 | start_render_received=1; | |
| 139 | break; | |
| 140 | case TA_LIST_INIT: | |
| 141 | tafifo_pos=0; | |
| 142 | tafifo_mask=7; | |
| 143 | tafifo_vertexwords=8; | |
| 144 | tafifo_listtype= -1; | |
| 145 | toerasesprites=1; | |
| 146 | break; | |
| 147 | } | |
| 96 | 148 | |
| 97 | 149 | #if DEBUG_PVRTA |
| 98 | 150 | mame_printf_verbose("PVRTA: write %llx to %x (reg %x %x), mask %llx\n", data>>shift, offset, reg, (reg*4)+0x8000, mem_mask); |
| 99 | 151 | #endif |
| 100 | ||
| 101 | pvrta_regs[reg] |= data >> shift; | |
| 102 | 152 | } |
| 103 | 153 | |
| 104 | ||
| 105 | 154 | WRITE64_HANDLER( ta_fifo_poly_w ) |
| 106 | 155 | { |
| 107 | mame_printf_verbose("Poly FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 156 | UINT32 a; | |
| 157 | static UINT32 paracontrol,paratype,endofstrip,listtype; | |
| 158 | static UINT32 groupcontrol,groupen,striplen,userclip; | |
| 159 | static UINT32 objcontrol,shadow,volume,coltype,texture,offfset,gouraud,uv16bit; | |
| 160 | static UINT32 textureusize,texturevsize,texturesizes,textureaddress,scanorder,pixelformat; | |
| 161 | static UINT32 srcalphainstr,dstalphainstr,srcselect,dstselect,fogcontrol,colorclamp,usealpha; | |
| 162 | static UINT32 ignoretexalpha,flipuv,clampuv,filtermode,sstexture,mmdadjust,tsinstruction; | |
| 163 | static UINT32 depthcomparemode,cullingmode,zwritedisable,cachebypass,dcalcctrl,volumeinstruction,mipmapped,vqcompressed,strideselect; | |
| 164 | ||
| 165 | if (!mem_mask) // 64 bit | |
| 166 | { | |
| 167 | tafifo_buff[tafifo_pos]=(UINT32)data; | |
| 168 | tafifo_buff[tafifo_pos+1]=(UINT32)(data >> 32); | |
| 169 | #if DEBUG_FIFO_POLY | |
| 170 | mame_printf_debug("ta_fifo_poly_w: Unmapped write64 %08x = %llx -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[tafifo_pos], tafifo_buff[tafifo_pos+1]); | |
| 171 | #endif | |
| 172 | tafifo_pos += 2; | |
| 173 | } | |
| 174 | else | |
| 175 | { | |
| 176 | logerror("ta_fifo_poly_w: Only 64 bit writes supported!\n"); | |
| 177 | } | |
| 178 | ||
| 179 | tafifo_pos &= tafifo_mask; | |
| 180 | if (tafifo_pos == 0) | |
| 181 | { | |
| 182 | paracontrol=(tafifo_buff[0] >> 24) & 0xff; | |
| 183 | ||
| 184 | // 0 end of list | |
| 185 | // 1 user tile clip | |
| 186 | // 2 object list set | |
| 187 | // 3 reserved | |
| 188 | // 4 polygon/modifier volume | |
| 189 | // 5 sprite | |
| 190 | // 6 reserved | |
| 191 | // 7 vertex | |
| 192 | paratype=(paracontrol >> 5) & 7; | |
| 193 | endofstrip=(paracontrol >> 4) & 1; | |
| 194 | listtype=(paracontrol >> 0) & 7; | |
| 195 | groupcontrol=(tafifo_buff[0] >> 16) & 0xff; | |
| 196 | groupen=(groupcontrol >> 7) & 1; | |
| 197 | striplen=(groupcontrol >> 2) & 3; | |
| 198 | userclip=(groupcontrol >> 0) & 3; | |
| 199 | objcontrol=(tafifo_buff[0] >> 0) & 0xffff; | |
| 200 | shadow=(objcontrol >> 7) & 1; | |
| 201 | volume=(objcontrol >> 6) & 1; | |
| 202 | coltype=(objcontrol >> 4) & 3; | |
| 203 | texture=(objcontrol >> 3) & 1; | |
| 204 | offfset=(objcontrol >> 2) & 1; | |
| 205 | gouraud=(objcontrol >> 1) & 1; | |
| 206 | uv16bit=(objcontrol >> 0) & 1; | |
| 207 | ||
| 208 | if (toerasesprites == 1) | |
| 209 | { | |
| 210 | toerasesprites=0; | |
| 211 | testsprites_size=0; | |
| 212 | } | |
| 213 | ||
| 214 | // check if we need 8 words more | |
| 215 | if (tafifo_mask == 7) | |
| 216 | { | |
| 217 | if ((paratype == 4) && (((coltype >= 2) && (offfset == 1)) || ((coltype >= 2) && (volume == 1)))) | |
| 218 | { | |
| 219 | tafifo_mask = 15; | |
| 220 | tafifo_pos = 8; | |
| 221 | return; | |
| 222 | } | |
| 223 | ||
| 224 | if ((paratype == 7) && (tafifo_vertexwords == 16)) | |
| 225 | { | |
| 226 | tafifo_mask = 15; | |
| 227 | tafifo_pos = 8; | |
| 228 | return; | |
| 229 | } | |
| 230 | } | |
| 231 | else | |
| 232 | { | |
| 233 | tafifo_mask = 7; | |
| 234 | } | |
| 235 | ||
| 236 | // now we heve all the needed words | |
| 237 | // interpret their meaning | |
| 238 | if (tafifo_buff[0] == 0) | |
| 239 | { | |
| 240 | a=0; // 6-10 0-3 | |
| 241 | switch (tafifo_listtype) | |
| 242 | { | |
| 243 | case 0: | |
| 244 | a = 1 << 7; | |
| 245 | break; | |
| 246 | case 1: | |
| 247 | a = 1 << 8; | |
| 248 | break; | |
| 249 | case 2: | |
| 250 | a = 1 << 9; | |
| 251 | break; | |
| 252 | case 3: | |
| 253 | a = 1 << 10; | |
| 254 | break; | |
| 255 | case 4: | |
| 256 | a = 1 << 21; | |
| 257 | break; | |
| 258 | break; | |
| 259 | } | |
| 260 | sysctrl_regs[SB_ISTNRM] |= a; | |
| 261 | update_interrupt_status(); | |
| 262 | tafifo_listtype= -1; | |
| 263 | } | |
| 264 | else | |
| 265 | { | |
| 266 | #if DEBUG_PVRDLIST | |
| 267 | mame_printf_verbose("Para Type %d End of Strip %d List Type %d\n", paratype, endofstrip, listtype); | |
| 268 | #endif | |
| 269 | ||
| 270 | if (((paratype == 4) && (texture == 1)) || (paratype == 5)) | |
| 271 | { | |
| 272 | depthcomparemode=(tafifo_buff[1] >> 29) & 7; | |
| 273 | cullingmode=(tafifo_buff[1] >> 27) & 3; | |
| 274 | zwritedisable=(tafifo_buff[1] >> 26) & 1; | |
| 275 | cachebypass=(tafifo_buff[1] >> 21) & 1; | |
| 276 | dcalcctrl=(tafifo_buff[1] >> 20) & 1; | |
| 277 | volumeinstruction=(tafifo_buff[1] >> 29) & 7; | |
| 278 | textureusize=1 << (3+((tafifo_buff[2] >> 3) & 7)); | |
| 279 | texturevsize=1 << (3+(tafifo_buff[2] & 7)); | |
| 280 | texturesizes=tafifo_buff[2] & 0x3f; | |
| 281 | srcalphainstr=(tafifo_buff[2] >> 29) & 7; | |
| 282 | dstalphainstr=(tafifo_buff[2] >> 26) & 7; | |
| 283 | srcselect=(tafifo_buff[2] >> 25) & 1; | |
| 284 | dstselect=(tafifo_buff[2] >> 24) & 1; | |
| 285 | fogcontrol=(tafifo_buff[2] >> 22) & 3; | |
| 286 | colorclamp=(tafifo_buff[2] >> 21) & 1; | |
| 287 | usealpha=(tafifo_buff[2] >> 20) & 1; | |
| 288 | ignoretexalpha=(tafifo_buff[2] >> 19) & 1; | |
| 289 | flipuv=(tafifo_buff[2] >> 17) & 3; | |
| 290 | clampuv=(tafifo_buff[2] >> 15) & 3; | |
| 291 | filtermode=(tafifo_buff[2] >> 13) & 3; | |
| 292 | sstexture=(tafifo_buff[2] >> 12) & 1; | |
| 293 | mmdadjust=(tafifo_buff[2] >> 8) & 1; | |
| 294 | tsinstruction=(tafifo_buff[2] >> 6) & 3; | |
| 295 | textureaddress=(tafifo_buff[3] & 0x1FFFFF) << 3; | |
| 296 | scanorder=(tafifo_buff[3] >> 26) & 1; | |
| 297 | pixelformat=(tafifo_buff[3] >> 27) & 7; | |
| 298 | mipmapped=(tafifo_buff[3] >> 31) & 1; | |
| 299 | vqcompressed=(tafifo_buff[3] >> 30) & 1; | |
| 300 | strideselect=(tafifo_buff[3] >> 25) & 1; | |
| 301 | ||
| 302 | #if DEBUG_PVRDLIST | |
| 303 | mame_printf_verbose(" Texture %d x %d at %08x format %d\n", textureusize, texturevsize, (tafifo_buff[3] & 0x1FFFFF) << 3, pixelformat); | |
| 304 | #endif | |
| 305 | } | |
| 306 | ||
| 307 | if (paratype == 7) | |
| 308 | { // vertex | |
| 309 | #if DEBUG_PVRDLIST | |
| 310 | mame_printf_verbose(" test vertex "); | |
| 311 | for (a=1; a <= 11; a++) | |
| 312 | { | |
| 313 | mame_printf_verbose(" %e", u2f(tafifo_buff[a])); | |
| 314 | } | |
| 315 | mame_printf_verbose("\n"); | |
| 316 | mame_printf_verbose(" %e %e %e %e %e %e\n",u2f(tafifo_buff[13] & 0xffff0000),u2f((tafifo_buff[13] & 0xffff) << 16),u2f(tafifo_buff[14] & 0xffff0000),u2f((tafifo_buff[14] & 0xffff) << 16),u2f(tafifo_buff[15] & 0xffff0000),u2f((tafifo_buff[15] & 0xffff) << 16)); | |
| 317 | #endif | |
| 318 | /* test video start */ | |
| 319 | // pixely=u2f((tafifo_buff[13] & 0xffff) << 16)*1024 | |
| 320 | showsprites[testsprites_size].positionx=u2f(tafifo_buff[1]); | |
| 321 | showsprites[testsprites_size].positiony=u2f(tafifo_buff[2]); | |
| 322 | showsprites[testsprites_size].sizex=u2f(tafifo_buff[4])-u2f(tafifo_buff[1]); | |
| 323 | showsprites[testsprites_size].sizey=u2f(tafifo_buff[8])-u2f(tafifo_buff[2]); | |
| 324 | showsprites[testsprites_size].u=u2f(tafifo_buff[13] & 0xffff0000); | |
| 325 | showsprites[testsprites_size].v=u2f((tafifo_buff[13] & 0xffff) << 16); | |
| 326 | showsprites[testsprites_size].du=u2f(tafifo_buff[14] & 0xffff0000)-showsprites[testsprites_size].u; | |
| 327 | showsprites[testsprites_size].dv=u2f((tafifo_buff[15] & 0xffff) << 16)-showsprites[testsprites_size].v; | |
| 328 | showsprites[testsprites_size].textureaddress=textureaddress; | |
| 329 | showsprites[testsprites_size].texturesizex=textureusize; | |
| 330 | showsprites[testsprites_size].texturesizey=texturevsize; | |
| 331 | showsprites[testsprites_size].texturemode=scanorder; | |
| 332 | showsprites[testsprites_size].texturesizes=texturesizes; | |
| 333 | showsprites[testsprites_size].texturepf=pixelformat; | |
| 334 | testsprites_size=testsprites_size+1; | |
| 335 | /* test video end */ | |
| 336 | } | |
| 337 | ||
| 338 | if (paratype != 7) | |
| 339 | { | |
| 340 | tafifo_vertexwords=8; | |
| 341 | } | |
| 342 | if (((paratype == 4) && ((texture == 1) || (coltype == 1))) || (paratype == 5)) | |
| 343 | { | |
| 344 | tafifo_vertexwords=16; | |
| 345 | } | |
| 346 | if ((paratype == 4) || (paratype == 5) || (paratype == 6)) | |
| 347 | { | |
| 348 | if (tafifo_listtype < 0) | |
| 349 | { | |
| 350 | tafifo_listtype = listtype; | |
| 351 | } | |
| 352 | } | |
| 353 | } | |
| 354 | } // if (tafifo_pos == 0) | |
| 108 | 355 | } |
| 109 | 356 | |
| 110 | 357 | WRITE64_HANDLER( ta_fifo_yuv_w ) |
| 111 | 358 | { |
| 112 | 359 | mame_printf_verbose("YUV FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask); |
| 113 | 360 | } |
| 361 | ||
| 362 | /* test video start */ | |
| 363 | UINT32 dilate0(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 364 | { | |
| 365 | UINT32 x,m1,m2,m3; | |
| 366 | int a; | |
| 367 | ||
| 368 | x = value; | |
| 369 | for (a=0;a < bits;a++) | |
| 370 | { | |
| 371 | m2 = 1 << (a << 1); | |
| 372 | m1 = m2 - 1; | |
| 373 | m3 = (~m1) << 1; | |
| 374 | x = (x & m1) + (x & m2) + ((x & m3) << 1); | |
| 375 | } | |
| 376 | return x; | |
| 377 | } | |
| 378 | ||
| 379 | UINT32 dilate1(UINT32 value,int bits) // dilate first "bits" bits in "value" | |
| 380 | { | |
| 381 | UINT32 x,m1,m2,m3; | |
| 382 | int a; | |
| 383 | ||
| 384 | x = value; | |
| 385 | for (a=0;a < bits;a++) | |
| 386 | { | |
| 387 | m2 = 1 << (a << 1); | |
| 388 | m1 = m2 - 1; | |
| 389 | m3 = (~m1) << 1; | |
| 390 | x = (x & m1) + ((x & m2) << 1) + ((x & m3) << 1); | |
| 391 | } | |
| 392 | return x; | |
| 393 | } | |
| 394 | ||
| 395 | void computedilated(void) | |
| 396 | { | |
| 397 | int a,b; | |
| 398 | ||
| 399 | for (b=0;b <= 10;b++) | |
| 400 | for (a=0;a < 1024;a++) { | |
| 401 | dilated0[b][a]=dilate0(a,b); | |
| 402 | dilated1[b][a]=dilate1(a,b); | |
| 403 | } | |
| 404 | for (b=0;b <= 7;b++) | |
| 405 | for (a=0;a < 7;a++) | |
| 406 | dilatechose[(b << 3) + a]=3+(a < b ? a : b); | |
| 407 | } | |
| 408 | ||
| 409 | void testdrawscreen(bitmap_t *bitmap,const rectangle *cliprect) | |
| 410 | { | |
| 411 | int cs,x,y,dx,dy,xi,yi,a; | |
| 412 | float iu,iv,u,v; | |
| 413 | UINT32 addrp; | |
| 414 | UINT32 *bmpaddr; | |
| 415 | int c,xt,yt,cd; | |
| 416 | ||
| 417 | fillbitmap(bitmap,MAKE_RGB(128,128,128),cliprect); | |
| 418 | for (cs=0;cs < testsprites_size;cs++) | |
| 419 | { | |
| 420 | dx=showsprites[cs].sizex; | |
| 421 | dy=showsprites[cs].sizey; | |
| 422 | iu=showsprites[cs].du/dx; | |
| 423 | iv=showsprites[cs].dv/dy; | |
| 424 | cd=dilatechose[showsprites[cs].texturesizes]; | |
| 425 | ||
| 426 | if ((showsprites[cs].positionx+dx) > 640) | |
| 427 | dx=640-showsprites[cs].positionx; | |
| 428 | if ((showsprites[cs].positiony+dy) > 480) | |
| 429 | dy=480-showsprites[cs].positiony; | |
| 430 | xi=0; | |
| 431 | yi=0; | |
| 432 | ||
| 433 | if (showsprites[cs].positionx < 0) | |
| 434 | xi=-showsprites[cs].positionx; | |
| 435 | if (showsprites[cs].positiony < 0) | |
| 436 | yi=-showsprites[cs].positiony; | |
| 437 | ||
| 438 | for (y = yi;y < dy;y++) | |
| 439 | { | |
| 440 | for (x = xi;x < dx;x++) | |
| 441 | { | |
| 442 | u=showsprites[cs].u+iu*x; | |
| 443 | v=showsprites[cs].v+iv*y; | |
| 444 | yt=v*(showsprites[cs].texturesizey-1); | |
| 445 | xt=u*(showsprites[cs].texturesizex-1); | |
| 446 | ||
| 447 | if (showsprites[cs].texturemode == 1) | |
| 448 | addrp=showsprites[cs].textureaddress+(showsprites[cs].texturesizex*yt+xt)*2; | |
| 449 | else | |
| 450 | addrp=showsprites[cs].textureaddress+(dilated1[cd][xt] + dilated0[cd][yt])*2; | |
| 451 | ||
| 452 | c=*(((UINT16 *)dc_texture_ram) + (WORD2_XOR_LE(addrp) >> 1)); | |
| 453 | if (showsprites[cs].texturepf == 2) | |
| 454 | { | |
| 455 | a=(c & 0xf000) >> 8; | |
| 456 | bmpaddr=BITMAP_ADDR32(bitmap,showsprites[cs].positiony+y,showsprites[cs].positionx+x); | |
| 457 | *bmpaddr = alpha_blend_r32(*bmpaddr, MAKE_RGB((c&0xf00) >> 4, c&0xf0, (c&0xf) << 4), a); | |
| 458 | } | |
| 459 | else | |
| 460 | { | |
| 461 | a=(c & 0x7000) >> 7; | |
| 462 | bmpaddr=BITMAP_ADDR32(bitmap,showsprites[cs].positiony+y,showsprites[cs].positionx+x); | |
| 463 | *bmpaddr = alpha_blend_r32(*bmpaddr, MAKE_RGB((c&0x7c00) >> 7, (c&0x3e0) >> 2, (c&0x1f) << 3), a); | |
| 464 | } | |
| 465 | } | |
| 466 | } | |
| 467 | } | |
| 468 | } | |
| 469 | /* test video end */ | |
| 470 | ||
| 471 | VIDEO_START(dc) | |
| 472 | { | |
| 473 | memset(pvrctrl_regs, 0, sizeof(pvrctrl_regs)); | |
| 474 | memset(pvrta_regs, 0, sizeof(pvrta_regs)); | |
| 475 | ||
| 476 | // if the next 2 registers do not have the correct values, the naomi bios will hang | |
| 477 | pvrta_regs[PVRID]=0x17fd11db; | |
| 478 | pvrta_regs[REVISION]=0x11; | |
| 479 | pvrta_regs[VO_CONTROL]=0xC; | |
| 480 | pvrta_regs[SOFTRESET]=0x7; | |
| 481 | tafifo_pos=0; | |
| 482 | tafifo_mask=7; | |
| 483 | tafifo_vertexwords=8; | |
| 484 | tafifo_listtype= -1; | |
| 485 | start_render_received=0; | |
| 486 | ||
| 487 | testsprites_size=0; | |
| 488 | toerasesprites=0; | |
| 489 | computedilated(); | |
| 490 | } | |
| 491 | ||
| 492 | VIDEO_UPDATE(dc) | |
| 493 | { | |
| 494 | int a; | |
| 495 | ||
| 496 | if (pvrta_regs[VO_CONTROL] & (1 << 3)) | |
| 497 | { | |
| 498 | fillbitmap(bitmap,pvrta_regs[VO_BORDER_COL] & 0xFFFFFF,cliprect); | |
| 499 | return 0; | |
| 500 | } | |
| 501 | ||
| 502 | testdrawscreen(bitmap,cliprect); | |
| 503 | ||
| 504 | if (start_render_received) | |
| 505 | { | |
| 506 | start_render_received=0; | |
| 507 | a=4; // tsp end | |
| 508 | sysctrl_regs[SB_ISTNRM] |= a; | |
| 509 | update_interrupt_status(); | |
| 510 | } | |
| 511 | return 0; | |
| 512 | } | |
| 513 | ||
| 514 | void dc_vblank(void) | |
| 515 | { | |
| 516 | sysctrl_regs[SB_ISTNRM] |= 0x08; // V Blank-in interrupt | |
| 517 | update_interrupt_status(); | |
| 518 | } | |
| 519 |
| r1490 | r1491 | |
|---|---|---|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | |
| 133 | int suprridr_is_screen_flipped(void) | |
| 134 | { | |
| 135 | return flipx; /* or is it flipy? */ | |
| 136 | } | |
| 133 | 137 | |
| 138 | ||
| 139 | ||
| 134 | 140 | /************************************* |
| 135 | 141 | * |
| 136 | 142 | * Video RAM writes |
| r1490 | r1491 | |
|---|---|---|
| 1 | /* | |
| 1 | /*************************************************************************** | |
| 2 | 2 | |
| 3 | 3 | atarirle.c |
| 4 | 4 | |
| 5 | 5 | RLE sprite handling for early-to-mid 90's Atari raster games. |
| 6 | 6 | |
| 7 | ||
| 7 | **************************************************************************** | |
| 8 | 8 | |
| 9 | 9 | Description: |
| 10 | 10 | |
| r1490 | r1491 | |
| 16 | 16 | See the bottom of the source for more details on the operation of these |
| 17 | 17 | components. |
| 18 | 18 | |
| 19 | ||
| 19 | ***************************************************************************/ | |
| 20 | 20 | |
| 21 | 21 | #include "driver.h" |
| 22 | 22 | #include "atarirle.h" |
| 23 | 23 | |
| 24 | 24 | |
| 25 | /* | |
| 25 | /*************************************************************************** | |
| 26 | 26 | TYPES & STRUCTURES |
| 27 | ||
| 27 | ***************************************************************************/ | |
| 28 | 28 | |
| 29 | 29 | /* internal structure containing a word index, shift and mask */ |
| 30 | typedef struct atarirle_mask atarirle_mask; | |
| 30 | 31 | struct atarirle_mask |
| 31 | 32 | { |
| 32 | int word; /* word index */ | |
| 33 | int shift; /* shift amount */ | |
| 34 | int mask; /* final mask */ | |
| 33 | int word; /* word index */ | |
| 34 | int shift; /* shift amount */ | |
| 35 | int mask; /* final mask */ | |
| 35 | 36 | }; |
| 36 | 37 | |
| 37 | 38 | /* internal structure for sorting the motion objects */ |
| 39 | typedef struct mo_sort_entry mo_sort_entry; | |
| 38 | 40 | struct mo_sort_entry |
| 39 | 41 | { |
| 40 | struct mo_sort_entry *next; | |
| 41 | int entry; | |
| 42 | mo_sort_entry * next; | |
| 43 | int entry; | |
| 42 | 44 | }; |
| 43 | 45 | |
| 44 | 46 | /* internal structure describing each object in the ROMs */ |
| 47 | typedef struct atarirle_info atarirle_info; | |
| 45 | 48 | struct atarirle_info |
| 46 | 49 | { |
| 47 | INT16 width; | |
| 48 | INT16 height; | |
| 49 | INT16 xoffs; | |
| 50 | INT16 yoffs; | |
| 51 | UINT8 bpp; | |
| 50 | INT16 width; | |
| 51 | INT16 height; | |
| 52 | INT16 xoffs; | |
| 53 | INT16 yoffs; | |
| 54 | UINT8 bpp; | |
| 52 | 55 | const UINT16 * table; |
| 53 | 56 | const UINT16 * data; |
| 54 | 57 | }; |
| 55 | 58 | |
| 56 | 59 | /* internal structure containing the state of the motion objects */ |
| 60 | typedef struct atarirle_data atarirle_data; | |
| 57 | 61 | struct atarirle_data |
| 58 | 62 | { |
| 59 | int bitmapwidth; /* width of the full playfield bitmap */ | |
| 60 | int bitmapheight; /* height of the full playfield bitmap */ | |
| 61 | int bitmapxmask; /* x coordinate mask for the playfield bitmap */ | |
| 62 | int bitmapymask; /* y coordinate mask for the playfield bitmap */ | |
| 63 | int bitmapwidth; /* width of the full playfield bitmap */ | |
| 64 | int bitmapheight; /* height of the full playfield bitmap */ | |
| 65 | int bitmapxmask; /* x coordinate mask for the playfield bitmap */ | |
| 66 | int bitmapymask; /* y coordinate mask for the playfield bitmap */ | |
| 63 | 67 | |
| 64 | int spriterammask; /* combined mask when accessing sprite RAM with raw addresses */ | |
| 65 | int spriteramsize; /* total size of sprite RAM, in entries */ | |
| 68 | int spriterammask; /* combined mask when accessing sprite RAM with raw addresses */ | |
| 69 | int spriteramsize; /* total size of sprite RAM, in entries */ | |
| 66 | 70 | |
| 67 | int palettebase; /* base palette entry */ | |
| 68 | int maxcolors; /* maximum number of colors */ | |
| 71 | int palettebase; /* base palette entry */ | |
| 72 | int maxcolors; /* maximum number of colors */ | |
| 69 | 73 | |
| 70 | rectangle cliprect; /* clipping rectangle */ | |
| 74 | rectangle cliprect; /* clipping rectangle */ | |
| 71 | 75 | |
| 72 | struct atarirle_mask codemask; /* mask for the code index */ | |
| 73 | struct atarirle_mask colormask; /* mask for the color */ | |
| 74 | struct atarirle_mask xposmask; /* mask for the X position */ | |
| 75 | struct atarirle_mask yposmask; /* mask for the Y position */ | |
| 76 | struct atarirle_mask scalemask; /* mask for the scale factor */ | |
| 77 | struct atarirle_mask hflipmask; /* mask for the horizontal flip */ | |
| 78 | struct atarirle_mask ordermask; /* mask for the order */ | |
| 79 | struct atarirle_mask prioritymask; /* mask for the priority */ | |
| 80 | struct atarirle_mask vrammask; /* mask for the VRAM target */ | |
| 76 | atarirle_mask codemask; /* mask for the code index */ | |
| 77 | atarirle_mask colormask; /* mask for the color */ | |
| 78 | atarirle_mask xposmask; /* mask for the X position */ | |
| 79 | atarirle_mask yposmask; /* mask for the Y position */ | |
| 80 | atarirle_mask scalemask; /* mask for the scale factor */ | |
| 81 | atarirle_mask hflipmask; /* mask for the horizontal flip */ | |
| 82 | atarirle_mask ordermask; /* mask for the order */ | |
| 83 | atarirle_mask prioritymask; /* mask for the priority */ | |
| 84 | atarirle_mask vrammask; /* mask for the VRAM target */ | |
| 81 | 85 | |
| 82 | 86 | const UINT16 * rombase; /* pointer to the base of the GFX ROM */ |
| 83 | int romlength; /* length of the GFX ROM */ | |
| 84 | int objectcount; /* number of objects in the ROM */ | |
| 85 | struct atarirle_info *info; /* list of info records */ | |
| 86 | struct atarirle_entry *spriteram; /* pointer to sprite RAM */ | |
| 87 | int romlength; /* length of the GFX ROM */ | |
| 88 | int objectcount; /* number of objects in the ROM */ | |
| 89 | atarirle_info * info; /* list of info records */ | |
| 90 | atarirle_entry *spriteram; /* pointer to sprite RAM */ | |
| 87 | 91 | |
| 88 | mame_bitmap *vram[2][2]; /* pointers to VRAM bitmaps and backbuffers */ | |
| 89 | int partial_scanline; /* partial update scanline */ | |
| 92 | mame_bitmap * vram[2][2]; /* pointers to VRAM bitmaps and backbuffers */ | |
| 93 | int partial_scanline; /* partial update scanline */ | |
| 90 | 94 | |
| 91 | UINT8 control_bits; /* current control bits */ | |
| 92 | UINT8 command; /* current command */ | |
| 93 | UINT8 is32bit; /* 32-bit or 16-bit? */ | |
| 94 | UINT16 checksums[256]; /* checksums for each 0x40000 bytes */ | |
| 95 | UINT8 control_bits; /* current control bits */ | |
| 96 | UINT8 command; /* current command */ | |
| 97 | UINT8 is32bit; /* 32-bit or 16-bit? */ | |
| 98 | UINT16 checksums[256]; /* checksums for each 0x40000 bytes */ | |
| 95 | 99 | }; |
| 96 | 100 | |
| 97 | 101 | |
| 98 | 102 | |
| 99 | /* | |
| 103 | /*************************************************************************** | |
| 100 | 104 | MACROS |
| 101 | ||
| 105 | ***************************************************************************/ | |
| 102 | 106 | |
| 103 | 107 | /* data extraction */ |
| 104 | 108 | #define EXTRACT_DATA(_input, _mask) (((_input)->data[(_mask).word] >> (_mask).shift) & (_mask).mask) |
| 105 | 109 | |
| 106 | 110 | |
| 107 | 111 | |
| 108 | /* | |
| 112 | /*************************************************************************** | |
| 109 | 113 | GLOBAL VARIABLES |
| 110 | ||
| 114 | ***************************************************************************/ | |
| 111 | 115 | |
| 112 | 116 | UINT16 *atarirle_0_spriteram; |
| 113 | 117 | UINT32 *atarirle_0_spriteram32; |
| 114 | 118 | |
| 115 | //UINT16 *atarirle_0_command; | |
| 116 | //UINT32 *atarirle_0_command32; | |
| 117 | ||
| 118 | //UINT16 *atarirle_0_table; | |
| 119 | //UINT32 *atarirle_0_table32; | |
| 120 | ||
| 121 | 119 | static int atarirle_hilite_index = -1; |
| 122 | 120 | |
| 123 | 121 | |
| 124 | 122 | |
| 125 | /* | |
| 123 | /*************************************************************************** | |
| 126 | 124 | STATIC VARIABLES |
| 127 | ||
| 125 | ***************************************************************************/ | |
| 128 | 126 | |
| 129 | static | |
| 127 | static | |
| 130 | 128 | |
| 131 | 129 | static UINT8 rle_bpp[8]; |
| 132 | 130 | static UINT16 *rle_table[8]; |
| 133 | 131 | |
| 134 | 132 | |
| 135 | 133 | |
| 136 | /* | |
| 134 | /*************************************************************************** | |
| 137 | 135 | STATIC FUNCTION DECLARATIONS |
| 138 | ||
| 136 | ***************************************************************************/ | |
| 139 | 137 | |
| 140 | 138 | static void build_rle_tables(void); |
| 141 | 139 | static int count_objects(const UINT16 *base, int length); |
| 142 | static void prescan_rle(const struct atarirle_data *mo, int which); | |
| 143 | static void sort_and_render(struct atarirle_data *mo); | |
| 144 | static void compute_checksum(struct atarirle_data *mo); | |
| 145 | static void draw_rle(struct atarirle_data *mo, mame_bitmap *bitmap, int code, int color, int hflip, int vflip, | |
| 140 | static void prescan_rle(const atarirle_data *mo, int which); | |
| 141 | static void sort_and_render(atarirle_data *mo); | |
| 142 | static void compute_checksum(atarirle_data *mo); | |
| 143 | static void draw_rle(atarirle_data *mo, mame_bitmap *bitmap, int code, int color, int hflip, int vflip, | |
| 146 | 144 | int x, int y, int xscale, int yscale, const rectangle *clip); |
| 147 | static void draw_rle_zoom(mame_bitmap *bitmap, const | |
| 145 | static void draw_rle_zoom(mame_bitmap *bitmap, const | |
| 148 | 146 | UINT32 palette, int sx, int sy, int scalex, int scaley, |
| 149 | 147 | const rectangle *clip); |
| 150 | static void draw_rle_zoom_hflip(mame_bitmap *bitmap, const | |
| 148 | static void draw_rle_zoom_hflip(mame_bitmap *bitmap, const | |
| 151 | 149 | UINT32 palette, int sx, int sy, int scalex, int scaley, |
| 152 | 150 | const rectangle *clip); |
| 153 | 151 | |
| 154 | 152 | |
| 155 | 153 | |
| 156 | /* | |
| 154 | /*************************************************************************** | |
| 157 | 155 | INLINE FUNCTIONS |
| 158 | ||
| 156 | ***************************************************************************/ | |
| 159 | 157 | |
| 160 | 158 | /*--------------------------------------------------------------- |
| 161 | 159 | compute_log: Computes the number of bits necessary to |
| r1490 | r1491 | |
| 222 | 220 | shift, and adjusted mask. Returns 0 if invalid. |
| 223 | 221 | ---------------------------------------------------------------*/ |
| 224 | 222 | |
| 225 | INLINE int convert_mask(const | |
| 223 | INLINE int convert_mask(const | |
| 226 | 224 | { |
| 227 | 225 | int i, temp; |
| 228 | 226 | |
| r1490 | r1491 | |
| 258 | 256 | |
| 259 | 257 | |
| 260 | 258 | |
| 261 | /* | |
| 259 | /*************************************************************************** | |
| 262 | 260 | GLOBAL FUNCTIONS |
| 263 | ||
| 261 | ***************************************************************************/ | |
| 264 | 262 | |
| 265 | 263 | /*--------------------------------------------------------------- |
| 266 | 264 | atarirle_init: Configures the motion objects using the input |
| r1490 | r1491 | |
| 268 | 266 | the attribute lookup table. |
| 269 | 267 | ---------------------------------------------------------------*/ |
| 270 | 268 | |
| 271 | void atarirle_init(int map, const | |
| 269 | void atarirle_init(int map, const | |
| 272 | 270 | { |
| 273 | 271 | const UINT16 *base = (const UINT16 *)memory_region(desc->region); |
| 274 | | |
| 272 | | |
| 275 | 273 | int i; |
| 276 | 274 | |
| 277 | 275 | /* verify the map index */ |
| r1490 | r1491 | |
| 355 | 353 | } |
| 356 | 354 | |
| 357 | 355 | mo->partial_scanline = -1; |
| 356 | ||
| 357 | /* register for save states */ | |
| 358 | state_save_register_item_pointer("atarirle", map, mo->spriteram[0].data, ARRAY_LENGTH(mo->spriteram[0].data) * mo->spriteramsize); | |
| 359 | state_save_register_item_bitmap("atarirle", map, mo->vram[0][0]); | |
| 360 | state_save_register_item_bitmap("atarirle", map, mo->vram[0][1]); | |
| 361 | if (mo->vrammask.mask != 0) | |
| 362 | { | |
| 363 | state_save_register_item_bitmap("atarirle", map, mo->vram[1][0]); | |
| 364 | state_save_register_item_bitmap("atarirle", map, mo->vram[1][1]); | |
| 365 | } | |
| 366 | state_save_register_item("atarirle", map, mo->partial_scanline); | |
| 367 | state_save_register_item("atarirle", map, mo->control_bits); | |
| 368 | state_save_register_item("atarirle", map, mo->command); | |
| 369 | state_save_register_item("atarirle", map, mo->is32bit); | |
| 370 | state_save_register_item_array("atarirle", map, mo->checksums); | |
| 358 | 371 | } |
| 359 | 372 | |
| 360 | 373 | |
| r1490 | r1491 | |
| 365 | 378 | |
| 366 | 379 | void atarirle_control_w(int map, UINT8 bits) |
| 367 | 380 | { |
| 368 | | |
| 381 | | |
| 369 | 382 | int scanline = video_screen_get_vpos(0); |
| 370 | 383 | int oldbits = mo->control_bits; |
| 371 | 384 | |
| r1490 | r1491 | |
| 421 | 434 | |
| 422 | 435 | void atarirle_command_w(int map, UINT8 command) |
| 423 | 436 | { |
| 424 | | |
| 437 | | |
| 425 | 438 | mo->command = command; |
| 426 | 439 | } |
| 427 | 440 | |
| r1490 | r1491 | |
| 440 | 453 | /* loop over all RLE handlers */ |
| 441 | 454 | for (i = 0; i < ATARIRLE_MAX; i++) |
| 442 | 455 | { |
| 443 | | |
| 456 | | |
| 444 | 457 | |
| 445 | 458 | /* if the erase flag is set, erase to the end of the screen */ |
| 446 | 459 | if (mo->control_bits & ATARIRLE_CONTROL_ERASE) |
| r1490 | r1491 | |
| 511 | 524 | |
| 512 | 525 | mame_bitmap *atarirle_get_vram(int map, int idx) |
| 513 | 526 | { |
| 514 | | |
| 527 | | |
| 515 | 528 | //logerror("atarirle_get_vram (frame %d)\n", (mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2); |
| 516 | 529 | return mo->vram[idx][(mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2]; |
| 517 | 530 | } |
| r1490 | r1491 | |
| 605 | 618 | width, height, and other goodies. |
| 606 | 619 | ---------------------------------------------------------------*/ |
| 607 | 620 | |
| 608 | static void prescan_rle(const | |
| 621 | static void prescan_rle(const | |
| 609 | 622 | { |
| 610 | | |
| 623 | | |
| 611 | 624 | UINT16 *base = (UINT16 *)&mo->rombase[which * 4]; |
| 612 | 625 | const UINT16 *end = mo->rombase + mo->romlength / 2; |
| 613 | 626 | int width = 0, height, flags, offset; |
| r1490 | r1491 | |
| 685 | 698 | compute_checksum: Compute the checksum values on the ROMs. |
| 686 | 699 | ---------------------------------------------------------------*/ |
| 687 | 700 | |
| 688 | static void compute_checksum( | |
| 701 | static void compute_checksum( | |
| 689 | 702 | { |
| 690 | 703 | int reqsums = mo->spriteram[0].data[0] + 1; |
| 691 | 704 | int i; |
| r1490 | r1491 | |
| 715 | 728 | sort_and_render: Render all motion objects in order. |
| 716 | 729 | ---------------------------------------------------------------*/ |
| 717 | 730 | |
| 718 | static void sort_and_render( | |
| 731 | static void sort_and_render( | |
| 719 | 732 | { |
| 720 | 733 | mame_bitmap *bitmap1 = mo->vram[0][(~mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2]; |
| 721 | 734 | mame_bitmap *bitmap2 = mo->vram[1][(~mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2]; |
| 722 | struct atarirle_entry *obj = mo->spriteram; | |
| 723 | struct mo_sort_entry sort_entry[256]; | |
| 724 | struct mo_sort_entry *list_head[256]; | |
| 725 | struct mo_sort_entry *current; | |
| 735 | atarirle_entry *obj = mo->spriteram; | |
| 736 | mo_sort_entry sort_entry[256]; | |
| 737 | mo_sort_entry *list_head[256]; | |
| 738 | mo_sort_entry *current; | |
| 726 | 739 | int i; |
| 727 | 740 | |
| 728 | ||
| 741 | ||
| 729 | 742 | int count = 0; |
| 730 | 743 | |
| 731 | 744 | /* sort the motion objects into their proper priorities */ |
| r1490 | r1491 | |
| 799 | 812 | int x = EXTRACT_DATA(obj, mo->xposmask); |
| 800 | 813 | int y = EXTRACT_DATA(obj, mo->yposmask); |
| 801 | 814 | int scaled_xoffs, scaled_yoffs; |
| 802 | const | |
| 815 | const | |
| 803 | 816 | |
| 804 | 817 | if (x & ((mo->xposmask.mask + 1) >> 1)) |
| 805 | 818 | x = (INT16)(x | ~mo->xposmask.mask); |
| r1490 | r1491 | |
| 889 | 902 | object. |
| 890 | 903 | ---------------------------------------------------------------*/ |
| 891 | 904 | |
| 892 | void draw_rle( | |
| 905 | void draw_rle( | |
| 893 | 906 | int x, int y, int xscale, int yscale, const rectangle *clip) |
| 894 | 907 | { |
| 895 | 908 | UINT32 palettebase = mo->palettebase + color; |
| 896 | const | |
| 909 | const | |
| 897 | 910 | int scaled_xoffs = (xscale * info->xoffs) >> 12; |
| 898 | 911 | int scaled_yoffs = (yscale * info->yoffs) >> 12; |
| 899 | 912 | |
| r1490 | r1491 | |
| 930 | 943 | bitmap. |
| 931 | 944 | ---------------------------------------------------------------*/ |
| 932 | 945 | |
| 933 | void draw_rle_zoom(mame_bitmap *bitmap, const | |
| 946 | void draw_rle_zoom(mame_bitmap *bitmap, const | |
| 934 | 947 | UINT32 palette, int sx, int sy, int scalex, int scaley, |
| 935 | 948 | const rectangle *clip) |
| 936 | 949 | { |
| r1490 | r1491 | |
| 1120 | 1133 | 16-bit bitmap with horizontal flip. |
| 1121 | 1134 | ---------------------------------------------------------------*/ |
| 1122 | 1135 | |
| 1123 | void draw_rle_zoom_hflip(mame_bitmap *bitmap, const | |
| 1136 | void draw_rle_zoom_hflip(mame_bitmap *bitmap, const | |
| 1124 | 1137 | UINT32 palette, int sx, int sy, int scalex, int scaley, |
| 1125 | 1138 | const rectangle *clip) |
| 1126 | 1139 | { |
| r1490 | r1491 | |
|---|---|---|
| 1 | /* | |
| 1 | /*************************************************************************** | |
| 2 | 2 | |
| 3 | 3 | atarirle.h |
| 4 | 4 | |
| 5 | 5 | Common RLE-based motion object management functions for early 90's |
| 6 | 6 | Atari raster games. |
| 7 | 7 | |
| 8 | ||
| 8 | ***************************************************************************/ | |
| 9 | 9 | |
| 10 | 10 | #ifndef __ATARIRLE__ |
| 11 | 11 | #define __ATARIRLE__ |
| 12 | 12 | |
| 13 | 13 | |
| 14 | /* | |
| 14 | /*************************************************************************** | |
| 15 | 15 | CONSTANTS |
| 16 | ||
| 16 | ***************************************************************************/ | |
| 17 | 17 | |
| 18 | 18 | /* maximum number of motion object processors */ |
| 19 | 19 | #define ATARIRLE_MAX 1 |
| r1490 | r1491 | |
| 32 | 32 | #define ATARIRLE_COMMAND_CHECKSUM 2 |
| 33 | 33 | |
| 34 | 34 | |
| 35 | /*########################################################################## | |
| 35 | ||
| 36 | /*************************************************************************** | |
| 36 | 37 | TYPES & STRUCTURES |
| 37 | ||
| 38 | ***************************************************************************/ | |
| 38 | 39 | |
| 39 | 40 | /* description for an eight-word mask */ |
| 41 | typedef struct atarirle_entry atarirle_entry; | |
| 40 | 42 | struct atarirle_entry |
| 41 | 43 | { |
| 42 | 44 | UINT16 data[8]; |
| 43 | 45 | }; |
| 44 | 46 | |
| 45 | 47 | /* description of the motion objects */ |
| 48 | typedef struct atarirle_desc atarirle_desc; | |
| 46 | 49 | struct atarirle_desc |
| 47 | 50 | { |
| 48 | UINT8 region; /* region where the GFX data lives */ | |
| 49 | UINT16 spriteramentries; /* number of entries in sprite RAM */ | |
| 50 | UINT16 leftclip; /* left clip coordinate */ | |
| 51 | UINT16 rightclip; /* right clip coordinate */ | |
| 51 | UINT8 region; /* region where the GFX data lives */ | |
| 52 | UINT16 spriteramentries; /* number of entries in sprite RAM */ | |
| 53 | UINT16 leftclip; /* left clip coordinate */ | |
| 54 | UINT16 rightclip; /* right clip coordinate */ | |
| 52 | 55 | |
| 53 | UINT16 palettebase; /* base palette entry */ | |
| 54 | UINT16 maxcolors; /* maximum number of colors */ | |
| 56 | UINT16 palettebase; /* base palette entry */ | |
| 57 | UINT16 maxcolors; /* maximum number of colors */ | |
| 55 | 58 | |
| 56 | struct atarirle_entry codemask; /* mask for the code index */ | |
| 57 | struct atarirle_entry colormask; /* mask for the color */ | |
| 58 | struct atarirle_entry xposmask; /* mask for the X position */ | |
| 59 | struct atarirle_entry yposmask; /* mask for the Y position */ | |
| 60 | struct atarirle_entry scalemask; /* mask for the scale factor */ | |
| 61 | struct atarirle_entry hflipmask; /* mask for the horizontal flip */ | |
| 62 | struct atarirle_entry ordermask; /* mask for the order */ | |
| 63 | struct atarirle_entry prioritymask; /* mask for the priority */ | |
| 64 | struct atarirle_entry vrammask; /* mask for the VRAM target */ | |
| 59 | atarirle_entry codemask; /* mask for the code index */ | |
| 60 | atarirle_entry colormask; /* mask for the color */ | |
| 61 | atarirle_entry xposmask; /* mask for the X position */ | |
| 62 | atarirle_entry yposmask; /* mask for the Y position */ | |
| 63 | atarirle_entry scalemask; /* mask for the scale factor */ | |
| 64 | atarirle_entry hflipmask; /* mask for the horizontal flip */ | |
| 65 | atarirle_entry ordermask; /* mask for the order */ | |
| 66 | atarirle_entry prioritymask; /* mask for the priority */ | |
| 67 | atarirle_entry vrammask; /* mask for the VRAM target */ | |
| 65 | 68 | }; |
| 66 | 69 | |
| 67 | 70 | |
| 68 | 71 | |
| 69 | /* | |
| 72 | /*************************************************************************** | |
| 70 | 73 | FUNCTION PROTOTYPES |
| 71 | ||
| 74 | ***************************************************************************/ | |
| 72 | 75 | |
| 73 | 76 | /* setup/shutdown */ |
| 74 | void atarirle_init(int map, const | |
| 77 | void atarirle_init(int map, const | |
| 75 | 78 | |
| 76 | 79 | /* control handlers */ |
| 77 | 80 | void atarirle_control_w(int map, UINT8 bits); |
| r1490 | r1491 | |
| 87 | 90 | |
| 88 | 91 | |
| 89 | 92 | |
| 90 | /* | |
| 93 | /*************************************************************************** | |
| 91 | 94 | GLOBAL VARIABLES |
| 92 | ||
| 95 | ***************************************************************************/ | |
| 93 | 96 | |
| 94 | 97 | extern UINT16 *atarirle_0_spriteram; |
| 95 | 98 | extern UINT32 *atarirle_0_spriteram32; |
| r1490 | r1491 | |
|---|---|---|
| 294 | 294 | else if (address >= 0xa4000000 && address <= 0xa7ffffff) |
| 295 | 295 | { |
| 296 | 296 | sprite_dest_base = &vram_fg_draw[TOWORD(address & 0x3fc000)]; |
| 297 | sprite_dest_offs = ( | |
| 297 | sprite_dest_offs = ( | |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /* reads from this region set the sprite source address */ |
| r1490 | r1491 | |
| 351 | 351 | int coladdr = fulladdr & 0x3ff; |
| 352 | 352 | int x; |
| 353 | 353 | |
| 354 | if (BT_DEBUG) | |
| 355 | popmessage("screen_control = %02X", screen_control); | |
| 356 | ||
| 357 | 354 | /* for each scanline, switch off the render mode */ |
| 358 | 355 | switch (screen_control & 3) |
| 359 | 356 | { |
| 360 | 357 | /* mode 0: used in ship level, snake boss, title screen (free play) */ |
| 361 | 358 | /* priority is: |
| 362 | 1. BG1 pixels with the high bit set | |
| 363 | 2. Sprites | |
| 364 | 3. BG1 | |
| 365 | 4. BG0 | |
| 359 | 1. Sprite pixels with high bit clear | |
| 360 | 2. BG1 pixels with the high bit set | |
| 361 | 3. Sprites | |
| 362 | 4. BG1 | |
| 363 | 5. BG0 | |
| 366 | 364 | */ |
| 367 | 365 | case 0: |
| 368 | 366 | for (x = params->heblnk; x < params->hsblnk; x += 2, coladdr++) |
| 369 | 367 | { |
| 370 | UINT16 bg0pix = bg0_base[(coladdr + xscroll0) & 0xff]; | |
| 371 | UINT16 bg1pix = bg1_base[(coladdr + xscroll1) & 0xff]; | |
| 372 | 368 | UINT8 sprpix = spr_base[coladdr & 0xff]; |
| 373 | 369 | |
| 374 | if (bg1pix & 0x80) | |
| 375 | dst[x + 0] = bg1pix & 0xff; | |
| 376 | else if (sprpix) | |
| 370 | if (sprpix && !(sprpix & 0x80)) | |
| 371 | { | |
| 377 | 372 | dst[x + 0] = sprpix; |
| 378 | else if (bg1pix & 0xff) | |
| 379 | dst[x + 0] = bg1pix & 0xff; | |
| 373 | dst[x + 1] = sprpix; | |
| 374 | } | |
| 380 | 375 | else |
| 381 | dst[x + 0] = bg0pix & 0xff; | |
| 376 | { | |
| 377 | UINT16 bg0pix = bg0_base[(coladdr + xscroll0) & 0xff]; | |
| 378 | UINT16 bg1pix = bg1_base[(coladdr + xscroll1) & 0xff]; | |
| 379 | UINT8 sprpix = spr_base[coladdr & 0xff]; | |
| 382 | 380 | |
| 383 | if (bg1pix & 0x8000) | |
| 384 | dst[x + 1] = bg1pix >> 8; | |
| 385 | else if (sprpix) | |
| 386 | dst[x + 1] = sprpix; | |
| 387 | else if (bg1pix >> 8) | |
| 388 | dst[x + 1] = bg1pix >> 8; | |
| 389 | else | |
| 390 | dst[x + 1] = bg0pix >> 8; | |
| 381 | if (bg1pix & 0x80) | |
| 382 | dst[x + 0] = bg1pix & 0xff; | |
| 383 | else if (sprpix) | |
| 384 | dst[x + 0] = sprpix; | |
| 385 | else if (bg1pix & 0xff) | |
| 386 | dst[x + 0] = bg1pix & 0xff; | |
| 387 | else | |
| 388 | dst[x + 0] = bg0pix & 0xff; | |
| 389 | ||
| 390 | if (bg1pix & 0x8000) | |
| 391 | dst[x + 1] = bg1pix >> 8; | |
| 392 | else if (sprpix) | |
| 393 | dst[x + 1] = sprpix; | |
| 394 | else if (bg1pix >> 8) | |
| 395 | dst[x + 1] = bg1pix >> 8; | |
| 396 | else | |
| 397 | dst[x + 1] = bg0pix >> 8; | |
| 398 | } | |
| 391 | 399 | } |
| 392 | 400 | break; |
| 393 | 401 | |
| r1490 | r1491 | |
| 396 | 404 | 1. Sprite pixels with high bit clear |
| 397 | 405 | 2. BG0 |
| 398 | 406 | 3. BG1 pixels with high bit set |
| 399 | 4. Sprite | |
| 407 | 4. Sprite | |
| 400 | 408 | 5. BG1 |
| 401 | 409 | */ |
| 402 | 410 | case 1: |
| r1490 | r1491 | |
| 511 | 519 | |
| 512 | 520 | /* debugging - dump the screen contents to a file */ |
| 513 | 521 | #if BT_DEBUG |
| 522 | popmessage("screen_control = %02X", screen_control & 0x7f); | |
| 523 | ||
| 514 | 524 | if (input_code_pressed(KEYCODE_X)) |
| 515 | 525 | { |
| 516 | 526 | static int count = 0; |
| r1490 | r1491 | |
| 518 | 528 | FILE *f; |
| 519 | 529 | int i; |
| 520 | 530 | |
| 531 | while (input_code_pressed(KEYCODE_X)) ; | |
| 532 | ||
| 521 | 533 | sprintf(name, "disp%d.log", count++); |
| 522 | 534 | f = fopen(name, "w"); |
| 523 | 535 | fprintf(f, "screen_control = %04X\n\n", screen_control << 8); |
| r1490 | r1491 | |
|---|---|---|
| 64 | 64 | static UINT8 bank_gfx[3][8]; |
| 65 | 65 | static UINT8 bank_color_shift[MAX_GFX_ELEMENTS]; |
| 66 | 66 | |
| 67 | /* basic form of a graphics bank */ | |
| 68 | static gfx_layout objlayout = | |
| 67 | static const gfx_layout objlayout_4bpp = | |
| 69 | 68 | { |
| 70 | 69 | 8,8, /* 8*8 sprites */ |
| 71 | 70 | 4096, /* 4096 of them */ |
| 71 | 4, /* 4 bits per pixel */ | |
| 72 | { 3*8*0x10000, 2*8*0x10000, 1*8*0x10000, 0*8*0x10000 }, | |
| 73 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 74 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 75 | 8*8 /* every sprite takes 8 consecutive bytes */ | |
| 76 | }; | |
| 77 | ||
| 78 | static const gfx_layout objlayout_5bpp = | |
| 79 | { | |
| 80 | 8,8, /* 8*8 sprites */ | |
| 81 | 4096, /* 4096 of them */ | |
| 82 | 5, /* 5 bits per pixel */ | |
| 83 | { 4*8*0x10000, 3*8*0x10000, 2*8*0x10000, 1*8*0x10000, 0*8*0x10000 }, | |
| 84 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 85 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 86 | 8*8 /* every sprite takes 8 consecutive bytes */ | |
| 87 | }; | |
| 88 | ||
| 89 | static const gfx_layout objlayout_6bpp = | |
| 90 | { | |
| 91 | 8,8, /* 8*8 sprites */ | |
| 92 | 4096, /* 4096 of them */ | |
| 72 | 93 | 6, /* 6 bits per pixel */ |
| 73 | 94 | { 5*8*0x10000, 4*8*0x10000, 3*8*0x10000, 2*8*0x10000, 1*8*0x10000, 0*8*0x10000 }, |
| 74 | 95 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| r1490 | r1491 | |
| 607 | 628 | |
| 608 | 629 | static int get_bank(running_machine *machine, UINT8 prom1, UINT8 prom2, int bpp) |
| 609 | 630 | { |
| 610 | int bank_index, | |
| 631 | int bank_index, | |
| 611 | 632 | |
| 612 | 633 | /* determine the bank index */ |
| 613 | 634 | if ((prom1 & PROM1_BANK_1) == 0) |
| r1490 | r1491 | |
| 644 | 665 | break; |
| 645 | 666 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 646 | 667 | |
| 647 | /* tweak the structure for the number of bitplanes we have */ | |
| 648 | objlayout.planes = bpp; | |
| 649 | for (i = 0; i < bpp; i++) | |
| 650 | objlayout.planeoffset[i] = (bpp - i - 1) * 0x10000 * 8; | |
| 668 | /* decode the graphics */ | |
| 669 | switch (bpp) | |
| 670 | { | |
| 671 | case 4: | |
| 672 | machine->gfx[gfx_index] = allocgfx(&objlayout_4bpp); | |
| 673 | break; | |
| 651 | 674 | |
| 652 | /* decode the graphics */ | |
| 653 | machine->gfx[gfx_index] = allocgfx(&objlayout); | |
| 675 | case 5: | |
| 676 | machine->gfx[gfx_index] = allocgfx(&objlayout_5bpp); | |
| 677 | break; | |
| 678 | ||
| 679 | case 6: | |
| 680 | machine->gfx[gfx_index] = allocgfx(&objlayout_6bpp); | |
| 681 | break; | |
| 682 | ||
| 683 | default: | |
| 684 | fatalerror("Unsupported bpp"); | |
| 685 | } | |
| 654 | 686 | decodegfx(machine->gfx[gfx_index], &memory_region(REGION_GFX2)[0x80000 * (bank_index - 1)], 0, machine->gfx[gfx_index]->total_elements); |
| 655 | 687 | |
| 656 | 688 | /* set the color information */ |
| r1490 | r1491 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | VIDEO_START( atarig42 ) |
| 95 | 95 | { |
| 96 | static const | |
| 96 | static const | |
| 97 | 97 | { |
| 98 | 98 | REGION_GFX3,/* region where the GFX data lives */ |
| 99 | 99 | 256, /* number of entries in sprite RAM */ |
| r1490 | r1491 | |
| 113 | 113 | {{ 0,0x0e00,0,0,0,0,0,0 }}, /* mask for the priority */ |
| 114 | 114 | {{ 0 }} /* mask for the VRAM target */ |
| 115 | 115 | }; |
| 116 | | |
| 116 | | |
| 117 | 117 | int i; |
| 118 | 118 | |
| 119 | 119 | /* blend the playfields and free the temporary one */ |
| r1490 | r1491 | |
|---|---|---|
| 79 | 79 | scanline_timer = timer_alloc(scanline_timer_cb, NULL); |
| 80 | 80 | poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS); |
| 81 | 81 | add_exit_callback(machine, midvunit_exit); |
| 82 | ||
| 83 | state_save_register_global_array(video_regs); | |
| 84 | state_save_register_global_array(dma_data); | |
| 85 | state_save_register_global(dma_data_index); | |
| 86 | state_save_register_global(page_control); | |
| 87 | state_save_register_global(video_changed); | |
| 82 | 88 | } |
| 83 | 89 | |
| 84 | 90 |
| r1490 | r1491 | |
|---|---|---|
| 13 | 13 | #define MAX_STARS 250 |
| 14 | 14 | #define STARS_COLOR_BASE 16 |
| 15 | 15 | |
| 16 | ||
| 16 | 17 | #ifdef LSB_FIRST |
| 17 | 18 | #define BL0 0 |
| 18 | 19 | #define BL1 1 |
| r1490 | r1491 | |
| 29 | 30 | #define WL1 0 |
| 30 | 31 | #endif |
| 31 | 32 | |
| 33 | ||
| 32 | 34 | struct star |
| 33 | 35 | { |
| 34 | 36 | int x,y,code; |
| 35 | 37 | }; |
| 36 | 38 | |
| 37 | static struct star stars[MAX_STARS]; | |
| 38 | static int total_stars; | |
| 39 | static int scroll[8]; | |
| 40 | static int stars_on=0; | |
| 41 | static int character_mode=0; | |
| 42 | static int character_page=0; | |
| 43 | static int scroll_reg = 0; | |
| 44 | static int stars_scroll=0; | |
| 45 | 39 | |
| 46 | static UINT8 *dirty_character; | |
| 47 | static UINT8 *character_1_ram; | |
| 48 | static UINT8 *character_2_ram; | |
| 49 | static UINT8 *character_3_ram; | |
| 40 | UINT8 *cvs_color_ram; | |
| 41 | UINT8 *cvs_video_ram; | |
| 50 | 42 | UINT8 *cvs_bullet_ram; |
| 51 | 43 | |
| 44 | static UINT8 *palette_ram; | |
| 45 | static UINT8 *character_ram; | |
| 46 | ||
| 47 | static struct star stars[MAX_STARS]; | |
| 48 | static int total_stars; | |
| 49 | static int stars_on; | |
| 50 | static UINT8 character_mode; | |
| 51 | static UINT16 character_ram_page; | |
| 52 | static UINT8 scroll_reg; | |
| 53 | static int stars_scroll; | |
| 54 | ||
| 55 | static mame_bitmap *background_bitmap; | |
| 52 | 56 | mame_bitmap *cvs_collision_bitmap; |
| 53 | 57 | mame_bitmap *cvs_collision_background; |
| 54 | 58 | static mame_bitmap *scrolled_background; |
| 55 | 59 | |
| 56 | int cvs_collision_register | |
| 60 | int cvs_collision_register | |
| 57 | 61 | |
| 58 | static const int ModeOffset[4] = {223,191,255,127}; | |
| 59 | 62 | |
| 60 | 63 | /****************************************************** |
| 61 | 64 | * Convert Colour prom to format for Mame Colour Map * |
| r1490 | r1491 | |
| 80 | 83 | { |
| 81 | 84 | map = color_prom[(col * 256) + attr]; |
| 82 | 85 | |
| 83 | /* bits | |
| 86 | /* bits 0 and 2 are swapped | |
| 84 | 87 | |
| 85 | 88 | COLOR(0,attr*8 + col) = ((map & 1) << 2) + (map & 2) + ((map & 4) >> 2); |
| 86 | 89 | } |
| r1490 | r1491 | |
| 103 | 106 | COLOR(0,map*2 + 2073) = 8 + map; |
| 104 | 107 | } |
| 105 | 108 | |
| 106 | /* Initialise Dirty Character Array */ | |
| 107 | dirty_character = auto_malloc(0x100); | |
| 108 | character_1_ram = auto_malloc(0x2000); | |
| 109 | character_2_ram = character_1_ram + 0x800; | |
| 110 | character_3_ram = character_2_ram + 0x800; | |
| 111 | ||
| 112 | memset(dirty_character, 0, 256); | |
| 113 | memset(character_1_ram, 0, 1024); | |
| 114 | memset(character_2_ram, 0, 1024); | |
| 115 | memset(character_3_ram, 0, 1024); | |
| 116 | ||
| 117 | /* Set Sprite chip offsets */ | |
| 118 | ||
| 109 | /* set the sprite chip offsets */ | |
| 119 | 110 | s2636_x_offset = -26; |
| 120 | 111 | s2636_y_offset = 3; |
| 121 | ||
| 122 | /* Set Scroll fixed areas */ | |
| 123 | ||
| 124 | scroll[0]=0; | |
| 125 | scroll[6]=0; | |
| 126 | scroll[7]=0; | |
| 127 | 112 | } |
| 128 | 113 | |
| 114 | ||
| 129 | 115 | WRITE8_HANDLER( cvs_video_fx_w ) |
| 130 | 116 | { |
| 131 | logerror("%4x : Data Port = %2x\n",activecpu_get_pc(),data); | |
| 117 | if (data & 0xce) | |
| 118 | logerror("%4x : Unimplemented CVS video fx = %2x\n",activecpu_get_pc(),data); | |
| 132 | 119 | |
| 133 | | |
| 120 | s | |
| 134 | 121 | |
| 135 | if(data & 2) logerror(" SHADE BRIGHTER TO RIGHT\n"); | |
| 136 | if(data & 4) logerror(" SCREEN ROTATE\n"); | |
| 137 | if(data & 8) logerror(" SHADE BRIGHTER TO LEFT\n"); | |
| 138 | if(data & 64) logerror(" SHADE BRIGHTER TO BOTTOM\n"); | |
| 139 | if(data & 128) logerror(" SHADE BRIGHTER TO TOP\n"); | |
| 122 | if (data & 0x02) logerror(" SHADE BRIGHTER TO RIGHT\n"); | |
| 123 | if (data & 0x04) logerror(" SCREEN ROTATE\n"); | |
| 124 | if (data & 0x08) logerror(" SHADE BRIGHTER TO LEFT\n"); | |
| 140 | 125 | |
| 141 | /* Implemented */ | |
| 126 | set_led_status(1, data & 0x10); /* lamp 1 */ | |
| 127 | set_led_status(2, data & 0x20); /* lamp 2 */ | |
| 142 | 128 | |
| 143 | stars_on = data & 1; | |
| 144 | set_led_status(1,data & 16); /* Lamp 1 */ | |
| 145 | set_led_status(2,data & 32); /* Lamp 2 */ | |
| 129 | if (data & 0x40) logerror(" SHADE BRIGHTER TO BOTTOM\n"); | |
| 130 | if (data & 0x80) logerror(" SHADE BRIGHTER TO TOP\n"); | |
| 146 | 131 | } |
| 147 | 132 | |
| 148 | READ8_HANDLER( cvs_character_mode_r ) | |
| 133 | ||
| 134 | ||
| 135 | READ8_HANDLER( cvs_input_r ) | |
| 149 | 136 | { |
| 150 | | |
| 137 | UINT8 | |
| 151 | 138 | |
| 152 | int value = offset + 0x10; | |
| 153 | int newmode = (value >> 4) & 3; | |
| 139 | /* the upper 4 bits of the address is used to select the tile banking attributes */ | |
| 140 | character_mode = (offset >> 4) & 0x03; | |
| 141 | character_ram_page = (offset << 2) & 0x300; | |
| 154 | 142 | |
| 155 | character_mode = newmode; | |
| 156 | character_page = (value << 2) & 0x300; | |
| 143 | /* the lower 4 (or 3?) bits select the port to read */ | |
| 144 | switch (offset & 0x0f) /* might be 0x07 */ | |
| 145 | { | |
| 146 | case 0x00: ret = input_port_0_r(0); break; | |
| 147 | case 0x02: ret = input_port_1_r(0); break; | |
| 148 | case 0x03: ret = input_port_2_r(0); break; | |
| 149 | case 0x04: ret = input_port_3_r(0); break; | |
| 150 | case 0x06: ret = input_port_4_r(0); break; | |
| 151 | case 0x07: ret = input_port_5_r(0); break; | |
| 152 | default: ret = 0x00; break; | |
| 153 | } | |
| 157 | 154 | |
| 158 | ||
| 155 | | |
| 159 | 156 | } |
| 160 | 157 | |
| 158 | ||
| 161 | 159 | READ8_HANDLER( cvs_collision_r ) |
| 162 | 160 | { |
| 163 | 161 | return cvs_collision_register; |
| r1490 | r1491 | |
| 165 | 163 | |
| 166 | 164 | READ8_HANDLER( cvs_collision_clear ) |
| 167 | 165 | { |
| 168 | cvs_collision_register=0; | |
| 166 | cvs_collision_register = 0; | |
| 167 | ||
| 169 | 168 | return 0; |
| 170 | 169 | } |
| 171 | 170 | |
| 171 | ||
| 172 | 172 | WRITE8_HANDLER( cvs_scroll_w ) |
| 173 | 173 | { |
| 174 | 174 | scroll_reg = 255 - data; |
| 175 | ||
| 176 | scroll[1]=scroll_reg; | |
| 177 | scroll[2]=scroll_reg; | |
| 178 | scroll[3]=scroll_reg; | |
| 179 | scroll[4]=scroll_reg; | |
| 180 | scroll[5]=scroll_reg; | |
| 181 | 175 | } |
| 182 | 176 | |
| 183 | WRITE8_HANDLER( cvs_videoram_w ) | |
| 184 | { | |
| 185 | if(!activecpu_get_reg(S2650_FO)) | |
| 186 | { | |
| 187 | // Colour Map | |
| 188 | 177 | |
| 189 | colorram_w(offset,data); | |
| 190 | } | |
| 191 | else | |
| 192 | { | |
| 193 | // Data | |
| 194 | ||
| 195 | videoram_w(offset,data); | |
| 196 | } | |
| 178 | READ8_HANDLER( cvs_video_or_color_ram_r ) | |
| 179 | { | |
| 180 | if (!activecpu_get_reg(S2650_FO)) | |
| 181 | return cvs_color_ram[offset]; | |
| 182 | else | |
| 183 | return cvs_video_ram[offset]; | |
| 197 | 184 | } |
| 198 | 185 | |
| 199 | RE | |
| 186 | WRITE | |
| 200 | 187 | { |
| 201 | if(!activecpu_get_reg(S2650_FO)) | |
| 202 | { | |
| 203 | // Colour Map | |
| 204 | ||
| 205 | return colorram[offset]; | |
| 206 | } | |
| 207 | else | |
| 208 | { | |
| 209 | // Data | |
| 210 | ||
| 211 | return videoram[offset]; | |
| 212 | } | |
| 188 | if (!activecpu_get_reg(S2650_FO)) | |
| 189 | cvs_color_ram[offset] = data; | |
| 190 | else | |
| 191 | cvs_video_ram[offset] = data; | |
| 213 | 192 | } |
| 214 | 193 | |
| 215 | WRITE8_HANDLER( cvs_bullet_w ) | |
| 216 | { | |
| 217 | if(!activecpu_get_reg(S2650_FO)) | |
| 218 | { | |
| 219 | // Bullet Ram | |
| 220 | 194 | |
| 221 | cvs_bullet_ram[offset] = data; | |
| 222 | } | |
| 223 | else | |
| 224 | { | |
| 225 | // Pallette Ram - Inverted ? | |
| 226 | offset &= 0x0f; | |
| 227 | data ^= 0xff; | |
| 228 | ||
| 229 | paletteram[offset] = data; | |
| 230 | palette_set_color_rgb(Machine, offset, pal2bit(data >> 0), pal3bit(data >> 2), pal3bit(data >> 5)); | |
| 231 | } | |
| 195 | READ8_HANDLER( cvs_bullet_ram_or_palette_r ) | |
| 196 | { | |
| 197 | if (!activecpu_get_reg(S2650_FO)) | |
| 198 | return cvs_bullet_ram[offset]; | |
| 199 | else | |
| 200 | return palette_ram[offset & 0x0f]; | |
| 232 | 201 | } |
| 233 | 202 | |
| 234 | RE | |
| 203 | WRITE | |
| 235 | 204 | { |
| 236 | if(!activecpu_get_reg(S2650_FO)) | |
| 237 | { | |
| 238 | // Bullet Ram | |
| 239 | ||
| 240 | return cvs_bullet_ram[offset]; | |
| 241 | } | |
| 242 | else | |
| 243 | { | |
| 244 | // Pallette Ram | |
| 245 | ||
| 246 | return (paletteram[offset] ^ 0xff); | |
| 247 | } | |
| 205 | if (!activecpu_get_reg(S2650_FO)) | |
| 206 | cvs_bullet_ram[offset] = data; | |
| 207 | else | |
| 208 | palette_ram[offset & 0x0f] = data; | |
| 248 | 209 | } |
| 249 | 210 | |
| 250 | WRITE8_HANDLER( cvs_2636_1_w ) | |
| 251 | { | |
| 252 | if(!activecpu_get_reg(S2650_FO)) | |
| 253 | { | |
| 254 | // First 2636 | |
| 255 | 211 | |
| 256 | s2636_w(s2636_1_ram,offset,data,s2636_1_dirty); | |
| 257 | } | |
| 258 | else | |
| 259 | { | |
| 260 | // Character Ram 1 | |
| 261 | ||
| 262 | if(character_1_ram[character_page + offset] != data) | |
| 263 | { | |
| 264 | character_1_ram[character_page + offset] = data; | |
| 265 | dirty_character[128+((character_page + offset)>>3)] = 1; | |
| 266 | } | |
| 267 | } | |
| 212 | READ8_HANDLER( cvs_s2636_1_or_character_ram_r ) | |
| 213 | { | |
| 214 | if (!activecpu_get_reg(S2650_FO)) | |
| 215 | return s2636_1_ram[offset]; | |
| 216 | else | |
| 217 | return character_ram[(0 * 0x800) | 0x400 | character_ram_page | offset]; | |
| 268 | 218 | } |
| 269 | 219 | |
| 270 | RE | |
| 220 | WRITE | |
| 271 | 221 | { |
| 272 | if(!activecpu_get_reg(S2650_FO)) | |
| 273 | { | |
| 274 | // First 2636 | |
| 275 | ||
| 276 | return s2636_1_ram[offset]; | |
| 277 | } | |
| 278 | else | |
| 279 | { | |
| 280 | // Character Ram 1 | |
| 281 | ||
| 282 | return character_1_ram[character_page + offset]; | |
| 283 | } | |
| 222 | if (!activecpu_get_reg(S2650_FO)) | |
| 223 | s2636_1_ram[offset] = data; | |
| 224 | else | |
| 225 | character_ram[(0 * 0x800) | 0x400 | character_ram_page | offset] = data; | |
| 284 | 226 | } |
| 285 | 227 | |
| 286 | WRITE8_HANDLER( cvs_2636_2_w ) | |
| 287 | { | |
| 288 | if(!activecpu_get_reg(S2650_FO)) | |
| 289 | { | |
| 290 | // Second 2636 | |
| 291 | 228 | |
| 292 | s2636_w(s2636_2_ram,offset,data,s2636_2_dirty); | |
| 293 | } | |
| 294 | else | |
| 295 | { | |
| 296 | // Character Ram 2 | |
| 297 | ||
| 298 | if(character_2_ram[character_page + offset] != data) | |
| 299 | { | |
| 300 | character_2_ram[character_page + offset] = data; | |
| 301 | dirty_character[128+((character_page + offset)>>3)] = 1; | |
| 302 | } | |
| 303 | } | |
| 229 | READ8_HANDLER( cvs_s2636_2_or_character_ram_r ) | |
| 230 | { | |
| 231 | if (!activecpu_get_reg(S2650_FO)) | |
| 232 | return s2636_2_ram[offset]; | |
| 233 | else | |
| 234 | return character_ram[(1 * 0x800) | 0x400 | character_ram_page | offset]; | |
| 304 | 235 | } |
| 305 | 236 | |
| 306 | RE | |
| 237 | WRITE | |
| 307 | 238 | { |
| 308 | if(!activecpu_get_reg(S2650_FO)) | |
| 309 | { | |
| 310 | // Second 2636 | |
| 311 | ||
| 312 | return s2636_2_ram[offset]; | |
| 313 | } | |
| 314 | else | |
| 315 | { | |
| 316 | // Character Ram 2 | |
| 317 | ||
| 318 | return character_2_ram[character_page + offset]; | |
| 319 | } | |
| 239 | if (!activecpu_get_reg(S2650_FO)) | |
| 240 | s2636_2_ram[offset] = data; | |
| 241 | else | |
| 242 | character_ram[(1 * 0x800) | 0x400 | character_ram_page | offset] = data; | |
| 320 | 243 | } |
| 321 | 244 | |
| 322 | WRITE8_HANDLER( cvs_2636_3_w ) | |
| 323 | { | |
| 324 | if(!activecpu_get_reg(S2650_FO)) | |
| 325 | { | |
| 326 | // Third 2636 | |
| 327 | 245 | |
| 328 | s2636_w(s2636_3_ram,offset,data,s2636_3_dirty); | |
| 329 | } | |
| 330 | else | |
| 331 | { | |
| 332 | // Character Ram 3 | |
| 333 | ||
| 334 | if(character_3_ram[character_page + offset] != data) | |
| 335 | { | |
| 336 | character_3_ram[character_page + offset] = data; | |
| 337 | dirty_character[128+((character_page + offset)>>3)] = 1; | |
| 338 | } | |
| 339 | } | |
| 246 | READ8_HANDLER( cvs_s2636_3_or_character_ram_r ) | |
| 247 | { | |
| 248 | if (!activecpu_get_reg(S2650_FO)) | |
| 249 | return s2636_3_ram[offset]; | |
| 250 | else | |
| 251 | return character_ram[(2 * 0x800) | 0x400 | character_ram_page | offset]; | |
| 340 | 252 | } |
| 341 | 253 | |
| 342 | RE | |
| 254 | WRITE | |
| 343 | 255 | { |
| 344 | if(!activecpu_get_reg(S2650_FO)) | |
| 345 | { | |
| 346 | // Third 2636 | |
| 347 | ||
| 348 | return s2636_3_ram[offset]; | |
| 349 | } | |
| 350 | else | |
| 351 | { | |
| 352 | // Character Ram 3 | |
| 353 | ||
| 354 | return character_3_ram[character_page + offset]; | |
| 355 | } | |
| 256 | if (!activecpu_get_reg(S2650_FO)) | |
| 257 | s2636_3_ram[offset] = data; | |
| 258 | else | |
| 259 | character_ram[(2 * 0x800) | 0x400 | character_ram_page | offset] = data; | |
| 356 | 260 | } |
| 357 | 261 | |
| 262 | ||
| 358 | 263 | VIDEO_START( cvs ) |
| 359 | 264 | { |
| 360 | 265 | int generator = 0; |
| 361 | ||
| 266 | | |
| 362 | 267 | |
| 363 | colorram = auto_malloc(0x400); | |
| 364 | paletteram = auto_malloc(0x100); | |
| 365 | 268 | |
| 366 | video_start_generic(machine); | |
| 269 | /* allocate memory */ | |
| 270 | cvs_color_ram = auto_malloc(0x400); | |
| 271 | palette_ram = auto_malloc(0x10); | |
| 272 | character_ram = auto_malloc(3 * 0x800); /* only half is used, but | |
| 273 | by allocating twice the amount, | |
| 274 | we can use the same gfx_layout */ | |
| 367 | 275 | |
| 368 | 276 | /* precalculate the star background */ |
| 369 | 277 | |
| r1490 | r1491 | |
| 371 | 279 | |
| 372 | 280 | for (y = 255;y >= 0;y--) |
| 373 | 281 | { |
| 282 | int x; | |
| 283 | ||
| 374 | 284 | for (x = 511;x >= 0;x--) |
| 375 | 285 | { |
| 376 | 286 | int bit1,bit2; |
| r1490 | r1491 | |
| 398 | 308 | } |
| 399 | 309 | } |
| 400 | 310 | |
| 401 | /* Need 3 bitmaps for 2636 chips */ | |
| 402 | 311 | |
| 403 | s2636_1_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 404 | s2636_2_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 405 | s2636_3_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 312 | /* create the bitmaps for the S2636 chips */ | |
| 313 | s2636_1_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 314 | s2636_2_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 315 | s2636_3_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 406 | 316 | |
| 407 | /* 3 bitmaps for collision detection */ | |
| 408 | 317 | |
| 409 | cvs_collision_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 410 | cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 411 | scrolled_background = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); | |
| 318 | /* create helper bitmaps */ | |
| 319 | background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 320 | cvs_collision_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 321 | cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 322 | scrolled_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 412 | 323 | } |
| 413 | 324 | |
| 325 | ||
| 326 | ||
| 414 | 327 | INTERRUPT_GEN( cvs_interrupt ) |
| 415 | 328 | { |
| 416 | 329 | stars_scroll++; |
| r1490 | r1491 | |
| 419 | 332 | cpunum_set_input_line(0,0,PULSE_LINE); |
| 420 | 333 | } |
| 421 | 334 | |
| 422 | INLINE void plot_star(running_machine* machine, mame_bitmap *bitmap, int x, int y) | |
| 423 | { | |
| 424 | if (flip_screen_x) | |
| 425 | { | |
| 426 | x = 255 - x; | |
| 427 | } | |
| 428 | if (flip_screen_y) | |
| 429 | { | |
| 430 | y = 255 - y; | |
| 431 | } | |
| 432 | 335 | |
| 433 | if (*BITMAP_ADDR16(bitmap, y, x) == machine->pens[0]) | |
| 434 | { | |
| 435 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[7]; | |
| 436 | } | |
| 437 | } | |
| 438 | 336 | |
| 439 | 337 | VIDEO_UPDATE( cvs ) |
| 440 | 338 | { |
| 441 | int offs; | |
| 339 | const int ram_based_char_start_indecies[] = { 0xe0, 0xc0, 0x100, 0x80 }; | |
| 340 | int code; | |
| 341 | offs_t offs; | |
| 342 | int scroll[8]; | |
| 442 | 343 | |
| 443 | /* for every character in the Video RAM, check if it has been modified */ | |
| 444 | /* since last time and update it accordingly. */ | |
| 445 | 344 | |
| 446 | for (offs = videoram_size - 1;offs >= 0;offs--) | |
| 345 | /* set the palette */ | |
| 346 | for (offs = 0; offs < 0x10; offs++) | |
| 447 | 347 | { |
| 448 | int character_bank; | |
| 449 | int forecolor; | |
| 348 | UINT8 data = palette_ram[offs]; | |
| 450 | 349 | |
| 451 | int character = videoram[offs]; | |
| 350 | palette_set_color_rgb(machine, offs, pal2bit(~data >> 0), pal3bit(~data >> 2), pal3bit(~data >> 5)); | |
| 351 | } | |
| 452 | 352 | |
| 453 | int sx = (offs % 32) * 8; | |
| 454 | int sy = (offs / 32) * 8; | |
| 455 | 353 | |
| 456 | /* Decide if RAM or ROM based character */ | |
| 354 | /* create our background character set, which is a software | |
| 355 | selectable mixture of RAM and ROM based tiles */ | |
| 457 | 356 | |
| 458 | if(character > ModeOffset[character_mode]) | |
| 459 | { | |
| 460 | /* re-generate character if dirty */ | |
| 357 | /* ROM based tiles first */ | |
| 358 | for (code = 0; code < ram_based_char_start_indecies[character_mode]; code++) | |
| 359 | decodechar(machine->gfx[0], code, memory_region(REGION_GFX1), | |
| 360 | machine->drv->gfxdecodeinfo[0].gfxlayout); | |
| 461 | 361 | |
| 462 | if (dirty_character[character]) | |
| 463 | { | |
| 464 | decodechar(machine->gfx[1],character,character_1_ram-1024,machine->drv->gfxdecodeinfo[1].gfxlayout); | |
| 362 | /* now the RAM based ones */ | |
| 363 | for (; code < 0x100; code++) | |
| 364 | decodechar(machine->gfx[0], code, character_ram, | |
| 365 | machine->drv->gfxdecodeinfo[0].gfxlayout); | |
| 465 | 366 | |
| 466 | dirty_character[character] = 0; | |
| 467 | } | |
| 468 | 367 | |
| 469 | character_bank=1; | |
| 470 | } | |
| 471 | else | |
| 472 | { | |
| 473 | character_bank=0; | |
| 474 | } | |
| 368 | /* draw the background */ | |
| 369 | for (offs = 0; offs < 0x0400; offs++) | |
| 370 | { | |
| 371 | int collision_color = 0; | |
| 475 | 372 | |
| 476 | /* Main Screen */ | |
| 373 | UINT8 code = cvs_video_ram[offs]; | |
| 374 | UINT8 color = cvs_color_ram[offs]; | |
| 477 | 375 | |
| 478 | drawgfx(tmpbitmap,machine->gfx[character_bank], | |
| 479 | character, | |
| 480 | colorram[offs], | |
| 481 | 0,0, | |
| 482 | sx,sy, | |
| 483 | 0,TRANSPARENCY_NONE,0); | |
| 376 | UINT8 x = offs << 3; | |
| 377 | UINT8 y = offs >> 5 << 3; | |
| 484 | 378 | |
| 379 | drawgfx(background_bitmap, machine->gfx[0], | |
| 380 | code, color, | |
| 381 | 0, 0, | |
| 382 | x, y, | |
| 383 | 0, TRANSPARENCY_NONE, 0); | |
| 485 | 384 | |
| 486 | /* Foreground for Collision Detection */ | |
| 487 | ||
| 488 | forecolor = 0; | |
| 489 | if(colorram[offs] & 0x80) | |
| 490 | { | |
| 491 | forecolor=258; | |
| 492 | } | |
| 385 | /* foreground for collision detection */ | |
| 386 | if (color & 0x80) | |
| 387 | collision_color = 258; | |
| 493 | 388 | else |
| 494 | 389 | { |
| 495 | if((colorram[offs] & 0x03) == 3) forecolor=256; | |
| 496 | else if((colorram[offs] & 0x01) == 0) forecolor=257; | |
| 390 | if ((color & 0x03) == 3) | |
| 391 | collision_color = 256; | |
| 392 | else if((color & 0x01) == 0) | |
| 393 | collision_color = 257; | |
| 497 | 394 | } |
| 498 | 395 | |
| 499 | if(forecolor) | |
| 500 | drawgfx(cvs_collision_background,machine->gfx[character_bank], | |
| 501 | character, | |
| 502 | forecolor, | |
| 503 | 0,0, | |
| 504 | sx,sy, | |
| 505 | 0,TRANSPARENCY_NONE,0); | |
| 396 | if (collision_color) | |
| 397 | drawgfx(cvs_collision_background, machine->gfx[0], | |
| 398 | code, collision_color, | |
| 399 | 0, 0, | |
| 400 | x, y, | |
| 401 | 0, TRANSPARENCY_NONE, 0); | |
| 506 | 402 | } |
| 507 | 403 | |
| 508 | 404 | |
| 509 | 405 | /* Update screen - 8 regions, fixed scrolling area */ |
| 510 | 406 | |
| 511 | copyscrollbitmap(bitmap,tmpbitmap,0,0,8,scroll,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 407 | scroll[0] = 0; | |
| 408 | scroll[1] = scroll_reg; | |
| 409 | scroll[2] = scroll_reg; | |
| 410 | scroll[3] = scroll_reg; | |
| 411 | scroll[4] = scroll_reg; | |
| 412 | scroll[5] = scroll_reg; | |
| 413 | scroll[6] = 0; | |
| 414 | scroll[7] = 0; | |
| 415 | ||
| 416 | copyscrollbitmap(bitmap,background_bitmap,0,0,8,scroll,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 512 | 417 | copyscrollbitmap(scrolled_background,cvs_collision_background,0,0,8,scroll,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 513 | 418 | |
| 514 | 419 | /* 2636's */ |
| 515 | 420 | |
| 516 | 421 | fillbitmap(s2636_1_bitmap,0,0); |
| 517 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram, | |
| 422 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram, | |
| 518 | 423 | |
| 519 | 424 | fillbitmap(s2636_2_bitmap,0,0); |
| 520 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram, | |
| 425 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram, | |
| 521 | 426 | |
| 522 | 427 | fillbitmap(s2636_3_bitmap,0,0); |
| 523 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram, | |
| 428 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram, | |
| 524 | 429 | |
| 525 | 430 | /* Bullet Hardware */ |
| 526 | 431 | |
| 527 | 432 | for (offs = 8; offs < 256; offs++ ) |
| 528 | 433 | { |
| 529 | if(cvs_bullet_ram[offs] != 0) | |
| 434 | if (cvs_bullet_ram[offs] != 0) | |
| 530 | 435 | { |
| 531 | 436 | int ct; |
| 532 | 437 | for(ct=0;ct<4;ct++) |
| r1490 | r1491 | |
| 559 | 464 | /* Update 2636 images */ |
| 560 | 465 | |
| 561 | 466 | { |
| 562 | int | |
| 467 | int | |
| 563 | 468 | UINT32 S1,S2,S3,SB,pen; |
| 564 | 469 | |
| 565 | for( | |
| 470 | for( | |
| 566 | 471 | { |
| 567 | UINT32 *sp1 = (UINT32 *)BITMAP_ADDR8(s2636_1_bitmap, sx, 0); | |
| 568 | UINT32 *sp2 = (UINT32 *)BITMAP_ADDR8(s2636_2_bitmap, sx, 0); | |
| 569 | UINT32 *sp3 = (UINT32 *)BITMAP_ADDR8(s2636_3_bitmap, sx, 0); | |
| 570 | UINT64 *dst = (UINT64 *)BITMAP_ADDR16(bitmap, sx, 0); | |
| 571 | UINT8 *spb = (UINT8 *)BITMAP_ADDR8(scrolled_background, sx, 0); | |
| 472 | UINT32 *sp1 = (UINT32 *)BITMAP_ADDR8(s2636_1_bitmap, x, 0); | |
| 473 | UINT32 *sp2 = (UINT32 *)BITMAP_ADDR8(s2636_2_bitmap, x, 0); | |
| 474 | UINT32 *sp3 = (UINT32 *)BITMAP_ADDR8(s2636_3_bitmap, x, 0); | |
| 475 | UINT64 *dst = (UINT64 *)BITMAP_ADDR16(bitmap, x, 0); | |
| 476 | UINT8 *spb = (UINT8 *)BITMAP_ADDR8(scrolled_background, x, 0); | |
| 572 | 477 | |
| 573 | 478 | for(offs=0;offs<62;offs++) |
| 574 | 479 | { |
| r1490 | r1491 | |
| 612 | 517 | } |
| 613 | 518 | } |
| 614 | 519 | |
| 615 | /* Stars */ | |
| 616 | 520 | |
| 617 | if(stars_on) | |
| 618 | { | |
| 521 | /* stars circuit */ | |
| 522 | ||
| 523 | if (stars_on) | |
| 524 | { | |
| 619 | 525 | for (offs = 0;offs < total_stars;offs++) |
| 620 | 526 | { |
| 621 | int x,y; | |
| 527 | UINT8 x = (stars[offs].x + stars_scroll) >> 1; | |
| 528 | UINT8 y = stars[offs].y + ((stars_scroll + stars[offs].x) >> 9); | |
| 622 | 529 | |
| 623 | ||
| 624 | x = ((stars[offs].x + stars_scroll) % 512) / 2; | |
| 625 | y = (stars[offs].y + (stars_scroll + stars[offs].x) / 512) % 256; | |
| 626 | ||
| 627 | 530 | if (y >= machine->screen[0].visarea.min_y && |
| 628 | 531 | y <= machine->screen[0].visarea.max_y) |
| 629 | 532 | { |
| 630 | 533 | if ((y & 1) ^ ((x >> 4) & 1)) |
| 631 | 534 | { |
| 632 | plot_star(machine, bitmap, x, y); | |
| 535 | if (flip_screen_x) | |
| 536 | x = ~x; | |
| 537 | ||
| 538 | if (flip_screen_y) | |
| 539 | y = ~y; | |
| 540 | ||
| 541 | if (*BITMAP_ADDR16(bitmap, y, x) == machine->pens[0]) | |
| 542 | { | |
| 543 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[7]; | |
| 544 | } | |
| 633 | 545 | } |
| 634 | 546 | } |
| 635 | 547 | } |
| 548 | } | |
| 636 | 549 | |
| 637 | ||
| 550 | ||
| 638 | 551 | return 0; |
| 639 | 552 | } |
| r1490 | r1491 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | VIDEO_START( othunder ) |
| 40 | 40 | { |
| 41 | /* There is a problem here. 4 is correct for text layer/sprite | |
| 42 | alignment, but the bg layers [or one of them] are wrong */ | |
| 43 | ||
| 44 | 41 | taito_hide_pixels = 4; |
| 45 | 42 | video_start_othunder_core(machine); |
| 46 | 43 | } |
| r1490 | r1491 | |
|---|---|---|
| 15 | 15 | ***************************************************************************/ |
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | #include "cvs.h" | |
| 18 | 19 | #include "video/s2636.h" |
| 19 | 20 | #include "cpu/s2650/s2650.h" |
| 20 | 21 | |
| r1490 | r1491 | |
| 34 | 35 | #define WL1 0 |
| 35 | 36 | #endif |
| 36 | 37 | |
| 37 | // All defined in video/cvs.c | |
| 38 | 38 | |
| 39 | VIDEO_START( cvs ); | |
| 40 | ||
| 41 | extern UINT8 *cvs_bullet_ram; | |
| 42 | ||
| 43 | extern mame_bitmap *cvs_collision_bitmap; | |
| 44 | extern mame_bitmap *cvs_collision_background; | |
| 45 | ||
| 46 | ||
| 47 | extern int cvs_collision_register; | |
| 48 | ||
| 49 | ||
| 50 | 39 | // Used here |
| 51 | 40 | //static int scroll[8]; |
| 52 | 41 | //static int scroll_reg = 0; |
| r1490 | r1491 | |
| 55 | 44 | int quasar_effectcontrol; |
| 56 | 45 | |
| 57 | 46 | static mame_bitmap *effect_bitmap; |
| 47 | static mame_bitmap *background_bitmap; | |
| 58 | 48 | |
| 59 | 49 | PALETTE_INIT( quasar ) |
| 60 | 50 | { |
| r1490 | r1491 | |
| 127 | 117 | |
| 128 | 118 | s2636_x_offset = -26; |
| 129 | 119 | s2636_y_offset = 3; |
| 130 | ||
| 131 | memset(s2636_1_dirty,0,sizeof(s2636_1_dirty)); | |
| 132 | memset(s2636_2_dirty,0,sizeof(s2636_2_dirty)); | |
| 133 | memset(s2636_3_dirty,0,sizeof(s2636_3_dirty)); | |
| 134 | 120 | } |
| 135 | 121 | |
| 136 | 122 | VIDEO_START( quasar ) |
| r1490 | r1491 | |
| 138 | 124 | quasar_effectram = auto_malloc(0x400); |
| 139 | 125 | |
| 140 | 126 | effect_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 127 | background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 141 | 128 | |
| 142 | 129 | video_start_cvs(machine); |
| 143 | 130 | } |
| r1490 | r1491 | |
| 151 | 138 | /* for every character in the Video RAM, check if it has been modified */ |
| 152 | 139 | /* since last time and update it accordingly. */ |
| 153 | 140 | |
| 154 | for (offs = | |
| 141 | for (offs = 0 | |
| 155 | 142 | { |
| 156 | character = videoram[offs]; | |
| 143 | character = cvs_video_ram[offs]; | |
| 157 | 144 | |
| 158 | 145 | sx = (offs % 32) * 8; |
| 159 | 146 | sy = (offs / 32) * 8; |
| r1490 | r1491 | |
| 172 | 159 | |
| 173 | 160 | /* Main Screen */ |
| 174 | 161 | |
| 175 | drawgfx( | |
| 162 | drawgfx(background_bitmap,machine->gfx[0], | |
| 176 | 163 | character, |
| 177 | colorram[offs], | |
| 164 | cvs_color_ram[offs], | |
| 178 | 165 | 0,0, |
| 179 | 166 | sx,sy, |
| 180 | 167 | 0,TRANSPARENCY_NONE,0); |
| r1490 | r1491 | |
| 182 | 169 | |
| 183 | 170 | /* background for Collision Detection (it can only hit certain items) */ |
| 184 | 171 | |
| 185 | if((colorram[offs] & 7) == 0) | |
| 172 | if((cvs_color_ram[offs] & 7) == 0) | |
| 186 | 173 | { |
| 187 | 174 | drawgfx(cvs_collision_background,machine->gfx[0], |
| 188 | 175 | character, |
| r1490 | r1491 | |
| 196 | 183 | /* Update screen */ |
| 197 | 184 | |
| 198 | 185 | copybitmap(bitmap,effect_bitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 199 | copybitmap(bitmap, | |
| 186 | copybitmap(bitmap,background_bitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_PEN,0); | |
| 200 | 187 | |
| 201 | 188 | /* 2636's */ |
| 202 | 189 | |
| 203 | 190 | fillbitmap(s2636_1_bitmap,0,0); |
| 204 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram, | |
| 191 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram, | |
| 205 | 192 | |
| 206 | 193 | fillbitmap(s2636_2_bitmap,0,0); |
| 207 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram, | |
| 194 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram, | |
| 208 | 195 | |
| 209 | 196 | fillbitmap(s2636_3_bitmap,0,0); |
| 210 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram, | |
| 197 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram, | |
| 211 | 198 | |
| 212 | 199 | /* Bullet Hardware */ |
| 213 | 200 |
| r1490 | r1491 | |
|---|---|---|
| 201 | 201 | { |
| 202 | 202 | int offs; |
| 203 | 203 | |
| 204 | for (offs = spriteram_size | |
| 204 | for (offs = 0; offs < spriteram_size | |
| 205 | 205 | { |
| 206 | int bank = (spriteram[offs + 3] & 0x04) >> 2; | |
| 207 | int code = spriteram[offs + 2] + ((spriteram[offs + 3] & 0x03) << 8); | |
| 208 | int color = ((spriteram[offs + 3] & 0x70) >> 4) + 8 * palette_bank; | |
| 209 | int flipx = 0; | |
| 210 | int flipy = spriteram[offs + 3] & 0x80; | |
| 211 | int sx = spriteram[offs+1]; | |
| 212 | int sy = spriteram[offs]; | |
| 206 | int roffs,bank,code,color,flipx,flipy,sx,sy; | |
| 213 | 207 | |
| 208 | /* the offset into spriteram seems scrambled */ | |
| 209 | roffs = BITSWAP16(offs,15,14,13,12,11,10,4,7,6,5,9,8,3,2,1,0) ^ 0x3c; | |
| 210 | if (roffs & 0x200) roffs ^= 0x1c0; | |
| 211 | ||
| 212 | bank = (spriteram[roffs + 3] & 0x04) >> 2; | |
| 213 | code = spriteram[roffs + 2] + ((spriteram[roffs + 3] & 0x03) << 8); | |
| 214 | color = ((spriteram[roffs + 3] & 0x70) >> 4) + 8 * palette_bank; | |
| 215 | flipx = 0; | |
| 216 | flipy = spriteram[roffs + 3] & 0x80; | |
| 217 | sx = spriteram[roffs+1]; | |
| 218 | sy = spriteram[roffs]; | |
| 219 | ||
| 214 | 220 | if (flip_screen) |
| 215 | 221 | { |
| 216 | 222 | sx = 240 - sx; |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | #include "tatsumi.h" |
| 3 | 3 | #include <math.h> |
| 4 | 4 | |
| 5 | static tilemap *bg_layer,*tx_layer; | |
| 5 | static tilemap *tx_layer; | |
| 6 | static tilemap *layer0, *layer1, *layer2, *layer3; | |
| 7 | ||
| 6 | 8 | static mame_bitmap *temp_bitmap; |
| 7 | 9 | |
| 8 | 10 | UINT16 *roundup_r_ram, *roundup_p_ram, *roundup_l_ram; |
| 9 | UINT16 *cyclwarr_videoram, *cyclwarr_videoram | |
| 11 | UINT16 *cyclwarr_videoram0, *cyclwarr_videoram1; | |
| 10 | 12 | UINT16* tatsumi_sprite_control_ram; |
| 11 | 13 | static UINT16* roundup5_vram; |
| 12 | 14 | |
| 15 | extern UINT16 bigfight_a20000[8], bigfight_a40000[2], bigfight_a60000[8]; | |
| 16 | static UINT16 bigfight_bank, bigfight_last_bank; | |
| 17 | ||
| 18 | static UINT8 roundupt_crt_selected_reg; | |
| 19 | static UINT8 roundupt_crt_reg[64]; | |
| 20 | extern UINT16 debugA,debugB,debugC,debugD; | |
| 21 | ||
| 22 | static UINT8* shadow_pen_array; | |
| 23 | ||
| 13 | 24 | /******************************************************************************/ |
| 14 | 25 | |
| 15 | 26 | WRITE16_HANDLER(tatsumi_sprite_control_w) |
| r1490 | r1491 | |
| 113 | 124 | tilemap_mark_tile_dirty( tx_layer,offset); |
| 114 | 125 | } |
| 115 | 126 | |
| 116 | READ16_HANDLER( cyclwarr_videoram_r ) | |
| 127 | READ16_HANDLER( cyclwarr_videoram0_r ) | |
| 117 | 128 | { |
| 118 | return cyclwarr_videoram[offset]; | |
| 129 | return cyclwarr_videoram0[offset]; | |
| 119 | 130 | } |
| 120 | 131 | |
| 121 | READ16_HANDLER( cyclwarr_videoram | |
| 132 | READ16_HANDLER( cyclwarr_videoram1_r ) | |
| 122 | 133 | { |
| 123 | return cyclwarr_videoram | |
| 134 | return cyclwarr_videoram1[offset]; | |
| 124 | 135 | } |
| 125 | 136 | |
| 126 | WRITE16_HANDLER( cyclwarr_videoram_w ) | |
| 137 | WRITE16_HANDLER( cyclwarr_videoram0_w ) | |
| 127 | 138 | { |
| 128 | COMBINE_DATA(&cyclwarr_videoram[offset]); | |
| 129 | if (offset>=0x400 && offset<0x1400) | |
| 130 | tilemap_mark_tile_dirty( tx_layer,offset - 0x400); | |
| 131 | if (offset>=0x1400 && offset<0x3400) | |
| 132 | tilemap_mark_tile_dirty( bg_layer,offset - 0x1400); | |
| 139 | COMBINE_DATA(&cyclwarr_videoram0[offset]); | |
| 140 | if (offset>=0x400) | |
| 141 | { | |
| 142 | tilemap_mark_tile_dirty( layer0, offset-0x400); | |
| 143 | tilemap_mark_tile_dirty( layer1, offset-0x400); | |
| 144 | } | |
| 133 | 145 | } |
| 134 | 146 | |
| 135 | WRITE16_HANDLER( cyclwarr_videoram | |
| 147 | WRITE16_HANDLER( cyclwarr_videoram1_w ) | |
| 136 | 148 | { |
| 137 | COMBINE_DATA(&cyclwarr_videoram2[offset]); | |
| 138 | if (offset>=0x400 && offset<0x1400) | |
| 139 | tilemap_mark_tile_dirty( tx_layer,offset - 0x400); | |
| 140 | if (offset>=0x1400 && offset<0x3400) | |
| 141 | tilemap_mark_tile_dirty( bg_layer,offset - 0x1400); | |
| 149 | COMBINE_DATA(&cyclwarr_videoram1[offset]); | |
| 150 | if (offset>=0x400) | |
| 151 | { | |
| 152 | tilemap_mark_tile_dirty( layer2, offset-0x400); | |
| 153 | tilemap_mark_tile_dirty( layer3, offset-0x400); | |
| 154 | } | |
| 142 | 155 | } |
| 143 | 156 | |
| 144 | static UINT8 roundupt_crt_selected_reg; | |
| 145 | static UINT8 roundupt_crt_reg[64]; | |
| 146 | extern UINT16 debugA,debugB,debugC,debugD; | |
| 147 | ||
| 148 | static UINT8* shadow_pen_array; | |
| 149 | ||
| 150 | 157 | WRITE16_HANDLER( roundup5_crt_w ) |
| 151 | 158 | { |
| 152 | 159 | if (offset==0 && ACCESSING_LSB) |
| r1490 | r1491 | |
| 170 | 177 | 0); |
| 171 | 178 | } |
| 172 | 179 | |
| 173 | static TILE_GET_INFO( get_ | |
| 180 | static TILE_GET_INFO( get_ | |
| 174 | 181 | { |
| 175 | int tile=cyclwarr_videoram2[tile_index+0x1400]; | |
| 176 | int color=tile >> 14; | |
| 177 | ||
| 178 | tile=(tile&0x3fff) | 0x000; | |
| 179 | ||
| 180 | SET_TILE_INFO( | |
| 181 | 1, | |
| 182 | tile, | |
| 183 | color, | |
| 184 | 0); | |
| 182 | int tile=cyclwarr_videoram0[(tile_index+0x400)%0x8000]; | |
| 183 | int bank = (bigfight_a40000[0] >> (((tile&0xc00)>>10)*4))&0xf; | |
| 184 | SET_TILE_INFO(1,(tile&0x3ff)+(bank<<10),(tile>>12)&0xf,0); | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | static TILE_GET_INFO( get_t | |
| 187 | static TILE_GET_INFO( get_t | |
| 188 | 188 | { |
| 189 | int tile=cyclwarr_videoram[tile_index+0x400]; | |
| 190 | int color=tile >> 12; | |
| 191 | ||
| 192 | tile=tile&0xfff; | |
| 193 | ||
| 194 | SET_TILE_INFO( | |
| 195 | 1, | |
| 196 | tile, | |
| 197 | color, | |
| 198 | 0); | |
| 189 | int tile=cyclwarr_videoram1[(tile_index+0x400)%0x8000]; | |
| 190 | int bank = (bigfight_a40000[0] >> (((tile&0xc00)>>10)*4))&0xf; | |
| 191 | SET_TILE_INFO(1,(tile&0x3ff)+(bank<<10),(tile>>12)&0xf,0); | |
| 199 | 192 | } |
| 200 | 193 | |
| 201 | 194 | /********************************************************************/ |
| r1490 | r1491 | |
| 222 | 215 | |
| 223 | 216 | VIDEO_START( cyclwarr ) |
| 224 | 217 | { |
| 225 | bg_layer = tilemap_create(get_bg_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,256,256); | |
| 226 | tx_layer = tilemap_create(get_text_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 218 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 219 | //layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 220 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 221 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 222 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 223 | ||
| 227 | 224 | shadow_pen_array = auto_malloc(8192); |
| 225 | memset(shadow_pen_array, 0, 8192); | |
| 226 | } | |
| 228 | 227 | |
| 228 | VIDEO_START( bigfight ) | |
| 229 | { | |
| 230 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 231 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 232 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 233 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 234 | ||
| 235 | shadow_pen_array = auto_malloc(8192); | |
| 229 | 236 | memset(shadow_pen_array, 0, 8192); |
| 230 | tilemap_set_transparent_pen(bg_layer,0); | |
| 231 | tilemap_set_transparent_pen(tx_layer,0); | |
| 232 | 237 | } |
| 233 | 238 | |
| 234 | 239 | /********************************************************************/ |
| r1490 | r1491 | |
| 537 | 542 | 0x0007 - ? |
| 538 | 543 | Word 2: 0xffff - X position |
| 539 | 544 | Word 3: 0xffff - Y position |
| 540 | Word 4: 0x01ff - Rotation | |
| 545 | Word 4: 0x01ff - Scale | |
| 546 | Word 5: 0x01ff - Rotation | |
| 541 | 547 | |
| 542 | 548 | Sprite ROM table format, alternate lines come from each bank, with the |
| 543 | 549 | very first line indicating control information: |
| r1490 | r1491 | |
| 556 | 562 | */ |
| 557 | 563 | y = spriteram16[offs+3]; |
| 558 | 564 | x = spriteram16[offs+2]; |
| 559 | scale = spriteram16[offs+4]&0xff; | |
| 565 | scale = spriteram16[offs+4]&0x1ff; | |
| 560 | 566 | color = (spriteram16[offs+1]>>3)&0x1ff; |
| 561 | 567 | fx = spriteram16[offs+1]&0x8000; |
| 562 | 568 | rotate = 0;//spriteram16[offs+5]&0x1ff; // Todo: Turned off for now |
| r1490 | r1491 | |
| 570 | 576 | if (index==0xffff || spriteram16[offs+4]==0xffff) //todo |
| 571 | 577 | return; |
| 572 | 578 | |
| 573 | if (index>=0x | |
| 579 | if (index>=0x4000) | |
| 574 | 580 | continue; |
| 575 | 581 | |
| 576 | 582 | src1 = tatsumi_rom_sprite_lookup1 + (index*4); |
| r1490 | r1491 | |
| 618 | 624 | if (!rotate) |
| 619 | 625 | { |
| 620 | 626 | if (fx) |
| 621 | x_pos=render_x-x_offs; | |
| 627 | x_pos=render_x-x_offs-scale*8; | |
| 622 | 628 | else |
| 623 | 629 | x_pos=render_x+x_offs; |
| 624 | 630 | } |
| r1490 | r1491 | |
| 955 | 961 | |
| 956 | 962 | /**********************************************************************/ |
| 957 | 963 | |
| 964 | static void draw_bg(running_machine *machine, mame_bitmap *dst, tilemap *src, const UINT16* scrollx, const UINT16* scrolly, const UINT16* tilemap_ram, int tile_bank, int xscroll_offset, int yscroll_offset, int xsize, int ysize) | |
| 965 | { | |
| 966 | /* | |
| 967 | Each tile (0x4000 of them) has a lookup table in ROM to build an individual 3-bit palette | |
| 968 | from sets of 8 bit palettes! | |
| 969 | */ | |
| 970 | const UINT8* tile_cluts = memory_region(REGION_GFX4); | |
| 971 | const mame_bitmap *src_bitmap = tilemap_get_pixmap(src); | |
| 972 | int src_y_mask=ysize-1; | |
| 973 | int src_x_mask=xsize-1; | |
| 974 | int tile_y_mask=(ysize/8)-1; | |
| 975 | int tile_x_mask=(xsize/8)-1; | |
| 976 | int tiles_per_x_line=(xsize/8); | |
| 977 | int x, y, p, pp, ppp; | |
| 978 | ||
| 979 | for (y=0; y<240; y++) | |
| 980 | { | |
| 981 | for (x=0; x<320; x++) | |
| 982 | { | |
| 983 | int src_x = x + scrollx[y] + xscroll_offset; | |
| 984 | int src_y = y + scrolly[y] + yscroll_offset; | |
| 985 | int tile_index = (((src_x>>3)&tile_x_mask) + (((src_y>>3)&tile_y_mask) * tiles_per_x_line)); | |
| 986 | int bank = (tile_bank >> (((tilemap_ram[(tile_index+0x400)&0x7fff]&0xc00)>>10)*4))&0xf; | |
| 987 | int tile = (tilemap_ram[(tile_index+0x400)&0x7fff]&0x3ff) | (bank<<10); | |
| 988 | ||
| 989 | p=*BITMAP_ADDR16(src_bitmap, src_y&src_y_mask, src_x&src_x_mask); | |
| 990 | pp=tile_cluts[tile*8 + (p&0x7)]; | |
| 991 | ppp=pp + ((p&0x78)<<5); | |
| 992 | ||
| 993 | if ((p&0x7)!=0 || ((p&0x7)==0 && (pp&0x7)!=0)) // Transparent pixels are set by both the tile pixel data==0 AND colour palette==0 | |
| 994 | *BITMAP_ADDR32(dst, y, x) = machine->pens[ppp]; | |
| 995 | } | |
| 996 | } | |
| 997 | } | |
| 998 | ||
| 999 | /**********************************************************************/ | |
| 1000 | ||
| 958 | 1001 | VIDEO_UPDATE( apache3 ) |
| 959 | 1002 | { |
| 960 | 1003 | update_cluts(machine, 1024, 0, 2048); |
| r1490 | r1491 | |
| 988 | 1031 | |
| 989 | 1032 | VIDEO_UPDATE( cyclwarr ) |
| 990 | 1033 | { |
| 1034 | bigfight_bank=bigfight_a40000[0]; | |
| 1035 | if (bigfight_bank!=bigfight_last_bank) | |
| 1036 | { | |
| 1037 | tilemap_mark_all_tiles_dirty(layer0); | |
| 1038 | tilemap_mark_all_tiles_dirty(layer1); | |
| 1039 | tilemap_mark_all_tiles_dirty(layer2); | |
| 1040 | tilemap_mark_all_tiles_dirty(layer3); | |
| 1041 | bigfight_last_bank=bigfight_bank; | |
| 1042 | } | |
| 1043 | ||
| 991 | 1044 | fillbitmap(bitmap,machine->pens[0],cliprect); |
| 992 | // tilemap_draw(bitmap,cliprect,bg_layer,0,0); | |
| 1045 | ||
| 1046 | draw_bg(machine, bitmap, layer3, &cyclwarr_videoram1[0x000], &cyclwarr_videoram1[0x100], cyclwarr_videoram1, bigfight_a40000[0], 8, -0x80, 512, 4096); | |
| 1047 | draw_bg(machine, bitmap, layer2, &cyclwarr_videoram1[0x200], &cyclwarr_videoram1[0x300], cyclwarr_videoram1, bigfight_a40000[0], 8, -0x80, 512, 4096); | |
| 1048 | draw_bg(machine, bitmap, layer1, &cyclwarr_videoram0[0x000], &cyclwarr_videoram0[0x100], cyclwarr_videoram0, bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
| 993 | 1049 | update_cluts(machine, 8192, 4096, 8192); |
| 994 | 1050 | draw_sprites(machine, bitmap,cliprect,0,(tatsumi_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); |
| 995 | tilemap_draw(bitmap,cliprect,tx_layer,0,0); | |
| 1051 | draw_bg(machine, bitmap, layer0, &cyclwarr_videoram0[0x200], &cyclwarr_videoram0[0x300], cyclwarr_videoram0, bigfight_a40000[0], 0x10, -0x80, 512, 4096); | |
| 1052 | ||
| 996 | 1053 | return 0; |
| 997 | 1054 | } |
| 1055 | ||
| 1056 | VIDEO_UPDATE( bigfight ) | |
| 1057 | { | |
| 1058 | bigfight_bank=bigfight_a40000[0]; | |
| 1059 | if (bigfight_bank!=bigfight_last_bank) | |
| 1060 | { | |
| 1061 | tilemap_mark_all_tiles_dirty(layer0); | |
| 1062 | tilemap_mark_all_tiles_dirty(layer1); | |
| 1063 | tilemap_mark_all_tiles_dirty(layer2); | |
| 1064 | tilemap_mark_all_tiles_dirty(layer3); | |
| 1065 | bigfight_last_bank=bigfight_bank; | |
| 1066 | } | |
| 1067 | ||
| 1068 | fillbitmap(bitmap,machine->pens[0],cliprect); | |
| 1069 | draw_bg(machine, bitmap, layer3, &cyclwarr_videoram1[0x000], &cyclwarr_videoram1[0x100], cyclwarr_videoram1, bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
| 1070 | draw_bg(machine, bitmap, layer2, &cyclwarr_videoram1[0x200], &cyclwarr_videoram1[0x300], cyclwarr_videoram1, bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
| 1071 | draw_bg(machine, bitmap, layer1, &cyclwarr_videoram0[0x000], &cyclwarr_videoram0[0x100], cyclwarr_videoram0, bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
| 1072 | update_cluts(machine, 8192, 4096, 8192); | |
| 1073 | draw_sprites(machine, bitmap,cliprect,0,(tatsumi_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); | |
| 1074 | draw_bg(machine, bitmap, layer0, &cyclwarr_videoram0[0x200], &cyclwarr_videoram0[0x300], cyclwarr_videoram0, bigfight_a40000[0], 0x10, -0x40, 1024, 2048); | |
| 1075 | ||
| 1076 | return 0; | |
| 1077 | } |
| r1490 | r1491 | |
|---|---|---|
| 1205 | 1205 | } |
| 1206 | 1206 | |
| 1207 | 1207 | |
| 1208 | static void decode_gfx(running_machine *machine, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp) | |
| 1209 | { | |
| 1210 | gfx_layout gl; | |
| 1208 | 1211 | |
| 1212 | memcpy(&gl, layout, sizeof(gl)); | |
| 1213 | gl.total = total; | |
| 1214 | machine->gfx[gfx_index] = allocgfx(&gl); | |
| 1215 | decodegfx(machine->gfx[gfx_index], data, 0, machine->gfx[gfx_index]->total_elements); | |
| 1209 | 1216 | |
| 1217 | /* set the color information */ | |
| 1218 | if (machine->drv->color_table_len) | |
| 1219 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / (1 << bpp); | |
| 1220 | else | |
| 1221 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / (1 << bpp); | |
| 1222 | } | |
| 1210 | 1223 | |
| 1211 | 1224 | |
| 1225 | ||
| 1226 | ||
| 1227 | ||
| 1212 | 1228 | /***************************************************************************/ |
| 1213 | 1229 | /* */ |
| 1214 | 1230 | /* 007121 */ |
| r1490 | r1491 | |
| 1885 | 1901 | static UINT8 *K052109_videoram_A,*K052109_videoram2_A,*K052109_colorram_A; |
| 1886 | 1902 | static UINT8 *K052109_videoram_B,*K052109_videoram2_B,*K052109_colorram_B; |
| 1887 | 1903 | static UINT8 K052109_charrombank[4]; |
| 1904 | static UINT8 K052109_charrombank_2[4]; | |
| 1888 | 1905 | static UINT8 has_extra_video_ram; |
| 1889 | 1906 | static INT32 K052109_RMRD_line; |
| 1890 | 1907 | static int K052109_tileflip_enable; |
| r1490 | r1491 | |
| 1958 | 1975 | } |
| 1959 | 1976 | |
| 1960 | 1977 | |
| 1961 | void K052109_vh_start(running_machine *machine,int gfx_memory_region,int plane | |
| 1978 | void K052109_vh_start(running_machine *machine,int gfx_memory_region,int plane_ord | |
| 1962 | 1979 | void (*callback)(int tmap,int bank,int *code,int *color,int *flags,int *priority)) |
| 1963 | 1980 | { |
| 1964 | 1981 | int gfx_index, i; |
| 1965 | static gfx_layout charlayout = | |
| 1982 | UINT32 total; | |
| 1983 | static const gfx_layout charlayout = | |
| 1966 | 1984 | { |
| 1967 | 1985 | 8,8, |
| 1968 | 0, | |
| 1986 | 0, | |
| 1969 | 1987 | 4, |
| 1970 | { | |
| 1988 | { 24, 16, 8, 0 }, | |
| 1971 | 1989 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 1972 | 1990 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, |
| 1973 | 1991 | 32*8 |
| r1490 | r1491 | |
| 1980 | 1998 | break; |
| 1981 | 1999 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 1982 | 2000 | |
| 1983 | /* tweak the structure for the number of tiles we have */ | |
| 1984 | charlayout.total = memory_region_length(gfx_memory_region) / 32; | |
| 1985 | charlayout.planeoffset[0] = plane3 * 8; | |
| 1986 | charlayout.planeoffset[1] = plane2 * 8; | |
| 1987 | charlayout.planeoffset[2] = plane1 * 8; | |
| 1988 | charlayout.planeoffset[3] = plane0 * 8; | |
| 1989 | ||
| 1990 | 2001 | /* decode the graphics */ |
| 1991 | machine->gfx[gfx_index] = allocgfx(&charlayout); | |
| 1992 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 2002 | switch (plane_order) | |
| 2003 | { | |
| 2004 | case NORMAL_PLANE_ORDER: | |
| 2005 | total = memory_region_length(gfx_memory_region) / 32; | |
| 2006 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout, 4); | |
| 2007 | break; | |
| 1993 | 2008 | |
| 1994 | /* set the color information */ | |
| 1995 | if (machine->drv->color_table_len) | |
| 1996 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 1997 | else | |
| 1998 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 2009 | default: | |
| 2010 | fatalerror("Unsupported plane_order"); | |
| 2011 | } | |
| 1999 | 2012 | |
| 2000 | 2013 | K052109_memory_region = gfx_memory_region; |
| 2001 | 2014 | K052109_gfxnum = gfx_index; |
| r1490 | r1491 | |
| 2038 | 2051 | state_save_register_global(K052109_scrollctrl); |
| 2039 | 2052 | state_save_register_global(K052109_irq_enabled); |
| 2040 | 2053 | state_save_register_global_array(K052109_charrombank); |
| 2054 | state_save_register_global_array(K052109_charrombank_2); | |
| 2041 | 2055 | state_save_register_global_array(K052109_dx); |
| 2042 | 2056 | state_save_register_global_array(K052109_dy); |
| 2043 | 2057 | state_save_register_global(has_extra_video_ram); |
| r1490 | r1491 | |
| 2045 | 2059 | state_save_register_func_postload(K052109_tileflip_reset); |
| 2046 | 2060 | } |
| 2047 | 2061 | |
| 2048 | ||
| 2049 | ||
| 2050 | 2062 | READ8_HANDLER( K052109_r ) |
| 2051 | 2063 | { |
| 2052 | 2064 | if (K052109_RMRD_line == CLEAR_LINE) |
| r1490 | r1491 | |
| 2078 | 2090 | int bank = K052109_charrombank[(color & 0x0c) >> 2] >> 2; /* discard low bits (TMNT) */ |
| 2079 | 2091 | int addr; |
| 2080 | 2092 | |
| 2093 | bank |= (K052109_charrombank_2[(color & 0x0c) >> 2] >> 2); // Surprise Attack uses this 2nd bank in the rom test | |
| 2094 | ||
| 2081 | 2095 | if (has_extra_video_ram) code |= color << 8; /* kludge for X-Men */ |
| 2082 | 2096 | else |
| 2083 | 2097 | (*K052109_callback)(0,bank,&code,&color,&flags,&priority); |
| r1490 | r1491 | |
| 2085 | 2099 | addr = (code << 5) + (offset & 0x1f); |
| 2086 | 2100 | addr &= memory_region_length(K052109_memory_region)-1; |
| 2087 | 2101 | |
| 2088 | // | |
| 2102 | // lo | |
| 2089 | 2103 | |
| 2090 | 2104 | return memory_region(K052109_memory_region)[addr]; |
| 2091 | 2105 | } |
| r1490 | r1491 | |
| 2139 | 2153 | for (i = 0;i < 0x1800;i++) |
| 2140 | 2154 | { |
| 2141 | 2155 | int bank = (K052109_ram[i]&0x0c) >> 2; |
| 2142 | if ((bank == 0 && (dirty & 1)) || (bank == 1 && dirty & 2)) | |
| 2156 | if ((bank == 0 && (dirty & 1)) || (bank == 1 && (dirty & 2))) | |
| 2143 | 2157 | { |
| 2144 | 2158 | tilemap_mark_tile_dirty(K052109_tilemap[(i & 0x1800) >> 11],i & 0x7ff); |
| 2145 | 2159 | } |
| 2146 | 2160 | } |
| 2147 | 2161 | } |
| 2148 | 2162 | } |
| 2149 | else if (offset == 0x1e00) | |
| 2163 | else if (offset == 0x1e00 || offset == 0x3e00) // Surprise Attack uses offset 0x3e00 | |
| 2150 | 2164 | { |
| 2151 | 2165 | //logerror("%04x: 052109 register 1e00 = %02x\n",activecpu_get_pc(),data); |
| 2152 | 2166 | K052109_romsubbank = data; |
| r1490 | r1491 | |
| 2182 | 2196 | for (i = 0;i < 0x1800;i++) |
| 2183 | 2197 | { |
| 2184 | 2198 | int bank = (K052109_ram[i] & 0x0c) >> 2; |
| 2185 | if ((bank == 2 && (dirty & 1)) || (bank == 3 && dirty & 2)) | |
| 2199 | if ((bank == 2 && (dirty & 1)) || (bank == 3 && (dirty & 2))) | |
| 2186 | 2200 | tilemap_mark_tile_dirty(K052109_tilemap[(i & 0x1800) >> 11],i & 0x7ff); |
| 2187 | 2201 | } |
| 2188 | 2202 | } |
| r1490 | r1491 | |
| 2191 | 2205 | { /* B y scroll */ } |
| 2192 | 2206 | else if (offset >= 0x3a00 && offset < 0x3c00) |
| 2193 | 2207 | { /* B x scroll */ } |
| 2208 | else if (offset == 0x3d80) // Surprise Attack uses offset 0x3d80 in rom test | |
| 2209 | { | |
| 2210 | // mirroring this write, breaks Surprise Attack in game tilemaps | |
| 2211 | K052109_charrombank_2[0] = data & 0x0f; | |
| 2212 | K052109_charrombank_2[1] = (data >> 4) & 0x0f; | |
| 2213 | } | |
| 2214 | else if (offset == 0x3f00) // Surprise Attack uses offset 0x3f00 in rom test | |
| 2215 | { | |
| 2216 | // mirroring this write, breaks Surprise Attack in game tilemaps | |
| 2217 | K052109_charrombank_2[2] = data & 0x0f; | |
| 2218 | K052109_charrombank_2[3] = (data >> 4) & 0x0f; | |
| 2219 | } | |
| 2194 | 2220 | // else |
| 2195 | //logerror("%04x: write %02x to unknown 052109 address %04x\n",activecpu_get_pc(),data,offset); | |
| 2221 | // logerror("%04x: write %02x to unknown 052109 address %04x\n",activecpu_get_pc(),data,offset); | |
| 2196 | 2222 | } |
| 2197 | 2223 | } |
| 2198 | 2224 | |
| r1490 | r1491 | |
| 2420 | 2446 | static int K051960_irq_enabled, K051960_nmi_enabled; |
| 2421 | 2447 | |
| 2422 | 2448 | |
| 2423 | void K051960_vh_start(running_machine *machine,int gfx_memory_region,int plane | |
| 2449 | void K051960_vh_start(running_machine *machine,int gfx_memory_region,int plane_ord | |
| 2424 | 2450 | void (*callback)(int *code,int *color,int *priority,int *shadow)) |
| 2425 | 2451 | { |
| 2426 | 2452 | int gfx_index,i; |
| 2427 | static gfx_layout spritelayout = | |
| 2453 | UINT32 total; | |
| 2454 | static const gfx_layout spritelayout = | |
| 2428 | 2455 | { |
| 2429 | 2456 | 16,16, |
| 2430 | 0, | |
| 2457 | 0, | |
| 2431 | 2458 | 4, |
| 2432 | { 0, | |
| 2459 | { 0, 8, 16, 24 }, | |
| 2433 | 2460 | { 0, 1, 2, 3, 4, 5, 6, 7, |
| 2434 | 2461 | 8*32+0, 8*32+1, 8*32+2, 8*32+3, 8*32+4, 8*32+5, 8*32+6, 8*32+7 }, |
| 2435 | 2462 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, |
| 2436 | 2463 | 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 }, |
| 2437 | 2464 | 128*8 |
| 2438 | 2465 | }; |
| 2466 | static const gfx_layout spritelayout_reverse = | |
| 2467 | { | |
| 2468 | 16,16, | |
| 2469 | 0, | |
| 2470 | 4, | |
| 2471 | { 24, 16, 8, 0 }, | |
| 2472 | { 0, 1, 2, 3, 4, 5, 6, 7, | |
| 2473 | 8*32+0, 8*32+1, 8*32+2, 8*32+3, 8*32+4, 8*32+5, 8*32+6, 8*32+7 }, | |
| 2474 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, | |
| 2475 | 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 }, | |
| 2476 | 128*8 | |
| 2477 | }; | |
| 2439 | 2478 | |
| 2440 | ||
| 2441 | 2479 | /* find first empty slot to decode gfx */ |
| 2442 | 2480 | for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++) |
| 2443 | 2481 | if (machine->gfx[gfx_index] == 0) |
| r1490 | r1491 | |
| 2445 | 2483 | |
| 2446 | 2484 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 2447 | 2485 | |
| 2448 | /* tweak the structure for the number of tiles we have */ | |
| 2449 | spritelayout.total = memory_region_length(gfx_memory_region) / 128; | |
| 2450 | spritelayout.planeoffset[0] = plane0 * 8; | |
| 2451 | spritelayout.planeoffset[1] = plane1 * 8; | |
| 2452 | spritelayout.planeoffset[2] = plane2 * 8; | |
| 2453 | spritelayout.planeoffset[3] = plane3 * 8; | |
| 2454 | ||
| 2455 | 2486 | /* decode the graphics */ |
| 2456 | machine->gfx[gfx_index] = allocgfx(&spritelayout); | |
| 2457 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 2487 | switch (plane_order) | |
| 2488 | { | |
| 2489 | case NORMAL_PLANE_ORDER: | |
| 2490 | total = memory_region_length(gfx_memory_region) / 128; | |
| 2491 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &spritelayout, 4); | |
| 2492 | break; | |
| 2458 | 2493 | |
| 2459 | /* set the color information */ | |
| 2460 | if (machine->drv->color_table_len) | |
| 2461 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 2462 | else | |
| 2463 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 2494 | case REVERSE_PLANE_ORDER: | |
| 2495 | total = memory_region_length(gfx_memory_region) / 128; | |
| 2496 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &spritelayout_reverse, 4); | |
| 2497 | break; | |
| 2464 | 2498 | |
| 2499 | default: | |
| 2500 | fatalerror("Unknown plane_order"); | |
| 2501 | } | |
| 2502 | ||
| 2465 | 2503 | if (VERBOSE && !(machine->drv->video_attributes & VIDEO_HAS_SHADOWS)) |
| 2466 | 2504 | popmessage("driver should use VIDEO_HAS_SHADOWS"); |
| 2467 | 2505 | |
| r1490 | r1491 | |
| 2913 | 2951 | static UINT8 K053244_regs[MAX_K053245_CHIPS][0x10]; |
| 2914 | 2952 | static int K053245_dx[MAX_K053245_CHIPS], K053245_dy[MAX_K053245_CHIPS]; |
| 2915 | 2953 | |
| 2916 | void K053245_vh_start(running_machine *machine,int chip, int gfx_memory_region,int plane | |
| 2954 | void K053245_vh_start(running_machine *machine,int chip, int gfx_memory_region,int plane_ord | |
| 2917 | 2955 | void (*callback)(int *code,int *color,int *priority)) |
| 2918 | 2956 | { |
| 2919 | 2957 | int gfx_index,i; |
| 2920 | static gfx_layout spritelayout = | |
| 2958 | UINT32 total; | |
| 2959 | static const gfx_layout spritelayout = | |
| 2921 | 2960 | { |
| 2922 | 2961 | 16,16, |
| 2923 | 0, | |
| 2962 | 0, | |
| 2924 | 2963 | 4, |
| 2925 | { | |
| 2964 | { 24, 16, 8, 0 }, | |
| 2926 | 2965 | { 0, 1, 2, 3, 4, 5, 6, 7, |
| 2927 | 2966 | 8*32+0, 8*32+1, 8*32+2, 8*32+3, 8*32+4, 8*32+5, 8*32+6, 8*32+7 }, |
| 2928 | 2967 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, |
| r1490 | r1491 | |
| 2942 | 2981 | break; |
| 2943 | 2982 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 2944 | 2983 | |
| 2945 | /* tweak the structure for the number of tiles we have */ | |
| 2946 | spritelayout.total = memory_region_length(gfx_memory_region) / 128; | |
| 2947 | spritelayout.planeoffset[0] = plane3 * 8; | |
| 2948 | spritelayout.planeoffset[1] = plane2 * 8; | |
| 2949 | spritelayout.planeoffset[2] = plane1 * 8; | |
| 2950 | spritelayout.planeoffset[3] = plane0 * 8; | |
| 2951 | ||
| 2952 | 2984 | /* decode the graphics */ |
| 2953 | machine->gfx[gfx_index] = allocgfx(&spritelayout); | |
| 2954 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 2985 | switch (plane_order) | |
| 2986 | { | |
| 2987 | case NORMAL_PLANE_ORDER: | |
| 2988 | total = memory_region_length(gfx_memory_region) / 128; | |
| 2989 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &spritelayout, 4); | |
| 2990 | break; | |
| 2955 | 2991 | |
| 2956 | /* set the color information */ | |
| 2957 | if (machine->drv->color_table_len) | |
| 2958 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 2959 | else | |
| 2960 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 2992 | default: | |
| 2993 | fatalerror("Unsupported plane_order"); | |
| 2994 | } | |
| 2961 | 2995 | |
| 2962 | 2996 | if (VERBOSE && !(machine->drv->video_attributes & VIDEO_HAS_SHADOWS)) |
| 2963 | 2997 | popmessage("driver should use VIDEO_HAS_SHADOWS"); |
| r1490 | r1491 | |
| 3664 | 3698 | K053247_wraparound = status; |
| 3665 | 3699 | } |
| 3666 | 3700 | |
| 3667 | void K053247_vh_start(running_machine *machine, int gfx_memory_region, int dx, int dy, int plane | |
| 3701 | void K053247_vh_start(running_machine *machine, int gfx_memory_region, int dx, int dy, int plane_ord | |
| 3668 | 3702 | void (*callback)(int *code,int *color,int *priority)) |
| 3669 | 3703 | { |
| 3670 | 3704 | int gfx_index,i; |
| 3671 | static gfx_layout spritelayout = | |
| 3705 | UINT32 total; | |
| 3706 | static const gfx_layout spritelayout = | |
| 3672 | 3707 | { |
| 3673 | 3708 | 16,16, |
| 3674 | 0, | |
| 3709 | 0, | |
| 3675 | 3710 | 4, |
| 3676 | { 0, | |
| 3711 | { 0, 1, 2, 3 }, | |
| 3677 | 3712 | { 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4, |
| 3678 | 3713 | 10*4, 11*4, 8*4, 9*4, 14*4, 15*4, 12*4, 13*4 }, |
| 3679 | 3714 | { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, |
| r1490 | r1491 | |
| 3688 | 3723 | break; |
| 3689 | 3724 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 3690 | 3725 | |
| 3691 | /* tweak the structure for the number of tiles we have */ | |
| 3692 | spritelayout.total = memory_region_length(gfx_memory_region) / 128; | |
| 3693 | spritelayout.planeoffset[0] = plane0; | |
| 3694 | spritelayout.planeoffset[1] = plane1; | |
| 3695 | spritelayout.planeoffset[2] = plane2; | |
| 3696 | spritelayout.planeoffset[3] = plane3; | |
| 3697 | ||
| 3698 | 3726 | /* decode the graphics */ |
| 3699 | machine->gfx[gfx_index] = allocgfx(&spritelayout); | |
| 3700 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 3727 | switch (plane_order) | |
| 3728 | { | |
| 3729 | case NORMAL_PLANE_ORDER: | |
| 3730 | total = memory_region_length(gfx_memory_region) / 128; | |
| 3731 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &spritelayout, 4); | |
| 3732 | break; | |
| 3701 | 3733 | |
| 3702 | /* set the color information */ | |
| 3703 | if (machine->drv->color_table_len) | |
| 3704 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 3705 | else | |
| 3706 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 3734 | default: | |
| 3735 | fatalerror("Unsupported plane_order"); | |
| 3736 | } | |
| 3707 | 3737 | |
| 3708 | 3738 | if (VERBOSE) |
| 3709 | 3739 | { |
| r1490 | r1491 | |
| 3749 | 3779 | void K055673_vh_start(running_machine *machine, int gfx_memory_region, int layout, int dx, int dy, void (*callback)(int *code,int *color,int *priority)) |
| 3750 | 3780 | { |
| 3751 | 3781 | int gfx_index; |
| 3782 | UINT32 total; | |
| 3752 | 3783 | |
| 3753 | static gfx_layout spritelayout = /* System GX sprite layout */ | |
| 3784 | static const gfx_layout spritelayout = /* System GX sprite layout */ | |
| 3754 | 3785 | { |
| 3755 | 3786 | 16,16, |
| 3756 | | |
| 3787 | 0 | |
| 3757 | 3788 | 5, |
| 3758 | 3789 | { 32, 24, 16, 8, 0 }, |
| 3759 | 3790 | { 0, 1, 2, 3, 4, 5, 6, 7, 40, 41, 42, 43, 44, 45, 46, 47 }, |
| r1490 | r1491 | |
| 3761 | 3792 | 10*8*9, 10*8*10, 10*8*11, 10*8*12, 10*8*13, 10*8*14, 10*8*15 }, |
| 3762 | 3793 | 16*16*5 |
| 3763 | 3794 | }; |
| 3764 | static gfx_layout spritelayout2 = /* Run and Gun sprite layout */ | |
| 3795 | static const gfx_layout spritelayout2 = /* Run and Gun sprite layout */ | |
| 3765 | 3796 | { |
| 3766 | 3797 | 16,16, |
| 3767 | | |
| 3798 | 0 | |
| 3768 | 3799 | 4, |
| 3769 | 3800 | { 24, 16, 8, 0 }, |
| 3770 | 3801 | { 0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 39 }, |
| 3771 | 3802 | { 0, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960 }, |
| 3772 | 3803 | 16*16*4 |
| 3773 | 3804 | }; |
| 3774 | static gfx_layout spritelayout3 = /* Lethal Enforcers II sprite layout */ | |
| 3805 | static const gfx_layout spritelayout3 = /* Lethal Enforcers II sprite layout */ | |
| 3775 | 3806 | { |
| 3776 | 3807 | 16,16, |
| 3777 | | |
| 3808 | 0 | |
| 3778 | 3809 | 8, |
| 3779 | 3810 | { 8*1,8*0,8*3,8*2,8*5,8*4,8*7,8*6 }, |
| 3780 | 3811 | { 0,1,2,3,4,5,6,7,64+0,64+1,64+2,64+3,64+4,64+5,64+6,64+7 }, |
| r1490 | r1491 | |
| 3782 | 3813 | 128*8, 128*9, 128*10, 128*11, 128*12, 128*13, 128*14, 128*15 }, |
| 3783 | 3814 | 128*16 |
| 3784 | 3815 | }; |
| 3785 | static gfx_layout spritelayout4 = /* System GX 6bpp sprite layout */ | |
| 3816 | static const gfx_layout spritelayout4 = /* System GX 6bpp sprite layout */ | |
| 3786 | 3817 | { |
| 3787 | 3818 | 16,16, |
| 3788 | | |
| 3819 | 0 | |
| 3789 | 3820 | 6, |
| 3790 | 3821 | { 40, 32, 24, 16, 8, 0 }, |
| 3791 | 3822 | { 0, 1, 2, 3, 4, 5, 6, 7, 48, 49, 50, 51, 52, 53, 54, 55 }, |
| r1490 | r1491 | |
| 3796 | 3827 | UINT8 *s1, *s2, *d; |
| 3797 | 3828 | long i, c; |
| 3798 | 3829 | UINT16 *K055673_rom; |
| 3830 | int size4; | |
| 3799 | 3831 | |
| 3800 | 3832 | /* find first empty slot to decode gfx */ |
| 3801 | 3833 | for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++) |
| r1490 | r1491 | |
| 3803 | 3835 | break; |
| 3804 | 3836 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 3805 | 3837 | |
| 3806 | switch(layout) { | |
| 3807 | case K055673_LAYOUT_GX: | |
| 3838 | K055673_rom = (UINT16 *)memory_region(gfx_memory_region); | |
| 3839 | ||
| 3840 | /* decode the graphics */ | |
| 3841 | switch(layout) | |
| 3808 | 3842 | { |
| 3809 | int size4 = (memory_region_length(gfx_memory_region)/(1024*1024))/5; | |
| 3843 | case K055673_LAYOUT_GX: | |
| 3844 | size4 = (memory_region_length(gfx_memory_region)/(1024*1024))/5; | |
| 3810 | 3845 | size4 *= 4*1024*1024; |
| 3811 | 3846 | /* set the # of tiles based on the 4bpp section */ |
| 3812 | spritelayout.total = size4 / 128; | |
| 3813 | 3847 | K055673_rom = auto_malloc(size4 * 5); |
| 3814 | 3848 | d = (UINT8 *)K055673_rom; |
| 3815 | 3849 | // now combine the graphics together to form 5bpp |
| r1490 | r1491 | |
| 3823 | 3857 | *d++ = *s1++; |
| 3824 | 3858 | *d++ = *s2++; |
| 3825 | 3859 | } |
| 3826 | /* decode the graphics */ | |
| 3827 | machine->gfx[gfx_index] = allocgfx(&spritelayout); | |
| 3828 | decodegfx(machine->gfx[gfx_index], (UINT8 *)K055673_rom, 0, machine->gfx[gfx_index]->total_elements); | |
| 3860 | ||
| 3861 | total = size4 / 128; | |
| 3862 | decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout, 4); | |
| 3829 | 3863 | break; |
| 3830 | } | |
| 3831 | case K055673_LAYOUT_RNG: | |
| 3832 | K055673_rom = (UINT16 *)memory_region(gfx_memory_region); | |
| 3833 | spritelayout2.total = memory_region_length(gfx_memory_region) / (16*16/2); | |
| 3834 | 3864 | |
| 3835 | /* decode the graphics */ | |
| 3836 | machine->gfx[gfx_index] = allocgfx(&spritelayout2); | |
| 3837 | decodegfx(machine->gfx[gfx_index], (UINT8 *)K055673_rom, 0, machine->gfx[gfx_index]->total_elements); | |
| 3865 | case K055673_LAYOUT_RNG: | |
| 3866 | total = memory_region_length(gfx_memory_region) / (16*16/2); | |
| 3867 | decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout2, 4); | |
| 3838 | 3868 | break; |
| 3839 | case K055673_LAYOUT_LE2: | |
| 3840 | K055673_rom = (UINT16 *)memory_region(gfx_memory_region); | |
| 3841 | spritelayout3.total = memory_region_length(gfx_memory_region) / (16*16); | |
| 3842 | 3869 | |
| 3843 | /* decode the graphics */ | |
| 3844 | machine->gfx[gfx_index] = allocgfx(&spritelayout3); | |
| 3845 | decodegfx(machine->gfx[gfx_index], (UINT8 *)K055673_rom, 0, machine->gfx[gfx_index]->total_elements); | |
| 3870 | case K055673_LAYOUT_LE2: | |
| 3871 | total = memory_region_length(gfx_memory_region) / (16*16); | |
| 3872 | decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout3, 4); | |
| 3846 | 3873 | break; |
| 3847 | case K055673_LAYOUT_GX6: | |
| 3848 | K055673_rom = (UINT16 *)memory_region(gfx_memory_region); | |
| 3849 | spritelayout4.total = memory_region_length(gfx_memory_region) / (16*16*6/8); | |
| 3850 | 3874 | |
| 3851 | /* decode the graphics */ | |
| 3852 | machine->gfx[gfx_index] = allocgfx(&spritelayout4); | |
| 3853 | decodegfx(machine->gfx[gfx_index], (UINT8 *)K055673_rom, 0, machine->gfx[gfx_index]->total_elements); | |
| 3875 | case K055673_LAYOUT_GX6: | |
| 3876 | total = memory_region_length(gfx_memory_region) / (16*16*6/8); | |
| 3877 | decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout4, 4); | |
| 3854 | 3878 | break; |
| 3879 | ||
| 3880 | default: | |
| 3881 | fatalerror("Unsupported layout"); | |
| 3855 | 3882 | } |
| 3856 | 3883 | |
| 3857 | assert(machine->gfx[gfx_index]); | |
| 3858 | ||
| 3859 | /* set the color information */ | |
| 3860 | if (machine->drv->color_table_len) | |
| 3861 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 3862 | else | |
| 3863 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 3864 | ||
| 3865 | 3884 | if (VERBOSE && !(machine->drv->video_attributes & VIDEO_HAS_SHADOWS)) |
| 3866 | 3885 | popmessage("driver should use VIDEO_HAS_SHADOWS"); |
| 3867 | 3886 | |
| r1490 | r1491 | |
| 4541 | 4560 | void (*callback)(int *code,int *color,int *flags)) |
| 4542 | 4561 | { |
| 4543 | 4562 | int gfx_index; |
| 4563 | UINT32 total; | |
| 4564 | static const gfx_layout charlayout4 = | |
| 4565 | { | |
| 4566 | 16,16, | |
| 4567 | 0, | |
| 4568 | 4, | |
| 4569 | { 0, 1, 2, 3 }, | |
| 4570 | { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, | |
| 4571 | 8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4 }, | |
| 4572 | { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, | |
| 4573 | 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 }, | |
| 4574 | 128*8 | |
| 4575 | }; | |
| 4576 | static const gfx_layout charlayout7 = | |
| 4577 | { | |
| 4578 | 16,16, | |
| 4579 | 0, | |
| 4580 | 7, | |
| 4581 | { 1,2,3,4,5,6,7 }, | |
| 4582 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, | |
| 4583 | 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, | |
| 4584 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, | |
| 4585 | 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 }, | |
| 4586 | 256*8 | |
| 4587 | }; | |
| 4588 | static const gfx_layout charlayout8 = | |
| 4589 | { | |
| 4590 | 16,16, | |
| 4591 | 0, | |
| 4592 | 8, | |
| 4593 | { 0,1,2,3,4,5,6,7 }, | |
| 4594 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, | |
| 4595 | 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, | |
| 4596 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, | |
| 4597 | 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 }, | |
| 4598 | 256*8 | |
| 4599 | }; | |
| 4544 | 4600 | static const tile_get_info_callback get_tile_info[3] = { K051316_get_tile_info0,K051316_get_tile_info1,K051316_get_tile_info2 }; |
| 4545 | 4601 | |
| 4546 | 4602 | /* find first empty slot to decode gfx */ |
| r1490 | r1491 | |
| 4549 | 4605 | break; |
| 4550 | 4606 | assert(gfx_index != MAX_GFX_ELEMENTS); |
| 4551 | 4607 | |
| 4552 | assert((bpp == 4) || (bpp == 7) || (bpp == 8)); | |
| 4553 | ||
| 4554 | if (bpp == 4) | |
| 4608 | /* decode the graphics */ | |
| 4609 | switch (bpp) | |
| 4555 | 4610 | { |
| 4556 | static gfx_layout charlayout = | |
| 4557 | { | |
| 4558 | 16,16, | |
| 4559 | 0, /* filled in later */ | |
| 4560 | 4, | |
| 4561 | { 0, 1, 2, 3 }, | |
| 4562 | { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, | |
| 4563 | 8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4 }, | |
| 4564 | { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, | |
| 4565 | 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 }, | |
| 4566 | 128*8 | |
| 4567 | }; | |
| 4611 | case 4: | |
| 4612 | total = memory_region_length(gfx_memory_region) / 128; | |
| 4613 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout4, 4); | |
| 4614 | break; | |
| 4568 | 4615 | |
| 4616 | case 7: | |
| 4617 | total = memory_region_length(gfx_memory_region) / 256; | |
| 4618 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout7, 7); | |
| 4619 | break; | |
| 4569 | 4620 | |
| 4570 | /* tweak the structure for the number of tiles we have */ | |
| 4571 | charlayout.total = memory_region_length(gfx_memory_region) / 128; | |
| 4621 | case 8: | |
| 4622 | total = memory_region_length(gfx_memory_region) / 256; | |
| 4623 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout8, 8); | |
| 4624 | break; | |
| 4572 | 4625 | |
| 4573 | /* decode the graphics */ | |
| 4574 | machine->gfx[gfx_index] = allocgfx(&charlayout); | |
| 4575 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 4626 | default: | |
| 4627 | fatalerror("Unsupported bpp"); | |
| 4576 | 4628 | } |
| 4577 | else | |
| 4578 | { | |
| 4579 | static gfx_layout charlayout = | |
| 4580 | { | |
| 4581 | 16,16, | |
| 4582 | 0, /* filled in later */ | |
| 4583 | 0, /* filled in later */ | |
| 4584 | { 0 }, /* filled in later */ | |
| 4585 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, | |
| 4586 | 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, | |
| 4587 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, | |
| 4588 | 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 }, | |
| 4589 | 256*8 | |
| 4590 | }; | |
| 4591 | int i; | |
| 4592 | 4629 | |
| 4593 | ||
| 4594 | /* tweak the structure for the number of tiles we have */ | |
| 4595 | charlayout.total = memory_region_length(gfx_memory_region) / 256; | |
| 4596 | charlayout.planes = bpp; | |
| 4597 | if (bpp == 7) for (i = 0;i < 7;i++) charlayout.planeoffset[i] = i+1; | |
| 4598 | else for (i = 0;i < 8;i++) charlayout.planeoffset[i] = i; | |
| 4599 | ||
| 4600 | /* decode the graphics */ | |
| 4601 | machine->gfx[gfx_index] = allocgfx(&charlayout); | |
| 4602 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 4603 | } | |
| 4604 | ||
| 4605 | assert(machine->gfx[gfx_index]); | |
| 4606 | ||
| 4607 | /* set the color information */ | |
| 4608 | if (machine->drv->color_table_len) | |
| 4609 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / (1 << bpp); | |
| 4610 | else | |
| 4611 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / (1 << bpp); | |
| 4612 | ||
| 4613 | 4630 | K051316_memory_region[chip] = gfx_memory_region; |
| 4614 | 4631 | K051316_gfxnum[chip] = gfx_index; |
| 4615 | 4632 | K051316_bpp[chip] = bpp; |
| r1490 | r1491 | |
| 5538 | 5555 | tilemap *tmap; |
| 5539 | 5556 | int gfx_index; |
| 5540 | 5557 | int i; |
| 5541 | gfx_layout charlayout8 = | |
| 5558 | UINT32 total; | |
| 5559 | static const gfx_layout charlayout8 = | |
| 5542 | 5560 | { |
| 5543 | 5561 | 8, 8, |
| 5544 | 0, | |
| 5562 | 0, | |
| 5545 | 5563 | 8, |
| 5546 | 5564 | { 8*7,8*3,8*5,8*1,8*6,8*2,8*4,8*0 }, |
| 5547 | 5565 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 5548 | 5566 | { 0, 8*8, 8*8*2, 8*8*3, 8*8*4, 8*8*5, 8*8*6, 8*8*7 }, |
| 5549 | 5567 | 8*8*8 |
| 5550 | 5568 | }; |
| 5551 | gfx_layout charlayout8le = | |
| 5569 | static const gfx_layout charlayout8le = | |
| 5552 | 5570 | { |
| 5553 | 5571 | 8, 8, |
| 5554 | 5572 | 0, |
| r1490 | r1491 | |
| 5559 | 5577 | { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 }, |
| 5560 | 5578 | 8*8*4 |
| 5561 | 5579 | }; |
| 5562 | gfx_layout charlayout6 = | |
| 5580 | static const gfx_layout charlayout6 = | |
| 5563 | 5581 | { |
| 5564 | 5582 | 8, 8, |
| 5565 | 0, | |
| 5583 | 0, | |
| 5566 | 5584 | 6, |
| 5567 | 5585 | { 40, 32, 24, 8, 16, 0 }, |
| 5568 | 5586 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 5569 | 5587 | { 0, 6*8, 6*8*2, 6*8*3, 6*8*4, 6*8*5, 6*8*6, 6*8*7 }, |
| 5570 | 5588 | 8*8*6 |
| 5571 | 5589 | }; |
| 5572 | gfx_layout charlayout5 = | |
| 5590 | static const gfx_layout charlayout5 = | |
| 5573 | 5591 | { |
| 5574 | 5592 | 8, 8, |
| 5575 | 0, | |
| 5593 | 0, | |
| 5576 | 5594 | 5, |
| 5577 | 5595 | { 32, 24, 8, 16, 0 }, |
| 5578 | 5596 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 5579 | 5597 | { 0, 5*8, 5*8*2, 5*8*3, 5*8*4, 5*8*5, 5*8*6, 5*8*7 }, |
| 5580 | 5598 | 8*8*5 |
| 5581 | 5599 | }; |
| 5582 | gfx_layout charlayout4 = | |
| 5600 | static const gfx_layout charlayout4 = | |
| 5583 | 5601 | { |
| 5584 | 5602 | 8, 8, |
| 5585 | 5603 | 0, |
| r1490 | r1491 | |
| 5589 | 5607 | { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 }, |
| 5590 | 5608 | 8*8*4 |
| 5591 | 5609 | }; |
| 5592 | static gfx_layout charlayout4dj = | |
| 5610 | static const gfx_layout charlayout4dj = | |
| 5593 | 5611 | { |
| 5594 | 5612 | 8, 8, |
| 5595 | 0, | |
| 5613 | 0, | |
| 5596 | 5614 | 4, |
| 5597 | 5615 | { 8*3,8*1,8*2,8*0 }, |
| 5598 | 5616 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| r1490 | r1491 | |
| 5612 | 5630 | /* handle the various graphics formats */ |
| 5613 | 5631 | i = (big) ? 8 : 16; |
| 5614 | 5632 | |
| 5633 | /* decode the graphics */ | |
| 5615 | 5634 | switch (bpp) |
| 5616 | 5635 | { |
| 5617 | 5636 | case K056832_BPP_4: |
| 5618 | charlayout4.total = memory_region_length(gfx_memory_region) / (i*4); | |
| 5619 | ||
| 5620 | /* decode the graphics */ | |
| 5621 | machine->gfx[gfx_index] = allocgfx(&charlayout4); | |
| 5622 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5637 | total = memory_region_length(gfx_memory_region) / (i*4); | |
| 5638 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout4, 4); | |
| 5623 | 5639 | break; |
| 5624 | 5640 | |
| 5625 | 5641 | case K056832_BPP_5: |
| 5626 | /* tweak the structure for the number of tiles we have */ | |
| 5627 | charlayout5.total = memory_region_length(gfx_memory_region) / (i*5); | |
| 5628 | ||
| 5629 | /* decode the graphics */ | |
| 5630 | machine->gfx[gfx_index] = allocgfx(&charlayout5); | |
| 5631 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5642 | total = memory_region_length(gfx_memory_region) / (i*5); | |
| 5643 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout5, 4); | |
| 5632 | 5644 | break; |
| 5633 | 5645 | |
| 5634 | 5646 | case K056832_BPP_6: |
| 5635 | /* tweak the structure for the number of tiles we have */ | |
| 5636 | charlayout6.total = memory_region_length(gfx_memory_region) / (i*6); | |
| 5637 | ||
| 5638 | /* decode the graphics */ | |
| 5639 | machine->gfx[gfx_index] = allocgfx(&charlayout6); | |
| 5640 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5647 | total = memory_region_length(gfx_memory_region) / (i*6); | |
| 5648 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout6, 4); | |
| 5641 | 5649 | break; |
| 5642 | 5650 | |
| 5643 | 5651 | case K056832_BPP_8: |
| 5644 | /* tweak the structure for the number of tiles we have */ | |
| 5645 | charlayout8.total = memory_region_length(gfx_memory_region) / (i*8); | |
| 5646 | ||
| 5647 | /* decode the graphics */ | |
| 5648 | machine->gfx[gfx_index] = allocgfx(&charlayout8); | |
| 5649 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5652 | total = memory_region_length(gfx_memory_region) / (i*8); | |
| 5653 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout8, 4); | |
| 5650 | 5654 | break; |
| 5651 | 5655 | |
| 5652 | 5656 | case K056832_BPP_8LE: |
| 5653 | /* tweak the structure for the number of tiles we have */ | |
| 5654 | charlayout8le.total = memory_region_length(gfx_memory_region) / (i*8); | |
| 5655 | ||
| 5656 | /* decode the graphics */ | |
| 5657 | machine->gfx[gfx_index] = allocgfx(&charlayout8le); | |
| 5658 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5657 | total = memory_region_length(gfx_memory_region) / (i*8); | |
| 5658 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout8le, 4); | |
| 5659 | 5659 | break; |
| 5660 | 5660 | |
| 5661 | 5661 | case K056832_BPP_4dj: |
| 5662 | charlayout4dj.total = memory_region_length(gfx_memory_region) / (i*4); | |
| 5663 | ||
| 5664 | /* decode the graphics */ | |
| 5665 | machine->gfx[gfx_index] = allocgfx(&charlayout4dj); | |
| 5666 | decodegfx(machine->gfx[gfx_index], memory_region(gfx_memory_region), 0, machine->gfx[gfx_index]->total_elements); | |
| 5662 | total = memory_region_length(gfx_memory_region) / (i*4); | |
| 5663 | decode_gfx(machine, gfx_index, memory_region(gfx_memory_region), total, &charlayout4dj, 4); | |
| 5667 | 5664 | break; |
| 5665 | ||
| 5666 | default: | |
| 5667 | fatalerror("Unsupported bpp"); | |
| 5668 | 5668 | } |
| 5669 | 5669 | |
| 5670 | /* make sure the decode went OK */ | |
| 5671 | assert(machine->gfx[gfx_index]); | |
| 5672 | ||
| 5673 | /* set the color information */ | |
| 5674 | if (machine->drv->color_table_len) | |
| 5675 | machine->gfx[gfx_index]->total_colors = machine->drv->color_table_len / 16; | |
| 5676 | else | |
| 5677 | machine->gfx[gfx_index]->total_colors = machine->drv->total_colors / 16; | |
| 5678 | 5670 | machine->gfx[gfx_index]->color_granularity = 16; /* override */ |
| 5679 | 5671 | |
| 5680 | 5672 | K056832_memory_region = gfx_memory_region; |
| r1490 | r1491 | |
|---|---|---|
| 44 | 44 | you in most cases (but see tmnt.c for additional bit rotations or byte |
| 45 | 45 | permutations which may be required). |
| 46 | 46 | */ |
| 47 | #define NORMAL_PLANE_ORDER 0,1,2,3 | |
| 48 | #define REVERSE_PLANE_ORDER 3,2,1,0 | |
| 47 | #define NORMAL_PLANE_ORDER 0x0123 | |
| 48 | #define REVERSE_PLANE_ORDER 0x3210 | |
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | /* |
| r1490 | r1491 | |
| 64 | 64 | */ |
| 65 | 65 | extern tilemap *K052109_tilemap[3]; |
| 66 | 66 | |
| 67 | void K052109_vh_start(running_machine *machine,int gfx_memory_region,int plane | |
| 67 | void K052109_vh_start(running_machine *machine,int gfx_memory_region,int plane_ord | |
| 68 | 68 | void (*callback)(int layer,int bank,int *code,int *color,int *flags,int *priority)); |
| 69 | 69 | /* plain 8-bit access */ |
| 70 | 70 | READ8_HANDLER( K052109_r ); |
| r1490 | r1491 | |
| 92 | 92 | shadow is preloaded with color & 0x80 so it doesn't need to be changed unless |
| 93 | 93 | the game has special treatment (Aliens) |
| 94 | 94 | */ |
| 95 | void K051960_vh_start(running_machine *machine,int gfx_memory_region,int plane | |
| 95 | void K051960_vh_start(running_machine *machine,int gfx_memory_region,int plane_ord | |
| 96 | 96 | void (*callback)(int *code,int *color,int *priority,int *shadow)); |
| 97 | 97 | READ8_HANDLER( K051960_r ); |
| 98 | 98 | WRITE8_HANDLER( K051960_w ); |
| r1490 | r1491 | |
| 112 | 112 | WRITE8_HANDLER( K052109_051960_w ); |
| 113 | 113 | |
| 114 | 114 | |
| 115 | void K053245_vh_start(running_machine *machine,int chip, int gfx_memory_region,int plane | |
| 115 | void K053245_vh_start(running_machine *machine,int chip, int gfx_memory_region,int plane_ord | |
| 116 | 116 | void (*callback)(int *code,int *color,int *priority_mask)); |
| 117 | 117 | READ16_HANDLER( K053245_word_r ); |
| 118 | 118 | WRITE16_HANDLER( K053245_word_w ); |
| r1490 | r1491 | |
| 152 | 152 | #define K053247_CUSTOMSHADOW 0x20000000 |
| 153 | 153 | #define K053247_SHDSHIFT 20 |
| 154 | 154 | |
| 155 | void K053247_vh_start(running_machine *machine, int gfx_memory_region,int dx,int dy,int plane | |
| 155 | void K053247_vh_start(running_machine *machine, int gfx_memory_region,int dx,int dy,int plane_ord | |
| 156 | 156 | void (*callback)(int *code,int *color,int *priority_mask)); |
| 157 | 157 | READ8_HANDLER( K053247_r ); |
| 158 | 158 | WRITE8_HANDLER( K053247_w ); |
| r1490 | r1491 | |
|---|---|---|
| 68 | 68 | |
| 69 | 69 | VIDEO_START( atarig1 ) |
| 70 | 70 | { |
| 71 | static const | |
| 71 | static const | |
| 72 | 72 | { |
| 73 | 73 | REGION_GFX3,/* region where the GFX data lives */ |
| 74 | 74 | 256, /* number of entries in sprite RAM */ |
| r1490 | r1491 | |
| 89 | 89 | {{ 0 }} /* mask for the VRAM target */ |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | static const | |
| 92 | static const | |
| 93 | 93 | { |
| 94 | 94 | REGION_GFX3,/* region where the GFX data lives */ |
| 95 | 95 | 256, /* number of entries in sprite RAM */ |
| r1490 | r1491 | |
| 129 | 129 | playfield_tile_bank = 0; |
| 130 | 130 | playfield_xscroll = 0; |
| 131 | 131 | playfield_yscroll = 0; |
| 132 | ||
| 133 | /* state saving */ | |
| 134 | state_save_register_global(current_control); | |
| 135 | state_save_register_global(playfield_tile_bank); | |
| 136 | state_save_register_global(playfield_xscroll); | |
| 137 | state_save_register_global(playfield_yscroll); | |
| 132 | 138 | } |
| 133 | 139 | |
| 134 | 140 | |
| r1490 | r1491 | |
| 158 | 164 | /* keep in range */ |
| 159 | 165 | if (base >= &atarigen_alpha[0x800]) |
| 160 | 166 | return; |
| 167 | video_screen_update_partial(0, scanline - 1); | |
| 161 | 168 | |
| 162 | 169 | /* update the playfield scrolls */ |
| 163 | 170 | for (i = 0; i < 8; i++) |
| r1490 | r1491 | |
|---|---|---|
| 111 | 111 | tilemap_set_scrolly(bg_tilemap, 0, data + 17); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | WRITE8_HANDLER( mario_flip_w ) | |
| 115 | { | |
| 116 | ||
| 117 | flip_screen_set(data & 0x01); | |
| 118 | tilemap_set_scrollx(bg_tilemap, 0, flip_screen ? (HTOTAL-HBSTART) : 0); | |
| 119 | } | |
| 120 | ||
| 114 | 121 | static TILE_GET_INFO( get_bg_tile_info ) |
| 115 | 122 | { |
| 116 | 123 | int code = videoram[tile_index] + 256 * gfx_bank; |
| r1490 | r1491 | |
| 130 | 137 | state_save_register_global(palette_bank); |
| 131 | 138 | } |
| 132 | 139 | |
| 140 | /* | |
| 141 | * Erratic line at top when scrolling down "Marios Bros" Title | |
| 142 | * confirmed on mametests.org as being present on real PCB as well. | |
| 143 | */ | |
| 144 | ||
| 133 | 145 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 134 | 146 | { |
| 135 | 147 | int offs; |
| r1490 | r1491 | |
| 138 | 150 | { |
| 139 | 151 | if (spriteram[offs]) |
| 140 | 152 | { |
| 141 | drawgfx(bitmap,machine->gfx[1], | |
| 142 | spriteram[offs + 2], | |
| 143 | (spriteram[offs + 1] & 0x0f) + 16 * palette_bank+32 * monitor, | |
| 144 | spriteram[offs + 1] & 0x80,spriteram[offs + 1] & 0x40, | |
| 145 | spriteram[offs + 3] - 8,(VBSTART - 1) - spriteram[offs] + 8, | |
| 146 | cliprect,TRANSPARENCY_PEN,0); | |
| 153 | int x, y; | |
| 154 | ||
| 155 | // from schematics .... | |
| 156 | y = (spriteram[offs] + (flip_screen ? 0xF7 : 0xF9) + 1) & 0xFF; | |
| 157 | x = spriteram[offs+3]; | |
| 158 | // sprite will be drawn if (y + scanline) & 0xF0 = 0xF0 | |
| 159 | y = 240 - y; /* logical screen position */ | |
| 160 | ||
| 161 | y = y ^ (flip_screen ? 0xFF : 0x00); /* physical screen location */ | |
| 162 | x = x ^ (flip_screen ? 0xFF : 0x00); /* physical screen location */ | |
| 163 | ||
| 164 | if (flip_screen) | |
| 165 | { | |
| 166 | y -= 6; | |
| 167 | x -= 7; | |
| 168 | drawgfx(bitmap,machine->gfx[1], | |
| 169 | spriteram[offs + 2], | |
| 170 | (spriteram[offs + 1] & 0x0f) + 16 * palette_bank+32 * monitor, | |
| 171 | !(spriteram[offs + 1] & 0x80),!(spriteram[offs + 1] & 0x40), | |
| 172 | x, y, | |
| 173 | cliprect,TRANSPARENCY_PEN,0); | |
| 174 | } | |
| 175 | else | |
| 176 | { | |
| 177 | y += 1; | |
| 178 | x -= 8; | |
| 179 | drawgfx(bitmap,machine->gfx[1], | |
| 180 | spriteram[offs + 2], | |
| 181 | (spriteram[offs + 1] & 0x0f) + 16 * palette_bank+32 * monitor, | |
| 182 | (spriteram[offs + 1] & 0x80),(spriteram[offs + 1] & 0x40), | |
| 183 | x, y, | |
| 184 | cliprect,TRANSPARENCY_PEN,0); | |
| 185 | } | |
| 147 | 186 | } |
| 148 | 187 | } |
| 149 | 188 | } |
| r1490 | r1491 | |
|---|---|---|
| 20 | 20 | static const rectangle left_area = { 0*8, 3*8-1, 0*8, 32*8-1 }; |
| 21 | 21 | static const rectangle right_area = { 34*8, 38*8-1, 0*8, 32*8-1 }; |
| 22 | 22 | |
| 23 | /*************************************************************************** | |
| 24 | ***************************************************************************/ | |
| 25 | WRITE8_HANDLER( atarifb_alphap1_vram_w ) | |
| 26 | { | |
| 27 | atarifb_alphap1_vram[offset] = data; | |
| 28 | } | |
| 29 | 23 | |
| 30 | WRITE8_HANDLER( atarifb_alphap2_vram_w ) | |
| 31 | { | |
| 32 | atarifb_alphap2_vram[offset] = data; | |
| 33 | } | |
| 34 | ||
| 35 | /*************************************************************************** | |
| 36 | ***************************************************************************/ | |
| 37 | WRITE8_HANDLER( atarifb_scroll_w ) | |
| 38 | { | |
| 39 | *atarifb_scroll_register = data - 8; | |
| 40 | } | |
| 41 | ||
| 42 | ||
| 43 | 24 | VIDEO_UPDATE( atarifb ) |
| 44 | 25 | { |
| 45 | 26 | int offs,obj; |
| r1490 | r1491 | |
| 103 | 84 | int flipx,flipy; |
| 104 | 85 | int sx,sy; |
| 105 | 86 | |
| 106 | dirtybuffer[offs]=0; | |
| 107 | ||
| 108 | 87 | charcode = videoram[offs] & 0x3f; |
| 109 | 88 | flipx = (videoram[offs] & 0x40) >> 6; |
| 110 | 89 | flipy = (videoram[offs] & 0x80) >> 7; |
| 111 | 90 | |
| 112 | sx = | |
| 91 | sx = | |
| 113 | 92 | sy = 8 * (offs / 32) + 8; |
| 114 | 93 | |
| 115 | 94 | /* Soccer hack */ |
| r1490 | r1491 | |
|---|---|---|
| 799 | 799 | set_auto_animation_speed(data >> 8); |
| 800 | 800 | set_auto_animation_disabled(data & 0x0008); |
| 801 | 801 | |
| 802 | neogeo_set_display_po | |
| 802 | neogeo_set_display_po | |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | 805 |
| r1490 | r1491 | |
|---|---|---|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | /* the charlayout we use for the chargen */ |
| 240 | static gfx_layout ppu_charlayout = | |
| 240 | static const gfx_layout ppu_charlayout = | |
| 241 | 241 | { |
| 242 | 242 | 8,8, /* 8*8 characters */ |
| 243 | | |
| 243 | 0 | |
| 244 | 244 | 2, /* 2 bits per pixel */ |
| 245 | 245 | { 8*8, 0 }, /* the two bitplanes are separated */ |
| 246 | 246 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| r1490 | r1491 | |
| 256 | 256 | void ppu2c0x_init(running_machine *machine, const ppu2c0x_interface *interface ) |
| 257 | 257 | { |
| 258 | 258 | int i; |
| 259 | UINT32 total; | |
| 259 | 260 | |
| 260 | 261 | /* keep a local copy of the interface */ |
| 261 | 262 | intf = auto_malloc(sizeof(*interface)); |
| r1490 | r1491 | |
| 326 | 327 | chips[i].videorom_banks = memory_region_length( intf->vrom_region[i] ) / 0x2000; |
| 327 | 328 | |
| 328 | 329 | /* tweak the layout accordingly */ |
| 329 | | |
| 330 | | |
| 330 | 331 | } |
| 331 | 332 | else |
| 332 | 333 | { |
| 333 | 334 | chips[i].has_videorom = chips[i].videorom_banks = 0; |
| 334 | 335 | |
| 335 | 336 | /* we need to reset this in case of mame running multisession */ |
| 336 | | |
| 337 | | |
| 337 | 338 | } |
| 338 | 339 | |
| 339 | 340 | /* now create the gfx region */ |
| 340 | 341 | { |
| 342 | gfx_layout gl; | |
| 341 | 343 | UINT8 *src = chips[i].has_videorom ? memory_region( intf->vrom_region[i] ) : chips[i].videoram; |
| 342 | machine->gfx[intf->gfx_layout_number[i]] = allocgfx( &ppu_charlayout ); | |
| 344 | ||
| 345 | memcpy(&gl, &ppu_charlayout, sizeof(gl)); | |
| 346 | gl.total = total; | |
| 347 | machine->gfx[intf->gfx_layout_number[i]] = allocgfx( &gl ); | |
| 343 | 348 | decodegfx( machine->gfx[intf->gfx_layout_number[i]], src, 0, machine->gfx[intf->gfx_layout_number[i]]->total_elements ); |
| 344 | 349 | machine->gfx[intf->gfx_layout_number[i]]->total_colors = 8; |
| 345 | 350 | } |
| r1490 | r1491 | |
|---|---|---|
| 230 | 230 | static UINT8 *texture_cache; |
| 231 | 231 | static UINT32 tlut[256]; |
| 232 | 232 | |
| 233 | #define MASK(S, T) \ | |
| 234 | do \ | |
| 235 | { \ | |
| 236 | if (mask_s != 0) \ | |
| 237 | { \ | |
| 238 | S &= (((UINT32)(0xffffffff) >> (32-mask_s))); \ | |
| 239 | } \ | |
| 240 | if (mask_t != 0) \ | |
| 241 | { \ | |
| 242 | T &= (((UINT32)(0xffffffff) >> (32-mask_t))); \ | |
| 243 | } \ | |
| 244 | } \ | |
| 245 | while (0) | |
| 246 | ||
| 233 | 247 | #define CLAMP(S, T) \ |
| 234 | 248 | do \ |
| 235 | 249 | { \ |
| r1490 | r1491 | |
| 243 | 257 | if (S < (tsl >> 2)) S = abs(S - (tsl >> 2)); \ |
| 244 | 258 | if (S > (tsh >> 2)) S = abs(S - (tsh >> 2)); \ |
| 245 | 259 | } \ |
| 246 | if (mask_s != 0) \ | |
| 247 | { \ | |
| 248 | S &= (((UINT32)(0xffffffff) >> (32-mask_s))); \ | |
| 249 | } \ | |
| 250 | 260 | if (clamp_t) \ |
| 251 | 261 | { \ |
| 252 | 262 | if (T < (ttl >> 2)) T = (ttl >> 2); \ |
| r1490 | r1491 | |
| 257 | 267 | if (T < (ttl >> 2)) T = abs(T - (ttl >> 2)); \ |
| 258 | 268 | if (T > (tth >> 2)) T = abs(T - (tth >> 2)); \ |
| 259 | 269 | } \ |
| 260 | if (mask_t != 0) \ | |
| 261 | { \ | |
| 262 | T &= (((UINT32)(0xffffffff) >> (32-mask_t))); \ | |
| 263 | } \ | |
| 264 | 270 | } \ |
| 265 | 271 | while (0) |
| 266 | 272 | |
| r1490 | r1491 | |
| 832 | 838 | case PIXEL_SIZE_32BIT: |
| 833 | 839 | { |
| 834 | 840 | UINT32 *tc = (UINT32*)texture_cache; |
| 835 | ||
| 841 | int taddr = ((tbase/4) + ((t) * (twidth/2)) + (s)) ^ ((t & 1) ? XOR_SWAP_DWORD : 0); | |
| 836 | 842 | UINT32 c = tc[taddr]; |
| 837 | 843 | |
| 838 | 844 | color->r = ((c >> 24) & 0xff); |
| r1490 | r1491 | |
| 1011 | 1017 | \ |
| 1012 | 1018 | /* bilinear */ \ |
| 1013 | 1019 | \ |
| 1014 | sss1 = (SSS >> 10) - (tsl >> 2); \ | |
| 1015 | sss2 = sss1 + 1; \ | |
| 1016 | \ | |
| 1017 | sst1 = (SST >> 10) - (ttl >> 2); \ | |
| 1018 | sst2 = sst1 + 1; \ | |
| 1019 | \ | |
| 1020 | sss1 = SSS >> 10; \ | |
| 1021 | sss2 = sss1 + 1; \ | |
| 1022 | \ | |
| 1023 | sst1 = SST >> 10; \ | |
| 1024 | sst2 = sst1 + 1; \ | |
| 1025 | \ | |
| 1020 | 1026 | CLAMP(sss1, sst1); \ |
| 1021 | 1027 | CLAMP(sss2, sst2); \ |
| 1022 | 1028 | \ |
| 1029 | sss1 -= tsl >> 2; \ | |
| 1030 | sss2 -= tsl >> 2; \ | |
| 1031 | \ | |
| 1032 | sst1 -= ttl >> 2; \ | |
| 1033 | sst2 -= ttl >> 2; \ | |
| 1034 | \ | |
| 1035 | MASK(sss1, sst1); \ | |
| 1036 | MASK(sss2, sst2); \ | |
| 1037 | \ | |
| 1023 | 1038 | FETCH_TEXEL(&t0, sss1, sst1, twidth, tformat, tsize, tbase); \ |
| 1024 | 1039 | FETCH_TEXEL(&t1, sss2, sst1, twidth, tformat, tsize, tbase); \ |
| 1025 | 1040 | FETCH_TEXEL(&t2, sss1, sst2, twidth, tformat, tsize, tbase); \ |
| r1490 | r1491 | |
| 1040 | 1055 | else \ |
| 1041 | 1056 | { \ |
| 1042 | 1057 | int sss1, sst1; \ |
| 1043 | sss1 = (SSS >> 10) - (tsl >> 2); \ | |
| 1044 | if ((SSS & 0x3ff) >= 0x200) sss1++; \ | |
| 1045 | \ | |
| 1046 | sst1 = (SST >> 10) - (ttl >> 2); \ | |
| 1047 | if ((SST & 0x3ff) >= 0x200) sst1++; \ | |
| 1048 | \ | |
| 1058 | sss1 = SSS >> 10; \ | |
| 1059 | if ((SSS & 0x3ff) >= 0x200) sss1++; \ | |
| 1060 | \ | |
| 1061 | sst1 = SST >> 10; \ | |
| 1062 | if ((SST & 0x3ff) >= 0x200) sst1++; \ | |
| 1063 | \ | |
| 1049 | 1064 | CLAMP(sss1, sst1); \ |
| 1050 | 1065 | \ |
| 1066 | sss1 -= tsl >> 2; \ | |
| 1067 | sst1 -= ttl >> 2; \ | |
| 1068 | \ | |
| 1069 | MASK(sss1, sst1); \ | |
| 1070 | \ | |
| 1051 | 1071 | /* point sample */ \ |
| 1052 | 1072 | FETCH_TEXEL(&TEX, sss1, sst1, twidth, tformat, tsize, tbase); \ |
| 1053 | 1073 | } \ |
| r1490 | r1491 | |
| 1185 | 1205 | tsize = tile[rect->tilenum].size; |
| 1186 | 1206 | tbase = tile[rect->tilenum].tmem; |
| 1187 | 1207 | |
| 1188 | // FIXME?: clamping breaks at least Rampage World Tour | |
| 1189 | clamp_t = 0; //tile[rect->tilenum].ct; | |
| 1190 | clamp_s = 0; //tile[rect->tilenum].cs; | |
| 1208 | clamp_t = tile[rect->tilenum].ct; | |
| 1209 | clamp_s = tile[rect->tilenum].cs; | |
| 1191 | 1210 | |
| 1192 | 1211 | mirror_t = tile[rect->tilenum].mt; |
| 1193 | 1212 | mirror_s = tile[rect->tilenum].ms; |
| r1490 | r1491 | |
| 1566 | 1585 | tsize = tile[rect->tilenum].size; |
| 1567 | 1586 | tbase = tile[rect->tilenum].tmem; |
| 1568 | 1587 | |
| 1569 | // FIXME?: clamping breaks at least Rampage World Tour | |
| 1570 | clamp_t = 0; //tile[rect->tilenum].ct; | |
| 1571 | clamp_s = 0; //tile[rect->tilenum].cs; | |
| 1588 | clamp_t = tile[rect->tilenum].ct; | |
| 1589 | clamp_s = tile[rect->tilenum].cs; | |
| 1572 | 1590 | |
| 1573 | 1591 | mirror_t = tile[rect->tilenum].mt; |
| 1574 | 1592 | mirror_s = tile[rect->tilenum].ms; |
| r1490 | r1491 | |
| 1814 | 1832 | |
| 1815 | 1833 | if (x >= clipx1 && x < clipx2) |
| 1816 | 1834 | { |
| 1835 | int alpha_out = 0; | |
| 1817 | 1836 | COLOR c1, c2; |
| 1818 | 1837 | c1.r = c1.g = c1.b = c1.a = 0; |
| 1819 | 1838 | c2.r = c2.g = c2.b = c2.a = 0; |
| r1490 | r1491 | |
| 1898 | 1917 | if (other_modes.cycle_type == CYCLE_TYPE_1) |
| 1899 | 1918 | { |
| 1900 | 1919 | c1 = COLOR_COMBINER(0); |
| 1920 | if( c1.a == 0 ) | |
| 1921 | { | |
| 1922 | alpha_out = 1; | |
| 1923 | } | |
| 1901 | 1924 | } |
| 1902 | 1925 | else if (other_modes.cycle_type == CYCLE_TYPE_2) |
| 1903 | 1926 | { |
| 1904 | 1927 | c1 = COLOR_COMBINER(0); |
| 1905 | 1928 | c2 = COLOR_COMBINER(1); |
| 1929 | if( c2.a == 0 ) | |
| 1930 | { | |
| 1931 | alpha_out = 1; | |
| 1932 | } | |
| 1906 | 1933 | } |
| 1907 | 1934 | |
| 1908 | oz = (UINT16)zb[(fb_index + x) ^ WORD_ADDR_XOR]; | |
| 1909 | if (zbuffer) | |
| 1910 | { | |
| 1911 | if (sz < oz /*&& c.a != 0*/) | |
| 1912 | { | |
| 1913 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 1914 | { | |
| 1915 | BLENDER1_32(&fb[(fb_index + x)], c1); | |
| 1916 | } | |
| 1917 | else | |
| 1918 | { | |
| 1919 | BLENDER2_32(&fb[(fb_index + x)], c1, c2); | |
| 1920 | } | |
| 1935 | /* SGINUT 1/6/08: This fixes things in some games and breaks things in others. | |
| 1936 | I believe the pixels should be discarded based on the alpha | |
| 1937 | value stored in memory, but alpha and coverage are stored in | |
| 1938 | anciliary bits in the framebuffer which are not currently | |
| 1939 | emulated by MESS. */ | |
| 1940 | if( /*!alpha_out*/ 1 ) | |
| 1941 | { | |
| 1942 | oz = (UINT16)zb[(fb_index + x) ^ WORD_ADDR_XOR]; | |
| 1943 | if (zbuffer) | |
| 1944 | { | |
| 1945 | if (sz < oz /*&& c.a != 0*/) | |
| 1946 | { | |
| 1947 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 1948 | { | |
| 1949 | BLENDER1_32(&fb[(fb_index + x)], c1); | |
| 1950 | } | |
| 1951 | else | |
| 1952 | { | |
| 1953 | BLENDER2_32(&fb[(fb_index + x)], c1, c2); | |
| 1954 | } | |
| 1921 | 1955 | |
| 1922 | if (other_modes.z_compare_en && other_modes.z_update_en) | |
| 1923 | { | |
| 1924 | zb[(fb_index + x) ^ WORD_ADDR_XOR] = sz; | |
| 1925 | } | |
| 1926 | } | |
| 1927 | } | |
| 1928 | else | |
| 1929 | { | |
| 1930 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 1931 | { | |
| 1932 | BLENDER1_32(&fb[(fb_index + x)], c1); | |
| 1933 | } | |
| 1934 | else | |
| 1935 | { | |
| 1936 | BLENDER2_32(&fb[(fb_index + x)], c1, c2); | |
| 1937 | } | |
| 1938 | } | |
| 1956 | if (other_modes.z_compare_en && other_modes.z_update_en) | |
| 1957 | { | |
| 1958 | zb[(fb_index + x) ^ WORD_ADDR_XOR] = sz; | |
| 1959 | } | |
| 1960 | } | |
| 1961 | } | |
| 1962 | else | |
| 1963 | { | |
| 1964 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 1965 | { | |
| 1966 | BLENDER1_32(&fb[(fb_index + x)], c1); | |
| 1967 | } | |
| 1968 | else | |
| 1969 | { | |
| 1970 | BLENDER2_32(&fb[(fb_index + x)], c1, c2); | |
| 1971 | } | |
| 1972 | } | |
| 1973 | } | |
| 1939 | 1974 | } |
| 1940 | 1975 | |
| 1941 | 1976 | r += drinc; |
| r1490 | r1491 | |
| 2103 | 2138 | UINT16 sz = z >> 16; |
| 2104 | 2139 | int oz; |
| 2105 | 2140 | int sss = 0, sst = 0; |
| 2141 | int alpha_out = 0; | |
| 2106 | 2142 | COLOR c1, c2; |
| 2107 | 2143 | c1.r = c1.g = c1.b = c1.a = 0; |
| 2108 | 2144 | c2.r = c2.g = c2.b = c2.a = 0; |
| r1490 | r1491 | |
| 2189 | 2225 | if (other_modes.cycle_type == CYCLE_TYPE_1) |
| 2190 | 2226 | { |
| 2191 | 2227 | c1 = COLOR_COMBINER(0); |
| 2228 | if( c1.a == 0 ) | |
| 2229 | { | |
| 2230 | alpha_out = 1; | |
| 2231 | } | |
| 2192 | 2232 | } |
| 2193 | 2233 | else if (other_modes.cycle_type == CYCLE_TYPE_2) |
| 2194 | 2234 | { |
| 2195 | 2235 | c1 = COLOR_COMBINER(0); |
| 2196 | 2236 | c2 = COLOR_COMBINER(1); |
| 2237 | if( c2.a == 0 ) | |
| 2238 | { | |
| 2239 | alpha_out = 1; | |
| 2240 | } | |
| 2197 | 2241 | } |
| 2198 | 2242 | |
| 2199 | oz = (UINT16)zb[(fb_index + x) ^ WORD_ADDR_XOR]; | |
| 2200 | if (zbuffer) | |
| 2201 | { | |
| 2202 | if (sz < oz /*&& c.a != 0*/) | |
| 2203 | { | |
| 2204 | //BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c); | |
| 2205 | { | |
| 2206 | int dith = dither_matrix_4x4[(((j) & 3) << 2) + ((i^WORD_ADDR_XOR) & 3)]; | |
| 2207 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 2208 | { | |
| 2209 | BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, dith); | |
| 2210 | } | |
| 2211 | else | |
| 2212 | { | |
| 2213 | BLENDER2_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, c2, dith); | |
| 2214 | } | |
| 2215 | } | |
| 2243 | /* SGINUT 1/6/08: This fixes things in some games and breaks things in others. | |
| 2244 | I believe the pixels should be discarded based on the alpha | |
| 2245 | value stored in memory, but alpha and coverage are stored in | |
| 2246 | anciliary bits in the framebuffer which are not currently | |
| 2247 | emulated by MESS. */ | |
| 2248 | if( /*!alpha_out*/ 1 ) | |
| 2249 | { | |
| 2250 | oz = (UINT16)zb[(fb_index + x) ^ WORD_ADDR_XOR]; | |
| 2251 | if (zbuffer) | |
| 2252 | { | |
| 2253 | if (sz < oz /*&& c.a != 0*/) | |
| 2254 | { | |
| 2255 | //BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c); | |
| 2256 | { | |
| 2257 | int dith = dither_matrix_4x4[(((j) & 3) << 2) + ((i^WORD_ADDR_XOR) & 3)]; | |
| 2258 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 2259 | { | |
| 2260 | BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, dith); | |
| 2261 | } | |
| 2262 | else | |
| 2263 | { | |
| 2264 | BLENDER2_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, c2, dith); | |
| 2265 | } | |
| 2266 | } | |
| 2216 | 2267 | |
| 2217 | if (other_modes.z_compare_en && other_modes.z_update_en) | |
| 2218 | { | |
| 2219 | zb[(fb_index + x) ^ WORD_ADDR_XOR] = sz; | |
| 2220 | } | |
| 2221 | } | |
| 2222 | } | |
| 2223 | else | |
| 2224 | { | |
| 2225 | //BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c); | |
| 2268 | if (other_modes.z_compare_en && other_modes.z_update_en) | |
| 2269 | { | |
| 2270 | zb[(fb_index + x) ^ WORD_ADDR_XOR] = sz; | |
| 2271 | } | |
| 2272 | } | |
| 2273 | } | |
| 2274 | else | |
| 2275 | { | |
| 2276 | //BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c); | |
| 2226 | 2277 | |
| 2227 | { | |
| 2228 | int dith = dither_matrix_4x4[(((j) & 3) << 2) + ((i^WORD_ADDR_XOR) & 3)]; | |
| 2229 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 2230 | { | |
| 2231 | BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, dith); | |
| 2232 | } | |
| 2233 | else | |
| 2234 | { | |
| 2235 | BLENDER2_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, c2, dith); | |
| 2236 | } | |
| 2237 | } | |
| 2238 | } | |
| 2278 | { | |
| 2279 | int dith = dither_matrix_4x4[(((j) & 3) << 2) + ((i^WORD_ADDR_XOR) & 3)]; | |
| 2280 | if (other_modes.cycle_type == CYCLE_TYPE_1) | |
| 2281 | { | |
| 2282 | BLENDER1_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, dith); | |
| 2283 | } | |
| 2284 | else | |
| 2285 | { | |
| 2286 | BLENDER2_16(&fb[(fb_index + x) ^ WORD_ADDR_XOR], c1, c2, dith); | |
| 2287 | } | |
| 2288 | } | |
| 2289 | } | |
| 2290 | } | |
| 2239 | 2291 | } |
| 2240 | 2292 | |
| 2241 | 2293 | r += drinc; |
| r1490 | r1491 | |
| 3238 | 3290 | |
| 3239 | 3291 | for (j=0; j < height; j++) |
| 3240 | 3292 | { |
| 3241 | int tline = tb + ((tile[tilenum].line / | |
| 3293 | int tline = tb + ((tile[tilenum].line / 2) * j); | |
| 3242 | 3294 | int s = ((j + tl) * ti_width) + sl; |
| 3243 | 3295 | |
| 3244 | 3296 | for (i=0; i < width; i++) |
| r1490 | r1491 | |
|---|---|---|
| 8 | 8 | #include "exidy.h" |
| 9 | 9 | |
| 10 | 10 | UINT8 *exidy_characterram; |
| 11 | UINT8 *exidy_color_latch; | |
| 11 | 12 | |
| 12 | 13 | UINT8 exidy_collision_mask; |
| 13 | 14 | UINT8 exidy_collision_invert; |
| r1490 | r1491 | |
| 16 | 17 | static mame_bitmap *motion_object_2_vid; |
| 17 | 18 | static mame_bitmap *motion_object_2_clip; |
| 18 | 19 | |
| 19 | static UINT8 chardirty[256]; | |
| 20 | 20 | static UINT8 update_complete; |
| 21 | 21 | |
| 22 | 22 | static UINT8 int_condition; |
| r1490 | r1491 | |
| 28 | 28 | static UINT8 sprite2_xpos; |
| 29 | 29 | static UINT8 sprite2_ypos; |
| 30 | 30 | |
| 31 | UINT8 exidy_color_latch[3]; | |
| 32 | 31 | |
| 33 | 32 | |
| 34 | ||
| 35 | 33 | /************************************* |
| 36 | 34 | * |
| 37 | 35 | * Video startup |
| r1490 | r1491 | |
| 45 | 43 | motion_object_1_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format); |
| 46 | 44 | motion_object_2_vid = auto_bitmap_alloc(16, 16, machine->screen[0].format); |
| 47 | 45 | motion_object_2_clip = auto_bitmap_alloc(16, 16, machine->screen[0].format); |
| 48 | ||
| 49 | exidy_color_w(0, exidy_color_latch[0]); | |
| 50 | exidy_color_w(1, exidy_color_latch[1]); | |
| 51 | exidy_color_w(2, exidy_color_latch[2]); | |
| 52 | 46 | } |
| 53 | 47 | |
| 54 | 48 | |
| r1490 | r1491 | |
| 101 | 95 | |
| 102 | 96 | /************************************* |
| 103 | 97 | * |
| 104 | * Character RAM | |
| 105 | * | |
| 106 | *************************************/ | |
| 107 | ||
| 108 | WRITE8_HANDLER( exidy_characterram_w ) | |
| 109 | { | |
| 110 | if (exidy_characterram[offset] != data) | |
| 111 | { | |
| 112 | exidy_characterram[offset] = data; | |
| 113 | chardirty[offset / 8 % 256] = 1; | |
| 114 | } | |
| 115 | } | |
| 116 | ||
| 117 | ||
| 118 | ||
| 119 | /************************************* | |
| 120 | * | |
| 121 | 98 | * Palette RAM |
| 122 | 99 | * |
| 123 | 100 | *************************************/ |
| 124 | 101 | |
| 125 | INLINE void set_1_color(int index, int palette) | |
| 102 | INLINE void set_1_color(running_machine *machine, int index, int palette) | |
| 126 | 103 | { |
| 127 | palette_set_color_rgb( | |
| 104 | palette_set_color_rgb(machine, index, pal1bit(exidy_color_latch[2] >> palette), pal1bit(exidy_color_latch[1] >> palette), pal1bit(exidy_color_latch[0] >> palette)); | |
| 128 | 105 | } |
| 129 | 106 | |
| 130 | ||
| 107 | static | |
| 131 | 108 | { |
| 132 | exidy_color_latch[offset] = data; | |
| 133 | ||
| 134 | 109 | /* motion object 1 */ |
| 135 | set_1_color(0, 0); | |
| 136 | set_1_color(1, 7); | |
| 110 | set_1_color(machine, 0, 0); | |
| 111 | set_1_color(machine, 1, 7); | |
| 137 | 112 | |
| 138 | 113 | /* motion object 2 */ |
| 139 | set_1_color(2, 0); | |
| 140 | set_1_color(3, 6); | |
| 114 | set_1_color(machine, 2, 0); | |
| 115 | set_1_color(machine, 3, 6); | |
| 141 | 116 | |
| 142 | 117 | /* one-bit characters */ |
| 143 | if ( | |
| 118 | if (machine->gfx[0]->color_granularity == 2) | |
| 144 | 119 | { |
| 145 | set_1_color(4, 0); /* chars 0x00-0x3F */ | |
| 146 | set_1_color(5, 4); | |
| 147 | set_1_color(6, 0); /* chars 0x40-0x7F */ | |
| 148 | set_1_color(7, 3); | |
| 149 | set_1_color(8, 0); /* chars 0x80-0xBF */ | |
| 150 | set_1_color(9, 2); | |
| 151 | set_1_color(10, 0); /* chars 0xC0-0xFF */ | |
| 152 | set_1_color(11, 1); | |
| 120 | set_1_color(machine, 4, 0); /* chars 0x00-0x3F */ | |
| 121 | set_1_color(machine, 5, 4); | |
| 122 | set_1_color(machine, 6, 0); /* chars 0x40-0x7F */ | |
| 123 | set_1_color(machine, 7, 3); | |
| 124 | set_1_color(machine, 8, 0); /* chars 0x80-0xBF */ | |
| 125 | set_1_color(machine, 9, 2); | |
| 126 | set_1_color(machine, 10, 0); /* chars 0xC0-0xFF */ | |
| 127 | set_1_color(machine, 11, 1); | |
| 153 | 128 | } |
| 154 | 129 | |
| 155 | 130 | /* two-bit characters */ |
| 156 | 131 | else |
| 157 | 132 | { |
| 158 | set_1_color(4, 0); /* chars 0x00-0x3F */ | |
| 159 | set_1_color(5, 0); | |
| 160 | set_1_color(6, 4); | |
| 161 | set_1_color(7, 3); | |
| 162 | set_1_color(8, 0); /* chars 0x40-0x7F */ | |
| 163 | set_1_color(9, 0); | |
| 164 | set_1_color(10, 4); | |
| 165 | set_1_color(11, 3); | |
| 166 | set_1_color(12, 0); /* chars 0x80-0xBF */ | |
| 167 | set_1_color(13, 0); | |
| 168 | set_1_color(14, 2); | |
| 169 | set_1_color(15, 1); | |
| 170 | set_1_color(16, 0); /* chars 0xC0-0xFF */ | |
| 171 | set_1_color(17, 0); | |
| 172 | set_1_color(18, 2); | |
| 173 | set_1_color(19, 1); | |
| 133 | set_1_color(machine, 4, 0); /* chars 0x00-0x3F */ | |
| 134 | set_1_color(machine, 5, 0); | |
| 135 | set_1_color(machine, 6, 4); | |
| 136 | set_1_color(machine, 7, 3); | |
| 137 | set_1_color(machine, 8, 0); /* chars 0x40-0x7F */ | |
| 138 | set_1_color(machine, 9, 0); | |
| 139 | set_1_color(machine, 10, 4); | |
| 140 | set_1_color(machine, 11, 3); | |
| 141 | set_1_color(machine, 12, 0); /* chars 0x80-0xBF */ | |
| 142 | set_1_color(machine, 13, 0); | |
| 143 | set_1_color(machine, 14, 2); | |
| 144 | set_1_color(machine, 15, 1); | |
| 145 | set_1_color(machine, 16, 0); /* chars 0xC0-0xFF */ | |
| 146 | set_1_color(machine, 17, 0); | |
| 147 | set_1_color(machine, 18, 2); | |
| 148 | set_1_color(machine, 19, 1); | |
| 174 | 149 | } |
| 175 | 150 | } |
| 176 | 151 | |
| r1490 | r1491 | |
| 222 | 197 | |
| 223 | 198 | static void update_background(running_machine *machine) |
| 224 | 199 | { |
| 225 | int x, y, offs; | |
| 200 | int x, y, code, offs; | |
| 226 | 201 | |
| 227 | /* update the background and any dirty characters in it */ | |
| 202 | /* decode chars */ | |
| 203 | const gfx_layout *gfx = machine->drv->gfxdecodeinfo[0].gfxlayout; | |
| 204 | ||
| 205 | for (code = 0; code < gfx->total; code++) | |
| 206 | decodechar(machine->gfx[0], code, exidy_characterram, gfx); | |
| 207 | ||
| 208 | /* update the background */ | |
| 228 | 209 | for (y = offs = 0; y < 32; y++) |
| 229 | 210 | for (x = 0; x < 32; x++, offs++) |
| 230 | 211 | { |
| 231 | int co | |
| 212 | int col | |
| 232 | 213 | |
| 233 | /* see if the character is dirty */ | |
| 234 | if (chardirty[code] == 1) | |
| 235 | { | |
| 236 | decodechar(machine->gfx[0], code, exidy_characterram, machine->drv->gfxdecodeinfo[0].gfxlayout); | |
| 237 | chardirty[code] = 2; | |
| 238 | } | |
| 214 | code = videoram[offs]; | |
| 215 | color = code >> 6; | |
| 239 | 216 | |
| 240 | /* see if the bitmap is dirty */ | |
| 241 | if (dirtybuffer[offs] || chardirty[code]) | |
| 242 | { | |
| 243 | int color = code >> 6; | |
| 244 | drawgfx(tmpbitmap, machine->gfx[0], code, color, 0, 0, x * 8, y * 8, NULL, TRANSPARENCY_NONE, 0); | |
| 245 | dirtybuffer[offs] = 0; | |
| 246 | } | |
| 217 | drawgfx(tmpbitmap, machine->gfx[0], code, color, 0, 0, x * 8, y * 8, NULL, TRANSPARENCY_NONE, 0); | |
| 247 | 218 | } |
| 248 | ||
| 249 | /* reset the char dirty array */ | |
| 250 | for (y = 0; y < 256; y++) | |
| 251 | if (chardirty[y] == 2) | |
| 252 | chardirty[y] = 0; | |
| 253 | 219 | } |
| 254 | 220 | |
| 255 | 221 | |
| r1490 | r1491 | |
| 290 | 256 | return (!(sprite_enable & 0x80) || (sprite_enable & 0x10) || (exidy_collision_mask == 0x00)); |
| 291 | 257 | } |
| 292 | 258 | |
| 293 | INLINE int sprite_2_enabled(void) | |
| 294 | { | |
| 295 | return (!(sprite_enable & 0x40)); | |
| 296 | } | |
| 297 | ||
| 298 | 259 | VIDEO_EOF( exidy ) |
| 299 | 260 | { |
| 300 | UINT8 enable_set = ((sprite_enable & 0x20) != 0); | |
| 261 | UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0); | |
| 262 | UINT8 enable_set_2 = ((sprite_enable & 0x40) != 0); | |
| 301 | 263 | static const rectangle clip = { 0, 15, 0, 15 }; |
| 302 | 264 | int bgmask = machine->gfx[0]->color_granularity - 1; |
| 303 | 265 | int org_1_x = 0, org_1_y = 0; |
| r1490 | r1491 | |
| 309 | 271 | if (exidy_collision_mask == 0) |
| 310 | 272 | return; |
| 311 | 273 | |
| 312 | /* if the sprites aren't enabled, we can't collide */ | |
| 313 | if (!sprite_1_enabled() && !sprite_2_enabled()) | |
| 314 | { | |
| 315 | update_complete = 0; | |
| 316 | return; | |
| 317 | } | |
| 318 | ||
| 319 | 274 | /* update the background if necessary */ |
| 320 | 275 | if (!update_complete) |
| 321 | 276 | update_background(machine); |
| r1490 | r1491 | |
| 328 | 283 | org_1_x = 236 - sprite1_xpos - 4; |
| 329 | 284 | org_1_y = 244 - sprite1_ypos - 4; |
| 330 | 285 | drawgfx(motion_object_1_vid, machine->gfx[1], |
| 331 | (spriteno & 0x0f) + 16 * enable_set, 0, | |
| 286 | (spriteno & 0x0f) + 16 * enable_set_1, 0, | |
| 332 | 287 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); |
| 333 | 288 | } |
| 334 | 289 | |
| 335 | 290 | /* draw sprite 2 */ |
| 336 | 291 | fillbitmap(motion_object_2_vid, 0xff, &clip); |
| 337 | if (sprite_2_enabled()) | |
| 338 | { | |
| 339 | org_2_x = 236 - sprite2_xpos - 4; | |
| 340 | org_2_y = 244 - sprite2_ypos - 4; | |
| 341 | drawgfx(motion_object_2_vid, machine->gfx[1], | |
| 342 | ((spriteno >> 4) & 0x0f) + 32, 0, | |
| 343 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 344 | } | |
| 292 | org_2_x = 236 - sprite2_xpos - 4; | |
| 293 | org_2_y = 244 - sprite2_ypos - 4; | |
| 294 | drawgfx(motion_object_2_vid, machine->gfx[1], | |
| 295 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0, | |
| 296 | 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); | |
| 345 | 297 | |
| 346 | 298 | /* draw sprite 2 clipped to sprite 1's location */ |
| 347 | 299 | fillbitmap(motion_object_2_clip, 0xff, &clip); |
| 348 | if (sprite_1_enabled() | |
| 300 | if (sprite_1_enabled() | |
| 349 | 301 | { |
| 350 | 302 | sx = org_2_x - org_1_x; |
| 351 | 303 | sy = org_2_y - org_1_y; |
| 352 | 304 | drawgfx(motion_object_2_clip, machine->gfx[1], |
| 353 | ((spriteno >> 4) & 0x0f) + 32, 0, | |
| 305 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 0, | |
| 354 | 306 | 0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0); |
| 355 | 307 | } |
| 356 | 308 | |
| r1490 | r1491 | |
| 395 | 347 | VIDEO_UPDATE( exidy ) |
| 396 | 348 | { |
| 397 | 349 | int sx, sy; |
| 350 | UINT8 enable_set_2; | |
| 398 | 351 | |
| 352 | /* refresh the colors from the palette (static or dynamic) */ | |
| 353 | set_colors(machine); | |
| 354 | ||
| 399 | 355 | /* update the background and draw it */ |
| 400 | 356 | update_background(machine); |
| 401 | 357 | copybitmap(bitmap, tmpbitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0); |
| 402 | 358 | |
| 403 | 359 | /* draw sprite 2 first */ |
| 404 | if (sprite_2_enabled()) | |
| 405 | { | |
| 406 | sx = 236 - sprite2_xpos - 4; | |
| 407 | sy = 244 - sprite2_ypos - 4; | |
| 360 | enable_set_2 = ((sprite_enable & 0x40) != 0); | |
| 408 | 361 | |
| 409 | drawgfx(bitmap, machine->gfx[1], | |
| 410 | ((spriteno >> 4) & 0x0f) + 32, 1, | |
| 411 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 412 | } | |
| 362 | sx = 236 - sprite2_xpos - 4; | |
| 363 | sy = 244 - sprite2_ypos - 4; | |
| 413 | 364 | |
| 365 | drawgfx(bitmap, machine->gfx[1], | |
| 366 | ((spriteno >> 4) & 0x0f) + 32 + 16 * enable_set_2, 1, | |
| 367 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); | |
| 368 | ||
| 414 | 369 | /* draw sprite 1 next */ |
| 415 | 370 | if (sprite_1_enabled()) |
| 416 | 371 | { |
| 417 | UINT8 enable_set = ((sprite_enable & 0x20) != 0); | |
| 372 | UINT8 enable_set_1 = ((sprite_enable & 0x20) != 0); | |
| 418 | 373 | |
| 419 | 374 | sx = 236 - sprite1_xpos - 4; |
| 420 | 375 | sy = 244 - sprite1_ypos - 4; |
| r1490 | r1491 | |
| 422 | 377 | if (sy < 0) sy = 0; |
| 423 | 378 | |
| 424 | 379 | drawgfx(bitmap, machine->gfx[1], |
| 425 | (spriteno & 0x0f) + 16 * enable_set, 0, | |
| 380 | (spriteno & 0x0f) + 16 * enable_set_1, 0, | |
| 426 | 381 | 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); |
| 427 | 382 | } |
| 428 | 383 |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | (c) 12/2/1998 Lee Taylor |
| 8 | 8 | |
| 9 | 2006 - major rewrite by couriersud | |
| 10 | ||
| 9 | 11 | ***************************************************************************/ |
| 10 | 12 | |
| 11 | 13 | #include "driver.h" |
| 14 | #include "skychut.h" | |
| 12 | 15 | |
| 16 | static tilemap * tx_tilemap; | |
| 17 | static gfx_element * back_gfx; | |
| 18 | static UINT32 extyoffs[32*8]; | |
| 19 | static UINT32 extxoffs[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; | |
| 13 | 20 | |
| 21 | static const gfx_layout backlayout = | |
| 22 | { | |
| 23 | 8,8*32, /* 8*8 characters */ | |
| 24 | 4, /* 256 characters */ | |
| 25 | 1, /* 1 bits per pixel */ | |
| 26 | { 0 }, | |
| 27 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 28 | { 0*8*32, 1*8*32, 2*8*32, 3*8*32, 4*8*32, 5*8*32, 6*8*32, 7*8*32 }, | |
| 29 | 32*8*8, /* every char takes 8 consecutive bytes */ | |
| 30 | extxoffs, extyoffs | |
| 31 | }; | |
| 14 | 32 | |
| 15 | UINT8 *iremm15_chargen; | |
| 16 | static int bottomline; | |
| 33 | static const gfx_layout charlayout = | |
| 34 | { | |
| 35 | 8,8, /* 8*8 characters */ | |
| 36 | 256, /* 256 characters */ | |
| 37 | 1, /* 1 bits per pixel */ | |
| 38 | { 0 }, | |
| 39 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 40 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 41 | 8*8 /* every char takes 8 consecutive bytes */ | |
| 42 | }; | |
| 17 | 43 | |
| 44 | static UINT32 tilemap_scan(UINT32 col,UINT32 row,UINT32 num_cols,UINT32 num_rows) | |
| 45 | { | |
| 46 | //irem_state *state = Machine->driver_data; | |
| 18 | 47 | |
| 48 | return (31-col)*32 + row; | |
| 49 | } | |
| 50 | ||
| 51 | ||
| 52 | static void get_tile_info(running_machine *machine, tile_data *tileinfo, tilemap_memory_index tile_index, void *param) | |
| 53 | { | |
| 54 | SET_TILE_INFO(0, videoram[tile_index], colorram[tile_index] & 0x07, 0); | |
| 55 | } | |
| 56 | ||
| 57 | ||
| 19 | 58 | WRITE8_HANDLER( skychut_colorram_w ) |
| 20 | 59 | { |
| 21 | colorram[offset] = data; | |
| 60 | if (colorram[offset] != data) | |
| 61 | { | |
| 62 | tilemap_mark_tile_dirty(tx_tilemap, offset); | |
| 63 | colorram[offset] = data; | |
| 64 | } | |
| 22 | 65 | } |
| 23 | 66 | |
| 24 | WRITE8_HANDLER( skychut_ctrl_w ) | |
| 67 | ||
| 68 | WRITE8_HANDLER( iremm15_chargen_w ) | |
| 25 | 69 | { |
| 26 | ||
| 70 | ire | |
| 27 | 71 | |
| 28 | /* I have NO IDEA if this is correct or not */ | |
| 29 | bottomline = ~data & 0x20; | |
| 72 | if (state->chargen[offset] != data) | |
| 73 | { | |
| 74 | state->chargen[offset] = data; | |
| 75 | /* not very effective ... dirty would be better */ | |
| 76 | decodechar(Machine->gfx[0],offset >> 3,state->chargen, &Machine->gfx[0]->layout); | |
| 77 | } | |
| 30 | 78 | } |
| 31 | 79 | |
| 32 | 80 | |
| 33 | ||
| 81 | ||
| 34 | 82 | { |
| 83 | irem_state *state = Machine->driver_data; | |
| 84 | ||
| 85 | if (!state->flip) | |
| 86 | *BITMAP_ADDR16(bm, y, x) = col; | |
| 87 | else | |
| 88 | *BITMAP_ADDR16(bm, (IREMM10_VBSTART - 1)- (y - IREMM10_VBEND) + 6 | |
| 89 | , (IREMM10_HBSTART - 1)- (x- IREMM10_HBEND)) = col; // only when flip_screen(?) | |
| 90 | } | |
| 91 | ||
| 92 | VIDEO_START( iremm10 ) | |
| 93 | { | |
| 94 | //irem_state *state = machine->driver_data; | |
| 95 | int i; | |
| 96 | ||
| 97 | for (i=0;i<32*8;i++) | |
| 98 | extyoffs[i] = i*8; | |
| 99 | ||
| 100 | video_start_generic(machine); | |
| 101 | ||
| 102 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TYPE_COLORTABLE,8,8,32,32); | |
| 103 | tilemap_set_transparent_pen(tx_tilemap, 0x07); | |
| 104 | tilemap_set_scrolldx(tx_tilemap, 0, 62); | |
| 105 | tilemap_set_scrolldy(tx_tilemap, 0, 0); | |
| 106 | ||
| 107 | back_gfx = allocgfx(&backlayout); | |
| 108 | back_gfx->total_colors = 8; | |
| 109 | ||
| 110 | machine->gfx[1] = back_gfx; | |
| 111 | return ; | |
| 112 | } | |
| 113 | ||
| 114 | VIDEO_START( iremm15 ) | |
| 115 | { | |
| 116 | irem_state *state = machine->driver_data; | |
| 117 | ||
| 118 | machine->gfx[0] = allocgfx(&charlayout); | |
| 119 | machine->gfx[0]->total_colors = 8; | |
| 120 | ||
| 121 | decodegfx(machine->gfx[0], state->chargen,0,256); | |
| 122 | ||
| 123 | video_start_generic(machine); | |
| 124 | ||
| 125 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 126 | tilemap_set_scrolldx(tx_tilemap, 0, 116); | |
| 127 | tilemap_set_scrolldy(tx_tilemap, 0, 0); | |
| 128 | ||
| 129 | return ; | |
| 130 | } | |
| 131 | ||
| 132 | /*************************************************************************** | |
| 133 | ||
| 134 | Draw the game screen in the given mame_bitmap. | |
| 135 | ||
| 136 | ***************************************************************************/ | |
| 137 | VIDEO_UPDATE( iremm10 ) | |
| 138 | { | |
| 139 | irem_state *state = machine->driver_data; | |
| 35 | 140 | int offs; |
| 141 | int color[4]= { 3, 3, 5, 5}; | |
| 142 | int xpos[4] = { 4*8, 26*8, 7*8, 6*8} ; | |
| 143 | int i; | |
| 36 | 144 | |
| 37 | 145 | fillbitmap(bitmap,machine->pens[7],cliprect); |
| 38 | 146 | |
| 39 | for (offs = 0;offs < 0x400;offs++) | |
| 40 | { | |
| 41 | int mask=iremm15_chargen[offs]; | |
| 42 | int x = offs / 256; | |
| 43 | int y = offs % 256; | |
| 44 | int col = 0; | |
| 147 | decodegfx(back_gfx, state->chargen,0,4); | |
| 148 | for (i=0;i<4;i++) | |
| 149 | if (state->flip) | |
| 150 | drawgfx(bitmap, back_gfx, i, color[i], 1, 1, 31*8 - xpos[i], 6, cliprect, 0, 0); | |
| 151 | else | |
| 152 | drawgfx(bitmap, back_gfx, i, color[i], 0, 0, xpos[i], 0, cliprect, 0, 0); | |
| 45 | 153 | |
| 46 | switch (x) | |
| 47 | { | |
| 48 | case 0: x = 4*8; col = 3; break; | |
| 49 | case 1: x = 26*8; col = 3; break; | |
| 50 | case 2: x = 7*8; col = 5; break; | |
| 51 | case 3: x = 6*8; col = 5; break; | |
| 52 | } | |
| 53 | ||
| 54 | if (x >= cliprect->min_x && x+7 <= cliprect->max_x | |
| 55 | && y >= cliprect->min_y && y <= cliprect->max_y) | |
| 56 | { | |
| 57 | if (mask&0x80) *BITMAP_ADDR16(bitmap, y, x+0) = col; | |
| 58 | if (mask&0x40) *BITMAP_ADDR16(bitmap, y, x+1) = col; | |
| 59 | if (mask&0x20) *BITMAP_ADDR16(bitmap, y, x+2) = col; | |
| 60 | if (mask&0x10) *BITMAP_ADDR16(bitmap, y, x+3) = col; | |
| 61 | if (mask&0x08) *BITMAP_ADDR16(bitmap, y, x+4) = col; | |
| 62 | if (mask&0x04) *BITMAP_ADDR16(bitmap, y, x+5) = col; | |
| 63 | if (mask&0x02) *BITMAP_ADDR16(bitmap, y, x+6) = col; | |
| 64 | if (mask&0x01) *BITMAP_ADDR16(bitmap, y, x+7) = col; | |
| 65 | } | |
| 66 | } | |
| 67 | ||
| 68 | if (bottomline) | |
| 154 | if (state->bottomline) | |
| 69 | 155 | { |
| 70 | 156 | int y; |
| 71 | 157 | |
| 72 | for (y = | |
| 158 | for (y = IREMM10 | |
| 73 | 159 | { |
| 74 | | |
| 160 | plot | |
| 75 | 161 | } |
| 76 | 162 | } |
| 77 | 163 | |
| 78 | 164 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 79 | { | |
| 80 | int sx,sy; | |
| 165 | tilemap_mark_tile_dirty(tx_tilemap, offs); | |
| 81 | 166 | |
| 82 | sx = 31 - offs / 32; | |
| 83 | sy = offs % 32; | |
| 167 | tilemap_set_flip(tx_tilemap, state->flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
| 168 | tilemap_draw(bitmap,cliprect,tx_tilemap,0,0); | |
| 84 | 169 | |
| 85 | drawgfx(bitmap,machine->gfx[0], | |
| 86 | videoram[offs], | |
| 87 | colorram[offs], | |
| 88 | 0,0, | |
| 89 | 8*sx,8*sy, | |
| 90 | cliprect,TRANSPARENCY_PEN,0); | |
| 91 | } | |
| 92 | 170 | return 0; |
| 93 | 171 | } |
| 94 | 172 | |
| 95 | 173 | |
| 96 | static void iremm15_drawgfx(mame_bitmap *bitmap, int ch, | |
| 97 | INT16 color, INT16 back, int x, int y) | |
| 98 | { | |
| 99 | UINT8 mask; | |
| 100 | int i; | |
| 174 | /*************************************************************************** | |
| 101 | 175 | |
| 102 | for (i=0; i<8; i++, y++) { | |
| 103 | mask=iremm15_chargen[ch*8+i]; | |
| 104 | *BITMAP_ADDR16(bitmap, y, x+0) = mask&0x80?color:back; | |
| 105 | *BITMAP_ADDR16(bitmap, y, x+1) = mask&0x40?color:back; | |
| 106 | *BITMAP_ADDR16(bitmap, y, x+2) = mask&0x20?color:back; | |
| 107 | *BITMAP_ADDR16(bitmap, y, x+3) = mask&0x10?color:back; | |
| 108 | *BITMAP_ADDR16(bitmap, y, x+4) = mask&0x08?color:back; | |
| 109 | *BITMAP_ADDR16(bitmap, y, x+5) = mask&0x04?color:back; | |
| 110 | *BITMAP_ADDR16(bitmap, y, x+6) = mask&0x02?color:back; | |
| 111 | *BITMAP_ADDR16(bitmap, y, x+7) = mask&0x01?color:back; | |
| 112 | } | |
| 113 | } | |
| 176 | Draw the game screen in the given mame_bitmap. | |
| 114 | 177 | |
| 115 | ||
| 178 | ***************************************************************************/ | |
| 116 | 179 | VIDEO_UPDATE( iremm15 ) |
| 117 | 180 | { |
| 181 | irem_state *state = machine->driver_data; | |
| 118 | 182 | int offs; |
| 119 | 183 | |
| 120 | 184 | for (offs = videoram_size - 1;offs >= 0;offs--) |
| 121 | { | |
| 122 | int sx,sy; | |
| 185 | tilemap_mark_tile_dirty(tx_tilemap, offs); | |
| 123 | 186 | |
| 187 | //tilemap_mark_all_tiles_dirty(tx_tilemap); | |
| 188 | tilemap_set_flip(tx_tilemap, state->flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
| 189 | tilemap_draw(bitmap,cliprect,tx_tilemap,0,0); | |
| 124 | 190 | |
| 125 | sx = 31 - offs / 32; | |
| 126 | sy = offs % 32; | |
| 127 | ||
| 128 | iremm15_drawgfx(tmpbitmap, | |
| 129 | videoram[offs], | |
| 130 | machine->pens[colorram[offs] & 7], | |
| 131 | machine->pens[7], // space beam not color 0 | |
| 132 | 8*sx,8*sy); | |
| 133 | } | |
| 134 | ||
| 135 | copybitmap(bitmap,tmpbitmap,0,0,0,0,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); | |
| 136 | 191 | return 0; |
| 137 | 192 | } |
| 138 | 193 |
| r1490 | r1491 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | VIDEO_START( atarigx2 ) |
| 95 | 95 | { |
| 96 | static const | |
| 96 | static const | |
| 97 | 97 | { |
| 98 | 98 | REGION_GFX3,/* region where the GFX data lives */ |
| 99 | 99 | 256, /* number of entries in sprite RAM */ |
| r1490 | r1491 | |
| 113 | 113 | {{ 0,0x0e00,0,0,0,0,0,0 }}, /* mask for the priority */ |
| 114 | 114 | {{ 0 }} /* mask for the VRAM target */ |
| 115 | 115 | }; |
| 116 | | |
| 116 | | |
| 117 | 117 | int i; |
| 118 | 118 | |
| 119 | 119 | /* blend the playfields and free the temporary one */ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | /*************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "video/s2636.h" | |
| 8 | 9 | |
| 9 | UINT8 *zac_s2636ram; | |
| 10 | 10 | static mame_bitmap *spritebitmap; |
| 11 | 11 | |
| 12 | static UINT8 dirtychar[256>>3]; | |
| 13 | 12 | static int CollisionBackground; |
| 14 | 13 | static int CollisionSprite; |
| 15 | 14 | |
| r1490 | r1491 | |
| 28 | 27 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 29 | 28 | } |
| 30 | 29 | |
| 31 | WRITE8_HANDLER( zac_s2636_w ) | |
| 32 | { | |
| 33 | if (zac_s2636ram[offset] != data) | |
| 34 | { | |
| 35 | zac_s2636ram[offset] = data; | |
| 36 | dirtychar[offset>>3] = 1; | |
| 37 | } | |
| 38 | } | |
| 39 | ||
| 40 | 30 | READ8_HANDLER( zac_s2636_r ) |
| 41 | 31 | { |
| 42 | if(offset!=0xCB) return | |
| 32 | if(offset!=0xCB) return | |
| 43 | 33 | else return CollisionSprite; |
| 44 | 34 | } |
| 45 | 35 | |
| r1490 | r1491 | |
| 57 | 47 | int Checksum=0; |
| 58 | 48 | int x,y; |
| 59 | 49 | |
| 60 | if(( | |
| 50 | if(( | |
| 61 | 51 | { |
| 62 | int fx = (zac_s2636ram[first * 0x10 + 10] * 4)-22; | |
| 63 | int fy = (zac_s2636ram[first * 0x10 + 12] * 3)+3; | |
| 52 | int fx = (s2636_1_ram[first * 0x10 + 10] * 4)-22; | |
| 53 | int fy = (s2636_1_ram[first * 0x10 + 12] * 3)+3; | |
| 64 | 54 | int expand = (first==1) ? 2 : 1; |
| 65 | 55 | |
| 66 | 56 | /* Draw first sprite */ |
| r1490 | r1491 | |
| 96 | 86 | second * 2, |
| 97 | 87 | 1, |
| 98 | 88 | 0,0, |
| 99 | ( | |
| 89 | ( | |
| 100 | 90 | 0, TRANSPARENCY_PEN, 0); |
| 101 | 91 | |
| 102 | 92 | /* Remove fingerprint */ |
| r1490 | r1491 | |
| 168 | 158 | |
| 169 | 159 | for(offs=0;offs<0x50;offs+=0x10) |
| 170 | 160 | { |
| 171 | if(( | |
| 161 | if(( | |
| 172 | 162 | { |
| 173 | 163 | int spriteno = (offs / 8); |
| 174 | int expand = ((zac_s2636ram[0xc0] & (spriteno*2))!=0) ? 2 : 1; | |
| 175 | int bx = (zac_s2636ram[offs+10] * 4) - 22; | |
| 176 | int by = (zac_s2636ram[offs+12] * 3) + 3; | |
| 164 | int expand = ((s2636_1_ram[0xc0] & (spriteno*2))!=0) ? 2 : 1; | |
| 165 | int bx = (s2636_1_ram[offs+10] * 4) - 22; | |
| 166 | int by = (s2636_1_ram[offs+12] * 3) + 3; | |
| 177 | 167 | int x,y; |
| 178 | 168 | |
| 179 | if(dirtychar[spriteno]) | |
| 180 | { | |
| 181 | /* 16x8 version */ | |
| 182 | decodechar(machine->gfx[1],spriteno,zac_s2636ram,machine->drv->gfxdecodeinfo[1].gfxlayout); | |
| 169 | /* 16x8 version */ | |
| 170 | decodechar(machine->gfx[1],spriteno,s2636_1_ram,machine->drv->gfxdecodeinfo[1].gfxlayout); | |
| 183 | 171 | |
| 184 | /* 16x16 version */ | |
| 185 | decodechar(machine->gfx[2],spriteno,zac_s2636ram,machine->drv->gfxdecodeinfo[2].gfxlayout); | |
| 172 | /* 16x16 version */ | |
| 173 | decodechar(machine->gfx[2],spriteno,s2636_1_ram,machine->drv->gfxdecodeinfo[2].gfxlayout); | |
| 186 | 174 | |
| 187 | dirtychar[spriteno] = 0; | |
| 188 | } | |
| 189 | ||
| 190 | 175 | /* Sprite->Background collision detection */ |
| 191 | 176 | drawgfx(bitmap,machine->gfx[expand], |
| 192 | 177 | spriteno, |
| r1490 | r1491 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | assert_always(chips > 0, "we have an erroneous TC0100SCN configuration"); |
| 32 | 32 | |
| 33 | TC0100SCN_vh_start(machine,chips,TC0100SCN_GFX_NUM,taito_hide_pixels,0,0,0,0,0, | |
| 33 | TC0100SCN_vh_start(machine,chips,TC0100SCN_GFX_NUM,taito_hide_pixels,0,0,0,0,0,2); | |
| 34 | 34 | |
| 35 | 35 | if (has_TC0110PCR()) |
| 36 | 36 | TC0110PCR_vh_start(); |
| r1490 | r1491 | |
| 58 | 58 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect,int primask,int x_offs,int y_offs) |
| 59 | 59 | { |
| 60 | 60 | int offs, data, tilenum, color, flipx, flipy; |
| 61 | int x, y, priority, | |
| 61 | int x, y, priority, | |
| 62 | 62 | int code; |
| 63 | 63 | |
| 64 | 64 | #ifdef MAME_DEBUG |
| r1490 | r1491 | |
| 77 | 77 | if (!tilenum) continue; |
| 78 | 78 | |
| 79 | 79 | data = spriteram16[offs+0]; |
| 80 | // x = (data - 8) & 0x3ff; | |
| 81 | 80 | x = (data - 32) & 0x3ff; /* aligns sprites on rock outcrops and sewer hole */ |
| 82 | 81 | |
| 83 | 82 | data = spriteram16[offs+1]; |
| 84 | 83 | y = (data - 0) & 0x1ff; |
| 85 | 84 | |
| 86 | /* don't know meaning of "invis" bit (Darius: explosions of your bomb shots) */ | |
| 85 | /* | |
| 86 | The purpose of the bit at data&0x8 (below) is unknown, but it is set | |
| 87 | on Darius explosions, some enemy missiles and at least 1 boss. | |
| 88 | It is most likely another priority bit but as there are no obvious | |
| 89 | visual problems it will need checked against the original pcb. | |
| 90 | ||
| 91 | There is a report this bit is set when the player intersects | |
| 92 | the tank sprite in Ninja Warriors however I was unable to repro | |
| 93 | this or find any use of this bit in that game. | |
| 94 | ||
| 95 | Bit&0x8000 is set on some sprites in later levels of Darius | |
| 96 | but is again unknown, and there is no obvious visual problem. | |
| 97 | */ | |
| 87 | 98 | data = spriteram16[offs+3]; |
| 88 | 99 | flipx = (data & 0x1); |
| 89 | 100 | flipy = (data & 0x2) >> 1; |
| 90 | 101 | priority = (data & 0x4) >> 2; // 1 = low |
| 102 | /* data&0x8 - unknown */ | |
| 91 | 103 | if (priority != primask) continue; |
| 92 | invis = (data & 0x8) >> 3; | |
| 93 | 104 | color = (data & 0x7f00) >> 8; |
| 105 | /* data&0x8000 - unknown */ | |
| 94 | 106 | |
| 95 | /* Ninjaw: this stops your player flickering black and cutting into tank sprites */ | |
| 96 | if (invis) continue; | |
| 97 | ||
| 98 | 107 | #ifdef MAME_DEBUG |
| 99 | 108 | if (data & 0x80f0) unknown |= (data &0x80f0); |
| 100 | 109 | #endif |
| r1490 | r1491 | |
|---|---|---|
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | scrolly = -*matmania_scroll; |
| 222 | if ( | |
| 222 | if ( | |
| 223 | 223 | copyscrollbitmap(bitmap,tmpbitmap2,0,0,1,&scrolly,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 224 | 224 | else |
| 225 | 225 | copyscrollbitmap(bitmap,tmpbitmap,0,0,1,&scrolly,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| r1490 | r1491 | |
| 316 | 316 | |
| 317 | 317 | |
| 318 | 318 | scrolly = -*matmania_scroll; |
| 319 | if (*matmania_pageselect) | |
| 319 | ||
| 320 | if (matmania_pageselect[0]&0x01) // this sets 0x20 sometimes, which must have a different meaning | |
| 320 | 321 | copyscrollbitmap(bitmap,tmpbitmap2,0,0,1,&scrolly,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 321 | 322 | else |
| 322 | 323 | copyscrollbitmap(bitmap,tmpbitmap,0,0,1,&scrolly,&machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| r1490 | r1491 | |
|---|---|---|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /* bit 2 selects the input paddle */ |
| 39 | ||
| 39 | | |
| 40 | 40 | |
| 41 | 41 | /* bit 3 is coin lockout (but not the service coin) */ |
| 42 | 42 | coin_lockout_w(0, !(data & 0x08)); |
| r1490 | r1491 | |
| 60 | 60 | tilemap_mark_all_tiles_dirty(bg_tilemap); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | /* bit 7 is unknown */ | |
| 63 | /* BM: bit 7 is suspected to be MCU reset, the evidence for this is that | |
| 64 | the games tilt mode reset sequence shows the main CPU must be able to | |
| 65 | directly control the reset line of the MCU, else the game will crash | |
| 66 | leaving the tilt screen (as the MCU is now out of sync with main CPU | |
| 67 | which resets itself). This bit is the likely candidate as it is flipped | |
| 68 | early in bootup just prior to accessing the MCU for the first time. */ | |
| 69 | if (cpu_gettotalcpu()>1) // Bootlegs don't have the MCU but still set this bit | |
| 70 | cpunum_set_input_line(1, INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 64 | 71 | } |
| 65 | 72 | |
| 66 | 73 | static TILE_GET_INFO( get_bg_tile_info ) |
| r1490 | r1491 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | VIDEO_START( atarigt ) |
| 115 | 115 | { |
| 116 | static const | |
| 116 | static const | |
| 117 | 117 | { |
| 118 | 118 | REGION_GFX3,/* region where the GFX data lives */ |
| 119 | 119 | 256, /* number of entries in sprite RAM */ |
| r1490 | r1491 | |
| 133 | 133 | {{ 0,0x0e00,0,0,0,0,0,0 }}, /* mask for the priority */ |
| 134 | 134 | {{ 0,0x8000,0,0,0,0,0,0 }} /* mask for the VRAM target */ |
| 135 | 135 | }; |
| 136 | | |
| 136 | | |
| 137 | 137 | int i; |
| 138 | 138 | |
| 139 | 139 | /* blend the playfields and free the temporary one */ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | # Small driver-specific example makefile |
| 6 | 6 | # Use make SUBTARGET=tiny to build |
| 7 | 7 | # |
| 8 | # Copyright | |
| 8 | # Copyright | |
| 9 | 9 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | # |
| 11 | 11 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 456 | 456 | |
| 457 | 457 | // CreateJrDecodeTable.c |
| 458 | 458 | // |
| 459 | // Copyright | |
| 459 | // Copyright | |
| 460 | 460 | // This program is published under the GNU Public License. |
| 461 | 461 | // |
| 462 | 462 | // Comments, questions to: david@indigita.com |
| r0 | r1491 | |
|---|---|---|
| 1 | <?xml version="1.0"?> | |
| 2 | <mamelayout version="2"> | |
| 3 | <element name="blank"> | |
| 4 | <rect> | |
| 5 | <color red="0" green="0" blue="0" /> | |
| 6 | </rect> | |
| 7 | </element> | |
| 8 | ||
| 9 | <view name="Screen 0 Standard (4:3)"> | |
| 10 | <screen index="0"> | |
| 11 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 12 | </screen> | |
| 13 | </view> | |
| 14 | ||
| 15 | <view name="Screen 0 Cropped (304x224)"> | |
| 16 | <bezel name="blank" element="blank"> | |
| 17 | <bounds left="0" top="0" right="0.1" bottom="3" /> | |
| 18 | </bezel> | |
| 19 | <bezel name="blank" element="blank"> | |
| 20 | <bounds left="3.9" top="0" right="4" bottom="3" /> | |
| 21 | </bezel> | |
| 22 | <screen index="0"> | |
| 23 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 24 | </screen> | |
| 25 | </view> | |
| 26 | ||
| 27 | <view name="Screen 0 Stretched (304x224)"> | |
| 28 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 29 | <screen index="0"> | |
| 30 | <bounds left="-0.105263" top="0" right="4.105263" bottom="3" /> | |
| 31 | </screen> | |
| 32 | </view> | |
| 33 | </mamelayout> |
| r1490 | r1491 | |
|---|---|---|
| 730 | 730 | static DRIVER_INIT( eprom ) |
| 731 | 731 | { |
| 732 | 732 | atarigen_eeprom_default = NULL; |
| 733 | atarijsa_init( | |
| 733 | atarijsa_init(machine, 1, 0x0002); | |
| 734 | 734 | |
| 735 | 735 | /* install CPU synchronization handlers */ |
| 736 | 736 | sync_data = memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x16cc00, 0x16cc01, 0, 0, sync_r); |
| r1490 | r1491 | |
| 743 | 743 | static DRIVER_INIT( klaxp ) |
| 744 | 744 | { |
| 745 | 745 | atarigen_eeprom_default = NULL; |
| 746 | atarijsa_init( | |
| 746 | atarijsa_init(machine, 1, 0x0002); | |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | 749 | |
| 750 | 750 | static DRIVER_INIT( guts ) |
| 751 | 751 | { |
| 752 | 752 | atarigen_eeprom_default = NULL; |
| 753 | atarijsa_init( | |
| 753 | atarijsa_init(machine, 1, 0x0002); | |
| 754 | 754 | } |
| 755 | 755 | |
| 756 | 756 |
| r1490 | r1491 | |
|---|---|---|
| 118 | 118 | #include "midyunit.h" |
| 119 | 119 | |
| 120 | 120 | |
| 121 | #define SLOW_CPU_CLOCK (40000000) /* smashtv, trog */ | |
| 122 | #define FAST_CPU_CLOCK (48000000) /* narc, strkforc, mk, totcarn */ | |
| 121 | /* master clocks vary based on game */ | |
| 122 | #define SLOW_MASTER_CLOCK XTAL_40MHz /* "slow" == smashtv, trog, hiimpact */ | |
| 123 | #define FAST_MASTER_CLOCK XTAL_48MHz /* "fast" == narc, mk, totcarn, strkforc */ | |
| 124 | #define FASTER_MASTER_CLOCK XTAL_50MHz /* "faster" == term2 */ | |
| 123 | 125 | |
| 124 | #define STDRES_PIXEL_CLOCK (24000000/6) | |
| 125 | #define MEDRES_PIXEL_CLOCK (48000000/6) | |
| 126 | /* pixel clocks are 48MHz (narc) or 24MHz (all others) regardless */ | |
| 127 | #define MEDRES_PIXEL_CLOCK (XTAL_48MHz / 6) | |
| 128 | #define STDRES_PIXEL_CLOCK (XTAL_24MHz / 6) | |
| 126 | 129 | |
| 127 | 130 | |
| 128 | 131 | |
| r1490 | r1491 | |
| 142 | 145 | |
| 143 | 146 | /************************************* |
| 144 | 147 | * |
| 148 | * Sound board comms | |
| 149 | * | |
| 150 | *************************************/ | |
| 151 | ||
| 152 | static UINT32 narc_talkback_strobe_r(void *param) | |
| 153 | { | |
| 154 | return (williams_narc_talkback_r() >> 8) & 1; | |
| 155 | } | |
| 156 | ||
| 157 | ||
| 158 | static UINT32 narc_talkback_data_r(void *param) | |
| 159 | { | |
| 160 | return williams_narc_talkback_r() & 0xff; | |
| 161 | } | |
| 162 | ||
| 163 | ||
| 164 | static UINT32 adpcm_irq_state_r(void *param) | |
| 165 | { | |
| 166 | return williams_adpcm_sound_irq_r() & 1; | |
| 167 | } | |
| 168 | ||
| 169 | ||
| 170 | ||
| 171 | /************************************* | |
| 172 | * | |
| 145 | 173 | * CMOS read/write |
| 146 | 174 | * |
| 147 | 175 | *************************************/ |
| r1490 | r1491 | |
| 226 | 254 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 227 | 255 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 228 | 256 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 229 | PORT_BIT( 0x0400, IP_ACTIVE_ | |
| 257 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_ | |
| 230 | 258 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* memory protect interlock */ |
| 231 | 259 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 232 | 260 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Language ) ) /* Is this a REAL dip or toggle? or software enable? */ |
| r1490 | r1491 | |
| 236 | 264 | // PORT_DIPSETTING( 0x0000, DEF_STR( Unknown ) ) |
| 237 | 265 | |
| 238 | 266 | PORT_START |
| 239 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 267 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(narc_talkback_data_r, NULL) | |
| 268 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 269 | ||
| 240 | 270 | PORT_START |
| 241 | 271 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 242 | 272 | PORT_START |
| r1490 | r1491 | |
| 567 | 597 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 568 | 598 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 569 | 599 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 570 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_ | |
| 600 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_ | |
| 571 | 601 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 572 | 602 | //There should be an additional block button for player 2, but I coudn't find it. |
| 573 | 603 | |
| r1490 | r1491 | |
| 659 | 689 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 660 | 690 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 661 | 691 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 662 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_ | |
| 692 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_ | |
| 663 | 693 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 664 | 694 | //There should be an additional block button for player 2, but I coudn't find it. |
| 665 | 695 | |
| r1490 | r1491 | |
| 744 | 774 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 745 | 775 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 746 | 776 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 747 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 777 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 778 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 779 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 748 | 780 | |
| 749 | 781 | PORT_START |
| 750 | 782 | PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE PORT_PLAYER(1) |
| r1490 | r1491 | |
| 846 | 878 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| 847 | 879 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) /* video freeze */ |
| 848 | 880 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 849 | PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 881 | PORT_BIT( 0x3c00, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 882 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 883 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 850 | 884 | |
| 851 | 885 | PORT_START |
| 852 | 886 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1490 | r1491 | |
| 969 | 1003 | static MACHINE_DRIVER_START( zunit ) |
| 970 | 1004 | |
| 971 | 1005 | /* basic machine hardware */ |
| 972 | MDRV_CPU_ADD(TMS34010, FAST_ | |
| 1006 | MDRV_CPU_ADD(TMS34010, FAST_MASTER_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 973 | 1007 | MDRV_CPU_CONFIG(zunit_tms_config) |
| 974 | 1008 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 975 | 1009 | |
| r1490 | r1491 | |
| 1002 | 1036 | static MACHINE_DRIVER_START( yunit_core ) |
| 1003 | 1037 | |
| 1004 | 1038 | /* basic machine hardware */ |
| 1005 | MDRV_CPU_ADD_TAG("main", TMS34010, | |
| 1039 | MDRV_CPU_ADD_TAG("main", TMS34010, SLOW_MASTER | |
| 1006 | 1040 | MDRV_CPU_CONFIG(yunit_tms_config) |
| 1007 | 1041 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 1008 | 1042 | |
| r1490 | r1491 | |
| 1025 | 1059 | |
| 1026 | 1060 | /* basic machine hardware */ |
| 1027 | 1061 | MDRV_IMPORT_FROM(yunit_core) |
| 1028 | MDRV_CPU_REPLACE("main", TMS34010, SLOW_CPU_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 1029 | 1062 | MDRV_IMPORT_FROM(williams_cvsd_sound) |
| 1030 | 1063 | |
| 1031 | 1064 | /* video hardware */ |
| r1490 | r1491 | |
| 1038 | 1071 | |
| 1039 | 1072 | /* basic machine hardware */ |
| 1040 | 1073 | MDRV_IMPORT_FROM(yunit_core) |
| 1074 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 1041 | 1075 | MDRV_IMPORT_FROM(williams_cvsd_sound) |
| 1042 | 1076 | |
| 1043 | 1077 | /* video hardware */ |
| r1490 | r1491 | |
| 1050 | 1084 | |
| 1051 | 1085 | /* basic machine hardware */ |
| 1052 | 1086 | MDRV_IMPORT_FROM(yunit_core) |
| 1053 | MDRV_CPU_REPLACE("main", TMS34010, SLOW_CPU_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 1054 | 1087 | MDRV_IMPORT_FROM(williams_cvsd_sound) |
| 1055 | 1088 | |
| 1056 | 1089 | /* video hardware */ |
| r1490 | r1491 | |
| 1059 | 1092 | MACHINE_DRIVER_END |
| 1060 | 1093 | |
| 1061 | 1094 | |
| 1062 | static MACHINE_DRIVER_START( yunit_ | |
| 1095 | static MACHINE_DRIVER_START( yunit_a | |
| 1063 | 1096 | |
| 1064 | 1097 | /* basic machine hardware */ |
| 1065 | 1098 | MDRV_IMPORT_FROM(yunit_core) |
| 1066 | MDRV_IMPORT_FROM(williams_cvsd_sound) | |
| 1099 | MDRV_CPU_REPLACE("main", TMS34010, FAST_MASTER_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 1100 | MDRV_IMPORT_FROM(williams_adpcm_sound) | |
| 1067 | 1101 | |
| 1068 | 1102 | /* video hardware */ |
| 1069 | 1103 | MDRV_PALETTE_LENGTH(4096) |
| r1490 | r1491 | |
| 1071 | 1105 | MACHINE_DRIVER_END |
| 1072 | 1106 | |
| 1073 | 1107 | |
| 1074 | static MACHINE_DRIVER_START( yunit_adpcm_6bit_fast ) | |
| 1108 | static MACHINE_DRIVER_START( yunit_adpcm_6bit_faster ) | |
| 1075 | 1109 | |
| 1076 | 1110 | /* basic machine hardware */ |
| 1077 | 1111 | MDRV_IMPORT_FROM(yunit_core) |
| 1112 | MDRV_CPU_REPLACE("main", TMS34010, FASTER_MASTER_CLOCK/TMS34010_CLOCK_DIVIDER) | |
| 1078 | 1113 | MDRV_IMPORT_FROM(williams_adpcm_sound) |
| 1079 | 1114 | |
| 1080 | 1115 | /* video hardware */ |
| r1490 | r1491 | |
| 2168 | 2203 | GAME( 1990, smashtv6, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 6.00)", GAME_SUPPORTS_SAVE ) |
| 2169 | 2204 | GAME( 1990, smashtv5, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 5.00)", GAME_SUPPORTS_SAVE ) |
| 2170 | 2205 | GAME( 1990, smashtv4, smashtv, yunit_cvsd_6bit_slow, smashtv, smashtv, ROT0, "Williams", "Smash T.V. (rev 4.00)", GAME_SUPPORTS_SAVE ) |
| 2171 | GAME( 1990, hiimpact, 0, yunit_cvsd_6bit_fast, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA4 02/04/91)", GAME_SUPPORTS_SAVE ) | |
| 2172 | GAME( 1990, hiimpac3, hiimpact, yunit_cvsd_6bit_fast, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA3 12/27/90)", GAME_SUPPORTS_SAVE ) | |
| 2173 | GAME( 1990, hiimpacp, hiimpact, yunit_cvsd_6bit_fast, trog, hiimpact, ROT0, "Williams", "High Impact Football (prototype, rev 8.6 12/09/90)", GAME_SUPPORTS_SAVE ) | |
| 2174 | GAME( 1991, shimpact, 0, yunit_cvsd_6bit_fast, trog, shimpact, ROT0, "Midway", "Super High Impact (rev LA1 09/30/91)", GAME_SUPPORTS_SAVE ) | |
| 2175 | GAME( 1991, shimpacp, shimpact, yunit_cvsd_6bit_fast, trog, shimpact, ROT0, "Midway", "Super High Impact (prototype, rev 5.0 09/15/91)", GAME_SUPPORTS_SAVE ) | |
| 2176 | GAME( 1991, shimpap4, shimpact, yunit_cvsd_6bit_fast, trog, shimpact, ROT0, "Midway", "Super High Impact (prototype, rev 4.0 09/10/91)", GAME_SUPPORTS_SAVE ) /* See notes about factory restore above */ | |
| 2206 | GAME( 1990, hiimpact, 0, yunit_cvsd_6bit_slow, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA4 02/04/91)", GAME_SUPPORTS_SAVE ) | |
| 2207 | GAME( 1990, hiimpac3, hiimpact, yunit_cvsd_6bit_slow, trog, hiimpact, ROT0, "Williams", "High Impact Football (rev LA3 12/27/90)", GAME_SUPPORTS_SAVE ) | |
| 2208 | GAME( 1990, hiimpacp, hiimpact, yunit_cvsd_6bit_slow, trog, hiimpact, ROT0, "Williams", "High Impact Football (prototype, rev 8.6 12/09/90)", GAME_SUPPORTS_SAVE ) | |
| 2209 | GAME( 1991, shimpact, 0, yunit_cvsd_6bit_slow, trog, shimpact, ROT0, "Midway", "Super High Impact (rev LA1 09/30/91)", GAME_SUPPORTS_SAVE ) | |
| 2210 | GAME( 1991, shimpacp, shimpact, yunit_cvsd_6bit_slow, trog, shimpact, ROT0, "Midway", "Super High Impact (prototype, rev 5.0 09/15/91)", GAME_SUPPORTS_SAVE ) | |
| 2211 | GAME( 1991, shimpap4, shimpact, yunit_cvsd_6bit_slow, trog, shimpact, ROT0, "Midway", "Super High Impact (prototype, rev 4.0 09/10/91)", GAME_SUPPORTS_SAVE ) /* See notes about factory restore above */ | |
| 2177 | 2212 | |
| 2178 | GAME( 1991, term2, 0, yunit_adpcm_6bit_fast, term2, term2, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA3 03/27/92)", GAME_SUPPORTS_SAVE ) | |
| 2179 | GAME( 1991, term2la2, term2, yunit_adpcm_6bit_fast, term2, term2la2, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA2 12/09/91)", GAME_SUPPORTS_SAVE ) | |
| 2180 | GAME( 1991, term2la1, term2, yunit_adpcm_6bit_fast, term2, term2la1, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA1 11/01/91)", GAME_SUPPORTS_SAVE ) | |
| 2181 | GAME( 1992, mkprot9, mk, yunit_adpcm_6bit_fast, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (prototype, rev 9.0 07/28/92)", GAME_SUPPORTS_SAVE ) | |
| 2182 | GAME( 1992, mkla1, mk, yunit_adpcm_6bit_fast, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 1.0 08/09/92)", GAME_SUPPORTS_SAVE ) | |
| 2183 | GAME( 1992, mkla2, mk, yunit_adpcm_6bit_fast, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 2.0 08/18/92)", GAME_SUPPORTS_SAVE ) | |
| 2184 | GAME( 1992, mkla3, mk, yunit_adpcm_6bit_fast, mkla4, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 3.0 08/31/92)", GAME_SUPPORTS_SAVE ) | |
| 2185 | GAME( 1992, mkla4, mk, yunit_adpcm_6bit_fast, mkla4, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 4.0 09/28/92)", GAME_SUPPORTS_SAVE ) | |
| 2186 | GAME( 1992, mkyawdim, mk, mkyawdim, mkla4, mkyawdim, ROT0, "Midway", "Mortal Kombat (Yawdim bootleg)", GAME_SUPPORTS_SAVE ) | |
| 2187 | GAME( 1992, totcarn, 0, yunit_adpcm_6bit_fast, totcarn, totcarn, ROT0, "Midway", "Total Carnage (rev LA1 03/10/92)", GAME_SUPPORTS_SAVE ) | |
| 2188 | GAME( 1992, totcarnp, totcarn, yunit_adpcm_6bit_fast, totcarn, totcarn, ROT0, "Midway", "Total Carnage (prototype, rev 1.0 01/25/92)", GAME_SUPPORTS_SAVE ) | |
| 2213 | GAME( 1991, term2, 0, yunit_adpcm_6bit_faster, term2, term2, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA3 03/27/92)", GAME_SUPPORTS_SAVE ) | |
| 2214 | GAME( 1991, term2la2, term2, yunit_adpcm_6bit_faster, term2, term2la2, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA2 12/09/91)", GAME_SUPPORTS_SAVE ) | |
| 2215 | GAME( 1991, term2la1, term2, yunit_adpcm_6bit_faster, term2, term2la1, ORIENTATION_FLIP_X, "Midway", "Terminator 2 - Judgment Day (rev LA1 11/01/91)", GAME_SUPPORTS_SAVE ) | |
| 2216 | GAME( 1992, mkprot9, mk, yunit_adpcm_6bit_faster, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (prototype, rev 9.0 07/28/92)", GAME_SUPPORTS_SAVE ) | |
| 2217 | GAME( 1992, mkla1, mk, yunit_adpcm_6bit_fast, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 1.0 08/09/92)", GAME_SUPPORTS_SAVE ) | |
| 2218 | GAME( 1992, mkla2, mk, yunit_adpcm_6bit_fast, mkla2, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 2.0 08/18/92)", GAME_SUPPORTS_SAVE ) | |
| 2219 | GAME( 1992, mkla3, mk, yunit_adpcm_6bit_fast, mkla4, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 3.0 08/31/92)", GAME_SUPPORTS_SAVE ) | |
| 2220 | GAME( 1992, mkla4, mk, yunit_adpcm_6bit_fast, mkla4, mkyunit, ROT0, "Midway", "Mortal Kombat (rev 4.0 09/28/92)", GAME_SUPPORTS_SAVE ) | |
| 2221 | GAME( 1992, mkyawdim, mk, mkyawdim, mkla4, mkyawdim, ROT0, "Midway", "Mortal Kombat (Yawdim bootleg)", GAME_SUPPORTS_SAVE ) | |
| 2222 | GAME( 1992, totcarn, 0, yunit_adpcm_6bit_fast, totcarn, totcarn, ROT0, "Midway", "Total Carnage (rev LA1 03/10/92)", GAME_SUPPORTS_SAVE ) | |
| 2223 | GAME( 1992, totcarnp, totcarn, yunit_adpcm_6bit_fast, totcarn, totcarn, ROT0, "Midway", "Total Carnage (prototype, rev 1.0 01/25/92)", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 13 | 13 | Note: |
| 14 | 14 | P3 buttons 1 and 2 are mapped twice. THIS IS NOT A BUG! |
| 15 | 15 | |
| 16 | bp 548,a0==6c0007 && (d0&ffff)!=0,{print d0&ffff; g} | |
| 17 | ||
| 16 | 18 | **************************************************************************** |
| 17 | 19 | |
| 18 | 20 | Memory map (TBA) |
| r1490 | r1491 | |
| 27 | 29 | #include "sound/2413intf.h" |
| 28 | 30 | |
| 29 | 31 | |
| 32 | #define MASTER_CLOCK XTAL_14_31818MHz | |
| 33 | ||
| 34 | ||
| 30 | 35 | /************************************* |
| 31 | 36 | * |
| 32 | 37 | * Interrupt handling |
| r1490 | r1491 | |
| 126 | 131 | 0x1000 == CBANK (color bank -- is it ever set to non-zero?) |
| 127 | 132 | 0x0800 == LETAMODE0 (controls center and left trackballs) |
| 128 | 133 | 0x0400 == LETARES (reset LETA analog control reader) |
| 134 | 0x0200 == COINCTRL | |
| 135 | 0x0100 == COINCTRR | |
| 129 | 136 | |
| 130 | 137 | 0x0020 == PMIX0 (ADPCM mixer level) |
| 131 | 138 | 0x0010 == /PCMRES (ADPCM reset) |
| r1490 | r1491 | |
| 138 | 145 | { |
| 139 | 146 | if (data & 0x1000) |
| 140 | 147 | logerror("Color bank set to 1!\n"); |
| 148 | coin_counter_w(0, (data >> 9) & 1); | |
| 149 | coin_counter_w(1, (data >> 8) & 1); | |
| 141 | 150 | } |
| 142 | 151 | |
| 143 | 152 | /* lower byte being modified? */ |
| 144 | 153 | if (ACCESSING_LSB) |
| 145 | 154 | { |
| 155 | atarigen_set_oki6295_vol(Machine, (data & 0x0020) ? 100 : 0); | |
| 156 | if (!(data & 0x0010)) | |
| 157 | sndti_reset(SOUND_OKIM6295, 0); | |
| 146 | 158 | atarigen_set_ym2413_vol(Machine, ((data >> 1) & 7) * 100 / 7); |
| 147 | atarigen_set_oki6295_vol(Machine, (data & 0x0020) ? 100 : 0); | |
| 159 | if (!(data & 0x0001)) | |
| 160 | sndti_reset(SOUND_YM2413, 0); | |
| 148 | 161 | } |
| 149 | 162 | } |
| 150 | 163 | |
| r1490 | r1491 | |
| 156 | 169 | * |
| 157 | 170 | *************************************/ |
| 158 | 171 | |
| 159 | static ADDRESS_MAP_START( main_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 160 | AM_RANGE(0x000000, 0x0fffff) AM_READ(MRA16_ROM) | |
| 161 | AM_RANGE(0x140000, 0x147fff) AM_READ(MRA16_ROM) | |
| 162 | AM_RANGE(0x200000, 0x21ffff) AM_READ(MRA16_RAM) | |
| 163 | AM_RANGE(0x3c0000, 0x3c07ff) AM_READ(MRA16_RAM) | |
| 164 | AM_RANGE(0x3e0000, 0x3effff) AM_READ(MRA16_RAM) | |
| 165 | AM_RANGE(0x460000, 0x460001) AM_READ(adpcm_r) | |
| 166 | AM_RANGE(0x500000, 0x500fff) AM_READ(atarigen_eeprom_r) | |
| 167 | AM_RANGE(0x640000, 0x640001) AM_READ(input_port_0_word_r) | |
| 168 | AM_RANGE(0x640002, 0x640003) AM_READ(input_port_1_word_r) | |
| 169 | AM_RANGE(0x6c0000, 0x6c0001) AM_READ(input_port_2_word_r) | |
| 170 | AM_RANGE(0x6c0002, 0x6c0003) AM_READ(input_port_3_word_r) | |
| 171 | AM_RANGE(0x6c0004, 0x6c0005) AM_READ(input_port_4_word_r) | |
| 172 | AM_RANGE(0x6c0006, 0x6c0007) AM_READ(input_port_5_word_r) | |
| 172 | /* full memory map deduced from schematics and GALs */ | |
| 173 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 174 | ADDRESS_MAP_FLAGS( AMEF_ABITS(23) ) | |
| 175 | AM_RANGE(0x000000, 0x0fffff) AM_ROM | |
| 176 | AM_RANGE(0x140000, 0x147fff) AM_MIRROR(0x438000) AM_ROM | |
| 177 | AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_BASE(&rampart_bitmap) | |
| 178 | AM_RANGE(0x220000, 0x3bffff) AM_WRITENOP /* the code blasts right through this when initializing */ | |
| 179 | AM_RANGE(0x3c0000, 0x3c07ff) AM_MIRROR(0x019800) AM_READWRITE(MRA16_RAM, atarigen_expanded_666_paletteram_w) AM_BASE(&paletteram16) | |
| 180 | AM_RANGE(0x3e0000, 0x3e07ff) AM_MIRROR(0x010000) AM_READWRITE(MRA16_RAM, atarimo_0_spriteram_w) AM_BASE(&atarimo_0_spriteram) | |
| 181 | AM_RANGE(0x3e0800, 0x3e3f3f) AM_MIRROR(0x010000) AM_RAM | |
| 182 | AM_RANGE(0x3e3f40, 0x3e3f7f) AM_MIRROR(0x010000) AM_READWRITE(MRA16_RAM, atarimo_0_slipram_w) AM_BASE(&atarimo_0_slipram) | |
| 183 | AM_RANGE(0x3e3f80, 0x3effff) AM_MIRROR(0x010000) AM_RAM | |
| 184 | AM_RANGE(0x460000, 0x460001) AM_MIRROR(0x019ffe) AM_READWRITE(adpcm_r, adpcm_w) | |
| 185 | AM_RANGE(0x480000, 0x480003) AM_MIRROR(0x019ffc) AM_WRITE(ym2413_w) | |
| 186 | AM_RANGE(0x500000, 0x500fff) AM_MIRROR(0x019000) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_BASE(&atarigen_eeprom) AM_SIZE(&atarigen_eeprom_size) | |
| 187 | AM_RANGE(0x5a6000, 0x5a6001) AM_MIRROR(0x019ffe) AM_WRITE(atarigen_eeprom_enable_w) | |
| 188 | AM_RANGE(0x640000, 0x640001) AM_MIRROR(0x019ffe) AM_WRITE(latch_w) | |
| 189 | AM_RANGE(0x640000, 0x640001) AM_MIRROR(0x019ffc) AM_READ(input_port_0_word_r) | |
| 190 | AM_RANGE(0x640002, 0x640003) AM_MIRROR(0x019ffc) AM_READ(input_port_1_word_r) | |
| 191 | AM_RANGE(0x6c0000, 0x6c0001) AM_MIRROR(0x019ff8) AM_READ(input_port_2_word_r) | |
| 192 | AM_RANGE(0x6c0002, 0x6c0003) AM_MIRROR(0x019ff8) AM_READ(input_port_3_word_r) | |
| 193 | AM_RANGE(0x6c0004, 0x6c0005) AM_MIRROR(0x019ff8) AM_READ(input_port_4_word_r) | |
| 194 | AM_RANGE(0x6c0006, 0x6c0007) AM_MIRROR(0x019ff8) AM_READ(input_port_5_word_r) | |
| 195 | AM_RANGE(0x726000, 0x726001) AM_MIRROR(0x019ffe) AM_WRITE(watchdog_reset16_w) | |
| 196 | AM_RANGE(0x7e6000, 0x7e6001) AM_MIRROR(0x019ffe) AM_WRITE(atarigen_scanline_int_ack_w) | |
| 173 | 197 | ADDRESS_MAP_END |
| 174 | 198 | |
| 175 | 199 | |
| 176 | static ADDRESS_MAP_START( main_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 177 | AM_RANGE(0x000000, 0x0fffff) AM_WRITE(MWA16_ROM) | |
| 178 | AM_RANGE(0x140000, 0x147fff) AM_WRITE(MWA16_ROM) | |
| 179 | AM_RANGE(0x200000, 0x21ffff) AM_WRITE(rampart_bitmap_w) AM_BASE(&rampart_bitmap) | |
| 180 | AM_RANGE(0x220000, 0x3bffff) AM_WRITE(MWA16_NOP) /* the code blasts right through this when initializing */ | |
| 181 | AM_RANGE(0x3c0000, 0x3c07ff) AM_WRITE(atarigen_expanded_666_paletteram_w) AM_BASE(&paletteram16) | |
| 182 | AM_RANGE(0x3c0800, 0x3dffff) AM_WRITE(MWA16_NOP) /* the code blasts right through this when initializing */ | |
| 183 | AM_RANGE(0x3e0000, 0x3e07ff) AM_WRITE(atarimo_0_spriteram_w) AM_BASE(&atarimo_0_spriteram) | |
| 184 | AM_RANGE(0x3e0800, 0x3e3f3f) AM_WRITE(MWA16_RAM) | |
| 185 | AM_RANGE(0x3e3f40, 0x3e3f7f) AM_WRITE(atarimo_0_slipram_w) AM_BASE(&atarimo_0_slipram) | |
| 186 | AM_RANGE(0x3e3f80, 0x3effff) AM_WRITE(MWA16_RAM) | |
| 187 | AM_RANGE(0x460000, 0x460001) AM_WRITE(adpcm_w) | |
| 188 | AM_RANGE(0x480000, 0x480003) AM_WRITE(ym2413_w) | |
| 189 | AM_RANGE(0x500000, 0x500fff) AM_WRITE(atarigen_eeprom_w) AM_BASE(&atarigen_eeprom) AM_SIZE(&atarigen_eeprom_size) | |
| 190 | AM_RANGE(0x5a0000, 0x5affff) AM_WRITE(atarigen_eeprom_enable_w) | |
| 191 | AM_RANGE(0x640000, 0x640001) AM_WRITE(latch_w) | |
| 192 | AM_RANGE(0x720000, 0x72ffff) AM_WRITE(watchdog_reset16_w) | |
| 193 | AM_RANGE(0x7e0000, 0x7effff) AM_WRITE(atarigen_scanline_int_ack_w) | |
| 194 | ADDRESS_MAP_END | |
| 195 | 200 | |
| 196 | ||
| 197 | ||
| 198 | 201 | /************************************* |
| 199 | 202 | * |
| 200 | 203 | * Port definitions |
| r1490 | r1491 | |
| 203 | 206 | |
| 204 | 207 | static INPUT_PORTS_START( rampart ) |
| 205 | 208 | PORT_START |
| 206 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON | |
| 209 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) // alternate button1 | |
| 207 | 210 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 208 | 211 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 209 | 212 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1490 | r1491 | |
| 221 | 224 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 222 | 225 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 223 | 226 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 224 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON | |
| 227 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) // alternate button2 | |
| 225 | 228 | PORT_SERVICE( 0x0800, IP_ACTIVE_LOW ) |
| 226 | 229 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 227 | 230 | |
| r1490 | r1491 | |
| 245 | 248 | |
| 246 | 249 | static INPUT_PORTS_START( ramprt2p ) |
| 247 | 250 | PORT_START |
| 248 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON | |
| 251 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) // alternate button1 | |
| 249 | 252 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 250 | 253 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Players ) ) |
| 251 | 254 | PORT_DIPSETTING( 0x0000, "2") |
| r1490 | r1491 | |
| 265 | 268 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 266 | 269 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 267 | 270 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 268 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON | |
| 271 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) // alternate button2 | |
| 269 | 272 | PORT_SERVICE( 0x0800, IP_ACTIVE_LOW ) |
| 270 | 273 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 271 | 274 | |
| r1490 | r1491 | |
| 379 | 382 | static MACHINE_DRIVER_START( rampart ) |
| 380 | 383 | |
| 381 | 384 | /* basic machine hardware */ |
| 382 | MDRV_CPU_ADD(M68000, ATARI_CLOCK_14MHz/2) | |
| 383 | MDRV_CPU_PROGRAM_MAP(main_readmem,main_writemem) | |
| 385 | MDRV_CPU_ADD(M68000, MASTER_CLOCK/2) | |
| 386 | MDRV_CPU_PROGRAM_MAP(main_map, 0) | |
| 384 | 387 | MDRV_CPU_VBLANK_INT(atarigen_video_int_gen,1) |
| 385 | 388 | |
| 386 | 389 | MDRV_MACHINE_RESET(rampart) |
| 387 | 390 | MDRV_NVRAM_HANDLER(atarigen) |
| 391 | MDRV_WATCHDOG_VBLANK_INIT(8) | |
| 388 | 392 | |
| 389 | 393 | /* video hardware */ |
| 390 | 394 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) |
| r1490 | r1491 | |
| 395 | 399 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 396 | 400 | /* note: these parameters are from published specs, not derived */ |
| 397 | 401 | /* the board uses an SOS-2 chip to generate video signals */ |
| 398 | MDRV_SCREEN_RAW_PARAMS(AT | |
| 402 | MDRV_SCREEN_RAW_PARAMS(MASTER | |
| 399 | 403 | |
| 400 | 404 | MDRV_VIDEO_START(rampart) |
| 401 | 405 | MDRV_VIDEO_UPDATE(rampart) |
| r1490 | r1491 | |
| 403 | 407 | /* sound hardware */ |
| 404 | 408 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 405 | 409 | |
| 406 | MDRV_SOUND_ADD(OKIM6295, AT | |
| 410 | MDRV_SOUND_ADD(OKIM6295, MASTER | |
| 407 | 411 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7low) |
| 408 | 412 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 409 | 413 | |
| 410 | MDRV_SOUND_ADD(YM2413, AT | |
| 414 | MDRV_SOUND_ADD(YM2413, MASTER | |
| 411 | 415 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 412 | 416 | MACHINE_DRIVER_END |
| 413 | 417 | |
| r1490 | r1491 | |
| 531 | 535 | |
| 532 | 536 | atarigen_eeprom_default = compressed_default_eeprom; |
| 533 | 537 | memcpy(&memory_region(REGION_CPU1)[0x140000], &memory_region(REGION_CPU1)[0x40000], 0x8000); |
| 534 | atarigen_slapstic_init(0, 0x140000, 118); | |
| 538 | atarigen_slapstic_init(0, 0x140000, 0x438000, 118); | |
| 535 | 539 | } |
| 536 | 540 | |
| 537 | 541 | |
| r1490 | r1491 | |
| 542 | 546 | * |
| 543 | 547 | *************************************/ |
| 544 | 548 | |
| 545 | GAME( 1990, rampart, 0, rampart, rampart, rampart, ROT0, "Atari Games", "Rampart (Trackball)", 0 ) | |
| 546 | GAME( 1990, ramprt2p, rampart, rampart, ramprt2p, rampart, ROT0, "Atari Games", "Rampart (Joystick)", 0 ) | |
| 547 | GAME( 1990, rampartj, rampart, rampart, rampartj, rampart, ROT0, "Atari Games", "Rampart (Japan, Joystick)", 0 ) | |
| 549 | GAME( 1990, rampart, 0, rampart, rampart, rampart, ROT0, "Atari Games", "Rampart (Trackball)", GAME_SUPPORTS_SAVE ) | |
| 550 | GAME( 1990, ramprt2p, rampart, rampart, ramprt2p, rampart, ROT0, "Atari Games", "Rampart (Joystick)", GAME_SUPPORTS_SAVE ) | |
| 551 | GAME( 1990, rampartj, rampart, rampart, rampartj, rampart, ROT0, "Atari Games", "Rampart (Japan, Joystick)", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 767 | 767 | { 0,1,2,3,4,5,6,7 }, |
| 768 | 768 | /* y offsets */ |
| 769 | 769 | { 0*8,1*8,2*8,3*8, |
| 770 | 4*8,5*8,6*8,7*8, | |
| 771 | 0*8,1*8,2*8,3*8, | |
| 772 | 770 | 4*8,5*8,6*8,7*8 }, |
| 773 | 771 | 8*8 /* every char takes 8 bytes */ |
| 774 | 772 | }; |
| r1490 | r1491 | |
|---|---|---|
| 173 | 173 | #define UART_LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 174 | 174 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 175 | 175 | |
| 176 | #define MASTER_CLOCK (XTAL_8MHz) | |
| 177 | ||
| 176 | 178 | // local prototypes /////////////////////////////////////////////////////// |
| 177 | 179 | |
| 178 | 180 | static int get_scorpion2_uart_status(void); // retrieve status of uart on scorpion2 board |
| r1490 | r1491 | |
| 516 | 518 | irq_timer_stat = 0x01; |
| 517 | 519 | irq_status = 0x02; |
| 518 | 520 | |
| 519 | cpunum_set_input_line(0, M6809_IRQ_LINE, | |
| 521 | cpunum_set_input_line(0, M6809_IRQ_LINE, PULSE_LINE ); | |
| 520 | 522 | } |
| 521 | 523 | } |
| 522 | 524 | |
| r1490 | r1491 | |
| 678 | 680 | } |
| 679 | 681 | } |
| 680 | 682 | |
| 681 | if ( data & 0x1F ) cpunum_set_input_line(0, M6809_FIRQ_LINE, | |
| 683 | if ( data & 0x1F ) cpunum_set_input_line(0, M6809_FIRQ_LINE, A | |
| 682 | 684 | } |
| 683 | 685 | |
| 684 | 686 | /////////////////////////////////////////////////////////////////////////// |
| r1490 | r1491 | |
| 790 | 792 | |
| 791 | 793 | upd7759_port_w(0, data&0x3F); // setup sample |
| 792 | 794 | upd7759_start_w(0, 0); |
| 793 | upd7759_start_w(0, 1); | |
| 795 | upd7759_start_w(0, 1); | |
| 794 | 796 | } |
| 795 | 797 | |
| 796 | 798 | /////////////////////////////////////////////////////////////////////////// |
| r1490 | r1491 | |
| 1480 | 1482 | return e2data_pin; |
| 1481 | 1483 | } |
| 1482 | 1484 | |
| 1483 | ||
| 1484 | 1485 | static const UINT16 AddressDecode[]= |
| 1485 | 1486 | { |
| 1486 | 1487 | 0x0800,0x1000,0x0001,0x0004,0x0008,0x0020,0x0080,0x0200, |
| r1490 | r1491 | |
| 3032 | 3033 | |
| 3033 | 3034 | INPUT_PORTS_END |
| 3034 | 3035 | |
| 3035 | static const struct upd7759_interface upd7759_interface = | |
| 3036 | { | |
| 3036 | static const struct upd7759_interface upd7759_interface = | |
| 3037 | { | |
| 3037 | 3038 | REGION_SOUND1, /* memory region */ |
| 3038 | 3039 | 0 |
| 3039 | ||
| 3040 | ||
| 3040 | 3041 | |
| 3041 | 3042 | /////////////////////////////////////////////////////////////////////////// |
| 3042 | 3043 | // machine driver for scorpion2 board + adder2 expansion ////////////////// |
| r1490 | r1491 | |
| 3045 | 3046 | static MACHINE_DRIVER_START( scorpion2_vid ) |
| 3046 | 3047 | MDRV_MACHINE_RESET( init ) // main scorpion2 board initialisation |
| 3047 | 3048 | MDRV_INTERLEAVE(16) // needed for serial communication !! |
| 3048 | MDRV_CPU_ADD_TAG("main", M6809, | |
| 3049 | MDRV_CPU_ADD_TAG("main", M6809, MASTER_CLOCK/4 ) | |
| 3049 | 3050 | MDRV_CPU_PROGRAM_MAP(memmap_vid,0) // setup scorpion2 board memorymap |
| 3050 | 3051 | MDRV_CPU_PERIODIC_INT(timer_irq, 1000) // generate 1000 IRQ's per second |
| 3051 | 3052 | |
| r1490 | r1491 | |
| 3068 | 3069 | MDRV_PALETTE_INIT(adder2) |
| 3069 | 3070 | MDRV_GFXDECODE(adder2) |
| 3070 | 3071 | |
| 3071 | MDRV_CPU_ADD_TAG("adder2", M6809, | |
| 3072 | MDRV_CPU_ADD_TAG("adder2", M6809, MASTER_CLOCK/4 ) | |
| 3072 | 3073 | MDRV_CPU_PROGRAM_MAP(adder2_memmap,0) // setup adder2 board memorymap |
| 3073 | 3074 | MDRV_CPU_VBLANK_INT(adder2_vbl, 1) // board has a VBL IRQ |
| 3074 | 3075 | |
| r1490 | r1491 | |
| 3077 | 3078 | MDRV_SOUND_CONFIG(upd7759_interface) |
| 3078 | 3079 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 3079 | 3080 | |
| 3080 | MDRV_SOUND_ADD(YM2413, 3579545) | |
| 3081 | MDRV_SOUND_ADD(YM2413, XTAL_3_579545MHz) | |
| 3081 | 3082 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3082 | 3083 | MACHINE_DRIVER_END |
| 3083 | 3084 |
| r1490 | r1491 | |
|---|---|---|
| 28 | 28 | P0-136A ; KL (Namco) 1997 Kosodate Quiz My Angel 2 Namco |
| 29 | 29 | P0-142A 1999 Puzzle De Bowling Nihon System / Moss |
| 30 | 30 | P0-142A + extra parts 2000 Penguin Brothers Subsino |
| 31 | B0-003B 2000 Deer Hunting USA Sammy | |
| 32 | B0-003B 2001 Turkey Hunting USA Sammy | |
| 31 | B0-003A (or B0-003B) 2000 Deer Hunting USA Sammy | |
| 32 | B0-003A (or B0-003B) 2001 Turkey Hunting USA Sammy | |
| 33 | 33 | B0-010A 2001 Wing Shooting Championship Sammy |
| 34 | 34 | B0-010A 2002 Trophy Hunting - Bear & Moose Sammy |
| 35 | 35 | ------------------------------------------------------------------------------------------- |
| r1490 | r1491 | |
| 181 | 181 | |
| 182 | 182 | Sammy USA Outdoor Shooting Series PCB |
| 183 | 183 | |
| 184 | PCB B0-003B: | |
| 184 | PCB B0-003A (or B0-003B): | |
| 185 | 185 | Deer Hunting USA (c) 2000 Sammy USA |
| 186 | 186 | Turkey Hunting USA (c) 2001 Sammy USA |
| 187 | 187 | |
| r1490 | r1491 | |
| 197 | 197 | EEPROM: 93LC46BX (1K Low-power 64 x 16-bit organization serial EEPROM) |
| 198 | 198 | OSC: 50MHz & 28MHz |
| 199 | 199 | Other: 8 Position Dipswitch x 2 |
| 200 | Lattice ispLSI2032 | |
| 201 | Lattice isp1016E (2 for PCB B0-010A, used for light gun input) | |
| 200 | Lattice ispLSI2032 - stamped "KW001" | |
| 201 | Lattice isp1016E - stamped "GUN" (2 for PCB B0-010A, used for light gun input) | |
| 202 | 202 | BAT1 - CR2032 3Volt |
| 203 | 203 | |
| 204 | PCB Number: B0-003B | |
| 204 | PCB Number: B0-003A (or B0-003B) | |
| 205 | 205 | +-----------------------------------------------------------+ |
| 206 | 206 | | VOL +------+ | |
| 207 | 207 | | |X1-010| M1 | |
| r1490 | r1491 | |
| 2082 | 2082 | ROM_LOAD16_BYTE( "asx907e01.u07", 0x000001, 0x100000, CRC(7c67b502) SHA1(6a0e8883a115dac4095d86897e7eca2a007a1c71) ) |
| 2083 | 2083 | |
| 2084 | 2084 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ |
| 2085 | ROM_LOAD( "asx901m01.u38", 0x0000000, 0x800000, BAD_DUMP CRC(23125c93) SHA1(c8735ac43bc67c52cb78ad5bca74fa2082dda040) ) | |
| 2086 | ROM_LOAD( "asx902m01.u39", 0x0800000, 0x800000, BAD_DUMP CRC(6e7330dd) SHA1(4a8590e9b8fe4767f7a25760bfe499792948a7ae) ) | |
| 2087 | ROM_LOAD( "asx903m01.u40", 0x1000000, 0x800000, BAD_DUMP CRC(5f86c322) SHA1(5a72adb99eea176199f172384cb051e2b045ab94) ) | |
| 2088 | ROM_LOAD( "asx904m01.u41", 0x1800000, 0x800000, BAD_DUMP CRC(6177f644) SHA1(120fe32518d133f03176db68f18c8175c1a81b27) ) | |
| 2085 | ROM_LOAD( "asx901m01.u38", 0x0000000, 0x800000, CRC(eabd3f44) SHA1(5a1ac986d11a8b019e18761cf4ea0a6f49fbdbfc) ) | |
| 2086 | ROM_LOAD( "asx902m01.u39", 0x0800000, 0x800000, CRC(c32130c8) SHA1(70d56ebed1f51657aaee02f95ac51589733e6eb7) ) | |
| 2087 | ROM_LOAD( "asx903m01.u40", 0x1000000, 0x800000, CRC(5f86c322) SHA1(5a72adb99eea176199f172384cb051e2b045ab94) ) | |
| 2088 | ROM_LOAD( "asx904m01.u41", 0x1800000, 0x800000, CRC(c77e0b66) SHA1(0eba30e62e4bd38c198fa6cb69fb94d002ded77a) ) | |
| 2089 | 2089 | |
| 2090 | 2090 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ |
| 2091 | 2091 | /* Leave 1MB empty (addressable by the chip) */ |
| r1490 | r1491 | |
|---|---|---|
| 4679 | 4679 | GAME( 1997, psarc95, 0, coh1002e, zn, coh1002e, ROT0, "Sony/Eighting/Raizing", "PS Arcade 95", GAME_IS_BIOS_ROOT ) |
| 4680 | 4680 | |
| 4681 | 4681 | GAME( 1997, beastrzr, psarc95, coh1002e, zn, coh1002e, ROT0, "Eighting/Raizing", "Beastorizer (USA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4682 | GAME( 1997, beastrzb, psarc95, coh1002e, zn, coh1002e, ROT0, "Eighting/Raizing", "Beastorizer (USA Bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 4682 | GAME( 1997, beastrzb, psarc95, coh1002e, zn, coh1002e, ROT0, "Eighting/Raizing", "Beastorizer (USA Bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 4683 | 4683 | GAME( 1998, bldyror2, psarc95, coh1002e, zn, coh1002e, ROT0, "Eighting/Raizing", "Bloody Roar 2 (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4684 | 4684 | GAME( 2000, brvblade, tps, coh1002e, zn, coh1002e, ROT270, "Eighting/Raizing", "Brave Blade (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4685 | 4685 |
| r1490 | r1491 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | Known issues: |
| 26 | 26 | * volume controls don't work in the Golden Tee games |
| 27 | * Driver's Edge accesses many uninitialized RAM locations; | |
| 28 | requires hack to make steering in attract mode work | |
| 27 | 29 | |
| 28 | 30 | **************************************************************************** |
| 29 | 31 | |
| r1490 | r1491 | |
| 218 | 220 | #include "machine/timekpr.h" |
| 219 | 221 | |
| 220 | 222 | |
| 221 | #define FULL_LOGGING 0 | |
| 223 | #define FULL_LOGGING 0 | |
| 224 | #define LOG_DRIVEDGE_UNINIT_RAM 0 | |
| 222 | 225 | |
| 223 | #define CLOCK_8MHz (8000000) | |
| 224 | #define CLOCK_12MHz (12000000) | |
| 225 | #define CLOCK_25MHz (25000000) | |
| 226 | 226 | |
| 227 | 227 | |
| 228 | ||
| 229 | 228 | /************************************* |
| 230 | 229 | * |
| 231 | 230 | * Static data |
| r1490 | r1491 | |
| 709 | 708 | if (offset == 0) COMBINE_DATA(tms1_boot); |
| 710 | 709 | if (offset == 0x382 && tms_spinning[0]) STOP_TMS_SPINNING(0); |
| 711 | 710 | if (!tms_spinning[0]) |
| 712 | cpu_boost_interleave(ATTOTIME_IN_HZ(CLOCK | |
| 711 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK | |
| 713 | 712 | } |
| 714 | 713 | |
| 715 | 714 | |
| r1490 | r1491 | |
| 718 | 717 | COMBINE_DATA(&tms2_ram[offset]); |
| 719 | 718 | if (offset == 0x382 && tms_spinning[1]) STOP_TMS_SPINNING(1); |
| 720 | 719 | if (!tms_spinning[1]) |
| 721 | cpu_boost_interleave(ATTOTIME_IN_HZ(CLOCK | |
| 720 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK | |
| 722 | 721 | } |
| 723 | 722 | |
| 724 | 723 | |
| 725 | 724 | static WRITE32_HANDLER( tms1_trigger_w ) |
| 726 | 725 | { |
| 727 | 726 | COMBINE_DATA(&tms1_ram[offset]); |
| 728 | cpu_boost_interleave(ATTOTIME_IN_HZ(CLOCK | |
| 727 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK | |
| 729 | 728 | } |
| 730 | 729 | |
| 731 | 730 | |
| 732 | 731 | static WRITE32_HANDLER( tms2_trigger_w ) |
| 733 | 732 | { |
| 734 | 733 | COMBINE_DATA(&tms2_ram[offset]); |
| 735 | cpu_boost_interleave(ATTOTIME_IN_HZ(CLOCK | |
| 734 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK | |
| 736 | 735 | } |
| 737 | 736 | |
| 738 | 737 | |
| r1490 | r1491 | |
| 804 | 803 | else if (file) |
| 805 | 804 | mame_fread(file, main_ram, main_ram_size); |
| 806 | 805 | else |
| 806 | { | |
| 807 | 807 | for (i = 0x80; i < main_ram_size; i++) |
| 808 | 808 | ((UINT8 *)main_ram)[i] = mame_rand(Machine); |
| 809 | ||
| 810 | /* due to accessing uninitialized RAM, we need this hack */ | |
| 811 | if (is_drivedge) | |
| 812 | ((UINT32 *)main_ram)[0x2ce4/4] = 0x0000001e; | |
| 813 | } | |
| 809 | 814 | } |
| 810 | 815 | |
| 811 | 816 | |
| r1490 | r1491 | |
| 818 | 823 | else if (file) |
| 819 | 824 | mame_fread(file, nvram, nvram_size); |
| 820 | 825 | else |
| 826 | { | |
| 821 | 827 | for (i = 0; i < nvram_size; i++) |
| 822 | 828 | ((UINT8 *)nvram)[i] = mame_rand(Machine); |
| 829 | } | |
| 823 | 830 | } |
| 824 | 831 | |
| 832 | ||
| 825 | 833 | static NVRAM_HANDLER( tournament ) |
| 826 | 834 | { |
| 827 | 835 | nvram_handler_itech020( machine, file, read_or_write ); |
| 828 | 836 | nvram_handler_timekeeper_0( machine, file, read_or_write ); |
| 829 | 837 | } |
| 830 | 838 | |
| 839 | ||
| 840 | ||
| 831 | 841 | /************************************* |
| 832 | 842 | * |
| 833 | 843 | * Main CPU memory handlers |
| r1490 | r1491 | |
| 873 | 883 | |
| 874 | 884 | |
| 875 | 885 | /*------ Driver's Edge memory layouts ------*/ |
| 886 | ||
| 887 | #if LOG_DRIVEDGE_UNINIT_RAM | |
| 888 | static UINT8 written[0x8000]; | |
| 889 | ||
| 890 | static READ32_HANDLER( test1_r ) | |
| 891 | { | |
| 892 | if (!(mem_mask & 0xff000000) && !written[0x100 + offset*4+0]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0x100 + offset*4+0); | |
| 893 | if (!(mem_mask & 0x00ff0000) && !written[0x100 + offset*4+1]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0x100 + offset*4+1); | |
| 894 | if (!(mem_mask & 0x0000ff00) && !written[0x100 + offset*4+2]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0x100 + offset*4+2); | |
| 895 | if (!(mem_mask & 0x000000ff) && !written[0x100 + offset*4+3]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0x100 + offset*4+3); | |
| 896 | return ((UINT32 *)main_ram)[0x100/4 + offset]; | |
| 897 | } | |
| 898 | ||
| 899 | static WRITE32_HANDLER( test1_w ) | |
| 900 | { | |
| 901 | if (!(mem_mask & 0xff000000)) written[0x100 + offset*4+0] = 1; | |
| 902 | if (!(mem_mask & 0x00ff0000)) written[0x100 + offset*4+1] = 1; | |
| 903 | if (!(mem_mask & 0x0000ff00)) written[0x100 + offset*4+2] = 1; | |
| 904 | if (!(mem_mask & 0x000000ff)) written[0x100 + offset*4+3] = 1; | |
| 905 | COMBINE_DATA(&((UINT32 *)main_ram)[0x100/4 + offset]); | |
| 906 | } | |
| 907 | ||
| 908 | static READ32_HANDLER( test2_r ) | |
| 909 | { | |
| 910 | if (!(mem_mask & 0xff000000) && !written[0xc00 + offset*4+0]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0xc00 + offset*4+0); | |
| 911 | if (!(mem_mask & 0x00ff0000) && !written[0xc00 + offset*4+1]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0xc00 + offset*4+1); | |
| 912 | if (!(mem_mask & 0x0000ff00) && !written[0xc00 + offset*4+2]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0xc00 + offset*4+2); | |
| 913 | if (!(mem_mask & 0x000000ff) && !written[0xc00 + offset*4+3]) logerror("%06X:read from uninitialized memory %04X\n", activecpu_get_pc(), 0xc00 + offset*4+3); | |
| 914 | return ((UINT32 *)main_ram)[0xc00/4 + offset]; | |
| 915 | } | |
| 916 | ||
| 917 | static WRITE32_HANDLER( test2_w ) | |
| 918 | { | |
| 919 | if (!(mem_mask & 0xff000000)) written[0xc00 + offset*4+0] = 1; | |
| 920 | if (!(mem_mask & 0x00ff0000)) written[0xc00 + offset*4+1] = 1; | |
| 921 | if (!(mem_mask & 0x0000ff00)) written[0xc00 + offset*4+2] = 1; | |
| 922 | if (!(mem_mask & 0x000000ff)) written[0xc00 + offset*4+3] = 1; | |
| 923 | COMBINE_DATA(&((UINT32 *)main_ram)[0xc00/4 + offset]); | |
| 924 | } | |
| 925 | #endif | |
| 926 | ||
| 876 | 927 | static ADDRESS_MAP_START( drivedge_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 928 | #if LOG_DRIVEDGE_UNINIT_RAM | |
| 929 | AM_RANGE(0x000100, 0x0003ff) AM_MIRROR(0x40000) AM_READWRITE(test1_r, test1_w) | |
| 930 | AM_RANGE(0x000c00, 0x007fff) AM_MIRROR(0x40000) AM_READWRITE(test2_r, test2_w) | |
| 931 | #endif | |
| 877 | 932 | AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x40000) AM_RAM AM_BASE((UINT32 **)&main_ram) AM_SIZE(&main_ram_size) |
| 878 | 933 | AM_RANGE(0x080000, 0x080003) AM_READ(input_port_3_msw_r) |
| 879 | 934 | AM_RANGE(0x082000, 0x082003) AM_READ(input_port_4_msw_r) |
| r1490 | r1491 | |
| 1147 | 1202 | |
| 1148 | 1203 | static INPUT_PORTS_START( drivedge ) |
| 1149 | 1204 | PORT_START /* 8C000 */ |
| 1150 | PORT_BIT ( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1151 | PORT_BIT ( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1205 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1206 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1152 | 1207 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_PLAYER(1) |
| 1153 | 1208 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_PLAYER(1) |
| 1154 | 1209 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_PLAYER(1) |
| 1155 | 1210 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_PLAYER(1) |
| 1156 | 1211 | PORT_SERVICE_NO_TOGGLE( 0x0040, IP_ACTIVE_LOW ) |
| 1157 | PORT_BIT | |
| 1212 | PORT_BIT | |
| 1158 | 1213 | |
| 1159 | 1214 | PORT_START /* 8E000 */ |
| 1160 | 1215 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Fan") PORT_CODE(KEYCODE_F) PORT_PLAYER(1) |
| r1490 | r1491 | |
| 1163 | 1218 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Turbo Boost") PORT_CODE(KEYCODE_B) PORT_PLAYER(1) |
| 1164 | 1219 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Network On") PORT_CODE(KEYCODE_N) PORT_PLAYER(1) |
| 1165 | 1220 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key") |
| 1166 | PORT_BIT ( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1167 | PORT_BIT ( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1221 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1222 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1168 | 1223 | |
| 1169 | 1224 | PORT_START /* 200000 */ |
| 1170 | 1225 | PORT_SERVICE_NO_TOGGLE( 0x0100, IP_ACTIVE_LOW ) |
| r1490 | r1491 | |
| 1503 | 1558 | static MACHINE_DRIVER_START( timekill ) |
| 1504 | 1559 | |
| 1505 | 1560 | /* basic machine hardware */ |
| 1506 | MDRV_CPU_ADD_TAG("main", M68000, CLOCK | |
| 1561 | MDRV_CPU_ADD_TAG("main", M68000, CPU_CLOCK | |
| 1507 | 1562 | MDRV_CPU_PROGRAM_MAP(timekill_map,0) |
| 1508 | 1563 | MDRV_CPU_VBLANK_INT(generate_int1,1) |
| 1509 | 1564 | |
| 1510 | MDRV_CPU_ADD_TAG("sound", M6809, CLOCK | |
| 1565 | MDRV_CPU_ADD_TAG("sound", M6809, SOUND_CLOCK | |
| 1511 | 1566 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 1512 | 1567 | |
| 1513 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1514 | ||
| 1515 | 1568 | MDRV_MACHINE_RESET(itech32) |
| 1516 | 1569 | MDRV_NVRAM_HANDLER(itech32) |
| 1517 | 1570 | |
| 1518 | 1571 | /* video hardware */ |
| 1519 | 1572 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK) |
| 1520 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1521 | MDRV_SCREEN_SIZE(384,256) | |
| 1522 | MDRV_SCREEN_VISIBLE_AREA(0, 199, 0, 199) /* bogus size, game will set it later */ | |
| 1523 | 1573 | MDRV_PALETTE_LENGTH(8192) |
| 1524 | 1574 | |
| 1575 | MDRV_SCREEN_ADD("main", 0) | |
| 1576 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 508, 0, 384, 262, 0, 256) | |
| 1577 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1578 | ||
| 1525 | 1579 | MDRV_VIDEO_START(itech32) |
| 1526 | 1580 | MDRV_VIDEO_UPDATE(itech32) |
| 1527 | 1581 | |
| 1528 | 1582 | /* sound hardware */ |
| 1529 | 1583 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1530 | 1584 | |
| 1531 | MDRV_SOUND_ADD(ES5506, | |
| 1585 | MDRV_SOUND_ADD(ES5506, SOUND_CLOCK) | |
| 1532 | 1586 | MDRV_SOUND_CONFIG(es5506_interface) |
| 1533 | 1587 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1534 | 1588 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
| 1552 | 1606 | /* basic machine hardware */ |
| 1553 | 1607 | MDRV_IMPORT_FROM(bloodstm) |
| 1554 | 1608 | |
| 1555 | MDRV_CPU_REPLACE("main", M68EC020, CLOCK | |
| 1609 | MDRV_CPU_REPLACE("main", M68EC020, CPU020_CLOCK | |
| 1556 | 1610 | MDRV_CPU_PROGRAM_MAP(drivedge_map,0) |
| 1557 | 1611 | MDRV_CPU_VBLANK_INT(NULL,0) |
| 1558 | 1612 | |
| 1559 | MDRV_CPU_ADD(TMS32031, | |
| 1613 | MDRV_CPU_ADD(TMS32031, TMS_CLOCK) | |
| 1560 | 1614 | MDRV_CPU_PROGRAM_MAP(drivedge_tms1_map,0) |
| 1561 | 1615 | |
| 1562 | MDRV_CPU_ADD(TMS32031, | |
| 1616 | MDRV_CPU_ADD(TMS32031, TMS_CLOCK) | |
| 1563 | 1617 | MDRV_CPU_PROGRAM_MAP(drivedge_tms2_map,0) |
| 1564 | 1618 | |
| 1565 | 1619 | // MDRV_CPU_ADD(M6803, 8000000/4) -- network CPU |
| r1490 | r1491 | |
| 1574 | 1628 | /* basic machine hardware */ |
| 1575 | 1629 | MDRV_IMPORT_FROM(bloodstm) |
| 1576 | 1630 | |
| 1577 | MDRV_CPU_REPLACE("main", M68EC020, CLOCK | |
| 1631 | MDRV_CPU_REPLACE("main", M68EC020, CPU020_CLOCK | |
| 1578 | 1632 | MDRV_CPU_PROGRAM_MAP(itech020_map,0) |
| 1579 | 1633 | |
| 1580 | 1634 | MDRV_CPU_MODIFY("sound") |
| r1490 | r1491 | |
| 3628 | 3682 | { |
| 3629 | 3683 | init_program_rom(machine); |
| 3630 | 3684 | via_config(0, &via_interface); |
| 3631 | via_set_clock(0, CLOCK | |
| 3685 | via_set_clock(0, SOUND_CLOCK | |
| 3632 | 3686 | itech32_vram_height = 512; |
| 3633 | 3687 | itech32_planes = 2; |
| 3634 | 3688 | is_drivedge = 0; |
| r1490 | r1491 | |
| 3639 | 3693 | { |
| 3640 | 3694 | init_program_rom(machine); |
| 3641 | 3695 | via_config(0, &via_interface); |
| 3642 | via_set_clock(0, CLOCK | |
| 3696 | via_set_clock(0, SOUND_CLOCK | |
| 3643 | 3697 | itech32_vram_height = 1024; |
| 3644 | 3698 | itech32_planes = 1; |
| 3645 | 3699 | is_drivedge = 0; |
| r1490 | r1491 | |
| 3650 | 3704 | { |
| 3651 | 3705 | init_program_rom(machine); |
| 3652 | 3706 | via_config(0, &via_interface); |
| 3653 | via_set_clock(0, CLOCK | |
| 3707 | via_set_clock(0, SOUND_CLOCK | |
| 3654 | 3708 | itech32_vram_height = 1024; |
| 3655 | 3709 | itech32_planes = 1; |
| 3656 | 3710 | is_drivedge = 0; |
| r1490 | r1491 | |
| 3661 | 3715 | { |
| 3662 | 3716 | init_program_rom(machine); |
| 3663 | 3717 | via_config(0, &drivedge_via_interface); |
| 3664 | via_set_clock(0, CLOCK | |
| 3718 | via_set_clock(0, SOUND_CLOCK | |
| 3665 | 3719 | itech32_vram_height = 1024; |
| 3666 | 3720 | itech32_planes = 1; |
| 3667 | 3721 | is_drivedge = 1; |
| r1490 | r1491 | |
| 3681 | 3735 | */ |
| 3682 | 3736 | init_program_rom(machine); |
| 3683 | 3737 | via_config(0, &via_interface); |
| 3684 | via_set_clock(0, CLOCK | |
| 3738 | via_set_clock(0, SOUND_CLOCK | |
| 3685 | 3739 | itech32_vram_height = 1024; |
| 3686 | 3740 | itech32_planes = 1; |
| 3687 | 3741 |
| r1490 | r1491 | |
|---|---|---|
| 55 | 55 | VIDEO_UPDATE( malzak ); |
| 56 | 56 | WRITE8_HANDLER( playfield_w ); |
| 57 | 57 | |
| 58 | static READ8_HANDLER( malzak_s2636_1_r ) | |
| 59 | { | |
| 60 | return s2636_1_ram[offset]; | |
| 61 | } | |
| 62 | 58 | |
| 63 | static READ8_HANDLER( malzak_s2636_2_r ) | |
| 64 | { | |
| 65 | return s2636_2_ram[offset]; | |
| 66 | } | |
| 67 | ||
| 68 | static WRITE8_HANDLER( malzak_s2636_1_w ) | |
| 69 | { | |
| 70 | s2636_w(s2636_1_ram,offset,data,s2636_1_dirty); | |
| 71 | } | |
| 72 | ||
| 73 | static WRITE8_HANDLER( malzak_s2636_2_w ) | |
| 74 | { | |
| 75 | s2636_w(s2636_2_ram,offset,data,s2636_2_dirty); | |
| 76 | } | |
| 77 | ||
| 78 | ||
| 79 | 59 | static READ8_HANDLER( saa5050_r ) |
| 80 | 60 | { |
| 81 | 61 | return saa5050_vidram[offset]; |
| r1490 | r1491 | |
| 144 | 124 | AM_RANGE(0x1200, 0x12ff) AM_READ(MRA8_RAM) |
| 145 | 125 | AM_RANGE(0x1300, 0x13ff) AM_READ(MRA8_RAM) |
| 146 | 126 | AM_RANGE(0x14cb, 0x14cb) AM_READ(fake_VRLE_r) |
| 147 | AM_RANGE(0x1400, 0x14ff) AM_READ(malzak_s2636_1_r) | |
| 148 | AM_RANGE(0x1500, 0x15ff) AM_READ(malzak_s2636_2_r) | |
| 127 | AM_RANGE(0x1400, 0x14ff) AM_READ(MRA8_RAM) | |
| 128 | AM_RANGE(0x1500, 0x15ff) AM_READ(MRA8_RAM) | |
| 149 | 129 | AM_RANGE(0x1600, 0x16ff) AM_READ(MRA8_RAM) |
| 150 | 130 | AM_RANGE(0x1700, 0x17ff) AM_READ(MRA8_RAM) |
| 151 | 131 | AM_RANGE(0x1800, 0x1fff) AM_READ(saa5050_r) // SAA 5050 video RAM |
| r1490 | r1491 | |
| 164 | 144 | AM_RANGE(0x1100, 0x11ff) AM_WRITE(MWA8_RAM) |
| 165 | 145 | AM_RANGE(0x1200, 0x12ff) AM_WRITE(MWA8_RAM) |
| 166 | 146 | AM_RANGE(0x1300, 0x13ff) AM_WRITE(MWA8_RAM) |
| 167 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(malzak_s2636_1_w) | |
| 168 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(malzak_s2636_2_w) | |
| 147 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(MWA8_RAM) AM_BASE(&s2636_1_ram) | |
| 148 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(MWA8_RAM) AM_BASE(&s2636_2_ram) | |
| 169 | 149 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(playfield_w) |
| 170 | 150 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(MWA8_RAM) |
| 171 | 151 | AM_RANGE(0x1700, 0x17ff) AM_WRITE(MWA8_RAM) |
| r1490 | r1491 | |
| 187 | 167 | AM_RANGE(0x1300, 0x13ff) AM_READ(MRA8_RAM) |
| 188 | 168 | AM_RANGE(0x14cb, 0x14cb) AM_READ(fake_VRLE_r) |
| 189 | 169 | AM_RANGE(0x14cc, 0x14cc) AM_READ(s2636_portA_r) |
| 190 | AM_RANGE(0x1400, 0x14ff) AM_READ(malzak_s2636_1_r) | |
| 191 | AM_RANGE(0x1500, 0x15ff) AM_READ(malzak_s2636_2_r) | |
| 170 | AM_RANGE(0x1400, 0x14ff) AM_READ(MRA8_RAM) | |
| 171 | AM_RANGE(0x1500, 0x15ff) AM_READ(MRA8_RAM) | |
| 192 | 172 | AM_RANGE(0x1600, 0x16ff) AM_READ(MRA8_RAM) |
| 193 | 173 | AM_RANGE(0x1700, 0x17ff) AM_READ(MRA8_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 194 | 174 | AM_RANGE(0x1800, 0x1fff) AM_READ(saa5050_r) // SAA 5050 video RAM |
| r1490 | r1491 | |
| 207 | 187 | AM_RANGE(0x1100, 0x11ff) AM_WRITE(MWA8_RAM) |
| 208 | 188 | AM_RANGE(0x1200, 0x12ff) AM_WRITE(MWA8_RAM) |
| 209 | 189 | AM_RANGE(0x1300, 0x13ff) AM_WRITE(MWA8_RAM) |
| 210 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(malzak_s2636_1_w) | |
| 211 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(malzak_s2636_2_w) | |
| 190 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(MWA8_RAM) | |
| 191 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(MWA8_RAM) | |
| 212 | 192 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(playfield_w) |
| 213 | 193 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(MWA8_RAM) |
| 214 | 194 | AM_RANGE(0x1700, 0x17ff) AM_WRITE(MWA8_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| r1490 | r1491 | |
| 344 | 324 | // 8*8 |
| 345 | 325 | }; |
| 346 | 326 | |
| 347 | static const gfx_layout s2636_character10 = | |
| 348 | { | |
| 349 | 8,10, | |
| 350 | 5, | |
| 351 | 1, | |
| 352 | { 0 }, | |
| 353 | { 0,1,2,3,4,5,6,7 }, | |
| 354 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 355 | 8*16 | |
| 356 | }; | |
| 357 | ||
| 358 | 327 | static const gfx_layout saa5050_charlayout = |
| 359 | 328 | { |
| 360 | 329 | 6, 10, |
| r1490 | r1491 | |
| 393 | 362 | |
| 394 | 363 | //add s2636 decodes here (i.e. from zac2650) and maybe re-arrange them |
| 395 | 364 | static GFXDECODE_START( malzak ) |
| 396 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 397 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_character10, 0, 8 ) /* s2636 #1 */ | |
| 398 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_character10, 0, 8 ) /* s2636 #2 */ | |
| 399 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_charlayout, 0, 128) | |
| 400 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_hilayout, 0, 128) | |
| 401 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_lolayout, 0, 128) | |
| 365 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 16 ) | |
| 366 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_gfx_layout, 0, 8 ) /* s2636 #1 */ | |
| 367 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_gfx_layout, 0, 8 ) /* s2636 #2 */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_charlayout, 0, 128 ) | |
| 369 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_hilayout, 0, 128 ) | |
| 370 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_lolayout, 0, 128 ) | |
| 402 | 371 | GFXDECODE_END |
| 403 | 372 | |
| 404 | 373 |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | driver by Aaron Giles |
| 6 | 6 | |
| 7 | 7 | Games supported: |
| 8 | * Invasion | |
| 8 | * Invasion - The Abductors | |
| 9 | 9 | * Mortal Kombat 4 |
| 10 | 10 | * Cruis'n Exotica |
| 11 | 11 | * The Grid |
| r1490 | r1491 | |
| 13 | 13 | Known bugs: |
| 14 | 14 | * not done yet |
| 15 | 15 | |
| 16 | According to a Midway service bulletin | |
| 17 | As of 2/12/2001 the lastest software levels: | |
| 18 | ||
| 19 | Game Title Level Released | |
| 20 | ---------------------------------- | |
| 21 | Cruis'n Exotica v2.4 08/13/2000 | |
| 22 | Invasion v5.0 12/14/1999 | |
| 23 | The Grid v1.2 10/18/2000 | |
| 24 | ||
| 16 | 25 | **************************************************************************/ |
| 17 | 26 | |
| 18 | 27 | #include "driver.h" |
| r1490 | r1491 | |
| 1198 | 1207 | ROM_LOAD32_WORD( "mk4_l3.u17", 0x0c00002, 0x200000, CRC(3a1a082c) SHA1(5f8e8ce760d8ebadd1240ef08f1382a37cf11d0b) ) |
| 1199 | 1208 | ROM_END |
| 1200 | 1209 | |
| 1210 | ROM_START( invasnab ) | |
| 1211 | ROM_REGION16_LE( 0x1000000, REGION_SOUND1, ROMREGION_ERASEFF ) /* sound data */ | |
| 1212 | ROM_LOAD16_BYTE( "invasion2.u2", 0x000000, 0x200000, CRC(59d2e1d6) SHA1(994a4311ac4841d4341449c0c7480952b6f3855d) ) /* These four sound roms were labeled as v2.0 */ | |
| 1213 | ROM_LOAD16_BYTE( "invasion2.u3", 0x400000, 0x200000, CRC(86b956ae) SHA1(f7fd4601a2ce3e7e9b67e7d77908bfa206ee7e62) ) | |
| 1214 | ROM_LOAD16_BYTE( "invasion2.u4", 0x800000, 0x200000, CRC(5ef1fab5) SHA1(987afa0672fa89b18cf20d28644848a9e5ee9b17) ) | |
| 1215 | ROM_LOAD16_BYTE( "invasion2.u5", 0xc00000, 0x200000, CRC(e42805c9) SHA1(e5b71eb1852809a649ac43a82168b3bdaf4b1526) ) | |
| 1201 | 1216 | |
| 1202 | ROM_START( invasn ) | |
| 1217 | ROM_REGION32_LE( 0x1800000, REGION_USER1, 0 ) | |
| 1218 | ROM_LOAD32_WORD( "invasion5.u10", 0x0000000, 0x200000, CRC(8c7785d9) SHA1(701602314cd4eba4215c47ea0ae75fd4eddad43b) ) /* Roms U10 & U11 were labeled as v5.0 */ | |
| 1219 | ROM_LOAD32_WORD( "invasion5.u11", 0x0000002, 0x200000, CRC(8ceb1f32) SHA1(82d01f25cba25d77b11c347632e8b72776e12984) ) | |
| 1220 | ROM_LOAD32_WORD( "invasion4.u12", 0x0400000, 0x200000, CRC(ce1eb06a) SHA1(ff17690a0cbca6dcccccde70e2c5812ae03db5bb) ) /* Roms U12 through U19 were all labeled as v4.0 */ | |
| 1221 | ROM_LOAD32_WORD( "invasion4.u13", 0x0400002, 0x200000, CRC(33fc6707) SHA1(11a39ad980ec320547319eca6ffa5aef3ab8b010) ) | |
| 1222 | ROM_LOAD32_WORD( "invasion4.u14", 0x0800000, 0x200000, CRC(760682a1) SHA1(ff91210225d4aa750115c6219d4c35c9521a3f0b) ) | |
| 1223 | ROM_LOAD32_WORD( "invasion4.u15", 0x0800002, 0x200000, CRC(90467d7a) SHA1(a143a3d3605e5626852e75937160ba6bcd891608) ) | |
| 1224 | ROM_LOAD32_WORD( "invasion4.u16", 0x0c00000, 0x200000, CRC(3ef1b28d) SHA1(6f9a071b8830194fea84daa62aadabae86977c5f) ) | |
| 1225 | ROM_LOAD32_WORD( "invasion4.u17", 0x0c00002, 0x200000, CRC(97aa677a) SHA1(4d21cc59e0ffd4985f89c97c71d605c3b404a8a3) ) | |
| 1226 | ROM_LOAD32_WORD( "invasion4.u18", 0x1000000, 0x200000, CRC(6930c656) SHA1(28054ff9a6c6f5764a371f8defe4c1f5730618f3) ) | |
| 1227 | ROM_LOAD32_WORD( "invasion4.u19", 0x1000002, 0x200000, CRC(89fa6ee5) SHA1(572565e1308142b0b062aa72315c68e928f2419c) ) | |
| 1228 | ROM_END | |
| 1229 | ||
| 1230 | ROM_START( invasnv4 ) | |
| 1203 | 1231 | ROM_REGION16_LE( 0x1000000, REGION_SOUND1, ROMREGION_ERASEFF ) /* sound data */ |
| 1204 | ROM_LOAD16_BYTE( "invasion.u2", 0x000000, 0x200000, CRC(59d2e1d6) SHA1(994a4311ac4841d4341449c0c7480952b6f3855d) ) | |
| 1205 | ROM_LOAD16_BYTE( "invasion.u3", 0x400000, 0x200000, CRC(86b956ae) SHA1(f7fd4601a2ce3e7e9b67e7d77908bfa206ee7e62) ) | |
| 1206 | ROM_LOAD16_BYTE( "invasion.u4", 0x800000, 0x200000, CRC(5ef1fab5) SHA1(987afa0672fa89b18cf20d28644848a9e5ee9b17) ) | |
| 1207 | ROM_LOAD16_BYTE( "invasion.u5", 0xc00000, 0x200000, CRC(e42805c9) SHA1(e5b71eb1852809a649ac43a82168b3bdaf4b1526) ) | |
| 1232 | ROM_LOAD16_BYTE( "invasion2.u2", 0x000000, 0x200000, CRC(59d2e1d6) SHA1(994a4311ac4841d4341449c0c7480952b6f3855d) ) /* These four sound roms were labeled as v2.0 */ | |
| 1233 | ROM_LOAD16_BYTE( "invasion2.u3", 0x400000, 0x200000, CRC(86b956ae) SHA1(f7fd4601a2ce3e7e9b67e7d77908bfa206ee7e62) ) | |
| 1234 | ROM_LOAD16_BYTE( "invasion2.u4", 0x800000, 0x200000, CRC(5ef1fab5) SHA1(987afa0672fa89b18cf20d28644848a9e5ee9b17) ) | |
| 1235 | ROM_LOAD16_BYTE( "invasion2.u5", 0xc00000, 0x200000, CRC(e42805c9) SHA1(e5b71eb1852809a649ac43a82168b3bdaf4b1526) ) | |
| 1208 | 1236 | |
| 1209 | 1237 | ROM_REGION32_LE( 0x1800000, REGION_USER1, 0 ) |
| 1210 | ROM_LOAD32_WORD( "invasion.u10", 0x0000000, 0x200000, CRC(b3ce958b) SHA1(ed51c167d85bc5f6155b8046ec056a4f4ad5cf9d) ) | |
| 1211 | ROM_LOAD32_WORD( "invasion.u11", 0x0000002, 0x200000, CRC(0bd09359) SHA1(f40886bd2e5f5fbf506580e5baa2f733be200852) ) | |
| 1212 | ROM_LOAD32_WORD( "invasion.u12", 0x0400000, 0x200000, CRC(ce1eb06a) SHA1(ff17690a0cbca6dcccccde70e2c5812ae03db5bb) ) | |
| 1213 | ROM_LOAD32_WORD( "invasion.u13", 0x0400002, 0x200000, CRC(33fc6707) SHA1(11a39ad980ec320547319eca6ffa5aef3ab8b010) ) | |
| 1214 | ROM_LOAD32_WORD( "invasion.u14", 0x0800000, 0x200000, CRC(760682a1) SHA1(ff91210225d4aa750115c6219d4c35c9521a3f0b) ) | |
| 1215 | ROM_LOAD32_WORD( "invasion.u15", 0x0800002, 0x200000, CRC(90467d7a) SHA1(a143a3d3605e5626852e75937160ba6bcd891608) ) | |
| 1216 | ROM_LOAD32_WORD( "invasion.u16", 0x0c00000, 0x200000, CRC(3ef1b28d) SHA1(6f9a071b8830194fea84daa62aadabae86977c5f) ) | |
| 1217 | ROM_LOAD32_WORD( "invasion.u17", 0x0c00002, 0x200000, CRC(97aa677a) SHA1(4d21cc59e0ffd4985f89c97c71d605c3b404a8a3) ) | |
| 1218 | ROM_LOAD32_WORD( "invasion.u18", 0x1000000, 0x200000, CRC(6930c656) SHA1(28054ff9a6c6f5764a371f8defe4c1f5730618f3) ) | |
| 1219 | ROM_LOAD32_WORD( "invasion.u19", 0x1000002, 0x200000, CRC(89fa6ee5) SHA1(572565e1308142b0b062aa72315c68e928f2419c) ) | |
| 1238 | ROM_LOAD32_WORD( "invasion4.u10", 0x0000000, 0x200000, CRC(b3ce958b) SHA1(ed51c167d85bc5f6155b8046ec056a4f4ad5cf9d) ) /* These rom were all labeled as v4.0 */ | |
| 1239 | ROM_LOAD32_WORD( "invasion4.u11", 0x0000002, 0x200000, CRC(0bd09359) SHA1(f40886bd2e5f5fbf506580e5baa2f733be200852) ) | |
| 1240 | ROM_LOAD32_WORD( "invasion4.u12", 0x0400000, 0x200000, CRC(ce1eb06a) SHA1(ff17690a0cbca6dcccccde70e2c5812ae03db5bb) ) | |
| 1241 | ROM_LOAD32_WORD( "invasion4.u13", 0x0400002, 0x200000, CRC(33fc6707) SHA1(11a39ad980ec320547319eca6ffa5aef3ab8b010) ) | |
| 1242 | ROM_LOAD32_WORD( "invasion4.u14", 0x0800000, 0x200000, CRC(760682a1) SHA1(ff91210225d4aa750115c6219d4c35c9521a3f0b) ) | |
| 1243 | ROM_LOAD32_WORD( "invasion4.u15", 0x0800002, 0x200000, CRC(90467d7a) SHA1(a143a3d3605e5626852e75937160ba6bcd891608) ) | |
| 1244 | ROM_LOAD32_WORD( "invasion4.u16", 0x0c00000, 0x200000, CRC(3ef1b28d) SHA1(6f9a071b8830194fea84daa62aadabae86977c5f) ) | |
| 1245 | ROM_LOAD32_WORD( "invasion4.u17", 0x0c00002, 0x200000, CRC(97aa677a) SHA1(4d21cc59e0ffd4985f89c97c71d605c3b404a8a3) ) | |
| 1246 | ROM_LOAD32_WORD( "invasion4.u18", 0x1000000, 0x200000, CRC(6930c656) SHA1(28054ff9a6c6f5764a371f8defe4c1f5730618f3) ) | |
| 1247 | ROM_LOAD32_WORD( "invasion4.u19", 0x1000002, 0x200000, CRC(89fa6ee5) SHA1(572565e1308142b0b062aa72315c68e928f2419c) ) | |
| 1220 | 1248 | ROM_END |
| 1221 | 1249 | |
| 1222 | ||
| 1223 | 1250 | ROM_START( crusnexo ) |
| 1224 | 1251 | ROM_REGION16_LE( 0xc00000, REGION_SOUND1, ROMREGION_ERASEFF ) /* sound data */ |
| 1225 | 1252 | ROM_LOAD( "exotica.u2", 0x000000, 0x200000, CRC(d2d54acf) SHA1(2b4d6fda30af807228bb281335939dfb6df9b530) ) |
| r1490 | r1491 | |
| 1320 | 1347 | * |
| 1321 | 1348 | *************************************/ |
| 1322 | 1349 | |
| 1323 | GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1324 | GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1325 | GAME( 1999, invasn, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion (Midway)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1326 | GAMEL( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_crusnexo ) | |
| 1327 | GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1350 | GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (version 3.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1351 | GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (version 2.1)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1352 | GAME( 1999, invasnab, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion - The Abductors (version 5.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1353 | GAME( 1999, invasnv4, invasnab, midzeus, invasn, invasn, ROT0, "Midway", "Invasion - The Abductors (version 4.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1354 | GAMEL( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica (version 1.6)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_crusnexo ) | |
| 1355 | GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | - Shooting Gallery: Shootgal.txt mentions speech pcb, |
| 8 | 8 | mikesarcade.com dk conversion - Clarify |
| 9 | 9 | - 8ballact: read 1507 no mapped |
| 10 | - dkong3 dma (Z80 dma) | |
| 11 | 10 | - implement 74LS259 (8bit addressable latches), |
| 12 | 11 | 74LS175 (QUAD D FlipFlop), 74LS373 (Octal transparent latch) |
| 13 | 12 | |
| 14 | 13 | Done: |
| 14 | - dkong3 dma (Z80 dma) | |
| 15 | 15 | - dkongjr discrete interface |
| 16 | 16 | - when i am retired: implement 8257 DMA controller |
| 17 | 17 | - drakton - add dkongjr conversion |
| r1490 | r1491 | |
| 252 | 252 | #include "cpu/m6502/m6502.h" |
| 253 | 253 | #include "includes/dkong.h" |
| 254 | 254 | #include "machine/8257dma.h" |
| 255 | #include "machine/z80dma.h" | |
| 255 | 256 | #include <math.h> |
| 256 | 257 | |
| 257 | 258 | /************************************* |
| r1490 | r1491 | |
| 273 | 274 | static void hb_dma_write_byte(int channel, offs_t offset, UINT8 data); |
| 274 | 275 | static UINT8 dk_dma_read_byte(int channel, offs_t offset); |
| 275 | 276 | static void dk_dma_write_byte(int channel, offs_t offset, UINT8 data); |
| 277 | static UINT8 dk3_dma_read_byte(offs_t offset); | |
| 278 | static void dk3_dma_write_byte(offs_t offset, UINT8 data); | |
| 276 | 279 | static UINT8 p8257_ctl_r(void); |
| 277 | 280 | static void p8257_ctl_w(UINT8 data); |
| 278 | 281 | |
| r1490 | r1491 | |
| 282 | 285 | * |
| 283 | 286 | *************************************/ |
| 284 | 287 | |
| 288 | static const struct z80dma_interface dk3_dma = | |
| 289 | { | |
| 290 | 0, | |
| 291 | CLOCK_1H, | |
| 292 | ||
| 293 | dk3_dma_read_byte, | |
| 294 | dk3_dma_write_byte, | |
| 295 | 0, 0, 0, 0 | |
| 296 | }; | |
| 297 | ||
| 285 | 298 | static const struct dma8257_interface dk_dma = |
| 286 | 299 | { |
| 287 | 300 | 0, |
| r1490 | r1491 | |
| 339 | 352 | |
| 340 | 353 | } |
| 341 | 354 | |
| 342 | ||
| 343 | 355 | static MACHINE_START( hunchbkd ) |
| 344 | 356 | { |
| 345 | 357 | UINT8 *p = memory_region(REGION_USER1); |
| r1490 | r1491 | |
| 361 | 373 | |
| 362 | 374 | } |
| 363 | 375 | |
| 364 | ||
| 365 | 376 | static MACHINE_START( radarscp ) |
| 366 | 377 | { |
| 367 | 378 | dkong_state *state = Machine->driver_data; |
| r1490 | r1491 | |
| 378 | 389 | state->hardware_type = HARDWARE_TRS01; |
| 379 | 390 | } |
| 380 | 391 | |
| 392 | static MACHINE_START( dkong3 ) | |
| 393 | { | |
| 394 | machine_start_dkong2b(machine); | |
| 395 | z80dma_init(1); | |
| 396 | z80dma_config(0, &dk3_dma); | |
| 397 | } | |
| 381 | 398 | |
| 382 | 399 | static MACHINE_RESET( dkong ) |
| 383 | 400 | { |
| r1490 | r1491 | |
| 386 | 403 | |
| 387 | 404 | } |
| 388 | 405 | |
| 406 | static MACHINE_RESET( dkong3 ) | |
| 407 | { | |
| 408 | ||
| 409 | z80dma_reset(); | |
| 410 | ||
| 411 | } | |
| 412 | ||
| 389 | 413 | static MACHINE_RESET( strtheat ) |
| 390 | 414 | { |
| 391 | 415 | dkong_state *state = machine->driver_data; |
| r1490 | r1491 | |
| 436 | 460 | cpuintrf_pop_context(); |
| 437 | 461 | } |
| 438 | 462 | |
| 463 | static UINT8 dk3_dma_read_byte(offs_t offset) | |
| 464 | { | |
| 465 | UINT8 result; | |
| 466 | ||
| 467 | cpuintrf_push_context(0); | |
| 468 | result = program_read_byte(offset); | |
| 469 | cpuintrf_pop_context(); | |
| 470 | ||
| 471 | return result; | |
| 472 | } | |
| 473 | ||
| 474 | static void dk3_dma_write_byte(offs_t offset, UINT8 data) | |
| 475 | { | |
| 476 | cpuintrf_push_context(0); | |
| 477 | program_write_byte(offset, data); | |
| 478 | cpuintrf_pop_context(); | |
| 479 | } | |
| 480 | ||
| 439 | 481 | static UINT8 hb_dma_read_byte(int channel, offs_t offset) |
| 440 | 482 | { |
| 441 | 483 | dkong_state *state = Machine->driver_data; |
| r1490 | r1491 | |
| 717 | 759 | |
| 718 | 760 | static ADDRESS_MAP_START( dkong3_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 719 | 761 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 720 | AM_RANGE(0x6000, 0x68ff) AM_RAM | |
| 721 | AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 722 | AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ | |
| 723 | AM_RANGE(0x6d00, 0x6fff) AM_RAM /* ???? */ | |
| 724 | AM_RANGE(0x7000, 0x73ff) AM_RAM /* Actual sprite ram location ... waiting for missing z80 dma */ | |
| 762 | AM_RANGE(0x6000, 0x67ff) AM_RAM | |
| 763 | AM_RANGE(0x6800, 0x6fff) AM_RAM | |
| 764 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ | |
| 725 | 765 | AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) |
| 726 | 766 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) |
| 727 | 767 | AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(soundlatch2_w) |
| r1490 | r1491 | |
| 732 | 772 | AM_RANGE(0x7e82, 0x7e82) AM_WRITE(dkong_flipscreen_w) |
| 733 | 773 | AM_RANGE(0x7e83, 0x7e83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ |
| 734 | 774 | AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w) |
| 735 | AM_RANGE(0x7e85, 0x7e85) AM_ | |
| 775 | AM_RANGE(0x7e85, 0x7e85) AM_WRITE(z80dma_0_rdy_w) /* ==> DMA Chip */ | |
| 736 | 776 | AM_RANGE(0x7e86, 0x7e87) AM_WRITE(dkong_palettebank_w) |
| 737 | 777 | AM_RANGE(0x8000, 0x9fff) AM_ROM /* DK3 and bootleg DKjr only */ |
| 738 | 778 | ADDRESS_MAP_END |
| 739 | 779 | |
| 740 | 780 | static ADDRESS_MAP_START( dkong3_io_map, ADDRESS_SPACE_IO, 8 ) |
| 741 | 781 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 742 | AM_RANGE(0x00, 0x00) AM_WRITE(MWA8_NOP) /* dma controller */ | |
| 782 | AM_RANGE(0x00, 0x00) AM_READWRITE(z80dma_0_r, z80dma_0_w) /* dma controller */ | |
| 783 | //AM_RANGE(0x00, 0x00) AM_WRITE(MWA8_NOP) /* dma controller */ | |
| 743 | 784 | ADDRESS_MAP_END |
| 744 | 785 | |
| 745 | 786 | /* Epos conversions */ |
| r1490 | r1491 | |
| 1043 | 1084 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!4") |
| 1044 | 1085 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1045 | 1086 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| 1046 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" ) | |
| 1047 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW2:!6" ) | |
| 1048 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW2:!7" ) | |
| 1049 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW2:!8" ) | |
| 1087 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:!5" ) | |
| 1088 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:!6" ) | |
| 1089 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW1:!7" ) | |
| 1090 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!8" ) | |
| 1050 | 1091 | INPUT_PORTS_END |
| 1051 | 1092 | |
| 1052 | 1093 | static INPUT_PORTS_START( dkongjr ) |
| r1490 | r1491 | |
| 1140 | 1181 | |
| 1141 | 1182 | static INPUT_PORTS_START( sbdk ) |
| 1142 | 1183 | PORT_INCLUDE( dkong_in0_8 ) |
| 1184 | PORT_MODIFY("IN0") | |
| 1185 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1186 | ||
| 1143 | 1187 | PORT_INCLUDE( dkong_in1_8 ) |
| 1188 | PORT_MODIFY("IN1") | |
| 1189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1191 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1192 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1193 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */ | |
| 1144 | 1194 | |
| 1145 | 1195 | PORT_INCLUDE( dkong_in2 ) |
| 1146 | 1196 | PORT_MODIFY("IN2") |
| r1490 | r1491 | |
| 1149 | 1199 | |
| 1150 | 1200 | PORT_INCLUDE( dkong_dsw0 ) |
| 1151 | 1201 | PORT_MODIFY("DSW0") |
| 1152 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW | |
| 1202 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" ) | |
| 1153 | 1203 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" ) |
| 1154 | 1204 | PORT_DIPSETTING( 0x00, "3" ) |
| 1155 | 1205 | PORT_DIPSETTING( 0x02, "5" ) |
| 1156 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW2:!3" ) | |
| 1157 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:!4" ) | |
| 1206 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" ) | |
| 1207 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" ) | |
| 1158 | 1208 | |
| 1159 | 1209 | PORT_START_TAG("SENSE") /* Sense */ |
| 1160 | 1210 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| r1490 | r1491 | |
| 1171 | 1221 | |
| 1172 | 1222 | PORT_INCLUDE( dkong_dsw0 ) |
| 1173 | 1223 | PORT_MODIFY("DSW0") |
| 1174 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:!1" ) | |
| 1175 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW2:!2" ) | |
| 1176 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW2:!3" ) | |
| 1177 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:!4" ) | |
| 1224 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" ) | |
| 1225 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:!2" ) | |
| 1226 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" ) | |
| 1227 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" ) | |
| 1178 | 1228 | |
| 1179 | 1229 | PORT_START_TAG("SENSE") /* Sense */ |
| 1180 | 1230 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) |
| r1490 | r1491 | |
| 1574 | 1624 | MDRV_DRIVER_DATA(dkong_state) |
| 1575 | 1625 | |
| 1576 | 1626 | /* basic machine hardware */ |
| 1577 | MDRV_CPU_ADD_TAG("main", Z80, 8 | |
| 1627 | MDRV_CPU_ADD_TAG("main", Z80, XTAL_8MHz | |
| 1578 | 1628 | MDRV_CPU_PROGRAM_MAP(dkong3_map, 0) |
| 1579 | 1629 | MDRV_CPU_IO_MAP(0, dkong3_io_map) |
| 1580 | 1630 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 1581 | 1631 | |
| 1582 | MDRV_MACHINE_START(dkong2b) | |
| 1583 | MDRV_MACHINE_RESET(dkong) | |
| 1632 | MDRV_MACHINE_START(dkong3) | |
| 1633 | MDRV_MACHINE_RESET(dkong3) | |
| 1584 | 1634 | |
| 1585 | 1635 | /* video hardware */ |
| 1586 | 1636 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| r1490 | r1491 | |
|---|---|---|
| 1636 | 1636 | static void gauntlet_common_init(int slapstic, int vindctr2) |
| 1637 | 1637 | { |
| 1638 | 1638 | atarigen_eeprom_default = NULL; |
| 1639 | atarigen_slapstic_init(0, 0x038000, slapstic); | |
| 1639 | atarigen_slapstic_init(0, 0x038000, 0, slapstic); | |
| 1640 | 1640 | |
| 1641 | 1641 | /* swap the top and bottom halves of the main CPU ROM images */ |
| 1642 | 1642 | atarigen_swap_mem(memory_region(REGION_CPU1) + 0x000000, memory_region(REGION_CPU1) + 0x008000, 0x8000); |
| r1490 | r1491 | |
|---|---|---|
| 1216 | 1216 | /********** GFX DECODE **********/ |
| 1217 | 1217 | |
| 1218 | 1218 | /* sprites are contained in 256x256 "tiles" */ |
| 1219 | static const gfx_layout spritelayout = | |
| 1220 | { | |
| 1221 | 256,256, | |
| 1222 | RGN_FRAC(1,1), | |
| 1223 | 8, | |
| 1224 | { GFX_RAW }, | |
| 1225 | { 0 }, /* org displacement */ | |
| 1226 | { 256*8 }, /* line modulo */ | |
| 1227 | 256*256*8 /* char modulo */ | |
| 1228 | }; | |
| 1219 | static GFXLAYOUT_RAW( spritelayout, 8, 256, 256, 256*8, 256*256*8 ) | |
| 1220 | static GFXLAYOUT_RAW( bglayout, 8, 16, 16, 16*8, 16*16*8 ) | |
| 1221 | static GFXLAYOUT_RAW( txlayout, 8, 8, 8, 8*8, 8*8*8 ) | |
| 1229 | 1222 | |
| 1230 | static const gfx_layout bglayout = | |
| 1231 | { | |
| 1232 | 16,16, | |
| 1233 | RGN_FRAC(1,1), | |
| 1234 | 8, | |
| 1235 | { GFX_RAW }, | |
| 1236 | { 0 }, /* org displacement */ | |
| 1237 | { 16*8 }, /* line modulo */ | |
| 1238 | 16*16*8 /* char modulo */ | |
| 1239 | }; | |
| 1240 | ||
| 1241 | ||
| 1242 | static const gfx_layout txlayout = | |
| 1243 | { | |
| 1244 | 8,8, | |
| 1245 | RGN_FRAC(1,1), | |
| 1246 | 8, | |
| 1247 | { GFX_RAW }, | |
| 1248 | { 0 }, /* org displacement */ | |
| 1249 | { 8*8 }, /* line modulo */ | |
| 1250 | 8*8*8 /* char modulo */ | |
| 1251 | }; | |
| 1252 | ||
| 1253 | 1223 | static GFXDECODE_START( ms32 ) |
| 1254 | 1224 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0x0000, 0x10 ) |
| 1255 | 1225 | GFXDECODE_ENTRY( REGION_GFX2, 0, bglayout, 0x2000, 0x10 ) |
| r1490 | r1491 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | static UINT8 backup_ram[0x2000]; |
| 41 | 41 | |
| 42 | static void viper_exit(running_machine *machine) | |
| 43 | { | |
| 44 | voodoo_exit(0); | |
| 45 | } | |
| 42 | 46 | |
| 43 | 47 | static VIDEO_START(viper) |
| 44 | 48 | { |
| 49 | add_exit_callback(machine, viper_exit); | |
| 50 | ||
| 45 | 51 | voodoo_start(0, 0, VOODOO_3, 16, 16, 16); |
| 46 | 52 | } |
| 47 | 53 |
| r1490 | r1491 | |
|---|---|---|
| 3427 | 3427 | 64*8 |
| 3428 | 3428 | }; |
| 3429 | 3429 | |
| 3430 | static const gfx_layout cps1_layout16x16 = | |
| 3431 | { | |
| 3432 | 16,16, | |
| 3433 | RGN_FRAC(1,1), | |
| 3434 | 4, | |
| 3435 | { GFX_RAW }, | |
| 3436 | { 0 }, /* org displacement */ | |
| 3437 | { 8*8 }, /* line modulo */ | |
| 3438 | 128*8 /* char modulo */ | |
| 3439 | }; | |
| 3430 | static GFXLAYOUT_RAW( cps1_layout16x16, 4, 16, 16, 8*8, 128*8 ) | |
| 3431 | static GFXLAYOUT_RAW( cps1_layout32x32, 4, 32, 32, 16*8, 512*8 ) | |
| 3440 | 3432 | |
| 3441 | static const gfx_layout cps1_layout32x32 = | |
| 3442 | { | |
| 3443 | 32,32, | |
| 3444 | RGN_FRAC(1,1), | |
| 3445 | 4, | |
| 3446 | { GFX_RAW }, | |
| 3447 | { 0 }, /* org displacement */ | |
| 3448 | { 16*8 }, /* line modulo */ | |
| 3449 | 512*8 /* char modulo */ | |
| 3450 | }; | |
| 3451 | ||
| 3452 | 3433 | GFXDECODE_START( cps1 ) |
| 3453 | 3434 | GFXDECODE_ENTRY( REGION_GFX1, 0, cps1_layout8x8, 0, 0x100 ) |
| 3454 | 3435 | GFXDECODE_ENTRY( REGION_GFX1, 0, cps1_layout8x8_2, 0, 0x100 ) |
| r1490 | r1491 | |
|---|---|---|
| 95 | 95 | AM_RANGE(0x9000, 0x9fff) AM_READ(stactics_vert_pos_r) |
| 96 | 96 | AM_RANGE(0xa000, 0xafff) AM_READ(stactics_horiz_pos_r) |
| 97 | 97 | |
| 98 | AM_RANGE(0xb000, 0xb3ff) AM_READ(MRA8_RAM) | |
| 99 | AM_RANGE(0xb800, 0xbfff) AM_READ(MRA8_RAM) | |
| 100 | ||
| 101 | AM_RANGE(0xd000, 0xd3ff) AM_READ(MRA8_RAM) | |
| 102 | AM_RANGE(0xd600, 0xd7ff) AM_READ(MRA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 103 | AM_RANGE(0xd800, 0xdfff) AM_READ(MRA8_RAM) | |
| 104 | ||
| 105 | AM_RANGE(0xe000, 0xe3ff) AM_READ(MRA8_RAM) | |
| 106 | AM_RANGE(0xe600, 0xe7ff) AM_READ(MRA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 107 | AM_RANGE(0xe800, 0xefff) AM_READ(MRA8_RAM) | |
| 108 | ||
| 109 | AM_RANGE(0xf000, 0xf3ff) AM_READ(MRA8_RAM) | |
| 110 | AM_RANGE(0xf600, 0xf7ff) AM_READ(MRA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 111 | AM_RANGE(0xf800, 0xffff) AM_READ(MRA8_RAM) | |
| 112 | ||
| 98 | AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_RAM) /* B RAM page */ | |
| 99 | AM_RANGE(0xd000, 0xdfff) AM_READ(MRA8_RAM) /* D RAM page */ | |
| 100 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8_RAM) /* E RAM page */ | |
| 101 | AM_RANGE(0xf000, 0xffff) AM_READ(MRA8_RAM) /* F RAM page */ | |
| 113 | 102 | ADDRESS_MAP_END |
| 114 | 103 | |
| 115 | 104 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1490 | r1491 | |
|---|---|---|
| 676 | 676 | ***************************************************************************/ |
| 677 | 677 | |
| 678 | 678 | /* 8x8x4 tiles */ |
| 679 | static const gfx_layout layout_8x8x4 = | |
| 680 | { | |
| 681 | 8,8, | |
| 682 | RGN_FRAC(1,1), | |
| 683 | 4, | |
| 684 | { GFX_RAW }, | |
| 685 | { 0 }, /* org displacement */ | |
| 686 | { 4*8 }, /* line modulo */ | |
| 687 | 32*8 /* char modulo */ | |
| 688 | }; | |
| 679 | static GFXLAYOUT_RAW( layout_8x8x4, 4, 8, 8, 4*8, 32*8 ) | |
| 689 | 680 | |
| 690 | 681 | /* 8x8x8 tiles for later games */ |
| 691 | static const gfx_layout layout_8x8x8h = | |
| 692 | { | |
| 693 | 8,8, | |
| 694 | RGN_FRAC(1,1), | |
| 695 | 8, | |
| 696 | { GFX_RAW }, | |
| 697 | { 0 }, /* org displacement */ | |
| 698 | { 8*8 }, /* line modulo */ | |
| 699 | 32*8 /* char modulo (half char step) */ | |
| 700 | }; | |
| 682 | static GFXLAYOUT_RAW( layout_8x8x8h, 8, 8, 8, 8*8, 32*8 ) | |
| 701 | 683 | |
| 702 | 684 | static GFXDECODE_START( 14220 ) |
| 703 | 685 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout_8x8x4, 0x0, 0x200 ) // [0] 4 Bit Tiles |
| r1490 | r1491 | |
|---|---|---|
| 72 | 72 | #include "sound/okim6295.h" |
| 73 | 73 | |
| 74 | 74 | |
| 75 | #define MASTER_CLOCK XTAL_14_31818MHz | |
| 76 | ||
| 77 | ||
| 75 | 78 | /************************************* |
| 76 | 79 | * |
| 77 | 80 | * Interrupt handling |
| r1490 | r1491 | |
| 168 | 171 | |
| 169 | 172 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 170 | 173 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 171 | AM_RANGE(0x200000, 0x21ffff) AM_R | |
| 174 | AM_RANGE(0x200000, 0x21ffff) AM_R | |
| 172 | 175 | AM_RANGE(0x3c0000, 0x3c07ff) AM_READWRITE(MRA16_RAM, atarigen_expanded_666_paletteram_w) AM_BASE(&paletteram16) |
| 173 | 176 | AM_RANGE(0x3e0000, 0x3e07ff) AM_READWRITE(MRA16_RAM, atarimo_0_spriteram_w) AM_BASE(&atarimo_0_spriteram) |
| 174 | 177 | AM_RANGE(0x3e0800, 0x3effbf) AM_RAM |
| r1490 | r1491 | |
| 341 | 344 | static MACHINE_DRIVER_START( arcadecl ) |
| 342 | 345 | |
| 343 | 346 | /* basic machine hardware */ |
| 344 | MDRV_CPU_ADD(M68000, AT | |
| 347 | MDRV_CPU_ADD(M68000, MASTER | |
| 345 | 348 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 346 | 349 | MDRV_CPU_VBLANK_INT(atarigen_video_int_gen,1) |
| 347 | 350 | |
| r1490 | r1491 | |
| 357 | 360 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 358 | 361 | /* note: these parameters are from published specs, not derived */ |
| 359 | 362 | /* the board uses an SOS-2 chip to generate video signals */ |
| 360 | MDRV_SCREEN_RAW_PARAMS(AT | |
| 363 | MDRV_SCREEN_RAW_PARAMS(MASTER | |
| 361 | 364 | |
| 362 | 365 | MDRV_VIDEO_START(arcadecl) |
| 363 | 366 | MDRV_VIDEO_UPDATE(arcadecl) |
| r1490 | r1491 | |
| 365 | 368 | /* sound hardware */ |
| 366 | 369 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 367 | 370 | |
| 368 | MDRV_SOUND_ADD(OKIM6295, AT | |
| 371 | MDRV_SOUND_ADD(OKIM6295, MASTER | |
| 369 | 372 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7low) |
| 370 | 373 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 371 | 374 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
|---|---|---|
| 1311 | 1311 | 64*8 |
| 1312 | 1312 | }; |
| 1313 | 1313 | |
| 1314 | static const gfx_layout layout16x16 = | |
| 1315 | { | |
| 1316 | 16,16, | |
| 1317 | RGN_FRAC(1,1), | |
| 1318 | 4, | |
| 1319 | { GFX_RAW }, | |
| 1320 | { 0 }, /* org displacement */ | |
| 1321 | { 8*8 }, /* line modulo */ | |
| 1322 | 128*8 /* char modulo */ | |
| 1323 | }; | |
| 1314 | static GFXLAYOUT_RAW( layout16x16, 4, 16, 16, 8*8, 128*8 ) | |
| 1315 | static GFXLAYOUT_RAW( layout32x32, 4, 32, 32, 16*8, 512*8 ) | |
| 1324 | 1316 | |
| 1325 | static const gfx_layout layout32x32 = | |
| 1326 | { | |
| 1327 | 32,32, | |
| 1328 | RGN_FRAC(1,1), | |
| 1329 | 4, | |
| 1330 | { GFX_RAW }, | |
| 1331 | { 0 }, /* org displacement */ | |
| 1332 | { 16*8 }, /* line modulo */ | |
| 1333 | 512*8 /* char modulo */ | |
| 1334 | }; | |
| 1335 | ||
| 1336 | 1317 | static GFXDECODE_START( cps2 ) |
| 1337 | 1318 | GFXDECODE_ENTRY( REGION_GFX1, 0, cps1_layout8x8, 0, 0x100 ) |
| 1338 | 1319 | GFXDECODE_ENTRY( REGION_GFX1, 0, cps1_layout8x8_2, 0, 0x100 ) |
| r1490 | r1491 | |
|---|---|---|
| 19 | 19 | * DUART emulation is very simplistic, in progress. |
| 20 | 20 | * Digital volume control is not emulated. |
| 21 | 21 | |
| 22 | * During the attract mode of Cluedo, just after the camera flash, | |
| 23 | the camera colours go screwy and proceeding text is printed behind | |
| 24 | the camera. Is it a TMS34010 emulation flaw or original game code bug? | |
| 25 | For now, the GAME_IMPERFECT_GRAPHICS flag remains. | |
| 26 | ||
| 22 | 27 | **************************************************************************** |
| 23 | 28 | |
| 24 | 29 | Memory map (preliminary) |
| r1490 | r1491 | |
| 1024 | 1029 | GAME( 1995, cluedo, 0, jpmimpct, cluedo, 0, ROT0, "JPM", "Cluedo (prod. 2D)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 1025 | 1030 | GAME( 1995, cluedo2c, cluedo, jpmimpct, cluedo, 0, ROT0, "JPM", "Cluedo (prod. 2C)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 1026 | 1031 | GAME( 1995, cluedo2, cluedo, jpmimpct, cluedo, 0, ROT0, "JPM", "Cluedo (prod. 2)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 1027 | GAME( 1996, trivialp, 0, jpmimpct, trivialp, 0, ROT0, "JPM", "Trivial Pursuit (prod. 1D)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1028 | GAME( 1997, scrabble, 0, jpmimpct, scrabble, 0, ROT0, "JPM", "Scrabble (rev. F)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1029 | GAME( 1998, hngmnjpm, 0, jpmimpct, hngmnjpm, 0, ROT0, "JPM", "Hangman (JPM)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) | |
| 1032 | GAME( 1996, trivialp, 0, jpmimpct, trivialp, 0, ROT0, "JPM", "Trivial Pursuit (prod. 1D)", GAME_SUPPORTS_SAVE ) | |
| 1033 | GAME( 1997, scrabble, 0, jpmimpct, scrabble, 0, ROT0, "JPM", "Scrabble (rev. F)", GAME_SUPPORTS_SAVE ) | |
| 1034 | GAME( 1998, hngmnjpm, 0, jpmimpct, hngmnjpm, 0, ROT0, "JPM", "Hangman (JPM)", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 27 | 27 | #include "machine/8255ppi.h" |
| 28 | 28 | #include "sound/ay8910.h" |
| 29 | 29 | #include "sound/dac.h" |
| 30 | #include "sound/5110intf.h" | |
| 31 | #include "sound/tms5110.h" | |
| 32 | 30 | #include "galaxian.h" |
| 33 | 31 | |
| 34 | 32 | |
| 35 | /*************************************************************************** | |
| 36 | AD2083 TMS5110 implementation (still wrong!) | |
| 37 | ***************************************************************************/ | |
| 38 | ||
| 39 | static INT32 speech_rom_address = 0; | |
| 40 | static INT32 speech_rom_address_hi = 0; | |
| 41 | static INT32 speech_rom_bit = 0; | |
| 42 | ||
| 43 | static void start_talking (void) | |
| 44 | { | |
| 45 | tms5110_CTL_w(0,TMS5110_CMD_SPEAK); | |
| 46 | tms5110_PDC_w(0,0); | |
| 47 | tms5110_PDC_w(0,1); | |
| 48 | tms5110_PDC_w(0,0); | |
| 49 | } | |
| 50 | ||
| 51 | static void reset_talking (void) | |
| 52 | { | |
| 53 | tms5110_CTL_w(0,TMS5110_CMD_RESET); | |
| 54 | tms5110_PDC_w(0,0); | |
| 55 | tms5110_PDC_w(0,1); | |
| 56 | tms5110_PDC_w(0,0); | |
| 57 | ||
| 58 | tms5110_PDC_w(0,0); | |
| 59 | tms5110_PDC_w(0,1); | |
| 60 | tms5110_PDC_w(0,0); | |
| 61 | ||
| 62 | tms5110_PDC_w(0,0); | |
| 63 | tms5110_PDC_w(0,1); | |
| 64 | tms5110_PDC_w(0,0); | |
| 65 | ||
| 66 | speech_rom_address = 0; | |
| 67 | speech_rom_address_hi = 0; | |
| 68 | speech_rom_bit = 0; | |
| 69 | } | |
| 70 | ||
| 71 | static int ad2083_speech_rom_read_bit(void) | |
| 72 | { | |
| 73 | UINT8 *ROM = memory_region(REGION_SOUND1); | |
| 74 | int bit; | |
| 75 | ||
| 76 | speech_rom_address %= memory_region_length(REGION_SOUND1); | |
| 77 | ||
| 78 | bit = (ROM[speech_rom_address] >> speech_rom_bit) & 1; | |
| 79 | // bit = (ROM[speech_rom_address] >> (speech_rom_bit ^ 7)) & 1; | |
| 80 | ||
| 81 | speech_rom_bit++; | |
| 82 | if(speech_rom_bit == 8) | |
| 83 | { | |
| 84 | speech_rom_address++; | |
| 85 | speech_rom_bit = 0; | |
| 86 | } | |
| 87 | ||
| 88 | return bit; | |
| 89 | } | |
| 90 | ||
| 91 | ||
| 92 | static WRITE8_HANDLER( ad2083_soundlatch_w ) | |
| 93 | { | |
| 94 | soundlatch_w(0,data); | |
| 95 | ||
| 96 | if(data & 0x80) | |
| 97 | { | |
| 98 | reset_talking(); | |
| 99 | } | |
| 100 | else if(data & 0x30) | |
| 101 | { | |
| 102 | start_talking(); | |
| 103 | ||
| 104 | if((data & 0x30) == 0x30) | |
| 105 | speech_rom_address_hi = 0x1000; | |
| 106 | else | |
| 107 | speech_rom_address_hi = 0; | |
| 108 | ||
| 109 | } | |
| 110 | } | |
| 111 | ||
| 112 | static WRITE8_HANDLER( ad2083_tms5110_ctrl_w ) | |
| 113 | { | |
| 114 | speech_rom_address = speech_rom_address_hi | (data * 0x40); | |
| 115 | } | |
| 116 | ||
| 117 | static MACHINE_START( ad2083 ) | |
| 118 | { | |
| 119 | state_save_register_global(speech_rom_address); | |
| 120 | state_save_register_global(speech_rom_address_hi); | |
| 121 | state_save_register_global(speech_rom_bit); | |
| 122 | } | |
| 123 | ||
| 124 | 33 | //cpu #0 (PC=00003F6C): warning - op-code execute on mapped I/O |
| 125 | 34 | extern int monsterz_count; |
| 126 | 35 | static READ8_HANDLER( monsterz_prot_r ) |
| r1490 | r1491 | |
| 643 | 552 | AM_RANGE(0x6805, 0x6805) AM_WRITE(galaxian_coin_counter_1_w) |
| 644 | 553 | AM_RANGE(0x6806, 0x6806) AM_WRITE(scramble_background_red_w) |
| 645 | 554 | AM_RANGE(0x6807, 0x6807) AM_WRITE(scramble_background_green_w) |
| 646 | AM_RANGE(0x8000, 0x8000) AM_WRITE( | |
| 555 | AM_RANGE(0x8000, 0x8000) AM_WRITE( | |
| 647 | 556 | AM_RANGE(0x9000, 0x9000) AM_WRITE(hotshock_sh_irqtrigger_w) |
| 648 | 557 | AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) |
| 649 | 558 | AM_RANGE(0x8000, 0x8000) AM_READ(input_port_0_r) |
| r1490 | r1491 | |
| 654 | 563 | AM_RANGE(0xe800, 0xebff) AM_RAM |
| 655 | 564 | ADDRESS_MAP_END |
| 656 | 565 | |
| 657 | static ADDRESS_MAP_START( ad2083_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 658 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 659 | AM_RANGE(0x8000, 0x83ff) AM_RAM | |
| 660 | ADDRESS_MAP_END | |
| 661 | ||
| 662 | static ADDRESS_MAP_START( ad2083_sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 663 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 664 | AM_RANGE(0x01, 0x01) AM_WRITE(ad2083_tms5110_ctrl_w) | |
| 665 | AM_RANGE(0x10, 0x10) AM_WRITE(AY8910_control_port_0_w) | |
| 666 | AM_RANGE(0x20, 0x20) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 667 | AM_RANGE(0x40, 0x40) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 668 | AM_RANGE(0x80, 0x80) AM_WRITE(AY8910_control_port_1_w) | |
| 669 | ADDRESS_MAP_END | |
| 670 | ||
| 671 | 566 | static ADDRESS_MAP_START( triplep_readport, ADDRESS_SPACE_IO, 8 ) |
| 672 | 567 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 673 | 568 | AM_RANGE(0x01, 0x01) AM_READ(AY8910_read_port_0_r) |
| r1490 | r1491 | |
| 1776 | 1671 | PORT_DIPSETTING( 0x04, "150000" ) |
| 1777 | 1672 | PORT_DIPSETTING( 0x08, "100000" ) |
| 1778 | 1673 | PORT_DIPSETTING( 0x00, "200000" ) |
| 1779 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 1780 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1781 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 1674 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) | |
| 1675 | PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) | |
| 1676 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1782 | 1677 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Allow_Continue ) ) |
| 1783 | 1678 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 1784 | 1679 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| r1490 | r1491 | |
| 1973 | 1868 | 0 |
| 1974 | 1869 | }; |
| 1975 | 1870 | |
| 1976 | static const struct TMS5110interface tms5110_interface = | |
| 1977 | { | |
| 1978 | TMS5110_IS_5110A, | |
| 1979 | -1, /* rom_region */ | |
| 1980 | ad2083_speech_rom_read_bit /* M0 callback function. Called whenever chip requests a single bit of data */ | |
| 1981 | }; | |
| 1982 | 1871 | |
| 1983 | 1872 | static const gfx_layout scramble_charlayout = |
| 1984 | 1873 | { |
| r1490 | r1491 | |
| 2132 | 2021 | MDRV_SOUND_MODIFY("8910.2") |
| 2133 | 2022 | MDRV_SOUND_CONFIG(explorer_ay8910_interface_2) |
| 2134 | 2023 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) |
| 2135 | MACHINE_DRIVER_END | |
| 2136 | 2024 | |
| 2025 | MACHINE_DRIVER_END | |
| 2026 | ||
| 2137 | 2027 | static MACHINE_DRIVER_START( theend ) |
| 2138 | 2028 | |
| 2139 | 2029 | /* basic machine hardware */ |
| r1490 | r1491 | |
| 2514 | 2404 | MDRV_CPU_ADD(Z80, 18432000/6) /* 3.072 MHz */ |
| 2515 | 2405 | MDRV_CPU_PROGRAM_MAP(ad2083_map,0) |
| 2516 | 2406 | |
| 2517 | MDRV_CPU_ADD(Z80, 14318000/8) /* 1.78975 MHz */ | |
| 2518 | MDRV_CPU_PROGRAM_MAP(ad2083_sound_map,0) | |
| 2519 | MDRV_CPU_IO_MAP(ad2083_sound_io_map,0) | |
| 2520 | ||
| 2521 | MDRV_MACHINE_START(ad2083) | |
| 2522 | 2407 | MDRV_MACHINE_RESET(galaxian) |
| 2523 | 2408 | |
| 2524 | 2409 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r1490 | r1491 | |
| 2537 | 2422 | MDRV_VIDEO_UPDATE(galaxian) |
| 2538 | 2423 | |
| 2539 | 2424 | /* sound hardware */ |
| 2540 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 2541 | MDRV_SOUND_ADD(AY8910, 14318000/8) | |
| 2542 | MDRV_SOUND_CONFIG(explorer_ay8910_interface_1) | |
| 2543 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) | |
| 2544 | 2425 | |
| 2545 | MDRV_SOUND_ADD(AY8910, 14318000/8) | |
| 2546 | MDRV_SOUND_CONFIG(explorer_ay8910_interface_2) | |
| 2547 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) | |
| 2426 | MDRV_IMPORT_FROM(ad2083_audio) | |
| 2548 | 2427 | |
| 2549 | MDRV_SOUND_ADD(TMS5110, 640000) | |
| 2550 | MDRV_SOUND_CONFIG(tms5110_interface) | |
| 2551 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 2552 | 2428 | MACHINE_DRIVER_END |
| 2553 | 2429 | |
| 2554 | 2430 | static MACHINE_DRIVER_START( turpins ) |
| r1490 | r1491 | |
| 3370 | 3246 | ROM_LOAD( "ad5.3k", 0x2000, 0x2000, CRC(f53f3449) SHA1(0711f2e47504f256d46eea1e225e35f9bde8b9fb) ) |
| 3371 | 3247 | |
| 3372 | 3248 | ROM_REGION( 0x2000, REGION_SOUND1, 0 ) /* data for the TMS5110 speech chip */ |
| 3373 | ROM_LOAD( "ad1v.9a", 0x0000, 0x1000, CRC(4cb93fff) SHA1(2cc686a9a58a85f2bb04fb6ced4626e9952635bb) ) | |
| 3374 | ROM_LOAD( "ad2v.10a", 0x1000, 0x1000, CRC(4b530ea7) SHA1(8793b3497b598f33b34bf9524e360c6c62e8001d) ) | |
| 3249 | ROM_LOAD( "ad1v.9a", 0x0000, 0x1000, BAD_DUMP CRC(4cb93fff) SHA1(2cc686a9a58a85f2bb04fb6ced4626e9952635bb) ) | |
| 3250 | ROM_LOAD( "ad2v.10a", 0x1000, 0x1000, BAD_DUMP CRC(4b530ea7) SHA1(8793b3497b598f33b34bf9524e360c6c62e8001d) ) | |
| 3375 | 3251 | |
| 3376 | 3252 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) |
| 3377 | 3253 | ROM_LOAD( "prom-am27s19dc.1m", 0x0000, 0x0020, CRC(2759aebd) SHA1(644fd2c95ca49cbbc0ee1b88ca2563451ddd4fe0) ) |
| 3378 | 3254 | |
| 3379 | 3255 | ROM_REGION( 0x0020, REGION_USER1, 0 ) /* sample related? near TMS5110 and sample roms */ |
| 3380 | ROM_LOAD( "prom-sn74s188.8a", 0x0000, 0x0020, CRC(5e395112) SHA1(427d6a5b5d0837db4bf804f392d77ba5a86ffd72) ) | |
| 3256 | ROM_LOAD( "prom-sn74s188.8a", 0x0000, 0x0020, BAD_DUMP CRC(5e395112) SHA1(427d6a5b5d0837db4bf804f392d77ba5a86ffd72) ) | |
| 3381 | 3257 | ROM_END |
| 3382 | 3258 | |
| 3383 | 3259 |
| r1490 | r1491 | |
|---|---|---|
| 342 | 342 | - dendeg2 hangs on init step 10. |
| 343 | 343 | - The analog controls don't seem to work in landgear. They work in test mode though. |
| 344 | 344 | - landgear has some weird crashes (after playing one round, after a couple of loops in attract mode) |
| 345 | - dendeg2x usually crashes when starting the game (lots of read and writes to invalid addresses) | |
| 346 | - All dendeg games have random wrong textures/palettes | |
| 347 | - Train board (external sound board with OKI6295) is not emulated | |
| 345 | - dendeg2x usually crashes when starting the game (lots of read and writes to invalid addresses). | |
| 346 | - All dendeg games have random wrong textures/palettes. | |
| 347 | - Train board (external sound board with OKI6295) is not emulated. | |
| 348 | - dangcurv hangs on its DSP test. DSP execution may be jumping into internal ROM space? | |
| 349 | - dangcurv needs correct controls hooking up. | |
| 348 | 350 | */ |
| 349 | 351 | |
| 350 | 352 | #include "driver.h" |
| r1490 | r1491 | |
| 1207 | 1209 | |
| 1208 | 1210 | INPUT_PORTS_END |
| 1209 | 1211 | |
| 1212 | // TODO | |
| 1213 | static INPUT_PORTS_START( dangcurv ) | |
| 1214 | PORT_START | |
| 1215 | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 1216 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN1) | |
| 1217 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 1210 | 1218 | |
| 1219 | PORT_START | |
| 1220 | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 1221 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1) | |
| 1222 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE3) | |
| 1223 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE2) | |
| 1224 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 1225 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_TILT) | |
| 1211 | 1226 | |
| 1227 | PORT_START | |
| 1228 | PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 1229 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) // View button | |
| 1230 | ||
| 1231 | PORT_START | |
| 1232 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) // Shift down | |
| 1233 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON3) // Shift up | |
| 1234 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 1235 | ||
| 1236 | PORT_START_TAG("ANALOG1") // Steering | |
| 1237 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) | |
| 1238 | ||
| 1239 | PORT_START_TAG("ANALOG2") // Acceleration | |
| 1240 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) | |
| 1241 | ||
| 1242 | PORT_START_TAG("ANALOG3") // Brake | |
| 1243 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) | |
| 1244 | ||
| 1245 | INPUT_PORTS_END | |
| 1246 | ||
| 1247 | ||
| 1248 | ||
| 1249 | ||
| 1212 | 1250 | static MACHINE_RESET( taitojc ) |
| 1213 | 1251 | { |
| 1214 | 1252 | taito_f3_soundsystem_reset(); |
| r1490 | r1491 | |
| 1291 | 1329 | ROM_FILL( 0x0000, 0x0080, 0 ) |
| 1292 | 1330 | |
| 1293 | 1331 | ROM_REGION( 0x1800000, REGION_GFX1, 0 ) |
| 1294 | ROM_LOAD32_WORD( "e23-05.009", 0x0800002, 0x200000, CRC(9aa0d956) SHA1(bd146e3db7c2a53701eca6b43f903899ed15623a) ) | |
| 1295 | ROM_LOAD32_WORD( "e23-12.022", 0x0800000, 0x200000, CRC(c93fab09) SHA1(1ed292b11bf6bf09d1783d247f3de0c899e4df28) ) | |
| 1296 | ROM_LOAD32_WORD( "e23-06.010", 0x0c00002, 0x200000, CRC(2077ac3a) SHA1(894e1bbfef8a693bda50aa8681e8f283c0d6b6cf) ) | |
| 1297 | ROM_LOAD32_WORD( "e23-13.023", 0x0c00000, 0x200000, CRC(985f6785) SHA1(81cd33957b943f4bb33323fbf491ace344f8245b) ) | |
| 1298 | ROM_LOAD32_WORD( "e23-07.012", 0x1400002, 0x200000, CRC(bf1cd99d) SHA1(f98e1dacb485c7e40b0b2277a690d74ae020c9d9) ) | |
| 1299 | ROM_LOAD32_WORD( "e23-14.025", 0x1400000, 0x200000, CRC(9d54eac7) SHA1(4f97b388a0fd0529d26e1cc31491a0e2ce6c381d) ) | |
| 1332 | ROM_LOAD32_WORD( "e23-05.009", 0x0800002, 0x200000, BAD_DUMP CRC(9aa0d956) SHA1(bd146e3db7c2a53701eca6b43f903899ed15623a) ) | |
| 1333 | ROM_LOAD32_WORD( "e23-12.022", 0x0800000, 0x200000, BAD_DUMP CRC(c93fab09) SHA1(1ed292b11bf6bf09d1783d247f3de0c899e4df28) ) | |
| 1334 | ROM_LOAD32_WORD( "e23-06.010", 0x0c00002, 0x200000, BAD_DUMP CRC(2077ac3a) SHA1(894e1bbfef8a693bda50aa8681e8f283c0d6b6cf) ) | |
| 1335 | ROM_LOAD32_WORD( "e23-13.023", 0x0c00000, 0x200000, BAD_DUMP CRC(985f6785) SHA1(81cd33957b943f4bb33323fbf491ace344f8245b) ) | |
| 1336 | ROM_LOAD32_WORD( "e23-07.012", 0x1400002, 0x200000, BAD_DUMP CRC(bf1cd99d) SHA1(f98e1dacb485c7e40b0b2277a690d74ae020c9d9) ) | |
| 1337 | ROM_LOAD32_WORD( "e23-14.025", 0x1400000, 0x200000, BAD_DUMP CRC(9d54eac7) SHA1(4f97b388a0fd0529d26e1cc31491a0e2ce6c381d) ) | |
| 1300 | 1338 | |
| 1301 | 1339 | ROM_REGION( 0x1000000, REGION_GFX2, 0 ) /* only accessible to the TMS */ |
| 1302 | ROM_LOAD( "e23-01.005", 0x0000000, 0x200000, CRC(c5018242) SHA1(d1a45aa6899d9a95b32aeba0f9a4520714d5f5a3) ) | |
| 1303 | ROM_LOAD( "e23-02.006", 0x0200000, 0x200000, CRC(dbf24766) SHA1(2ee0bdb9f912f31bdf962a1af53ad1a6e3121a05) ) | |
| 1304 | ROM_LOAD( "e23-03.007", 0x0400000, 0x200000, CRC(3ab59dd0) SHA1(39e93d306a59017bef0f2fdadc69f96aecbffca6) ) | |
| 1305 | ROM_LOAD( "e23-04.008", 0x0600000, 0x200000, CRC(5060119c) SHA1(c8c5c33bd37121d222961ecfcdb79bbe6cbdf821) ) | |
| 1306 | ROM_LOAD( "e23-08.018", 0x0800000, 0x200000, CRC(04738f5b) SHA1(0ebc8c61d87f10822148f3b272612dc10ac4652c) ) | |
| 1307 | ROM_LOAD( "e23-09.019", 0x0a00000, 0x200000, CRC(089fac53) SHA1(3af008c65f4b60ae221b90fdb52d4e6fe552e5a8) ) | |
| 1308 | ROM_LOAD( "e23-10.020", 0x0c00000, 0x200000, CRC(dccb19ed) SHA1(35749c823ad9a30f471367750c087435b678b42f) ) | |
| 1309 | ROM_LOAD( "e23-11.021", 0x0e00000, 0x200000, CRC(6981a46f) SHA1(262bf821275413c70a1a8374185df64c697d8b04) ) | |
| 1340 | ROM_LOAD( "e23-01.005", 0x0000000, 0x200000, BAD_DUMP CRC(c5018242) SHA1(d1a45aa6899d9a95b32aeba0f9a4520714d5f5a3) ) | |
| 1341 | ROM_LOAD( "e23-02.006", 0x0200000, 0x200000, BAD_DUMP CRC(dbf24766) SHA1(2ee0bdb9f912f31bdf962a1af53ad1a6e3121a05) ) | |
| 1342 | ROM_LOAD( "e23-03.007", 0x0400000, 0x200000, BAD_DUMP CRC(3ab59dd0) SHA1(39e93d306a59017bef0f2fdadc69f96aecbffca6) ) | |
| 1343 | ROM_LOAD( "e23-04.008", 0x0600000, 0x200000, BAD_DUMP CRC(5060119c) SHA1(c8c5c33bd37121d222961ecfcdb79bbe6cbdf821) ) | |
| 1344 | ROM_LOAD( "e23-08.018", 0x0800000, 0x200000, BAD_DUMP CRC(04738f5b) SHA1(0ebc8c61d87f10822148f3b272612dc10ac4652c) ) | |
| 1345 | ROM_LOAD( "e23-09.019", 0x0a00000, 0x200000, BAD_DUMP CRC(089fac53) SHA1(3af008c65f4b60ae221b90fdb52d4e6fe552e5a8) ) | |
| 1346 | ROM_LOAD( "e23-10.020", 0x0c00000, 0x200000, BAD_DUMP CRC(dccb19ed) SHA1(35749c823ad9a30f471367750c087435b678b42f) ) | |
| 1347 | ROM_LOAD( "e23-11.021", 0x0e00000, 0x200000, BAD_DUMP CRC(6981a46f) SHA1(262bf821275413c70a1a8374185df64c697d8b04) ) | |
| 1310 | 1348 | |
| 1311 | 1349 | ROM_REGION16_BE( 0x1000000, REGION_SOUND1, ROMREGION_ERASE00 ) |
| 1312 | 1350 | ROM_LOAD16_BYTE( "e23-15.32", 0x000000, 0x200000, CRC(8955b7c7) SHA1(767626bd5cf6810b0368ee85e487c12ef7e8a23d)) |
| r1490 | r1491 | |
| 1632 | 1670 | */ |
| 1633 | 1671 | ROM_END |
| 1634 | 1672 | |
| 1673 | ROM_START( dangcurv ) | |
| 1674 | ROM_REGION(0x200000, REGION_CPU1, 0) /* 68040 code */ | |
| 1675 | ROM_LOAD32_BYTE("e09-23.036", 0x000000, 0x80000, CRC(b4cdadd6) SHA1(84bd1d055ff15afb5438cd5151abf78b0000cebc) ) | |
| 1676 | ROM_LOAD32_BYTE("e09-24.037", 0x000001, 0x80000, CRC(fb2fc795) SHA1(2f58d043ab9fc0269a5b6827009777cd7ab832fc) ) | |
| 1677 | ROM_LOAD32_BYTE("e09-25.038", 0x000002, 0x80000, CRC(aa233404) SHA1(a2b14e54eb1b5f6d4ed9f289b30ecfa654f21c87) ) | |
| 1678 | ROM_LOAD32_BYTE("e09-26.039", 0x000003, 0x80000, CRC(78337271) SHA1(bd29de6a5b6db3baddecf82c3b6c8b366c64289e) ) | |
| 1635 | 1679 | |
| 1680 | ROM_REGION( 0x180000, REGION_CPU2, 0 ) /* 68000 Code */ | |
| 1681 | ROM_LOAD16_BYTE( "e09-27.030", 0x100001, 0x040000, CRC(6d54839c) SHA1(a28c9b0727128b82bb0fa71dc951e3f03ee45e1b) ) | |
| 1682 | ROM_LOAD16_BYTE( "e09-28.031", 0x100000, 0x040000, CRC(566d7d83) SHA1(92661ccb631f843bf704c50d54fae28f6b5b272b) ) | |
| 1683 | ||
| 1684 | ROM_REGION( 0x010000, REGION_USER1, 0 ) /* MC68HC11M0 code */ | |
| 1685 | ROM_LOAD( "e09-29.065", 0x000000, 0x010000, CRC(80ac1428) SHA1(5a2a1e60a11ecdb8743c20ddacfb61f9fd00f01c) ) | |
| 1686 | ||
| 1687 | ROM_REGION( 0x00080, REGION_USER2, 0 ) /* eeprom */ | |
| 1688 | ROM_FILL( 0x0000, 0x0080, 0 ) | |
| 1689 | ||
| 1690 | ROM_REGION( 0x1800000, REGION_GFX1, 0 ) | |
| 1691 | ROM_LOAD32_WORD( "e09-05.009", 0x0800002, 0x200000, CRC(a948782f) SHA1(2a2b0d2955e036ddf424c54131435a20dbba3dd4) ) | |
| 1692 | ROM_LOAD32_WORD( "e09-13.022", 0x0800000, 0x200000, CRC(985859e2) SHA1(8af9a73eba2151a5ef60799682fe667663a42743) ) | |
| 1693 | ROM_LOAD32_WORD( "e09-06.010", 0x0c00002, 0x200000, CRC(218dcb5b) SHA1(72aedd2890e076540195d738c76ba446769c8e89) ) | |
| 1694 | ROM_LOAD32_WORD( "e09-14.023", 0x0c00000, 0x200000, CRC(6d123616) SHA1(01ac1e920f7c4a03adf365c8a7831b8385f0b78b) ) | |
| 1695 | ROM_LOAD32_WORD( "e09-07.011", 0x1000002, 0x200000, CRC(37fd7efc) SHA1(24a275d302ec8940479d15f1aeb96a288868bd41) ) | |
| 1696 | ROM_LOAD32_WORD( "e09-15.024", 0x1000000, 0x200000, CRC(0d773f3b) SHA1(f867a4d5956c2ebfa9858499d9716b4dc723d76b) ) | |
| 1697 | ROM_LOAD32_WORD( "e09-08.012", 0x1400002, 0x200000, CRC(5c080485) SHA1(c950cd00df5b6d2d0a119ba318fa8b0a3f471b29) ) | |
| 1698 | ROM_LOAD32_WORD( "e09-16.025", 0x1400000, 0x200000, CRC(35cb8346) SHA1(c2ecedd3c2a28213ef83e776f3007c974128189b) ) | |
| 1699 | ||
| 1700 | ROM_REGION( 0x1000000, REGION_GFX2, 0 ) /* only accessible to the TMS */ | |
| 1701 | ROM_LOAD( "e09-01.005", 0x0000000, 0x200000, CRC(22a6a53d) SHA1(6efa89151cd5ec43ab9bfa9b92694eb0018dd227) ) | |
| 1702 | ROM_LOAD( "e09-02.006", 0x0200000, 0x200000, CRC(405e2969) SHA1(376b9dd548d876af6798553a6da5deed4de00b76) ) | |
| 1703 | ROM_LOAD( "e09-03.007", 0x0400000, 0x200000, CRC(15327754) SHA1(bf08ab80875b400700241a66715e229dae6752d1) ) | |
| 1704 | ROM_LOAD( "e09-04.008", 0x0600000, 0x200000, CRC(fd598d6e) SHA1(679d9d64a0cd031a6c8cb5e170b77fc5811b6d73) ) | |
| 1705 | ROM_LOAD( "e09-09.018", 0x0800000, 0x200000, CRC(a527b387) SHA1(790240b4dfcdf2bf70edb943ec7aeb2f0d8cdfa9) ) | |
| 1706 | ROM_LOAD( "e09-10.019", 0x0a00000, 0x200000, CRC(4de6253c) SHA1(33517c0895b7ee04f4a84074d0b7bf42b53d5816) ) | |
| 1707 | ROM_LOAD( "e09-11.020", 0x0c00000, 0x200000, CRC(18cc0ba7) SHA1(626929a501def6f1b8bd6a468786efb0b0dda9fa) ) | |
| 1708 | ROM_LOAD( "e09-12.021", 0x0e00000, 0x200000, CRC(3273e438) SHA1(e9581d52f5db1c1924a860464579332a2f23e713) ) | |
| 1709 | ||
| 1710 | ROM_REGION16_BE( 0x1000000, REGION_SOUND1, ROMREGION_ERASE00 ) | |
| 1711 | ROM_LOAD16_BYTE( "e09-17.032", 0x000000, 0x200000, CRC(a8a6512e) SHA1(71bd3ccd65b731270b92da334b9fb99c28e267fe) ) | |
| 1712 | ROM_LOAD16_BYTE( "e09-18.033", 0x400000, 0x200000, CRC(bdf1f5eb) SHA1(a568a99a90e0afbcd26ddd320f515ed62cf0db1a) ) | |
| 1713 | ROM_LOAD16_BYTE( "e09-19.034", 0x800000, 0x200000, CRC(3626c7ed) SHA1(7535f0457b3d9fe1d54712a26322d6144b9e7de6) ) | |
| 1714 | ROM_LOAD16_BYTE( "e09-20.035", 0xc00000, 0x200000, CRC(9652a5c4) SHA1(2933e4e8e57ff618ce21721036d96347471c5539) ) | |
| 1715 | ROM_END | |
| 1716 | ||
| 1717 | ||
| 1636 | 1718 | GAME( 1996, dendeg, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go", GAME_NOT_WORKING ) |
| 1637 | 1719 | GAME( 1996, dendegx, dendeg, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go Ex", GAME_NOT_WORKING ) |
| 1638 | 1720 | GAME( 1998, dendeg2, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2", GAME_NOT_WORKING ) |
| r1490 | r1491 | |
| 1640 | 1722 | GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side", GAME_NOT_WORKING ) |
| 1641 | 1723 | GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side 2", GAME_IMPERFECT_GRAPHICS ) |
| 1642 | 1724 | GAME( 1995, landgear, 0, taitojc, landgear, taitojc, ROT0, "Taito", "Landing Gear", GAME_NOT_WORKING ) |
| 1725 | GAME( 1995, dangcurv, 0, taitojc, dangcurv, taitojc, ROT0, "Taito", "Dangerous Curves", GAME_NOT_WORKING ) |
| r1490 | r1491 | |
|---|---|---|
| 1 | /* Notes: DJH 04 Jan 2008 | |
| 2 | ||
| 3 | fixed gridiron079gre (shared access to spriteram was broken) | |
| 4 | ||
| 5 | This driver is antiquated.. the LED drawing in the video file is one giant | |
| 6 | hack, we should change it to use the artwork system, not hack it to draw | |
| 7 | characters from the gfx roms onscreen.. | |
| 8 | ||
| 9 | The inputs also seem to be a hacky mess (although there was reportedly a | |
| 10 | hardware joystick hack for tehkanwc via plugin logic subboard, is this | |
| 11 | attempting to simulate it? | |
| 12 | ||
| 13 | Also there is a hack to reset the sound CPU... | |
| 14 | ||
| 15 | */ | |
| 16 | ||
| 1 | 17 | /*************************************************************************** |
| 2 | 18 | |
| 3 | 19 | Tehkan World Cup - (c) Tehkan 1985 |
| r1490 | r1491 | |
| 100 | 116 | extern VIDEO_UPDATE( tehkanwc ); |
| 101 | 117 | |
| 102 | 118 | |
| 103 | static UINT8 *shared_ram; | |
| 104 | ||
| 105 | static READ8_HANDLER( shared_r ) | |
| 106 | { | |
| 107 | return shared_ram[offset]; | |
| 108 | } | |
| 109 | ||
| 110 | static WRITE8_HANDLER( shared_w ) | |
| 111 | { | |
| 112 | shared_ram[offset] = data; | |
| 113 | } | |
| 114 | ||
| 115 | 119 | static WRITE8_HANDLER( sub_cpu_halt_w ) |
| 116 | 120 | { |
| 117 | 121 | if (data) |
| r1490 | r1491 | |
| 230 | 234 | |
| 231 | 235 | |
| 232 | 236 | |
| 233 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 234 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) | |
| 235 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) | |
| 236 | AM_RANGE(0xc800, 0xcfff) AM_READ(shared_r) | |
| 237 | AM_RANGE(0xd000, 0xd3ff) AM_READ(MRA8_RAM) | |
| 238 | AM_RANGE(0xd400, 0xd7ff) AM_READ(MRA8_RAM) | |
| 239 | AM_RANGE(0xd800, 0xddff) AM_READ(MRA8_RAM) | |
| 240 | AM_RANGE(0xde00, 0xdfff) AM_READ(MRA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 241 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) | |
| 242 | AM_RANGE(0xe800, 0xebff) AM_READ(MRA8_RAM) /* sprites */ | |
| 243 | AM_RANGE(0xec00, 0xec01) AM_READ(MRA8_RAM) | |
| 244 | AM_RANGE(0xec02, 0xec02) AM_READ(MRA8_RAM) | |
| 245 | AM_RANGE(0xf800, 0xf801) AM_READ(tehkanwc_track_0_r) /* track 0 x/y */ | |
| 246 | AM_RANGE(0xf802, 0xf802) AM_READ(input_port_9_r) /* Coin & Start */ | |
| 237 | static ADDRESS_MAP_START( main_mem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 238 | AM_RANGE(0x0000, 0xbfff) AM_ROM | |
| 239 | AM_RANGE(0xc000, 0xc7ff) AM_RAM | |
| 240 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1) | |
| 241 | AM_RANGE(0xd000, 0xd3ff) AM_RAM AM_SHARE(2) AM_WRITE(tehkanwc_videoram_w) AM_BASE(&videoram) | |
| 242 | AM_RANGE(0xd400, 0xd7ff) AM_RAM AM_SHARE(3) AM_WRITE(tehkanwc_colorram_w) AM_BASE(&colorram) | |
| 243 | AM_RANGE(0xd800, 0xddff) AM_RAM AM_SHARE(4) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 244 | AM_RANGE(0xde00, 0xdfff) AM_RAM AM_SHARE(5) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 245 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(6) AM_WRITE(tehkanwc_videoram2_w) AM_BASE(&tehkanwc_videoram2) | |
| 246 | AM_RANGE(0xe800, 0xebff) AM_RAM AM_SHARE(7) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 247 | AM_RANGE(0xec00, 0xec01) AM_RAM AM_WRITE(tehkanwc_scroll_x_w) | |
| 248 | AM_RANGE(0xec02, 0xec02) AM_RAM AM_WRITE(tehkanwc_scroll_y_w) | |
| 249 | AM_RANGE(0xf800, 0xf801) AM_READWRITE(tehkanwc_track_0_r, tehkanwc_track_0_reset_w) /* track 0 x/y */ | |
| 250 | AM_RANGE(0xf802, 0xf802) AM_READWRITE(input_port_9_r, gridiron_led0_w) /* Coin & Start */ | |
| 247 | 251 | AM_RANGE(0xf803, 0xf803) AM_READ(input_port_5_r) /* joy0 - button */ |
| 248 | AM_RANGE(0xf810, 0xf811) AM_READ(tehkanwc_track_1_r) /* track 1 x/y */ | |
| 249 | AM_RANGE(0xf813, 0xf813) AM_READ(input_port_8_r) /* joy1 - button */ | |
| 250 | AM_RANGE(0xf820, 0xf820) AM_READ(soundlatch2_r) /* answer from the sound CPU */ | |
| 251 | AM_RANGE(0xf840, 0xf840) AM_READ(input_port_0_r) /* DSW1 */ | |
| 252 | AM_RANGE(0xf850, 0xf850) AM_READ(input_port_1_r) /* DSW2 */ | |
| 253 | AM_RANGE(0xf860, 0xf860) AM_READ(watchdog_reset_r) | |
| 254 | AM_RANGE(0xf870, 0xf870) AM_READ(input_port_2_r) /* DSW3 */ | |
| 255 | ADDRESS_MAP_END | |
| 256 | ||
| 257 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 258 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) | |
| 259 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) | |
| 260 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(shared_w) AM_BASE(&shared_ram) | |
| 261 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(tehkanwc_videoram_w) AM_BASE(&videoram) | |
| 262 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(tehkanwc_colorram_w) AM_BASE(&colorram) | |
| 263 | AM_RANGE(0xd800, 0xddff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 264 | AM_RANGE(0xde00, 0xdfff) AM_WRITE(MWA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 265 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(tehkanwc_videoram2_w) AM_BASE(&tehkanwc_videoram2) | |
| 266 | AM_RANGE(0xe800, 0xebff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 267 | AM_RANGE(0xec00, 0xec01) AM_WRITE(tehkanwc_scroll_x_w) | |
| 268 | AM_RANGE(0xec02, 0xec02) AM_WRITE(tehkanwc_scroll_y_w) | |
| 269 | AM_RANGE(0xf800, 0xf801) AM_WRITE(tehkanwc_track_0_reset_w) | |
| 270 | AM_RANGE(0xf802, 0xf802) AM_WRITE(gridiron_led0_w) | |
| 271 | AM_RANGE(0xf810, 0xf811) AM_WRITE(tehkanwc_track_1_reset_w) | |
| 252 | AM_RANGE(0xf806, 0xf806) AM_READ(input_port_9_r) /* Start */ | |
| 253 | AM_RANGE(0xf810, 0xf811) AM_READWRITE(tehkanwc_track_1_r, tehkanwc_track_1_reset_w) /* track 1 x/y */ | |
| 272 | 254 | AM_RANGE(0xf812, 0xf812) AM_WRITE(gridiron_led1_w) |
| 273 | AM_RANGE(0xf820, 0xf820) AM_WRITE(sound_command_w) | |
| 274 | AM_RANGE(0xf840, 0xf840) AM_WRITE(sub_cpu_halt_w) | |
| 275 | AM_RANGE(0xf850, 0xf850) AM_WRITE(MWA8_NOP) /* ?? writes 0x00 or 0xff */ | |
| 276 | AM_RANGE(0xf860, 0xf860) AM_WRITE(tehkanwc_flipscreen_x_w) /* Check if it's really X */ | |
| 277 | AM_RANGE(0xf870, 0xf870) AM_WRITE(tehkanwc_flipscreen_y_w) /* Check if it's really Y */ | |
| 278 | ADDRESS_MAP_END | |
| 279 | ||
| 280 | static ADDRESS_MAP_START( gridiron_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 281 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) | |
| 282 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) | |
| 283 | AM_RANGE(0xc800, 0xcfff) AM_READ(shared_r) | |
| 284 | AM_RANGE(0xd000, 0xd3ff) AM_READ(MRA8_RAM) | |
| 285 | AM_RANGE(0xd400, 0xd7ff) AM_READ(MRA8_RAM) | |
| 286 | AM_RANGE(0xd800, 0xddff) AM_READ(MRA8_RAM) | |
| 287 | AM_RANGE(0xde00, 0xdfff) AM_READ(MRA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 288 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) | |
| 289 | AM_RANGE(0xe800, 0xebff) AM_READ(MRA8_RAM) /* sprites */ | |
| 290 | AM_RANGE(0xec00, 0xec01) AM_READ(MRA8_RAM) | |
| 291 | AM_RANGE(0xec02, 0xec02) AM_READ(MRA8_RAM) | |
| 292 | AM_RANGE(0xf800, 0xf801) AM_READ(tehkanwc_track_0_r) /* track 0 x/y */ | |
| 293 | AM_RANGE(0xf802, 0xf802) AM_READ(input_port_9_r) /* Coin & Start */ | |
| 294 | AM_RANGE(0xf803, 0xf803) AM_READ(input_port_5_r) /* joy0 - button */ | |
| 295 | AM_RANGE(0xf810, 0xf811) AM_READ(tehkanwc_track_1_r) /* track 1 x/y */ | |
| 296 | 255 | AM_RANGE(0xf813, 0xf813) AM_READ(input_port_8_r) /* joy1 - button */ |
| 297 | AM_RANGE(0xf820, 0xf820) AM_READ(soundlatch2_r) /* answer from the sound CPU */ | |
| 298 | AM_RANGE(0xf840, 0xf840) AM_READ(input_port_0_r) /* DSW1 */ | |
| 299 | AM_RANGE(0xf850, 0xf850) AM_READ(input_port_1_r) /* DSW2 */ | |
| 300 | AM_RANGE(0xf860, 0xf860) AM_READ(watchdog_reset_r) | |
| 301 | AM_RANGE(0xf870, 0xf870) AM_READ(MRA8_NOP) /* ?? read in the IRQ handler */ | |
| 256 | AM_RANGE(0xf820, 0xf820) AM_READWRITE(soundlatch2_r, sound_command_w) /* answer from the sound CPU */ | |
| 257 | AM_RANGE(0xf840, 0xf840) AM_READWRITE(input_port_0_r, sub_cpu_halt_w) /* DSW1 */ | |
| 258 | AM_RANGE(0xf850, 0xf850) AM_READWRITE(input_port_1_r, MWA8_NOP) /* DSW2, ?? writes 0x00 or 0xff */ | |
| 259 | AM_RANGE(0xf860, 0xf860) AM_READWRITE(watchdog_reset_r, tehkanwc_flipscreen_x_w) | |
| 260 | AM_RANGE(0xf870, 0xf870) AM_READWRITE(input_port_2_r, tehkanwc_flipscreen_y_w) /* DSW3 */ | |
| 302 | 261 | ADDRESS_MAP_END |
| 303 | 262 | |
| 304 | static ADDRESS_MAP_START( gridiron_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 305 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) | |
| 306 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) | |
| 307 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(shared_w) AM_BASE(&shared_ram) | |
| 308 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(tehkanwc_videoram_w) AM_BASE(&videoram) | |
| 309 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(tehkanwc_colorram_w) AM_BASE(&colorram) | |
| 310 | AM_RANGE(0xd800, 0xddff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 311 | AM_RANGE(0xde00, 0xdfff) AM_WRITE(MWA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 312 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(tehkanwc_videoram2_w) AM_BASE(&tehkanwc_videoram2) | |
| 313 | AM_RANGE(0xe800, 0xebff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 314 | AM_RANGE(0xec00, 0xec01) AM_WRITE(tehkanwc_scroll_x_w) | |
| 315 | AM_RANGE(0xec02, 0xec02) AM_WRITE(tehkanwc_scroll_y_w) | |
| 316 | AM_RANGE(0xf800, 0xf801) AM_WRITE(tehkanwc_track_0_reset_w) | |
| 317 | AM_RANGE(0xf802, 0xf802) AM_WRITE(gridiron_led0_w) | |
| 318 | AM_RANGE(0xf810, 0xf811) AM_WRITE(tehkanwc_track_1_reset_w) | |
| 319 | AM_RANGE(0xf812, 0xf812) AM_WRITE(gridiron_led1_w) | |
| 320 | AM_RANGE(0xf820, 0xf820) AM_WRITE(sound_command_w) | |
| 321 | AM_RANGE(0xf840, 0xf840) AM_WRITE(sub_cpu_halt_w) | |
| 322 | AM_RANGE(0xf850, 0xf850) AM_WRITE(MWA8_NOP) /* ?? writes 0x00 or 0xff */ | |
| 323 | AM_RANGE(0xf860, 0xf860) AM_WRITE(tehkanwc_flipscreen_x_w) /* Check if it's really X */ | |
| 324 | AM_RANGE(0xf870, 0xf870) AM_WRITE(tehkanwc_flipscreen_y_w) /* Check if it's really Y */ | |
| 325 | ADDRESS_MAP_END | |
| 326 | ||
| 327 | static ADDRESS_MAP_START( teedoff_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 328 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) | |
| 329 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) | |
| 330 | AM_RANGE(0xc800, 0xcfff) AM_READ(shared_r) | |
| 331 | AM_RANGE(0xd000, 0xd3ff) AM_READ(MRA8_RAM) | |
| 332 | AM_RANGE(0xd400, 0xd7ff) AM_READ(MRA8_RAM) | |
| 333 | AM_RANGE(0xd800, 0xddff) AM_READ(MRA8_RAM) | |
| 334 | AM_RANGE(0xde00, 0xdfff) AM_READ(MRA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 335 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) | |
| 336 | AM_RANGE(0xe800, 0xebff) AM_READ(MRA8_RAM) /* sprites */ | |
| 337 | AM_RANGE(0xec00, 0xec01) AM_READ(MRA8_RAM) | |
| 338 | AM_RANGE(0xec02, 0xec02) AM_READ(MRA8_RAM) | |
| 339 | AM_RANGE(0xf800, 0xf801) AM_READ(tehkanwc_track_0_r) /* track 0 x/y */ | |
| 340 | AM_RANGE(0xf802, 0xf802) AM_READ(input_port_9_r) /* Coin */ | |
| 341 | AM_RANGE(0xf803, 0xf803) AM_READ(input_port_5_r) /* joy0 - button */ | |
| 342 | AM_RANGE(0xf806, 0xf806) AM_READ(input_port_9_r) /* Start */ | |
| 343 | AM_RANGE(0xf810, 0xf811) AM_READ(tehkanwc_track_1_r) /* track 1 x/y */ | |
| 344 | AM_RANGE(0xf813, 0xf813) AM_READ(input_port_8_r) /* joy1 - button */ | |
| 345 | AM_RANGE(0xf820, 0xf820) AM_READ(soundlatch2_r) /* answer from the sound CPU */ | |
| 346 | AM_RANGE(0xf840, 0xf840) AM_READ(input_port_0_r) /* DSW1 */ | |
| 347 | AM_RANGE(0xf850, 0xf850) AM_READ(input_port_1_r) /* DSW2 */ | |
| 263 | static ADDRESS_MAP_START( sub_mem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 264 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 265 | AM_RANGE(0x8000, 0xc7ff) AM_RAM | |
| 266 | AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE(1) | |
| 267 | AM_RANGE(0xd000, 0xd3ff) AM_RAM AM_SHARE(2) AM_WRITE(tehkanwc_videoram_w) | |
| 268 | AM_RANGE(0xd400, 0xd7ff) AM_RAM AM_SHARE(3) AM_WRITE(tehkanwc_colorram_w) | |
| 269 | AM_RANGE(0xd800, 0xddff) AM_RAM AM_SHARE(4) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 270 | AM_RANGE(0xde00, 0xdfff) AM_RAM AM_SHARE(5) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 271 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(6) AM_WRITE(tehkanwc_videoram2_w) | |
| 272 | AM_RANGE(0xe800, 0xebff) AM_RAM AM_SHARE(7) /* sprites */ | |
| 273 | AM_RANGE(0xec00, 0xec01) AM_READ(MRA8_RAM) AM_WRITE(tehkanwc_scroll_x_w) | |
| 274 | AM_RANGE(0xec02, 0xec02) AM_READ(MRA8_RAM) AM_WRITE(tehkanwc_scroll_y_w) | |
| 348 | 275 | AM_RANGE(0xf860, 0xf860) AM_READ(watchdog_reset_r) |
| 349 | 276 | ADDRESS_MAP_END |
| 350 | 277 | |
| 351 | static ADDRESS_MAP_START( teedoff_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 352 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) | |
| 353 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) | |
| 354 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(shared_w) AM_BASE(&shared_ram) | |
| 355 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(tehkanwc_videoram_w) AM_BASE(&videoram) | |
| 356 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(tehkanwc_colorram_w) AM_BASE(&colorram) | |
| 357 | AM_RANGE(0xd800, 0xddff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 358 | AM_RANGE(0xde00, 0xdfff) AM_WRITE(MWA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 359 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(tehkanwc_videoram2_w) AM_BASE(&tehkanwc_videoram2) | |
| 360 | AM_RANGE(0xe800, 0xebff) AM_WRITE(spriteram_w) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites */ | |
| 361 | AM_RANGE(0xec00, 0xec01) AM_WRITE(tehkanwc_scroll_x_w) | |
| 362 | AM_RANGE(0xec02, 0xec02) AM_WRITE(tehkanwc_scroll_y_w) | |
| 363 | AM_RANGE(0xf800, 0xf801) AM_WRITE(tehkanwc_track_0_reset_w) | |
| 364 | AM_RANGE(0xf802, 0xf802) AM_WRITE(gridiron_led0_w) | |
| 365 | AM_RANGE(0xf810, 0xf811) AM_WRITE(tehkanwc_track_1_reset_w) | |
| 366 | AM_RANGE(0xf812, 0xf812) AM_WRITE(gridiron_led1_w) | |
| 367 | AM_RANGE(0xf820, 0xf820) AM_WRITE(sound_command_w) | |
| 368 | AM_RANGE(0xf840, 0xf840) AM_WRITE(sub_cpu_halt_w) | |
| 369 | AM_RANGE(0xf850, 0xf850) AM_WRITE(MWA8_NOP) /* ?? Same value as in 0xf840 */ | |
| 370 | AM_RANGE(0xf860, 0xf860) AM_WRITE(tehkanwc_flipscreen_x_w) /* Check if it's really X */ | |
| 371 | AM_RANGE(0xf870, 0xf870) AM_WRITE(tehkanwc_flipscreen_y_w) /* Check if it's really Y */ | |
| 372 | ADDRESS_MAP_END | |
| 373 | ||
| 374 | static ADDRESS_MAP_START( readmem_sub, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 375 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) | |
| 376 | AM_RANGE(0x8000, 0xc7ff) AM_READ(MRA8_RAM) | |
| 377 | AM_RANGE(0xc800, 0xcfff) AM_READ(shared_r) | |
| 378 | AM_RANGE(0xd000, 0xd3ff) AM_READ(MRA8_RAM) | |
| 379 | AM_RANGE(0xd400, 0xd7ff) AM_READ(MRA8_RAM) | |
| 380 | AM_RANGE(0xd800, 0xddff) AM_READ(MRA8_RAM) | |
| 381 | AM_RANGE(0xde00, 0xdfff) AM_READ(MRA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 382 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) | |
| 383 | AM_RANGE(0xe800, 0xebff) AM_READ(MRA8_RAM) /* sprites */ | |
| 384 | AM_RANGE(0xec00, 0xec01) AM_READ(MRA8_RAM) | |
| 385 | AM_RANGE(0xec02, 0xec02) AM_READ(MRA8_RAM) | |
| 386 | AM_RANGE(0xf860, 0xf860) AM_READ(watchdog_reset_r) | |
| 387 | ADDRESS_MAP_END | |
| 388 | ||
| 389 | static ADDRESS_MAP_START( writemem_sub, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 390 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) | |
| 391 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) | |
| 392 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(shared_w) | |
| 393 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(tehkanwc_videoram_w) | |
| 394 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(tehkanwc_colorram_w) | |
| 395 | AM_RANGE(0xd800, 0xddff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE(&paletteram) | |
| 396 | AM_RANGE(0xde00, 0xdfff) AM_WRITE(MWA8_RAM) /* unused part of the palette RAM, I think? Gridiron uses it */ | |
| 397 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(tehkanwc_videoram2_w) | |
| 398 | AM_RANGE(0xe800, 0xebff) AM_WRITE(spriteram_w) /* sprites */ | |
| 399 | AM_RANGE(0xec00, 0xec01) AM_WRITE(tehkanwc_scroll_x_w) | |
| 400 | AM_RANGE(0xec02, 0xec02) AM_WRITE(tehkanwc_scroll_y_w) | |
| 401 | ADDRESS_MAP_END | |
| 402 | ||
| 403 | static ADDRESS_MAP_START( readmem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 404 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) | |
| 405 | AM_RANGE(0x4000, 0x47ff) AM_READ(MRA8_RAM) | |
| 406 | AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) | |
| 407 | ADDRESS_MAP_END | |
| 408 | ||
| 409 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 410 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) | |
| 411 | AM_RANGE(0x4000, 0x47ff) AM_WRITE(MWA8_RAM) | |
| 278 | static ADDRESS_MAP_START( sound_mem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 279 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 280 | AM_RANGE(0x4000, 0x47ff) AM_RAM | |
| 412 | 281 | AM_RANGE(0x8001, 0x8001) AM_WRITE(msm_reset_w)/* MSM51xx reset */ |
| 413 | 282 | AM_RANGE(0x8002, 0x8002) AM_WRITE(MWA8_NOP) /* ?? written in the IRQ handler */ |
| 414 | 283 | AM_RANGE(0x8003, 0x8003) AM_WRITE(MWA8_NOP) /* ?? written in the NMI handler */ |
| 415 | AM_RANGE(0xc000, 0xc000) AM_WRITE(sound_answer_w) | |
| 284 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(soundlatch_r, sound_answer_w) | |
| 416 | 285 | ADDRESS_MAP_END |
| 417 | 286 | |
| 418 | static ADDRESS_MAP_START( sound_ | |
| 287 | static ADDRESS_MAP_START( sound_ | |
| 419 | 288 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 420 | AM_RANGE(0x00, 0x00) AM_READ(AY8910_read_port_0_r) | |
| 421 | AM_RANGE(0x02, 0x02) AM_READ(AY8910_read_port_1_r) | |
| 422 | ADDRESS_MAP_END | |
| 423 | ||
| 424 | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) | |
| 425 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 426 | AM_RANGE(0x00, 0x00) AM_WRITE(AY8910_write_port_0_w) | |
| 289 | AM_RANGE(0x00, 0x00) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 427 | 290 | AM_RANGE(0x01, 0x01) AM_WRITE(AY8910_control_port_0_w) |
| 428 | AM_RANGE(0x02, 0x02) AM_WRITE(AY8910_write_port_1_w) | |
| 291 | AM_RANGE(0x02, 0x02) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 429 | 292 | AM_RANGE(0x03, 0x03) AM_WRITE(AY8910_control_port_1_w) |
| 430 | 293 | ADDRESS_MAP_END |
| 431 | 294 | |
| r1490 | r1491 | |
| 795 | 658 | static MACHINE_DRIVER_START( tehkanwc ) |
| 796 | 659 | |
| 797 | 660 | /* basic machine hardware */ |
| 798 | MDRV_CPU_ADD_TAG("main", Z80, 4608000) /* 18.432000 / 4 */ | |
| 799 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) | |
| 661 | MDRV_CPU_ADD_TAG("main", Z80, 18432000/4) /* 18.432000 / 4 */ | |
| 662 | MDRV_CPU_PROGRAM_MAP(main_mem,0) | |
| 800 | 663 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 801 | 664 | |
| 802 | MDRV_CPU_ADD(Z80, 4608000) /* 18.432000 / 4 */ | |
| 803 | MDRV_CPU_PROGRAM_MAP(readmem_sub,writemem_sub) | |
| 665 | MDRV_CPU_ADD(Z80, 18432000/4) | |
| 666 | MDRV_CPU_PROGRAM_MAP(sub_mem,0) | |
| 804 | 667 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 805 | 668 | |
| 806 | MDRV_CPU_ADD(Z80, 4608000) /* 18.432000 / 4; communication is bidirectional, can't mark it as AUDIO_CPU */ | |
| 807 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) | |
| 808 | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) | |
| 669 | MDRV_CPU_ADD(Z80, 18432000/4) | |
| 670 | MDRV_CPU_PROGRAM_MAP(sound_mem,0) | |
| 671 | MDRV_CPU_IO_MAP(sound_port,0) | |
| 809 | 672 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 810 | 673 | |
| 811 | 674 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1490 | r1491 | |
| 839 | 702 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.45) |
| 840 | 703 | MACHINE_DRIVER_END |
| 841 | 704 | |
| 842 | static MACHINE_DRIVER_START( gridiron ) | |
| 843 | 705 | |
| 844 | /* basic machine hardware */ | |
| 845 | MDRV_IMPORT_FROM(tehkanwc) | |
| 846 | MDRV_CPU_MODIFY("main") | |
| 847 | MDRV_CPU_PROGRAM_MAP(gridiron_readmem,gridiron_writemem) | |
| 848 | MACHINE_DRIVER_END | |
| 849 | ||
| 850 | static MACHINE_DRIVER_START( teedoff ) | |
| 851 | ||
| 852 | /* basic machine hardware */ | |
| 853 | MDRV_IMPORT_FROM(tehkanwc) | |
| 854 | MDRV_CPU_MODIFY("main") | |
| 855 | MDRV_CPU_PROGRAM_MAP(teedoff_readmem,teedoff_writemem) | |
| 856 | MACHINE_DRIVER_END | |
| 857 | ||
| 858 | ||
| 859 | ||
| 860 | 706 | static DRIVER_INIT( teedoff ) |
| 861 | 707 | { |
| 862 | 708 | /* Patch to avoid the game jumping in shared memory */ |
| r1490 | r1491 | |
| 1047 | 893 | |
| 1048 | 894 | GAME( 1985, tehkanwc, 0, tehkanwc, tehkanwc, 0, ROT0, "Tehkan", "Tehkan World Cup (set 1)", 0 ) |
| 1049 | 895 | GAME( 1985, tehkanwb, tehkanwc, tehkanwc, tehkanwc, 0, ROT0, "Tehkan", "Tehkan World Cup (set 2, bootleg?)", 0 ) |
| 1050 | GAME( 1985, gridiron, 0, gridiron, gridiron, 0, ROT0, "Tehkan", "Gridiron Fight", 0 ) | |
| 1051 | GAME( 1986, teedoff, 0, teedoff, teedoff, teedoff, ROT90, "Tecmo", "Tee'd Off (Japan)", 0 ) | |
| 896 | GAME( 1985, gridiron, 0, tehkanwc, gridiron, 0, ROT0, "Tehkan", "Gridiron Fight", 0 ) | |
| 897 | GAME( 1986, teedoff, 0, tehkanwc, teedoff, teedoff, ROT90, "Tecmo", "Tee'd Off (Japan)", 0 ) |
| r1490 | r1491 | |
|---|---|---|
| 215 | 215 | |
| 216 | 216 | /************************************* |
| 217 | 217 | * |
| 218 | * Port definitions | |
| 218 | * Port definitions and helpers | |
| 219 | 219 | * |
| 220 | 220 | *************************************/ |
| 221 | 221 | |
| 222 | #define SUPRRIDR_P1_CONTROL_PORT_TAG ("CONTP1") | |
| 223 | #define SUPRRIDR_P2_CONTROL_PORT_TAG ("CONTP2") | |
| 224 | ||
| 225 | static UINT32 suprridr_control_r(void *param) | |
| 226 | { | |
| 227 | UINT32 ret; | |
| 228 | ||
| 229 | /* screen flip multiplexes controls */ | |
| 230 | if (suprridr_is_screen_flipped()) | |
| 231 | ret = readinputportbytag(SUPRRIDR_P2_CONTROL_PORT_TAG); | |
| 232 | else | |
| 233 | ret = readinputportbytag(SUPRRIDR_P1_CONTROL_PORT_TAG); | |
| 234 | ||
| 235 | return ret; | |
| 236 | } | |
| 237 | ||
| 238 | ||
| 222 | 239 | static INPUT_PORTS_START( suprridr ) |
| 223 | 240 | PORT_START /* IN0 */ |
| 224 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 225 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 226 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 227 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 228 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 229 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 241 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(suprridr_control_r, 0) | |
| 230 | 242 | |
| 231 | 243 | PORT_START /* IN1 */ |
| 232 | 244 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r1490 | r1491 | |
| 259 | 271 | PORT_DIPNAME( 0x80, 0x00, "Invulnerability?" ) |
| 260 | 272 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 261 | 273 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 274 | ||
| 275 | PORT_START_TAG(SUPRRIDR_P1_CONTROL_PORT_TAG) | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 278 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 280 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 281 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 282 | ||
| 283 | PORT_START_TAG(SUPRRIDR_P2_CONTROL_PORT_TAG) | |
| 284 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 285 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 286 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 287 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 288 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 289 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 262 | 290 | INPUT_PORTS_END |
| 263 | 291 | |
| 264 | 292 |
| r1490 | r1491 | |
|---|---|---|
| 983 | 983 | &scsi_fetch, |
| 984 | 984 | }; |
| 985 | 985 | |
| 986 | static void model3_exit(running_machine *machine) | |
| 987 | { | |
| 988 | lsi53c810_exit(&scsi_intf); | |
| 989 | } | |
| 990 | ||
| 991 | static MACHINE_START(model3_10) | |
| 992 | { | |
| 993 | lsi53c810_init(&scsi_intf); | |
| 994 | add_exit_callback(machine, model3_exit); | |
| 995 | } | |
| 996 | static MACHINE_START(model3_15) | |
| 997 | { | |
| 998 | lsi53c810_init(&scsi_intf); | |
| 999 | add_exit_callback(machine, model3_exit); | |
| 1000 | } | |
| 1001 | ||
| 986 | 1002 | static void model3_init(running_machine *machine, int step) |
| 987 | 1003 | { |
| 988 | 1004 | model3_step = step; |
| r1490 | r1491 | |
| 1006 | 1022 | } else { |
| 1007 | 1023 | mpc105_init(); |
| 1008 | 1024 | } |
| 1009 | lsi53c810_init(&scsi_intf); | |
| 1010 | 1025 | real3d_device_id = 0x16c311db; /* PCI Vendor ID (11db = SEGA), Device ID (16c3 = 315-5827) */ |
| 1011 | 1026 | } |
| 1012 | 1027 | else { |
| r1490 | r1491 | |
| 4074 | 4089 | |
| 4075 | 4090 | MDRV_INTERLEAVE(10) |
| 4076 | 4091 | |
| 4092 | MDRV_MACHINE_START(model3_10) | |
| 4077 | 4093 | MDRV_MACHINE_RESET(model3_10) |
| 4078 | 4094 | MDRV_NVRAM_HANDLER(model3) |
| 4079 | 4095 | |
| r1490 | r1491 | |
| 4108 | 4124 | MDRV_CPU_ADD(M68000, 12000000) |
| 4109 | 4125 | MDRV_CPU_PROGRAM_MAP(model3_snd, 0) |
| 4110 | 4126 | |
| 4127 | MDRV_MACHINE_START(model3_15) | |
| 4111 | 4128 | MDRV_MACHINE_RESET(model3_15) |
| 4112 | 4129 | MDRV_NVRAM_HANDLER(model3) |
| 4113 | 4130 |
| r1490 | r1491 | |
|---|---|---|
| 530 | 530 | { |
| 531 | 531 | /* initialize the common systems */ |
| 532 | 532 | atarigen_eeprom_default = NULL; |
| 533 | atarijsa_init( | |
| 533 | atarijsa_init(machine, 2, 0x0040); | |
| 534 | 534 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 535 | 535 | |
| 536 | 536 | /* prepare the speedups */ |
| r1490 | r1491 | |
|---|---|---|
| 611 | 611 | static DRIVER_INIT( skullxbo ) |
| 612 | 612 | { |
| 613 | 613 | atarigen_eeprom_default = NULL; |
| 614 | atarijsa_init( | |
| 614 | atarijsa_init(machine, 1, 0x0080); | |
| 615 | 615 | memset(memory_region(REGION_GFX1) + 0x170000, 0, 0x20000); |
| 616 | 616 | } |
| 617 | 617 |
| r1490 | r1491 | |
|---|---|---|
| 2509 | 2509 | NULL /* command completion IRQ */ |
| 2510 | 2510 | }; |
| 2511 | 2511 | |
| 2512 | static | |
| 2512 | static void | |
| 2513 | 2513 | { |
| 2514 | wd33c93_exit(&scsi_intf); | |
| 2515 | } | |
| 2516 | ||
| 2517 | static MACHINE_START( cps3 ) | |
| 2518 | { | |
| 2514 | 2519 | wd33c93_init(&scsi_intf); |
| 2520 | add_exit_callback(machine, cps3_exit); | |
| 2521 | } | |
| 2515 | 2522 | |
| 2523 | static MACHINE_RESET( cps3 ) | |
| 2524 | { | |
| 2516 | 2525 | if (cps3_use_fastboot) |
| 2517 | 2526 | { |
| 2518 | 2527 | fastboot_timer = timer_alloc(fastboot_timer_callback, NULL); |
| r1490 | r1491 | |
| 2734 | 2743 | MDRV_SCREEN_SIZE(512*2, 224*2) |
| 2735 | 2744 | MDRV_SCREEN_VISIBLE_AREA(0, (384*1)-1, 0, 223/*511*/) |
| 2736 | 2745 | |
| 2746 | MDRV_MACHINE_START(cps3) | |
| 2737 | 2747 | MDRV_MACHINE_RESET(cps3) |
| 2738 | 2748 | MDRV_NVRAM_HANDLER( cps3 ) |
| 2739 | 2749 | MDRV_PALETTE_LENGTH(0x10000) // actually 0x20000 ... |
| r1490 | r1491 | |
|---|---|---|
| 1131 | 1131 | |
| 1132 | 1132 | static MACHINE_DRIVER_START( wotw ) |
| 1133 | 1133 | MDRV_IMPORT_FROM(cinemat_jmi_16k) |
| 1134 | MDRV_SCREEN_VISIBLE_AREA(0, 1120, 0, 767) | |
| 1134 | 1135 | MDRV_IMPORT_FROM(wotw_sound) |
| 1135 | 1136 | MACHINE_DRIVER_END |
| 1136 | 1137 | |
| r1490 | r1491 | |
| 1178 | 1179 | |
| 1179 | 1180 | |
| 1180 | 1181 | ROM_START( spacewar ) |
| 1181 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1182 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1182 | 1183 | ROM_LOAD16_BYTE( "spacewar.1l", 0x0000, 0x0800, CRC(edf0fd53) SHA1(a543d8b95bc77ec061c6b10161a6f3e07401e251) ) |
| 1183 | 1184 | ROM_LOAD16_BYTE( "spacewar.2r", 0x0001, 0x0800, CRC(4f21328b) SHA1(8889f1a9353d6bb1e1078829c1ba77557853739b) ) |
| 1184 | 1185 | |
| r1490 | r1491 | |
| 1187 | 1188 | |
| 1188 | 1189 | |
| 1189 | 1190 | ROM_START( barrier ) |
| 1190 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1191 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1191 | 1192 | ROM_LOAD16_BYTE( "barrier.t7", 0x0000, 0x0800, CRC(7c3d68c8) SHA1(1138029552b73e94522b3b48096befc057d603c7) ) |
| 1192 | 1193 | ROM_LOAD16_BYTE( "barrier.p7", 0x0001, 0x0800, CRC(aec142b5) SHA1(b268936b82e072f38f1f1dd54e0bc88bcdf19925) ) |
| 1193 | 1194 | |
| r1490 | r1491 | |
| 1196 | 1197 | |
| 1197 | 1198 | |
| 1198 | 1199 | ROM_START( speedfrk ) |
| 1199 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1200 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1200 | 1201 | ROM_LOAD16_BYTE( "speedfrk.t7", 0x0000, 0x0800, CRC(3552c03f) SHA1(c233dd064195b336556d7405b51065389b228c78) ) |
| 1201 | 1202 | ROM_LOAD16_BYTE( "speedfrk.p7", 0x0001, 0x0800, CRC(4b90cdec) SHA1(69e2312acdc22ef52236b1c4dfee9f51fcdcaa52) ) |
| 1202 | 1203 | ROM_LOAD16_BYTE( "speedfrk.u7", 0x1000, 0x0800, CRC(616c7cf9) SHA1(3c5bf59a09d85261f69e4b9d499cb7a93d79fb57) ) |
| r1490 | r1491 | |
| 1207 | 1208 | |
| 1208 | 1209 | |
| 1209 | 1210 | ROM_START( starhawk ) |
| 1210 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1211 | ROM_REGION( 0x1000, REGION_CPU1, 0 ) | |
| 1211 | 1212 | ROM_LOAD16_BYTE( "u7", 0x0000, 0x0800, CRC(376e6c5c) SHA1(7d9530ed2e75464578b541f61408ba64ee9d2a95) ) |
| 1212 | 1213 | ROM_LOAD16_BYTE( "r7", 0x0001, 0x0800, CRC(bb71144f) SHA1(79591cd3ef8df78ec26e158f7e82ca0dcd72260d) ) |
| 1213 | 1214 | |
| r1490 | r1491 | |
| 1216 | 1217 | |
| 1217 | 1218 | |
| 1218 | 1219 | ROM_START( sundance ) |
| 1219 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1220 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1220 | 1221 | ROM_LOAD16_BYTE( "sundance.t7", 0x0000, 0x0800, CRC(d5b9cb19) SHA1(72dca386b48a582186898c32123d61b4fd58632e) ) |
| 1221 | 1222 | ROM_LOAD16_BYTE( "sundance.p7", 0x0001, 0x0800, CRC(445c4f20) SHA1(972d0b0613f154ee3347206cae05ee8c36796f84) ) |
| 1222 | 1223 | ROM_LOAD16_BYTE( "sundance.u7", 0x1000, 0x0800, CRC(67887d48) SHA1(be225dbd3508fad2711286834880065a4fc0a2fc) ) |
| r1490 | r1491 | |
| 1227 | 1228 | |
| 1228 | 1229 | |
| 1229 | 1230 | ROM_START( tailg ) |
| 1230 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1231 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1231 | 1232 | ROM_LOAD16_BYTE( "tgunner.t70", 0x0000, 0x0800, CRC(21ec9a04) SHA1(b442f34360d1d4769e7bca73a2d79ce97d335460) ) |
| 1232 | 1233 | ROM_LOAD16_BYTE( "tgunner.p70", 0x0001, 0x0800, CRC(8d7410b3) SHA1(59ead49bd229a873f15334d0999c872d3d6581d4) ) |
| 1233 | 1234 | ROM_LOAD16_BYTE( "tgunner.t71", 0x1000, 0x0800, CRC(2c954ab6) SHA1(9edf189a19b50a9abf458d4ef8ba25b53934385e) ) |
| r1490 | r1491 | |
| 1238 | 1239 | |
| 1239 | 1240 | |
| 1240 | 1241 | ROM_START( warrior ) |
| 1241 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1242 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1242 | 1243 | ROM_LOAD16_BYTE( "warrior.t7", 0x0000, 0x0800, CRC(ac3646f9) SHA1(515c3acb638fad27fa57f6b438c8ec0b5b76f319) ) |
| 1243 | 1244 | ROM_LOAD16_BYTE( "warrior.p7", 0x0001, 0x0800, CRC(517d3021) SHA1(0483dcaf92c336a07d2c535823348ee886567e85) ) |
| 1244 | 1245 | ROM_LOAD16_BYTE( "warrior.u7", 0x1000, 0x0800, CRC(2e39340f) SHA1(4b3cfb3674dd2a668d4d65e28cb37d7ad20f118d) ) |
| r1490 | r1491 | |
| 1284 | 1285 | |
| 1285 | 1286 | |
| 1286 | 1287 | ROM_START( ripoff ) |
| 1287 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1288 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1288 | 1289 | ROM_LOAD16_BYTE( "ripoff.t7", 0x0000, 0x0800, CRC(40c2c5b8) SHA1(bc1f3b540475c9868443a72790a959b1f36b93c6) ) |
| 1289 | 1290 | ROM_LOAD16_BYTE( "ripoff.p7", 0x0001, 0x0800, CRC(a9208afb) SHA1(ea362494855be27a07014832b01e65c1645385d0) ) |
| 1290 | 1291 | ROM_LOAD16_BYTE( "ripoff.u7", 0x1000, 0x0800, CRC(29c13701) SHA1(5e7672deffac1fa8f289686a5527adf7e51eb0bb) ) |
| r1490 | r1491 | |
| 1295 | 1296 | |
| 1296 | 1297 | |
| 1297 | 1298 | ROM_START( starcas ) |
| 1298 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1299 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1299 | 1300 | ROM_LOAD16_BYTE( "starcas3.t7", 0x0000, 0x0800, CRC(b5838b5d) SHA1(6ac30be55514cba55180c85af69072b5056d1d4c) ) |
| 1300 | 1301 | ROM_LOAD16_BYTE( "starcas3.p7", 0x0001, 0x0800, CRC(f6bc2f4d) SHA1(ef6f01556b154cfb3e37b2a99d6ea6292e5ec844) ) |
| 1301 | 1302 | ROM_LOAD16_BYTE( "starcas3.u7", 0x1000, 0x0800, CRC(188cd97c) SHA1(c021e93a01e9c65013073de551a8c24fd1a68bde) ) |
| r1490 | r1491 | |
| 1305 | 1306 | ROM_END |
| 1306 | 1307 | |
| 1307 | 1308 | ROM_START( starcasp ) |
| 1308 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1309 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1309 | 1310 | ROM_LOAD16_BYTE( "starcasp.t7", 0x0000, 0x0800, CRC(d2c551a2) SHA1(90b5e1c6988839b812028f1baaea16420c011c08) ) |
| 1310 | 1311 | ROM_LOAD16_BYTE( "starcasp.p7", 0x0001, 0x0800, CRC(baa4e422) SHA1(9035ac675fcbbb93ae3f658339fdfaef47796dab) ) |
| 1311 | 1312 | ROM_LOAD16_BYTE( "starcasp.u7", 0x1000, 0x0800, CRC(26941991) SHA1(4417f2f3e437c1f39ff389362467928f57045d74) ) |
| r1490 | r1491 | |
| 1315 | 1316 | ROM_END |
| 1316 | 1317 | |
| 1317 | 1318 | ROM_START( starcas1 ) |
| 1318 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1319 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1319 | 1320 | ROM_LOAD16_BYTE( "starcast.t7", 0x0000, 0x0800, CRC(65d0a225) SHA1(e1fbee5ff42dd040ab2e90bbe2189fcb76d6167e) ) |
| 1320 | 1321 | ROM_LOAD16_BYTE( "starcast.p7", 0x0001, 0x0800, CRC(d8f58d9a) SHA1(abba459431dcacc75099b0d340b957be71b89cfd) ) |
| 1321 | 1322 | ROM_LOAD16_BYTE( "starcast.u7", 0x1000, 0x0800, CRC(d4f35b82) SHA1(cd4561ce8e1d0554ac1a8925bbf46d2c676a3b80) ) |
| r1490 | r1491 | |
| 1325 | 1326 | ROM_END |
| 1326 | 1327 | |
| 1327 | 1328 | ROM_START( starcase ) |
| 1328 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1329 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1329 | 1330 | ROM_LOAD16_BYTE( "starcast.t7", 0x0000, 0x0800, CRC(65d0a225) SHA1(e1fbee5ff42dd040ab2e90bbe2189fcb76d6167e) ) |
| 1330 | 1331 | ROM_LOAD16_BYTE( "starcast.p7", 0x0001, 0x0800, CRC(d8f58d9a) SHA1(abba459431dcacc75099b0d340b957be71b89cfd) ) |
| 1331 | 1332 | ROM_LOAD16_BYTE( "starcast.u7", 0x1000, 0x0800, CRC(d4f35b82) SHA1(cd4561ce8e1d0554ac1a8925bbf46d2c676a3b80) ) |
| r1490 | r1491 | |
| 1335 | 1336 | ROM_END |
| 1336 | 1337 | |
| 1337 | 1338 | ROM_START( stellcas ) |
| 1338 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1339 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1339 | 1340 | ROM_LOAD16_BYTE( "starcast.t7", 0x0000, 0x0800, CRC(65d0a225) SHA1(e1fbee5ff42dd040ab2e90bbe2189fcb76d6167e) ) |
| 1340 | 1341 | ROM_LOAD16_BYTE( "starcast.p7", 0x0001, 0x0800, CRC(d8f58d9a) SHA1(abba459431dcacc75099b0d340b957be71b89cfd) ) |
| 1341 | 1342 | ROM_LOAD16_BYTE( "elttron.u7", 0x1000, 0x0800, CRC(d5b44050) SHA1(a5dd6050ab1a3b0275a229845bc5e9524e2da69c) ) |
| r1490 | r1491 | |
| 1345 | 1346 | ROM_END |
| 1346 | 1347 | |
| 1347 | 1348 | ROM_START( spaceftr ) |
| 1348 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) /* 8k for code */ | |
| 1349 | ROM_LOAD16_BYTE( "fortrest7.7t", 0x0000, 0x0800, CRC(65d0a225) SHA1(e1fbee5ff42dd040ab2e90bbe2189fcb76d6167e) ) | |
| 1350 | ROM_LOAD16_BYTE( "fortresp7.7p", 0x0001, 0x0800, CRC(1a32aed6) SHA1(89c16a33288265e06e6fbd8426ba4ee9d81c221f) ) | |
| 1351 | ROM_LOAD16_BYTE( "fortresu7.7u", 0x1000, 0x0800, CRC(13b0287c) SHA1(366a23fd10684975bd5ee190e5227e47a0298ad5) ) | |
| 1352 | ROM_LOAD16_BYTE( "fortresr7.7r", 0x1001, 0x0800, CRC(a2c1ed52) SHA1(ed9743f44ee98c9e7c2a6819ec681af7c7a97fc9) ) | |
| 1349 | ROM_REGION( 0x2000, REGION_CPU1, 0 ) | |
| 1350 | ROM_LOAD16_BYTE( "fortrest7.7t", 0x0000, 0x0800, CRC(65d0a225) SHA1(e1fbee5ff42dd040ab2e90bbe2189fcb76d6167e) ) | |
| 1351 | ROM_LOAD16_BYTE( "fortresp7.7p", 0x0001, 0x0800, BAD_DUMP CRC(1a32aed6) SHA1(89c16a33288265e06e6fbd8426ba4ee9d81c221f) ) | |
| 1352 | ROM_LOAD16_BYTE( "fortresu7.7u", 0x1000, 0x0800, CRC(13b0287c) SHA1(366a23fd10684975bd5ee190e5227e47a0298ad5) ) | |
| 1353 | ROM_LOAD16_BYTE( "fortresr7.7r", 0x1001, 0x0800, CRC(a2c1ed52) SHA1(ed9743f44ee98c9e7c2a6819ec681af7c7a97fc9) ) | |
| 1353 | 1354 | |
| 1354 | 1355 | CCPU_PROMS |
| 1355 | 1356 | ROM_END |
| r1490 | r1491 | |
| 1496 | 1497 | GAMEL(1980, starcasp, starcas, starcas, starcas, 0, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (prototype)", GAME_SUPPORTS_SAVE, layout_starcas ) |
| 1497 | 1498 | GAMEL(1980, starcase, starcas, starcas, starcas, 0, ORIENTATION_FLIP_Y, "Cinematronics (Mottoeis license)", "Star Castle (Mottoeis)", GAME_SUPPORTS_SAVE, layout_starcas ) |
| 1498 | 1499 | GAMEL(1980, stellcas, starcas, starcas, starcas, 0, ORIENTATION_FLIP_Y, "bootleg", "Stellar Castle (Elettronolo)", GAME_SUPPORTS_SAVE, layout_starcas ) |
| 1499 | GAMEL(1981, spaceftr, starcas, starcas, starcas, 0, ORIENTATION_FLIP_Y, "Zaccaria", "Space Fortress (Zaccaria)", GAME_SUPPORTS_SAVE, layout_starcas ) | |
| 1500 | GAMEL(1981, spaceftr, starcas, starcas, starcas, 0, ORIENTATION_FLIP_Y, "Zaccaria", "Space Fortress (Zaccaria)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING, layout_starcas ) | |
| 1500 | 1501 | GAMEL(1981, solarq, 0, solarq, solarq, 0, ORIENTATION_FLIP_Y ^ ORIENTATION_FLIP_X, "Cinematronics", "Solar Quest", GAME_SUPPORTS_SAVE, layout_solarq ) |
| 1501 | 1502 | GAME( 1981, boxingb, 0, boxingb, boxingb, boxingb, ORIENTATION_FLIP_Y, "Cinematronics", "Boxing Bugs", GAME_SUPPORTS_SAVE ) |
| 1502 | 1503 | GAME( 1981, wotw, 0, wotw, wotw, 0, ORIENTATION_FLIP_Y, "Cinematronics", "War of the Worlds", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 384 | 384 | Initialisation handlers |
| 385 | 385 | ***************************************************************************/ |
| 386 | 386 | |
| 387 | static void toaplan2_reset(void) | |
| 388 | { | |
| 389 | if ( cpu_gettotalcpu() > 1 ) | |
| 390 | cpunum_set_input_line(1, INPUT_LINE_RESET, PULSE_LINE); | |
| 391 | } | |
| 387 | 392 | |
| 388 | 393 | static MACHINE_RESET( toaplan2 ) /* machine_reset_toaplan2(); */ |
| 389 | 394 | { |
| 390 | 395 | mcu_data = 0x00; |
| 396 | ||
| 397 | /* | |
| 398 | All games execute a RESET instruction on init, presumably to reset the sound CPU. | |
| 399 | This is important for games with common RAM; the RAM test will fail | |
| 400 | when leaving service mode if the sound CPU is not reset. | |
| 401 | */ | |
| 402 | cpunum_set_info_fct(0, CPUINFO_PTR_M68K_RESET_CALLBACK, (genf *)toaplan2_reset); | |
| 391 | 403 | } |
| 392 | 404 | |
| 393 | 405 | static MACHINE_RESET( ghox ) |
| 394 | 406 | { |
| 407 | machine_reset_toaplan2(machine); | |
| 395 | 408 | old_p1_paddle_h = 0; |
| 396 | 409 | old_p2_paddle_h = 0; |
| 397 | ||
| 398 | machine_reset_toaplan2(machine); | |
| 399 | 410 | } |
| 400 | 411 | |
| 401 | 412 | static MACHINE_RESET( dogyuun ) |
| 402 | 413 | { |
| 414 | machine_reset_toaplan2(machine); | |
| 403 | 415 | mcu_data = 0xffaa; |
| 404 | 416 | } |
| 405 | 417 | |
| 406 | 418 | static MACHINE_RESET( vfive ) |
| 407 | 419 | { |
| 420 | machine_reset_toaplan2(machine); | |
| 408 | 421 | mcu_data = 0xffaa; |
| 409 | 422 | } |
| 410 | 423 |
| r1490 | r1491 | |
|---|---|---|
| 13 | 13 | #include "sound/bsmt2000.h" |
| 14 | 14 | |
| 15 | 15 | |
| 16 | #define CPU_CLOCK XTAL_64MHz | |
| 17 | #define VIDEO_CLOCK XTAL_20MHz | |
| 18 | #define SOUND_CLOCK XTAL_24MHz | |
| 16 | 19 | |
| 20 | ||
| 21 | ||
| 17 | 22 | /************************************* |
| 18 | 23 | * |
| 19 | 24 | * Global variables |
| r1490 | r1491 | |
| 316 | 321 | { |
| 317 | 322 | FALSE, /* halt on reset */ |
| 318 | 323 | 0, /* the screen operated on */ |
| 319 | | |
| 324 | VIDEO_CLOCK/2, | |
| 320 | 325 | 1, /* pixels per clock */ |
| 321 | 326 | btoads_scanline_update, /* scanline callback */ |
| 322 | 327 | NULL, /* generate interrupt */ |
| r1490 | r1491 | |
| 334 | 339 | |
| 335 | 340 | static MACHINE_DRIVER_START( btoads ) |
| 336 | 341 | |
| 337 | MDRV_CPU_ADD(TMS34020, | |
| 342 | MDRV_CPU_ADD(TMS34020, CPU_CLOCK/2/TMS34020_CLOCK_DIVIDER) | |
| 338 | 343 | MDRV_CPU_CONFIG(tms_config) |
| 339 | 344 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 340 | 345 | |
| 341 | MDRV_CPU_ADD(Z80, 4 | |
| 346 | MDRV_CPU_ADD(Z80, SOUND_CLOCK/4 | |
| 342 | 347 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 343 | 348 | MDRV_CPU_IO_MAP(sound_io_map,0) |
| 344 | 349 | MDRV_CPU_PERIODIC_INT(irq0_line_assert, 183) |
| r1490 | r1491 | |
| 353 | 358 | |
| 354 | 359 | MDRV_SCREEN_ADD("main", 0) |
| 355 | 360 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 356 | MDRV_SCREEN_RAW_PARAMS( | |
| 361 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 257, 0, 224) | |
| 357 | 362 | |
| 358 | 363 | MDRV_VIDEO_START(btoads) |
| 359 | 364 | MDRV_VIDEO_UPDATE(tms340x0) |
| r1490 | r1491 | |
| 361 | 366 | /* sound hardware */ |
| 362 | 367 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 363 | 368 | |
| 364 | MDRV_SOUND_ADD(BSMT2000, | |
| 369 | MDRV_SOUND_ADD(BSMT2000, SOUND_CLOCK) | |
| 365 | 370 | MDRV_SOUND_CONFIG(bsmt2000_interface_region_1) |
| 366 | 371 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 367 | 372 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| r1490 | r1491 | |
|---|---|---|
| 1903 | 1903 | |
| 1904 | 1904 | /* audio hardware */ |
| 1905 | 1905 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1906 | MDRV_IMPORT_FROM(invinco_audio) | |
| 1906 | 1907 | MDRV_IMPORT_FROM(headon_audio) |
| 1907 | 1908 | |
| 1908 | 1909 | MACHINE_DRIVER_END |
| r1490 | r1491 | |
|---|---|---|
| 386 | 386 | static DRIVER_INIT( xybots ) |
| 387 | 387 | { |
| 388 | 388 | atarigen_eeprom_default = NULL; |
| 389 | atarigen_slapstic_init(0, 0x008000, 107); | |
| 390 | atarijsa_init(1, 2, 1, 0x0100); | |
| 389 | atarigen_slapstic_init(0, 0x008000, 0, 107); | |
| 390 | atarijsa_init(machine, 1, 0x0100); | |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 |
| r1490 | r1491 | |
|---|---|---|
| 2139 | 2139 | via_config(0, &via_interface); |
| 2140 | 2140 | |
| 2141 | 2141 | atarigen_eeprom_default = NULL; |
| 2142 | atarigen_slapstic_init(0, 0x080000, 103); | |
| 2142 | atarigen_slapstic_init(0, 0x080000, 0, 103); | |
| 2143 | 2143 | |
| 2144 | 2144 | joystick_type = 0; /* none */ |
| 2145 | 2145 | trackball_type = 1; /* rotated */ |
| r1490 | r1491 | |
| 2151 | 2151 | via_config(0, &via_interface); |
| 2152 | 2152 | |
| 2153 | 2153 | atarigen_eeprom_default = NULL; |
| 2154 | atarigen_slapstic_init(0, 0x080000, 107); | |
| 2154 | atarigen_slapstic_init(0, 0x080000, 0, 107); | |
| 2155 | 2155 | |
| 2156 | 2156 | joystick_type = 1; /* digital */ |
| 2157 | 2157 | trackball_type = 0; /* none */ |
| r1490 | r1491 | |
| 2163 | 2163 | via_config(0, &via_interface); |
| 2164 | 2164 | |
| 2165 | 2165 | atarigen_eeprom_default = NULL; |
| 2166 | atarigen_slapstic_init(0, 0x080000, 105); | |
| 2166 | atarigen_slapstic_init(0, 0x080000, 0, 105); | |
| 2167 | 2167 | |
| 2168 | 2168 | /* special case for the Indiana Jones slapstic */ |
| 2169 | 2169 | memory_set_opbase_handler(0,indytemp_setopbase); |
| r1490 | r1491 | |
| 2178 | 2178 | via_config(0, &via_interface); |
| 2179 | 2179 | |
| 2180 | 2180 | atarigen_eeprom_default = NULL; |
| 2181 | atarigen_slapstic_init(0, 0x080000, 108); | |
| 2181 | atarigen_slapstic_init(0, 0x080000, 0, 108); | |
| 2182 | 2182 | |
| 2183 | 2183 | joystick_type = 2; /* analog */ |
| 2184 | 2184 | trackball_type = 0; /* none */ |
| r1490 | r1491 | |
| 2190 | 2190 | via_config(0, &via_interface); |
| 2191 | 2191 | |
| 2192 | 2192 | atarigen_eeprom_default = NULL; |
| 2193 | atarigen_slapstic_init(0, 0x080000, 109); | |
| 2193 | atarigen_slapstic_init(0, 0x080000, 0, 109); | |
| 2194 | 2194 | |
| 2195 | 2195 | joystick_type = 3; /* pedal */ |
| 2196 | 2196 | trackball_type = 2; /* steering wheel */ |
| r1490 | r1491 | |
| 2202 | 2202 | via_config(0, &via_interface); |
| 2203 | 2203 | |
| 2204 | 2204 | atarigen_eeprom_default = NULL; |
| 2205 | atarigen_slapstic_init(0, 0x080000, 110); | |
| 2205 | atarigen_slapstic_init(0, 0x080000, 0, 110); | |
| 2206 | 2206 | |
| 2207 | 2207 | joystick_type = 3; /* pedal */ |
| 2208 | 2208 | trackball_type = 2; /* steering wheel */ |
| r1490 | r1491 | |
|---|---|---|
| 687 | 687 | 0x0118,0x0100,0x01C8,0x01D0,0x0000 |
| 688 | 688 | }; |
| 689 | 689 | atarigen_eeprom_default = default_eeprom; |
| 690 | atarijsa_init( | |
| 690 | atarijsa_init(machine, 2, 0x0040); | |
| 691 | 691 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 692 | 692 | |
| 693 | 693 | atarig42_playfield_base = 0x400; |
| r1490 | r1491 | |
| 738 | 738 | 0x0109,0x0100,0x0108,0x0134,0x0105,0x0148,0x1400,0x0000 |
| 739 | 739 | }; |
| 740 | 740 | atarigen_eeprom_default = default_eeprom; |
| 741 | atarijsa_init( | |
| 741 | atarijsa_init(machine, 2, 0x0040); | |
| 742 | 742 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 743 | 743 | |
| 744 | 744 | atarig42_playfield_base = 0x000; |
| r1490 | r1491 | |
|---|---|---|
| 540 | 540 | static DRIVER_INIT( vindictr ) |
| 541 | 541 | { |
| 542 | 542 | atarigen_eeprom_default = NULL; |
| 543 | atarijsa_init( | |
| 543 | atarijsa_init(machine, 1, 0x0002); | |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 |
| r1490 | r1491 | |
|---|---|---|
| 3568 | 3568 | |
| 3569 | 3569 | |
| 3570 | 3570 | /* 8x8x4 tiles */ |
| 3571 | static const gfx_layout layout_8x8x4 = | |
| 3572 | { | |
| 3573 | 8,8, | |
| 3574 | RGN_FRAC(1,1), | |
| 3575 | 4, | |
| 3576 | { GFX_RAW }, | |
| 3577 | { 0 }, /* org displacement */ | |
| 3578 | { 4*8 }, /* line modulo */ | |
| 3579 | 32*8 /* char modulo */ | |
| 3580 | }; | |
| 3571 | static GFXLAYOUT_RAW( layout_8x8x4, 4, 8, 8, 4*8, 32*8 ) | |
| 3581 | 3572 | |
| 3582 | 3573 | /* 8x8x8 tiles for later games */ |
| 3583 | static const gfx_layout layout_8x8x8h = | |
| 3584 | { | |
| 3585 | 8,8, | |
| 3586 | RGN_FRAC(1,1), | |
| 3587 | 8, | |
| 3588 | { GFX_RAW }, | |
| 3589 | { 0 }, /* org displacement */ | |
| 3590 | { 8*8 }, /* line modulo */ | |
| 3591 | 32*8 /* char modulo (half char step) */ | |
| 3592 | }; | |
| 3574 | static GFXLAYOUT_RAW( layout_8x8x8h, 8, 8, 8, 8*8, 32*8 ) | |
| 3593 | 3575 | |
| 3594 | 3576 | /* 16x16x4 tiles for later games */ |
| 3595 | static const gfx_layout layout_16x16x4q = | |
| 3596 | { | |
| 3597 | 16,16, | |
| 3598 | RGN_FRAC(1,1), | |
| 3599 | 4, | |
| 3600 | { GFX_RAW }, | |
| 3601 | { 0 }, /* org displacement */ | |
| 3602 | { 8*8 }, /* line modulo */ | |
| 3603 | 32*8 /* char modulo (quarter char step) */ | |
| 3604 | }; | |
| 3577 | static GFXLAYOUT_RAW( layout_16x16x4q, 4, 16, 16, 8*8, 32*8 ) | |
| 3605 | 3578 | |
| 3606 | 3579 | /* 16x16x8 tiles for later games */ |
| 3607 | static const gfx_layout layout_16x16x8o = | |
| 3608 | { | |
| 3609 | 16,16, | |
| 3610 | RGN_FRAC(1,1), | |
| 3611 | 8, | |
| 3612 | { GFX_RAW }, | |
| 3613 | { 0 }, /* org displacement */ | |
| 3614 | { 16*8 }, /* line modulo */ | |
| 3615 | 32*8 /* char modulo (1/8th char step) */ | |
| 3616 | }; | |
| 3580 | static GFXLAYOUT_RAW( layout_16x16x8o, 8, 16, 16, 16*8, 32*8 ) | |
| 3617 | 3581 | |
| 3618 | 3582 | static const gfx_layout layout_053936 = |
| 3619 | 3583 | { |
| r1490 | r1491 | |
|---|---|---|
| 56 | 56 | * |
| 57 | 57 | *************************************/ |
| 58 | 58 | |
| 59 | static MACHINE_START( midvunit ) | |
| 60 | { | |
| 61 | state_save_register_global(cmos_protected); | |
| 62 | state_save_register_global(control_data); | |
| 63 | state_save_register_global(adc_data); | |
| 64 | state_save_register_global(adc_shift); | |
| 65 | state_save_register_global(last_port0); | |
| 66 | state_save_register_global(shifter_state); | |
| 67 | state_save_register_global(timer_rate); | |
| 68 | } | |
| 69 | ||
| 70 | ||
| 59 | 71 | static MACHINE_RESET( midvunit ) |
| 60 | 72 | { |
| 61 | 73 | dcs_reset_w(1); |
| r1490 | r1491 | |
| 997 | 1009 | MDRV_CPU_ADD_TAG("main", TMS32031, CPU_CLOCK) |
| 998 | 1010 | MDRV_CPU_PROGRAM_MAP(midvunit_map,0) |
| 999 | 1011 | |
| 1012 | MDRV_MACHINE_START(midvunit) | |
| 1000 | 1013 | MDRV_MACHINE_RESET(midvunit) |
| 1001 | 1014 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 1002 | 1015 | |
| r1490 | r1491 | |
| 1429 | 1442 | * |
| 1430 | 1443 | *************************************/ |
| 1431 | 1444 | |
| 1432 | GAME( 1994, crusnusa, 0, midvunit, crusnusa, crusnusa, ROT0, "Midway", "Cruis'n USA (rev L4.1)", 0 ) | |
| 1433 | GAME( 1994, crusnu40, crusnusa, midvunit, crusnusa, crusnu40, ROT0, "Midway", "Cruis'n USA (rev L4.0)", 0 ) | |
| 1434 | GAME( 1994, crusnu21, crusnusa, midvunit, crusnusa, crusnu21, ROT0, "Midway", "Cruis'n USA (rev L2.1)", 0 ) | |
| 1435 | GAME( 1996, crusnwld, 0, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.4)", 0 ) | |
| 1436 | GAME( 1996, crusnw23, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.3)", 0 ) | |
| 1437 | GAME( 1996, crusnw20, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.0)", 0 ) | |
| 1438 | GAME( 1996, crusnw13, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L1.3)", 0 ) | |
| 1439 | GAME( 1997, offroadc, 0, midvunit, offroadc, offroadc, ROT0, "Midway", "Off Road Challenge", GAME_NOT_WORKING ) | |
| 1445 | GAME( 1994, crusnusa, 0, midvunit, crusnusa, crusnusa, ROT0, "Midway", "Cruis'n USA (rev L4.1)", GAME_SUPPORTS_SAVE ) | |
| 1446 | GAME( 1994, crusnu40, crusnusa, midvunit, crusnusa, crusnu40, ROT0, "Midway", "Cruis'n USA (rev L4.0)", GAME_SUPPORTS_SAVE ) | |
| 1447 | GAME( 1994, crusnu21, crusnusa, midvunit, crusnusa, crusnu21, ROT0, "Midway", "Cruis'n USA (rev L2.1)", GAME_SUPPORTS_SAVE ) | |
| 1448 | GAME( 1996, crusnwld, 0, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.4)", GAME_SUPPORTS_SAVE ) | |
| 1449 | GAME( 1996, crusnw23, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.3)", GAME_SUPPORTS_SAVE ) | |
| 1450 | GAME( 1996, crusnw20, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L2.0)", GAME_SUPPORTS_SAVE ) | |
| 1451 | GAME( 1996, crusnw13, crusnwld, midvunit, crusnwld, crusnwld, ROT0, "Midway", "Cruis'n World (rev L1.3)", GAME_SUPPORTS_SAVE ) | |
| 1452 | GAME( 1997, offroadc, 0, midvunit, offroadc, offroadc, ROT0, "Midway", "Off Road Challenge", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) | |
| 1440 | 1453 | |
| 1441 | GAME( 1995, wargods, 0, midvplus, wargods, wargods, ROT0, "Midway", "War Gods", | |
| 1454 | GAME( 1995, wargods, 0, midvplus, wargods, wargods, ROT0, "Midway", "War Gods", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 203 | 203 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 204 | 204 | |
| 205 | 205 | PORT_START /* DSW #3 */ |
| 206 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_ | |
| 206 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 207 | 207 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 208 | 208 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 209 | 209 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1490 | r1491 | |
|---|---|---|
| 384 | 384 | memory_configure_bank(1, 1, 1, memory_region(REGION_USER1), 0); |
| 385 | 385 | |
| 386 | 386 | /* intialize akiko */ |
| 387 | amiga_akiko_init(); | |
| 387 | amiga_akiko_init(machine); | |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /***************************************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 433 | 433 | 16,16, |
| 434 | 434 | 16, |
| 435 | 435 | 2, |
| 436 | { 0, 4 | |
| 436 | { 0, 4 | |
| 437 | 437 | { |
| 438 | 438 | 24,25,26,27, 16,17,18,19, 8,9,10,11, 0,1,2,3 |
| 439 | 439 | }, |
| r1490 | r1491 | |
|---|---|---|
| 83 | 83 | ***************************************************************************/ |
| 84 | 84 | |
| 85 | 85 | #include "driver.h" |
| 86 | #include "cvs.h" | |
| 86 | 87 | #include "cpu/s2650/s2650.h" |
| 87 | 88 | #include "sound/dac.h" |
| 88 | 89 | #include "sound/5110intf.h" |
| 89 | 90 | #include "sound/tms5110.h" |
| 90 | 91 | #include "video/s2636.h" |
| 91 | 92 | |
| 92 | INTERRUPT_GEN( cvs_interrupt ); | |
| 93 | PALETTE_INIT( cvs ); | |
| 94 | VIDEO_UPDATE( cvs ); | |
| 95 | VIDEO_START( cvs ); | |
| 96 | 93 | |
| 97 | extern UINT8 *cvs_bullet_ram; | |
| 98 | ||
| 99 | WRITE8_HANDLER( cvs_videoram_w ); | |
| 100 | WRITE8_HANDLER( cvs_bullet_w ); | |
| 101 | WRITE8_HANDLER( cvs_2636_1_w ); | |
| 102 | WRITE8_HANDLER( cvs_2636_2_w ); | |
| 103 | WRITE8_HANDLER( cvs_2636_3_w ); | |
| 104 | WRITE8_HANDLER( cvs_scroll_w ); | |
| 105 | WRITE8_HANDLER( cvs_video_fx_w ); | |
| 106 | ||
| 107 | READ8_HANDLER( cvs_collision_r ); | |
| 108 | READ8_HANDLER( cvs_collision_clear ); | |
| 109 | READ8_HANDLER( cvs_videoram_r ); | |
| 110 | READ8_HANDLER( cvs_bullet_r ); | |
| 111 | READ8_HANDLER( cvs_2636_1_r ); | |
| 112 | READ8_HANDLER( cvs_2636_2_r ); | |
| 113 | READ8_HANDLER( cvs_2636_3_r ); | |
| 114 | READ8_HANDLER( cvs_character_mode_r ); | |
| 115 | ||
| 116 | ||
| 117 | 94 | /*************************************************************************** |
| 118 | 95 | Speech Calls |
| 119 | 96 | ***************************************************************************/ |
| r1490 | r1491 | |
| 229 | 206 | |
| 230 | 207 | static ADDRESS_MAP_START( cvs_cpu1_program, ADDRESS_SPACE_PROGRAM, 8 ) |
| 231 | 208 | AM_RANGE(0x0000, 0x13ff) AM_ROM |
| 232 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_r, cvs_bullet_w) AM_BASE(&cvs_bullet_ram) | |
| 233 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_3_r, cvs_2636_3_w) AM_BASE(&s2636_3_ram) | |
| 234 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_2_r, cvs_2636_2_w) AM_BASE(&s2636_2_ram) | |
| 235 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_1_r, cvs_2636_1_w) AM_BASE(&s2636_1_ram) | |
| 236 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_videoram_r, cvs_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 209 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, cvs_bullet_ram_or_palette_w) AM_BASE(&cvs_bullet_ram) | |
| 210 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_3_or_character_ram_r, cvs_s2636_3_or_character_ram_w) AM_BASE(&s2636_3_ram) | |
| 211 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&s2636_2_ram) | |
| 212 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&s2636_1_ram) | |
| 213 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, cvs_video_or_color_ram_w) AM_BASE(&cvs_video_ram) | |
| 237 | 214 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 238 | 215 | AM_RANGE(0x2000, 0x33ff) AM_ROM |
| 239 | 216 | AM_RANGE(0x4000, 0x53ff) AM_ROM |
| r1490 | r1491 | |
| 241 | 218 | ADDRESS_MAP_END |
| 242 | 219 | |
| 243 | 220 | static ADDRESS_MAP_START( cvs_cpu1_io, ADDRESS_SPACE_IO, 8 ) |
| 244 | AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) | |
| 245 | AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r) | |
| 246 | AM_RANGE(0x03, 0x03) AM_READ(input_port_2_r) | |
| 247 | AM_RANGE(0x04, 0x04) AM_READ(input_port_3_r) | |
| 248 | AM_RANGE(0x06, 0x06) AM_READ(input_port_4_r) // Dip 1 | |
| 249 | AM_RANGE(0x07, 0x07) AM_READ(input_port_5_r) // Dip 2 | |
| 250 | AM_RANGE(0x10, 0xff) AM_READ(cvs_character_mode_r) // Programmable Character Settings | |
| 251 | AM_RANGE(0x00, 0xff) AM_WRITE(cvs_scroll_w) | |
| 221 | AM_RANGE(0x00, 0xff) AM_READWRITE(cvs_input_r, cvs_scroll_w) | |
| 252 | 222 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(cvs_collision_clear, cvs_video_fx_w) |
| 253 | 223 | AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE(cvs_collision_r, control_port_w) |
| 254 | 224 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_6_r) |
| r1490 | r1491 | |
| 337 | 307 | |
| 338 | 308 | INPUT_PORTS_END |
| 339 | 309 | |
| 340 | static const gfx_layout charlayout | |
| 310 | static const gfx_layout charlayout | |
| 341 | 311 | { |
| 342 | 312 | 8,8, /* 8*8 characters */ |
| 343 | 313 | 256, /* 256 characters */ |
| r1490 | r1491 | |
| 348 | 318 | 8*8 /* every char takes 8 consecutive bytes */ |
| 349 | 319 | }; |
| 350 | 320 | |
| 351 | /* S2636 Mappings */ | |
| 352 | ||
| 353 | static const gfx_layout s2636_character10 = | |
| 354 | { | |
| 355 | 8,10, | |
| 356 | 5, | |
| 357 | 1, | |
| 358 | { 0 }, | |
| 359 | { 0,1,2,3,4,5,6,7 }, | |
| 360 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 361 | 8*16 | |
| 362 | }; | |
| 363 | ||
| 364 | 321 | static GFXDECODE_START( cvs ) |
| 365 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout8colour, 0, 259 ) /* Rom chars */ | |
| 366 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout8colour, 0, 259 ) /* Ram chars */ | |
| 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #1 */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #2 */ | |
| 369 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #3 */ | |
| 322 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 259 ) /* chars */ | |
| 323 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #1 */ | |
| 324 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #2 */ | |
| 325 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #3 */ | |
| 370 | 326 | GFXDECODE_END |
| 371 | 327 | |
| 372 | 328 | static MACHINE_DRIVER_START( cvs ) |
| r1490 | r1491 | |
| 429 | 385 | ROM_LOAD( "82s185.10h", 0x0000, 0x0800, CRC(c205bca6) SHA1(ec9bd220e75f7b067ede6139763ef8aca0fb7a29) ) |
| 430 | 386 | ROM_LOAD( "82s123.10k", 0x0800, 0x0020, CRC(b5221cec) SHA1(71d9830b33b1a8140b0fe1a2ba8024ba8e6e48e0) ) |
| 431 | 387 | |
| 432 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 388 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 433 | 389 | ROM_FILL(0x000000, 0x1800, 0 ) |
| 434 | 390 | ROM_END |
| 435 | 391 | |
| r1490 | r1491 | |
| 467 | 423 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 468 | 424 | ROM_LOAD( "ho-sp1.bin", 0x0000, 0x1000, CRC(3fd39b1e) SHA1(f5d0b2cfaeda994762403f039a6f7933c5525234) ) |
| 469 | 425 | |
| 470 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 426 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 471 | 427 | ROM_LOAD( "ho-cp1.bin", 0x0000, 0x0800, CRC(c6c73d46) SHA1(63aba92f77105fedf46337b591b074020bec05d0) ) |
| 472 | 428 | ROM_LOAD( "ho-cp2.bin", 0x0800, 0x0800, CRC(e596371c) SHA1(93a0d0ccdf830ae72d070b03b7e2222f4a737ead) ) |
| 473 | 429 | ROM_LOAD( "ho-cp3.bin", 0x1000, 0x0800, CRC(11fae1cf) SHA1(5ceabfb1ff1a6f76d1649512f57d7151f5258ecb) ) |
| r1490 | r1491 | |
| 510 | 466 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 511 | 467 | ROM_LOAD( "dw-sp1.bin", 0x0000, 0x1000, CRC(ce815074) SHA1(105f24fb776131b30e35488cca29954298559518) ) |
| 512 | 468 | |
| 513 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 469 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 514 | 470 | ROM_LOAD( "dw-cp1.bin", 0x0000, 0x0800, CRC(7a0f9f3e) SHA1(0aa787923fbb614f15016d99c03093a59a0bfb88) ) |
| 515 | 471 | ROM_LOAD( "dw-cp2.bin", 0x0800, 0x0800, CRC(232e5120) SHA1(76e4d6d17e8108306761604bd56d6269bfc431e1) ) |
| 516 | 472 | ROM_LOAD( "dw-cp3.bin", 0x1000, 0x0800, CRC(573e0a17) SHA1(9c7991eac625b287bafb6cf722ffb405a9627e09) ) |
| r1490 | r1491 | |
| 553 | 509 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 554 | 510 | ROM_LOAD( "8b-sp1.bin", 0x0000, 0x0800, CRC(1ee167f3) SHA1(40c876a60832456a27108252ba0b9963f9fe70b0) ) |
| 555 | 511 | |
| 556 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 512 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 557 | 513 | ROM_LOAD( "8b-cp1.bin", 0x0000, 0x0800, CRC(c1f68754) SHA1(481c8e3dc35300f779b7925fa8a54320688dac54) ) |
| 558 | 514 | ROM_LOAD( "8b-cp2.bin", 0x0800, 0x0800, CRC(6ec1d711) SHA1(768df8e621a7b110a963c93402ee01b1c9009286) ) |
| 559 | 515 | ROM_LOAD( "8b-cp3.bin", 0x1000, 0x0800, CRC(4a9afce4) SHA1(187e5106aa2d0bdebf6ec9f2b7c2c2f67d47d221) ) |
| r1490 | r1491 | |
| 596 | 552 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 597 | 553 | ROM_LOAD( "8b-sp1.bin", 0x0000, 0x0800, CRC(1ee167f3) SHA1(40c876a60832456a27108252ba0b9963f9fe70b0) ) |
| 598 | 554 | |
| 599 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 555 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 600 | 556 | ROM_LOAD( "8a-cp1.bin", 0x0000, 0x0800, CRC(d9b36c16) SHA1(dbb496102fa2344f19b5d9a3eecdb29c433e4c08) ) |
| 601 | 557 | ROM_LOAD( "8a-cp2.bin", 0x0800, 0x0800, CRC(6f66f0ff) SHA1(1e91474973356e97f89b4d9093565747a8331f50) ) |
| 602 | 558 | ROM_LOAD( "8a-cp3.bin", 0x1000, 0x0800, CRC(baee8b17) SHA1(9f86f1d5903aeead17cc75dac8a2b892bb375dad) ) |
| r1490 | r1491 | |
| 639 | 595 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 640 | 596 | ROM_LOAD( "hb-sp1.bin", 0x0000, 0x0800, CRC(ed1cd201) SHA1(6cc3842dda1bfddc06ffb436c55d14276286bd67) ) |
| 641 | 597 | |
| 642 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 598 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 643 | 599 | ROM_LOAD( "hb-cp1.bin", 0x0000, 0x0800, CRC(f256b047) SHA1(02d79882bad37ffdd58ef478e2658a1369c32ebc) ) |
| 644 | 600 | ROM_LOAD( "hb-cp2.bin", 0x0800, 0x0800, CRC(b870c64f) SHA1(ce4f8de87568782ce02bba754edff85df7f5c393) ) |
| 645 | 601 | ROM_LOAD( "hb-cp3.bin", 0x1000, 0x0800, CRC(9a7dab88) SHA1(cd39a9d4f982a7f49c478db1408d7e07335f2ddc) ) |
| r1490 | r1491 | |
| 682 | 638 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 683 | 639 | ROM_LOAD( "hb-sp1.bin", 0x0000, 0x0800, CRC(ed1cd201) SHA1(6cc3842dda1bfddc06ffb436c55d14276286bd67) ) |
| 684 | 640 | |
| 685 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 641 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 686 | 642 | ROM_LOAD( "hb-cp1.bin", 0x0000, 0x0800, CRC(f256b047) SHA1(02d79882bad37ffdd58ef478e2658a1369c32ebc) ) |
| 687 | 643 | ROM_LOAD( "hb-cp2.bin", 0x0800, 0x0800, CRC(b870c64f) SHA1(ce4f8de87568782ce02bba754edff85df7f5c393) ) |
| 688 | 644 | ROM_LOAD( "hb-cp3.bin", 0x1000, 0x0800, CRC(9a7dab88) SHA1(cd39a9d4f982a7f49c478db1408d7e07335f2ddc) ) |
| r1490 | r1491 | |
| 725 | 681 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 726 | 682 | ROM_LOAD( "ws-sp1.bin", 0x0000, 0x0800, CRC(84b72637) SHA1(9c5834320f39545403839fb7088c37177a6c8861) ) |
| 727 | 683 | |
| 728 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 684 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 729 | 685 | ROM_LOAD( "ws-cp1.bin", 0x0000, 0x0800, CRC(5aca11df) SHA1(5ef815b5b09445515ff8b958c4ea29f1a221cee1) ) |
| 730 | 686 | ROM_LOAD( "ws-cp2.bin", 0x0800, 0x0800, CRC(ca530d85) SHA1(e5a78667c3583d06d8387848323b11e4a91091ec) ) |
| 731 | 687 | ROM_LOAD( "ws-cp3.bin", 0x1000, 0x0800, CRC(1e0225d6) SHA1(410795046c64c24de6711b167315308808b54291) ) |
| r1490 | r1491 | |
| 768 | 724 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 769 | 725 | ROM_LOAD( "dz-sp1.bin", 0x0000, 0x0800, CRC(25da1fc1) SHA1(c14717ec3399ce7dc47a9d42c8ac8f585db770e9) ) |
| 770 | 726 | |
| 771 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 727 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 772 | 728 | ROM_LOAD( "dz-cp1.bin", 0x0000, 0x0800, CRC(0a8a9034) SHA1(9df3d4f387bd5ce3d3580ba678aeda1b65634ac2) ) |
| 773 | 729 | ROM_LOAD( "dz-cp2.bin", 0x0800, 0x0800, CRC(3868dd82) SHA1(844584c5a80fb8f1797b4aa4e22024e75726293d) ) |
| 774 | 730 | ROM_LOAD( "dz-cp3.bin", 0x1000, 0x0800, CRC(755d9ed2) SHA1(a7165a1d12a5a81d8bb941d8ad073e2097c90beb) ) |
| r1490 | r1491 | |
| 811 | 767 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 812 | 768 | ROM_LOAD( "rd-sp1.bin", 0x0000, 0x0800, CRC(43b17734) SHA1(59960f0c48ed24cedb4b4655f97f6f1fdac4445e) ) |
| 813 | 769 | |
| 814 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 770 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 815 | 771 | ROM_LOAD( "rd-cp1.bin", 0x0000, 0x0800, CRC(ed601677) SHA1(efe2b6033f319603ee80ed4ba66d3b3607537b13) ) |
| 816 | 772 | ROM_LOAD( "rd-cp2.bin", 0x0800, 0x0800, CRC(35e317ff) SHA1(458550b431ec66006e2966d86a2286905c0495ed) ) |
| 817 | 773 | ROM_LOAD( "rd-cp3.bin", 0x1000, 0x0800, CRC(90f2c43f) SHA1(406215217f6f20c1a78f31b2ae3c0a97391e3371) ) |
| r1490 | r1491 | |
| 854 | 810 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 855 | 811 | ROM_LOAD( "rd-sp1.bin", 0x0000, 0x0800, CRC(43b17734) SHA1(59960f0c48ed24cedb4b4655f97f6f1fdac4445e) ) |
| 856 | 812 | |
| 857 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 813 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 858 | 814 | ROM_LOAD( "rd-cp1.bin", 0x0000, 0x0800, CRC(ed601677) SHA1(efe2b6033f319603ee80ed4ba66d3b3607537b13) ) |
| 859 | 815 | ROM_LOAD( "rd-cp2.bin", 0x0800, 0x0800, CRC(35e317ff) SHA1(458550b431ec66006e2966d86a2286905c0495ed) ) |
| 860 | 816 | ROM_LOAD( "rd-cp3.bin", 0x1000, 0x0800, CRC(90f2c43f) SHA1(406215217f6f20c1a78f31b2ae3c0a97391e3371) ) |
| r1490 | r1491 | |
| 897 | 853 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 898 | 854 | ROM_LOAD( "rd-sp1.bin", 0x0000, 0x0800, CRC(43b17734) SHA1(59960f0c48ed24cedb4b4655f97f6f1fdac4445e) ) |
| 899 | 855 | |
| 900 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 856 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 901 | 857 | ROM_LOAD( "rd-cp1.bin", 0x0000, 0x0800, CRC(ed601677) SHA1(efe2b6033f319603ee80ed4ba66d3b3607537b13) ) |
| 902 | 858 | ROM_LOAD( "rd-cp2.bin", 0x0800, 0x0800, CRC(35e317ff) SHA1(458550b431ec66006e2966d86a2286905c0495ed) ) |
| 903 | 859 | ROM_LOAD( "rd-cp3.bin", 0x1000, 0x0800, CRC(90f2c43f) SHA1(406215217f6f20c1a78f31b2ae3c0a97391e3371) ) |
| r1490 | r1491 | |
| 940 | 896 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 941 | 897 | ROM_LOAD( "ot-sp1.bin", 0x0000, 0x1000, CRC(fa21422a) SHA1(a75d13455c65e5a77db02fc87f0c112e329d0d6d) ) |
| 942 | 898 | |
| 943 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 899 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 944 | 900 | ROM_LOAD( "rd-cp1.bin", 0x0000, 0x0800, CRC(ed601677) SHA1(efe2b6033f319603ee80ed4ba66d3b3607537b13) ) |
| 945 | 901 | ROM_LOAD( "rd-cp2.bin", 0x0800, 0x0800, CRC(35e317ff) SHA1(458550b431ec66006e2966d86a2286905c0495ed) ) |
| 946 | 902 | ROM_LOAD( "rd-cp3.bin", 0x1000, 0x0800, CRC(90f2c43f) SHA1(406215217f6f20c1a78f31b2ae3c0a97391e3371) ) |
| r1490 | r1491 | |
| 983 | 939 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 984 | 940 | ROM_LOAD( "gb-sp1.bin", 0x0000, 0x0800, CRC(5d0205c3) SHA1(578937058d56e5c9fba8a2204ddbb59a6d23dec7) ) |
| 985 | 941 | |
| 986 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 942 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 987 | 943 | ROM_LOAD( "gb-cp1.bin", 0x0000, 0x0800, CRC(80e1ad5a) SHA1(0a577b0faffd9d6807c39175ce213f017a5cc7f8) ) |
| 988 | 944 | ROM_LOAD( "gb-cp2.bin", 0x0800, 0x0800, CRC(0a288b29) SHA1(0c6471a3517805a5c873857ff21ca94dfe91c24e) ) |
| 989 | 945 | ROM_LOAD( "gb-cp3.bin", 0x1000, 0x0800, CRC(e5bcf8cf) SHA1(7f53b8ee6f87e6c8761d2200e8194a7d16d8c7ac) ) |
| r1490 | r1491 | |
| 1026 | 982 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1027 | 983 | ROM_LOAD( "dig-sp1.bin", 0x0000, 0x0800, CRC(db526ee1) SHA1(afe319e64350b0c54b72394294a6369c885fdb7f) ) |
| 1028 | 984 | |
| 1029 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 985 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1030 | 986 | ROM_LOAD( "dig-cp1.bin", 0x0000, 0x0800, CRC(ca30fb97) SHA1(148f3a6f20b1f256a73e7a1992262116d77cc0a8) ) |
| 1031 | 987 | ROM_LOAD( "dig-cp2.bin", 0x0800, 0x0800, CRC(bed2334c) SHA1(c93902d01174e13fb9265194e5e44f67b38c5970) ) |
| 1032 | 988 | ROM_LOAD( "dig-cp3.bin", 0x1000, 0x0800, CRC(46db9b65) SHA1(1c655b4611ab182b6e4a3cdd3ef930e0d4dad0d9) ) |
| r1490 | r1491 | |
| 1069 | 1025 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1070 | 1026 | ROM_LOAD( "sb-sp1.bin", 0x0000, 0x0800, CRC(0aeb9ccd) SHA1(e7123eed21e4e758bbe1cebfd5aad44a5de45c27) ) |
| 1071 | 1027 | |
| 1072 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1028 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1073 | 1029 | ROM_LOAD( "sb-cp1.bin", 0x0000, 0x0800, CRC(03ba7760) SHA1(4ed252e2c4ec7cea2199524f7c35a1dc7c44f8d8) ) |
| 1074 | 1030 | ROM_LOAD( "sb-cp2.bin", 0x0800, 0x0800, CRC(04de69f2) SHA1(3ef3b3c159d47230622b6cc45baad8737bd93a90) ) |
| 1075 | 1031 | ROM_LOAD( "sb-cp3.bin", 0x1000, 0x0800, CRC(bb7d0b9a) SHA1(94c72d6961204be9cab351ac854ac9c69b51e79a) ) |
| r1490 | r1491 | |
| 1112 | 1068 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1113 | 1069 | ROM_LOAD( "hr-sp1.bin", 0x0000, 0x0800, CRC(a5c33cb1) SHA1(447ffb193b0dc4985bae5d8c214a893afd08664b) ) |
| 1114 | 1070 | |
| 1115 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1071 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1116 | 1072 | ROM_LOAD( "hr-cp1.bin", 0x0000, 0x0800, CRC(2d201496) SHA1(f195aa1b231a0e1752c7da824a10321f0527f8c9) ) |
| 1117 | 1073 | ROM_LOAD( "hr-cp2.bin", 0x0800, 0x0800, CRC(21b61fe3) SHA1(31882003f0557ffc4ec38ae6ee07b5d294b4162c) ) |
| 1118 | 1074 | ROM_LOAD( "hr-cp3.bin", 0x1000, 0x0800, CRC(9c8e3f9e) SHA1(9d949a4d12b45da12b434677670b2b109568564a) ) |
| r1490 | r1491 | |
| 1155 | 1111 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1156 | 1112 | ROM_LOAD( "lg-sp1.bin", 0x0000, 0x0800, CRC(74f67815) SHA1(6a26a16c27a7e4d58b611e5127115005a60cff91) ) |
| 1157 | 1113 | |
| 1158 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1114 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1159 | 1115 | ROM_LOAD( "lg-cp1.bin", 0x0000, 0x0800, CRC(e4ede80e) SHA1(62f2bc78106a057b6a8420d40421908df609bf29) ) |
| 1160 | 1116 | ROM_LOAD( "lg-cp2.bin", 0x0800, 0x0800, CRC(d3de8e5b) SHA1(f95320e001869c42e51195d9cc11e4f2555e153f) ) |
| 1161 | 1117 | ROM_LOAD( "lg-cp3.bin", 0x1000, 0x0800, CRC(9b8d1031) SHA1(87ef12aeae80cc0f240dead651c6222848f8dccc) ) |
| r1490 | r1491 | |
| 1198 | 1154 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1199 | 1155 | ROM_LOAD( "cs-sp1.bin", 0x0000, 0x1000, CRC(3c7fe86d) SHA1(9ae0b63b231a7092820650a196cde60588bc6b58) ) |
| 1200 | 1156 | |
| 1201 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1157 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1202 | 1158 | ROM_LOAD( "cs-cp1.bin", 0x0000, 0x0800, CRC(6a48c898) SHA1(c27f7bcdb2fe042ec52d1b9b4b9a4e47c288862d) ) |
| 1203 | 1159 | ROM_LOAD( "cs-cp2.bin", 0x0800, 0x0800, CRC(db0dfd8c) SHA1(f2b0dd43f0e514fdae54e4066606187f45b98e38) ) |
| 1204 | 1160 | ROM_LOAD( "cs-cp3.bin", 0x1000, 0x0800, CRC(01eee875) SHA1(6c41d716b5795f085229d855518862fb85f395a4) ) |
| r1490 | r1491 | |
| 1241 | 1197 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1242 | 1198 | ROM_LOAD( "ha-sp1.bin", 0x0000, 0x1000, CRC(fa21422a) SHA1(a75d13455c65e5a77db02fc87f0c112e329d0d6d) ) |
| 1243 | 1199 | |
| 1244 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1200 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1245 | 1201 | ROM_LOAD( "ha-cp1.bin", 0x0000, 0x0800, CRC(2d0f6d13) SHA1(55e45eaf1bf24a7a78a2f34ffc0d99a4c191d138) ) |
| 1246 | 1202 | ROM_LOAD( "ha-cp2.bin", 0x0800, 0x0800, CRC(7f5671bd) SHA1(7f4ae92a96c5a847c113f6f7e8d67d3e5ee0bcb0) ) |
| 1247 | 1203 | ROM_LOAD( "ha-cp3.bin", 0x1000, 0x0800, CRC(35b05ab4) SHA1(f336eb0c674c3d52e84be0f37b70953cce6112dc) ) |
| r1490 | r1491 | |
| 1284 | 1240 | ROM_REGION( 0x1000, REGION_SOUND1, 0 ) |
| 1285 | 1241 | ROM_LOAD( "sf-sp1.bin", 0x0000, 0x1000, CRC(c5628d30) SHA1(d29a5852a1762cbd5f3eba29ae2bf49b3a26f894) ) |
| 1286 | 1242 | |
| 1287 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1243 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1288 | 1244 | ROM_LOAD( "sf-cp1.bin", 0x0000, 0x0800, CRC(da194a68) SHA1(4215267e91644cf1e1f32f898bc9562bfba711f3) ) |
| 1289 | 1245 | ROM_LOAD( "sf-cp2.bin", 0x0800, 0x0800, CRC(b96977c7) SHA1(8f0fab044f16787bce83562e2b22d962d0a2c209) ) |
| 1290 | 1246 | ROM_LOAD( "sf-cp3.bin", 0x1000, 0x0800, CRC(f5d67b9a) SHA1(a492b41c53b1f28ac5f70969e5f06afa948c1a7d) ) |
| r1490 | r1491 | |
| 1327 | 1283 | ROM_REGION( 0x0800, REGION_SOUND1, 0 ) |
| 1328 | 1284 | ROM_LOAD( "raidr1-8.bin", 0x0000, 0x0800, CRC(b6b90d2e) SHA1(a966fa208b72aec358b7fb277e603e47b6984aa7) ) |
| 1329 | 1285 | |
| 1330 | ROM_REGION( 0x1800, REGION_GFX1, | |
| 1286 | ROM_REGION( 0x1800, REGION_GFX1, 0 | |
| 1331 | 1287 | ROM_LOAD( "raid4-11.bin", 0x0000, 0x0800, CRC(5eb7143b) SHA1(a19e803c15593b37ae2e61789f6e16f319620a37) ) |
| 1332 | 1288 | ROM_LOAD( "raid4-10.bin", 0x0800, 0x0800, CRC(391948a4) SHA1(7e20ad4f7e5bf7ad5dcb08ba6475313e2b8b1f03) ) |
| 1333 | 1289 | ROM_LOAD( "raid4-9b.bin", 0x1000, 0x0800, CRC(fecfde80) SHA1(23ea63080b8292fb00a743743cdff1a7ad0a8c6d) ) |
| r1490 | r1491 | |
|---|---|---|
| 2161 | 2161 | ***************************************************************************/ |
| 2162 | 2162 | |
| 2163 | 2163 | static ADDRESS_MAP_START( drgnunit_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2164 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM ) // ROM | |
| 2165 | AM_RANGE(0x080000, 0x0bffff) AM_READ(MRA16_RAM ) // ROM (qzkklgy2) | |
| 2164 | AM_RANGE(0x000000, 0x0bffff) AM_READ(MRA16_ROM ) // ROM | |
| 2166 | 2165 | AM_RANGE(0xf00000, 0xf0ffff) AM_READ(MRA16_RAM ) // RAM (qzkklogy) |
| 2167 | 2166 | AM_RANGE(0xffc000, 0xffffff) AM_READ(MRA16_RAM ) // RAM (drgnunit,stg) |
| 2168 | 2167 | AM_RANGE(0x100000, 0x103fff) AM_READ(seta_sound_word_r ) // Sound |
| r1490 | r1491 | |
| 2180 | 2179 | ADDRESS_MAP_END |
| 2181 | 2180 | |
| 2182 | 2181 | static ADDRESS_MAP_START( drgnunit_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2183 | AM_RANGE(0x000000, 0x07ffff) AM_WRITE(MWA16_ROM ) // ROM | |
| 2184 | AM_RANGE(0x080000, 0x0bffff) AM_WRITE(MWA16_RAM ) // ROM (qzkklgy2) | |
| 2182 | AM_RANGE(0x000000, 0x0bffff) AM_WRITE(MWA16_ROM ) // ROM | |
| 2185 | 2183 | AM_RANGE(0xf00000, 0xf0ffff) AM_WRITE(MWA16_RAM ) // RAM (qzkklogy) |
| 2186 | 2184 | AM_RANGE(0xffc000, 0xffffff) AM_WRITE(MWA16_RAM ) // RAM (drgnunit,stg) |
| 2187 | 2185 | AM_RANGE(0x100000, 0x103fff) AM_WRITE(seta_sound_word_w ) // Sound |
| r1490 | r1491 | |
| 4923 | 4921 | PORT_DIPNAME( 0x0004, 0x0004, "Highlight Right Answer (Cheat)") |
| 4924 | 4922 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 4925 | 4923 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4926 | PORT_DIPNAME( 0x0008, 0x0008, " | |
| 4924 | PORT_DIPNAME( 0x0008, 0x0008, "S | |
| 4927 | 4925 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) |
| 4928 | 4926 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4929 | 4927 | PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" ) |
| r1490 | r1491 | |
| 8240 | 8238 | |
| 8241 | 8239 | |
| 8242 | 8240 | ROM_START( drgnunit ) |
| 8243 | ROM_REGION( 0x0 | |
| 8241 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 8244 | 8242 | ROM_LOAD16_BYTE( "prg-e.bin", 0x000000, 0x020000, CRC(728447df) SHA1(8bdc52a4cc5f36794a47f963545bdaa26c9acd6b) ) |
| 8245 | 8243 | ROM_LOAD16_BYTE( "prg-o.bin", 0x000001, 0x020000, CRC(b2f58ecf) SHA1(5198e75b22bab630b458797988f2e443c601351f) ) |
| 8246 | 8244 | |
| r1490 | r1491 | |
| 8376 | 8374 | ROM_END |
| 8377 | 8375 | |
| 8378 | 8376 | ROM_START( stg ) |
| 8379 | ROM_REGION( 0x0 | |
| 8377 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 8380 | 8378 | ROM_LOAD16_BYTE( "att01003.u27", 0x000000, 0x020000, CRC(7a640a93) SHA1(28c54eca9502d06ca55c2db91bfe7d149af006ed) ) |
| 8381 | 8379 | ROM_LOAD16_BYTE( "att01001.u9", 0x000001, 0x020000, CRC(4fa88ad3) SHA1(55e0e689758511cdf514a633ffe3d7729e281b52) ) |
| 8382 | 8380 | ROM_LOAD16_BYTE( "att01004.u33", 0x040000, 0x020000, CRC(bbd45ca1) SHA1(badb11faf5779e8444dd95eb08a94fbf9f73cc2c) ) // 1xxxxxxxxxxxxxxxx = 0xFF |
| r1490 | r1491 | |
| 8491 | 8489 | ROM_END |
| 8492 | 8490 | |
| 8493 | 8491 | ROM_START( qzkklogy ) |
| 8494 | ROM_REGION( 0x0 | |
| 8492 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 8495 | 8493 | ROM_LOAD16_BYTE( "3.u27", 0x000000, 0x020000, CRC(b8c27cde) SHA1(4c36076801b6c915888b925c1e37d772bab1bb02) ) |
| 8496 | 8494 | ROM_LOAD16_BYTE( "1.u9", 0x000001, 0x020000, CRC(ce01cd54) SHA1(ef91aecdf7b5586a6870ff237372d65f85cd4cd3) ) |
| 8497 | 8495 | ROM_LOAD16_BYTE( "4.u33", 0x040000, 0x020000, CRC(4f5c554c) SHA1(0a10cefdf2dd876e6cb78023c3c15af24ba3c39a) ) |
| r1490 | r1491 | |
|---|---|---|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | static WRITE8_HANDLER( laserbat_s2636_1_w ) | |
| 61 | { | |
| 62 | s2636_w(s2636_1_ram,offset,data,s2636_1_dirty); | |
| 63 | } | |
| 64 | ||
| 65 | static WRITE8_HANDLER( laserbat_s2636_2_w ) | |
| 66 | { | |
| 67 | s2636_w(s2636_2_ram,offset,data,s2636_2_dirty); | |
| 68 | } | |
| 69 | ||
| 70 | static WRITE8_HANDLER( laserbat_s2636_3_w ) | |
| 71 | { | |
| 72 | s2636_w(s2636_3_ram,offset,data,s2636_3_dirty); | |
| 73 | } | |
| 74 | ||
| 75 | 60 | static WRITE8_HANDLER( video_extra_w ) |
| 76 | 61 | { |
| 77 | 62 | laserbat_video_page = (data & 0x10) >> 4; |
| r1490 | r1491 | |
| 196 | 181 | AM_RANGE(0x7800, 0x7bff) AM_ROM |
| 197 | 182 | |
| 198 | 183 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_WRITENOP // always 0 (bullet ram in Quasar) |
| 199 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_WRITE(laserbat_s2636_1_w) AM_BASE(&s2636_1_ram) | |
| 200 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_RAM AM_WRITE(laserbat_s2636_2_w) AM_BASE(&s2636_2_ram) | |
| 201 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_WRITE(laserbat_s2636_3_w) AM_BASE(&s2636_3_ram) | |
| 184 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_1_ram) | |
| 185 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_2_ram) | |
| 186 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_3_ram) | |
| 202 | 187 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(laserbat_videoram_w) |
| 203 | 188 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 204 | 189 | ADDRESS_MAP_END |
| r1490 | r1491 | |
| 484 | 469 | 8*8 |
| 485 | 470 | }; |
| 486 | 471 | |
| 487 | static const gfx_layout s2636_character10 = | |
| 488 | { | |
| 489 | 8,10, | |
| 490 | 5, | |
| 491 | 1, | |
| 492 | { 0 }, | |
| 493 | { 0,1,2,3,4,5,6,7 }, | |
| 494 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 495 | 8*16 | |
| 496 | }; | |
| 497 | ||
| 498 | 472 | static const gfx_layout sprites_layout = |
| 499 | 473 | { |
| 500 | 474 | 32,32, |
| r1490 | r1491 | |
| 513 | 487 | }; |
| 514 | 488 | |
| 515 | 489 | static GFXDECODE_START( laserbat ) |
| 516 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256 ) /* Rom chars */ | |
| 517 | GFXDECODE_ENTRY( REGION_CPU1, 0x1500, s2636_character10, 0, 8 ) /* s2636 #1 */ | |
| 518 | GFXDECODE_ENTRY( REGION_CPU1, 0x1600, s2636_character10, 0, 8 ) /* s2636 #2 */ | |
| 519 | GFXDECODE_ENTRY( REGION_CPU1, 0x1700, s2636_character10, 0, 8 ) /* s2636 #3 */ | |
| 520 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, sprites_layout, 0, 8 ) /* Sprites */ | |
| 490 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256 ) /* Rom chars */ | |
| 491 | GFXDECODE_ENTRY( REGION_CPU1, 0x1500, s2636_gfx_layout, 0, 8 ) /* s2636 #1 */ | |
| 492 | GFXDECODE_ENTRY( REGION_CPU1, 0x1600, s2636_gfx_layout, 0, 8 ) /* s2636 #2 */ | |
| 493 | GFXDECODE_ENTRY( REGION_CPU1, 0x1700, s2636_gfx_layout, 0, 8 ) /* s2636 #3 */ | |
| 494 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, sprites_layout, 0, 8 ) /* Sprites */ | |
| 521 | 495 | GFXDECODE_END |
| 522 | 496 | |
| 523 | 497 | static TILE_GET_INFO( get_tile_info ) |
| r1490 | r1491 | |
| 542 | 516 | { |
| 543 | 517 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| 544 | 518 | |
| 545 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,s2636_1_dirty,1,collision_bitmap); | |
| 546 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,s2636_2_dirty,2,collision_bitmap); | |
| 547 | s2636_update_bitmap(machine,bitmap,s2636_3_ram,s2636_3_dirty,3,collision_bitmap); | |
| 519 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,1,collision_bitmap); | |
| 520 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,2,collision_bitmap); | |
| 521 | s2636_update_bitmap(machine,bitmap,s2636_3_ram,3,collision_bitmap); | |
| 548 | 522 | |
| 549 | 523 | if(sprite_info.enable) |
| 550 | 524 | drawgfx(bitmap,machine->gfx[4], |
| r1490 | r1491 | |
|---|---|---|
| 251 | 251 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \ |
| 252 | 252 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \ |
| 253 | 253 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 254 | PORT_BIT( 0x08, IP_ACTIVE_ | |
| 254 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) \ | |
| 255 | 255 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) \ |
| 256 | 256 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) \ |
| 257 | 257 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \ |
| r1490 | r1491 | |
|---|---|---|
| 334 | 334 | 0x01D0,0x02C8,0x0000 |
| 335 | 335 | }; |
| 336 | 336 | atarigen_eeprom_default = default_eeprom; |
| 337 | atarijsa_init( | |
| 337 | atarijsa_init(machine, 2, 0x0040); | |
| 338 | 338 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 339 | 339 | } |
| 340 | 340 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | Sega Naomi |
| 4 | 4 | + Related Systems (possibly to be split at a later date) |
| 5 | 5 | |
| 6 | S | |
| 6 | Driver by Samuele Zannoli, R. Belmont, and ElSemi. | |
| 7 | 7 | |
| 8 | 8 | Sega Naomi is Dreamcast based Arcade hardware. |
| 9 | 9 | |
| r1490 | r1491 | |
| 445 | 445 | /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */ |
| 446 | 446 | static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK }; |
| 447 | 447 | |
| 448 | static UINT64 *dc_sound_ram; | |
| 448 | static UINT32 *dc_sound_ram; | |
| 449 | extern UINT64 *dc_texture_ram; | |
| 450 | static UINT32 rom_offset, dma_offset; | |
| 449 | 451 | |
| 452 | static INTERRUPT_GEN( naomi_vblank ) | |
| 453 | { | |
| 454 | dc_vblank(); | |
| 455 | } | |
| 456 | ||
| 457 | READ64_HANDLER( naomi_arm_r ) | |
| 458 | { | |
| 459 | return *((UINT64 *)dc_sound_ram+offset); | |
| 460 | } | |
| 461 | ||
| 462 | WRITE64_HANDLER( naomi_arm_w ) | |
| 463 | { | |
| 464 | COMBINE_DATA((UINT64 *)dc_sound_ram + offset); | |
| 465 | } | |
| 466 | ||
| 467 | READ64_HANDLER( naomi_unknown1_r ) | |
| 468 | { | |
| 469 | if ((offset * 8) == 0xc0) // trick so that it does not "wait for multiboard sync" | |
| 470 | return -1; | |
| 471 | return 0; | |
| 472 | } | |
| 473 | ||
| 474 | WRITE64_HANDLER( naomi_unknown1_w ) | |
| 475 | { | |
| 476 | } | |
| 477 | ||
| 478 | READ32_HANDLER( dc_aica_arm_r ) | |
| 479 | { | |
| 480 | return 0; | |
| 481 | } | |
| 482 | ||
| 483 | WRITE32_HANDLER( dc_aica_arm_w ) | |
| 484 | { | |
| 485 | } | |
| 486 | ||
| 487 | /* | |
| 488 | Naomi ROM board info from ElSemi: | |
| 489 | ||
| 490 | NAOMI_ROM_OFFSETH = 0x5f7000, | |
| 491 | NAOMI_ROM_OFFSETL = 0x5f7004, | |
| 492 | NAOMI_ROM_DATA = 0x5f7008, | |
| 493 | NAOMI_DMA_OFFSETH = 0x5f700C, | |
| 494 | NAOMI_DMA_OFFSETL = 0x5f7010, | |
| 495 | NAOMI_DMA_COUNT = 0x5f7014, | |
| 496 | NAOMI_COMM_OFFSET = 0x5F7050, | |
| 497 | NAOMI_COMM_DATA = 0x5F7054, | |
| 498 | NAOMI_BOARDID_WRITE = 0x5F7078, | |
| 499 | NAOMI_BOARDID_READ = 0x5F707C, | |
| 500 | each port is 16 bit wide, to access the rom in PIO mode, just set an offset in ROM_OFFSETH/L and read from ROM_DATA, each access reads 2 bytes and increases the offset by 2. | |
| 501 | ||
| 502 | the BOARDID regs access the password protected eeprom in the game board. the main board eeprom is read through port 0x1F800030 | |
| 503 | ||
| 504 | To access the board using DMA, use the DMA_OFFSETL/H. DMA_COUNT is in units of 0x20 bytes. Then trigger a GDROM DMA request. | |
| 505 | */ | |
| 506 | ||
| 507 | // NOTE: all accesses are 16 or 32 bits wide but only 16 bits are valid | |
| 508 | ||
| 509 | READ64_HANDLER( naomi_rom_board_r ) | |
| 510 | { | |
| 511 | UINT8 *ROM = (UINT8 *)memory_region(REGION_USER1); | |
| 512 | ||
| 513 | // ROM_DATA | |
| 514 | if ((offset == 1) && ((mem_mask & 0xffff) == 0)) | |
| 515 | { | |
| 516 | UINT64 ret; | |
| 517 | ||
| 518 | ret = (UINT64)(ROM[rom_offset] | (ROM[rom_offset+1]<<8)); | |
| 519 | ||
| 520 | rom_offset += 2; | |
| 521 | ||
| 522 | return ret; | |
| 523 | } | |
| 524 | else | |
| 525 | { | |
| 526 | mame_printf_verbose("ROM: read mask %llx @ %x (PC=%x)\n", mem_mask, offset, activecpu_get_pc()); | |
| 527 | } | |
| 528 | ||
| 529 | return U64(0xffffffffffffffff); | |
| 530 | } | |
| 531 | ||
| 532 | WRITE64_HANDLER( naomi_rom_board_w ) | |
| 533 | { | |
| 534 | if ((offset == 1) && ((mem_mask & U64(0xffff)) == 0)) | |
| 535 | { | |
| 536 | // DMA_OFFSETH | |
| 537 | dma_offset &= 0xffff; | |
| 538 | dma_offset |= (data & 0x1fff)<<16; | |
| 539 | } | |
| 540 | else if ((offset == 1) && ((mem_mask & U64(0xffff00000000)) == 0)) | |
| 541 | { | |
| 542 | // DMA_OFFSETL | |
| 543 | dma_offset &= 0xffff0000; | |
| 544 | dma_offset |= (data & 0xffff); | |
| 545 | } | |
| 546 | else if ((offset == 0) && ((mem_mask & U64(0xffff)) == 0)) | |
| 547 | { | |
| 548 | // ROM_OFFSETH | |
| 549 | rom_offset &= 0xffff; | |
| 550 | rom_offset |= (data & 0x1fff)<<16; | |
| 551 | } | |
| 552 | else if ((offset == 0) && ((mem_mask & U64(0xffff00000000)) == 0)) | |
| 553 | { | |
| 554 | // ROM_OFFSETL | |
| 555 | rom_offset &= 0xffff0000; | |
| 556 | rom_offset |= (data & 0xffff); | |
| 557 | } | |
| 558 | else | |
| 559 | { | |
| 560 | mame_printf_verbose("ROM: write %llx to %x, mask %llx (PC=%x)\n", data, offset, mem_mask, activecpu_get_pc()); | |
| 561 | } | |
| 562 | } | |
| 563 | ||
| 450 | 564 | static ADDRESS_MAP_START( naomi_map, ADDRESS_SPACE_PROGRAM, 64 ) |
| 451 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM // BIOS | |
| 565 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM // BIOS | |
| 566 | AM_RANGE(0x00200000, 0x00207fff) AM_RAM // bios uses it (battery backed ram ?) | |
| 452 | 567 | AM_RANGE(0x005f6800, 0x005f69ff) AM_READWRITE( dc_sysctrl_r, dc_sysctrl_w ) |
| 453 | 568 | AM_RANGE(0x005f6c00, 0x005f6cff) AM_READWRITE( dc_maple_r, dc_maple_w ) |
| 454 | AM_RANGE(0x005f7000, 0x005f70ff) AM_READWRITE( | |
| 569 | AM_RANGE(0x005f7000, 0x005f70ff) AM_READWRITE( naomi_ | |
| 455 | 570 | AM_RANGE(0x005f7400, 0x005f74ff) AM_READWRITE( dc_g1_ctrl_r, dc_g1_ctrl_w ) |
| 456 | 571 | AM_RANGE(0x005f7800, 0x005f78ff) AM_READWRITE( dc_g2_ctrl_r, dc_g2_ctrl_w ) |
| 457 | 572 | AM_RANGE(0x005f7c00, 0x005f7cff) AM_READWRITE( pvr_ctrl_r, pvr_ctrl_w ) |
| r1490 | r1491 | |
| 459 | 574 | AM_RANGE(0x00600000, 0x006007ff) AM_READWRITE( dc_modem_r, dc_modem_w ) |
| 460 | 575 | AM_RANGE(0x00700000, 0x00707fff) AM_READWRITE( dc_aica_reg_r, dc_aica_reg_w ) |
| 461 | 576 | AM_RANGE(0x00710000, 0x0071000f) AM_READWRITE( dc_rtc_r, dc_rtc_w ) |
| 462 | AM_RANGE(0x00800000, 0x009fffff) AM_RAM AM_BASE( &dc_sound_ram ) // sound RAM | |
| 463 | AM_RANGE(0x04000000, 0x04ffffff) AM_RAM AM_SHARE(2) // texture memory | |
| 464 | AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2) // mirror of texture RAM | |
| 577 | AM_RANGE(0x00800000, 0x009fffff) AM_READWRITE( naomi_arm_r, naomi_arm_w ) // sound RAM | |
| 578 | AM_RANGE(0x0103ff00, 0x0103ffff) AM_READWRITE( naomi_unknown1_r, naomi_unknown1_w ) // bios uses it, actual start and end addresses not known | |
| 579 | AM_RANGE(0x04000000, 0x04ffffff) AM_RAM AM_SHARE(2) AM_BASE( &dc_texture_ram ) // texture memory | |
| 580 | AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2) // mirror of texture RAM | |
| 465 | 581 | AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_SHARE(1) |
| 466 | AM_RANGE(0x0d000000, 0x0dffffff) AM_RAM AM_SHARE(1) // mirror of main RAM | |
| 582 | AM_RANGE(0x0d000000, 0x0dffffff) AM_RAM AM_SHARE(1) // mirror of main RAM | |
| 467 | 583 | AM_RANGE(0x10000000, 0x107fffff) AM_WRITE( ta_fifo_poly_w ) |
| 468 | 584 | AM_RANGE(0x10800000, 0x10ffffff) AM_WRITE( ta_fifo_yuv_w ) |
| 469 | AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2) // another mirror of texture memory | |
| 585 | AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2) // another mirror of texture memory | |
| 470 | 586 | AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_REGION(REGION_CPU1, 0) |
| 471 | 587 | ADDRESS_MAP_END |
| 472 | 588 | |
| 589 | READ32_HANDLER( test1 ) | |
| 590 | { | |
| 591 | return -1; | |
| 592 | } | |
| 593 | ||
| 473 | 594 | static ADDRESS_MAP_START( dc_audio_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 474 | AM_RANGE(0x00000000, 0x001fffff) AM_RAM /* shared with SH-4 */ | |
| 595 | AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_BASE( &dc_sound_ram ) /* shared with SH-4 */ | |
| 596 | AM_RANGE(0x00200000, 0x002000ff) AM_READ( test1 ) // for bug (?) in sound bios | |
| 597 | AM_RANGE(0x00800000, 0x00807fff) AM_READWRITE( dc_aica_arm_r, dc_aica_arm_w ) /* shared with SH-4 */ | |
| 475 | 598 | ADDRESS_MAP_END |
| 476 | 599 | |
| 477 | 600 | static INPUT_PORTS_START( naomi ) |
| 601 | PORT_START | |
| 602 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service") | |
| 603 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F2) | |
| 478 | 604 | INPUT_PORTS_END |
| 479 | 605 | |
| 480 | 606 | static MACHINE_DRIVER_START( naomi ) |
| r1490 | r1491 | |
| 482 | 608 | MDRV_CPU_ADD_TAG("main", SH4, CPU_CLOCK) // SH4!!! |
| 483 | 609 | MDRV_CPU_CONFIG(sh4cpu_config) |
| 484 | 610 | MDRV_CPU_PROGRAM_MAP(naomi_map,0) |
| 611 | MDRV_CPU_VBLANK_INT(naomi_vblank,479) | |
| 485 | 612 | |
| 486 | 613 | MDRV_CPU_ADD_TAG("sound", ARM7, 45000000) |
| 487 | 614 | MDRV_CPU_PROGRAM_MAP(dc_audio_map, 0) |
| r1490 | r1491 | |
| 494 | 621 | /* video hardware */ |
| 495 | 622 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 496 | 623 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 497 | MDRV_SCREEN_SIZE(16*8, 16*8) | |
| 498 | MDRV_SCREEN_VISIBLE_AREA(0, 16*8-1, 0, 16*8-1) | |
| 624 | MDRV_SCREEN_SIZE(640, 480) | |
| 625 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) | |
| 499 | 626 | MDRV_PALETTE_LENGTH(0x1000) |
| 500 | 627 | |
| 501 | 628 | MDRV_VIDEO_START(dc) |
| r1490 | r1491 | |
| 539 | 666 | ROM_START( naomi ) |
| 540 | 667 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 541 | 668 | NAOMI_BIOS |
| 669 | ||
| 670 | ROM_REGION( 0x8400000, REGION_USER1, ROMREGION_ERASE) | |
| 542 | 671 | ROM_END |
| 543 | 672 | |
| 544 | 673 | ROM_START( naomi2 ) |
| 545 | 674 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 546 | 675 | NAOMI2_BIOS |
| 676 | ||
| 677 | ROM_REGION( 0x8400000, REGION_USER1, ROMREGION_ERASE) | |
| 547 | 678 | ROM_END |
| 548 | 679 | |
| 549 | 680 | ROM_START( awbios ) |
| 550 | 681 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 551 | 682 | AW_BIOS |
| 683 | ||
| 684 | ROM_REGION( 0x8400000, REGION_USER1, ROMREGION_ERASE) | |
| 552 | 685 | ROM_END |
| 553 | 686 | |
| 554 | 687 | /* Info above each set is automatically generated from the IC22 rom and may not be accurate */ |
| r1490 | r1491 | |
| 661 | 794 | IC5 64M BB81 7E26 MPR23424.5 |
| 662 | 795 | IC6 64M B3A8 F2EA MPR23425.6 |
| 663 | 796 | IC7 64M 05C5 A084 MPR23426.7 |
| 664 | IC8 64M 9E13 7535 MPR23427.8 | |
| 797 | ?IC8 64M 9E13 7535 MPR23427.8 | |
| 665 | 798 | |
| 666 | 799 | Serial: BCHE-01A0803 |
| 667 | 800 | |
| r1490 | r1491 | |
| 671 | 804 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 672 | 805 | NAOMI_BIOS |
| 673 | 806 | |
| 674 | ROM_REGION( 0x400000, REGION_USER1, 0) | |
| 807 | ROM_REGION( 0x4800000, REGION_USER1, ROMREGION_ERASE00) | |
| 675 | 808 | ROM_LOAD("epr23428a.22", 0x0000000, 0x400000, CRC(d628dbce) SHA1(91ec1296ead572a64c37f8ac2c1a96742f19d50b) ) |
| 676 | ||
| 677 | ROM_REGION( 0x8000000, REGION_USER2, 0) | |
| 678 | ROM_LOAD("mpr23420.1", 0x0000000, 0x0800000, CRC(9d5991f2) SHA1(c75871db314b01935d1daaacf1a762e73e5fd411) ) | |
| 679 | ROM_LOAD("mpr23421.2", 0x0800000, 0x0800000, CRC(6c351db3) SHA1(cdd601321a38fc34152517abdc473b73a4c6f630) ) | |
| 680 | ROM_LOAD("mpr23422.3", 0x1000000, 0x0800000, CRC(a1d4bd29) SHA1(6c446fd1819f55412351f15cf57b769c0c56c1db) ) | |
| 681 | ROM_LOAD("mpr23423.4", 0x1800000, 0x0800000, CRC(08cbf373) SHA1(0d9a593f5cc5d632d85d7253c135eef2e8e01598) ) | |
| 682 | ROM_LOAD("mpr23424.5", 0x2000000, 0x0800000, CRC(f4404000) SHA1(e49d941e47e63bb7f3fddc3c3d2c1653611914ee) ) | |
| 683 | ROM_LOAD("mpr23425.6", 0x2800000, 0x0800000, CRC(47f51da2) SHA1(af5ecd460114caed3a00157ffd3a2df0fbf348c0) ) | |
| 684 | ROM_LOAD("mpr23426.7", 0x3000000, 0x0800000, CRC(7f91b13f) SHA1(2d534f77291ebfedc011bf0e803a1b9243fb477f) ) | |
| 685 | ROM_LOAD("mpr23427.8", 0x3800000, 0x0800000, CRC(5851d525) SHA1(1cb1073542d75a3bcc0d363ed31d49bcaf1fd494) ) | |
| 809 | ROM_RELOAD( 0x400000, 0x400000) | |
| 810 | ROM_LOAD("mpr23420.1", 0x0800000, 0x0800000, CRC(9d5991f2) SHA1(c75871db314b01935d1daaacf1a762e73e5fd411) ) | |
| 811 | ROM_LOAD("mpr23421.2", 0x1000000, 0x0800000, CRC(6c351db3) SHA1(cdd601321a38fc34152517abdc473b73a4c6f630) ) | |
| 812 | ROM_LOAD("mpr23422.3", 0x1800000, 0x0800000, CRC(a1d4bd29) SHA1(6c446fd1819f55412351f15cf57b769c0c56c1db) ) | |
| 813 | ROM_LOAD("mpr23423.4", 0x2000000, 0x0800000, CRC(08cbf373) SHA1(0d9a593f5cc5d632d85d7253c135eef2e8e01598) ) | |
| 814 | ROM_LOAD("mpr23424.5", 0x2800000, 0x0800000, CRC(f4404000) SHA1(e49d941e47e63bb7f3fddc3c3d2c1653611914ee) ) | |
| 815 | ROM_LOAD("mpr23425.6", 0x3000000, 0x0800000, CRC(47f51da2) SHA1(af5ecd460114caed3a00157ffd3a2df0fbf348c0) ) | |
| 816 | ROM_LOAD("mpr23426.7", 0x3800000, 0x0800000, CRC(7f91b13f) SHA1(2d534f77291ebfedc011bf0e803a1b9243fb477f) ) | |
| 817 | ROM_LOAD("mpr23427.8", 0x4000000, 0x0800000, CRC(5851d525) SHA1(1cb1073542d75a3bcc0d363ed31d49bcaf1fd494) ) | |
| 686 | 818 | ROM_END |
| 687 | 819 | |
| 688 | 820 | /* |
| r1490 | r1491 | |
| 1482 | 1614 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 1483 | 1615 | NAOMI_BIOS |
| 1484 | 1616 | |
| 1485 | ROM_REGION( 0x | |
| 1617 | ROM_REGION( 0x8000000, REGION_USER1, 0) | |
| 1486 | 1618 | ROM_LOAD("epr21929c.22", 0x0000000, 0x0400000, CRC(b5e609f4) SHA1(92b98bad94268a80f6e4506b812d01c0a7850161) ) |
| 1487 | ||
| 1488 | ROM_REGION( 0x7400000, REGION_USER2, 0) | |
| 1489 | ROM_LOAD("mpr21914.u1", 0x0000000, 0x0800000, CRC(f91ef69b) SHA1(4ed23091efad7ddf1878a0bfcdcbba3cf151af84) ) | |
| 1490 | ROM_LOAD("mpr21915.u2", 0x0800000, 0x0800000, CRC(40128a67) SHA1(9d191c4ec33465f29bbc09491dde62f354a9ab15) ) | |
| 1491 | ROM_LOAD("mpr21916.u3", 0x1000000, 0x0800000, CRC(19708b3c) SHA1(7d1ef995ce870ffcb68f420a571efb084f5bfcf2) ) | |
| 1492 | ROM_LOAD("mpr21917.u4", 0x1800000, 0x0800000, CRC(b082379b) SHA1(42f585279da1de7e613e42b76e1b81986c48e6ea) ) | |
| 1493 | ROM_LOAD("mpr21918.u5", 0x2000000, 0x0800000, CRC(a3bc1a47) SHA1(0e5043ab6e118feb59f68c84c095cf5b1dba7d09) ) | |
| 1494 | ROM_LOAD("mpr21919.u6", 0x2800000, 0x0800000, CRC(b1dfada7) SHA1(b4c906bc96b615975f6319a1fdbd5b990e7e4124) ) | |
| 1495 | ROM_LOAD("mpr21920.u7", 0x3000000, 0x0800000, CRC(1c189e28) SHA1(93400de2cb803357fa17ae7e1a5297177f9bcfa1) ) | |
| 1496 | ROM_LOAD("mpr21921.u8", 0x3800000, 0x0800000, CRC(55bcb652) SHA1(4de2e7e584dd4999dc8e405837a18a904dfee0bf) ) | |
| 1497 | ROM_LOAD("mpr21922.u9", 0x4000000, 0x0800000, CRC(2ecda3ff) SHA1(54afc77a01470662d580f5676b4e8dc4d04f63f8) ) | |
| 1498 | ROM_LOAD("mpr21923.u10",0x4800000, 0x0800000, CRC(a5cd42ad) SHA1(59f62e995d45311b1592434d1ffa42c261fa8ba1) ) | |
| 1499 | ROM_LOAD("mpr21924.u11",0x5000000, 0x0800000, CRC(cc1a4ed9) SHA1(0e3aaeaa55f1d145fb4877b6d187a3ee78cf214e) ) | |
| 1500 | ROM_LOAD("mpr21925.u12",0x5800000, 0x0800000, CRC(9452c5fb) SHA1(5a04f96d83cca6248f513de0c6240fc671bcadf9) ) | |
| 1501 | ROM_LOAD("mpr21926.u13",0x6000000, 0x0800000, CRC(d6346491) SHA1(830971cbc14cab022a09ad4c6e11ee49c550e308) ) | |
| 1502 | ROM_LOAD("mpr21927.u14",0x6800000, 0x0800000, CRC(a1901e1e) SHA1(2281f91ac696cc14886bcdf4b0685ce2f5bb8117) ) | |
| 1503 | ROM_LOAD("mpr21928.u15",0x7000000, 0x0400000, CRC(d127d9a5) SHA1(78c95357344ea15469b84fa8b1332e76521892cd) ) | |
| 1619 | ROM_LOAD("mpr21914.u1", 0x0800000, 0x0800000, CRC(f91ef69b) SHA1(4ed23091efad7ddf1878a0bfcdcbba3cf151af84) ) | |
| 1620 | ROM_LOAD("mpr21915.u2", 0x1000000, 0x0800000, CRC(40128a67) SHA1(9d191c4ec33465f29bbc09491dde62f354a9ab15) ) | |
| 1621 | ROM_LOAD("mpr21916.u3", 0x1800000, 0x0800000, CRC(19708b3c) SHA1(7d1ef995ce870ffcb68f420a571efb084f5bfcf2) ) | |
| 1622 | ROM_LOAD("mpr21917.u4", 0x2000000, 0x0800000, CRC(b082379b) SHA1(42f585279da1de7e613e42b76e1b81986c48e6ea) ) | |
| 1623 | ROM_LOAD("mpr21918.u5", 0x2800000, 0x0800000, CRC(a3bc1a47) SHA1(0e5043ab6e118feb59f68c84c095cf5b1dba7d09) ) | |
| 1624 | ROM_LOAD("mpr21919.u6", 0x3000000, 0x0800000, CRC(b1dfada7) SHA1(b4c906bc96b615975f6319a1fdbd5b990e7e4124) ) | |
| 1625 | ROM_LOAD("mpr21920.u7", 0x3800000, 0x0800000, CRC(1c189e28) SHA1(93400de2cb803357fa17ae7e1a5297177f9bcfa1) ) | |
| 1626 | ROM_LOAD("mpr21921.u8", 0x4000000, 0x0800000, CRC(55bcb652) SHA1(4de2e7e584dd4999dc8e405837a18a904dfee0bf) ) | |
| 1627 | ROM_LOAD("mpr21922.u9", 0x4800000, 0x0800000, CRC(2ecda3ff) SHA1(54afc77a01470662d580f5676b4e8dc4d04f63f8) ) | |
| 1628 | ROM_LOAD("mpr21923.u10",0x5000000, 0x0800000, CRC(a5cd42ad) SHA1(59f62e995d45311b1592434d1ffa42c261fa8ba1) ) | |
| 1629 | ROM_LOAD("mpr21924.u11",0x5800000, 0x0800000, CRC(cc1a4ed9) SHA1(0e3aaeaa55f1d145fb4877b6d187a3ee78cf214e) ) | |
| 1630 | ROM_LOAD("mpr21925.u12",0x6000000, 0x0800000, CRC(9452c5fb) SHA1(5a04f96d83cca6248f513de0c6240fc671bcadf9) ) | |
| 1631 | ROM_LOAD("mpr21926.u13",0x6800000, 0x0800000, CRC(d6346491) SHA1(830971cbc14cab022a09ad4c6e11ee49c550e308) ) | |
| 1632 | ROM_LOAD("mpr21927.u14",0x7000000, 0x0800000, CRC(a1901e1e) SHA1(2281f91ac696cc14886bcdf4b0685ce2f5bb8117) ) | |
| 1633 | ROM_LOAD("mpr21928.u15",0x7800000, 0x0400000, CRC(d127d9a5) SHA1(78c95357344ea15469b84fa8b1332e76521892cd) ) | |
| 1504 | 1634 | ROM_END |
| 1505 | 1635 | |
| 1506 | 1636 | ROM_START( vs2_2ka ) |
| 1507 | 1637 | ROM_REGION( 0x200000, REGION_CPU1, 0) |
| 1508 | 1638 | NAOMI_BIOS |
| 1509 | 1639 | |
| 1510 | ROM_REGION( 0x | |
| 1640 | ROM_REGION( 0x8000000, REGION_USER1, 0) | |
| 1511 | 1641 | ROM_LOAD("u22", 0x0000000, 0x0400000, CRC(831af08a) SHA1(af4c74623be823fd061765cede354c6a9722fd10) ) |
| 1512 | ||
| 1513 | ROM_REGION( 0x7400000, REGION_USER2, 0) | |
| 1514 | ROM_LOAD("mpr21914.u1", 0x0000000, 0x0800000, CRC(f91ef69b) SHA1(4ed23091efad7ddf1878a0bfcdcbba3cf151af84) ) | |
| 1515 | ROM_LOAD("mpr21915.u2", 0x0800000, 0x0800000, CRC(40128a67) SHA1(9d191c4ec33465f29bbc09491dde62f354a9ab15) ) | |
| 1516 | ROM_LOAD("mpr21916.u3", 0x1000000, 0x0800000, CRC(19708b3c) SHA1(7d1ef995ce870ffcb68f420a571efb084f5bfcf2) ) | |
| 1517 | ROM_LOAD("mpr21917.u4", 0x1800000, 0x0800000, CRC(b082379b) SHA1(42f585279da1de7e613e42b76e1b81986c48e6ea) ) | |
| 1518 | ROM_LOAD("mpr21918.u5", 0x2000000, 0x0800000, CRC(a3bc1a47) SHA1(0e5043ab6e118feb59f68c84c095cf5b1dba7d09) ) | |
| 1519 | ROM_LOAD("mpr21919.u6", 0x2800000, 0x0800000, CRC(b1dfada7) SHA1(b4c906bc96b615975f6319a1fdbd5b990e7e4124) ) | |
| 1520 | ROM_LOAD("mpr21920.u7", 0x3000000, 0x0800000, CRC(1c189e28) SHA1(93400de2cb803357fa17ae7e1a5297177f9bcfa1) ) | |
| 1521 | ROM_LOAD("mpr21921.u8", 0x3800000, 0x0800000, CRC(55bcb652) SHA1(4de2e7e584dd4999dc8e405837a18a904dfee0bf) ) | |
| 1522 | ROM_LOAD("mpr21922.u9", 0x4000000, 0x0800000, CRC(2ecda3ff) SHA1(54afc77a01470662d580f5676b4e8dc4d04f63f8) ) | |
| 1523 | ROM_LOAD("mpr21923.u10",0x4800000, 0x0800000, CRC(a5cd42ad) SHA1(59f62e995d45311b1592434d1ffa42c261fa8ba1) ) | |
| 1524 | ROM_LOAD("mpr21924.u11",0x5000000, 0x0800000, CRC(cc1a4ed9) SHA1(0e3aaeaa55f1d145fb4877b6d187a3ee78cf214e) ) | |
| 1525 | ROM_LOAD("mpr21925.u12",0x5800000, 0x0800000, CRC(9452c5fb) SHA1(5a04f96d83cca6248f513de0c6240fc671bcadf9) ) | |
| 1526 | ROM_LOAD("mpr21926.u13",0x6000000, 0x0800000, CRC(d6346491) SHA1(830971cbc14cab022a09ad4c6e11ee49c550e308) ) | |
| 1527 | ROM_LOAD("mpr21927.u14",0x6800000, 0x0800000, CRC(a1901e1e) SHA1(2281f91ac696cc14886bcdf4b0685ce2f5bb8117) ) | |
| 1528 | ROM_LOAD("mpr21928.u15",0x7000000, 0x0400000, CRC(d127d9a5) SHA1(78c95357344ea15469b84fa8b1332e76521892cd) ) | |
| 1642 | ROM_LOAD("mpr21914.u1", 0x0800000, 0x0800000, CRC(f91ef69b) SHA1(4ed23091efad7ddf1878a0bfcdcbba3cf151af84) ) | |
| 1643 | ROM_LOAD("mpr21915.u2", 0x1000000, 0x0800000, CRC(40128a67) SHA1(9d191c4ec33465f29bbc09491dde62f354a9ab15) ) | |
| 1644 | ROM_LOAD("mpr21916.u3", 0x1800000, 0x0800000, CRC(19708b3c) SHA1(7d1ef995ce870ffcb68f420a571efb084f5bfcf2) ) | |
| 1645 | ROM_LOAD("mpr21917.u4", 0x2000000, 0x0800000, CRC(b082379b) SHA1(42f585279da1de7e613e42b76e1b81986c48e6ea) ) | |
| 1646 | ROM_LOAD("mpr21918.u5", 0x2800000, 0x0800000, CRC(a3bc1a47) SHA1(0e5043ab6e118feb59f68c84c095cf5b1dba7d09) ) | |
| 1647 | ROM_LOAD("mpr21919.u6", 0x3000000, 0x0800000, CRC(b1dfada7) SHA1(b4c906bc96b615975f6319a1fdbd5b990e7e4124) ) | |
| 1648 | ROM_LOAD("mpr21920.u7", 0x3800000, 0x0800000, CRC(1c189e28) SHA1(93400de2cb803357fa17ae7e1a5297177f9bcfa1) ) | |
| 1649 | ROM_LOAD("mpr21921.u8", 0x4000000, 0x0800000, CRC(55bcb652) SHA1(4de2e7e584dd4999dc8e405837a18a904dfee0bf) ) | |
| 1650 | ROM_LOAD("mpr21922.u9", 0x4800000, 0x0800000, CRC(2ecda3ff) SHA1(54afc77a01470662d580f5676b4e8dc4d04f63f8) ) | |
| 1651 | ROM_LOAD("mpr21923.u10",0x5000000, 0x0800000, CRC(a5cd42ad) SHA1(59f62e995d45311b1592434d1ffa42c261fa8ba1) ) | |
| 1652 | ROM_LOAD("mpr21924.u11",0x5800000, 0x0800000, CRC(cc1a4ed9) SHA1(0e3aaeaa55f1d145fb4877b6d187a3ee78cf214e) ) | |
| 1653 | ROM_LOAD("mpr21925.u12",0x6000000, 0x0800000, CRC(9452c5fb) SHA1(5a04f96d83cca6248f513de0c6240fc671bcadf9) ) | |
| 1654 | ROM_LOAD("mpr21926.u13",0x6800000, 0x0800000, CRC(d6346491) SHA1(830971cbc14cab022a09ad4c6e11ee49c550e308) ) | |
| 1655 | ROM_LOAD("mpr21927.u14",0x7000000, 0x0800000, CRC(a1901e1e) SHA1(2281f91ac696cc14886bcdf4b0685ce2f5bb8117) ) | |
| 1656 | ROM_LOAD("mpr21928.u15",0x7800000, 0x0400000, CRC(d127d9a5) SHA1(78c95357344ea15469b84fa8b1332e76521892cd) ) | |
| 1529 | 1657 | ROM_END |
| 1530 | 1658 | |
| 1531 | 1659 | /* |
| r1490 | r1491 | |
|---|---|---|
| 1175 | 1175 | |
| 1176 | 1176 | |
| 1177 | 1177 | /* sprites are contained in 256x256 "tiles" */ |
| 1178 | static const gfx_layout spritelayout = | |
| 1179 | { | |
| 1180 | 256,256, | |
| 1181 | RGN_FRAC(1,1), | |
| 1182 | 8, | |
| 1183 | { GFX_RAW }, | |
| 1184 | { 0 }, /* org displacement */ | |
| 1185 | { 256*8 }, /* line modulo */ | |
| 1186 | 256*256*8 /* char modulo */ | |
| 1187 | }; | |
| 1178 | static GFXLAYOUT_RAW( spritelayout, 8, 256, 256, 256*8, 256*256*8 ) | |
| 1179 | static GFXLAYOUT_RAW( bglayout, 8, 16, 16, 16*8, 16*16*8 ) | |
| 1180 | static GFXLAYOUT_RAW( txlayout, 8, 8, 8, 8*8, 8*8*8 ) | |
| 1188 | 1181 | |
| 1189 | static const gfx_layout bglayout = | |
| 1190 | { | |
| 1191 | 16,16, | |
| 1192 | RGN_FRAC(1,1), | |
| 1193 | 8, | |
| 1194 | { GFX_RAW }, | |
| 1195 | { 0 }, /* org displacement */ | |
| 1196 | { 16*8 }, /* line modulo */ | |
| 1197 | 16*16*8 /* char modulo */ | |
| 1198 | }; | |
| 1199 | ||
| 1200 | ||
| 1201 | static const gfx_layout txlayout = | |
| 1202 | { | |
| 1203 | 8,8, | |
| 1204 | RGN_FRAC(1,1), | |
| 1205 | 8, | |
| 1206 | { GFX_RAW }, | |
| 1207 | { 0 }, /* org displacement */ | |
| 1208 | { 8*8 }, /* line modulo */ | |
| 1209 | 8*8*8 /* char modulo */ | |
| 1210 | }; | |
| 1211 | ||
| 1212 | 1182 | static GFXDECODE_START( bnstars ) |
| 1213 | 1183 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0x0000, 0x10 ) |
| 1214 | 1184 | GFXDECODE_ENTRY( REGION_GFX2, 0, bglayout, 0x5000, 0x10 ) /* Roz scr1 */ |
| r1490 | r1491 | |
|---|---|---|
| 10 | 10 | 9000-97ff Playfield RAM |
| 11 | 11 | a000-bfff Unused? |
| 12 | 12 | |
| 13 | ||
| 14 | NOTE: | |
| 15 | ROM DM03 is missing from all known ROM sets. This is a color palette. | |
| 16 | * is this note out of date?, DM_03.d1 in bking.zip = 82s141.2d in bking2.zip | |
| 17 | ||
| 18 | 13 | ***************************************************************************/ |
| 19 | 14 | |
| 20 | 15 | #include "driver.h" |
| 16 | #include "cpu/m6805/m6805.h" | |
| 21 | 17 | #include "sound/ay8910.h" |
| 22 | 18 | #include "sound/dac.h" |
| 23 | 19 | |
| 24 | PALETTE_INIT( bking2 ); | |
| 25 | 20 | |
| 26 | VIDEO_START( bking2 ); | |
| 27 | VIDEO_UPDATE( bking2 ); | |
| 28 | VIDEO_EOF( bking2 ); | |
| 21 | /* bking3 mcu communication */ | |
| 22 | extern MACHINE_RESET( buggychl ); | |
| 23 | extern READ8_HANDLER( buggychl_68705_portA_r ); | |
| 24 | extern WRITE8_HANDLER( buggychl_68705_portA_w ); | |
| 25 | extern WRITE8_HANDLER( buggychl_68705_ddrA_w ); | |
| 26 | extern READ8_HANDLER( buggychl_68705_portB_r ); | |
| 27 | extern WRITE8_HANDLER( buggychl_68705_portB_w ); | |
| 28 | extern WRITE8_HANDLER( buggychl_68705_ddrB_w ); | |
| 29 | extern READ8_HANDLER( buggychl_68705_portC_r ); | |
| 30 | extern WRITE8_HANDLER( buggychl_68705_portC_w ); | |
| 31 | extern WRITE8_HANDLER( buggychl_68705_ddrC_w ); | |
| 32 | extern WRITE8_HANDLER( buggychl_mcu_w ); | |
| 33 | extern READ8_HANDLER( buggychl_mcu_r ); | |
| 34 | extern READ8_HANDLER( buggychl_mcu_status_r ); | |
| 29 | 35 | |
| 30 | WRITE8_HANDLER( bking2_xld1_w ); | |
| 31 | WRITE8_HANDLER( bking2_yld1_w ); | |
| 32 | WRITE8_HANDLER( bking2_xld2_w ); | |
| 33 | WRITE8_HANDLER( bking2_yld2_w ); | |
| 34 | WRITE8_HANDLER( bking2_xld3_w ); | |
| 35 | WRITE8_HANDLER( bking2_yld3_w ); | |
| 36 | WRITE8_HANDLER( bking2_msk_w ); | |
| 37 | WRITE8_HANDLER( bking2_cont1_w ); | |
| 38 | WRITE8_HANDLER( bking2_cont2_w ); | |
| 39 | WRITE8_HANDLER( bking2_cont3_w ); | |
| 40 | WRITE8_HANDLER( bking2_hitclr_w ); | |
| 41 | WRITE8_HANDLER( bking2_playfield_w ); | |
| 36 | extern PALETTE_INIT( bking2 ); | |
| 42 | 37 | |
| 43 | READ8_HANDLER( bking2_input_port_5_r ); | |
| 44 | READ8_HANDLER( bking2_input_port_6_r ); | |
| 45 | READ8_HANDLER( bking2_pos_r ); | |
| 38 | extern VIDEO_START( bking2 ); | |
| 39 | extern VIDEO_UPDATE( bking2 ); | |
| 40 | extern VIDEO_EOF( bking2 ); | |
| 46 | 41 | |
| 47 | UINT8* bking2_playfield_ram; | |
| 42 | extern WRITE8_HANDLER( bking2_xld1_w ); | |
| 43 | extern WRITE8_HANDLER( bking2_yld1_w ); | |
| 44 | extern WRITE8_HANDLER( bking2_xld2_w ); | |
| 45 | extern WRITE8_HANDLER( bking2_yld2_w ); | |
| 46 | extern WRITE8_HANDLER( bking2_xld3_w ); | |
| 47 | extern WRITE8_HANDLER( bking2_yld3_w ); | |
| 48 | extern WRITE8_HANDLER( bking2_msk_w ); | |
| 49 | extern WRITE8_HANDLER( bking2_cont1_w ); | |
| 50 | extern WRITE8_HANDLER( bking2_cont2_w ); | |
| 51 | extern WRITE8_HANDLER( bking2_cont3_w ); | |
| 52 | extern WRITE8_HANDLER( bking2_hitclr_w ); | |
| 53 | extern WRITE8_HANDLER( bking2_playfield_w ); | |
| 48 | 54 | |
| 55 | extern READ8_HANDLER( bking2_input_port_5_r ); | |
| 56 | extern READ8_HANDLER( bking2_input_port_6_r ); | |
| 57 | extern READ8_HANDLER( bking2_pos_r ); | |
| 49 | 58 | |
| 59 | UINT8 *bking2_playfield_ram; | |
| 60 | ||
| 61 | static int bking3_addr_h, bking3_addr_l; | |
| 50 | 62 | static int sndnmi_enable = 1; |
| 51 | 63 | |
| 52 | 64 | static READ8_HANDLER( bking2_sndnmi_disable_r ) |
| r1490 | r1491 | |
| 72 | 84 | if (sndnmi_enable) cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 73 | 85 | } |
| 74 | 86 | |
| 75 | ||
| 76 | static int bk3_l, bk3_h; | |
| 77 | ||
| 78 | static WRITE8_HANDLER( bk3_l_w) | |
| 87 | static WRITE8_HANDLER( bking3_addr_l_w ) | |
| 79 | 88 | { |
| 80 | bk3_l = data; | |
| 89 | bking3_addr_l = data; | |
| 81 | 90 | } |
| 82 | 91 | |
| 83 | static WRITE8_HANDLER( bk3_h_w) | |
| 92 | static WRITE8_HANDLER( bking3_addr_h_w ) | |
| 84 | 93 | { |
| 85 | bk3_h = data; | |
| 94 | bking3_addr_h = data; | |
| 86 | 95 | } |
| 87 | 96 | |
| 88 | static READ8_HANDLER( bk3_r ) | |
| 97 | static READ8_HANDLER( bking3_extrarom_r ) | |
| 89 | 98 | { |
| 90 | 99 | UINT8 *rom = memory_region(REGION_USER2); |
| 91 | return rom[bk3_h*256+bk3_l]; | |
| 100 | return rom[bking3_addr_h * 256 + bking3_addr_l]; | |
| 92 | 101 | } |
| 93 | 102 | |
| 94 | 103 | static WRITE8_HANDLER( unk_w ) |
| r1490 | r1491 | |
| 99 | 108 | */ |
| 100 | 109 | } |
| 101 | 110 | |
| 102 | static READ8_HANDLER( | |
| 111 | static READ8_HANDLER( bking3_ext_check_r ) | |
| 103 | 112 | { |
| 104 | static int res = 3; | |
| 105 | ||
| 106 | return res;//cpu data / MCU ready | |
| 107 | } | |
| 108 | ||
| 109 | ||
| 110 | /* | |
| 111 | Birdie King 3 MCU simulation | |
| 112 | Nothing really special to report,just the typical protection HW test and another | |
| 113 | protection routine with 0x30 command when the player have to shot on the green. | |
| 114 | ||
| 115 | Todo: | |
| 116 | \-How to handle the reads at port($6f)? | |
| 117 | \-In-depth game untested. | |
| 118 | */ | |
| 119 | static UINT8 mcu_val; | |
| 120 | ||
| 121 | static WRITE8_HANDLER( mcu_data_w ) | |
| 122 | { | |
| 123 | #ifdef MAME_DEBUG | |
| 124 | logerror("mcu_data_w = %x\n",data); | |
| 125 | #endif | |
| 126 | mcu_val = data; | |
| 127 | /* HW test */ | |
| 128 | /* all bits of port ($02) except the MSB are connected to the command, | |
| 129 | in all cases it should return 0x5e.This one is here to avoid to get a big | |
| 130 | switch-case statement in the mcu_data_r function... */ | |
| 131 | if(mcu_val >= 0x80) | |
| 132 | mcu_val = 0x5e; | |
| 133 | } | |
| 134 | ||
| 135 | static READ8_HANDLER( mcu_data_r ) | |
| 136 | { | |
| 137 | // popmessage("MCU-r1 PC = %04x %02x",activecpu_get_pc(),mcu_val); | |
| 138 | switch(mcu_val) | |
| 139 | { | |
| 140 | /* Shot counter control at the green (check $bdf and afterwards in that condition)*/ | |
| 141 | case 0x30: return (mcu_val-0x1e); | |
| 142 | default: return (mcu_val); | |
| 143 | } | |
| 144 | } | |
| 145 | ||
| 146 | static READ8_HANDLER( mcu_data_r2 ) | |
| 147 | { | |
| 148 | // popmessage("MCU-r2 PC = %04x %02x",activecpu_get_pc(),mcu_val); | |
| 149 | 113 | return 0x31; //no "bad rom.", no "bad ext." |
| 150 | 114 | } |
| 151 | 115 | |
| 152 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 153 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) | |
| 154 | AM_RANGE(0x8000, 0x83ff) AM_READ(MRA8_RAM) | |
| 155 | AM_RANGE(0x9000, 0x97ff) AM_READ(MRA8_RAM) | |
| 116 | static ADDRESS_MAP_START( bking2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 117 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 118 | AM_RANGE(0x8000, 0x83ff) AM_RAM | |
| 119 | AM_RANGE(0x9000, 0x97ff) AM_RAM AM_WRITE(bking2_playfield_w) AM_BASE(&bking2_playfield_ram) | |
| 156 | 120 | ADDRESS_MAP_END |
| 157 | 121 | |
| 158 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 159 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) | |
| 160 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(MWA8_RAM) | |
| 161 | AM_RANGE(0x9000, 0x97ff) AM_WRITE(bking2_playfield_w) AM_BASE(&bking2_playfield_ram) | |
| 162 | ADDRESS_MAP_END | |
| 163 | ||
| 164 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) | |
| 122 | static ADDRESS_MAP_START( bking2_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 165 | 123 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 166 | AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) | |
| 167 | AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) | |
| 168 | AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r) | |
| 169 | AM_RANGE(0x03, 0x03) AM_READ(input_port_3_r) | |
| 170 | AM_RANGE(0x04, 0x04) AM_READ(input_port_4_r) | |
| 171 | AM_RANGE(0x05, 0x05) AM_READ(bking2_input_port_5_r) | |
| 172 | AM_RANGE(0x06, 0x06) AM_READ(bking2_input_port_6_r) | |
| 124 | AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, bking2_xld1_w) | |
| 125 | AM_RANGE(0x01, 0x01) AM_READWRITE(input_port_1_r, bking2_yld1_w) | |
| 126 | AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, bking2_xld2_w) | |
| 127 | AM_RANGE(0x03, 0x03) AM_READWRITE(input_port_3_r, bking2_yld2_w) | |
| 128 | AM_RANGE(0x04, 0x04) AM_READWRITE(input_port_4_r, bking2_xld3_w) | |
| 129 | AM_RANGE(0x05, 0x05) AM_READWRITE(bking2_input_port_5_r, bking2_yld3_w) | |
| 130 | AM_RANGE(0x06, 0x06) AM_READWRITE(bking2_input_port_6_r, bking2_msk_w) | |
| 131 | AM_RANGE(0x07, 0x07) AM_WRITE(watchdog_reset_w) | |
| 132 | AM_RANGE(0x08, 0x08) AM_WRITE(bking2_cont1_w) | |
| 133 | AM_RANGE(0x09, 0x09) AM_WRITE(bking2_cont2_w) | |
| 134 | AM_RANGE(0x0a, 0x0a) AM_WRITE(bking2_cont3_w) | |
| 135 | AM_RANGE(0x0b, 0x0b) AM_WRITE(bking2_soundlatch_w) | |
| 136 | // AM_RANGE(0x0c, 0x0c) AM_WRITE(bking2_eport2_w) this is not shown to be connected anywhere | |
| 137 | AM_RANGE(0x0d, 0x0d) AM_WRITE(bking2_hitclr_w) | |
| 173 | 138 | AM_RANGE(0x07, 0x1f) AM_READ(bking2_pos_r) |
| 174 | ||
| 175 | AM_RANGE(0x2f, 0x2f) AM_READ(mcu_data_r) | |
| 176 | AM_RANGE(0x4f, 0x4f) AM_READ(mcu_status_r) | |
| 177 | AM_RANGE(0x60, 0x60) AM_READ(bk3_r) | |
| 178 | AM_RANGE(0x6f, 0x6f) AM_READ(mcu_data_r2) | |
| 179 | 139 | ADDRESS_MAP_END |
| 180 | 140 | |
| 181 | static ADDRESS_MAP_START( | |
| 141 | static ADDRESS_MAP_START( bking3_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 182 | 142 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 183 | AM_RANGE(0x00, 0x00) AM_WRITE(bking2_xld1_w) | |
| 184 | AM_RANGE(0x01, 0x01) AM_WRITE(bking2_yld1_w) | |
| 185 | AM_RANGE(0x02, 0x02) AM_WRITE(bking2_xld2_w) | |
| 186 | AM_RANGE(0x03, 0x03) AM_WRITE(bking2_yld2_w) | |
| 187 | AM_RANGE(0x04, 0x04) AM_WRITE(bking2_xld3_w) | |
| 188 | AM_RANGE(0x05, 0x05) AM_WRITE(bking2_yld3_w) | |
| 189 | AM_RANGE(0x06, 0x06) AM_WRITE(bking2_msk_w) | |
| 143 | AM_RANGE(0x00, 0x00) AM_READWRITE(input_port_0_r, bking2_xld1_w) | |
| 144 | AM_RANGE(0x01, 0x01) AM_READWRITE(input_port_1_r, bking2_yld1_w) | |
| 145 | AM_RANGE(0x02, 0x02) AM_READWRITE(input_port_2_r, bking2_xld2_w) | |
| 146 | AM_RANGE(0x03, 0x03) AM_READWRITE(input_port_3_r, bking2_yld2_w) | |
| 147 | AM_RANGE(0x04, 0x04) AM_READWRITE(input_port_4_r, bking2_xld3_w) | |
| 148 | AM_RANGE(0x05, 0x05) AM_READWRITE(bking2_input_port_5_r, bking2_yld3_w) | |
| 149 | AM_RANGE(0x06, 0x06) AM_READWRITE(bking2_input_port_6_r, bking2_msk_w) | |
| 190 | 150 | AM_RANGE(0x07, 0x07) AM_WRITE(watchdog_reset_w) |
| 191 | 151 | AM_RANGE(0x08, 0x08) AM_WRITE(bking2_cont1_w) |
| 192 | 152 | AM_RANGE(0x09, 0x09) AM_WRITE(bking2_cont2_w) |
| r1490 | r1491 | |
| 194 | 154 | AM_RANGE(0x0b, 0x0b) AM_WRITE(bking2_soundlatch_w) |
| 195 | 155 | // AM_RANGE(0x0c, 0x0c) AM_WRITE(bking2_eport2_w) this is not shown to be connected anywhere |
| 196 | 156 | AM_RANGE(0x0d, 0x0d) AM_WRITE(bking2_hitclr_w) |
| 197 | ||
| 198 | AM_RANGE(0x2f, 0x2f) AM_WRITE(mcu_data_w) | |
| 199 | AM_RANGE(0x4f, 0x4f) AM_WRITE(unk_w) | |
| 200 | AM_RANGE(0x6f, 0x6f) AM_WRITE(bk3_h_w) | |
| 201 | AM_RANGE(0x8f, 0x8f) AM_WRITE(bk3_l_w) | |
| 157 | AM_RANGE(0x07, 0x1f) AM_READ(bking2_pos_r) | |
| 158 | AM_RANGE(0x2f, 0x2f) AM_READWRITE(buggychl_mcu_r, buggychl_mcu_w) | |
| 159 | AM_RANGE(0x4f, 0x4f) AM_READWRITE(buggychl_mcu_status_r, unk_w) | |
| 160 | AM_RANGE(0x60, 0x60) AM_READ(bking3_extrarom_r) | |
| 161 | AM_RANGE(0x6f, 0x6f) AM_READWRITE(bking3_ext_check_r, bking3_addr_h_w) | |
| 162 | AM_RANGE(0x8f, 0x8f) AM_WRITE(bking3_addr_l_w) | |
| 202 | 163 | ADDRESS_MAP_END |
| 203 | 164 | |
| 204 | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 205 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_ROM) | |
| 206 | AM_RANGE(0x2000, 0x2fff) AM_READ(MRA8_ROM) //only bking3 | |
| 207 | AM_RANGE(0x4000, 0x43ff) AM_READ(MRA8_RAM) | |
| 208 | AM_RANGE(0x4401, 0x4401) AM_READ(AY8910_read_port_0_r) | |
| 209 | AM_RANGE(0x4403, 0x4403) AM_READ(AY8910_read_port_1_r) | |
| 165 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 166 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 167 | AM_RANGE(0x2000, 0x2fff) AM_ROM //only bking3 | |
| 168 | AM_RANGE(0x4000, 0x43ff) AM_RAM | |
| 169 | AM_RANGE(0x4400, 0x4400) AM_WRITE(AY8910_control_port_0_w) | |
| 170 | AM_RANGE(0x4401, 0x4401) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 171 | AM_RANGE(0x4402, 0x4402) AM_WRITE(AY8910_control_port_1_w) | |
| 172 | AM_RANGE(0x4403, 0x4403) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 210 | 173 | AM_RANGE(0x4800, 0x4800) AM_READ(soundlatch_r) |
| 211 | AM_RANGE(0x4802, 0x4802) AM_READ(bking2_sndnmi_disable_r) | |
| 212 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8_ROM) /* space for some other ROM??? | |
| 213 | It's checked if there is valid code there | |
| 214 | [Probably diagnostic ROM like other early Taito games -AS]*/ | |
| 174 | AM_RANGE(0x4802, 0x4802) AM_READWRITE(bking2_sndnmi_disable_r, bking2_sndnmi_enable_w) | |
| 175 | AM_RANGE(0xe000, 0xefff) AM_ROM /* Space for diagnostic ROM */ | |
| 215 | 176 | ADDRESS_MAP_END |
| 216 | 177 | |
| 217 | static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 218 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_ROM) | |
| 219 | AM_RANGE(0x2000, 0x2fff) AM_WRITE(MWA8_ROM) //only bking3 | |
| 220 | AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8_RAM) | |
| 221 | AM_RANGE(0x4400, 0x4400) AM_WRITE(AY8910_control_port_0_w) | |
| 222 | AM_RANGE(0x4401, 0x4401) AM_WRITE(AY8910_write_port_0_w) | |
| 223 | AM_RANGE(0x4402, 0x4402) AM_WRITE(AY8910_control_port_1_w) | |
| 224 | AM_RANGE(0x4403, 0x4403) AM_WRITE(AY8910_write_port_1_w) | |
| 225 | AM_RANGE(0x4802, 0x4802) AM_WRITE(bking2_sndnmi_enable_w) | |
| 178 | #if 0 | |
| 179 | static UINT8 portA_in,portA_out,ddrA; | |
| 180 | ||
| 181 | static READ8_HANDLER( bking3_68705_portA_r ) | |
| 182 | { | |
| 183 | //printf("portA_r = %02X\n",(portA_out & ddrA) | (portA_in & ~ddrA)); | |
| 184 | return (portA_out & ddrA) | (portA_in & ~ddrA); | |
| 185 | } | |
| 186 | ||
| 187 | static WRITE8_HANDLER( bking3_68705_portA_w ) | |
| 188 | { | |
| 189 | portA_out = data; | |
| 190 | // printf("portA_out = %02X\n",data); | |
| 191 | } | |
| 192 | ||
| 193 | static WRITE8_HANDLER( bking3_68705_ddrA_w ) | |
| 194 | { | |
| 195 | ddrA = data; | |
| 196 | } | |
| 197 | ||
| 198 | static UINT8 portB_in,portB_out,ddrB; | |
| 199 | ||
| 200 | static READ8_HANDLER( bking3_68705_portB_r ) | |
| 201 | { | |
| 202 | return (portB_out & ddrB) | (portB_in & ~ddrB); | |
| 203 | } | |
| 204 | ||
| 205 | static WRITE8_HANDLER( bking3_68705_portB_w ) | |
| 206 | { | |
| 207 | // if(data != 0xff) | |
| 208 | // printf("portB_out = %02X\n",data); | |
| 209 | ||
| 210 | if (~data & 0x02) | |
| 211 | { | |
| 212 | portA_in = from_main; | |
| 213 | if (main_sent) cpunum_set_input_line(2,0,CLEAR_LINE); | |
| 214 | main_sent = 0; | |
| 215 | } | |
| 216 | ||
| 217 | if (~data & 0x04) | |
| 218 | { | |
| 219 | /* 68705 is writing data for the Z80 */ | |
| 220 | from_mcu = portA_out; | |
| 221 | mcu_sent = 1; | |
| 222 | } | |
| 223 | ||
| 224 | if(data != 0xff && data != 0xfb && data != 0xfd) | |
| 225 | printf("portB_w = %X\n",data); | |
| 226 | ||
| 227 | portB_out = data; | |
| 228 | } | |
| 229 | ||
| 230 | static WRITE8_HANDLER( bking3_68705_ddrB_w ) | |
| 231 | { | |
| 232 | ddrB = data; | |
| 233 | } | |
| 234 | ||
| 235 | static READ8_HANDLER( bking3_68705_portC_r ) | |
| 236 | { | |
| 237 | int portC_in = 0; | |
| 238 | if (main_sent) portC_in |= 0x01; | |
| 239 | if (!mcu_sent) portC_in |= 0x02; | |
| 240 | //logerror("%04x: 68705 port C read %02x\n",activecpu_get_pc(),portC_in); | |
| 241 | return portC_in; | |
| 242 | } | |
| 243 | #endif | |
| 244 | static ADDRESS_MAP_START( m68705_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 245 | ADDRESS_MAP_FLAGS( AMEF_ABITS(11) ) | |
| 246 | AM_RANGE(0x0000, 0x0000) AM_READWRITE(buggychl_68705_portA_r, buggychl_68705_portA_w) | |
| 247 | AM_RANGE(0x0001, 0x0001) AM_READWRITE(buggychl_68705_portB_r, buggychl_68705_portB_w) | |
| 248 | AM_RANGE(0x0002, 0x0002) AM_READWRITE(buggychl_68705_portC_r, buggychl_68705_portC_w) | |
| 249 | AM_RANGE(0x0004, 0x0004) AM_WRITE(buggychl_68705_ddrA_w) | |
| 250 | AM_RANGE(0x0005, 0x0005) AM_WRITE(buggychl_68705_ddrB_w) | |
| 251 | AM_RANGE(0x0006, 0x0006) AM_WRITE(buggychl_68705_ddrC_w) | |
| 252 | AM_RANGE(0x0010, 0x007f) AM_RAM | |
| 253 | AM_RANGE(0x0080, 0x07ff) AM_ROM | |
| 226 | 254 | ADDRESS_MAP_END |
| 227 | 255 | |
| 228 | 256 | static INPUT_PORTS_START( bking ) |
| r1490 | r1491 | |
| 519 | 547 | static MACHINE_DRIVER_START( bking2 ) |
| 520 | 548 | |
| 521 | 549 | /* basic machine hardware */ |
| 522 | MDRV_CPU_ADD(Z80, 4000000) /* 4 MHz */ | |
| 523 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) | |
| 524 | MDRV_CPU_IO_MAP(readport,writeport) | |
| 550 | MDRV_CPU_ADD_TAG("main_cpu", Z80, XTAL_12MHz/4) /* 3 MHz */ | |
| 551 | MDRV_CPU_PROGRAM_MAP(bking2_map,0) | |
| 552 | MDRV_CPU_IO_MAP(bking2_io_map,0) | |
| 525 | 553 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 526 | 554 | |
| 527 | MDRV_CPU_ADD(Z80, | |
| 555 | MDRV_CPU_ADD(Z80, XTAL_6MHz/2) /* 3 MHz */ | |
| 528 | 556 | /* audio CPU */ |
| 529 | MDRV_CPU_PROGRAM_MAP(sound_ | |
| 557 | MDRV_CPU_PROGRAM_MAP(sound_ | |
| 530 | 558 | /* interrupts (from Jungle King hardware, might be wrong): */ |
| 531 | 559 | /* - no interrupts synced with vblank */ |
| 532 | 560 | /* - NMI triggered by the main CPU */ |
| r1490 | r1491 | |
| 553 | 581 | /* sound hardware */ |
| 554 | 582 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 555 | 583 | |
| 556 | MDRV_SOUND_ADD(AY8910, | |
| 584 | MDRV_SOUND_ADD(AY8910, XTAL_6MHz/4) | |
| 557 | 585 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 558 | 586 | |
| 559 | MDRV_SOUND_ADD(AY8910, | |
| 587 | MDRV_SOUND_ADD(AY8910, XTAL_6MHz/4) | |
| 560 | 588 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 561 | 589 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 562 | 590 | |
| r1490 | r1491 | |
| 564 | 592 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 565 | 593 | MACHINE_DRIVER_END |
| 566 | 594 | |
| 595 | static MACHINE_DRIVER_START( bking3 ) | |
| 596 | MDRV_IMPORT_FROM(bking2) | |
| 597 | ||
| 598 | MDRV_CPU_MODIFY("main_cpu") | |
| 599 | MDRV_CPU_IO_MAP(bking3_io_map,0) | |
| 600 | ||
| 601 | MDRV_CPU_ADD(M68705, XTAL_3MHz/M68705_CLOCK_DIVIDER) /* xtal is 3MHz, divided by 4 internally */ | |
| 602 | MDRV_CPU_PROGRAM_MAP(m68705_map,0) | |
| 603 | ||
| 604 | MDRV_MACHINE_RESET(buggychl) | |
| 605 | ||
| 606 | MDRV_INTERLEAVE(100) | |
| 607 | MACHINE_DRIVER_END | |
| 608 | ||
| 567 | 609 | /*************************************************************************** |
| 568 | 610 | |
| 569 | 611 | Game driver(s) |
| r1490 | r1491 | |
| 651 | 693 | ROM_LOAD( "pal16l8.3", 0x0400, 0x0104, CRC(a609d0cf) SHA1(7a18040720646c2dff4c1dc6f272c6a69e538c47) ) |
| 652 | 694 | ROM_END |
| 653 | 695 | |
| 696 | /* | |
| 697 | Birdie King 3 | |
| 698 | Taito, 1984 | |
| 699 | ||
| 700 | A golf game using a trackball. Uses same harness/pinout as | |
| 701 | Elevator Action, Victorious Nine, Jolly Jogger (etc) | |
| 702 | ||
| 703 | PCB Layouts | |
| 704 | (Note! There are no PALs on ANY of the PCBs) | |
| 705 | ||
| 706 | Top PCB | |
| 707 | ------- | |
| 708 | DMO70003A | |
| 709 | K1000173B (sticker) | |
| 710 | |------------------------| | |
| 711 | | | | |
| 712 | |-| | | |
| 713 | | | Z80 2114 | | |
| 714 | | | 2114 | | |
| 715 | | |N | | |
| 716 | | | A24_18.4F | | |
| 717 | | | A24_19.4D | | |
| 718 | |-| A24_20.4B | | |
| 719 | | | | |
| 720 | | AY3-8910 | | |
| 721 | | | | |
| 722 | | AY3-8910 | | |
| 723 | | | | |
| 724 | | | | |
| 725 | | 6MHz | | |
| 726 | | | | |
| 727 | | | | |
| 728 | | | | |
| 729 | | LM3900 LM3900 LM3900 | | |
| 730 | |------------------------| | |
| 731 | Notes: | |
| 732 | Z80 - Clock 3.000MHz [6/2] | |
| 733 | AY3-8910 - Clock 1.500MHz [6/4] | |
| 734 | 2114 - 1kx4 SRAM (DIP18) | |
| 735 | N - Flat cable connector, joins to main board | |
| 736 | LM3900 - National LM3900 Quad, dual-input amplifier IC (DIP14) | |
| 737 | plus many resistors/capacitors below the AY3-8910's | |
| 738 | ||
| 739 | ||
| 740 | Sub PCB (below Top PCB) | |
| 741 | ----------------------- | |
| 742 | SUB PCB J910 0010 A | |
| 743 | K910 0018 A | |
| 744 | |------------------------| | |
| 745 | | * | | |
| 746 | | | | |
| 747 | | | | |
| 748 | | | | |
| 749 | | | | |
| 750 | | | | |
| 751 | | | | |
| 752 | | | | |
| 753 | | | | |
| 754 | | | | |
| 755 | | | | |
| 756 | | | | |
| 757 | | | | |
| 758 | |A24_21.IC25 | | |
| 759 | | | | |
| 760 | | S2 | | |
| 761 | | | | |
| 762 | | 3MHz S1| | |
| 763 | |T A24_22.IC17 | | |
| 764 | |------------------------| | |
| 765 | Notes: | |
| 766 | A24_22.IC17 - Motorola 68705P5 Microcontroller, clock 3.000MHz | |
| 767 | A24_21.IC25 - 2732 EPROM | |
| 768 | * - DIP24 socket with flat cable below PCB, joins to main board | |
| 769 | T - 4-pin power connector (5 volts) coming from main board | |
| 770 | S1 - Flat cable connector, joins to main PCB to connector S | |
| 771 | S2 - Flat cable connector, joins to bottom PCB to connector S | |
| 772 | ||
| 773 | ||
| 774 | ||
| 775 | Main PCB | |
| 776 | -------- | |
| 777 | J1100001A | |
| 778 | K1100001A | |
| 779 | M4300001D (sticker) | |
| 780 | K1100032A (sticker) | |
| 781 | |--------------------------------------------------------------| | |
| 782 | | M3712 VOL A24_03.2D M53354 | | |
| 783 | |H DM-04.2C |-| | |
| 784 | | N * | | | |
| 785 | | MC14584 R| | | |
| 786 | | | | | |
| 787 | | | | | |
| 788 | | | | | |
| 789 | | |-| | |
| 790 | | | | |
| 791 | |G LM3900 | | |
| 792 | | MC14093 | | |
| 793 | | A24_01.7E |-| | |
| 794 | | | | | |
| 795 | | A24_01.9E | | | |
| 796 | | MC14584 S| | | |
| 797 | | A24_02.10E | | | |
| 798 | | MC14584 MC1455 | | | |
| 799 | | |-| | |
| 800 | | DSWC DSWB DSWA | | |
| 801 | |--------------------------------------------------------------| | |
| 802 | Notes: | |
| 803 | M53354 - ?, maybe 74LS154? (DIP24) | |
| 804 | MC1455 - Motorola MC1455 Monolithic Timing Circuit (NE555 compatible) | |
| 805 | A24_01/02 - 2716 EPROMs | |
| 806 | A24_03 - Signetics 82S141 PROM (DIP24) | |
| 807 | DM-04 - Signetics 82S123 PROM (DIP8) | |
| 808 | * - DIP24 socket with flat cable, joins to SUB PCB DIP24 socket | |
| 809 | R/S - Flat cable connector, R joins to main board, S joins to SUB PCB | |
| 810 | G - 22-way Edge Connector | |
| 811 | N - Flat cable connector, joins to TOP PCB | |
| 812 | H - 12-pin power connector | |
| 813 | VSync - 60Hz | |
| 814 | HSync - 15.67kHz | |
| 815 | ||
| 816 | ||
| 817 | Bottom PCB | |
| 818 | ---------- | |
| 819 | DMO70002A | |
| 820 | DMN00002A | |
| 821 | K1000172B (sticker) | |
| 822 | |--------------------------------------------------------------| | |
| 823 | | A24_17.13A 2114 Z80 A24_04.13F | | |
| 824 | | |-| | |
| 825 | | A24_16.11A 2114 A24_05.11F | | | |
| 826 | | S| | | |
| 827 | | A24_15.10A A24_06.10F | | | |
| 828 | | | | | |
| 829 | | A24_14.8A A24_07.8F | | | |
| 830 | | |-| | |
| 831 | |T A24_13.7A A24_08.7F | | |
| 832 | | | | |
| 833 | | A24_12.5A A24_09.5F | | |
| 834 | | |-| | |
| 835 | | A24_10.4F | | | |
| 836 | | 2114 | | | |
| 837 | | A24_11.2F R| | | |
| 838 | | 2114 | | | |
| 839 | | | | | |
| 840 | | 2114 |-| | |
| 841 | | 12MHz | | |
| 842 | |--------------------------------------------------------------| | |
| 843 | Notes: | |
| 844 | R/S - Flat cable connector, R joins to main board, S joins to SUB PCB | |
| 845 | T - 18-Way Edge Connector (for +5V/GND only) | |
| 846 | A24_* - 2732 EPROMs | |
| 847 | Z80 - Clock 3.000MHz [12/4] | |
| 848 | 2114 - 1kx4 SRAM (DIP18) | |
| 849 | */ | |
| 850 | ||
| 654 | 851 | ROM_START( bking3 ) |
| 655 | 852 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 656 | 853 | ROM_LOAD( "a24-04.13f", 0x0000, 0x1000, CRC(a0c319a6) SHA1(6b79667288113fde43975fcfd05e93d8e45bf92d) ) |
| r1490 | r1491 | |
| 668 | 865 | ROM_LOAD( "a24-20.4b", 0x2000, 0x1000, CRC(0e9e16d6) SHA1(43c69602a8d9c34c527ce54472db84168acc4ef4) ) |
| 669 | 866 | |
| 670 | 867 | ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */ |
| 671 | ROM_LOAD( "a24_22", | |
| 868 | ROM_LOAD( "a24_22.ic17", | |
| 672 | 869 | |
| 673 | 870 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) /* Tiles */ |
| 674 | 871 | ROM_LOAD( "a24-12.5a", 0x0000, 0x1000, CRC(c5fe4817) SHA1(fbf82d9d85e18b76c7e939932df074a545e73f42) ) |
| r1490 | r1491 | |
| 691 | 888 | ROM_LOAD( "82s123.2c", 0x0000, 0x0020, CRC(4cb5bd32) SHA1(8851bae033ba67516d5ff6888e5daef10c2116ee) ) /* collision detection */ |
| 692 | 889 | |
| 693 | 890 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 694 | ROM_LOAD( " | |
| 891 | ROM_LOAD( "a2 | |
| 695 | 892 | |
| 696 | 893 | ROM_REGION( 0x1000, REGION_USER2, 0 ) |
| 697 | 894 | ROM_LOAD( "a24-21.25", 0x0000, 0x1000, CRC(3106fcac) SHA1(08454adfb58e5df84140d86ed52fa4ef684df9f1) ) /* extra rom on the same SUB PCB where is the mcu */ |
| 698 | ||
| 699 | //missing? | |
| 700 | //"a24_03" A24_03 - TI TBP28S46N - Not read | |
| 701 | //"a24_04" A24_04 - Bipolar PROM - Not read | |
| 702 | ||
| 703 | 895 | ROM_END |
| 704 | 896 | |
| 705 | 897 | GAME( 1982, bking, 0, bking2, bking, 0, ROT270, "Taito Corporation", "Birdie King", 0 ) |
| 706 | 898 | GAME( 1983, bking2, 0, bking2, bking2, 0, ROT90, "Taito Corporation", "Birdie King 2", 0 ) |
| 707 | GAME( 1984, bking3, 0, bking | |
| 899 | GAME( 1984, bking3, 0, bking3, bking2, 0, ROT90, "Taito Corporation", "Birdie King 3", GAME_WRONG_COLORS ) |
| r1490 | r1491 | |
|---|---|---|
| 1297 | 1297 | ROM_LOAD_HS( "ds1_o4.bin", 0x80000, 0x10000, CRC(a6246fcb) SHA1(39de4fdb175ab16b791cdc5d757ff7bfee8e3d2b) ) |
| 1298 | 1298 | ROM_END |
| 1299 | 1299 | |
| 1300 | /* Dragon Spirit (Atari license) */ | |
| 1301 | ROM_START( dspirita ) | |
| 1302 | ROM_REGION( 0x2c000, REGION_CPU3, 0 ) /* 176k for the sound cpu */ | |
| 1303 | ROM_LOAD( "ds1_s0.bin", 0x0c000, 0x10000, CRC(27100065) SHA1(e8fbacaa43a5b858fce2ca3b579b90c1e016396b) ) | |
| 1304 | ROM_LOAD( "ds1_s1.bin", 0x1c000, 0x10000, CRC(b398645f) SHA1(e83208e2aea7b57b4a26f123a43c112e30495aca) ) | |
| 1305 | ||
| 1306 | ROM_REGION( 0x400000, REGION_USER1, 0 ) /* 4M for ROMs */ | |
| 1307 | ROM_LOAD_512( "ds1_p0.bin", 0x000000, CRC(b22a2856) SHA1(8dea168e341460757c924bb510df4d4e9cdd908d) ) | |
| 1308 | ROM_LOAD_512( "ds1_p1.bin", 0x080000, CRC(f7e3298a) SHA1(76c924ed1311e7e292bd67f57c1e831054625bb6) ) | |
| 1309 | ROM_LOAD_512( "ds1_p2.bin", 0x100000, CRC(3c9b0100) SHA1(1def48a28b68e1e36cd1a165eb7127b05982c54d) ) | |
| 1310 | ROM_LOAD_512( "ds1_p3.bin", 0x180000, CRC(c6e5954b) SHA1(586fc108f264e91a4bbbb05153dd1aa19be81b5b) ) | |
| 1311 | ROM_LOAD_512( "ds1_p4.bin", 0x200000, CRC(f3307870) SHA1(a85d28c5dc55cbfa6c384d71e724db44c547d976) ) | |
| 1312 | ROM_LOAD_512( "ds1_p5.bin", 0x280000, CRC(9a3a1028) SHA1(505808834677c433e0a4cfbf387b2874e2d0fc47) ) | |
| 1313 | ROM_LOAD_512( "8722-1107.bin", 0x300000, CRC(5382447d) SHA1(3034d3a57b493c86673ee0aa7172bae778edd76a) ) | |
| 1314 | ROM_LOAD_512( "8722-1108.bin", 0x380000, CRC(80ff492a) SHA1(716ff7444edc0dfcce0fda2d213feb183435471f) ) | |
| 1315 | ||
| 1316 | ROM_REGION( 0xd0000, REGION_CPU4, 0 ) /* the MCU & voice */ | |
| 1317 | ROM_LOAD( "cus64-64a1.mcu", 0x0f000, 0x01000, CRC(ffb5c0bd) SHA1(7a38c0cc2553c627f4ec507fb6e807cf7d537c02) ) /* internal 63701 MCU code */ | |
| 1318 | ROM_LOAD_HS( "ds1_v0.bin", 0x10000, 0x10000, CRC(313b3508) SHA1(4770fb28b45abc4967534face0bf6794d30df71a) ) | |
| 1319 | ROM_LOAD( "ds_voi-1.bin", 0x30000, 0x20000, CRC(54790d4e) SHA1(d327b1c65c487dd691389920789c59f0eb1ecee1) ) | |
| 1320 | ROM_LOAD( "ds_voi-2.bin", 0x50000, 0x20000, CRC(05298534) SHA1(5ffd9018a5c1d5ce992dd3c7575b5e25945f14fa) ) | |
| 1321 | ROM_LOAD( "ds_voi-3.bin", 0x70000, 0x20000, CRC(13e84c7e) SHA1(6ad0eb50eb3312f614a891ae8d66faca6b48d204) ) | |
| 1322 | ROM_LOAD( "ds_voi-4.bin", 0x90000, 0x20000, CRC(34fbb8cd) SHA1(3f56f136e9d54d45924802f7149bfbc319e0933a) ) | |
| 1323 | ||
| 1324 | ROM_REGION( 0x20000, REGION_GFX1, 0 ) /* character mask */ | |
| 1325 | ROM_LOAD( "ds_chr-8.bin", 0x00000, 0x20000, CRC(946eb242) SHA1(6964fff430fe306c575ff07e4c054c70aa7d96ca) ) | |
| 1326 | ||
| 1327 | ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE ) /* characters */ | |
| 1328 | ROM_LOAD( "ds_chr-0.bin", 0x00000, 0x20000, CRC(7bf28ac3) SHA1(af42b568be0c3919dbbc0e0c7a9d5ea39f84481a) ) | |
| 1329 | ROM_LOAD( "ds_chr-1.bin", 0x20000, 0x20000, CRC(03582fea) SHA1(c6705702bdb55ec6f993fc2582f116a8729c14d0) ) | |
| 1330 | ROM_LOAD( "ds_chr-2.bin", 0x40000, 0x20000, CRC(5e05f4f9) SHA1(ededa62c261ca75fc5e79c80840fc15b27cb3989) ) | |
| 1331 | ROM_LOAD( "ds_chr-3.bin", 0x60000, 0x20000, CRC(dc540791) SHA1(02c5c44bae878b22608cc6f9b09b0dd97c03e51a) ) | |
| 1332 | ROM_LOAD( "ds_chr-4.bin", 0x80000, 0x20000, CRC(ffd1f35c) SHA1(39f19676edc01059dfcee6b5c04527da3ef78ffa) ) | |
| 1333 | ROM_LOAD( "ds_chr-5.bin", 0xa0000, 0x20000, CRC(8472e0a3) SHA1(cece9fec70421fb09107890f108fb47ea770890d) ) | |
| 1334 | ROM_LOAD( "ds_chr-6.bin", 0xc0000, 0x20000, CRC(a799665a) SHA1(70cd630e63714b544f3f61a6663a41e3439639d5) ) | |
| 1335 | ROM_LOAD( "ds_chr-7.bin", 0xe0000, 0x20000, CRC(a51724af) SHA1(85728add3f773c4d814202208bee3d9a053e50de) ) | |
| 1336 | ||
| 1337 | ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprites */ | |
| 1338 | ROM_LOAD( "ds_obj-0.bin", 0x00000, 0x20000, CRC(03ec3076) SHA1(9926ec974ba3472d765531f6add4a8d6e398c46e) ) | |
| 1339 | ROM_LOAD( "ds_obj-1.bin", 0x20000, 0x20000, CRC(e67a8fa4) SHA1(c45070b929f3e4df0e3809cf33cb4538b0067464) ) | |
| 1340 | ROM_LOAD( "ds_obj-2.bin", 0x40000, 0x20000, CRC(061cd763) SHA1(df079052fddb60ea5618ed5a6c41fb4db0e313af) ) | |
| 1341 | ROM_LOAD( "ds_obj-3.bin", 0x60000, 0x20000, CRC(63225a09) SHA1(8fffcd5b6baaa9ced16fbac58f6a3eeb11183c8b) ) | |
| 1342 | ROM_LOAD_HS( "ds1_o4.bin", 0x80000, 0x10000, CRC(a6246fcb) SHA1(39de4fdb175ab16b791cdc5d757ff7bfee8e3d2b) ) | |
| 1343 | ROM_END | |
| 1344 | ||
| 1300 | 1345 | /* Blazer */ |
| 1301 | 1346 | ROM_START( blazer ) |
| 1302 | 1347 | ROM_REGION( 0x1c000, REGION_CPU3, 0 ) /* 176k for the sound cpu */ |
| r1490 | r1491 | |
| 2346 | 2391 | GAME( 1987, yokaidko, shadowld, ns1, shadowld, shadowld, ROT180, "Namco", "Yokai Douchuuki (Japan old version)", 0 ) |
| 2347 | 2392 | GAME( 1987, dspirit, 0, ns1, dspirit, dspirit, ROT90, "Namco", "Dragon Spirit (new version)", 0 ) |
| 2348 | 2393 | GAME( 1987, dspirito, dspirit, ns1, dspirit, dspirit, ROT90, "Namco", "Dragon Spirit (old version)", 0 ) |
| 2394 | GAME( 1987, dspirita, dspirit, ns1, dspirit, dspirit, ROT90, "Namco", "Dragon Spirit (Atari license)", 0 ) | |
| 2349 | 2395 | GAME( 1987, blazer, 0, ns1, ns1, blazer, ROT90, "Namco", "Blazer (Japan)", 0 ) |
| 2350 | 2396 | GAME( 1987, quester, 0, ns1, quester, quester, ROT90, "Namco", "Quester (Japan)", 0 ) |
| 2351 | 2397 | GAME( 1987, pacmania, 0, ns1, pacmania, pacmania, ROT270, "Namco", "Pac-Mania", 0 ) |
| r1490 | r1491 | |
|---|---|---|
| 231 | 231 | causing this. So I'm mystified. (Maybe it's related to game being |
| 232 | 232 | ORIENTATION_FLIP_X ??) |
| 233 | 233 | |
| 234 | BM, 060108 - The original flyer for this game has screenshots which clearly | |
| 235 | show the background is 4 pixels to the left on several game stages (you can | |
| 236 | see the edge of sprites overlapping past the right edge). Therefore I | |
| 237 | do not believe the TC0100SCN problem mentioned above actually exists. The | |
| 238 | current emulation appears to be accurate. | |
| 239 | ||
| 234 | 240 | ***************************************************************************/ |
| 235 | 241 | |
| 236 | 242 | #include "driver.h" |
| r1490 | r1491 | |
|---|---|---|
| 58 | 58 | ************************************************************************/ |
| 59 | 59 | |
| 60 | 60 | #include "driver.h" |
| 61 | #include "cvs.h" | |
| 61 | 62 | #include "cpu/s2650/s2650.h" |
| 62 | 63 | #include "cpu/i8039/i8039.h" |
| 63 | 64 | #include "sound/dac.h" |
| 64 | 65 | #include "video/s2636.h" |
| 65 | 66 | |
| 67 | ||
| 66 | 68 | PALETTE_INIT( quasar ); |
| 67 | 69 | VIDEO_UPDATE( quasar ); |
| 68 | 70 | VIDEO_START( quasar ); |
| 69 | 71 | |
| 70 | extern UINT8 *cvs_bullet_ram; | |
| 71 | 72 | |
| 72 | 73 | extern UINT8 *quasar_effectram; |
| 73 | 74 | extern int quasar_effectcontrol; |
| r1490 | r1491 | |
| 76 | 77 | static int IOpage = 8; |
| 77 | 78 | |
| 78 | 79 | |
| 79 | WRITE8_HANDLER( cvs_videoram_w ); | |
| 80 | WRITE8_HANDLER( cvs_bullet_w ); | |
| 81 | WRITE8_HANDLER( cvs_2636_1_w ); | |
| 82 | WRITE8_HANDLER( cvs_2636_2_w ); | |
| 83 | WRITE8_HANDLER( cvs_2636_3_w ); | |
| 84 | WRITE8_HANDLER( cvs_scroll_w ); | |
| 85 | WRITE8_HANDLER( cvs_video_fx_w ); | |
| 86 | ||
| 87 | READ8_HANDLER( cvs_collision_r ); | |
| 88 | READ8_HANDLER( cvs_collision_clear ); | |
| 89 | READ8_HANDLER( cvs_videoram_r ); | |
| 90 | READ8_HANDLER( cvs_bullet_r ); | |
| 91 | READ8_HANDLER( cvs_2636_1_r ); | |
| 92 | READ8_HANDLER( cvs_2636_2_r ); | |
| 93 | READ8_HANDLER( cvs_2636_3_r ); | |
| 94 | READ8_HANDLER( cvs_character_mode_r ); | |
| 95 | ||
| 96 | 80 | /************************************************************************ |
| 97 | 81 | |
| 98 | 82 | Quasar memory layout |
| r1490 | r1491 | |
| 145 | 129 | |
| 146 | 130 | static WRITE8_HANDLER( quasar_video_w ) |
| 147 | 131 | { |
| 148 | if (page == 0) videoram_w(offset,data); | |
| 149 | if (page == 1) colorram_w(offset,(data & 7)); // 3 bits of ram only - 3 x 2102 | |
| 150 | if (page == 2) | |
| 132 | switch (page) | |
| 151 | 133 | { |
| 152 | quasar_effectram[offset] = data; | |
| 134 | case 0: cvs_video_ram[offset] = data; break; | |
| 135 | case 1: cvs_color_ram[offset] = data & 7; break; // 3 bits of ram only - 3 x 2102 | |
| 136 | case 2: quasar_effectram[offset] = data; break; | |
| 137 | case 3: quasar_effectcontrol = data; break; | |
| 153 | 138 | } |
| 154 | if (page == 3) | |
| 155 | { | |
| 156 | quasar_effectcontrol = data; | |
| 157 | } | |
| 158 | 139 | } |
| 159 | 140 | |
| 160 | 141 | static READ8_HANDLER( quasar_IO_r ) |
| r1490 | r1491 | |
| 216 | 197 | |
| 217 | 198 | static ADDRESS_MAP_START( quasar, ADDRESS_SPACE_PROGRAM, 8 ) |
| 218 | 199 | AM_RANGE(0x0000, 0x13ff) AM_ROM |
| 219 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_r, quasar_bullet_w) AM_BASE(&cvs_bullet_ram) | |
| 220 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_1_r, cvs_2636_1_w) AM_BASE(&s2636_1_ram) | |
| 221 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_2_r, cvs_2636_2_w) AM_BASE(&s2636_2_ram) | |
| 222 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_2636_3_r, cvs_2636_3_w) AM_BASE(&s2636_3_ram) | |
| 223 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(MRA8_RAM /*quasar_video_r*/, quasar_video_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) //0 = background, 1 = colour, 2 = effect, 3 = port blank | |
| 200 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, quasar_bullet_w) AM_BASE(&cvs_bullet_ram) | |
| 201 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&s2636_1_ram) | |
| 202 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&s2636_2_ram) | |
| 203 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_3_or_character_ram_r, cvs_s2636_3_or_character_ram_w) AM_BASE(&s2636_3_ram) | |
| 204 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, quasar_video_w) AM_BASE(&cvs_video_ram) | |
| 224 | 205 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 225 | 206 | AM_RANGE(0x2000, 0x33ff) AM_ROM |
| 226 | 207 | AM_RANGE(0x4000, 0x53ff) AM_ROM |
| r1490 | r1491 | |
| 382 | 363 | |
| 383 | 364 | /* S2636 Mappings */ |
| 384 | 365 | |
| 385 | static const gfx_layout s2636_character10 = | |
| 386 | { | |
| 387 | 8,10, | |
| 388 | 5, | |
| 389 | 1, | |
| 390 | { 0 }, | |
| 391 | { 0,1,2,3,4,5,6,7 }, | |
| 392 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 393 | 8*16 | |
| 394 | }; | |
| 395 | ||
| 396 | static const gfx_layout charlayout8colour = | |
| 397 | { | |
| 398 | 8,8, /* 8*8 characters */ | |
| 399 | 256, /* 256 characters */ | |
| 400 | 3, /* 3 bits per pixel */ | |
| 401 | { 0, 0x800*8, 0x1000*8 }, /* the bitplanes are separated */ | |
| 402 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 403 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 404 | 8*8 /* every char takes 8 consecutive bytes */ | |
| 405 | }; | |
| 406 | ||
| 407 | 366 | static GFXDECODE_START( quasar ) |
| 408 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256) /* Rom chars */ | |
| 409 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout8colour, 0, 259 ) /* Ram chars (NOT USED) */ | |
| 410 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #1 */ | |
| 411 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #2 */ | |
| 412 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_character10, 2072, 8 ) /* s2636 #3 */ | |
| 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256 ) /* Rom chars */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #1 */ | |
| 369 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #2 */ | |
| 370 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #3 */ | |
| 413 | 371 | GFXDECODE_END |
| 414 | 372 | |
| 415 | 373 | static INTERRUPT_GEN( quasar_interrupt ) |
| r1490 | r1491 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | Emulation by Bryan McPhail, mish@tendril.co.uk |
| 33 | 33 | |
| 34 | Note about ver | |
| 34 | Note about ver | |
| 35 | 35 | Version 1 HD-00 |
| 36 | 36 | Version 2 HD-00-1 |
| 37 | 37 | Version 3 HD-00-2 |
| r1490 | r1491 | |
| 132 | 132 | logerror("%08x: Unmapped IRQ write %d %04x\n",activecpu_get_pc(),offset,data); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | static READ16_HANDLER( robo2_dip3_r ) { return readinputport(3); } | |
| 135 | static READ16_HANDLER( robocop2_dip3_r ) { return readinputport(3); } | |
| 136 | 136 | |
| 137 | 137 | static READ16_HANDLER( robocop2_prot_r ) |
| 138 | 138 | { |
| r1490 | r1491 | |
| 253 | 253 | AM_RANGE(0x156000, 0x156fff) AM_READ(MRA16_RAM) |
| 254 | 254 | AM_RANGE(0x15c000, 0x15c7ff) AM_READ(MRA16_RAM) |
| 255 | 255 | AM_RANGE(0x15e000, 0x15e7ff) AM_READ(MRA16_RAM) |
| 256 | AM_RANGE(0x1f8000, 0x1f8001) AM_READ(robo2_dip3_r) /* Dipswitch #3 */ | |
| 256 | AM_RANGE(0x1f8000, 0x1f8001) AM_READ(robocop2_dip3_r ) /* Dipswitch #3 */ | |
| 257 | 257 | ADDRESS_MAP_END |
| 258 | 258 | |
| 259 | 259 | static ADDRESS_MAP_START( robocop2_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1490 | r1491 | |
|---|---|---|
| 338 | 338 | 8*8*4 |
| 339 | 339 | }; |
| 340 | 340 | |
| 341 | #if 0 | |
| 341 | 342 | static const gfx_layout gfxlayout_16x16x16 = |
| 342 | 343 | { |
| 343 | 344 | 16,16, |
| 344 | 345 | RGN_FRAC(1,1), |
| 345 | 346 | 16, |
| 346 | { 0 }, | |
| 347 | { STEP16(0,0) }, // >8planes not supported | |
| 347 | 348 | { STEP16(15,-1) }, |
| 348 | 349 | { STEP16(0,16*1) }, |
| 349 | 350 | 16*16*16 |
| 350 | 351 | }; |
| 352 | #endif | |
| 351 | 353 | |
| 352 | 354 | static GFXDECODE_START( igs_m027 ) |
| 353 | 355 | GFXDECODE_ENTRY( REGION_GFX1, 0, gfxlayout_8x8x4, 0, 16 ) |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | Lovely Poker/Pontoon driver, updated by El Condor from work by Uki and Zsolt Vasvari respectively. | |
| 2 | Lovely Cards/Poker/Pontoon driver, updated by El Condor from work by Uki and | |
| 3 | Zsolt Vasvari respectively. | |
| 3 | 4 | Later cleaned up by Curt Coder and Scott Yellig. |
| 4 | ||
| 5 | Lovely Cards also runs on this hardware, but is not a gambling game. | |
| 6 | ||
| 7 | Any fixes for this driver should be forwarded to the AGEMAME forum at (http://www.mameworld.info), | |
| 8 | or to MAME, if they affect Lovely Cards. | |
| 9 | ||
| 10 | 5 | --- |
| 11 | 6 | |
| 12 | 7 | Lovely Poker by Uki/El Condor |
| r1490 | r1491 | |
| 102 | 97 | |
| 103 | 98 | static MACHINE_RESET( lvpoker ) |
| 104 | 99 | { |
| 105 | payout = 0; | |
| 106 | pulse = 0; | |
| 107 | result = 0; | |
| 100 | payout = 0; | |
| 101 | pulse = 0; | |
| 102 | result = 0; | |
| 108 | 103 | } |
| 109 | 104 | |
| 110 | 105 | static WRITE8_HANDLER(control_port_2_w) |
| 111 | 106 | { |
| 112 | 107 | switch (data) |
| 113 | 108 | { |
| 114 | case 0x60: | |
| 115 | payout = 1; | |
| 116 | break; | |
| 117 | case 0xc0: | |
| 118 | payout = 1; | |
| 119 | break; | |
| 120 | default: | |
| 121 | payout = 0; | |
| 122 | break; | |
| 109 | case 0x60: | |
| 110 | payout = 1; | |
| 111 | break; | |
| 112 | case 0xc0: | |
| 113 | payout = 1; | |
| 114 | break; | |
| 115 | default: | |
| 116 | payout = 0; | |
| 117 | break; | |
| 123 | 118 | } |
| 124 | 119 | } |
| 125 | 120 | |
| r1490 | r1491 | |
| 127 | 122 | { |
| 128 | 123 | switch (data) |
| 129 | 124 | { |
| 130 | case 0x60: | |
| 131 | payout = 1; | |
| 132 | break; | |
| 133 | case 0x80: | |
| 134 | payout = 1; | |
| 135 | break; | |
| 136 | default: | |
| 137 | payout = 0; | |
| 138 | break; | |
| 125 | case 0x60: | |
| 126 | payout = 1; | |
| 127 | break; | |
| 128 | case 0x80: | |
| 129 | payout = 1; | |
| 130 | break; | |
| 131 | default: | |
| 132 | payout = 0; | |
| 133 | break; | |
| 139 | 134 | } |
| 140 | 135 | } |
| 141 | 136 | |
| r1490 | r1491 | |
| 147 | 142 | { |
| 148 | 143 | if ( pulse < 3 ) |
| 149 | 144 | { |
| 150 | result = result | 0x40; | |
| 151 | pulse++; | |
| 145 | result = result | 0x40; | |
| 146 | pulse++; | |
| 152 | 147 | } |
| 153 | 148 | else |
| 154 | 149 | { |
| 155 | pulse = 0; | |
| 150 | pulse = 0; | |
| 156 | 151 | } |
| 157 | 152 | } |
| 158 | 153 | return result; |
| r1490 | r1491 | |
|---|---|---|
| 422 | 422 | static DRIVER_INIT( blstroid ) |
| 423 | 423 | { |
| 424 | 424 | atarigen_eeprom_default = NULL; |
| 425 | atarijsa_init( | |
| 425 | atarijsa_init(machine, 2, 0x80); | |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | Apache 3 ATF-011 |
| 4 | 4 | Round Up 5 ATC-011 |
| 5 | 5 | Cycle Warriors ABA-011 |
| 6 | Big Fight ABA-011 | |
| 6 | 7 | |
| 7 | 8 | Incredibly complex hardware! These are all different boards, but share |
| 8 | 9 | a similar sprite chip (TZB215 on Apache 3, TZB315 on others). Other |
| r1490 | r1491 | |
| 18 | 19 | Round Up 5 doesn't survive a reset |
| 19 | 20 | Dip switches |
| 20 | 21 | Various other things.. |
| 22 | Combine Big Fight & CycleWarriors video routines - currently each | |
| 23 | game uses different sized tilemaps - these are probably software | |
| 24 | controlled rather than hardwired, but I don't think either game | |
| 25 | changes the size at runtime. | |
| 26 | Big Fight/Cyclewarriors - misc graphics problems. | |
| 27 | Cyclewarriors - test mode text does not appear as it needs a -256 Y scroll offset from somewhere. | |
| 21 | 28 | |
| 22 | 29 | Emulation by Bryan McPhail, mish@tendril.co.uk |
| 23 | 30 | |
| r1490 | r1491 | |
| 66 | 73 | |
| 67 | 74 | CW27 |
| 68 | 75 | |
| 76 | Big Fight | |
| 77 | Tatsumi, 1992 | |
| 78 | ||
| 79 | PCB Layout | |
| 80 | ---------- | |
| 81 | ||
| 82 | ABA-011 | |
| 83 | A-8 | |
| 84 | |-----------------------------------------------------------------| | |
| 85 | | LM324 M6295 ROM15 TC5563 | | |
| 86 | |LM324 VOL KA51 50MHz TC5563 PAL |-|| | |
| 87 | | TC51832 TC51832 |--------| | || | |
| 88 | | TC51832 TC51832 |TATSUMI | | || | |
| 89 | | TC51832 TC51832 |TZB315 | ROM20 | || | |
| 90 | | TC51832 TC51832 | | TMM2063 | || | |
| 91 | | ROM0 ROM8 |--------| Z80B | || | |
| 92 | | | || | |
| 93 | |J PAL 16MHz |-|| | |
| 94 | |A ROM2 ROM10 |--------------| PAL | | |
| 95 | |M | 68000 | TMM2088 | | |
| 96 | |M |--------------| | | |
| 97 | |A ROM4 ROM12 TMM2088 | | |
| 98 | | ROM16 ROM17 |-|| | |
| 99 | | PAL PAL TC51832 | || | |
| 100 | | ROM6 ROM14 ROM18 | || | |
| 101 | | EPL204 PAL TC51832 | || | |
| 102 | | |--------------| | || | |
| 103 | | CXD10950 CXD10950 | 68000 | ROM19 TC51832 | || | |
| 104 | | |--------------| | || | |
| 105 | | TC51832 |-|| | |
| 106 | | DSW3(4) DSW2(8) DSW1(8) | | |
| 107 | |-----------------------------------------------------------------| | |
| 108 | Z80 clock - 4.000MHz [16/4] | |
| 109 | 68k clocks - 12.500MHz [50/4] | |
| 110 | M6295 clock - 2.000MHz [16/8]. Sample rate = 2000000/132 | |
| 111 | YM2151 clock - 4.000MHz [16/4] | |
| 112 | ||
| 113 | |-------------------------| | |
| 114 | | D65005(x16) | | |
| 115 | |ROM21 |-|| | |
| 116 | | | || | |
| 117 | | | || | |
| 118 | | | || | |
| 119 | | | || | |
| 120 | | | || | |
| 121 | | | || | |
| 122 | |PAL |-|| | |
| 123 | | ROM24 PAL PAL| | |
| 124 | | ROM23 HD6445 | | |
| 125 | | ROM22 | | |
| 126 | | TC51832(x4) | | |
| 127 | | PAL |-|| | |
| 128 | | PAL | || | |
| 129 | | | || | |
| 130 | | | || | |
| 131 | | | || | |
| 132 | | | || | |
| 133 | | | || | |
| 134 | | |-|| | |
| 135 | |PAL | | |
| 136 | |-------------------------| | |
| 137 | ||
| 69 | 138 | ***************************************************************************/ |
| 70 | 139 | |
| 71 | 140 | #include "driver.h" |
| r1490 | r1491 | |
| 79 | 148 | UINT8 *tatsumi_rom_sprite_lookup1, *tatsumi_rom_sprite_lookup2; |
| 80 | 149 | UINT8 *tatsumi_rom_clut0, *tatsumi_rom_clut1; |
| 81 | 150 | UINT16 *roundup5_unknown0, *roundup5_unknown1, *roundup5_unknown2; |
| 151 | UINT16 bigfight_a20000[8], bigfight_a40000[2], bigfight_a60000[2]; | |
| 152 | extern UINT16 bigfight_bank; | |
| 82 | 153 | static UINT8 *apache3_bg_ram; |
| 83 | 154 | |
| 84 | 155 | /***************************************************************************/ |
| 85 | 156 | |
| 86 | //static READ16_HANDLER(cyclwarr_cpu_b_r) { return cyclwarr_cpub_ram[offset+0x800]; } | |
| 87 | //static WRITE16_HANDLER(cyclwarr_cpu_b_w){ COMBINE_DATA(&cyclwarr_cpub_ram[offset+0x800]); } | |
| 88 | 157 | static READ16_HANDLER(cyclwarr_cpu_bb_r){ return cyclwarr_cpub_ram[offset]; } |
| 89 | 158 | static WRITE16_HANDLER(cyclwarr_cpu_bb_w) { COMBINE_DATA(&cyclwarr_cpub_ram[offset]); } |
| 90 | 159 | static READ16_HANDLER(cyclwarr_palette_r) { return paletteram16[offset]; } |
| 91 | 160 | static READ16_HANDLER(cyclwarr_sprite_r) { return spriteram16[offset]; } |
| 92 | 161 | static WRITE16_HANDLER(cyclwarr_sprite_w) { COMBINE_DATA(&spriteram16[offset]); } |
| 93 | 162 | static READ16_HANDLER(cyclwarr_input_r) { return readinputport(offset); } |
| 94 | static READ16_HANDLER(cyclwarr_input2_r) { return readinputport(offset+3); } | |
| 163 | static READ16_HANDLER(cyclwarr_input2_r) { return readinputport(offset+4); } | |
| 164 | static WRITE16_HANDLER(bigfight_a20000_w) { COMBINE_DATA(&bigfight_a20000[offset]); } | |
| 165 | static WRITE16_HANDLER(bigfight_a40000_w) { COMBINE_DATA(&bigfight_a40000[offset]); } | |
| 166 | static WRITE16_HANDLER(bigfight_a60000_w) { COMBINE_DATA(&bigfight_a60000[offset]); } | |
| 95 | 167 | |
| 168 | static WRITE16_HANDLER(cyclwarr_sound_w) | |
| 169 | { | |
| 170 | soundlatch_w(0, data >> 8); | |
| 171 | cpunum_set_input_line(2, INPUT_LINE_NMI, PULSE_LINE); | |
| 172 | } | |
| 173 | ||
| 96 | 174 | /***************************************************************************/ |
| 97 | 175 | |
| 98 | 176 | static ADDRESS_MAP_START( apache3_v30_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| r1490 | r1491 | |
| 182 | 260 | /******************************************************************************/ |
| 183 | 261 | |
| 184 | 262 | static ADDRESS_MAP_START( cyclwarr_68000a_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 185 | AM_RANGE(0x000000, 0x00dfff) AM_RAM AM_BASE(&cyclwarr_cpua_ram) | |
| 186 | AM_RANGE(0x00e000, 0x00ffff) AM_RAM AM_BASE(&videoram16) | |
| 263 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_BASE(&cyclwarr_cpua_ram) | |
| 187 | 264 | AM_RANGE(0x03e000, 0x03efff) AM_RAM |
| 188 | 265 | AM_RANGE(0x040000, 0x043fff) AM_READWRITE(cyclwarr_cpu_bb_r, cyclwarr_cpu_bb_w) |
| 189 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram2_r, cyclwarr_videoram2_w) AM_BASE(&cyclwarr_videoram2) | |
| 190 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram_r, cyclwarr_videoram_w) AM_BASE(&cyclwarr_videoram) | |
| 191 | AM_RANGE(0x0b9002, 0x0b9009) AM_READ(cyclwarr_input_r) //b9008 - dips | |
| 192 | // ba000 + ba002 - dips | |
| 193 | AM_RANGE(0x0ba000, 0x0ba003) AM_READ(cyclwarr_input2_r) //temp | |
| 194 | AM_RANGE(0x0ba004, 0x0ba007) AM_READ(cyclwarr_input2_r) | |
| 266 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram1_r, cyclwarr_videoram1_w) AM_BASE(&cyclwarr_videoram1) | |
| 267 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram0_r, cyclwarr_videoram0_w) AM_BASE(&cyclwarr_videoram0) | |
| 268 | ||
| 269 | AM_RANGE(0x0a2000, 0x0a2007) AM_WRITE(bigfight_a20000_w) | |
| 270 | AM_RANGE(0x0a4000, 0x0a4001) AM_WRITE(bigfight_a40000_w) | |
| 271 | AM_RANGE(0x0a6000, 0x0a6001) AM_WRITE(bigfight_a60000_w) | |
| 272 | ||
| 273 | AM_RANGE(0x0b8000, 0x0b8001) AM_WRITE(cyclwarr_sound_w) | |
| 274 | AM_RANGE(0x0b9002, 0x0b9009) AM_READ(cyclwarr_input_r) /* Coins, P1 input, P2 input, dip 3 */ | |
| 275 | AM_RANGE(0x0ba000, 0x0ba007) AM_READ(cyclwarr_input2_r) /* Dip 1, Dip 2, P3 input, P4 input */ | |
| 195 | 276 | AM_RANGE(0x0ba008, 0x0ba009) AM_READWRITE(cyclwarr_control_r, cyclwarr_control_w) |
| 196 | 277 | AM_RANGE(0x0c0000, 0x0c3fff) AM_READWRITE(cyclwarr_sprite_r, cyclwarr_sprite_w) AM_BASE(&spriteram16) |
| 197 | 278 | AM_RANGE(0x0ca000, 0x0ca1ff) AM_WRITE(tatsumi_sprite_control_w) AM_BASE(&tatsumi_sprite_control_ram) |
| r1490 | r1491 | |
| 201 | 282 | ADDRESS_MAP_END |
| 202 | 283 | |
| 203 | 284 | static ADDRESS_MAP_START( cyclwarr_68000b_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 204 | AM_RANGE(0x000000, 0x00dfff) AM_RAM AM_BASE(&cyclwarr_cpub_ram) | |
| 205 | AM_RANGE(0x00e000, 0x00ffff) AM_RAM | |
| 206 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram2_r, cyclwarr_videoram2_w) | |
| 207 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram_r, cyclwarr_videoram_w) | |
| 285 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_BASE(&cyclwarr_cpub_ram) | |
| 286 | ||
| 287 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram1_r, cyclwarr_videoram1_w) | |
| 288 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram0_r, cyclwarr_videoram0_w) | |
| 289 | ||
| 290 | AM_RANGE(0x0a2000, 0x0a2007) AM_WRITE(bigfight_a20000_w) | |
| 291 | AM_RANGE(0x0a4000, 0x0a4001) AM_WRITE(bigfight_a40000_w) | |
| 292 | AM_RANGE(0x0a6000, 0x0a6001) AM_WRITE(bigfight_a60000_w) | |
| 293 | ||
| 294 | AM_RANGE(0x0b9002, 0x0b9009) AM_READ(cyclwarr_input_r) /* Coins, P1 input, P2 input, dip 3 */ | |
| 295 | AM_RANGE(0x0ba000, 0x0ba007) AM_READ(cyclwarr_input2_r) /* Dip 1, Dip 2, P3 input, P4 input */ | |
| 296 | AM_RANGE(0x0ba008, 0x0ba009) AM_READ(cyclwarr_control_r) | |
| 297 | ||
| 208 | 298 | AM_RANGE(0x0c0000, 0x0c3fff) AM_READWRITE(cyclwarr_sprite_r, cyclwarr_sprite_w) |
| 209 | 299 | AM_RANGE(0x0ca000, 0x0ca1ff) AM_WRITE(tatsumi_sprite_control_w) |
| 210 | 300 | AM_RANGE(0x0d0000, 0x0d3fff) AM_READWRITE(cyclwarr_palette_r, paletteram16_xRRRRRGGGGGBBBBB_word_w) |
| r1490 | r1491 | |
| 218 | 308 | AM_RANGE(0xfff0, 0xfff0) AM_WRITE(YM2151_register_port_0_w) |
| 219 | 309 | AM_RANGE(0xfff1, 0xfff1) AM_READWRITE(tatsumi_hack_ym2151_r, YM2151_data_port_0_w) |
| 220 | 310 | AM_RANGE(0xfff4, 0xfff4) AM_READWRITE(tatsumi_hack_oki_r, OKIM6295_data_0_w) |
| 221 | AM_RANGE(0xfff8, 0xfff8) AM_READ(input_port_0_r) | |
| 222 | AM_RANGE(0xfff9, 0xfff9) AM_READ(input_port_1_r) | |
| 223 | // AM_RANGE(0xfffa, 0xfffa) AM_READ(input_port_0_r)// MRA_NOP) //irq ack??? | |
| 224 | AM_RANGE(0xfffc, 0xfffc) AM_READ(input_port_2_r)// MRA_NOP) | |
| 225 | AM_RANGE(0xfff9, 0xfff9) AM_WRITE(MWA8_NOP) //irq ack? | |
| 226 | AM_RANGE(0xfffa, 0xfffa) AM_WRITE(MWA8_NOP) //irq ack? | |
| 311 | AM_RANGE(0xfffc, 0xfffc) AM_READ(soundlatch_r) | |
| 312 | AM_RANGE(0xfffe, 0xfffe) AM_WRITE(MWA8_NOP) | |
| 227 | 313 | ADDRESS_MAP_END |
| 228 | 314 | |
| 229 | 315 | /******************************************************************************/ |
| 230 | 316 | |
| 317 | static ADDRESS_MAP_START( bigfight_68000a_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 318 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_BASE(&cyclwarr_cpua_ram) | |
| 319 | ||
| 320 | AM_RANGE(0x03e000, 0x03efff) AM_RAM | |
| 321 | AM_RANGE(0x040000, 0x04ffff) AM_READWRITE(cyclwarr_cpu_bb_r, cyclwarr_cpu_bb_w) | |
| 322 | ||
| 323 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram1_r, cyclwarr_videoram1_w) AM_BASE(&cyclwarr_videoram1) | |
| 324 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram0_r, cyclwarr_videoram0_w) AM_BASE(&cyclwarr_videoram0) | |
| 325 | ||
| 326 | AM_RANGE(0x0a2000, 0x0a2007) AM_WRITE(bigfight_a20000_w) | |
| 327 | AM_RANGE(0x0a4000, 0x0a4001) AM_WRITE(bigfight_a40000_w) | |
| 328 | AM_RANGE(0x0a6000, 0x0a6001) AM_WRITE(bigfight_a60000_w) | |
| 329 | ||
| 330 | AM_RANGE(0x0b8000, 0x0b8001) AM_WRITE(cyclwarr_sound_w) | |
| 331 | AM_RANGE(0x0b9002, 0x0b9009) AM_READ(cyclwarr_input_r) /* Coins, P1 input, P2 input, dip 3 */ | |
| 332 | AM_RANGE(0x0ba000, 0x0ba007) AM_READ(cyclwarr_input2_r) /* Dip 1, Dip 2, P3 input, P4 input */ | |
| 333 | AM_RANGE(0x0ba008, 0x0ba009) AM_READWRITE(cyclwarr_control_r, cyclwarr_control_w) | |
| 334 | AM_RANGE(0x0c0000, 0x0c3fff) AM_READWRITE(cyclwarr_sprite_r, cyclwarr_sprite_w) AM_BASE(&spriteram16) | |
| 335 | AM_RANGE(0x0ca000, 0x0ca1ff) AM_WRITE(tatsumi_sprite_control_w) AM_BASE(&tatsumi_sprite_control_ram) | |
| 336 | AM_RANGE(0x0d0000, 0x0d3fff) AM_READWRITE(cyclwarr_palette_r, paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16) | |
| 337 | AM_RANGE(0x100000, 0x17ffff) AM_ROMBANK(2) /* CPU A ROM */ | |
| 338 | AM_RANGE(0x200000, 0x27ffff) AM_ROMBANK(1) /* CPU B ROM */ | |
| 339 | ADDRESS_MAP_END | |
| 340 | ||
| 341 | static ADDRESS_MAP_START( bigfight_68000b_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 342 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_BASE(&cyclwarr_cpub_ram) | |
| 343 | AM_RANGE(0x080000, 0x08ffff) AM_READWRITE(cyclwarr_videoram1_r, cyclwarr_videoram1_w) | |
| 344 | AM_RANGE(0x090000, 0x09ffff) AM_READWRITE(cyclwarr_videoram0_r, cyclwarr_videoram0_w) | |
| 345 | AM_RANGE(0x0a2000, 0x0a2007) AM_WRITE(bigfight_a20000_w) | |
| 346 | AM_RANGE(0x0a4000, 0x0a4001) AM_WRITE(bigfight_a40000_w) | |
| 347 | AM_RANGE(0x0a6000, 0x0a6001) AM_WRITE(bigfight_a60000_w) | |
| 348 | ||
| 349 | AM_RANGE(0x0b9002, 0x0b9009) AM_READ(cyclwarr_input_r) /* Coins, P1 input, P2 input, dip 3 */ | |
| 350 | AM_RANGE(0x0ba000, 0x0ba007) AM_READ(cyclwarr_input2_r) /* Dip 1, Dip 2, P3 input, P4 input */ | |
| 351 | AM_RANGE(0x0ba008, 0x0ba009) AM_READ(cyclwarr_control_r) | |
| 352 | ||
| 353 | AM_RANGE(0x0c0000, 0x0c3fff) AM_READWRITE(cyclwarr_sprite_r, cyclwarr_sprite_w) | |
| 354 | AM_RANGE(0x0ca000, 0x0ca1ff) AM_WRITE(tatsumi_sprite_control_w) | |
| 355 | AM_RANGE(0x0d0000, 0x0d3fff) AM_READWRITE(cyclwarr_palette_r, paletteram16_xRRRRRGGGGGBBBBB_word_w) | |
| 356 | AM_RANGE(0x100000, 0x17ffff) AM_ROMBANK(2) /* CPU A ROM */ | |
| 357 | AM_RANGE(0x200000, 0x27ffff) AM_ROMBANK(1) /* CPU B ROM */ | |
| 358 | ADDRESS_MAP_END | |
| 359 | ||
| 360 | /******************************************************************************/ | |
| 361 | ||
| 231 | 362 | static INPUT_PORTS_START( apache3 ) |
| 232 | 363 | PORT_START |
| 233 | 364 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) |
| r1490 | r1491 | |
| 401 | 532 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 402 | 533 | |
| 403 | 534 | PORT_START |
| 535 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") | |
| 536 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 537 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 538 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2") | |
| 539 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 540 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 541 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3") | |
| 542 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 543 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 544 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Test ) ) PORT_DIPLOCATION("SW3:4") | |
| 545 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 546 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 547 | ||
| 548 | PORT_START | |
| 549 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") | |
| 550 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 551 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 552 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") | |
| 553 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 554 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 555 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") | |
| 556 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 557 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 558 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") | |
| 559 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 560 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 561 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") | |
| 562 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 563 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 564 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") | |
| 565 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 566 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 567 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") | |
| 568 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 569 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 570 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") | |
| 571 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 572 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 573 | ||
| 574 | PORT_START | |
| 575 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") | |
| 576 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 577 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 578 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") | |
| 579 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 580 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 581 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") | |
| 582 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 583 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 584 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") | |
| 585 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 586 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 587 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") | |
| 588 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 589 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 590 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") | |
| 591 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 592 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 593 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") | |
| 594 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 595 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 596 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") | |
| 597 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 598 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 599 | ||
| 600 | PORT_START | |
| 404 | 601 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START3 ) |
| 405 | 602 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 406 | 603 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| r1490 | r1491 | |
| 419 | 616 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) |
| 420 | 617 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) |
| 421 | 618 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) |
| 619 | INPUT_PORTS_END | |
| 422 | 620 | |
| 621 | static INPUT_PORTS_START( bigfight ) | |
| 423 | 622 | PORT_START |
| 424 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 623 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 624 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 625 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 626 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) | |
| 627 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 628 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) | |
| 629 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) | |
| 630 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) | |
| 425 | 631 | |
| 426 | 632 | PORT_START |
| 427 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 633 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) | |
| 634 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 635 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 636 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 637 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 638 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 639 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 640 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 428 | 641 | |
| 429 | 642 | PORT_START |
| 430 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 643 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) | |
| 644 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 645 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 646 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 647 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 648 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 649 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 650 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 651 | ||
| 652 | PORT_START | |
| 653 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") | |
| 654 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 655 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 656 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2") | |
| 657 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 658 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 659 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3") | |
| 660 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 661 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 662 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Test ) ) PORT_DIPLOCATION("SW3:4") | |
| 663 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 664 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 665 | ||
| 666 | PORT_START | |
| 667 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") | |
| 668 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 669 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 670 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") | |
| 671 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 672 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 673 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") | |
| 674 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 675 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 676 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") | |
| 677 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 678 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 679 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") | |
| 680 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 681 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 682 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") | |
| 683 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 684 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 685 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") | |
| 686 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 687 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 688 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") | |
| 689 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 690 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 691 | ||
| 692 | PORT_START | |
| 693 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") | |
| 694 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 695 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 696 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") | |
| 697 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 698 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 699 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") | |
| 700 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 701 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 702 | PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") | |
| 703 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 704 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 705 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") | |
| 706 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 707 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 708 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") | |
| 709 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 710 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 711 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") | |
| 712 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 713 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 714 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") | |
| 715 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 716 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 717 | ||
| 718 | PORT_START | |
| 719 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START3 ) | |
| 720 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 721 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 722 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 723 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 724 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 725 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 726 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 727 | ||
| 728 | PORT_START | |
| 729 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START4 ) | |
| 730 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) | |
| 731 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) | |
| 732 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) | |
| 733 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) | |
| 734 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) | |
| 735 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) | |
| 736 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) | |
| 431 | 737 | INPUT_PORTS_END |
| 432 | 738 | |
| 433 | 739 | /******************************************************************************/ |
| r1490 | r1491 | |
| 448 | 754 | 8,8, |
| 449 | 755 | RGN_FRAC(1,3), |
| 450 | 756 | 3, |
| 451 | { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3)}, | |
| 452 | { 0, 1, 2, 3, 4, 5, 6, 7}, | |
| 453 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, | |
| 454 | 8*8 | |
| 455 | }; | |
| 456 | static const gfx_layout cyclwarr_charlayout2 = | |
| 457 | { | |
| 458 | 8,8, | |
| 459 | RGN_FRAC(1,3), | |
| 460 | 3, | |
| 461 | 757 | { RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3)}, |
| 462 | 758 | { 0, 1, 2, 3, 4, 5, 6, 7}, |
| 463 | 759 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, |
| 464 | 760 | 8*8 |
| 465 | 761 | }; |
| 762 | ||
| 466 | 763 | static const gfx_layout roundup5_vramlayout = |
| 467 | 764 | { |
| 468 | 765 | 8,8, |
| r1490 | r1491 | |
| 475 | 772 | }; |
| 476 | 773 | |
| 477 | 774 | static GFXDECODE_START( apache3 ) |
| 478 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 1024, 128) | |
| 479 | GFXDECODE_ENTRY( REGION_GFX4, 0, cyclwarr_charlayout, 768, 16) | |
| 775 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 1024, 128) | |
| 776 | GFXDECODE_ENTRY( REGION_GFX4, 0, cyclwarr_charlayout, 768, 16) | |
| 480 | 777 | GFXDECODE_END |
| 481 | 778 | |
| 482 | 779 | static GFXDECODE_START( roundup5 ) |
| 483 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 1024, 256) | |
| 484 | GFXDECODE_ENTRY( 0, 0, roundup5_vramlayout, 0, 16) | |
| 780 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 1024, 256) | |
| 781 | GFXDECODE_ENTRY( 0, 0, roundup5_vramlayout, 0, 16) | |
| 485 | 782 | GFXDECODE_END |
| 486 | 783 | |
| 487 | 784 | static GFXDECODE_START( cyclwarr ) |
| 488 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 8192, 512) | |
| 489 | GFXDECODE_ENTRY( REGION_GFX5, 0, cyclwarr_charlayout, 0, 512) | |
| 490 | GFXDECODE_ENTRY( REGION_GFX5, 0, cyclwarr_charlayout2, 0, 512) | |
| 785 | GFXDECODE_ENTRY( REGION_GFX1, 0, roundup5_charlayout, 8192, 512) | |
| 786 | GFXDECODE_ENTRY( REGION_GFX5, 0, cyclwarr_charlayout, 0, 512) | |
| 491 | 787 | GFXDECODE_END |
| 492 | 788 | |
| 493 | 789 | /******************************************************************************/ |
| r1490 | r1491 | |
| 546 | 842 | MDRV_SOUND_ROUTE(0, "left", 0.45) |
| 547 | 843 | MDRV_SOUND_ROUTE(1, "right", 0.45) |
| 548 | 844 | |
| 549 | MDRV_SOUND_ADD(OKIM6295, | |
| 845 | MDRV_SOUND_ADD(OKIM6295, 16000000 | |
| 550 | 846 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 551 | 847 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.75) |
| 552 | 848 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.75) |
| r1490 | r1491 | |
| 588 | 884 | MDRV_SOUND_ROUTE(0, "left", 0.45) |
| 589 | 885 | MDRV_SOUND_ROUTE(1, "right", 0.45) |
| 590 | 886 | |
| 591 | MDRV_SOUND_ADD(OKIM6295, | |
| 887 | MDRV_SOUND_ADD(OKIM6295, 16000000 | |
| 592 | 888 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 593 | 889 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.75) |
| 594 | 890 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.75) |
| r1490 | r1491 | |
| 597 | 893 | static MACHINE_DRIVER_START( cyclwarr ) |
| 598 | 894 | |
| 599 | 895 | /* basic machine hardware */ |
| 600 | MDRV_CPU_ADD(M68000, | |
| 896 | MDRV_CPU_ADD(M68000, 50000000 / 4) /* | |
| 601 | 897 | MDRV_CPU_PROGRAM_MAP(cyclwarr_68000a_map,0) |
| 602 | 898 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) |
| 603 | 899 | |
| 604 | MDRV_CPU_ADD(M68000, | |
| 900 | MDRV_CPU_ADD(M68000, 50000000 / 4) /* | |
| 605 | 901 | MDRV_CPU_PROGRAM_MAP(cyclwarr_68000b_map,0) |
| 606 | 902 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) |
| 607 | 903 | |
| 608 | MDRV_CPU_ADD(Z80, | |
| 904 | MDRV_CPU_ADD(Z80, 16000000 / 4) /* Confirmed */ | |
| 609 | 905 | MDRV_CPU_PROGRAM_MAP(cyclwarr_z80_map,0) |
| 610 | 906 | |
| 611 | 907 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1490 | r1491 | |
| 616 | 912 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER ) |
| 617 | 913 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 618 | 914 | MDRV_SCREEN_SIZE(40*8, 32*8) |
| 619 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, | |
| 915 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1) | |
| 620 | 916 | MDRV_GFXDECODE(cyclwarr) |
| 621 | MDRV_PALETTE_LENGTH(8192 + 8192) | |
| 917 | MDRV_PALETTE_LENGTH(8192 + 8192) | |
| 622 | 918 | |
| 623 | 919 | MDRV_VIDEO_START(cyclwarr) |
| 624 | 920 | MDRV_VIDEO_UPDATE(cyclwarr) |
| r1490 | r1491 | |
| 631 | 927 | MDRV_SOUND_ROUTE(0, "left", 0.45) |
| 632 | 928 | MDRV_SOUND_ROUTE(1, "right", 0.45) |
| 633 | 929 | |
| 634 | MDRV_SOUND_ADD(OKIM6295, | |
| 930 | MDRV_SOUND_ADD(OKIM6295, 16000000/8) | |
| 635 | 931 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 636 | 932 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.75) |
| 637 | 933 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.75) |
| 638 | 934 | MACHINE_DRIVER_END |
| 639 | 935 | |
| 936 | static MACHINE_DRIVER_START( bigfight ) | |
| 937 | ||
| 938 | /* basic machine hardware */ | |
| 939 | MDRV_CPU_ADD(M68000, 50000000 / 4) /* Confirmed */ | |
| 940 | MDRV_CPU_PROGRAM_MAP(bigfight_68000a_map,0) | |
| 941 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) | |
| 942 | ||
| 943 | MDRV_CPU_ADD(M68000, 50000000 / 4) /* Confirmed */ | |
| 944 | MDRV_CPU_PROGRAM_MAP(bigfight_68000b_map,0) | |
| 945 | MDRV_CPU_VBLANK_INT(irq5_line_hold,1) | |
| 946 | ||
| 947 | MDRV_CPU_ADD(Z80, 16000000 / 4) /* Confirmed */ | |
| 948 | MDRV_CPU_PROGRAM_MAP(cyclwarr_z80_map,0) | |
| 949 | ||
| 950 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 951 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) | |
| 952 | MDRV_INTERLEAVE(200) | |
| 953 | ||
| 954 | /* video hardware */ | |
| 955 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER ) | |
| 956 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 957 | MDRV_SCREEN_SIZE(40*8, 32*8) | |
| 958 | MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1) | |
| 959 | MDRV_GFXDECODE(cyclwarr) | |
| 960 | MDRV_PALETTE_LENGTH(8192 + 8192) | |
| 961 | ||
| 962 | MDRV_VIDEO_START(bigfight) | |
| 963 | MDRV_VIDEO_UPDATE(bigfight) | |
| 964 | ||
| 965 | /* sound hardware */ | |
| 966 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 967 | ||
| 968 | MDRV_SOUND_ADD(YM2151, 16000000/4) | |
| 969 | MDRV_SOUND_CONFIG(ym2151_interface) | |
| 970 | MDRV_SOUND_ROUTE(0, "left", 0.45) | |
| 971 | MDRV_SOUND_ROUTE(1, "right", 0.45) | |
| 972 | ||
| 973 | MDRV_SOUND_ADD(OKIM6295, 16000000/8/2) // Measured value of 2MHz seems too fast | |
| 974 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) | |
| 975 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.75) | |
| 976 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.75) | |
| 977 | MACHINE_DRIVER_END | |
| 978 | ||
| 640 | 979 | /***************************************************************************/ |
| 641 | 980 | |
| 642 | 981 | ROM_START( apache3 ) |
| r1490 | r1491 | |
| 733 | 1072 | ROM_END |
| 734 | 1073 | |
| 735 | 1074 | ROM_START( cyclwarr ) |
| 736 | ROM_REGION( 0x180000, REGION_CPU1, 0 ) /* 68000 main cpu */ | |
| 737 | ROM_LOAD16_BYTE( "cw16b", 0x100000, 0x20000, CRC(cb1a737a) SHA1(a603ee1256be5641d00a72f64efaaacb65ed9d7d) ) | |
| 738 | ROM_LOAD16_BYTE( "cw18b", 0x100001, 0x20000, CRC(0633ddcb) SHA1(1196ab17065352ec5b37f2f6b383a43a2d0fa3a6) ) | |
| 739 | ROM_LOAD16_BYTE( "cw17a", 0x140000, 0x20000, CRC(2ad6f836) SHA1(5fa4275b433013943ba1d1b64a3c725097f946f9) ) | |
| 740 | ROM_LOAD16_BYTE( "cw19a", 0x140001, 0x20000, CRC(d3853658) SHA1(c9338083a04f55bd22285176831f4b0bdb78564f) ) | |
| 1075 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 68000 main cpu */ | |
| 1076 | ROM_LOAD16_BYTE( "cw16b", 0x000000, 0x20000, CRC(cb1a737a) SHA1(a603ee1256be5641d00a72f64efaaacb65ed9d7d) ) | |
| 1077 | ROM_LOAD16_BYTE( "cw18b", 0x000001, 0x20000, CRC(0633ddcb) SHA1(1196ab17065352ec5b37f2f6b383a43a2d0fa3a6) ) | |
| 1078 | ROM_LOAD16_BYTE( "cw17a", 0x040000, 0x20000, CRC(2ad6f836) SHA1(5fa4275b433013943ba1d1b64a3c725097f946f9) ) | |
| 1079 | ROM_LOAD16_BYTE( "cw19a", 0x040001, 0x20000, CRC(d3853658) SHA1(c9338083a04f55bd22285176831f4b0bdb78564f) ) | |
| 741 | 1080 | |
| 742 | ROM_REGION( 0x180000, REGION_CPU2, 0 ) /* 68000 sub cpu */ | |
| 743 | ROM_LOAD16_BYTE( "cw20a", 0x100000, 0x20000, CRC(c3578ac1) SHA1(21d369da874f01922d0f0b757a42b4321df891d4) ) | |
| 744 | ROM_LOAD16_BYTE( "cw22a", 0x100001, 0x20000, CRC(5339ed24) SHA1(5b0a54c2442dcf7373ff8b55b91af9772473ff77) ) | |
| 745 | ROM_LOAD16_BYTE( "cw21", 0x140000, 0x20000, CRC(ed90d956) SHA1(f533f93da31ac6eb631fb506357717e7cac8e186) ) | |
| 746 | ROM_LOAD16_BYTE( "cw23", 0x140001, 0x20000, CRC(009cdc78) SHA1(a77933a7736546397e8c69226703d6f9be7b55e5) ) | |
| 1081 | ROM_REGION( 0x80000, REGION_CPU2, 0 ) /* 68000 sub cpu */ | |
| 1082 | ROM_LOAD16_BYTE( "cw20a", 0x000000, 0x20000, CRC(c3578ac1) SHA1(21d369da874f01922d0f0b757a42b4321df891d4) ) | |
| 1083 | ROM_LOAD16_BYTE( "cw22a", 0x000001, 0x20000, CRC(5339ed24) SHA1(5b0a54c2442dcf7373ff8b55b91af9772473ff77) ) | |
| 1084 | ROM_LOAD16_BYTE( "cw21", 0x040000, 0x20000, CRC(ed90d956) SHA1(f533f93da31ac6eb631fb506357717e7cac8e186) ) | |
| 1085 | ROM_LOAD16_BYTE( "cw23", 0x040001, 0x20000, CRC(009cdc78) SHA1(a77933a7736546397e8c69226703d6f9be7b55e5) ) | |
| 747 | 1086 | |
| 748 | 1087 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* 64k code for sound Z80 */ |
| 749 | 1088 | ROM_LOAD( "cw26a", 0x000000, 0x10000, CRC(f7a70e3a) SHA1(5581633bf1f15d7f5c1e03de897d65d60f9f1e33) ) |
| r1490 | r1491 | |
| 775 | 1114 | ROM_LOAD( "cw27", 0x000000, 0x20000, CRC(2db48a9e) SHA1(16c307340d17cd3b5455ebcee681fbe0335dec58) ) |
| 776 | 1115 | |
| 777 | 1116 | ROM_REGION( 0x60000, REGION_GFX5, ROMREGION_DISPOSE ) |
| 778 | ROM_LOAD( "cw | |
| 1117 | ROM_LOAD( "cw30", 0x000000, 0x20000, CRC(331 | |
| 779 | 1118 | ROM_LOAD( "cw29", 0x020000, 0x20000, CRC(64dd519c) SHA1(e23611fc2be896861997063546c3eb03527eaf8e) ) |
| 780 | ROM_LOAD( "cw | |
| 1119 | ROM_LOAD( "cw28", 0x040000, 0x20000, CRC(3fc568ed | |
| 781 | 1120 | |
| 782 | 1121 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 783 | 1122 | ROM_LOAD( "cw24a", 0x000000, 0x20000, CRC(22600cba) SHA1(a1514fbe037942f1493a17eb0b7986949470cb22) ) |
| 784 | 1123 | ROM_LOAD( "cw25a", 0x020000, 0x20000, CRC(372c6bc8) SHA1(d4875bf3bffecf338bebba3b8d6a791585556a06) ) |
| 785 | 1124 | ROM_END |
| 786 | 1125 | |
| 1126 | ROM_START( bigfight ) | |
| 1127 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 68000 main cpu */ | |
| 1128 | ROM_LOAD16_BYTE( "rom16.ic77", 0x000000, 0x40000, CRC(e7304ec8) SHA1(31a37e96bf963b349d36534bc5ebbf45e19ad00e) ) | |
| 1129 | ROM_LOAD16_BYTE( "rom17.ic98", 0x000001, 0x40000, CRC(4cf090f6) SHA1(9ae0274c890e829a90108ce316aff9665128c982) ) | |
| 1130 | ||
| 1131 | ROM_REGION( 0x80000, REGION_CPU2, 0 ) /* 68000 sub cpu */ | |
| 1132 | ROM_LOAD16_BYTE( "rom18.ic100", 0x000000, 0x40000, CRC(49df6207) SHA1(c4126f4542add11a3a3d236311c8787c24c98440) ) | |
| 1133 | ROM_LOAD16_BYTE( "rom19.ic102", 0x000001, 0x40000, CRC(c12aa9e9) SHA1(19cc7feaa97c6f5148ae8c0077174f96be684f05) ) | |
| 1134 | ||
| 1135 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* 64k code for sound Z80 */ | |
| 1136 | ROM_LOAD( "rom20.ic91", 0x000000, 0x10000, CRC(b3add091) SHA1(8a67bfff75c13fe4d9b89d30449199200d11cea7) ) | |
| 1137 | ||
| 1138 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1139 | /* Filled in by both regions below */ | |
| 1140 | ||
| 1141 | ROM_REGION( 0x200000, REGION_GFX2, 0 ) | |
| 1142 | ROM_LOAD32_BYTE( "rom0.ic26", 0x000000, 0x80000, CRC(a4a3c8d6) SHA1(b5365d9bc6068260c23ba9d5971c7c7d7cc07a97) ) | |
| 1143 | ROM_LOAD32_BYTE( "rom8.ic45", 0x000001, 0x80000, CRC(220956ed) SHA1(68e0ba1e850101b4cc2778819dfa76f04d88d2d6) ) | |
| 1144 | ROM_LOAD32_BYTE( "rom2.ic28", 0x000002, 0x80000, CRC(c4f6d243) SHA1(e23b241b5a40b332165a34e2f1bc4366973b2070) ) | |
| 1145 | ROM_LOAD32_BYTE( "rom10.ic47", 0x000003, 0x80000, CRC(0212d472) SHA1(5549461195fd7b6b43c0174462d7fe1a1bac24e9) ) | |
| 1146 | ||
| 1147 | ROM_REGION( 0x200000, REGION_GFX3, 0 ) | |
| 1148 | ROM_LOAD32_BYTE( "rom4.ic30", 0x000000, 0x80000, CRC(999ff7e9) SHA1(a53b06ad084722d7a52fcf01c52967f68620e609) ) | |
| 1149 | ROM_LOAD32_BYTE( "rom12.ic49", 0x000001, 0x80000, CRC(cb4c1f0b) SHA1(32d64b78ed3d5971eb5d25be2c38e6f2c9048f74) ) | |
| 1150 | ROM_LOAD32_BYTE( "rom6.ic32", 0x000002, 0x80000, CRC(f70e2d47) SHA1(00517b5f3b2deb6f3f3bd12df421e63884c22b2e) ) | |
| 1151 | ROM_LOAD32_BYTE( "rom14.ic51", 0x000003, 0x80000, CRC(77430bc9) SHA1(0b1fd54ace84a9fb5b44d5600de8089a20bcbd47) ) | |
| 1152 | ||
| 1153 | ROM_REGION( 0x20000, REGION_GFX4, 0 ) | |
| 1154 | ROM_LOAD( "rom21.ic128", 0x000000, 0x20000, CRC(da027dcf) SHA1(47d18a8a273fea72cb3ad3d58166fe38ca28a860) ) | |
| 1155 | ||
| 1156 | ROM_REGION( 0x60000, REGION_GFX5, ROMREGION_DISPOSE ) | |
| 1157 | ROM_LOAD( "rom24.ic73", 0x000000, 0x20000, CRC(c564185d) SHA1(e9b5fc10a5a5014735852c22db2a054d5787d8cb) ) | |
| 1158 | ROM_LOAD( "rom23.ic72", 0x020000, 0x20000, CRC(f8bb340b) SHA1(905a1ec778d6ed5c6f53d9d08cd105eed7e307ca) ) | |
| 1159 | ROM_LOAD( "rom22.ic71", 0x040000, 0x20000, CRC(fb505074) SHA1(b6d9b20be7c3e971e5a4392736f087e807b9c850) ) | |
| 1160 | ||
| 1161 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* ADPCM samples */ | |
| 1162 | ROM_LOAD( "rom15.ic39", 0x000000, 0x40000, CRC(58d136e8) SHA1(4aa063c4b9b057cba4655ecbe44a87c8c411e3aa) ) | |
| 1163 | ROM_END | |
| 1164 | ||
| 787 | 1165 | /***************************************************************************/ |
| 788 | 1166 | |
| 789 | 1167 | static DRIVER_INIT( apache3 ) |
| r1490 | r1491 | |
| 844 | 1222 | UINT8 *src1 = memory_region(REGION_GFX2); |
| 845 | 1223 | UINT8 *src2 = memory_region(REGION_GFX3); |
| 846 | 1224 | int i; |
| 847 | for (i=0; i< | |
| 1225 | for (i=0; i<memory_region_length(REGION_GFX2); i+=32) { | |
| 848 | 1226 | memcpy(dst,src1,32); |
| 849 | 1227 | src1+=32; |
| 850 | 1228 | dst+=32; |
| r1490 | r1491 | |
| 854 | 1232 | } |
| 855 | 1233 | |
| 856 | 1234 | dst = memory_region(REGION_CPU1); |
| 857 | memcpy(cyclwarr_cpua_ram,dst+0x100000,8); | |
| 858 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x100000); | |
| 1235 | memcpy(cyclwarr_cpua_ram,dst,8); | |
| 1236 | memory_set_bankptr(1, memory_region(REGION_CPU1)); | |
| 859 | 1237 | |
| 860 | 1238 | dst = memory_region(REGION_CPU2); |
| 861 | memcpy(cyclwarr_cpub_ram,dst+0x100000,8); | |
| 862 | memory_set_bankptr(2, memory_region(REGION_CPU2) + 0x100000); | |
| 1239 | memcpy(cyclwarr_cpub_ram,dst,8); | |
| 1240 | memory_set_bankptr(2, memory_region(REGION_CPU2)); | |
| 863 | 1241 | |
| 864 | 1242 | // Copy sprite & palette data out of GFX rom area |
| 865 | 1243 | tatsumi_rom_sprite_lookup1 = memory_region(REGION_GFX2); |
| 866 | 1244 | tatsumi_rom_sprite_lookup2 = memory_region(REGION_GFX3); |
| 867 | tatsumi_rom_clut0 = memory_region(REGION_GFX2)+ 0x100000 - 0x1000; | |
| 868 | tatsumi_rom_clut1 = memory_region(REGION_GFX3)+ 0x100000 - 0x1000; | |
| 1245 | tatsumi_rom_clut0 = memory_region(REGION_GFX2)+ memory_region_length(REGION_GFX2) - 0x1000; | |
| 1246 | tatsumi_rom_clut1 = memory_region(REGION_GFX3)+ memory_region_length(REGION_GFX3) - 0x1000; | |
| 869 | 1247 | |
| 870 | 1248 | tatsumi_reset(); |
| 871 | 1249 | } |
| 872 | 1250 | |
| 873 | 1251 | /***************************************************************************/ |
| 874 | 1252 | |
| 875 | /* http://www.tatsu-mi.co.jp/game/ | |
| 1253 | /* http://www.tatsu-mi.co.jp/game/ | |
| 876 | 1254 | |
| 877 | /* 1986 Lock On */ | |
| 878 | 1255 | /* 1987 Gray Out */ |
| 879 | 1256 | GAME( 1988, apache3, 0, apache3, apache3, apache3, ROT0, "Tatsumi", "Apache 3", GAME_IMPERFECT_GRAPHICS ) |
| 880 | 1257 | GAME( 1989, roundup5, 0, roundup5, roundup5, roundup5, ROT0, "Tatsumi", "Round Up 5 - Super Delta Force", GAME_IMPERFECT_GRAPHICS ) |
| 881 | GAME( 1991, cyclwarr, 0, cyclwarr, cyclwarr, cyclwarr, ROT0, "Tatsumi", "Cycle Warriors", GAME_IMPERFECT_GRAPHICS ) | |
| 882 | /* 1992 Big Fight */ | |
| 1258 | GAME( 1991, cyclwarr, 0, cyclwarr, cyclwarr, cyclwarr, ROT0, "Tatsumi", "Cycle Warriors", GAME_IMPERFECT_GRAPHICS) | |
| 1259 | GAME( 1992, bigfight, 0, bigfight, bigfight, cyclwarr, ROT0, "Tatsumi", "Big Fight - Big Trouble In The Atlantic Ocean", GAME_IMPERFECT_GRAPHICS) |
| r1490 | r1491 | |
|---|---|---|
| 162 | 162 | 8, 8, |
| 163 | 163 | 512, |
| 164 | 164 | 3, |
| 165 | { 0x8000*8, 0+0x1000*8, 4+0x1000*8 | |
| 165 | { 0x8000*8, 0+0x1000*8, 4+0x1000*8 | |
| 166 | 166 | { 0x2000*8+3, 0x2000*8+2, 0x2000*8+1, 0x2000*8+0, 3, 2, 1, 0 }, |
| 167 | 167 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 168 | 168 | 8*8 |
| r1490 | r1491 | |
|---|---|---|
| 3652 | 3652 | /* initialize the boards */ |
| 3653 | 3653 | init_multisync(machine, 0); |
| 3654 | 3654 | init_adsp(); |
| 3655 | atarijsa_init( | |
| 3655 | atarijsa_init(m | |
| 3656 | 3656 | |
| 3657 | 3657 | /* set up gsp speedup handler */ |
| 3658 | 3658 | hdgsp_speedup_addr[0] = memory_install_write16_handler(hdcpu_gsp, ADDRESS_SPACE_PROGRAM, 0xfff9fc00, 0xfff9fc0f, 0, 0, hdgsp_speedup1_w); |
| r1490 | r1491 | |
| 3765 | 3765 | init_ds3(machine); |
| 3766 | 3766 | init_dspcom(); |
| 3767 | 3767 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 3768 | atarijsa_init( | |
| 3768 | atarijsa_init(m | |
| 3769 | 3769 | |
| 3770 | 3770 | memory_install_read16_handler(hdcpu_main, ADDRESS_SPACE_PROGRAM, 0x908000, 0x908001, 0, 0, steeltal_dummy_r); |
| 3771 | 3771 |
| r1490 | r1491 | |
|---|---|---|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | |
| 67 | static MACHINE_START( atarig1 ) | |
| 68 | { | |
| 69 | state_save_register_global(which_input); | |
| 70 | } | |
| 71 | ||
| 72 | ||
| 67 | 73 | static MACHINE_RESET( atarig1 ) |
| 68 | 74 | { |
| 69 | 75 | atarigen_eeprom_reset(); |
| r1490 | r1491 | |
| 155 | 161 | } |
| 156 | 162 | |
| 157 | 163 | |
| 164 | static void pitfighb_state_postload(void) | |
| 165 | { | |
| 166 | int bank = bslapstic_bank; | |
| 167 | bslapstic_bank = -1; | |
| 168 | update_bank(bank); | |
| 169 | } | |
| 170 | ||
| 171 | ||
| 158 | 172 | static READ16_HANDLER( pitfighb_cheap_slapstic_r ) |
| 159 | 173 | { |
| 160 | 174 | int result = bslapstic_base[offset & 0xfff]; |
| r1490 | r1491 | |
| 412 | 426 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 413 | 427 | MDRV_CPU_VBLANK_INT(atarigen_video_int_gen,1) |
| 414 | 428 | |
| 429 | MDRV_MACHINE_START(atarig1) | |
| 415 | 430 | MDRV_MACHINE_RESET(atarig1) |
| 416 | 431 | MDRV_NVRAM_HANDLER(atarigen) |
| 417 | 432 | |
| r1490 | r1491 | |
| 938 | 953 | * |
| 939 | 954 | *************************************/ |
| 940 | 955 | |
| 941 | static void init_g1_common(offs_t slapstic_base, int slapstic, int is_pitfight) | |
| 956 | static void init_g1_common(running_machine *machine, offs_t slapstic_base, int slapstic, int is_pitfight) | |
| 942 | 957 | { |
| 943 | 958 | atarigen_eeprom_default = NULL; |
| 944 | 959 | if (slapstic == -1) |
| 960 | { | |
| 945 | 961 | pitfighb_cheap_slapstic_init(); |
| 962 | state_save_register_global(bslapstic_bank); | |
| 963 | state_save_register_global(bslapstic_primed); | |
| 964 | state_save_register_func_postload(pitfighb_state_postload); | |
| 965 | } | |
| 946 | 966 | else if (slapstic != 0) |
| 947 | atarigen_slapstic_init(0, slapstic_base, slapstic); | |
| 948 | atarijsa_init(1, 4, 0, 0x8000); | |
| 967 | atarigen_slapstic_init(0, slapstic_base, 0, slapstic); | |
| 968 | atarijsa_init(machine, 0, 0x4000); | |
| 949 | 969 | |
| 950 | 970 | atarig1_pitfight = is_pitfight; |
| 951 | 971 | } |
| 952 | 972 | |
| 953 | static DRIVER_INIT( hydra ) { init_g1_common(0x078000, 116, 0); } | |
| 954 | static DRIVER_INIT( hydrap ) { init_g1_common(0x000000, 0, 0); } | |
| 973 | static DRIVER_INIT( hydra ) { init_g1_common(machine, 0x078000, 116, 0); } | |
| 974 | static DRIVER_INIT( hydrap ) { init_g1_common(machine, 0x000000, 0, 0); } | |
| 955 | 975 | |
| 956 | static DRIVER_INIT( pitfight ) { init_g1_common(0x038000, 111, 1); } | |
| 957 | static DRIVER_INIT( pitfighj ) { init_g1_common(0x038000, 113, 1); } | |
| 958 | static DRIVER_INIT( pitfighb ) { init_g1_common(0x038000, -1, 1); } | |
| 976 | static DRIVER_INIT( pitfight ) { init_g1_common(machine, 0x038000, 111, 1); } | |
| 977 | static DRIVER_INIT( pitfighj ) { init_g1_common(machine, 0x038000, 113, 1); } | |
| 978 | static DRIVER_INIT( pitfighb ) { init_g1_common(machine, 0x038000, -1, 1); } | |
| 959 | 979 | |
| 960 | 980 | |
| 961 | 981 | |
| r1490 | r1491 | |
| 965 | 985 | * |
| 966 | 986 | *************************************/ |
| 967 | 987 | |
| 968 | GAME( 1990, hydra, 0, atarig1, hydra, hydra, ROT0, "Atari Games", "Hydra", 0 ) | |
| 969 | GAME( 1990, hydrap, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", 0 ) | |
| 970 | GAME( 1990, hydrap2, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", 0 ) | |
| 988 | GAME( 1990, hydra, 0, atarig1, hydra, hydra, ROT0, "Atari Games", "Hydra", GAME_SUPPORTS_SAVE ) | |
| 989 | GAME( 1990, hydrap, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", GAME_SUPPORTS_SAVE ) | |
| 990 | GAME( 1990, hydrap2, hydra, atarig1, hydra, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", GAME_SUPPORTS_SAVE ) | |
| 971 | 991 | |
| 972 | GAME( 1990, pitfight, 0, atarig1, pitfight, pitfighj, ROT0, "Atari Games", "Pit Fighter (rev 5)", 0 ) | |
| 973 | GAME( 1990, pitfigh4, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", 0 ) | |
| 974 | GAME( 1990, pitfigh3, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", 0 ) | |
| 975 | GAME( 1990, pitfighj, pitfight, atarig1, pitfighj, pitfighj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", 0 ) | |
| 976 | GAME( 1990, pitfighb, pitfight, atarig1, pitfight, pitfighb, ROT0, "Atari Games", "Pit Fighter (bootleg)", 0 ) | |
| 992 | GAME( 1990, pitfight, 0, atarig1, pitfight, pitfighj, ROT0, "Atari Games", "Pit Fighter (rev 5)", GAME_SUPPORTS_SAVE ) | |
| 993 | GAME( 1990, pitfigh4, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", GAME_SUPPORTS_SAVE ) | |
| 994 | GAME( 1990, pitfigh3, pitfight, atarig1, pitfight, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", GAME_SUPPORTS_SAVE ) | |
| 995 | GAME( 1990, pitfighj, pitfight, atarig1, pitfighj, pitfighj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", GAME_SUPPORTS_SAVE ) | |
| 996 | GAME( 1990, pitfighb, pitfight, atarig1, pitfight, pitfighb, ROT0, "Atari Games", "Pit Fighter (bootleg)", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 617 | 617 | static DRIVER_INIT( toobin ) |
| 618 | 618 | { |
| 619 | 619 | atarigen_eeprom_default = NULL; |
| 620 | atarijsa_init( | |
| 620 | atarijsa_init(machine, 1, 0x1000); | |
| 621 | 621 | } |
| 622 | 622 | |
| 623 | 623 |
| r1490 | r1491 | |
|---|---|---|
| 1318 | 1318 | |
| 1319 | 1319 | static const gfx_layout charlayout = |
| 1320 | 1320 | { |
| 1321 | 4, | |
| 1322 | 8, | |
| 1321 | 4,8, | |
| 1323 | 1322 | 0x1000, |
| 1324 | 1323 | // RGN_FRAC(1,2), |
| 1325 | 1324 | 4, |
| r1490 | r1491 | |
| 1332 | 1331 | |
| 1333 | 1332 | static const gfx_layout sn10_charlayout = |
| 1334 | 1333 | { |
| 1335 | 4, | |
| 1336 | 8, | |
| 1334 | 4,8, | |
| 1337 | 1335 | RGN_FRAC(1,2), |
| 1338 | 1336 | 4, |
| 1339 | 1337 | { RGN_FRAC(0,2), RGN_FRAC(0,2) + 4, RGN_FRAC(1,2), RGN_FRAC(1,2) + 4 }, |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | - combine sh_* writes into one routine |
| 7 | 7 | |
| 8 | 8 | Done: |
| 9 | - Hooked up flipscreen | |
| 10 | - Changed monitor orientation to ROT0 | |
| 9 | 11 | - fixed mario0110u1gre |
| 10 | 12 | - rewrote driver, separate MACHINE_DRIVER(mario_audio) |
| 11 | 13 | - palette from schematics |
| r1490 | r1491 | |
| 114 | 116 | AM_RANGE(0x7c80, 0x7c80) AM_WRITE(mario_sh2_w) /* Luigi run sample */ |
| 115 | 117 | AM_RANGE(0x7d00, 0x7d00) AM_WRITE(mario_scroll_w) |
| 116 | 118 | AM_RANGE(0x7e80, 0x7e80) AM_WRITE(mario_gfxbank_w) |
| 119 | AM_RANGE(0x7e82, 0x7e82) AM_WRITE(mario_flip_w) | |
| 117 | 120 | AM_RANGE(0x7e83, 0x7e83) AM_WRITE(mario_palettebank_w) |
| 118 | 121 | AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w) |
| 119 | 122 | AM_RANGE(0x7f00, 0x7f00) AM_WRITE(mario_sh_w) /* death */ |
| r1490 | r1491 | |
| 459 | 462 | * |
| 460 | 463 | *************************************/ |
| 461 | 464 | |
| 462 | GAME( 1983, mario, 0, mario, mario, 0, ROT180, "Nintendo of America", "Mario Bros. (US, set 1)", GAME_SUPPORTS_SAVE ) | |
| 463 | GAME( 1983, marioo, mario, mario, marioo, 0, ROT180, "Nintendo of America", "Mario Bros. (US, set 2)", GAME_SUPPORTS_SAVE ) | |
| 464 | GAME( 1983, marioj, mario, mario, marioj, 0, ROT180, "Nintendo", "Mario Bros. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 465 | GAME( 1983, masao, mario, masao, masao, 0, ROT180, "bootleg", "Masao", GAME_SUPPORTS_SAVE ) | |
| 465 | GAME( 1983, mario, 0, mario, mario, 0, ROT0, "Nintendo of America", "Mario Bros. (US, set 1)", GAME_SUPPORTS_SAVE ) | |
| 466 | GAME( 1983, marioo, mario, mario, marioo, 0, ROT0, "Nintendo of America", "Mario Bros. (US, set 2)", GAME_SUPPORTS_SAVE ) | |
| 467 | GAME( 1983, marioj, mario, mario, marioj, 0, ROT0, "Nintendo", "Mario Bros. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 468 | GAME( 1983, masao, mario, masao, masao, 0, ROT0, "bootleg", "Masao", GAME_SUPPORTS_SAVE ) |
| r1490 | r1491 | |
|---|---|---|
| 153 | 153 | static ADDRESS_MAP_START( atarifb_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 154 | 154 | ADDRESS_MAP_FLAGS( AMEF_ABITS(15) ) |
| 155 | 155 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 156 | AM_RANGE(0x0200, 0x025f) AM_WRITE( | |
| 156 | AM_RANGE(0x0200, 0x025f) AM_WRITE(MWA8 | |
| 157 | 157 | AM_RANGE(0x0260, 0x039f) AM_RAM |
| 158 | AM_RANGE(0x03a0, 0x03ff) AM_WRITE(atarifb_alphap2_vram_w) AM_BASE(&atarifb_alphap2_vram) AM_SIZE(&atarifb_alphap2_vram_size) | |
| 159 | AM_RANGE(0x1000, 0x13bf) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 158 | AM_RANGE(0x03a0, 0x03ff) AM_WRITE(MWA8_RAM) AM_BASE(&atarifb_alphap2_vram) AM_SIZE(&atarifb_alphap2_vram_size) | |
| 159 | AM_RANGE(0x1000, 0x13bf) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 160 | 160 | AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 161 | AM_RANGE(0x2000, 0x2000) AM_WRITE( | |
| 161 | AM_RANGE(0x2000, 0x2000) AM_WRITE(MWA8 | |
| 162 | 162 | AM_RANGE(0x2001, 0x2001) AM_WRITE(atarifb_out1_w) /* OUT 1 */ |
| 163 | 163 | AM_RANGE(0x2002, 0x2002) AM_WRITE(atarifb_out2_w) /* OUT 2 */ |
| 164 | 164 | AM_RANGE(0x2003, 0x2003) AM_WRITE(atarifb_out3_w) /* OUT 3 */ |
| r1490 | r1491 | |
| 174 | 174 | static ADDRESS_MAP_START( soccer_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 175 | 175 | ADDRESS_MAP_FLAGS( AMEF_ABITS(14) ) |
| 176 | 176 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 177 | AM_RANGE(0x0200, 0x025f) AM_WRITE( | |
| 177 | AM_RANGE(0x0200, 0x025f) AM_WRITE(MWA8 | |
| 178 | 178 | AM_RANGE(0x0260, 0x039f) AM_RAM |
| 179 | AM_RANGE(0x03a0, 0x03ff) AM_WRITE(atarifb_alphap2_vram_w) AM_BASE(&atarifb_alphap2_vram) AM_SIZE(&atarifb_alphap2_vram_size) | |
| 180 | AM_RANGE(0x0800, 0x0bbf) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 179 | AM_RANGE(0x03a0, 0x03ff) AM_WRITE(MWA8_RAM) AM_BASE(&atarifb_alphap2_vram) AM_SIZE(&atarifb_alphap2_vram_size) | |
| 180 | AM_RANGE(0x0800, 0x0bbf) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 181 | 181 | AM_RANGE(0x0bc0, 0x0bff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 182 | AM_RANGE(0x1000, 0x1000) AM_WRITE( | |
| 182 | AM_RANGE(0x1000, 0x1000) AM_WRITE(MWA8 | |
| 183 | 183 | AM_RANGE(0x1001, 0x1001) AM_WRITE(atarifb_out1_w) /* OUT 1 */ |
| 184 | 184 | AM_RANGE(0x1002, 0x1002) AM_WRITE(atarifb_out2_w) /* OUT 2 */ |
| 185 | 185 | AM_RANGE(0x1004, 0x1004) AM_WRITE(MWA8_NOP) /* Interrupt Acknowledge */ |
| r1490 | r1491 | |
| 774 | 774 | * |
| 775 | 775 | *************************************/ |
| 776 | 776 | |
| 777 | /* YEAR NAME PARENT MACHINE INPUT INIT MONITOR */ | |
| 777 | /* YEAR NAME PARENT MACHINE INPUT INIT MONITOR */ | |
| 778 | 778 | GAMEL( 1978, atarifb, 0, atarifb, atarifb, atarifb, ROT0, "Atari", "Atari Football (revision 2)", 0, layout_atarifb ) |
| 779 | 779 | GAMEL( 1978, atarifb1, atarifb, atarifb, atarifb, atarifb, ROT0, "Atari", "Atari Football (revision 1)", 0, layout_atarifb ) |
| 780 | 780 | GAMEL( 1979, atarifb4, atarifb, atarifb, atarifb4, atarifb4, ROT0, "Atari", "Atari Football (4 players)", 0, layout_atarifb4 ) |
| r1490 | r1491 | |
|---|---|---|
| 345 | 345 | { 0,1,2,3,4,5,6,7 }, |
| 346 | 346 | /* y offsets */ |
| 347 | 347 | { 0*8,1*8,2*8,3*8, |
| 348 | 4*8,5*8,6*8,7*8, | |
| 349 | 0*8,1*8,2*8,3*8, | |
| 350 | 348 | 4*8,5*8,6*8,7*8 }, |
| 351 | 349 | 8*8 /* every char takes 8 bytes */ |
| 352 | 350 | }; |
| r1490 | r1491 | |
|---|---|---|
| 1006 | 1006 | static DRIVER_INIT( cyberbal ) |
| 1007 | 1007 | { |
| 1008 | 1008 | atarigen_eeprom_default = default_eeprom; |
| 1009 | atarigen_slapstic_init(0, 0x018000, 0); | |
| 1009 | atarigen_slapstic_init(0, 0x018000, 0, 0); | |
| 1010 | 1010 | } |
| 1011 | 1011 | |
| 1012 | 1012 | |
| 1013 | 1013 | static DRIVER_INIT( cyberbt ) |
| 1014 | 1014 | { |
| 1015 | 1015 | atarigen_eeprom_default = default_eeprom; |
| 1016 | atarigen_slapstic_init(0, 0x018000, 116); | |
| 1016 | atarigen_slapstic_init(0, 0x018000, 0, 116); | |
| 1017 | 1017 | } |
| 1018 | 1018 | |
| 1019 | 1019 | |
| 1020 | 1020 | static DRIVER_INIT( cyberb2p ) |
| 1021 | 1021 | { |
| 1022 | 1022 | atarigen_eeprom_default = default_eeprom; |
| 1023 | atarijsa_init( | |
| 1023 | atarijsa_init(machine, 2, 0x8000); | |
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | 1026 |
| r1490 | r1491 | |
|---|---|---|
| 484 | 484 | static DRIVER_INIT( offtwall ) |
| 485 | 485 | { |
| 486 | 486 | atarigen_eeprom_default = default_eeprom; |
| 487 | atarijsa_init( | |
| 487 | atarijsa_init(machine, 3, 0x0040); | |
| 488 | 488 | |
| 489 | 489 | /* install son-of-slapstic workarounds */ |
| 490 | 490 | spritecache_count = memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x3fde42, 0x3fde43, 0, 0, spritecache_count_r); |
| r1490 | r1491 | |
| 496 | 496 | static DRIVER_INIT( offtwalc ) |
| 497 | 497 | { |
| 498 | 498 | atarigen_eeprom_default = default_eeprom; |
| 499 | atarijsa_init( | |
| 499 | atarijsa_init(machine, 3, 0x0040); | |
| 500 | 500 | |
| 501 | 501 | /* install son-of-slapstic workarounds */ |
| 502 | 502 | spritecache_count = memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x3fde42, 0x3fde43, 0, 0, spritecache_count_r); |
| r1490 | r1491 | |
|---|---|---|
| 627 | 627 | 3, |
| 628 | 628 | { 0, 0x4000*8, 0x4000*8+4 }, |
| 629 | 629 | { STEP4(128*0+3,-1), STEP4(128*1+3,-1), STEP4(128*2+3,-1), STEP4(128*3+3,-1) }, |
| 630 | { STEP1 | |
| 630 | { STEP8(1*8,8), STEP4(1*8+8*8,8), STEP2(1*8+12*8,8) }, | |
| 631 | 631 | 64*8 |
| 632 | 632 | }; |
| 633 | 633 |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | ||
| 10 | 9 | static INPUT_PORTS_START( svcpcb ) |
| 11 | 10 | STANDARD_IN0 |
| 12 | 11 | |
| r1490 | r1491 | |
| 70 | 69 | PORT_DIPNAME( 0x0080, 0x0080, "Freeze" ) PORT_DIPLOCATION("SW:8") |
| 71 | 70 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 72 | 71 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 73 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_controller_r, 0) | |
| 72 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_controller_r, 0 ) | |
| 74 | 73 | |
| 75 | 74 | STANDARD_IN1 |
| 76 | 75 | |
| r1490 | r1491 | |
| 144 | 143 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 145 | 144 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) |
| 146 | 145 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 147 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0) | |
| 146 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) | |
| 148 | 147 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 149 | 148 | |
| 150 | 149 | STANDARD_IN3 |
| r1490 | r1491 | |
| 232 | 231 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ |
| 233 | 232 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 234 | 233 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ |
| 235 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0) | |
| 234 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) | |
| 236 | 235 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 237 | 236 | |
| 238 | 237 | PORT_START_TAG("IN3") |
| 239 | 238 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 240 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, 0) | |
| 241 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, 0) | |
| 239 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, 0 ) | |
| 240 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, 0 ) | |
| 242 | 241 | |
| 243 | 242 | STANDARD_IN4 |
| 244 | 243 | |
| r1490 | r1491 | |
| 271 | 270 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_7) |
| 272 | 271 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* game freezes with this bit enabled */ |
| 273 | 272 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_8) |
| 274 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0) | |
| 273 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) | |
| 275 | 274 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 276 | 275 | |
| 277 | 276 | STANDARD_IN3 |
| r1490 | r1491 | |
| 6779 | 6778 | static DRIVER_INIT( kof2002 ) |
| 6780 | 6779 | { |
| 6781 | 6780 | kof2002_decrypt_68k(); |
| 6782 | neo_pcm2_swap(0); | |
| 6781 | neo_pcm2_swap(0 ); | |
| 6783 | 6782 | kof2000_neogeo_gfx_decrypt(0xec); |
| 6784 | 6783 | driver_init_neogeo(machine); |
| 6785 | 6784 | } |
| r1490 | r1491 | |
| 6787 | 6786 | static DRIVER_INIT( kf2k2pls ) |
| 6788 | 6787 | { |
| 6789 | 6788 | kof2002_decrypt_68k(); |
| 6790 | neo_pcm2_swap(0); | |
| 6789 | neo_pcm2_swap(0 ); | |
| 6791 | 6790 | cmc50_neogeo_gfx_decrypt(0xec); |
| 6792 | 6791 | driver_init_neogeo(machine); |
| 6793 | 6792 | } |
| r1490 | r1491 | |
| 6795 | 6794 | static DRIVER_INIT( kf2k2mp ) |
| 6796 | 6795 | { |
| 6797 | 6796 | kf2k2mp_decrypt(); |
| 6798 | neo_pcm2_swap(0); | |
| 6797 | neo_pcm2_swap(0 ); | |
| 6799 | 6798 | neogeo_bootleg_sx_decrypt(2); |
| 6800 | 6799 | cmc50_neogeo_gfx_decrypt(0xec); |
| 6801 | 6800 | driver_init_neogeo(machine); |
| r1490 | r1491 | |
| 6804 | 6803 | static DRIVER_INIT( kof2km2 ) |
| 6805 | 6804 | { |
| 6806 | 6805 | kof2km2_px_decrypt(); |
| 6807 | neo_pcm2_swap(0); | |
| 6806 | neo_pcm2_swap(0 ); | |
| 6808 | 6807 | neogeo_bootleg_sx_decrypt(1); |
| 6809 | 6808 | cmc50_neogeo_gfx_decrypt(0xec); |
| 6810 | 6809 | driver_init_neogeo(machine); |
| r1490 | r1491 | |
| 6871 | 6870 | { |
| 6872 | 6871 | /* start a timer that will check the BIOS select DIP every second */ |
| 6873 | 6872 | timer_pulse(ATTOTIME_IN_MSEC(1000), NULL, 0, svcpcb_bios_timer_callback); |
| 6874 | svcpcb_bios_timer_callback(machine, NULL, 0); | |
| 6873 | svcpcb_bios_timer_callback(machine, NULL, 0 ); | |
| 6875 | 6874 | |
| 6876 | 6875 | svcchaos_px_decrypt(); |
| 6877 | 6876 | svcpcb_gfx_decrypt(); |
| r1490 | r1491 | |
| 7132 | 7131 | GAME( 1990, neogeo, 0, neogeo, neogeo, neogeo, ROT0, "SNK", "Neo-Geo", GAME_IS_BIOS_ROOT ) |
| 7133 | 7132 | |
| 7134 | 7133 | /* SNK */ |
| 7135 | GAME( 1990, nam1975, neogeo, neogeo | |
| 7134 | GAME( 1990, nam1975, neogeo, neogeo | |
| 7136 | 7135 | GAME( 1990, bstars, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Baseball Stars Professional", 0 ) |
| 7137 | GAME( 1990, tpgolf, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Top Player's Golf", 0 ) | |
| 7138 | GAME( 1990, mahretsu, neogeo, neogeo_s, mjneogeo,neogeo, ROT0, "SNK", "Mahjong Kyoretsuden", 0 ) | |
| 7139 | GAME( 1990, ridhero, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Riding Hero (set 1)", 0 ) | |
| 7140 | GAME( 1990, ridheroh, ridhero, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Riding Hero (set 2)", 0 ) | |
| 7141 | GAME( 1991, alpham2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Alpha Mission II / ASO II - Last Guardian", 0 ) | |
| 7142 | GAME( 1990, cyberlip, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Cyber-Lip", 0 ) | |
| 7143 | GAME( 1990, superspy, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The Super Spy", 0 ) | |
| 7144 | GAME( 1992, mutnat, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Mutation Nation", 0 ) | |
| 7145 | GAME( 1991, kotm, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "King of the Monsters (set 1)", 0 ) | |
| 7146 | GAME( 1991, kotmh, kotm, neogeo_s, neogeo, neogeo, ROT0, "SNK", "King of the Monsters (set 2)", 0 ) | |
| 7136 | GAME( 1990, tpgolf, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Top Player's Golf", 0 ) | |
| 7137 | GAME( 1990, mahretsu, neogeo, neogeo, mjneogeo,neogeo, ROT0, "SNK", "Mahjong Kyoretsuden", 0 ) | |
| 7138 | GAME( 1990, ridhero, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Riding Hero (set 1)", 0 ) | |
| 7139 | GAME( 1990, ridheroh, ridhero, neogeo, neogeo, neogeo, ROT0, "SNK", "Riding Hero (set 2)", 0 ) | |
| 7140 | GAME( 1991, alpham2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Alpha Mission II / ASO II - Last Guardian", 0 ) | |
| 7141 | GAME( 1990, cyberlip, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Cyber-Lip", 0 ) | |
| 7142 | GAME( 1990, superspy, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The Super Spy", 0 ) | |
| 7143 | GAME( 1992, mutnat, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Mutation Nation", 0 ) | |
| 7144 | GAME( 1991, kotm, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "King of the Monsters (set 1)", 0 ) | |
| 7145 | GAME( 1991, kotmh, kotm, neogeo, neogeo, neogeo, ROT0, "SNK", "King of the Monsters (set 2)", 0 ) | |
| 7147 | 7146 | GAME( 1991, sengoku, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Sengoku / Sengoku Denshou (set 1)", 0 ) |
| 7148 | 7147 | GAME( 1991, sengokh, sengoku, neogeo, neogeo, neogeo, ROT0, "SNK", "Sengoku / Sengoku Denshou (set 2)", 0 ) |
| 7149 | GAME( 1991, burningf, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Burning Fight (set 1)", 0 ) | |
| 7150 | GAME( 1991, burningh, burningf, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Burning Fight (set 2)", 0 ) | |
| 7151 | GAME( 1990, lbowling, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "League Bowling", 0 ) | |
| 7152 | GAME( 1991, gpilots, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Ghost Pilots", 0 ) | |
| 7153 | GAME( 1990, joyjoy, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Puzzled / Joy Joy Kid", 0 ) | |
| 7154 | GAME( 1991, quizdais, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Quiz Daisousa Sen - The Last Count Down", 0 ) | |
| 7155 | GAME( 1992, lresort, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Last Resort", 0 ) | |
| 7148 | GAME( 1991, burningf, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Burning Fight (set 1)", 0 ) | |
| 7149 | GAME( 1991, burningh, burningf, neogeo, neogeo, neogeo, ROT0, "SNK", "Burning Fight (set 2)", 0 ) | |
| 7150 | GAME( 1990, lbowling, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "League Bowling", 0 ) | |
| 7151 | GAME( 1991, gpilots, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Ghost Pilots", 0 ) | |
| 7152 | GAME( 1990, joyjoy, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Puzzled / Joy Joy Kid", 0 ) | |
| 7153 | GAME( 1991, quizdais, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Quiz Daisousa Sen - The Last Count Down", 0 ) | |
| 7154 | GAME( 1992, lresort, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Last Resort", 0 ) | |
| 7156 | 7155 | GAME( 1991, eightman, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK / Pallas", "Eight Man", 0 ) |
| 7157 | GAME( 1991, legendos, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Legend of Success Joe / Ashitano Joe Densetsu", 0 ) | |
| 7158 | GAME( 1991, 2020bb, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 1)", 0 ) | |
| 7159 | GAME( 1991, 2020bba, 2020bb, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 2)", 0 ) | |
| 7160 | GAME( 1991, 2020bbh, 2020bb, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 3)", 0 ) | |
| 7161 | GAME( 1991, socbrawl, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 1)", 0 ) | |
| 7162 | GAME( 1991, socbrala, socbrawl, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 2)", 0 ) | |
| 7156 | GAME( 1991, legendos, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Legend of Success Joe / Ashitano Joe Densetsu", 0 ) | |
| 7157 | GAME( 1991, 2020bb, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 1)", 0 ) | |
| 7158 | GAME( 1991, 2020bba, 2020bb, neogeo, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 2)", 0 ) | |
| 7159 | GAME( 1991, 2020bbh, 2020bb, neogeo, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 3)", 0 ) | |
| 7160 | GAME( 1991, socbrawl, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 1)", 0 ) | |
| 7161 | GAME( 1991, socbrala, socbrawl, neogeo, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 2)", 0 ) | |
| 7163 | 7162 | GAME( 1991, fatfury1, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury - King of Fighters / Garou Densetsu - shukumei no tatakai", 0 ) |
| 7164 | GAME( 1991, roboarmy, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 1)", 0 ) | |
| 7165 | GAME( 1991, roboarma, roboarmy, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 2)", 0 ) | |
| 7166 | GAME( 1992, fbfrenzy, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Football Frenzy", 0 ) | |
| 7167 | GAME( 1992, kotm2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "King of the Monsters 2 - The Next Thing", 0 ) | |
| 7168 | GAME( 1993, sengoku2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Sengoku 2 / Sengoku Denshou 2", 0) | |
| 7169 | GAME( 1992, bstars2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Baseball Stars 2", 0 ) | |
| 7163 | GAME( 1991, roboarmy, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 1)", 0 ) | |
| 7164 | GAME( 1991, roboarma, roboarmy, neogeo, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 2)", 0 ) | |
| 7165 | GAME( 1992, fbfrenzy, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Football Frenzy", 0 ) | |
| 7166 | GAME( 1992, kotm2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "King of the Monsters 2 - The Next Thing", 0 ) | |
| 7167 | GAME( 1993, sengoku2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Sengoku 2 / Sengoku Denshou 2", 0 ) | |
| 7168 | GAME( 1992, bstars2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Baseball Stars 2", 0 ) | |
| 7170 | 7169 | GAME( 1992, quizdai2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Quiz Meitantei Neo & Geo - Quiz Daisousa Sen part 2", 0 ) |
| 7171 | 7170 | GAME( 1993, 3countb, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "3 Count Bout / Fire Suplex", 0 ) |
| 7172 | GAME( 1992, aof, neogeo, neogeo | |
| 7171 | GAME( 1992, aof, neogeo, neogeo | |
| 7173 | 7172 | GAME( 1993, samsho, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown / Samurai Spirits", 0 ) |
| 7174 | 7173 | GAME( 1994, tophuntr, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Top Hunter - Roddy & Cathy (set 1)", 0 ) |
| 7175 | 7174 | GAME( 1994, tophunta, tophuntr, neogeo, neogeo, neogeo, ROT0, "SNK", "Top Hunter - Roddy & Cathy (set 2)", 0 ) |
| 7176 | 7175 | GAME( 1992, fatfury2, neogeo, neogeo, neogeo, fatfury2, ROT0, "SNK", "Fatal Fury 2 / Garou Densetsu 2 - arata-naru tatakai", 0 ) |
| 7177 | GAME( 1992, ssideki, neogeo, neogeo_s, neogeo, fatfury2, ROT0, "SNK", "Super Sidekicks / Tokuten Ou", 0 ) | |
| 7178 | GAME( 1994, kof94, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '94", 0 ) | |
| 7179 | GAME( 1994, aof2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 2 / Ryuuko no Ken 2 (set 1)", 0 ) | |
| 7180 | GAME( 1994, aof2a, aof2, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 2 / Ryuuko no Ken 2 (set 2)", 0 ) | |
| 7176 | GAME( 1992, ssideki, neogeo, neogeo, neogeo, fatfury2, ROT0, "SNK", "Super Sidekicks / Tokuten Ou", 0 ) | |
| 7177 | GAME( 1994, kof94, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '94", 0 ) | |
| 7178 | GAME( 1994, aof2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 2 / Ryuuko no Ken 2 (set 1)", 0 ) | |
| 7179 | GAME( 1994, aof2a, aof2, neogeo, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 2 / Ryuuko no Ken 2 (set 2)", 0 ) | |
| 7181 | 7180 | GAME( 1993, fatfursp, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury Special / Garou Densetsu Special (set 1)", 0 ) |
| 7182 | 7181 | GAME( 1993, fatfursa, fatfursp, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury Special / Garou Densetsu Special (set 2)", 0 ) |
| 7183 | GAME( 1995, savagere, neogeo, neogeo | |
| 7182 | GAME( 1995, savagere, neogeo, neogeo | |
| 7184 | 7183 | GAME( 1994, ssideki2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Super Sidekicks 2 - The World Championship / Tokuten Ou 2 - real fight football", 0 ) |
| 7185 | 7184 | GAME( 1994, samsho2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown II / Shin Samurai Spirits - Haohmaru jigokuhen", 0 ) |
| 7186 | 7185 | /* Jin Saulabi Tu Hon (Samurai shodown 2) - Korean censored version - http://www.kmrb.or.kr/Game_Image/1999/%EC%A0%9C1273%ED%98%B8.jpg */ |
| 7187 | 7186 | GAME( 1995, fatfury3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury 3 - Road to the Final Victory / Garou Densetsu 3 - haruka-naru tatakai", 0 ) |
| 7188 | 7187 | GAME( 1995, ssideki3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Super Sidekicks 3 - The Next Glory / Tokuten Ou 3 - eikoue no michi", 0 ) |
| 7189 | GAME( 1995, kof95, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 1)", 0 ) | |
| 7190 | GAME( 1995, kof95a, kof95, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 2)", 0 ) | |
| 7191 | GAME( 1995, samsho3, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 1)", 0 ) | |
| 7192 | GAME( 1995, samsho3a, samsho3, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 2)", 0 ) | |
| 7193 | GAME( 1995, fswords, samsho3, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Fighters Swords (Korean release of Samurai Shodown III)", 0 ) | |
| 7188 | GAME( 1995, kof95, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 1)", 0 ) | |
| 7189 | GAME( 1995, kof95a, kof95, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '95 (set 2)", 0 ) | |
| 7190 | GAME( 1995, samsho3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 1)", 0 ) | |
| 7191 | GAME( 1995, samsho3a, samsho3, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown III / Samurai Spirits - Zankurou Musouken (set 2)", 0 ) | |
| 7192 | GAME( 1995, fswords, samsho3, neogeo, neogeo, neogeo, ROT0, "SNK", "Fighters Swords (Korean release of Samurai Shodown III)", 0 ) | |
| 7194 | 7193 | GAME( 1995, rbff1, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury / Real Bout Garou Densetsu", 0 ) |
| 7195 | GAME( 1996, aof3, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 3 - The Path of the Warrior / Art of Fighting - Ryuuko no Ken Gaiden", 0 ) | |
| 7196 | GAME( 1996, aof3k, aof3, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 3 - The Path of the Warrior (Korean release)", 0 ) // no Japanese title / mode | |
| 7197 | GAME( 1996, kof96, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '96 (set 1)", 0 ) | |
| 7198 | GAME( 1996, kof96h, kof96, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '96 (set 2)", 0 ) | |
| 7194 | GAME( 1996, aof3, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 3 - The Path of the Warrior / Art of Fighting - Ryuuko no Ken Gaiden", 0 ) | |
| 7195 | GAME( 1996, aof3k, aof3, neogeo, neogeo, neogeo, ROT0, "SNK", "Art of Fighting 3 - The Path of the Warrior (Korean release)", 0 ) // no Japanese title / mode | |
| 7196 | GAME( 1996, kof96, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '96 (set 1)", 0 ) | |
| 7197 | GAME( 1996, kof96h, kof96, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '96 (set 2)", 0 ) | |
| 7199 | 7198 | GAME( 1996, ssideki4, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Ultimate 11 - The SNK Football Championship / Tokuten Ou - Honoo no Libero, The", 0 ) |
| 7200 | GAME( 1996, kizuna, neogeo, neogeo | |
| 7199 | GAME( 1996, kizuna, neogeo, neogeo | |
| 7201 | 7200 | GAME( 1996, samsho4, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Samurai Shodown IV - Amakusa's Revenge / Samurai Spirits - Amakusa Kourin", 0 ) |
| 7202 | 7201 | /* Pae Wang Jeon Seol / Legend of Warrior - Korean / Chinese censored version of SamSho4, see http://www.kmrb.or.kr/Game_Image/1999/%EC%A0%9C2064%ED%98%B8.jpg */ |
| 7203 | 7202 | GAME( 1996, rbffspec, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury Special / Real Bout Garou Densetsu Special", 0 ) |
| 7204 | GAME( 1997, kof97, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '97 (set 1)", 0 ) | |
| 7205 | GAME( 1997, kof97a, kof97, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '97 (set 2)", 0 ) | |
| 7206 | GAME( 1997, kof97pls, kof97, neogeo_s, neogeo, neogeo, ROT0, "bootleg", "The King of Fighters '97 Plus (bootleg)", 0 ) | |
| 7207 | GAME( 1997, kog, kof97, neogeo_s, kog, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", GAME_NOT_WORKING ) // protected bootleg | |
| 7203 | GAME( 1997, kof97, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '97 (set 1)", 0 ) | |
| 7204 | GAME( 1997, kof97a, kof97, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '97 (set 2)", 0 ) | |
| 7205 | GAME( 1997, kof97pls, kof97, neogeo, neogeo, neogeo, ROT0, "bootleg", "The King of Fighters '97 Plus (bootleg)", 0 ) | |
| 7206 | GAME( 1997, kog, kof97, neogeo, kog, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", GAME_NOT_WORKING) // protected bootleg | |
| 7208 | 7207 | GAME( 1997, lastblad, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Last Blade / Bakumatsu Roman - Gekka no Kenshi, The (set 1)", 0 ) |
| 7209 | 7208 | GAME( 1997, lastbldh, lastblad, neogeo, neogeo, neogeo, ROT0, "SNK", "Last Blade / Bakumatsu Roman - Gekka no Kenshi, The (set 2)", 0 ) |
| 7210 | 7209 | GAME( 1997, lastsold, lastblad, neogeo, neogeo, neogeo, ROT0, "SNK", "The Last Soldier (Korean release of The Last Blade)", 0 ) |
| 7211 | GAME( 1997, irrmaze, neogeo, neogeo | |
| 7210 | GAME( 1997, irrmaze, neogeo, neogeo | |
| 7212 | 7211 | GAME( 1998, rbff2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers / Real Bout Garou Densetsu 2 - the newcomers (set 1)", 0 ) |
| 7213 | 7212 | GAME( 1998, rbff2h, rbff2, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers / Real Bout Garou Densetsu 2 - the newcomers (set 2)", 0 ) |
| 7214 | 7213 | GAME( 1998, rbff2k, rbff2, neogeo, neogeo, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers (Korean release)", 0 ) // no Japanese title / mode |
| 7215 | GAME( 1998, mslug2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Metal Slug 2 - Super Vehicle-001/II", 0 ) | |
| 7216 | GAME( 1998, kof98, neogeo, neogeo_s, neogeo, kof98, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends", 0 ) | |
| 7217 | GAME( 1998, kof98k, kof98, neogeo_s, neogeo, kof98, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends (Korean board)", 0 ) | |
| 7218 | GAME( 1998, kof98n, kof98, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends (not encrypted)", 0 ) | |
| 7214 | GAME( 1998, mslug2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Metal Slug 2 - Super Vehicle-001/II", 0 ) | |
| 7215 | GAME( 1998, kof98, neogeo, neogeo, neogeo, kof98, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends", 0 ) | |
| 7216 | GAME( 1998, kof98k, kof98, neogeo, neogeo, kof98, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends (Korean board)", 0 ) | |
| 7217 | GAME( 1998, kof98n, kof98, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '98 - The Slugfest / King of Fighters '98 - dream match never ends (not encrypted)", 0 ) | |
| 7219 | 7218 | GAME( 1998, lastbld2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Last Blade 2 / Bakumatsu Roman - Dai Ni Maku Gekka no Kenshi, The", 0 ) |
| 7220 | 7219 | GAME( 1998, neocup98, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Neo-Geo Cup '98 - The Road to the Victory", 0 ) |
| 7221 | GAME( 1999, mslugx, neogeo, neogeo_s, neogeo, mslugx, ROT0, "SNK", "Metal Slug X - Super Vehicle-001", 0 ) | |
| 7222 | GAME( 1999, kof99, neogeo, neogeo_s, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (set 1)" , 0) /* Encrypted Code & GFX */ | |
| 7223 | GAME( 1999, kof99a, kof99, neogeo_s, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (set 2)" , 0) /* Encrypted Code & GFX, crashes going into attract demo */ | |
| 7224 | GAME( 1999, kof99e, kof99, neogeo_s, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (earlier)" , 0) /* Encrypted Code & GFX */ | |
| 7225 | GAME( 1999, kof99n, kof99, neogeo_s, neogeo, kof99n, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (not encrypted)" , 0) /* Encrypted GFX */ | |
| 7226 | GAME( 1999, kof99p, kof99, neogeo_s, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (prototype)", 0 ) | |
| 7227 | GAME( 1999, garou, neogeo, neogeo, neogeo, garou, ROT0, "SNK", "Garou - Mark of the Wolves (set 1)" , 0) /* Encrypted Code & GFX */ | |
| 7228 | GAME( 1999, garouo, garou, neogeo, neogeo, garouo, ROT0, "SNK", "Garou - Mark of the Wolves (set 2)" , 0) /* Encrypted Code & GFX */ | |
| 7220 | GAME( 1999, mslugx, neogeo, neogeo, neogeo, mslugx, ROT0, "SNK", "Metal Slug X - Super Vehicle-001", 0 ) | |
| 7221 | GAME( 1999, kof99, neogeo, neogeo, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (set 1)" , 0 ) /* Encrypted Code & GFX */ | |
| 7222 | GAME( 1999, kof99a, kof99, neogeo, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (set 2)" , 0 ) /* Encrypted Code & GFX, crashes going into attract demo */ | |
| 7223 | GAME( 1999, kof99e, kof99, neogeo, neogeo, kof99, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (earlier)" , 0 ) /* Encrypted Code & GFX */ | |
| 7224 | GAME( 1999, kof99n, kof99, neogeo, neogeo, kof99n, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (not encrypted)" , 0 ) /* Encrypted GFX */ | |
| 7225 | GAME( 1999, kof99p, kof99, neogeo, neogeo, neogeo, ROT0, "SNK", "The King of Fighters '99 - Millennium Battle (prototype)", 0 ) | |
| 7226 | GAME( 1999, garou, neogeo, neogeo, neogeo, garou, ROT0, "SNK", "Garou - Mark of the Wolves (set 1)" , 0 ) /* Encrypted Code & GFX */ | |
| 7227 | GAME( 1999, garouo, garou, neogeo, neogeo, garouo, ROT0, "SNK", "Garou - Mark of the Wolves (set 2)" , 0 ) /* Encrypted Code & GFX */ | |
| 7229 | 7228 | GAME( 1999, garoup, garou, neogeo, neogeo, neogeo, ROT0, "SNK", "Garou - Mark of the Wolves (prototype)", 0 ) |
| 7230 | 7229 | GAME( 1999, garoubl, garou, neogeo, neogeo, garoubl, ROT0, "bootleg", "Garou - Mark of the Wolves (bootleg)", 0 ) /* Bootleg of garoup */ |
| 7231 | GAME( 2000, mslug3, neogeo, neogeo_s, neogeo, mslug3, ROT0, "SNK", "Metal Slug 3" , 0) /* Encrypted Code & GFX */ | |
| 7232 | GAME( 2000, mslug3n, mslug3, neogeo_s, neogeo, mslug3n, ROT0, "SNK", "Metal Slug 3 (not encrypted)" , 0) /* Encrypted GFX */ | |
| 7230 | GAME( 2000, mslug3, neogeo, neogeo, neogeo, mslug3, ROT0, "SNK", "Metal Slug 3" , 0 ) /* Encrypted Code & GFX */ | |
| 7231 | GAME( 2000, mslug3n, mslug3, neogeo, neogeo, mslug3n, ROT0, "SNK", "Metal Slug 3 (not encrypted)" , 0 ) /* Encrypted GFX */ | |
| 7233 | 7232 | GAME( 2000, mslug3b6, mslug3, neogeo, neogeo, mslug3b6, ROT0, "bootleg", "Metal Slug 6 (Metal Slug 3 bootleg)", 0 ) /* real Metal Slug 6 is an Atomiswave HW game, see atomswav.c ;-) */ |
| 7234 | GAME( 2000, kof2000, neogeo, neogeo_s, neogeo, kof2000, ROT0, "SNK", "The King of Fighters 2000" , 0) /* Encrypted Code & GFX */ | |
| 7235 | GAME( 2000, kof2000n, kof2000, neogeo_s, neogeo, kof2000n, ROT0, "SNK", "The King of Fighters 2000 (not encrypted)" , 0) /* Encrypted GFX */ | |
| 7236 | GAME( 2001, zupapa, neogeo, neogeo_s, neogeo, zupapa, ROT0, "SNK", "Zupapa!" , 0) /* Encrypted GFX */ | |
| 7237 | GAME( 2001, sengoku3, neogeo, neogeo, neogeo, sengoku3, ROT0, "SNK", "Sengoku 3" , 0) /* Encrypted GFX */ | |
| 7238 | GAME( 2001, kof2001, neogeo, neogeo_s, neogeo, kof2001, ROT0, "Eolith / SNK", "The King of Fighters 2001 (set 1)" , 0) /* Encrypted GFX */ | |
| 7239 | GAME( 2001, kof2001h, kof2001, neogeo_s, neogeo, kof2001, ROT0, "Eolith / SNK", "The King of Fighters 2001 (set 2)" , 0) /* Encrypted GFX */ | |
| 7240 | GAME( 2003, cthd2003, kof2001, neogeo_s, neogeo, cthd2003, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 (The King of Fighters 2001 bootleg)", 0 ) /* Protected Hack / Bootleg of kof2001 */ | |
| 7241 | GAME( 2003, ct2k3sp, kof2001, neogeo_s, neogeo, ct2k3sp, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 Super Plus (The King of Fighters 2001 bootleg)", 0 ) /* Protected Hack / Bootleg of kof2001 */ | |
| 7242 | GAME( 2003, ct2k3sa, kof2001, neogeo_s, neogeo, ct2k3sa, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 Super Plus alternate (The King of Fighters 2001 bootleg)", 0 ) /* Hack / Bootleg of kof2001 */ | |
| 7243 | GAME( 2002, kof2002, neogeo, neogeo_s, neogeo, kof2002, ROT0, "Eolith / Playmore", "The King of Fighters 2002" , 0) /* Encrypted GFX */ | |
| 7244 | GAME( 2002, kf2k2pls, kof2002, neogeo_s, neogeo, kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (set 1, bootleg)" , 0) /* Encrypted GFX */ | |
| 7245 | GAME( 2002, kf2k2pla, kof2002, neogeo_s, neogeo, kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (set 2, bootleg)" , 0) /* Encrypted GFX */ | |
| 7246 | GAME( 2002, kf2k2mp, kof2002, neogeo_s, neogeo, kf2k2mp, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus (bootleg)" , 0) /* Encrypted GFX */ | |
| 7247 | GAME( 2002, kf2k2mp2, kof2002, neogeo_s, neogeo, kof2km2, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus II (bootleg)" , 0) /* Encrypted GFX */ | |
| 7248 | GAME( 2002, kof10th, kof2002, neogeo_s, neogeo, kof10th, ROT0, "bootleg", "The King of Fighters 10th Anniversary (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7249 | GAME( 2004, kf2k5uni, kof2002, neogeo_s, neogeo, kf2k5uni, ROT0, "bootleg", "The King of Fighters 10th Anniversary 2005 Unique (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7250 | GAME( 2005, kf10thep, kof2002, neogeo_s, neogeo, kf10thep, ROT0, "bootleg", "The King of Fighters 10th Anniversary Extra Plus (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7251 | GAME( 2004, kof2k4se, kof2002, neogeo_s, neogeo, kof2k4se, ROT0, "bootleg", "The King of Fighters Special Edition 2004 (The King of Fighters 2002 bootleg)", 0 ) /* Hack / Bootleg of kof2002 */ | |
| 7252 | GAME( 2003, mslug5, neogeo, neogeo_s, neogeo, mslug5, ROT0, "SNK Playmore", "Metal Slug 5", 0 ) | |
| 7253 | GAME ( 2003, ms5pcb, 0, neogeo_s, neogeo, ms5pcb, ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", 0 ) | |
| 7254 | GAME( 2003, ms5plus, mslug5, neogeo_s, neogeo, ms5plus, ROT0, "bootleg", "Metal Slug 5 Plus (bootleg)",0 ) | |
| 7255 | GAME ( 2003, svcpcb, 0, neogeo_s, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. | |
| 7256 | GAME ( 2003, svcpcba, svcpcb, neogeo_s, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , 0 ) /* Encrypted Code */ | |
| 7257 | GAME( 2003, svc, neogeo, neogeo_s, neogeo, svc, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS", 0 ) | |
| 7258 | GAME( 2003, svcboot, svc, neogeo_s, neogeo, svcboot, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS (bootleg)",0 ) | |
| 7259 | GAME( 2003, svcplus, svc, neogeo_s, neogeo, svcplus, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 1, bootleg)",0 ) | |
| 7260 | GAME( 2003, svcplusa, svc, neogeo_s, neogeo, svcplusa, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 2, bootleg)",0 ) | |
| 7261 | GAME( 2003, svcsplus, svc, neogeo_s, neogeo, svcsplus, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Super Plus (bootleg)",0 ) | |
| 7262 | GAME( 2003, samsho5, neogeo, neogeo_s, neogeo, samsho5, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V / Samurai Spirits Zero (set 1)", 0 ) | |
| 7263 | GAME( 2003, samsho5h, samsho5, neogeo_s, neogeo, samsho5, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V / Samurai Spirits Zero (set 2)", 0 ) | |
| 7264 | GAME( 2003, samsho5b, samsho5, neogeo_s, neogeo, samsho5b, ROT0, "bootleg", "Samurai Shodown V / Samurai Spirits Zero (bootleg)", 0 ) // different program scrambling | |
| 7265 | GAME ( 2003, kf2k3pcb, 0, neogeo_s, neogeo, kf2k3pcb, ROT0, "SNK Playmore", "The King of Fighters 2003 (Japan, JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. | |
| 7266 | GAME( 2003, kof2003, neogeo, neogeo_s, neogeo, kof2003, ROT0, "SNK Playmore", "The King of Fighters 2003 (World / US, MVS)", 0 ) | |
| 7267 | GAME( 2003, kf2k3bl, kof2003, neogeo_s, neogeo, kof2003b, ROT0, "bootleg", "The King of Fighters 2003 (bootleg, set 1)",0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?) | |
| 7268 | GAME( 2003, kf2k3bla, kof2003, neogeo_s, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2003 (bootleg, set 2)",0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7269 | GAME( 2003, kf2k3pl, kof2003, neogeo_s, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg)",0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7270 | GAME( 2003, kf2k3upl, kof2003, neogeo_s, neogeo, kof2k3up, ROT0, "bootleg", "The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg)",0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7271 | GAME( 2003, samsh5sp, neogeo, neogeo_s, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 1, uncensored)", 0 ) | |
| 7272 | GAME( 2003, samsh5sh, samsh5sp, neogeo_s, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 2, censored)", 0 ) | |
| 7273 | GAME( 2003, samsh5sn, samsh5sp, neogeo_s, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 3, less censored)", 0 ) | |
| 7233 | GAME( 2000, kof2000, neogeo, neogeo, neogeo, kof2000, ROT0, "SNK", "The King of Fighters 2000" , 0 ) /* Encrypted Code & GFX */ | |
| 7234 | GAME( 2000, kof2000n, kof2000, neogeo, neogeo, kof2000n, ROT0, "SNK", "The King of Fighters 2000 (not encrypted)" , 0 ) /* Encrypted GFX */ | |
| 7235 | GAME( 2001, zupapa, neogeo, neogeo, neogeo, zupapa, ROT0, "SNK", "Zupapa!" , 0 ) /* Encrypted GFX */ | |
| 7236 | GAME( 2001, sengoku3, neogeo, neogeo, neogeo, sengoku3, ROT0, "SNK", "Sengoku 3" , 0 ) /* Encrypted GFX */ | |
| 7237 | GAME( 2001, kof2001, neogeo, neogeo, neogeo, kof2001, ROT0, "Eolith / SNK", "The King of Fighters 2001 (set 1)" , 0 ) /* Encrypted GFX */ | |
| 7238 | GAME( 2001, kof2001h, kof2001, neogeo, neogeo, kof2001, ROT0, "Eolith / SNK", "The King of Fighters 2001 (set 2)" , 0 ) /* Encrypted GFX */ | |
| 7239 | GAME( 2003, cthd2003, kof2001, neogeo, neogeo, cthd2003, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 (The King of Fighters 2001 bootleg)", 0 ) /* Protected Hack / Bootleg of kof2001 */ | |
| 7240 | GAME( 2003, ct2k3sp, kof2001, neogeo, neogeo, ct2k3sp, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 Super Plus (The King of Fighters 2001 bootleg)", 0 ) /* Protected Hack / Bootleg of kof2001 */ | |
| 7241 | GAME( 2003, ct2k3sa, kof2001, neogeo, neogeo, ct2k3sa, ROT0, "bootleg", "Crouching Tiger Hidden Dragon 2003 Super Plus alternate (The King of Fighters 2001 bootleg)", 0 ) /* Hack / Bootleg of kof2001 */ | |
| 7242 | GAME( 2002, kof2002, neogeo, neogeo, neogeo, kof2002, ROT0, "Eolith / Playmore", "The King of Fighters 2002" , 0 ) /* Encrypted GFX */ | |
| 7243 | GAME( 2002, kf2k2pls, kof2002, neogeo, neogeo, kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (set 1, bootleg)" , 0 ) /* Encrypted GFX */ | |
| 7244 | GAME( 2002, kf2k2pla, kof2002, neogeo, neogeo, kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (set 2, bootleg)" , 0 ) /* Encrypted GFX */ | |
| 7245 | GAME( 2002, kf2k2mp, kof2002, neogeo, neogeo, kf2k2mp, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus (bootleg)" , 0 ) /* Encrypted GFX */ | |
| 7246 | GAME( 2002, kf2k2mp2, kof2002, neogeo, neogeo, kof2km2, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus II (bootleg)" , 0 ) /* Encrypted GFX */ | |
| 7247 | GAME( 2002, kof10th, kof2002, neogeo, neogeo, kof10th, ROT0, "bootleg", "The King of Fighters 10th Anniversary (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7248 | GAME( 2004, kf2k5uni, kof2002, neogeo, neogeo, kf2k5uni, ROT0, "bootleg", "The King of Fighters 10th Anniversary 2005 Unique (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7249 | GAME( 2005, kf10thep, kof2002, neogeo, neogeo, kf10thep, ROT0, "bootleg", "The King of Fighters 10th Anniversary Extra Plus (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright | |
| 7250 | GAME( 2004, kof2k4se, kof2002, neogeo, neogeo, kof2k4se, ROT0, "bootleg", "The King of Fighters Special Edition 2004 (The King of Fighters 2002 bootleg)", 0 ) /* Hack / Bootleg of kof2002 */ | |
| 7251 | GAME( 2003, mslug5, neogeo, neogeo, neogeo, mslug5, ROT0, "SNK Playmore", "Metal Slug 5", 0 ) | |
| 7252 | GAME( 2003, ms5pcb, 0, neogeo, neogeo, ms5pcb, ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", 0 ) | |
| 7253 | GAME( 2003, ms5plus, mslug5, neogeo, neogeo, ms5plus, ROT0, "bootleg", "Metal Slug 5 Plus (bootleg)",0 ) | |
| 7254 | GAME( 2003, svcpcb, 0, neogeo, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. | |
| 7255 | GAME( 2003, svcpcba, svcpcb, neogeo, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , 0 ) /* Encrypted Code */ | |
| 7256 | GAME( 2003, svc, neogeo, neogeo, neogeo, svc, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS", 0 ) | |
| 7257 | GAME( 2003, svcboot, svc, neogeo, neogeo, svcboot, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS (bootleg)", 0 ) | |
| 7258 | GAME( 2003, svcplus, svc, neogeo, neogeo, svcplus, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 1, bootleg)", 0 ) | |
| 7259 | GAME( 2003, svcplusa, svc, neogeo, neogeo, svcplusa, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 2, bootleg)", 0 ) | |
| 7260 | GAME( 2003, svcsplus, svc, neogeo, neogeo, svcsplus, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Super Plus (bootleg)", 0 ) | |
| 7261 | GAME( 2003, samsho5, neogeo, neogeo, neogeo, samsho5, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V / Samurai Spirits Zero (set 1)", 0 ) | |
| 7262 | GAME( 2003, samsho5h, samsho5, neogeo, neogeo, samsho5, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V / Samurai Spirits Zero (set 2)", 0 ) | |
| 7263 | GAME( 2003, samsho5b, samsho5, neogeo, neogeo, samsho5b, ROT0, "bootleg", "Samurai Shodown V / Samurai Spirits Zero (bootleg)", 0 ) // different program scrambling | |
| 7264 | GAME( 2003, kf2k3pcb, 0, neogeo, neogeo, kf2k3pcb, ROT0, "SNK Playmore", "The King of Fighters 2003 (Japan, JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. | |
| 7265 | GAME( 2003, kof2003, neogeo, neogeo, neogeo, kof2003, ROT0, "SNK Playmore", "The King of Fighters 2003 (World / US, MVS)", 0 ) | |
| 7266 | GAME( 2003, kf2k3bl, kof2003, neogeo, neogeo, kof2003b, ROT0, "bootleg", "The King of Fighters 2003 (bootleg, set 1)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?) | |
| 7267 | GAME( 2003, kf2k3bla, kof2003, neogeo, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2003 (bootleg, set 2)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7268 | GAME( 2003, kf2k3pl, kof2003, neogeo, neogeo, kof2k3pl, ROT0, "bootleg", "The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7269 | GAME( 2003, kf2k3upl, kof2003, neogeo, neogeo, kof2k3up, ROT0, "bootleg", "The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart | |
| 7270 | GAME( 2003, samsh5sp, neogeo, neogeo, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 1, uncensored)", 0 ) | |
| 7271 | GAME( 2003, samsh5sh, samsh5sp, neogeo, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 2, censored)", 0 ) | |
| 7272 | GAME( 2003, samsh5sn, samsh5sp, neogeo, neogeo, samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 3, less censored)", 0 ) | |
| 7274 | 7273 | |
| 7275 | 7274 | /* there are other bootlegs kof2002b etc. kof96ep, matrimbl?, kf2k1pls -- work out which should be supported */ |
| 7276 | 7275 | |
| 7277 | 7276 | /* Alpha Denshi Co. / ADK (changed name in 1993) */ |
| 7278 | 7277 | GAME( 1990, maglord, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Magician Lord (set 1)", 0 ) |
| 7279 | 7278 | GAME( 1990, maglordh, maglord, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Magician Lord (set 2)", 0 ) |
| 7280 | GAME( 1990, ncombat, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Ninja Combat (set 1)", 0 ) | |
| 7281 | GAME( 1990, ncombath, ncombat, neogeo_s, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Ninja Combat (set 2)", 0 ) | |
| 7279 | GAME( 1990, ncombat, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Ninja Combat (set 1)", 0 ) | |
| 7280 | GAME( 1990, ncombath, ncombat, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Ninja Combat (set 2)", 0 ) | |
| 7282 | 7281 | GAME( 1990, bjourney, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Blue's Journey / Raguy", 0 ) |
| 7283 | GAME( 1991, crsword, neogeo, neogeo | |
| 7282 | GAME( 1991, crsword, neogeo, neogeo | |
| 7284 | 7283 | GAME( 1991, trally, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "Thrash Rally", 0 ) |
| 7285 | GAME( 1992, ncommand, neogeo, neogeo | |
| 7284 | GAME( 1992, ncommand, neogeo, neogeo | |
| 7286 | 7285 | GAME( 1992, wh1, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "World Heroes (set 1)", 0 ) |
| 7287 | 7286 | GAME( 1992, wh1h, wh1, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "World Heroes (set 2)", 0 ) |
| 7288 | 7287 | GAME( 1992, wh1ha, wh1, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co.", "World Heroes (set 3)", 0 ) |
| 7289 | GAME( 1993, wh2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK", "World Heroes 2", 0 ) | |
| 7290 | GAME( 1994, wh2j, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK / SNK", "World Heroes 2 Jet (set 1)", 0 ) | |
| 7291 | GAME( 1994, wh2jh, wh2j, neogeo_s, neogeo, neogeo, ROT0, "ADK / SNK", "World Heroes 2 Jet (set 2)", 0 ) | |
| 7292 | GAME( 1994, aodk, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK / SNK", "Aggressors of Dark Kombat / Tsuukai GANGAN Koushinkyoku", 0 ) | |
| 7288 | GAME( 1993, wh2, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK", "World Heroes 2", 0 ) | |
| 7289 | GAME( 1994, wh2j, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "World Heroes 2 Jet (set 1)", 0 ) | |
| 7290 | GAME( 1994, wh2jh, wh2j, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "World Heroes 2 Jet (set 2)", 0 ) | |
| 7291 | GAME( 1994, aodk, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "Aggressors of Dark Kombat / Tsuukai GANGAN Koushinkyoku", 0 ) | |
| 7293 | 7292 | GAME( 1995, whp, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "World Heroes Perfect", 0 ) |
| 7294 | GAME( 1995, mosyougi, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK / SNK", "Syougi No Tatsujin - Master of Syougi", 0 ) | |
| 7295 | GAME( 1996, overtop, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK", "Over Top", 0 ) | |
| 7293 | GAME( 1995, mosyougi, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "Syougi No Tatsujin - Master of Syougi", 0 ) | |
| 7294 | GAME( 1996, overtop, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK", "Over Top", 0 ) | |
| 7296 | 7295 | GAME( 1996, ninjamas, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK / SNK", "Ninja Master's - haoh-ninpo-cho", 0 ) |
| 7297 | GAME( 1996, twinspri, neogeo, neogeo_s, neogeo, neogeo, ROT0, "ADK", "Twinkle Star Sprites", 0 ) | |
| 7298 | GAME( 1996, zintrckb, neogeo, neogeo_s, neogeo, neogeo, ROT0, "hack / bootleg", "Zintrick / Oshidashi Zentrix (hack / bootleg)", 0 ) | |
| 7296 | GAME( 1996, twinspri, neogeo, neogeo, neogeo, neogeo, ROT0, "ADK", "Twinkle Star Sprites", 0 ) | |
| 7297 | GAME( 1996, zintrckb, neogeo, neogeo, neogeo, neogeo, ROT0, "hack / bootleg", "Zintrick / Oshidashi Zentrix (hack / bootleg)", 0 ) | |
| 7299 | 7298 | |
| 7300 | 7299 | /* Aicom */ |
| 7301 | 7300 | GAME( 1994, janshin, neogeo, neogeo, mjneogeo,neogeo, ROT0, "Aicom", "Jyanshin Densetsu - Quest of Jongmaster", 0 ) |
| 7302 | 7301 | GAME( 1995, pulstar, neogeo, neogeo, neogeo, neogeo, ROT0, "Aicom", "Pulstar", 0 ) |
| 7303 | 7302 | |
| 7304 | 7303 | /* Data East Corporation */ |
| 7305 | GAME( 1993, spinmast, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Spin Master / Miracle Adventure", 0 ) | |
| 7306 | GAME( 1994, wjammers, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Windjammers / Flying Power Disc", 0 ) | |
| 7307 | GAME( 1994, karnovr, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Karnov's Revenge / Fighter's History Dynamite", 0 ) | |
| 7308 | GAME( 1994, strhoop, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Street Hoop / Street Slam / Dunk Dream", 0 ) | |
| 7309 | GAME( 1996, ghostlop, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Ghostlop (prototype)", 0 ) | |
| 7310 | GAME( 1996, magdrop2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Magical Drop II", 0 ) | |
| 7311 | GAME( 1997, magdrop3, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corporation", "Magical Drop III", 0 ) | |
| 7304 | GAME( 1993, spinmast, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Spin Master / Miracle Adventure", 0 ) | |
| 7305 | GAME( 1994, wjammers, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Windjammers / Flying Power Disc", 0 ) | |
| 7306 | GAME( 1994, karnovr, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Karnov's Revenge / Fighter's History Dynamite", 0 ) | |
| 7307 | GAME( 1994, strhoop, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Street Hoop / Street Slam / Dunk Dream", 0 ) | |
| 7308 | GAME( 1996, ghostlop, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Ghostlop (prototype)", 0 ) | |
| 7309 | GAME( 1996, magdrop2, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Magical Drop II", 0 ) | |
| 7310 | GAME( 1997, magdrop3, neogeo, neogeo, neogeo, neogeo, ROT0, "Data East Corporation", "Magical Drop III", 0 ) | |
| 7312 | 7311 | |
| 7313 | 7312 | /* Eleven */ |
| 7314 | GAME( 2000, nitd, neogeo, neogeo, neogeo, nitd, ROT0, "Eleven / Gavaking", "Nightmare in the Dark" , 0) /* Encrypted GFX */ | |
| 7315 | GAME( 2001, nitdbl, nitd, neogeo, neogeo, neogeo, ROT0, "bootleg", "Nightmare in the Dark (bootleg)" , 0) | |
| 7313 | GAME( 2000, nitd, neogeo, neogeo, neogeo, nitd, ROT0, "Eleven / Gavaking", "Nightmare in the Dark" , 0 ) /* Encrypted GFX */ | |
| 7314 | GAME( 2001, nitdbl, nitd, neogeo, neogeo, neogeo, ROT0, "bootleg", "Nightmare in the Dark (bootleg)" , 0 ) | |
| 7316 | 7315 | |
| 7317 | 7316 | /* Face */ |
| 7318 | GAME( 1994, gururin, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Face", "Gururin", 0 ) | |
| 7319 | GAME( 1997, miexchng, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Face", "Money Puzzle Exchanger / Money Idol Exchanger", 0 ) | |
| 7317 | GAME( 1994, gururin, neogeo, neogeo, neogeo, neogeo, ROT0, "Face", "Gururin", 0 ) | |
| 7318 | GAME( 1997, miexchng, neogeo, neogeo, neogeo, neogeo, ROT0, "Face", "Money Puzzle Exchanger / Money Idol Exchanger", 0 ) | |
| 7320 | 7319 | |
| 7321 | 7320 | /* Hudson Soft */ |
| 7322 | GAME( 1994, panicbom, neogeo, neogeo | |
| 7321 | GAME( 1994, panicbom, neogeo, neogeo | |
| 7323 | 7322 | GAME( 1995, kabukikl, neogeo, neogeo, neogeo, neogeo, ROT0, "Hudson", "Far East of Eden - Kabuki Klash / Tengai Makyou - Shin Den", 0 ) |
| 7324 | GAME( 1997, neobombe, neogeo, neogeo | |
| 7323 | GAME( 1997, neobombe, neogeo, neogeo | |
| 7325 | 7324 | |
| 7326 | 7325 | /* Monolith Corp. */ |
| 7327 | GAME( 1990, minasan, neogeo, neogeo_s, mjneogeo,neogeo, ROT0, "Monolith Corp.", "Minnasanno Okagesamadesu", 0 ) | |
| 7328 | GAME( 1991, bakatono, neogeo, neogeo_s, mjneogeo,neogeo, ROT0, "Monolith Corp.", "Bakatonosama Mahjong Manyuki", 0 ) | |
| 7326 | GAME( 1990, minasan, neogeo, neogeo, mjneogeo,neogeo, ROT0, "Monolith Corp.", "Minnasanno Okagesamadesu", 0 ) | |
| 7327 | GAME( 1991, bakatono, neogeo, neogeo, mjneogeo,neogeo, ROT0, "Monolith Corp.", "Bakatonosama Mahjong Manyuki", 0 ) | |
| 7329 | 7328 | |
| 7330 | 7329 | /* Nazca */ |
| 7331 | GAME( 1996, turfmast, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Nazca", "Neo Turf Masters / Big Tournament Golf", 0 ) | |
| 7332 | GAME( 1996, mslug, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Nazca", "Metal Slug - Super Vehicle-001", 0 ) | |
| 7330 | GAME( 1996, turfmast, neogeo, neogeo, neogeo, neogeo, ROT0, "Nazca", "Neo Turf Masters / Big Tournament Golf", 0 ) | |
| 7331 | GAME( 1996, mslug, neogeo, neogeo, neogeo, neogeo, ROT0, "Nazca", "Metal Slug - Super Vehicle-001", 0 ) | |
| 7333 | 7332 | |
| 7334 | 7333 | /* NMK */ |
| 7335 | GAME( 1994, zedblade, neogeo, neogeo | |
| 7334 | GAME( 1994, zedblade, neogeo, neogeo | |
| 7336 | 7335 | |
| 7337 | 7336 | /* Psikyo */ |
| 7338 | GAME( 1999, s1945p, neogeo, neogeo, neogeo, s1945p, ROT0, "Psikyo", "Strikers 1945 Plus" , 0) /* Encrypted GFX */ | |
| 7337 | GAME( 1999, s1945p, neogeo, neogeo, neogeo, s1945p, ROT0, "Psikyo", "Strikers 1945 Plus" , 0 ) /* Encrypted GFX */ | |
| 7339 | 7338 | |
| 7340 | 7339 | /* Sammy */ |
| 7341 | GAME( 1992, viewpoin, neogeo, neogeo | |
| 7340 | GAME( 1992, viewpoin, neogeo, neogeo | |
| 7342 | 7341 | |
| 7343 | 7342 | /* Saurus */ |
| 7344 | GAME( 1995, quizkof, neogeo, neogeo | |
| 7343 | GAME( 1995, quizkof, neogeo, neogeo | |
| 7345 | 7344 | GAME( 1995, stakwin, neogeo, neogeo, neogeo, neogeo, ROT0, "Saurus", "Stakes Winner / Stakes Winner - GI kinzen seihae no michi", 0 ) |
| 7346 | 7345 | GAME( 1996, ragnagrd, neogeo, neogeo, neogeo, neogeo, ROT0, "Saurus", "Ragnagard / Shin-Oh-Ken", 0 ) |
| 7347 | GAME( 1996, pgoal, neogeo, neogeo | |
| 7346 | GAME( 1996, pgoal, neogeo, neogeo | |
| 7348 | 7347 | GAME( 1996, stakwin2, neogeo, neogeo, neogeo, neogeo, ROT0, "Saurus", "Stakes Winner 2", 0 ) |
| 7349 | GAME( 1997, shocktro, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers (set 1)", 0 ) | |
| 7350 | GAME( 1997, shocktra, shocktro, neogeo_s, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers (set 2)", 0 ) | |
| 7351 | GAME( 1998, shocktr2, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers - 2nd Squad", 0 ) | |
| 7352 | GAME( 1998, lans2004, shocktr2, neogeo_s, neogeo, lans2004, ROT0, "bootleg", "Lansquenet 2004 (Shock Troopers - 2nd Squad bootleg)", 0 ) | |
| 7348 | GAME( 1997, shocktro, neogeo, neogeo, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers (set 1)", 0 ) | |
| 7349 | GAME( 1997, shocktra, shocktro, neogeo, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers (set 2)", 0 ) | |
| 7350 | GAME( 1998, shocktr2, neogeo, neogeo, neogeo, neogeo, ROT0, "Saurus", "Shock Troopers - 2nd Squad", 0 ) | |
| 7351 | GAME( 1998, lans2004, shocktr2, neogeo, neogeo, lans2004, ROT0, "bootleg", "Lansquenet 2004 (Shock Troopers - 2nd Squad bootleg)", 0 ) | |
| 7353 | 7352 | |
| 7354 | 7353 | /* Sunsoft */ |
| 7355 | GAME( 1995, galaxyfg, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Sunsoft", "Galaxy Fight - Universal Warriors", 0 ) | |
| 7356 | GAME( 1996, wakuwak7, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Sunsoft", "Waku Waku 7", 0 ) | |
| 7354 | GAME( 1995, galaxyfg, neogeo, neogeo, neogeo, neogeo, ROT0, "Sunsoft", "Galaxy Fight - Universal Warriors", 0 ) | |
| 7355 | GAME( 1996, wakuwak7, neogeo, neogeo, neogeo, neogeo, ROT0, "Sunsoft", "Waku Waku 7", 0 ) | |
| 7357 | 7356 | |
| 7358 | 7357 | /* Taito */ |
| 7359 | 7358 | GAME( 1994, pbobblen, neogeo, neogeo, neogeo, neogeo, ROT0, "Taito", "Puzzle Bobble / Bust-A-Move (Neo-Geo) (set 1)", 0 ) |
| 7360 | 7359 | GAME( 1994, pbobblna, pbobblen, neogeo, neogeo, neogeo, ROT0, "Taito", "Puzzle Bobble / Bust-A-Move (Neo-Geo) (set 2)", 0 ) |
| 7361 | GAME( 1999, pbobbl2n, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Taito (SNK license)", "Puzzle Bobble 2 / Bust-A-Move Again (Neo-Geo)", 0 ) | |
| 7362 | GAME( 2003, pnyaa, neogeo, neogeo_s, neogeo, pnyaa, ROT0, "Aiky / Taito", "Pochi and Nyaa", 0 ) | |
| 7360 | GAME( 1999, pbobbl2n, neogeo, neogeo, neogeo, neogeo, ROT0, "Taito (SNK license)", "Puzzle Bobble 2 / Bust-A-Move Again (Neo-Geo)", 0 ) | |
| 7361 | GAME( 2003, pnyaa, neogeo, neogeo, neogeo, pnyaa, ROT0, "Aiky / Taito", "Pochi and Nyaa", 0 ) | |
| 7363 | 7362 | |
| 7364 | 7363 | /* Takara */ |
| 7365 | GAME( 1995, marukodq, neogeo, neogeo | |
| 7364 | GAME( 1995, marukodq, neogeo, neogeo | |
| 7366 | 7365 | |
| 7367 | 7366 | /* Technos */ |
| 7368 | 7367 | GAME( 1995, doubledr, neogeo, neogeo, neogeo, neogeo, ROT0, "Technos", "Double Dragon (Neo-Geo)", 0 ) |
| 7369 | GAME( 1995, gowcaizr, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Technos", "Voltage Fighter - Gowcaizer / Choujin Gakuen Gowcaizer", 0) | |
| 7370 | GAME( 1996, sdodgeb, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Technos", "Super Dodge Ball / Kunio no Nekketsu Toukyuu Densetsu", 0 ) | |
| 7368 | GAME( 1995, gowcaizr, neogeo, neogeo, neogeo, neogeo, ROT0, "Technos", "Voltage Fighter - Gowcaizer / Choujin Gakuen Gowcaizer", 0 ) | |
| 7369 | GAME( 1996, sdodgeb, neogeo, neogeo, neogeo, neogeo, ROT0, "Technos", "Super Dodge Ball / Kunio no Nekketsu Toukyuu Densetsu", 0 ) | |
| 7371 | 7370 | |
| 7372 | 7371 | /* Tecmo */ |
| 7373 | GAME( 1996, tws96, neogeo, neogeo | |
| 7372 | GAME( 1996, tws96, neogeo, neogeo | |
| 7374 | 7373 | |
| 7375 | 7374 | /* Yumekobo */ |
| 7376 | 7375 | GAME( 1998, blazstar, neogeo, neogeo, neogeo, neogeo, ROT0, "Yumekobo", "Blazing Star", 0 ) |
| 7377 | GAME( 1999, preisle2, neogeo, neogeo | |
| 7376 | GAME( 1999, preisle2, neogeo, neogeo | |
| 7378 | 7377 | |
| 7379 | 7378 | /* Viccom */ |
| 7380 | GAME( 1994, fightfev, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Viccom", "Fight Fever (set 1)", 0 ) | |
| 7381 | GAME( 1994, fightfva, fightfev, neogeo_s, neogeo, neogeo, ROT0, "Viccom", "Fight Fever (set 2)", 0 ) | |
| 7379 | GAME( 1994, fightfev, neogeo, neogeo, neogeo, neogeo, ROT0, "Viccom", "Fight Fever (set 1)", 0 ) | |
| 7380 | GAME( 1994, fightfva, fightfev, neogeo, neogeo, neogeo, ROT0, "Viccom", "Fight Fever (set 2)", 0 ) | |
| 7382 | 7381 | |
| 7383 | 7382 | /* Video System Co. */ |
| 7384 | 7383 | GAME( 1994, pspikes2, neogeo, neogeo, neogeo, neogeo, ROT0, "Video System Co.", "Power Spikes II", 0 ) |
| 7385 | 7384 | GAME( 1994, sonicwi2, neogeo, neogeo, neogeo, neogeo, ROT0, "Video System Co.", "Aero Fighters 2 / Sonic Wings 2", 0 ) |
| 7386 | 7385 | GAME( 1995, sonicwi3, neogeo, neogeo, neogeo, neogeo, ROT0, "Video System Co.", "Aero Fighters 3 / Sonic Wings 3", 0 ) |
| 7387 | GAME( 1997, popbounc, neogeo, neogeo | |
| 7386 | GAME( 1997, popbounc, neogeo, neogeo | |
| 7388 | 7387 | |
| 7389 | 7388 | /* Visco */ |
| 7390 | GAME( 1992, androdun, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Andro Dunos", 0 ) | |
| 7391 | GAME( 1995, puzzledp, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Taito (Visco license)", "Puzzle De Pon!", 0 ) | |
| 7392 | GAME( 1996, neomrdo, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Neo Mr. Do!", 0 ) | |
| 7393 | GAME( 1995, goalx3, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Goal! Goal! Goal!", 0 ) | |
| 7394 | GAME( 1996, neodrift, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Neo Drift Out - New Technology", 0 ) | |
| 7389 | GAME( 1992, androdun, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Andro Dunos", 0 ) | |
| 7390 | GAME( 1995, puzzledp, neogeo, neogeo, neogeo, neogeo, ROT0, "Taito (Visco license)", "Puzzle De Pon!", 0 ) | |
| 7391 | GAME( 1996, neomrdo, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Neo Mr. Do!", 0 ) | |
| 7392 | GAME( 1995, goalx3, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Goal! Goal! Goal!", 0 ) | |
| 7393 | GAME( 1996, neodrift, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Neo Drift Out - New Technology", 0 ) | |
| 7395 | 7394 | GAME( 1996, breakers, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Breakers", 0 ) |
| 7396 | GAME( 1997, puzzldpr, puzzledp, neogeo_s, neogeo, neogeo, ROT0, "Taito (Visco license)", "Puzzle De Pon! R!", 0 ) | |
| 7397 | GAME( 1998, breakrev, breakers, neogeo, neogeo, neogeo, ROT0, "Visco", "Breakers Revenge", 0) | |
| 7398 | GAME( 1998, flipshot, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Battle Flip Shot", 0 ) | |
| 7399 | GAME( 1999, ctomaday, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Visco", "Captain Tomaday", 0 ) | |
| 7400 | GAME( 1999, ganryu, neogeo, neogeo_s, neogeo, ganryu, ROT0, "Visco", "Ganryu / Musashi Ganryuki" , 0) /* Encrypted GFX */ | |
| 7401 | GAME( 2000, bangbead, neogeo, neogeo_s, neogeo, bangbead, ROT0, "Visco", "Bang Bead", 0 ) | |
| 7395 | GAME( 1997, puzzldpr, puzzledp, neogeo, neogeo, neogeo, ROT0, "Taito (Visco license)", "Puzzle De Pon! R!", 0 ) | |
| 7396 | GAME( 1998, breakrev, breakers, neogeo, neogeo, neogeo, ROT0, "Visco", "Breakers Revenge", 0 ) | |
| 7397 | GAME( 1998, flipshot, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Battle Flip Shot", 0 ) | |
| 7398 | GAME( 1999, ctomaday, neogeo, neogeo, neogeo, neogeo, ROT0, "Visco", "Captain Tomaday", 0 ) | |
| 7399 | GAME( 1999, ganryu, neogeo, neogeo, neogeo, ganryu, ROT0, "Visco", "Ganryu / Musashi Ganryuki" , 0 ) /* Encrypted GFX */ | |
| 7400 | GAME( 2000, bangbead, neogeo, neogeo, neogeo, bangbead, ROT0, "Visco", "Bang Bead", 0 ) | |
| 7402 | 7401 | //GAME( 2000, bangbedp, bangbead, neogeo, neogeo, neogeo, ROT0, "Visco", "Bang Bead (prototype)", 0 ) |
| 7403 | 7402 | |
| 7404 | 7403 | /* Mega Enterprise */ |
| 7405 | GAME( 2002, mslug4, neogeo, neogeo_s, neogeo, mslug4, ROT0, "Mega", "Metal Slug 4", 0 ) | |
| 7406 | GAME( 2002, ms4plus, mslug4, neogeo_s, neogeo, neogeo, ROT0, "bootleg", "Metal Slug 4 Plus (bootleg)", 0 ) | |
| 7404 | GAME( 2002, mslug4, neogeo, neogeo, neogeo, mslug4, ROT0, "Mega", "Metal Slug 4", 0 ) | |
| 7405 | GAME( 2002, ms4plus, mslug4, neogeo, neogeo, neogeo, ROT0, "bootleg", "Metal Slug 4 Plus (bootleg)", 0 ) | |
| 7407 | 7406 | |
| 7408 | 7407 | /* Evoga */ |
| 7409 | 7408 | GAME( 2002, rotd, neogeo, neogeo, neogeo, rotd, ROT0, "Evoga / Playmore", "Rage of the Dragons", 0 ) |
| r1490 | r1491 | |
| 7412 | 7411 | GAME( 2002, matrim, neogeo, neogeo, neogeo, matrim, ROT0, "Noise Factory / Atlus", "Matrimelee / Shin Gouketsuji Ichizoku Toukon", 0 ) |
| 7413 | 7412 | |
| 7414 | 7413 | /* Breezasoft */ |
| 7415 | GAME( 2001, jockeygp, neogeo, neogeo_s, jockeygp,jockeygp, ROT0, "Sun Amusement / BrezzaSoft", "Jockey Grand Prix", 0 ) | |
| 7416 | GAME( 2001, vliner, neogeo, neogeo_s, vliner, vliner, ROT0, "Dyna / BreezaSoft", "V-Liner (set 1)", 0 ) | |
| 7417 | GAME( 2001, vlinero, vliner, neogeo_s, vliner, vliner, ROT0, "Dyna / BreezaSoft", "V-Liner (set 2)", 0 ) | |
| 7414 | GAME( 2001, jockeygp, neogeo, neogeo, jockeygp,jockeygp, ROT0, "Sun Amusement / BrezzaSoft", "Jockey Grand Prix", 0 ) | |
| 7415 | GAME( 2001, vliner, neogeo, neogeo, vliner, vliner, ROT0, "Dyna / BreezaSoft", "V-Liner (set 1)", 0 ) | |
| 7416 | GAME( 2001, vlinero, vliner, neogeo, vliner, vliner, ROT0, "Dyna / BreezaSoft", "V-Liner (set 2)", 0 ) | |
| 7418 | 7417 | |
| 7419 | 7418 | /* Kyle Hodgetts */ |
| 7420 | GAME( 2000, diggerma, neogeo, neogeo | |
| 7419 | GAME( 2000, diggerma, neogeo, neogeo | |
| 7421 | 7420 |
| r1490 | r1491 | |
|---|---|---|
| 166 | 166 | /* Pointers to External RAM */ |
| 167 | 167 | static UINT8 *program_ram; |
| 168 | 168 | static UINT8 *cmos_ram; |
| 169 | static UINT8 *s1000_ram; | |
| 170 | 169 | static UINT8 *s3000_ram; |
| 171 | 170 | static UINT8 *s5000_ram; |
| 172 | 171 | static UINT8 *s7000_ram; |
| r1490 | r1491 | |
| 195 | 194 | static int sda_dir = 0; |
| 196 | 195 | |
| 197 | 196 | /* Static Variables */ |
| 198 | #define CMOS_NVRAM_SIZE 0x | |
| 197 | #define CMOS_NVRAM_SIZE 0x2000 | |
| 199 | 198 | #define EEPROM_NVRAM_SIZE 0x200 // 4k Bit |
| 200 | 199 | |
| 201 | 200 | |
| r1490 | r1491 | |
| 316 | 315 | cmos_ram[offset] = data; |
| 317 | 316 | } |
| 318 | 317 | |
| 319 | static WRITE8_HANDLER( peplus_s1000_w ) | |
| 320 | { | |
| 321 | s1000_ram[offset] = data; | |
| 322 | } | |
| 323 | ||
| 324 | 318 | static WRITE8_HANDLER( peplus_s3000_w ) |
| 325 | 319 | { |
| 326 | 320 | s3000_ram[offset] = data; |
| r1490 | r1491 | |
| 466 | 460 | return cmos_ram[offset]; |
| 467 | 461 | } |
| 468 | 462 | |
| 469 | static READ8_HANDLER( peplus_s1000_r ) | |
| 470 | { | |
| 471 | return s1000_ram[offset]; | |
| 472 | } | |
| 473 | ||
| 474 | 463 | static READ8_HANDLER( peplus_s3000_r ) |
| 475 | 464 | { |
| 476 | 465 | return s3000_ram[offset]; |
| r1490 | r1491 | |
| 726 | 715 | ADDRESS_MAP_END |
| 727 | 716 | |
| 728 | 717 | static ADDRESS_MAP_START( peplus_datamap, ADDRESS_SPACE_DATA, 8 ) |
| 729 | // Battery-backed RAM | |
| 730 | AM_RANGE(0x0000, 0x0fff) AM_RAM AM_READWRITE(peplus_cmos_r, peplus_cmos_w) AM_BASE(&cmos_ram) | |
| 718 | // Battery-backed RAM (0x1000-0x01fff Extended RAM for Superboards Only) | |
| 719 | AM_RANGE(0x0000, 0x1fff) AM_RAM AM_READWRITE(peplus_cmos_r, peplus_cmos_w) AM_BASE(&cmos_ram) | |
| 731 | 720 | |
| 732 | // Superboard Data | |
| 733 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_READWRITE(peplus_s1000_r, peplus_s1000_w) AM_BASE(&s1000_ram) | |
| 734 | ||
| 735 | 721 | // CRT Controller |
| 736 | 722 | AM_RANGE(0x2008, 0x2008) AM_WRITE(peplus_crtc_mode_w) |
| 737 | 723 | AM_RANGE(0x2080, 0x2080) AM_READ(peplus_crtc_lpen1_r) AM_WRITE(peplus_crtc_register_w) |
| r1490 | r1491 | |
| 1033 | 1019 | UINT8 *super_data = memory_region(REGION_USER1); |
| 1034 | 1020 | |
| 1035 | 1021 | /* Distribute Superboard Data */ |
| 1036 | memcpy(s1000_ram, &super_data[0], 0x1000); | |
| 1037 | 1022 | memcpy(s3000_ram, &super_data[0x3000], 0x1000); |
| 1038 | 1023 | memcpy(s5000_ram, &super_data[0x5000], 0x1000); |
| 1039 | 1024 | memcpy(s7000_ram, &super_data[0x7000], 0x1000); |
| r1490 | r1491 | |
|---|---|---|
| 722 | 722 | { |
| 723 | 723 | if (memory_region(REGION_USER1)) |
| 724 | 724 | { |
| 725 | memory_set_bankptr(1, memory_region(REGION_USER1) + curbank * 0x40000); | |
| 726 | memory_set_bankptr(2, memory_region(REGION_USER1) + curbank * 0x40000); | |
| 725 | memory_set_bank(1, curbank & 15); | |
| 726 | memory_set_bank(2, curbank & 15); | |
| 727 | 727 | } |
| 728 | 728 | } |
| 729 | 729 | |
| r1490 | r1491 | |
| 1254 | 1254 | mame_fread(file, memory_region(REGION_USER2), 2*track_size); |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | static MACHINE_START( system24 ) | |
| 1258 | { | |
| 1259 | if (memory_region(REGION_USER1)) | |
| 1260 | { | |
| 1261 | memory_configure_bank(1, 0, 16, memory_region(REGION_USER1), 0x40000); | |
| 1262 | memory_configure_bank(2, 0, 16, memory_region(REGION_USER1), 0x40000); | |
| 1263 | } | |
| 1264 | } | |
| 1265 | ||
| 1257 | 1266 | static MACHINE_RESET(system24) |
| 1258 | 1267 | { |
| 1259 | 1268 | cpunum_set_input_line(1, INPUT_LINE_HALT, ASSERT_LINE); |
| r1490 | r1491 | |
| 1907 | 1916 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(100)) |
| 1908 | 1917 | MDRV_INTERLEAVE(4) |
| 1909 | 1918 | |
| 1919 | MDRV_MACHINE_START(system24) | |
| 1910 | 1920 | MDRV_MACHINE_RESET(system24) |
| 1911 | 1921 | MDRV_NVRAM_HANDLER(system24) |
| 1912 | 1922 | |
| r1490 | r1491 | |
| 1985 | 1995 | ROM_LOAD16_BYTE( "14485", 0x000000, 0x20000, CRC(fc0085f9) SHA1(0250d1e17e19b541b85198ec4207e55bfbd5c32e) ) |
| 1986 | 1996 | ROM_LOAD16_BYTE( "14484", 0x000001, 0x20000, CRC(f51c641c) SHA1(3f2fd0be7d58c75e88565393da5e810655413b53) ) |
| 1987 | 1997 | |
| 1988 | ROM_REGION16_BE( 0x | |
| 1998 | ROM_REGION16_BE( 0x400000, REGION_USER1, 0) | |
| 1989 | 1999 | ROM_LOAD16_BYTE( "14482", 0x000000, 0x80000, CRC(7a13dd97) SHA1(bfe9950d2cd41f3f866520923c1ed7b8da1990ec) ) |
| 1990 | 2000 | ROM_LOAD16_BYTE( "14483", 0x100000, 0x80000, CRC(f3eb51a0) SHA1(6904830ff5e7aa5f016e115572fb6da678896ede) ) |
| 1991 | 2001 | ROM_END |
| r1490 | r1491 | |
| 2027 | 2037 | ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) ) |
| 2028 | 2038 | ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) ) |
| 2029 | 2039 | |
| 2030 | ROM_REGION16_BE( 0x | |
| 2040 | ROM_REGION16_BE( 0x400000, REGION_USER1, 0) | |
| 2031 | 2041 | ROM_LOAD16_BYTE( "mpr-13188-h.2", 0x000000, 0x80000, CRC(d3802294) SHA1(7608e71e8ef398ac24dbf851994253bca5ace625) ) |
| 2032 | 2042 | ROM_LOAD16_BYTE( "mpr-13187-h.1", 0x000001, 0x80000, CRC(e3d8c5f7) SHA1(5b1e8646debee2f2ef272ddd3320b0a17192fbbe) ) |
| 2033 | 2043 | ROM_LOAD16_BYTE( "mpr-13190.4", 0x100000, 0x40000, CRC(0b4df388) SHA1(340478bba82069ab745d6d8703e6801411fd2fc4) ) |
| r1490 | r1491 | |
| 2044 | 2054 | ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) ) |
| 2045 | 2055 | ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) ) |
| 2046 | 2056 | |
| 2047 | ROM_REGION16_BE( 0x | |
| 2057 | ROM_REGION16_BE( 0x400000, REGION_USER1, 0) | |
| 2048 | 2058 | ROM_LOAD16_BYTE( "mpr-13188-h.2", 0x000000, 0x80000, CRC(d3802294) SHA1(7608e71e8ef398ac24dbf851994253bca5ace625) ) |
| 2049 | 2059 | ROM_LOAD16_BYTE( "mpr-13187-h.1", 0x000001, 0x80000, CRC(e3d8c5f7) SHA1(5b1e8646debee2f2ef272ddd3320b0a17192fbbe) ) |
| 2050 | 2060 | ROM_LOAD16_BYTE( "mpr-13190.4", 0x100000, 0x40000, CRC(0b4df388) SHA1(340478bba82069ab745d6d8703e6801411fd2fc4) ) |
| r1490 | r1491 | |
| 2217 | 2227 | ROM_LOAD16_BYTE( "epr13948.bin", 0x000000, 0x20000, CRC(d6a031c8) SHA1(45b7e3cd2c7412e24f547cd4185166199d3938d5) ) |
| 2218 | 2228 | ROM_LOAD16_BYTE( "epr13947.bin", 0x000001, 0x20000, CRC(7e3cff5e) SHA1(ff8cb776d2491796feeb8892c7e644e590438945) ) |
| 2219 | 2229 | |
| 2220 | ROM_REGION16_BE( 0x | |
| 2230 | ROM_REGION16_BE( 0x400000, REGION_USER1, 0) | |
| 2221 | 2231 | ROM_LOAD16_BYTE( "epr-15345.2", 0x000000, 0x80000, CRC(d9e120c2) SHA1(b18b76733078d8534c6f0d8950632ab51e6a10ab) ) |
| 2222 | 2232 | ROM_LOAD16_BYTE( "epr-15344.1", 0x000001, 0x80000, CRC(8f8b9f74) SHA1(de6b923118bea60197547ad016cb5d5e1a8f372b) ) |
| 2223 | 2233 | ROM_LOAD16_BYTE( "mpr-14097-t.4",0x100000, 0x80000, CRC(4bd74cae) SHA1(5aa90bd5d2b8e2338ef0fe41d1f794e8d51321e1) ) |
| r1490 | r1491 | |
| 2229 | 2239 | ROM_LOAD16_BYTE( "epr13948.bin", 0x000000, 0x20000, CRC(d6a031c8) SHA1(45b7e3cd2c7412e24f547cd4185166199d3938d5) ) |
| 2230 | 2240 | ROM_LOAD16_BYTE( "epr13947.bin", 0x000001, 0x20000, CRC(7e3cff5e) SHA1(ff8cb776d2491796feeb8892c7e644e590438945) ) |
| 2231 | 2241 | |
| 2232 | ROM_REGION16_BE( 0x | |
| 2242 | ROM_REGION16_BE( 0x400000, REGION_USER1, 0) | |
| 2233 | 2243 | ROM_LOAD16_BYTE( "epr-14095a.2", 0x000000, 0x80000, CRC(88d184e9) SHA1(519F3A22E1619DE9D5F13A45B85EBD249EBFA979) ) |
| 2234 | 2244 | ROM_LOAD16_BYTE( "epr-14094a.1", 0x000001, 0x80000, CRC(7dd2b7d4) SHA1(C7EAF9E2700E0C55F7E867F5CD3FFAA5AAE97956) ) |
| 2235 | 2245 | ROM_LOAD16_BYTE( "mpr-14097-t.4",0x100000, 0x80000, CRC(4bd74cae) SHA1(5aa90bd5d2b8e2338ef0fe41d1f794e8d51321e1) ) |
| r1490 | r1491 | |
|---|---|---|
| 1522 | 1522 | |
| 1523 | 1523 | static const gfx_layout RoadTileLayout = |
| 1524 | 1524 | { |
| 1525 | ROAD_TILE_SIZE, | |
| 1526 | ROAD_TILE_SIZE, | |
| 1525 | ROAD_TILE_SIZE, ROAD_TILE_SIZE, | |
| 1527 | 1526 | ROAD_TILE_COUNT_MAX, |
| 1528 | 1527 | 2, |
| 1529 | { | |
| 1530 | 1528 | #ifndef LSB_FIRST |
| 1531 | | |
| 1529 | { 0,8 }, | |
| 1532 | 1530 | #else |
| 1533 | | |
| 1531 | { 8,0 }, | |
| 1534 | 1532 | #endif |
| 1535 | }, | |
| 1536 | 1533 | {/* x offset */ |
| 1537 | 1534 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, |
| 1538 | 1535 | 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 |
| r1490 | r1491 | |
|---|---|---|
| 3107 | 3107 | |
| 3108 | 3108 | static DRIVER_INIT( aliensy5 ) |
| 3109 | 3109 | { |
| 3110 | ||
| 3110 | | |
| 3111 | 3111 | system16a_generic_init(machine); |
| 3112 | ||
| 3112 | | |
| 3113 | 3113 | } |
| 3114 | 3114 | |
| 3115 | 3115 | static DRIVER_INIT( bodyslam ) |
| r1490 | r1491 | |
| 3182 | 3182 | GAME( 1986, quart2, quartet, system16a, quart2, generic_16a, ROT0, "Sega", "Quartet 2 (unprotected)", 0 ) |
| 3183 | 3183 | |
| 3184 | 3184 | /* System 16A */ |
| 3185 | GAME( 1987, aliensy5, aliensyn, system16a, aliensyn, aliensy5, ROT0, "Sega", "Alien Syndrome (set 5, System 16A, FD1089B 317-0037)", | |
| 3185 | GAME( 1987, aliensy5, aliensyn, system16a, aliensyn, aliensy5, ROT0, "Sega", "Alien Syndrome (set 5, System 16A, FD1089B 317-0037)", 0 | |
| 3186 | 3186 | GAME( 1987, aliensy2, aliensyn, system16a, aliensyn, aliensy1, ROT0, "Sega", "Alien Syndrome (set 2, System 16A, FD1089A 317-0033)", 0 ) |
| 3187 | 3187 | GAME( 1987, aliensy1, aliensyn, system16a, aliensy1, aliensy1, ROT0, "Sega", "Alien Syndrome (set 1, System 16A, FD1089A 317-0033)", 0 ) |
| 3188 | 3188 | GAME( 1988, aceattaa, aceattac, system16a , aceattaa, aceattaa, ROT270, "Sega", "Ace Attacker (Japan, System 16A, FD1094 317-0060)", 0 ) |
| r1490 | r1491 | |
|---|---|---|
| 85 | 85 | #include "cpu/z80/z80.h" |
| 86 | 86 | #include "sound/2610intf.h" |
| 87 | 87 | |
| 88 | #include "neogeo.lh" | |
| 88 | 89 | |
| 90 | ||
| 89 | 91 | #define LOG_VIDEO_SYSTEM (0) |
| 90 | 92 | #define LOG_CPU_COMM (0) |
| 91 | 93 | #define LOG_MAIN_CPU_BANKING (0) |
| r1490 | r1491 | |
| 99 | 101 | * |
| 100 | 102 | *************************************/ |
| 101 | 103 | |
| 102 | static UINT8 display_po | |
| 104 | static UINT8 display_po | |
| 103 | 105 | static UINT32 display_counter; |
| 104 | 106 | static UINT32 vblank_interrupt_pending; |
| 105 | 107 | static UINT32 display_position_interrupt_pending; |
| r1490 | r1491 | |
| 167 | 169 | } |
| 168 | 170 | |
| 169 | 171 | |
| 170 | void neogeo_set_display_po | |
| 172 | void neogeo_set_display_po | |
| 171 | 173 | { |
| 172 | display_po | |
| 174 | display_po | |
| 173 | 175 | } |
| 174 | 176 | |
| 175 | 177 | |
| r1490 | r1491 | |
| 187 | 189 | |
| 188 | 190 | if (LOG_VIDEO_SYSTEM) logerror("PC %06x: set_display_counter %08x\n", activecpu_get_pc(), display_counter); |
| 189 | 191 | |
| 190 | if (display_po | |
| 192 | if (display_po | |
| 191 | 193 | { |
| 192 | 194 | if (LOG_VIDEO_SYSTEM) logerror("AUTOLOAD_RELATIVE "); |
| 193 | 195 | adjust_display_position_interrupt_timer(); |
| r1490 | r1491 | |
| 225 | 227 | static TIMER_CALLBACK( display_position_interrupt_callback ) |
| 226 | 228 | { |
| 227 | 229 | if (LOG_VIDEO_SYSTEM) logerror("--- Scanline @ %d,%d\n", video_screen_get_vpos(0), video_screen_get_hpos(0)); |
| 228 | if (display_po | |
| 230 | if (display_po | |
| 229 | 231 | { |
| 230 | 232 | if (LOG_VIDEO_SYSTEM) logerror("*** Scanline interrupt (IRQ2) *** y: %02x x: %02x\n", video_screen_get_vpos(0), video_screen_get_hpos(0)); |
| 231 | 233 | display_position_interrupt_pending = 1; |
| r1490 | r1491 | |
| 233 | 235 | update_interrupts(); |
| 234 | 236 | } |
| 235 | 237 | |
| 236 | if (display_po | |
| 238 | if (display_po | |
| 237 | 239 | { |
| 238 | 240 | if (LOG_VIDEO_SYSTEM) logerror("AUTOLOAD_REPEAT "); |
| 239 | 241 | adjust_display_position_interrupt_timer(); |
| r1490 | r1491 | |
| 243 | 245 | |
| 244 | 246 | static TIMER_CALLBACK( display_position_vblank_callback ) |
| 245 | 247 | { |
| 246 | if (display_po | |
| 248 | if (display_po | |
| 247 | 249 | { |
| 248 | 250 | if (LOG_VIDEO_SYSTEM) logerror("AUTOLOAD_VBLANK "); |
| 249 | 251 | adjust_display_position_interrupt_timer(); |
| r1490 | r1491 | |
| 964 | 966 | irq3_pending = 1; |
| 965 | 967 | |
| 966 | 968 | /* register state save */ |
| 967 | state_save_register_global(display_po | |
| 969 | state_save_register_global(display_po | |
| 968 | 970 | state_save_register_global(display_counter); |
| 969 | 971 | state_save_register_global(vblank_interrupt_pending); |
| 970 | 972 | state_save_register_global(display_position_interrupt_pending); |
| r1490 | r1491 | |
| 1242 | 1244 | MDRV_VIDEO_START(neogeo) |
| 1243 | 1245 | MDRV_VIDEO_RESET(neogeo) |
| 1244 | 1246 | MDRV_VIDEO_UPDATE(neogeo) |
| 1247 | MDRV_DEFAULT_LAYOUT(layout_neogeo) | |
| 1245 | 1248 | |
| 1246 | 1249 | MDRV_SCREEN_ADD("main", 0) |
| 1247 | 1250 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| r1490 | r1491 | |
| 1258 | 1261 | MDRV_SOUND_ROUTE(2, "right", 1.0) |
| 1259 | 1262 | MACHINE_DRIVER_END |
| 1260 | 1263 | |
| 1261 | ||
| 1262 | /* | |
| 1263 | * A large number of the software produced for the | |
| 1264 | * system expects the visible display width to be 304 pixels | |
| 1265 | * and displays garbage in the left and right most 8 pixel | |
| 1266 | * columns. This machine driver sets a smaller visible area | |
| 1267 | * to hide the garbage. | |
| 1268 | * | |
| 1269 | * I don't like to do this, but I don't like the idea of the | |
| 1270 | * bug reports we'd get if we didn't | |
| 1271 | */ | |
| 1272 | ||
| 1273 | static MACHINE_DRIVER_START( neogeo_s ) | |
| 1274 | ||
| 1275 | MDRV_IMPORT_FROM(neogeo) | |
| 1276 | ||
| 1277 | MDRV_SCREEN_MODIFY("main") | |
| 1278 | MDRV_SCREEN_DEFAULT_POSITION((float)NEOGEO_HTOTAL / (NEOGEO_HTOTAL - 20), 0.0, 1.0, 0.0) | |
| 1279 | ||
| 1280 | MACHINE_DRIVER_END | |
| 1281 | ||
| 1282 | ||
| 1283 | ||
| 1284 | 1264 | /************************************* |
| 1285 | 1265 | * |
| 1286 | 1266 | * Driver initalization |
| r1490 | r1491 | |
|---|---|---|
| 452 | 452 | static DRIVER_INIT( thunderj ) |
| 453 | 453 | { |
| 454 | 454 | atarigen_eeprom_default = NULL; |
| 455 | atarijsa_init( | |
| 455 | atarijsa_init(machine, 2, 0x0002); | |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 |
| r1490 | r1491 | |
|---|---|---|
| 51 | 51 | #include "sound/sn76496.h" |
| 52 | 52 | |
| 53 | 53 | |
| 54 | extern READ8_HANDLER( ladybug_IN0_r ); | |
| 55 | extern READ8_HANDLER( ladybug_IN1_r ); | |
| 56 | extern INTERRUPT_GEN( ladybug_interrupt ); | |
| 54 | WRITE8_HANDLER( ladybug_videoram_w ); | |
| 55 | WRITE8_HANDLER( ladybug_colorram_w ); | |
| 56 | WRITE8_HANDLER( ladybug_flipscreen_w ); | |
| 57 | 57 | |
| 58 | extern WRITE8_HANDLER( ladybug_videoram_w ); | |
| 59 | extern WRITE8_HANDLER( ladybug_colorram_w ); | |
| 60 | extern WRITE8_HANDLER( ladybug_flipscreen_w ); | |
| 58 | PALETTE_INIT( ladybug ); | |
| 59 | VIDEO_START( ladybug ); | |
| 60 | VIDEO_UPDATE( ladybug ); | |
| 61 | 61 | |
| 62 | extern PALETTE_INIT( ladybug ); | |
| 63 | extern VIDEO_START( ladybug ); | |
| 64 | extern VIDEO_UPDATE( ladybug ); | |
| 62 | PALETTE_INIT( sraider ); | |
| 63 | VIDEO_START( sraider ); | |
| 64 | VIDEO_UPDATE( sraider ); | |
| 65 | VIDEO_EOF( sraider ); | |
| 66 | WRITE8_HANDLER( sraider_grid_color_w ); | |
| 67 | WRITE8_HANDLER( sraider_grid_data_w ); | |
| 65 | 68 | |
| 66 | extern PALETTE_INIT( sraider ); | |
| 67 | extern VIDEO_START( sraider ); | |
| 68 | extern VIDEO_UPDATE( sraider ); | |
| 69 | extern VIDEO_EOF( sraider ); | |
| 70 | extern WRITE8_HANDLER( sraider_grid_color_w ); | |
| 71 | extern WRITE8_HANDLER( sraider_grid_data_w ); | |
| 69 | READ8_HANDLER( sraider_8005_r ); | |
| 70 | WRITE8_HANDLER( sraider_sound_low_w ); | |
| 71 | WRITE8_HANDLER( sraider_sound_high_w ); | |
| 72 | READ8_HANDLER( sraider_sound_low_r ); | |
| 73 | READ8_HANDLER( sraider_sound_high_r ); | |
| 74 | WRITE8_HANDLER( sraider_io_w ); | |
| 75 | WRITE8_HANDLER( sraider_misc_w ); | |
| 72 | 76 | |
| 73 | extern READ8_HANDLER( sraider_8005_r ); | |
| 74 | extern WRITE8_HANDLER( sraider_sound_low_w ); | |
| 75 | extern WRITE8_HANDLER( sraider_sound_high_w ); | |
| 76 | extern READ8_HANDLER( sraider_sound_low_r ); | |
| 77 | extern READ8_HANDLER( sraider_sound_high_r ); | |
| 78 | extern WRITE8_HANDLER( sraider_io_w ); | |
| 79 | extern WRITE8_HANDLER( sraider_misc_w ); | |
| 80 | ||
| 81 | 77 | //extern UINT8 sraider_grid_status; |
| 82 | 78 | //extern UINT8 sraider_0x30, sraider_0x38; |
| 83 | 79 | |
| r1490 | r1491 | |
| 111 | 107 | slots. Left slot generates a NMI, Right slot an IRQ. |
| 112 | 108 | |
| 113 | 109 | ***************************************************************************/ |
| 114 | INTERRUPT_GEN( ladybug_interrupt ) | |
| 110 | static INTERRUPT_GEN( ladybug_interrupt ) | |
| 115 | 111 | { |
| 116 | 112 | if (readinputport(5) & 1) /* Left Coin */ |
| 117 | 113 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| r1490 | r1491 | |
| 119 | 115 | cpunum_set_input_line(0, 0, HOLD_LINE); |
| 120 | 116 | } |
| 121 | 117 | |
| 118 | ||
| 119 | #define LADYBUG_P1_CONTROL_PORT_TAG ("CONTP1") | |
| 120 | #define LADYBUG_P2_CONTROL_PORT_TAG ("CONTP2") | |
| 121 | ||
| 122 | static UINT32 ladybug_p1_control_r(void *param) | |
| 123 | { | |
| 124 | return readinputportbytag(LADYBUG_P1_CONTROL_PORT_TAG); | |
| 125 | } | |
| 126 | ||
| 127 | static UINT32 ladybug_p2_control_r(void *param) | |
| 128 | { | |
| 129 | UINT32 ret; | |
| 130 | ||
| 131 | /* upright cabinet only uses a single set of controls */ | |
| 132 | if (readinputportbytag("DSW0") & 0x20) | |
| 133 | ret = readinputportbytag(LADYBUG_P2_CONTROL_PORT_TAG); | |
| 134 | else | |
| 135 | ret = readinputportbytag(LADYBUG_P1_CONTROL_PORT_TAG); | |
| 136 | ||
| 137 | return ret; | |
| 138 | } | |
| 139 | ||
| 140 | ||
| 122 | 141 | static INPUT_PORTS_START( ladybug ) |
| 123 | 142 | PORT_START_TAG("IN0") |
| 124 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 125 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 126 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 127 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 128 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_UNUSED | |
| 143 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ladybug_p1_control_r, 0) | |
| 129 | 144 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 130 | 145 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 131 | 146 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) |
| 132 | 147 | |
| 133 | 148 | PORT_START_TAG("IN1") |
| 134 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 135 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 136 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 137 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 138 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 149 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ladybug_p2_control_r, 0) | |
| 139 | 150 | /* This should be connected to the 4V clock. I don't think the game uses it. */ |
| 140 | 151 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 141 | 152 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| r1490 | r1491 | |
| 208 | 219 | /* user releases the key. */ |
| 209 | 220 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) |
| 210 | 221 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) |
| 222 | ||
| 223 | PORT_START_TAG(LADYBUG_P1_CONTROL_PORT_TAG) | |
| 224 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 225 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 226 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 227 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 228 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_UNUSED | |
| 229 | ||
| 230 | PORT_START_TAG(LADYBUG_P2_CONTROL_PORT_TAG) | |
| 231 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 232 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 233 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 234 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 235 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_UNUSED PORT_COCKTAIL | |
| 211 | 236 | INPUT_PORTS_END |
| 212 | 237 | |
| 213 | 238 | static INPUT_PORTS_START( snapjack ) |
| r1490 | r1491 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | /* in machine */ |
| 88 | MACHINE_RESET( buggychl ); | |
| 88 | 89 | READ8_HANDLER( buggychl_68705_portA_r ); |
| 89 | 90 | WRITE8_HANDLER( buggychl_68705_portA_w ); |
| 90 | 91 | WRITE8_HANDLER( buggychl_68705_ddrA_w ); |
| r1490 | r1491 | |
| 452 | 453 | MDRV_GFXDECODE(buggychl) |
| 453 | 454 | MDRV_PALETTE_LENGTH(128+128) |
| 454 | 455 | |
| 456 | MDRV_MACHINE_RESET(buggychl) | |
| 457 | ||
| 455 | 458 | MDRV_PALETTE_INIT(buggychl) |
| 456 | 459 | MDRV_VIDEO_START(buggychl) |
| 457 | 460 | MDRV_VIDEO_UPDATE(buggychl) |
| r1490 | r1491 | |
|---|---|---|
| 189 | 189 | |
| 190 | 190 | static ADDRESS_MAP_START( common_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 191 | 191 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 192 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_R | |
| 192 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_R | |
| 193 | 193 | AM_RANGE(0x5000, 0x503f) AM_WRITE(exidy_sprite1_xpos_w) |
| 194 | 194 | AM_RANGE(0x5040, 0x507f) AM_WRITE(exidy_sprite1_ypos_w) |
| 195 | 195 | AM_RANGE(0x5080, 0x50bf) AM_WRITE(exidy_sprite2_xpos_w) |
| r1490 | r1491 | |
| 199 | 199 | AM_RANGE(0x5100, 0x5100) AM_MIRROR(0xfc) AM_WRITE(exidy_spriteno_w) |
| 200 | 200 | AM_RANGE(0x5101, 0x5101) AM_MIRROR(0xfc) AM_WRITE(exidy_sprite_enable_w) |
| 201 | 201 | AM_RANGE(0x5103, 0x5103) AM_MIRROR(0xfc) AM_READ(exidy_interrupt_r) |
| 202 | AM_RANGE(0x5210, 0x5212) AM_WRITE(exidy_color_ | |
| 202 | AM_RANGE(0x5210, 0x5212) AM_WRITE(MWA8_RAM) AM_BASE(&exidy_color_latch) | |
| 203 | 203 | AM_RANGE(0x5213, 0x5213) AM_READ_PORT("IN2") |
| 204 | 204 | ADDRESS_MAP_END |
| 205 | 205 | |
| 206 | 206 | |
| 207 | static ADDRESS_MAP_START( sidetrac_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 208 | AM_RANGE(0x0800, 0x3fff) AM_ROM | |
| 209 | AM_RANGE(0x4800, 0x4fff) AM_ROM AM_BASE(&exidy_characterram) | |
| 210 | AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w) | |
| 211 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) | |
| 212 | ADDRESS_MAP_END | |
| 213 | ||
| 214 | ||
| 207 | 215 | static ADDRESS_MAP_START( targ_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 208 | 216 | AM_RANGE(0x0800, 0x3fff) AM_ROM |
| 209 | AM_RANGE(0x4800, 0x4fff) AM_R | |
| 217 | AM_RANGE(0x4800, 0x4fff) AM_R | |
| 210 | 218 | AM_RANGE(0x5200, 0x5201) AM_WRITE(targ_sh_w) |
| 211 | 219 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(REGION_CPU1, 0x3f00) |
| 212 | 220 | ADDRESS_MAP_END |
| 213 | 221 | |
| 214 | 222 | |
| 215 | 223 | static ADDRESS_MAP_START( venture_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 216 | AM_RANGE(0x4800, 0x4fff) AM_R | |
| 224 | AM_RANGE(0x4800, 0x4fff) AM_R | |
| 217 | 225 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| 218 | 226 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 219 | 227 | ADDRESS_MAP_END |
| r1490 | r1491 | |
| 221 | 229 | |
| 222 | 230 | static ADDRESS_MAP_START( pepper2_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 223 | 231 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| 224 | AM_RANGE(0x6000, 0x6fff) AM_R | |
| 232 | AM_RANGE(0x6000, 0x6fff) AM_R | |
| 225 | 233 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 226 | 234 | ADDRESS_MAP_END |
| 227 | 235 | |
| r1490 | r1491 | |
| 234 | 242 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1) |
| 235 | 243 | AM_RANGE(0x5200, 0x520f) AM_READWRITE(pia_0_r, pia_0_w) |
| 236 | 244 | AM_RANGE(0x5213, 0x5217) AM_WRITE(MWA8_NOP) /* empty control lines on color/sound board */ |
| 237 | AM_RANGE(0x6000, 0x6fff) AM_R | |
| 245 | AM_RANGE(0x6000, 0x6fff) AM_R | |
| 238 | 246 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 239 | 247 | ADDRESS_MAP_END |
| 240 | 248 | |
| r1490 | r1491 | |
| 824 | 832 | * |
| 825 | 833 | *************************************/ |
| 826 | 834 | |
| 827 | static MACHINE_DRIVER_START( t | |
| 835 | static MACHINE_DRIVER_START( sidet | |
| 828 | 836 | |
| 829 | 837 | /* basic machine hardware */ |
| 830 | 838 | MDRV_CPU_ADD_TAG("main", M6502, EXIDY_CPU_CLOCK) |
| 831 | MDRV_CPU_PROGRAM_MAP(common_map,t | |
| 839 | MDRV_CPU_PROGRAM_MAP(common_map,sidet | |
| 832 | 840 | MDRV_CPU_VBLANK_INT(exidy_vblank_interrupt,1) |
| 833 | 841 | |
| 834 | 842 | /* video hardware */ |
| r1490 | r1491 | |
| 854 | 862 | MACHINE_DRIVER_END |
| 855 | 863 | |
| 856 | 864 | |
| 865 | static MACHINE_DRIVER_START( targ ) | |
| 866 | ||
| 867 | /* basic machine hardware */ | |
| 868 | MDRV_IMPORT_FROM(sidetrac) | |
| 869 | MDRV_CPU_MODIFY("main") | |
| 870 | MDRV_CPU_PROGRAM_MAP(common_map,targ_map) | |
| 871 | MACHINE_DRIVER_END | |
| 872 | ||
| 873 | ||
| 857 | 874 | static MACHINE_DRIVER_START( venture ) |
| 858 | 875 | |
| 859 | 876 | /* basic machine hardware */ |
| r1490 | r1491 | |
| 936 | 953 | ROM_LOAD( "stl8a-1", 0x2800, 0x0800, CRC(e41750ff) SHA1(3868a0d7e34a5118b39b31cff9e4fc839df541ff) ) |
| 937 | 954 | ROM_LOAD( "stl7a-2", 0x3000, 0x0800, CRC(57fb28dc) SHA1(6addd633d655d6a56b3e509d18e5f7c0ab2d0fbb) ) |
| 938 | 955 | ROM_LOAD( "stl6a-2", 0x3800, 0x0800, CRC(4226d469) SHA1(fd18b732b66082988b01e04adc2b1e5dae410c98) ) |
| 939 | ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* | |
| 956 | ROM_LOAD( "stl9c-1", 0x4800, 0x0400, CRC(08710a84) SHA1(4bff254a14af7c968656ccc85277d31ab5a8f0c4) ) /* PROM instead of RAM char generator */ | |
| 940 | 957 | |
| 941 | 958 | ROM_REGION( 0x0200, REGION_GFX1, ROMREGION_DISPOSE ) |
| 942 | 959 | ROM_LOAD( "stl11d", 0x0000, 0x0200, CRC(3bd1acc1) SHA1(06f900cb8f56cd4215c5fbf58a852426d390e0c1) ) |
| r1490 | r1491 | |
| 1356 | 1373 | exidy_color_latch[2] = 0xf8; |
| 1357 | 1374 | exidy_color_latch[1] = 0xdc; |
| 1358 | 1375 | exidy_color_latch[0] = 0xb8; |
| 1359 | ||
| 1360 | /* ROM in place of character RAM */ | |
| 1361 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4bff, 0, 0, MWA8_ROM); | |
| 1362 | 1376 | } |
| 1363 | 1377 | |
| 1364 | 1378 | |
| r1490 | r1491 | |
| 1449 | 1463 | |
| 1450 | 1464 | /* two 6116 character RAMs */ |
| 1451 | 1465 | exidy_characterram = memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MRA8_RAM); |
| 1452 | exidy_characterram = memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, | |
| 1466 | exidy_characterram = memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x6000, 0x6fff, 0, 0, MWA8 | |
| 1453 | 1467 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MRA8_NOP); |
| 1454 | 1468 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x4fff, 0, 0, MWA8_NOP); |
| 1455 | 1469 | } |
| r1490 | r1491 | |
| 1471 | 1485 | * |
| 1472 | 1486 | *************************************/ |
| 1473 | 1487 | |
| 1474 | GAME( 1979, sidetrac, 0, targ, sidetrac, sidetrac, ROT0, "Exidy", "Side Trak", 0 ) | |
| 1475 | GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ", 0 ) | |
| 1476 | GAME( 1980, targc, targ, targ, targ, targ, ROT0, "Exidy", "Targ (cocktail?)", 0 ) | |
| 1477 | GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 ) | |
| 1478 | GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 ) | |
| 1479 | GAME( 1980, rallys, spectar, targ, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 ) | |
| 1480 | GAME( 1980, phantoma, spectar, targ, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 ) | |
| 1488 | GAME( 1979, sidetrac, 0, sidetrac, sidetrac, sidetrac, ROT0, "Exidy", "Side Trak", 0 ) | |
| 1489 | GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ", 0 ) | |
| 1490 | GAME( 1980, targc, targ, targ, targ, targ, ROT0, "Exidy", "Targ (cocktail?)", 0 ) | |
| 1491 | GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)", 0 ) | |
| 1492 | GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)", 0 ) | |
| 1493 | GAME( 1980, rallys, spectar, targ, rallys, rallys, ROT0, "Novar", "Rallys (bootleg?)", 0 ) | |
| 1494 | GAME( 1980, phantoma, spectar, targ, phantoma, phantoma, ROT0, "Jeutel","Phantomas", 0 ) | |
| 1481 | 1495 | |
| 1482 | GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", 0 ) | |
| 1483 | GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", 0 ) | |
| 1484 | GAME( 1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)", 0 ) | |
| 1485 | GAME( 1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)", 0 ) | |
| 1486 | GAME( 1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)", 0 ) | |
| 1487 | GAME( 1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)", 0 ) | |
| 1488 | GAME( 1982, teetert, 0, teetert, teetert, teetert, ROT0, "Exidy", "Teeter Torture (prototype)", 0 ) | |
| 1489 | GAME( 1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II", 0 ) | |
| 1490 | GAME( 1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat", 0 ) | |
| 1491 | GAME( 1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "FAX", 0 ) | |
| 1492 | GAME( 1983, fax2, fax, fax, fax, fax, ROT0, "Exidy", "FAX 2", 0 ) | |
| 1496 | GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", 0 ) | |
| 1497 | GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", 0 ) | |
| 1498 | GAME( 1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)", 0 ) | |
| 1499 | GAME( 1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)", 0 ) | |
| 1500 | GAME( 1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)", 0 ) | |
| 1501 | GAME( 1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)", 0 ) | |
| 1502 | GAME( 1982, teetert, 0, teetert, teetert, teetert, ROT0, "Exidy", "Teeter Torture (prototype)", 0 ) | |
| 1503 | GAME( 1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II", 0 ) | |
| 1504 | GAME( 1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat", 0 ) | |
| 1505 | GAME( 1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "FAX", 0 ) | |
| 1506 | GAME( 1983, fax2, fax, fax, fax, fax, ROT0, "Exidy", "FAX 2", 0 ) |
| r1490 | r1491 | |
|---|---|---|
| 86 | 86 | |
| 87 | 87 | ***************************************************************************/ |
| 88 | 88 | |
| 89 | /*************************************************************************** | |
| 90 | Notes (couriersud) | |
| 91 | ||
| 92 | From http://www.crazykong.com/tech/IremBoardList.txt | |
| 93 | ||
| 94 | skychut: M-11 | |
| 95 | andromed: N/A | |
| 96 | ipminvad: N/A | |
| 97 | spacbeam: not listed | |
| 98 | headon: not listed | |
| 99 | greenber: N/A | |
| 100 | ||
| 101 | M10-Board: Has SN76477 | |
| 102 | ||
| 103 | ***************************************************************************/ | |
| 89 | 104 | #include "driver.h" |
| 105 | #include "sound/samples.h" | |
| 90 | 106 | |
| 91 | ||
| 107 | # | |
| 92 | 108 | |
| 93 | VIDEO_UPDATE( skychut ); | |
| 94 | VIDEO_UPDATE( iremm15 ); | |
| 95 | WRITE8_HANDLER( skychut_colorram_w ); | |
| 96 | WRITE8_HANDLER( skychut_ctrl_w ); | |
| 109 | /************************************* | |
| 110 | * | |
| 111 | * Defines | |
| 112 | * | |
| 113 | *************************************/ | |
| 97 | 114 | |
| 98 | ||
| 115 | #define DEBUG (0) | |
| 99 | 116 | |
| 117 | /************************************* | |
| 118 | * | |
| 119 | * Initialization | |
| 120 | * | |
| 121 | *************************************/ | |
| 100 | 122 | |
| 101 | 123 | static PALETTE_INIT( skychut ) |
| 102 | 124 | { |
| r1490 | r1491 | |
| 118 | 140 | } |
| 119 | 141 | } |
| 120 | 142 | |
| 143 | static MACHINE_RESET( irem ) | |
| 144 | { | |
| 145 | irem_state *state = Machine->driver_data; | |
| 121 | 146 | |
| 122 | static ADDRESS_MAP_START( skychut_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 123 | AM_RANGE(0x0000, 0x02ff) AM_READ(MRA8_RAM) /* scratch ram */ | |
| 124 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) | |
| 125 | AM_RANGE(0x4000, 0x43ff) AM_READ(MRA8_RAM) | |
| 126 | AM_RANGE(0x4800, 0x4bff) AM_READ(MRA8_RAM) /* Foreground colour */ | |
| 127 | AM_RANGE(0x5000, 0x53ff) AM_READ(MRA8_RAM) /* BKgrnd colour ??? */ | |
| 147 | state_save_register_global(state->bottomline); | |
| 148 | state_save_register_global(state->flip); | |
| 149 | } | |
| 150 | ||
| 151 | /************************************* | |
| 152 | * | |
| 153 | * I/O handling | |
| 154 | * | |
| 155 | *************************************/ | |
| 156 | ||
| 157 | /* | |
| 158 | * M10 Ctrl Port | |
| 159 | * | |
| 160 | * 76543210 | |
| 161 | * ======== | |
| 162 | * e------- ACTIVE LOW Demo mode | |
| 163 | * -?------ ???? | |
| 164 | * --b----- ACTIVE LOW Bottom line | |
| 165 | * ---f---- ACTIVE LOW Flip screen | |
| 166 | * ----u--- ACTIVE LOW Ufo sound enable (SN76477) | |
| 167 | * -----sss Sound #sss start | |
| 168 | * 0x01: MISSILE | |
| 169 | * 0x02: EXPLOSION | |
| 170 | * 0x03: INVADER HIT | |
| 171 | * 0x04: BONUS BASE | |
| 172 | * 0x05: FLEET MOVE | |
| 173 | * 0x06: SAUCER HIT | |
| 174 | */ | |
| 175 | ||
| 176 | WRITE8_HANDLER( iremm10_ctrl_w ) | |
| 177 | { | |
| 178 | irem_state *state = Machine->driver_data; | |
| 179 | ||
| 180 | #if DEBUG | |
| 181 | if (data & 0x40) | |
| 182 | popmessage("ctrl: %02x",data); | |
| 183 | #endif | |
| 184 | ||
| 185 | /* I have NO IDEA if this is correct or not */ | |
| 186 | state->bottomline = ~data & 0x20; | |
| 187 | ||
| 188 | if (readinputportbytag("CAB") & 0x01) | |
| 189 | state->flip = ~data & 0x10; | |
| 190 | ||
| 191 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 192 | sound_global_enable(~data & 0x80); | |
| 193 | ||
| 194 | /* sound command in lower 4 bytes */ | |
| 195 | switch (data & 0x07) | |
| 196 | { | |
| 197 | case 0x00: | |
| 198 | /* no sound mapped */ | |
| 199 | break; | |
| 200 | case 0x01: | |
| 201 | /* MISSILE sound */ | |
| 202 | sample_start_n(0, 0, 0, 0); | |
| 203 | break; | |
| 204 | case 0x02: | |
| 205 | /* EXPLOSION sound */ | |
| 206 | sample_start_n(0, 1, 1, 0); | |
| 207 | break; | |
| 208 | case 0x03: | |
| 209 | /* INVADER HIT sound */ | |
| 210 | sample_start_n(0, 2, 2, 0); | |
| 211 | break; | |
| 212 | case 0x04: | |
| 213 | /* BONUS BASE sound */ | |
| 214 | sample_start_n(0, 3, 8, 0); | |
| 215 | break; | |
| 216 | case 0x05: | |
| 217 | /* FLEET MOVE sound */ | |
| 218 | sample_start_n(0, 3, 3, 0); | |
| 219 | break; | |
| 220 | case 0x06: | |
| 221 | /* SAUCER HIT SOUND */ | |
| 222 | sample_start_n(0, 2, 7, 0); | |
| 223 | break; | |
| 224 | default: | |
| 225 | popmessage("Unknown sound M10: %02x\n", data & 0x07); | |
| 226 | break; | |
| 227 | } | |
| 228 | /* UFO SOUND */ | |
| 229 | if (data & 0x08) | |
| 230 | sample_stop_n(0, 4); | |
| 231 | else | |
| 232 | sample_start_n(0, 4, 9, 1); | |
| 233 | ||
| 234 | } | |
| 235 | ||
| 236 | /* | |
| 237 | * M11 Ctrl Port | |
| 238 | * | |
| 239 | * 76543210 | |
| 240 | * ======== | |
| 241 | * e------- ACTIVE LOW Demo mode | |
| 242 | * -?------ ???? | |
| 243 | * --b----- ACTIVE LOW Bottom line | |
| 244 | * ---f---- ACTIVE LOW Flip screen | |
| 245 | * ----??-- ???? | |
| 246 | * ------cc Credits indicator ? | |
| 247 | * 0x03: 0 Credits | |
| 248 | * 0x02: 1 Credit | |
| 249 | * 0x00: 2 or more credits | |
| 250 | * Will be updated only in attract mode | |
| 251 | */ | |
| 252 | ||
| 253 | WRITE8_HANDLER( iremm11_ctrl_w ) | |
| 254 | { | |
| 255 | irem_state *state = Machine->driver_data; | |
| 256 | ||
| 257 | #if DEBUG | |
| 258 | if (data & 0x4C) | |
| 259 | popmessage("M11 ctrl: %02x",data); | |
| 260 | #endif | |
| 261 | ||
| 262 | state->bottomline = ~data & 0x20; | |
| 263 | ||
| 264 | if (readinputportbytag("CAB") & 0x01) | |
| 265 | state->flip = ~data & 0x10; | |
| 266 | ||
| 267 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 268 | sound_global_enable(~data & 0x80); | |
| 269 | } | |
| 270 | ||
| 271 | /* | |
| 272 | * M15 Ctrl Port | |
| 273 | * | |
| 274 | * 76543210 | |
| 275 | * ======== | |
| 276 | * ????---- ???? | |
| 277 | * ----e--- ACTIVE LOW Demo mode | |
| 278 | * -----f-- ACTIVE LOW Flip screen | |
| 279 | * ------cc Credits indicator ? | |
| 280 | * 0x03: 0 Credits | |
| 281 | * 0x02: 1 Credit | |
| 282 | * 0x00: 2 or more credits | |
| 283 | * Will be updated only in attract mode | |
| 284 | */ | |
| 285 | ||
| 286 | WRITE8_HANDLER( iremm15_ctrl_w ) | |
| 287 | { | |
| 288 | irem_state *state = Machine->driver_data; | |
| 289 | ||
| 290 | #if DEBUG | |
| 291 | if (data & 0xF0) | |
| 292 | popmessage("M15 ctrl: %02x",data); | |
| 293 | #endif | |
| 294 | if (readinputportbytag("CAB") & 0x01) | |
| 295 | state->flip = ~data & 0x04; | |
| 296 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 297 | sound_global_enable(~data & 0x08); | |
| 298 | } | |
| 299 | ||
| 300 | ||
| 301 | /* | |
| 302 | * M10 A500 | |
| 303 | * | |
| 304 | * 76543210 | |
| 305 | * ======== | |
| 306 | * ??????-- Always 111111 | |
| 307 | * ------cc Credits indicator ? | |
| 308 | * 0x03: 0 Credits | |
| 309 | * 0x02: 1 Credit | |
| 310 | * 0x00: 2 or more credits | |
| 311 | * Will be updated only in attract mode | |
| 312 | */ | |
| 313 | ||
| 314 | WRITE8_HANDLER( iremm10_a500_w ) | |
| 315 | { | |
| 316 | #if DEBUG | |
| 317 | if (data & 0xFC) | |
| 318 | popmessage("a500: %02x",data); | |
| 319 | #endif | |
| 320 | } | |
| 321 | ||
| 322 | WRITE8_HANDLER( iremm11_a100_w ) | |
| 323 | { | |
| 324 | static int last = 0x00; | |
| 325 | int raising_bits = data & ~last; | |
| 326 | //int falling_bits = ~data & last; | |
| 327 | ||
| 328 | // should a falling bit stop a sample? | |
| 329 | // This port is written to about 20x per vblank | |
| 330 | #if DEBUG | |
| 331 | if ((last & 0xE8) != (data & 0xE8)) | |
| 332 | popmessage("A100: %02x\n", data); | |
| 333 | #endif | |
| 334 | last = data; | |
| 335 | // audio control! | |
| 336 | /* MISSILE sound */ | |
| 337 | if (raising_bits & 0x01) | |
| 338 | sample_start_n(0, 0, 0, 0); | |
| 339 | ||
| 340 | /* EXPLOSION sound */ | |
| 341 | if (raising_bits & 0x02) | |
| 342 | sample_start_n(0, 1, 1, 0); | |
| 343 | ||
| 344 | /* Rapidly falling parachute */ | |
| 345 | if (raising_bits & 0x04) | |
| 346 | sample_start_n(0, 3, 8, 0); | |
| 347 | ||
| 348 | /* Background sound ? */ | |
| 349 | if (data & 0x10) | |
| 350 | sample_start_n(0, 4, 9, 1); | |
| 351 | else | |
| 352 | sample_stop_n(0, 4); | |
| 353 | ||
| 354 | } | |
| 355 | ||
| 356 | WRITE8_HANDLER( iremm15_a100_w ) | |
| 357 | { | |
| 358 | static int last = 0x00; | |
| 359 | //int raising_bits = data & ~last; | |
| 360 | int falling_bits = ~data & last; | |
| 361 | ||
| 362 | // should a falling bit stop a sample? | |
| 363 | // Bit 4 is used | |
| 364 | // Bit 5 is used 0xef | |
| 365 | // Bit 7 is used | |
| 366 | ||
| 367 | // headoni | |
| 368 | // 0x01: Acceleration | |
| 369 | // 0x04: background (motor) ? | |
| 370 | // 0x08: explosion | |
| 371 | // 0x10: player changes lane | |
| 372 | // 0x20: computer car changes lane | |
| 373 | // 0x40: dot | |
| 374 | ||
| 375 | #if DEBUG | |
| 376 | if ((last & 0x82) != (data & 0x82)) | |
| 377 | popmessage("A100: %02x\n", data); | |
| 378 | #endif | |
| 379 | /* DOT sound */ | |
| 380 | if (falling_bits & 0x40) | |
| 381 | sample_start_n(0, 0, 0, 0); | |
| 382 | #if 0 | |
| 383 | if (raising_bits & 0x40) | |
| 384 | sample_stop_n(0, 0); | |
| 385 | #endif | |
| 386 | ||
| 387 | /* EXPLOSION sound */ | |
| 388 | if (falling_bits & 0x08) | |
| 389 | sample_start_n(0, 1, 1, 0); | |
| 390 | #if 0 | |
| 391 | if (raising_bits & 0x08) | |
| 392 | sample_stop_n(0, 1); | |
| 393 | #endif | |
| 394 | ||
| 395 | /* player changes lane */ | |
| 396 | if (falling_bits & 0x10) | |
| 397 | sample_start_n(0, 3, 3, 0); | |
| 398 | #if 0 | |
| 399 | if (raising_bits & 0x10) | |
| 400 | sample_stop_n(0, 3); | |
| 401 | #endif | |
| 402 | ||
| 403 | /* computer car changes lane */ | |
| 404 | if (falling_bits & 0x20) | |
| 405 | sample_start_n(0, 4, 4, 0); | |
| 406 | #if 0 | |
| 407 | if (raising_bits & 0x20) | |
| 408 | sample_stop_n(0, 4); | |
| 409 | #endif | |
| 410 | ||
| 411 | last = data; | |
| 412 | } | |
| 413 | ||
| 414 | READ8_HANDLER( iremm10_a700_r ) | |
| 415 | { | |
| 416 | //printf("rd:%d\n",video_screen_get_vpos(0)); | |
| 417 | cpunum_set_input_line(0, 0, CLEAR_LINE); | |
| 418 | return 0x00; | |
| 419 | } | |
| 420 | ||
| 421 | READ8_HANDLER( iremm11_a700_r ) | |
| 422 | { | |
| 423 | //printf("rd:%d\n",video_screen_get_vpos(0)); | |
| 424 | return 0x00; | |
| 425 | } | |
| 426 | ||
| 427 | /************************************* | |
| 428 | * | |
| 429 | * Interrupt handling | |
| 430 | * | |
| 431 | *************************************/ | |
| 432 | ||
| 433 | TIMER_CALLBACK( skychut_callback ) | |
| 434 | { | |
| 435 | if (param==0) | |
| 436 | { | |
| 437 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 438 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+16, 0), NULL, 1,skychut_callback); | |
| 439 | } | |
| 440 | if (param==1) | |
| 441 | { | |
| 442 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 443 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+24, 0), NULL, 2,skychut_callback); | |
| 444 | } | |
| 445 | if (param==-1) | |
| 446 | cpunum_set_input_line(0, 0, CLEAR_LINE); | |
| 447 | ||
| 448 | } | |
| 449 | ||
| 450 | INTERRUPT_GEN( iremm11_interrupt ) | |
| 451 | { | |
| 452 | if (readinputport(2) & 1) /* Left Coin */ | |
| 453 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 454 | else | |
| 455 | { | |
| 456 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 457 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBEND, 0), NULL, -1,skychut_callback); | |
| 458 | } | |
| 459 | } | |
| 460 | ||
| 461 | INTERRUPT_GEN( iremm10_interrupt ) | |
| 462 | { | |
| 463 | if (readinputport(2) & 1) /* Left Coin */ | |
| 464 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 465 | else | |
| 466 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 467 | } | |
| 468 | ||
| 469 | INTERRUPT_GEN( iremm15_interrupt ) | |
| 470 | { | |
| 471 | if (readinputport(2) & 1) /* Left Coin */ | |
| 472 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 473 | else | |
| 474 | { | |
| 475 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 476 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+1, 80), NULL, -1,skychut_callback); | |
| 477 | } | |
| 478 | } | |
| 479 | ||
| 480 | /************************************* | |
| 481 | * | |
| 482 | * Main CPU memory handlers | |
| 483 | * | |
| 484 | *************************************/ | |
| 485 | ||
| 486 | static ADDRESS_MAP_START( iremm10_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 487 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ | |
| 488 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) | |
| 489 | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 490 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 491 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ | |
| 128 | 492 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) |
| 129 | 493 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) |
| 130 | /* AM_RANGE(0xa700, 0xa700) AM_READ(input_port_3_r)*/ | |
| 494 | AM_RANGE(0xa400, 0xa400) AM_WRITE(iremm10_ctrl_w) /* line at bottom of screen?, sound, flip screen */ | |
| 495 | AM_RANGE(0xa500, 0xa500) AM_WRITE(iremm10_a500_w) /* ??? */ | |
| 496 | AM_RANGE(0xa700, 0xa700) AM_READ(iremm10_a700_r) | |
| 131 | 497 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ |
| 132 | 498 | ADDRESS_MAP_END |
| 133 | 499 | |
| 134 | ||
| 135 | static ADDRESS_MAP_START( skychut_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 136 | AM_RANGE(0x0000, 0x02ff) AM_WRITE(MWA8_RAM) AM_BASE(&memory) | |
| 137 | AM_RANGE(0x1000, 0x2fff) AM_WRITE(MWA8_ROM) | |
| 138 | AM_RANGE(0x4000, 0x43ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 139 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 140 | AM_RANGE(0x5000, 0x53ff) AM_WRITE(MWA8_RAM) AM_BASE(&iremm15_chargen) /* background ????? */ | |
| 141 | // AM_RANGE(0xa100, 0xa1ff) AM_WRITE(MWA8_RAM) /* Sound writes????? */ | |
| 142 | AM_RANGE(0xa400, 0xa400) AM_WRITE(skychut_ctrl_w) /* line at bottom of screen?, sound, flip screen */ | |
| 143 | AM_RANGE(0xfc00, 0xffff) AM_WRITE(MWA8_ROM) /* for the reset / interrupt vectors */ | |
| 500 | static ADDRESS_MAP_START( iremm11_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 501 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ | |
| 502 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) | |
| 503 | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 504 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 505 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ | |
| 506 | AM_RANGE(0xa100, 0xa100) AM_WRITE(iremm11_a100_w) /* sound writes ???? */ | |
| 507 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) | |
| 508 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) | |
| 509 | AM_RANGE(0xa400, 0xa400) AM_WRITE(iremm11_ctrl_w) /* line at bottom of screen?, sound, flip screen */ | |
| 510 | AM_RANGE(0xa700, 0xa700) AM_READ(iremm11_a700_r) | |
| 511 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ | |
| 144 | 512 | ADDRESS_MAP_END |
| 145 | 513 | |
| 146 | static ADDRESS_MAP_START( greenberet_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 147 | AM_RANGE(0x0000, 0x02ff) AM_READ(MRA8_RAM) /* scratch ram */ | |
| 148 | AM_RANGE(0x1000, 0x33ff) AM_READ(MRA8_ROM) | |
| 149 | AM_RANGE(0x4000, 0x43ff) AM_READ(MRA8_RAM) | |
| 150 | AM_RANGE(0x4800, 0x4bff) AM_READ(MRA8_RAM) /* Foreground colour */ | |
| 151 | AM_RANGE(0x5000, 0x57ff) AM_READ(MRA8_RAM) | |
| 514 | static ADDRESS_MAP_START( iremm15_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 515 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(irem_state, memory) /* scratch ram */ | |
| 516 | AM_RANGE(0x1000, 0x33ff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(irem_state, rom) | |
| 517 | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(MRA8_RAM, videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 518 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 519 | AM_RANGE(0x5000, 0x57ff) AM_READWRITE(MRA8_RAM, iremm15_chargen_w) AM_BASE_MEMBER(irem_state, chargen) /* background ????? */ | |
| 152 | 520 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_3_r) |
| 521 | AM_RANGE(0xa100, 0xa100) AM_WRITE(iremm15_a100_w) /* sound writes ???? */ | |
| 153 | 522 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) |
| 154 | 523 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) |
| 524 | AM_RANGE(0xa400, 0xa400) AM_WRITE(iremm15_ctrl_w) /* sound, flip screen */ | |
| 155 | 525 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ |
| 156 | 526 | ADDRESS_MAP_END |
| 157 | 527 | |
| 158 | static ADDRESS_MAP_START( greenberet_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 159 | AM_RANGE(0x0000, 0x02ff) AM_WRITE(MWA8_RAM) AM_BASE(&memory) | |
| 160 | AM_RANGE(0x1000, 0x33ff) AM_WRITE(MWA8_ROM) | |
| 161 | AM_RANGE(0x4000, 0x43ff) AM_WRITE(videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 162 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(skychut_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 163 | AM_RANGE(0x5000, 0x57ff) AM_WRITE(MWA8_RAM) AM_BASE(&iremm15_chargen) | |
| 164 | AM_RANGE(0xa100, 0xa1ff) AM_WRITE(MWA8_RAM) /* Sound writes????? */ | |
| 165 | AM_RANGE(0xa400, 0xa400) AM_WRITE(MWA8_NOP) /* sound, flip screen */ | |
| 166 | AM_RANGE(0xfc00, 0xffff) AM_WRITE(MWA8_ROM) /* for the reset / interrupt vectors */ | |
| 167 | ADDRESS_MAP_END | |
| 528 | /************************************* | |
| 529 | * | |
| 530 | * Port definitions | |
| 531 | * | |
| 532 | *************************************/ | |
| 168 | 533 | |
| 534 | #define CAB_PORTENV \ | |
| 535 | /* fake port for cabinet type */ \ | |
| 536 | PORT_START_TAG("CAB") \ | |
| 537 | PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) \ | |
| 538 | PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) \ | |
| 539 | PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) ) \ | |
| 540 | PORT_CONFNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) \ | |
| 541 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 542 | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) \ | |
| 543 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 169 | 544 | |
| 170 | static INTERRUPT_GEN( skychut_interrupt ) | |
| 171 | { | |
| 172 | if (readinputport(2) & 1) /* Left Coin */ | |
| 173 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 174 | else | |
| 175 | cpunum_set_input_line(0, 0, HOLD_LINE); | |
| 176 | } | |
| 177 | 545 | |
| 178 | ||
| 546 | ||
| 179 | 547 | PORT_START |
| 180 | 548 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 181 | 549 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1490 | r1491 | |
| 191 | 559 | PORT_DIPSETTING ( 0x00, "3" ) |
| 192 | 560 | PORT_DIPSETTING ( 0x01, "4" ) |
| 193 | 561 | PORT_DIPSETTING ( 0x02, "5" ) |
| 562 | PORT_DIPNAME( 0x04, 0x00, "Unknown 1" ) | |
| 563 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 564 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 565 | PORT_DIPNAME( 0x08, 0x00, "Unknown 2" ) | |
| 566 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 567 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 568 | PORT_DIPNAME( 0x10, 0x00, "Unknown 3" ) | |
| 569 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 570 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 571 | PORT_DIPNAME( 0x20, 0x00, "Unknown 4" ) | |
| 572 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 573 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 574 | PORT_DIPNAME( 0x40, 0x00, "Unknown 5" ) | |
| 575 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 576 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 577 | PORT_DIPNAME( 0x80, 0x00, "Unknown 6" ) | |
| 578 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 579 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 194 | 580 | |
| 195 | 581 | PORT_START /* FAKE */ |
| 196 | 582 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) |
| 583 | ||
| 584 | CAB_PORTENV | |
| 197 | 585 | INPUT_PORTS_END |
| 198 | 586 | |
| 199 | ||
| 587 | ||
| 200 | 588 | PORT_START |
| 201 | 589 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 202 | 590 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 203 | 591 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 592 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_COCKTAIL | |
| 593 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 204 | 594 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 595 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 596 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 597 | ||
| 598 | PORT_START /* IN1 */ | |
| 599 | PORT_DIPNAME(0x03, 0x00, DEF_STR( Lives ) ) | |
| 600 | PORT_DIPSETTING ( 0x00, "3" ) | |
| 601 | PORT_DIPSETTING ( 0x01, "4" ) | |
| 602 | PORT_DIPSETTING ( 0x02, "5" ) | |
| 603 | PORT_DIPNAME( 0x04, 0x00, "Capsules" ) | |
| 604 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 605 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) | |
| 606 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 607 | PORT_DIPSETTING( 0x00, "1500" ) | |
| 608 | PORT_DIPSETTING( 0x08, "1000" ) | |
| 609 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) ) | |
| 610 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 611 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 612 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) // Verified with debugger | |
| 613 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 614 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 615 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) | |
| 616 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 617 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 618 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 619 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 620 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 621 | ||
| 622 | PORT_START /* FAKE */ | |
| 623 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 624 | ||
| 625 | CAB_PORTENV | |
| 626 | INPUT_PORTS_END | |
| 627 | ||
| 628 | INPUT_PORTS_START( spacebeam ) | |
| 629 | PORT_START | |
| 630 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 631 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 632 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 633 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 205 | 634 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 206 | 635 | |
| 207 | 636 | PORT_START /* IN1 */ |
| r1490 | r1491 | |
| 226 | 655 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 227 | 656 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL |
| 228 | 657 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL |
| 658 | ||
| 659 | CAB_PORTENV | |
| 229 | 660 | INPUT_PORTS_END |
| 230 | 661 | |
| 231 | ||
| 662 | ||
| 232 | 663 | PORT_START |
| 233 | 664 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 234 | 665 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| r1490 | r1491 | |
| 261 | 692 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 262 | 693 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL |
| 263 | 694 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL |
| 695 | CAB_PORTENV | |
| 264 | 696 | INPUT_PORTS_END |
| 265 | 697 | |
| 266 | 698 | |
| 267 | 699 | |
| 700 | /************************************* | |
| 701 | * | |
| 702 | * Graphics definitions | |
| 703 | * | |
| 704 | *************************************/ | |
| 705 | ||
| 706 | ||
| 268 | 707 | static const gfx_layout charlayout = |
| 269 | 708 | { |
| 270 | 709 | 8,8, /* 8*8 characters */ |
| r1490 | r1491 | |
| 281 | 720 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 8 ) |
| 282 | 721 | GFXDECODE_END |
| 283 | 722 | |
| 723 | /************************************* | |
| 724 | * | |
| 725 | * Sound definitions | |
| 726 | * | |
| 727 | *************************************/ | |
| 284 | 728 | |
| 285 | static MACHINE_DRIVER_START( skychut ) | |
| 729 | static const char *iremm10_sample_names[] = | |
| 730 | { | |
| 731 | "*ipminvad", | |
| 732 | "1.wav", /* shot/missle */ | |
| 733 | "2.wav", /* base hit/explosion */ | |
| 734 | "3.wav", /* invader hit */ | |
| 735 | "4.wav", /* fleet move 1 */ | |
| 736 | "5.wav", /* fleet move 2 */ | |
| 737 | "6.wav", /* fleet move 3 */ | |
| 738 | "7.wav", /* fleet move 4 */ | |
| 739 | "8.wav", /* UFO/saucer hit */ | |
| 740 | "9.wav", /* bonus base */ | |
| 741 | "0.wav", /* UFO sound */ | |
| 742 | 0 | |
| 743 | }; | |
| 286 | 744 | |
| 745 | ||
| 746 | static struct Samplesinterface iremm10_samples_interface = | |
| 747 | { | |
| 748 | 6, /* 6 channels */ | |
| 749 | iremm10_sample_names | |
| 750 | }; | |
| 751 | ||
| 752 | /************************************* | |
| 753 | * | |
| 754 | * Machine driver | |
| 755 | * | |
| 756 | *************************************/ | |
| 757 | ||
| 758 | static MACHINE_DRIVER_START( iremm10 ) | |
| 759 | ||
| 760 | MDRV_DRIVER_DATA(irem_state) | |
| 761 | ||
| 287 | 762 | /* basic machine hardware */ |
| 288 | MDRV_CPU_ADD(M6502,20000000/8) | |
| 289 | MDRV_CPU_PROGRAM_MAP(skychut_readmem,skychut_writemem) | |
| 290 | MDRV_CPU_VBLANK_INT(skychut_interrupt,1) | |
| 763 | MDRV_CPU_ADD_TAG("Main", M6502,IREMM10_CPU_CLOCK) | |
| 764 | MDRV_CPU_PROGRAM_MAP(iremm10_main,0) | |
| 291 | 765 | |
| 292 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 293 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 766 | MDRV_MACHINE_RESET(irem) | |
| 294 | 767 | |
| 768 | MDRV_CPU_VBLANK_INT(iremm10_interrupt,1) | |
| 769 | ||
| 770 | MDRV_SCREEN_RAW_PARAMS(IREMM10_PIXEL_CLOCK, IREMM10_HTOTAL, IREMM10_HBEND, IREMM10_HBSTART, IREMM10_VTOTAL, IREMM10_VBEND, IREMM10_VBSTART) | |
| 771 | ||
| 295 | 772 | /* video hardware */ |
| 296 | 773 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 297 | 774 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 298 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 299 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) | |
| 300 | 775 | MDRV_GFXDECODE(skychut) |
| 301 | 776 | MDRV_PALETTE_LENGTH(8) |
| 302 | 777 | MDRV_COLORTABLE_LENGTH(2*8) |
| 303 | 778 | |
| 304 | 779 | MDRV_PALETTE_INIT(skychut) |
| 305 | MDRV_VIDEO_START(generic) | |
| 306 | MDRV_VIDEO_UPDATE(skychut) | |
| 780 | //MDRV_VIDEO_START(generic) | |
| 781 | MDRV_VIDEO_START(iremm10) | |
| 782 | MDRV_VIDEO_UPDATE(iremm10) | |
| 307 | 783 | |
| 308 | 784 | /* sound hardware */ |
| 785 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 786 | ||
| 787 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 788 | MDRV_SOUND_CONFIG(iremm10_samples_interface) | |
| 789 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 790 | ||
| 309 | 791 | MACHINE_DRIVER_END |
| 310 | 792 | |
| 793 | static MACHINE_DRIVER_START( iremm11 ) | |
| 311 | 794 | |
| 795 | MDRV_DRIVER_DATA(irem_state) | |
| 796 | ||
| 797 | /* basic machine hardware */ | |
| 798 | MDRV_IMPORT_FROM(iremm10) | |
| 799 | MDRV_CPU_REPLACE("Main", M6502,IREMM10_CPU_CLOCK / 2) | |
| 800 | //MDRV_CPU_MODIFY("Main") | |
| 801 | MDRV_CPU_PROGRAM_MAP(iremm11_main,0) | |
| 802 | MDRV_CPU_VBLANK_INT(iremm11_interrupt,1) | |
| 803 | ||
| 804 | /* sound hardware */ | |
| 805 | MACHINE_DRIVER_END | |
| 806 | ||
| 312 | 807 | static MACHINE_DRIVER_START( greenberet ) |
| 313 | 808 | |
| 809 | MDRV_DRIVER_DATA(irem_state) | |
| 810 | ||
| 314 | 811 | /* basic machine hardware */ |
| 315 | MDRV_CPU_ADD_TAG("main", M6502,11730000/10) | |
| 316 | MDRV_CPU_PROGRAM_MAP(greenberet_readmem,greenberet_writemem) | |
| 317 | MDRV_CPU_VBLANK_INT(skychut_interrupt,1) | |
| 812 | MDRV_CPU_ADD_TAG("main", M6502,IREMM15_CPU_CLOCK) | |
| 813 | MDRV_CPU_PROGRAM_MAP(iremm15_main,0) | |
| 318 | 814 | |
| 319 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 320 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 815 | MDRV_MACHINE_RESET(irem) | |
| 321 | 816 | |
| 817 | MDRV_CPU_VBLANK_INT(iremm15_interrupt,1) | |
| 818 | ||
| 819 | MDRV_SCREEN_RAW_PARAMS(IREMM15_PIXEL_CLOCK, IREMM15_HTOTAL, IREMM15_HBEND, IREMM15_HBSTART, IREMM15_VTOTAL, IREMM15_VBEND, IREMM15_VBSTART) | |
| 820 | ||
| 322 | 821 | /* video hardware */ |
| 323 | 822 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 324 | 823 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 325 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 326 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 327 | 824 | MDRV_PALETTE_LENGTH(8) |
| 328 | 825 | MDRV_COLORTABLE_LENGTH(2*8) |
| 329 | 826 | |
| 330 | 827 | MDRV_PALETTE_INIT(skychut) |
| 331 | MDRV_VIDEO_START( | |
| 828 | MDRV_VIDEO_START( | |
| 332 | 829 | MDRV_VIDEO_UPDATE(iremm15) |
| 333 | 830 | |
| 334 | 831 | /* sound hardware */ |
| 832 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 833 | ||
| 834 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 835 | MDRV_SOUND_CONFIG(iremm10_samples_interface) | |
| 836 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 837 | ||
| 335 | 838 | MACHINE_DRIVER_END |
| 336 | 839 | |
| 337 | 840 | |
| r1490 | r1491 | |
| 340 | 843 | MDRV_CPU_REPLACE("main", M6502,11730000/16) |
| 341 | 844 | MACHINE_DRIVER_END |
| 342 | 845 | |
| 846 | static DRIVER_INIT( andromed ) | |
| 847 | { | |
| 848 | int i; | |
| 849 | irem_state *state = machine->driver_data; | |
| 343 | 850 | |
| 851 | for (i=0x1c00;i<0x2000;i++) | |
| 852 | state->rom[i]=0x60; | |
| 853 | } | |
| 344 | 854 | |
| 855 | static DRIVER_INIT( iremm15 ) | |
| 856 | { | |
| 857 | } | |
| 345 | 858 | |
| 859 | ||
| 346 | 860 | /*************************************************************************** |
| 347 | 861 | |
| 348 | 862 | Game driver(s) |
| r1490 | r1491 | |
| 359 | 873 | ROM_LOAD( "am5", 0x2000, 0x0400, CRC(518a3b88) SHA1(5e20c905c2190b381a105327e112fcc0a127bb2f) ) |
| 360 | 874 | ROM_LOAD( "am6", 0x2400, 0x0400, CRC(ce3d5fff) SHA1(c34178aca9ffb8b2dd468d9e3369a985f52daf9a) ) |
| 361 | 875 | ROM_LOAD( "am7", 0x2800, 0x0400, CRC(30d3366f) SHA1(aa73bba194fa6d1f3909f8df517a0bff07583ea9) ) |
| 876 | ROM_LOAD( "am8", 0x2c00, 0x0400, NO_DUMP ) // $60 entries | |
| 362 | 877 | |
| 363 | 878 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) |
| 364 | 879 | ROM_LOAD( "am9", 0x0000, 0x0400, CRC(a1c8f4db) SHA1(bedf5d7126c7e9b91ad595188c69aa2c043c71e8) ) |
| r1490 | r1491 | |
| 434 | 949 | ROM_LOAD( "gb9", 0x3000, 0x0400, CRC(c27b9ba3) SHA1(a2f4f0c4b61eb03bba13ae5d25dc01009a4f86ee) ) // ok ? |
| 435 | 950 | ROM_END |
| 436 | 951 | |
| 437 | GAME( 1979, andromed, 0, skychut, skychut, 0, ROT270, "Irem", "Andromeda (Japan?)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) | |
| 438 | GAME( 1979?,ipminvad, 0, skychut, skychut, 0, ROT270, "Irem", "IPM Invader", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 439 | GAME( 1980, skychut, 0, skychut, skychut, 0, ROT270, "Irem", "Sky Chuter", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 440 | GAME( 1979, spacbeam, 0, greenberet, spacebeam, 0, ROT270, "Irem", "Space Beam", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 441 | GAME( 1979?,headoni, 0, headoni, headoni, 0, ROT270, "Irem", "Head On (Irem, M-15 Hardware)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 442 | GAME( 1980, greenber, 0, greenberet, spacebeam, 0, ROT270, "Irem", "Green Beret (Irem)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) | |
| 952 | GAME( 1979, andromed, 0, iremm11, skychut, andromed, ROT270, "Irem", "Andromeda (Japan?)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) | |
| 953 | GAME( 1979?,ipminvad, 0, iremm10, ipminvad, 0, ROT270, "Irem", "IPM Invader", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 954 | GAME( 1980, skychut, 0, iremm11, skychut, 0, ROT270, "Irem", "Sky Chuter", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 955 | GAME( 1979, spacbeam, 0, greenberet, spacebeam, iremm15, ROT270, "Irem", "Space Beam", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 956 | GAME( 1979?,headoni, 0, headoni, headoni, iremm15, ROT270, "Irem", "Head On (Irem, M-15 Hardware)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 957 | GAME( 1980, greenber, 0, greenberet, spacebeam, iremm15, ROT270, "Irem", "Green Beret (Irem)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) |
| r1490 | r1491 | |
|---|---|---|
| 380 | 380 | { 0,1,2,3,4,5,6,7 }, |
| 381 | 381 | /* y offsets */ |
| 382 | 382 | { 0*8,1*8,2*8,3*8, |
| 383 | 4*8,5*8,6*8,7*8, | |
| 384 | 0*8,1*8,2*8,3*8, | |
| 385 | 383 | 4*8,5*8,6*8,7*8 }, |
| 386 | 384 | 8*8 /* every char takes 8 bytes */ |
| 387 | 385 | }; |
| r1490 | r1491 | |
|---|---|---|
| 2036 | 2036 | static DRIVER_INIT( spclords ) |
| 2037 | 2037 | { |
| 2038 | 2038 | atarigen_eeprom_default = NULL; |
| 2039 | atarijsa_init( | |
| 2039 | atarijsa_init(machine, 2, 0x0040); | |
| 2040 | 2040 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 2041 | 2041 | |
| 2042 | 2042 | atarigx2_playfield_base = 0x000; |
| r1490 | r1491 | |
| 2048 | 2048 | static DRIVER_INIT( motofren ) |
| 2049 | 2049 | { |
| 2050 | 2050 | atarigen_eeprom_default = NULL; |
| 2051 | atarijsa_init( | |
| 2051 | atarijsa_init(machine, 2, 0x0040); | |
| 2052 | 2052 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 2053 | 2053 | |
| 2054 | 2054 | atarigx2_playfield_base = 0x400; |
| r1490 | r1491 | |
| 2086 | 2086 | static DRIVER_INIT( rrreveng ) |
| 2087 | 2087 | { |
| 2088 | 2088 | atarigen_eeprom_default = NULL; |
| 2089 | atarijsa_init( | |
| 2089 | atarijsa_init(machine, 2, 0x0040); | |
| 2090 | 2090 | atarijsa3_init_adpcm(REGION_SOUND1); |
| 2091 | 2091 | |
| 2092 | 2092 | atarigx2_playfield_base = 0x000; |
| r1490 | r1491 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "cpu/s2650/s2650.h" |
| 13 | #include "video/s2636.h" | |
| 13 | 14 | |
| 14 | 15 | #include "tinv2650.lh" |
| 15 | 16 | |
| 16 | extern UINT8 *zac_s2636ram; | |
| 17 | WRITE8_HANDLER( tinvader_videoram_w ); | |
| 18 | WRITE8_HANDLER( tinvader_sound_w ); | |
| 19 | READ8_HANDLER( zac_s2636_r ); | |
| 20 | READ8_HANDLER( tinvader_port_0_r ); | |
| 17 | 21 | |
| 18 | extern WRITE8_HANDLER( tinvader_videoram_w ); | |
| 19 | extern WRITE8_HANDLER( zac_s2636_w ); | |
| 20 | extern WRITE8_HANDLER( tinvader_sound_w ); | |
| 21 | extern READ8_HANDLER( zac_s2636_r ); | |
| 22 | extern READ8_HANDLER( tinvader_port_0_r ); | |
| 22 | VIDEO_START( tinvader ); | |
| 23 | VIDEO_UPDATE( tinvader ); | |
| 23 | 24 | |
| 24 | extern VIDEO_START( tinvader ); | |
| 25 | extern VIDEO_UPDATE( tinvader ); | |
| 26 | ||
| 27 | 25 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 28 | 26 | AM_RANGE(0x0000, 0x17ff) AM_READ(MRA8_ROM) |
| 29 | 27 | AM_RANGE(0x1800, 0x1bff) AM_READ(MRA8_RAM) |
| r1490 | r1491 | |
| 45 | 43 | AM_RANGE(0x1d00, 0x1dff) AM_WRITE(MWA8_RAM) |
| 46 | 44 | AM_RANGE(0x1e80, 0x1e80) AM_WRITE(tinvader_sound_w) |
| 47 | 45 | AM_RANGE(0x1e86, 0x1e86) AM_WRITE(MWA8_NOP) /* Dodgem Only */ |
| 48 | AM_RANGE(0x1f00, 0x1fff) AM_WRITE( | |
| 46 | AM_RANGE(0x1f00, 0x1fff) AM_WRITE(MWA8_RAM | |
| 49 | 47 | ADDRESS_MAP_END |
| 50 | 48 | |
| 51 | 49 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | Arkanoid driver | |
| 3 | Arkanoid driver | |
| 4 | 4 | |
| 5 | 5 | |
| 6 | 6 | Japanese version support cocktail mode (DSW #7), the others don't. |
| r1490 | r1491 | |
|---|---|---|
| 296 | 296 | 3+6*64*8, 2+6*64*8, 1+6*64*8, 0+6*64*8, |
| 297 | 297 | 3+7*64*8, 2+7*64*8, 1+7*64*8, 0+7*64*8, |
| 298 | 298 | 3+8*64*8, 2+8*64*8, 1+8*64*8, 0+8*64*8, |
| 299 | 3+9*64*8, 2+9*64*8, 1+9*64*8, 0+9*64*8 | |
| 299 | 3+9*64*8, 2+9*64*8, 1+9*64*8, 0+9*64*8, | |
| 300 | STEP32(0,0), STEP8(0,0) | |
| 300 | 301 | }; |
| 301 | 302 | |
| 302 | 303 | static const UINT32 spritelayout2_yoffset[128] = |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | driver by Steve Baines (sulaco@ntlworld.com) and Frank Palazzolo |
| 6 | 6 | |
| 7 | This file is Copyright | |
| 7 | This file is Copyright | |
| 8 | 8 | Modified by Frank Palazzolo for sound support |
| 9 | 9 | |
| 10 | 10 | Games supported: |
| r1490 | r1491 | |
|---|---|---|
| 348 | 348 | 12, |
| 349 | 349 | 4, |
| 350 | 350 | { 0, 0x2000*8, 0x4000*8, 0x6000*8 }, |
| 351 | | |
| 351 | EXTENDED_XOFFS, | |
| 352 | 352 | { |
| 353 | 353 | 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8, |
| 354 | 354 | 16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8 |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | MAME source code to HTML converter |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | JEDEC file utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Laserdisc metadata generator. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Regression test report generator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | CDRDAO TOC parser for CHD compression frontend |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # MAME tools makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | CDRDAO TOC parser for CHD compression frontend |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | CHD compression frontend |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
| 145 | 145 | progress - generic progress callback |
| 146 | 146 | -------------------------------------------------*/ |
| 147 | 147 | |
| 148 | static void progress(int forceit, const char *fmt, ...) | |
| 148 | static void ATTR_PRINTF(2,3) progress(int forceit, const char *fmt, ...) | |
| 149 | 149 | { |
| 150 | 150 | clock_t curtime = clock(); |
| 151 | 151 | va_list arg; |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Basic source code cleanear. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ROM comparison utility program. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // miniwork.c - Minimal core work item functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // osd_cpu.h - Minimal core CPU-specific data types |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minimisc.c - Minimal core miscellaneous functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Minimal OSD makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minisync.c - Minimal core synchronization functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | minidir.c - Minimal core directory access functions |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minitime.c - Minimal core timing functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // minifile.c - Minimal core file access functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core OS-dependent code interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 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 | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | OS-dependent code interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // strconv.h - Win32 string conversion |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // output.c - Win32 implementation of MAME output routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawd3di.h - Direct3D 8/9 interface abstractions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutil.h - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // osd_cpu.h - Win32 CPU-specific data types |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // strconv.h - Win32 string conversion |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // output.h - Win32 implementation of MAME output routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // verinfo.c - Version resource emitter code |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
| 129 | 129 | // parse_version |
| 130 | 130 | //============================================================ |
| 131 | 131 | |
| 132 | static int parse_version(char *str, int *version_major, int *version_minor, int *version_micro, | |
| 132 | static int parse_version(char *str, int *version_major, int *version_minor, int *version_micro, | |
| 133 | 133 | { |
| 134 | char *copyright; | |
| 135 | 134 | char *version; |
| 136 | 135 | int position = 0; |
| 137 | 136 | |
| r1490 | r1491 | |
| 151 | 150 | *version_major = parse_version_digit(version, &position); |
| 152 | 151 | *version_minor = parse_version_digit(version, &position); |
| 153 | 152 | *version_micro = parse_version_digit(version, &position); |
| 154 | ||
| 155 | // find the copyright string | |
| 156 | copyright = strstr(str, "(c)"); | |
| 157 | if (copyright != NULL) | |
| 158 | copyright = strchr(copyright, '-'); | |
| 159 | if (copyright == NULL) | |
| 160 | { | |
| 161 | fprintf(stderr, "Unable to find copyright string\n"); | |
| 162 | return 1; | |
| 163 | } | |
| 164 | copyright++; | |
| 165 | ||
| 166 | *year = 0; | |
| 167 | sscanf(copyright, "%d", year); | |
| 168 | 153 | return 0; |
| 169 | 154 | } |
| 170 | 155 | |
| r1490 | r1491 | |
| 177 | 162 | int main(int argc, char *argv[]) |
| 178 | 163 | { |
| 179 | 164 | version_info v; |
| 180 | int begin_year, current_year; | |
| 181 | 165 | char legal_copyright[512]; |
| 182 | 166 | char *buffer; |
| 183 | 167 | size_t size; |
| r1490 | r1491 | |
| 220 | 204 | buffer[size] = 0; |
| 221 | 205 | |
| 222 | 206 | // parse out version string |
| 223 | if (parse_version(buffer, &v.version_major, &v.version_minor, &v.version_build, & | |
| 207 | if (parse_version(buffer, &v.version_major, &v.version_minor, &v.version_build, & | |
| 224 | 208 | return 1; |
| 225 | 209 | |
| 226 | 210 | #ifdef MESS |
| r1490 | r1491 | |
| 232 | 216 | v.internal_name = "MESS"; |
| 233 | 217 | v.original_filename = "MESS"; |
| 234 | 218 | v.product_name = "MESS"; |
| 235 | begin_year = 1998; | |
| 236 | 219 | #elif defined(WINUI) |
| 237 | 220 | // MAMEUI |
| 238 | 221 | v.author = "Christopher Kirmse and the MAMEUI team"; |
| r1490 | r1491 | |
| 242 | 225 | v.internal_name = "MAMEUI"; |
| 243 | 226 | v.original_filename = "MAMEUI"; |
| 244 | 227 | v.product_name = "MAMEUI"; |
| 245 | begin_year = 1997; | |
| 246 | 228 | #else |
| 247 | 229 | // MAME |
| 248 | 230 | v.author = "Nicola Salmoria and the MAME Team"; |
| r1490 | r1491 | |
| 252 | 234 | v.internal_name = "MAME"; |
| 253 | 235 | v.original_filename = "MAME"; |
| 254 | 236 | v.product_name = "MAME"; |
| 255 | begin_year = 1996; | |
| 256 | 237 | #endif |
| 257 | 238 | |
| 258 | 239 | // build legal_copyright string |
| 259 | 240 | v.legal_copyright = legal_copyright; |
| 260 | snprintf(legal_copyright, ARRAY_LENGTH(legal_copyright), "Copyright | |
| 241 | snprintf(legal_copyright, ARRAY_LENGTH(legal_copyright), "Copyright | |
| 261 | 242 | |
| 262 | 243 | // emit the info |
| 263 | 244 | emit_version_info(&v); |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // wintime.c - Win32 OSD core timing functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawnone.c - stub "nothing" drawer |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Windows-specific makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winprefix.h - Win32 prefix file, included by ALL files |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawgdi.c - Win32 GDI drawing |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // d3d9intf.c - Direct3D 8.1 abstraction layer |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // d3d9intf.c - Direct3D 9 abstraction layer |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // sound.c - Win32 implementation of MAME sound routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winsync.c - Win32 OSD core synchronization functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // vconv.c - VC++ parameter conversion code |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // Inline implementations for MSVC compiler. |
| 6 | 6 | // |
| 7 | // Copyright | |
| 7 | // Copyright | |
| 8 | 8 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | // |
| 10 | 10 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | windir.c - Win32 OSD core directory access functions |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // sound.h - Win32 implementation of MAME sound routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winfile.c - Win32 OSD core file access functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // input.c - Win32 implementation of MAME input routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
| 1095 | 1095 | // release all our devices |
| 1096 | 1096 | while (joystick_list != NULL && joystick_list->dinput.device != NULL) |
| 1097 | 1097 | dinput_device_release(joystick_list); |
| 1098 | while (lightgun_list != NULL && lightgun_list->dinput.device != NULL) | |
| 1099 | dinput_device_release(lightgun_list); | |
| 1098 | while (lightgun_list != NULL) | |
| 1099 | generic_device_free(lightgun_list); | |
| 1100 | 1100 | while (mouse_list != NULL && mouse_list->dinput.device != NULL) |
| 1101 | 1101 | dinput_device_release(mouse_list); |
| 1102 | 1102 | while (keyboard_list != NULL && keyboard_list->dinput.device != NULL) |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winwork.c - Win32 OSD core work item functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | // |
| 2 | 2 | // mame.rc - Minimal resource file for Win32 MAME |
| 3 | 3 | // |
| 4 | // Copyright | |
| 4 | // Copyright | |
| 5 | 5 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 6 | 6 | // |
| 7 | 7 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // x86 inline implementations for MSVC compiler. |
| 6 | 6 | // |
| 7 | // Copyright | |
| 7 | // Copyright | |
| 8 | 8 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | // |
| 10 | 10 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | // ledutil.c - Win32 example code that tracks changing |
| 4 | 4 | // outputs and updates the keyboard LEDs in response |
| 5 | 5 | // |
| 6 | // Copyright | |
| 6 | // Copyright | |
| 7 | 7 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 8 | 8 | // |
| 9 | 9 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmain.c - Win32 main program |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // debugwin.c - Win32 debug window handling |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
| 279 | 279 | // check for F10 -- we need to capture that ourselves |
| 280 | 280 | case WM_SYSKEYDOWN: |
| 281 | 281 | case WM_SYSKEYUP: |
| 282 | if (message.wParam == VK_F4 && message.message == WM_SYSKEYDOWN) | |
| 283 | SendMessage(GetAncestor(GetFocus(), GA_ROOT), WM_CLOSE, 0, 0); | |
| 282 | 284 | if (message.wParam == VK_F10) |
| 283 | SendMessage(GetFocus(), (message.message == WM_SYSKEYDOWN) ? WM_KEYDOWN : WM_KEYUP, message.wParam, message.lParam); | |
| 285 | SendMessage(GetAncestor(GetFocus(), GA_ROOT), (message.message == WM_SYSKEYDOWN) ? WM_KEYDOWN : WM_KEYUP, message.wParam, message.lParam); | |
| 284 | 286 | break; |
| 285 | 287 | |
| 286 | 288 | // process everything else |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // input.h - Win32 implementation of MAME input routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutf8.c - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawdd.c - Win32 DirectDraw implementation |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // video.c - Win32 video handling |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // window.c - Win32 window handling |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmain.h - Win32 main program and core headers |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winalloc.c - Win32 memory allocation routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // debugwin.h - Win32 debug window handling |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winmisc.c - Win32 OSD core miscellaneous functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutf8.h - Win32 UTF-8 wrappers |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // video.h - Win32 implementation of MAME video routines |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // window.h - Win32 window handling |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // main.c - Win32 main program |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | // |
| 5 | 5 | // Inline implementations for non-GCC Win32 compilers |
| 6 | 6 | // |
| 7 | // Copyright | |
| 7 | // Copyright | |
| 8 | 8 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | // |
| 10 | 10 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // drawd3d.c - Win32 Direct3D implementation |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
| 129 | 129 | int adapter; // ordinal adapter number |
| 130 | 130 | int width, height; // current width, height |
| 131 | 131 | int refresh; // current refresh rate |
| 132 | int create_error_count; // number of consecutive create errors | |
| 132 | 133 | |
| 133 | 134 | d3d_device * device; // pointer to the Direct3DDevice object |
| 134 | 135 | int gamma_supported; // is full screen gamma supported? |
| r1490 | r1491 | |
| 745 | 746 | D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, &d3d->presentation, &d3d->device); |
| 746 | 747 | if (result != D3D_OK) |
| 747 | 748 | { |
| 749 | // if we got a "DEVICELOST" error, it may be transitory; count it and only fail if | |
| 750 | // we exceed a threshold | |
| 751 | if (result == D3DERR_DEVICELOST) | |
| 752 | { | |
| 753 | d3d->create_error_count++; | |
| 754 | if (d3d->create_error_count < 10) | |
| 755 | return 0; | |
| 756 | } | |
| 757 | ||
| 758 | // fatal error if we just can't do it | |
| 748 | 759 | mame_printf_error("Unable to create the Direct3D device (%08X)\n", (UINT32)result); |
| 749 | 760 | return 1; |
| 750 | 761 | } |
| 762 | d3d->create_error_count = 0; | |
| 751 | 763 | mame_printf_verbose("Direct3D: Device created at %dx%d\n", d3d->width, d3d->height); |
| 752 | 764 | |
| 753 | 765 | // set the max texture size |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | // |
| 3 | 3 | // winutil.c - Win32 OSD core utility functions |
| 4 | 4 | // |
| 5 | // Copyright | |
| 5 | // Copyright | |
| 6 | 6 | // Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ROM loading functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Configuration file I/O. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | express.h |
| 4 | 4 | Generic expressions engine. |
| 5 | 5 | Written by Aaron Giles |
| 6 | Copyright | |
| 6 | Copyright | |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger CPU/memory interface engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger help engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger code-comment management functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger view engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger CPU/memory interface engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger view engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger command interface engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger command interface engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger text buffering engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger text buffering engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger console engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | express.c |
| 4 | 4 | Generic expressions engine. |
| 5 | 5 | Written by Aaron Giles |
| 6 | Copyright | |
| 6 | Copyright | |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger help engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
| 79 | 79 | " help [<topic>] -- get help on a particular topic\n" |
| 80 | 80 | " do <expression> -- evaluates the given expression\n" |
| 81 | 81 | " symlist [<cpunum>] -- lists registered symbols\n" |
| 82 | " softreset -- executes a soft reset\n" | |
| 83 | " hardreset -- executes a hard reset\n" | |
| 82 | 84 | " print <item>[,...] -- prints one or more <item>s to the console\n" |
| 83 | 85 | " printf <format>[,<item>[,...]] -- prints one or more <item>s to the console using <format>\n" |
| 84 | 86 | " logerror <format>[,<item>[,...]] -- outputs one or more <item>s to the error.log\n" |
| 85 | 87 | " tracelog <format>[,<item>[,...]] -- outputs one or more <item>s to the trace file using <format>\n" |
| 86 | 88 | " snap [<filename>] -- save a screen snapshot\n" |
| 89 | " source <filename> -- reads commands from <filename> and executes them one by one\n" | |
| 87 | 90 | " quit -- exits MAME and the debugger\n" |
| 88 | 91 | }, |
| 89 | 92 | { |
| r1490 | r1491 | |
| 118 | 121 | " out -- single steps until the current subroutine/exception handler is exited (Shift-F11)\n" |
| 119 | 122 | " g[o] [<address>] -- resumes execution, sets temp breakpoint at <address> (F5)\n" |
| 120 | 123 | " gi[nt] [<irqline>] -- resumes execution, setting temp breakpoint if <irqline> is taken (F7)\n" |
| 124 | " gt[ime] <milliseconds> -- resumes execution until the given delay has elapsed\n" | |
| 121 | 125 | " gv[blank] -- resumes execution, setting temp breakpoint on the next VBLANK (F8)\n" |
| 122 | 126 | " n[ext] -- executes until the next CPU switch (F6)\n" |
| 123 | 127 | " focus <cpunum> -- focuses debugger only on <cpunum>\n" |
| 124 | 128 | " ignore [<cpunum>[,<cpunum>[,...]]] -- stops debugging on <cpunum>\n" |
| 125 | 129 | " observe [<cpunum>[,<cpunum>[,...]]] -- resumes debugging on <cpunum>\n" |
| 126 | 130 | " trace {<filename>|OFF}[,<cpunum>[,<action>]] -- trace the given CPU to a file (defaults to active CPU)\n" |
| 131 | " traceover {<filename>|OFF}[,<cpunum>[,<action>]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n" | |
| 132 | " traceflush -- flushes all open trace files\n" | |
| 127 | 133 | }, |
| 128 | 134 | { |
| 129 | 135 | "breakpoints", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger code-comment management functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Debugger console engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | * Copyright | |
| 3 | * Copyright | |
| 4 | 4 | * |
| 5 | 5 | * - This source code is released as freeware for non-commercial purposes. |
| 6 | 6 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 246 | 246 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s = cpuintrf_temp_str(), "LH5801"); break; |
| 247 | 247 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0alpha"); break; |
| 248 | 248 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 249 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 249 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 250 | 250 | |
| 251 | 251 | case CPUINFO_STR_FLAGS: |
| 252 | 252 | sprintf(info->s = cpuintrf_temp_str(), "%s%s%s%s%s%s%s%s", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * disasm.c |
| 4 | 4 | * portable lh5801 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * lh5801.h |
| 4 | 4 | * portable lh5801 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** m6809: Portable 6809 emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright | |
| 4 | 4 | |
| 5 | 5 | References: |
| 6 | 6 | |
| r1490 | r1491 | |
| 1182 | 1182 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 6809"); break; |
| 1183 | 1183 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.11"); break; |
| 1184 | 1184 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1185 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1185 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1186 | 1186 | |
| 1187 | 1187 | case CPUINFO_STR_FLAGS: |
| 1188 | 1188 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | 6809dasm.c - a 6809 opcode disassembler |
| 4 | 4 | Version 1.4 1-MAR-95 |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | Thanks to Franklin Bowen for bug fixes, ideas |
| 8 | 8 |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | * Version 3.32 |
| 7 | 7 | * |
| 8 | 8 | * A portable Motorola M680x0 processor emulation engine. |
| 9 | * Copyright | |
| 9 | * Copyright | |
| 10 | 10 | * |
| 11 | 11 | * This code may be freely used for non-commercial purposes as long as this |
| 12 | 12 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | * Version 3.32 |
| 8 | 8 | * |
| 9 | 9 | * A portable Motorola M680x0 processor emulation engine. |
| 10 | * Copyright | |
| 10 | * Copyright | |
| 11 | 11 | * |
| 12 | 12 | * This code may be freely used for non-commercial purposes as long as this |
| 13 | 13 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | * Version 3.32 |
| 7 | 7 | * |
| 8 | 8 | * A portable Motorola M680x0 processor emulation engine. |
| 9 | * Copyright | |
| 9 | * Copyright | |
| 10 | 10 | * |
| 11 | 11 | * This code may be freely used for non-commercial purposes as long as this |
| 12 | 12 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
| 1233 | 1233 | int ophandler_body_read = 0; |
| 1234 | 1234 | |
| 1235 | 1235 | printf("\n\tMusashi v%s 68000, 68008, 68010, 68EC020, 68020, 68040 emulator\n", g_version); |
| 1236 | printf("\tCopyright | |
| 1236 | printf("\tCopyright | |
| 1237 | 1237 | |
| 1238 | 1238 | /* Check if output path and source for the input file are given */ |
| 1239 | 1239 | if(argc > 1) |
| r1490 | r1491 | |
|---|---|---|
| 582 | 582 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; |
| 583 | 583 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; |
| 584 | 584 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 585 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 585 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 586 | 586 | |
| 587 | 587 | case CPUINFO_STR_FLAGS: |
| 588 | 588 | sr = m68k_get_reg(NULL, M68K_REG_SR); |
| r1490 | r1491 | |
| 761 | 761 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; |
| 762 | 762 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; |
| 763 | 763 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 764 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 764 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 765 | 765 | |
| 766 | 766 | case CPUINFO_STR_FLAGS: |
| 767 | 767 | sr = m68k_get_reg(NULL, M68K_REG_SR); |
| r1490 | r1491 | |
| 1001 | 1001 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; |
| 1002 | 1002 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; |
| 1003 | 1003 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1004 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1004 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1005 | 1005 | |
| 1006 | 1006 | case CPUINFO_STR_FLAGS: |
| 1007 | 1007 | sr = m68k_get_reg(NULL, M68K_REG_SR); |
| r1490 | r1491 | |
| 1242 | 1242 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; |
| 1243 | 1243 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; |
| 1244 | 1244 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1245 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1245 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1246 | 1246 | |
| 1247 | 1247 | case CPUINFO_STR_FLAGS: |
| 1248 | 1248 | sr = m68k_get_reg(NULL, M68K_REG_SR); |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | * Version 3.32 |
| 10 | 10 | * |
| 11 | 11 | * A portable Motorola M680x0 processor emulation engine. |
| 12 | * Copyright | |
| 12 | * Copyright | |
| 13 | 13 | * |
| 14 | 14 | * This code may be freely used for non-commercial purposes as long as this |
| 15 | 15 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | * Version 3.32 |
| 7 | 7 | * |
| 8 | 8 | * A portable Motorola M680x0 processor emulation engine. |
| 9 | * Copyright | |
| 9 | * Copyright | |
| 10 | 10 | * |
| 11 | 11 | * This code may be freely used for non-commercial purposes as long as this |
| 12 | 12 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
|---|---|---|
| 11 | 11 | * Version 3.32 |
| 12 | 12 | * |
| 13 | 13 | * A portable Motorola M680x0 processor emulation engine. |
| 14 | * Copyright | |
| 14 | * Copyright | |
| 15 | 15 | * |
| 16 | 16 | * This code may be freely used for non-commercial purposes as long as this |
| 17 | 17 | * copyright notice remains unaltered in the source code and any binary files |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | "MUSASHI\n" |
| 8 | 8 | "Version 3.32 (2007-12-15)\n" |
| 9 | 9 | "A portable Motorola M680x0 processor emulation engine.\n" |
| 10 | "Copyright | |
| 10 | "Copyright | |
| 11 | 11 | "\n" |
| 12 | 12 | "This code may be freely used for non-commercial purpooses as long as this\n" |
| 13 | 13 | "copyright notice remains unaltered in the source code and any binary files\n" |
| r1490 | r1491 | |
|---|---|---|
| 774 | 774 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Cinematronics CPU"); break; |
| 775 | 775 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 776 | 776 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 777 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 777 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 778 | 778 | |
| 779 | 779 | case CPUINFO_STR_FLAGS: |
| 780 | 780 | sprintf(info->s, "%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * z80gbd.c |
| 4 | 4 | * Portable Z80 Gameboy disassembler |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 458 | 458 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Nintendo Z80"); break; |
| 459 | 459 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.3"); break; |
| 460 | 460 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 461 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 461 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 462 | 462 | |
| 463 | 463 | case CPUINFO_STR_FLAGS: |
| 464 | 464 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 32 | 32 | FILE *f; |
| 33 | 33 | UINT32 begin=0,end=(UINT32)-1,filelen,len,pc; |
| 34 | 34 | printf ("DIS34010\n" |
| 35 | "Copyright | |
| 35 | "Copyright | |
| 36 | 36 | |
| 37 | 37 | for (i=1,n=0;i<argc;++i) |
| 38 | 38 | { |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
| 2357 | 2357 | UINT32 v = R##REG(DSTREG); \ |
| 2358 | 2358 | switch (state.pixelshift) \ |
| 2359 | 2359 | { \ |
| 2360 | case | |
| 2360 | case 0: \ | |
| 2361 | 2361 | v = (v & 1) ? 0xffffffff : 0x00000000;\ |
| 2362 | 2362 | COUNT_CYCLES(8); \ |
| 2363 | 2363 | break; \ |
| 2364 | case | |
| 2364 | case 1: \ | |
| 2365 | 2365 | v &= 3; \ |
| 2366 | 2366 | v |= v << 2; \ |
| 2367 | 2367 | v |= v << 4; \ |
| r1490 | r1491 | |
| 2369 | 2369 | v |= v << 16; \ |
| 2370 | 2370 | COUNT_CYCLES(7); \ |
| 2371 | 2371 | break; \ |
| 2372 | case | |
| 2372 | case 2: \ | |
| 2373 | 2373 | v &= 0x0f; \ |
| 2374 | 2374 | v |= v << 4; \ |
| 2375 | 2375 | v |= v << 8; \ |
| 2376 | 2376 | v |= v << 16; \ |
| 2377 | 2377 | COUNT_CYCLES(6); \ |
| 2378 | 2378 | break; \ |
| 2379 | case | |
| 2379 | case 3: \ | |
| 2380 | 2380 | v &= 0xff; \ |
| 2381 | 2381 | v |= v << 8; \ |
| 2382 | 2382 | v |= v << 16; \ |
| 2383 | 2383 | COUNT_CYCLES(5); \ |
| 2384 | 2384 | break; \ |
| 2385 | case | |
| 2385 | case 4 | |
| 2386 | 2386 | v &= 0xffff; \ |
| 2387 | 2387 | v |= v << 16; \ |
| 2388 | 2388 | COUNT_CYCLES(4); \ |
| 2389 | 2389 | break; \ |
| 2390 | case | |
| 2390 | case 5 | |
| 2391 | 2391 | COUNT_CYCLES(2); \ |
| 2392 | 2392 | break; \ |
| 2393 | 2393 | } \ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** TMS34010: Portable TMS34010 emulator *********************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright | |
| 4 | 4 | |
| 5 | 5 | Opcode Table |
| 6 | 6 |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
| 26 | 26 | |
| 27 | 27 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 28 | 28 | |
| 29 | ||
| 30 | ||
| 29 | 31 | /*************************************************************************** |
| 30 | 32 | CORE STATE |
| 31 | 33 | ***************************************************************************/ |
| r1490 | r1491 | |
| 47 | 49 | UINT16 op; |
| 48 | 50 | UINT32 pc; |
| 49 | 51 | UINT32 st; |
| 50 | void (*pixel_write)(offs_t offset,UINT32 data); | |
| 52 | void (*pixel_write)(offs_t offset, UINT32 data); | |
| 51 | 53 | UINT32 (*pixel_read)(offs_t offset); |
| 52 | | |
| 54 | UINT32 (*raster_op)(UINT32 newpix, UINT32 oldpix); | |
| 53 | 55 | UINT32 convsp; |
| 54 | 56 | UINT32 convdp; |
| 55 | 57 | UINT32 convmp; |
| r1490 | r1491 | |
| 58 | 60 | UINT8 pixelshift; |
| 59 | 61 | UINT8 is_34020; |
| 60 | 62 | UINT8 reset_deferred; |
| 63 | UINT8 hblank_stable; | |
| 61 | 64 | int (*irq_callback)(int irqline); |
| 62 | 65 | const tms34010_config *config; |
| 63 | 66 | emu_timer *scantimer; |
| r1490 | r1491 | |
| 107 | 110 | FUNCTION TABLES |
| 108 | 111 | ***************************************************************************/ |
| 109 | 112 | |
| 110 | extern void (*tms34010_wfield_functions[32])(offs_t offset,UINT32 data); | |
| 113 | extern void (*tms34010_wfield_functions[32])(offs_t offset, UINT32 data); | |
| 111 | 114 | extern UINT32 (*tms34010_rfield_functions[64])(offs_t offset); |
| 112 | 115 | |
| 113 | 116 | |
| r1490 | r1491 | |
| 268 | 271 | } |
| 269 | 272 | |
| 270 | 273 | /* write memory byte */ |
| 271 | INLINE void WBYTE(offs_t offset,UINT32 data) | |
| 274 | INLINE void WBYTE(offs_t offset, UINT32 data) | |
| 272 | 275 | { |
| 273 | 276 | WFIELDMAC_8; |
| 274 | 277 | } |
| r1490 | r1491 | |
| 280 | 283 | } |
| 281 | 284 | |
| 282 | 285 | /* write memory long */ |
| 283 | INLINE void WLONG(offs_t offset,UINT32 data) | |
| 286 | INLINE void WLONG(offs_t offset, UINT32 data) | |
| 284 | 287 | { |
| 285 | 288 | WFIELDMAC_32; |
| 286 | 289 | } |
| r1490 | r1491 | |
| 318 | 321 | /* TODO: Plane masking */ |
| 319 | 322 | return TMS34010_RDMEM_WORD(TOBYTE(offset & 0xfffffff0)); |
| 320 | 323 | } |
| 324 | static UINT32 read_pixel_32(offs_t offset) | |
| 325 | { | |
| 326 | /* TODO: Plane masking */ | |
| 327 | return TMS34010_RDMEM_DWORD(TOBYTE(offset & 0xffffffe0)); | |
| 328 | } | |
| 321 | 329 | |
| 322 | 330 | /* Shift register read */ |
| 323 | 331 | static UINT32 read_pixel_shiftreg(offs_t offset) |
| r1490 | r1491 | |
| 388 | 396 | |
| 389 | 397 | |
| 390 | 398 | /* No Raster Op + No Transparency */ |
| 391 | static void write_pixel_1(offs_t offset,UINT32 data) { WP(0x0f, 0x01); } | |
| 392 | static void write_pixel_2(offs_t offset,UINT32 data) { WP(0x0e, 0x03); } | |
| 393 | static void write_pixel_4(offs_t offset,UINT32 data) { WP(0x0c, 0x0f); } | |
| 394 | static void write_pixel_8(offs_t offset,UINT32 data) { WP(0x08, 0xff); } | |
| 395 | static void write_pixel_16(offs_t offset,UINT32 data) | |
| 399 | static void write_pixel_1(offs_t offset, UINT32 data) { WP(0x0f, 0x01); } | |
| 400 | static void write_pixel_2(offs_t offset, UINT32 data) { WP(0x0e, 0x03); } | |
| 401 | static void write_pixel_4(offs_t offset, UINT32 data) { WP(0x0c, 0x0f); } | |
| 402 | static void write_pixel_8(offs_t offset, UINT32 data) { WP(0x08, 0xff); } | |
| 403 | static void write_pixel_16(offs_t offset, UINT32 data) | |
| 396 | 404 | { |
| 397 | 405 | /* TODO: plane masking */ |
| 398 | 406 | TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data); |
| 399 | 407 | } |
| 408 | static void write_pixel_32(offs_t offset, UINT32 data) | |
| 409 | { | |
| 410 | /* TODO: plane masking */ | |
| 411 | TMS34010_WRMEM_WORD(TOBYTE(offset & 0xffffffe0), data); | |
| 412 | } | |
| 400 | 413 | |
| 401 | 414 | /* No Raster Op + Transparency */ |
| 402 | static void write_pixel_t_1(offs_t offset,UINT32 data) { WP_T(0x0f, 0x01); } | |
| 403 | static void write_pixel_t_2(offs_t offset,UINT32 data) { WP_T(0x0e, 0x03); } | |
| 404 | static void write_pixel_t_4(offs_t offset,UINT32 data) { WP_T(0x0c, 0x0f); } | |
| 405 | static void write_pixel_t_8(offs_t offset,UINT32 data) { WP_T(0x08, 0xff); } | |
| 406 | static void write_pixel_t_16(offs_t offset,UINT32 data) | |
| 415 | static void write_pixel_t_1(offs_t offset, UINT32 data) { WP_T(0x0f, 0x01); } | |
| 416 | static void write_pixel_t_2(offs_t offset, UINT32 data) { WP_T(0x0e, 0x03); } | |
| 417 | static void write_pixel_t_4(offs_t offset, UINT32 data) { WP_T(0x0c, 0x0f); } | |
| 418 | static void write_pixel_t_8(offs_t offset, UINT32 data) { WP_T(0x08, 0xff); } | |
| 419 | static void write_pixel_t_16(offs_t offset, UINT32 data) | |
| 407 | 420 | { |
| 408 | 421 | /* TODO: plane masking */ |
| 409 | 422 | if (data) |
| 410 | 423 | TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data); |
| 411 | 424 | } |
| 425 | static void write_pixel_t_32(offs_t offset, UINT32 data) | |
| 426 | { | |
| 427 | /* TODO: plane masking */ | |
| 428 | if (data) | |
| 429 | TMS34010_WRMEM_DWORD(TOBYTE(offset & 0xffffffe0), data); | |
| 430 | } | |
| 412 | 431 | |
| 413 | 432 | /* Raster Op + No Transparency */ |
| 414 | static void write_pixel_r_1(offs_t offset,UINT32 data) { WP_R(0x0f, 0x01); } | |
| 415 | static void write_pixel_r_2(offs_t offset,UINT32 data) { WP_R(0x0e, 0x03); } | |
| 416 | static void write_pixel_r_4(offs_t offset,UINT32 data) { WP_R(0x0c, 0x0f); } | |
| 417 | static void write_pixel_r_8(offs_t offset,UINT32 data) { WP_R(0x08, 0xff); } | |
| 418 | static void write_pixel_r_16(offs_t offset,UINT32 data) | |
| 433 | static void write_pixel_r_1(offs_t offset, UINT32 data) { WP_R(0x0f, 0x01); } | |
| 434 | static void write_pixel_r_2(offs_t offset, UINT32 data) { WP_R(0x0e, 0x03); } | |
| 435 | static void write_pixel_r_4(offs_t offset, UINT32 data) { WP_R(0x0c, 0x0f); } | |
| 436 | static void write_pixel_r_8(offs_t offset, UINT32 data) { WP_R(0x08, 0xff); } | |
| 437 | static void write_pixel_r_16(offs_t offset, UINT32 data) | |
| 419 | 438 | { |
| 420 | 439 | /* TODO: plane masking */ |
| 421 | 440 | UINT32 a = TOBYTE(offset & 0xfffffff0); |
| 422 | 441 | TMS34010_WRMEM_WORD(a, state.raster_op(data, TMS34010_RDMEM_WORD(a))); |
| 423 | 442 | } |
| 443 | static void write_pixel_r_32(offs_t offset, UINT32 data) | |
| 444 | { | |
| 445 | /* TODO: plane masking */ | |
| 446 | UINT32 a = TOBYTE(offset & 0xffffffe0); | |
| 447 | TMS34010_WRMEM_DWORD(a, state.raster_op(data, TMS34010_RDMEM_DWORD(a))); | |
| 448 | } | |
| 424 | 449 | |
| 425 | 450 | /* Raster Op + Transparency */ |
| 426 | static void write_pixel_r_t_1(offs_t offset,UINT32 data) { WP_R_T(0x0f,0x01); } | |
| 427 | static void write_pixel_r_t_2(offs_t offset,UINT32 data) { WP_R_T(0x0e,0x03); } | |
| 428 | static void write_pixel_r_t_4(offs_t offset,UINT32 data) { WP_R_T(0x0c,0x0f); } | |
| 429 | static void write_pixel_r_t_8(offs_t offset,UINT32 data) { WP_R_T(0x08,0xff); } | |
| 430 | static void write_pixel_r_t_16(offs_t offset,UINT32 data) | |
| 451 | static void write_pixel_r_t_1(offs_t offset, UINT32 data) { WP_R_T(0x0f,0x01); } | |
| 452 | static void write_pixel_r_t_2(offs_t offset, UINT32 data) { WP_R_T(0x0e,0x03); } | |
| 453 | static void write_pixel_r_t_4(offs_t offset, UINT32 data) { WP_R_T(0x0c,0x0f); } | |
| 454 | static void write_pixel_r_t_8(offs_t offset, UINT32 data) { WP_R_T(0x08,0xff); } | |
| 455 | static void write_pixel_r_t_16(offs_t offset, UINT32 data) | |
| 431 | 456 | { |
| 432 | 457 | /* TODO: plane masking */ |
| 433 | 458 | UINT32 a = TOBYTE(offset & 0xfffffff0); |
| r1490 | r1491 | |
| 436 | 461 | if (data) |
| 437 | 462 | TMS34010_WRMEM_WORD(a, data); |
| 438 | 463 | } |
| 464 | static void write_pixel_r_t_32(offs_t offset, UINT32 data) | |
| 465 | { | |
| 466 | /* TODO: plane masking */ | |
| 467 | UINT32 a = TOBYTE(offset & 0xffffffe0); | |
| 468 | data = state.raster_op(data, TMS34010_RDMEM_DWORD(a)); | |
| 439 | 469 | |
| 470 | if (data) | |
| 471 | TMS34010_WRMEM_DWORD(a, data); | |
| 472 | } | |
| 473 | ||
| 440 | 474 | /* Shift register write */ |
| 441 | static void write_pixel_shiftreg(offs_t offset,UINT32 data) | |
| 475 | static void write_pixel_shiftreg(offs_t offset, UINT32 data) | |
| 442 | 476 | { |
| 443 | 477 | if (state.config->from_shiftreg) |
| 444 | 478 | state.config->from_shiftreg(offset, &state.shiftreg[0]); |
| r1490 | r1491 | |
| 453 | 487 | ***************************************************************************/ |
| 454 | 488 | |
| 455 | 489 | /* Raster operations */ |
| 456 | static INT32 raster_op_1(INT32 newpix, INT32 oldpix) { return newpix & oldpix; } | |
| 457 | static INT32 raster_op_2(INT32 newpix, INT32 oldpix) { return newpix & ~oldpix; } | |
| 458 | static INT32 raster_op_3(INT32 newpix, INT32 oldpix) { return 0; } | |
| 459 | static INT32 raster_op_4(INT32 newpix, INT32 oldpix) { return newpix | ~oldpix; } | |
| 460 | static INT32 raster_op_5(INT32 newpix, INT32 oldpix) { return ~(newpix ^ oldpix); } | |
| 461 | static INT32 raster_op_6(INT32 newpix, INT32 oldpix) { return ~oldpix; } | |
| 462 | static INT32 raster_op_7(INT32 newpix, INT32 oldpix) { return ~(newpix | oldpix); } | |
| 463 | static INT32 raster_op_8(INT32 newpix, INT32 oldpix) { return newpix | oldpix; } | |
| 464 | static INT32 raster_op_9(INT32 newpix, INT32 oldpix) { return oldpix; } | |
| 465 | static INT32 raster_op_10(INT32 newpix, INT32 oldpix) { return newpix ^ oldpix; } | |
| 466 | static INT32 raster_op_11(INT32 newpix, INT32 oldpix) { return ~newpix & oldpix; } | |
| 467 | static INT32 raster_op_12(INT32 newpix, INT32 oldpix) { return 0xffff; } | |
| 468 | static INT32 raster_op_13(INT32 newpix, INT32 oldpix) { return ~newpix | oldpix; } | |
| 469 | static INT32 raster_op_14(INT32 newpix, INT32 oldpix) { return ~(newpix & oldpix); } | |
| 470 | static INT32 raster_op_15(INT32 newpix, INT32 oldpix) { return ~newpix; } | |
| 471 | static INT32 raster_op_16(INT32 newpix, INT32 oldpix) { return newpix + oldpix; } | |
| 472 | static INT32 raster_op_17(INT32 newpix, INT32 oldpix) | |
| 490 | static UINT32 raster_op_1(UINT32 newpix, UINT32 oldpix) { return newpix & oldpix; } | |
| 491 | static UINT32 raster_op_2(UINT32 newpix, UINT32 oldpix) { return newpix & ~oldpix; } | |
| 492 | static UINT32 raster_op_3(UINT32 newpix, UINT32 oldpix) { return 0; } | |
| 493 | static UINT32 raster_op_4(UINT32 newpix, UINT32 oldpix) { return newpix | ~oldpix; } | |
| 494 | static UINT32 raster_op_5(UINT32 newpix, UINT32 oldpix) { return ~(newpix ^ oldpix); } | |
| 495 | static UINT32 raster_op_6(UINT32 newpix, UINT32 oldpix) { return ~oldpix; } | |
| 496 | static UINT32 raster_op_7(UINT32 newpix, UINT32 oldpix) { return ~(newpix | oldpix); } | |
| 497 | static UINT32 raster_op_8(UINT32 newpix, UINT32 oldpix) { return newpix | oldpix; } | |
| 498 | static UINT32 raster_op_9(UINT32 newpix, UINT32 oldpix) { return oldpix; } | |
| 499 | static UINT32 raster_op_10(UINT32 newpix, UINT32 oldpix) { return newpix ^ oldpix; } | |
| 500 | static UINT32 raster_op_11(UINT32 newpix, UINT32 oldpix) { return ~newpix & oldpix; } | |
| 501 | static UINT32 raster_op_12(UINT32 newpix, UINT32 oldpix) { return 0xffff; } | |
| 502 | static UINT32 raster_op_13(UINT32 newpix, UINT32 oldpix) { return ~newpix | oldpix; } | |
| 503 | static UINT32 raster_op_14(UINT32 newpix, UINT32 oldpix) { return ~(newpix & oldpix); } | |
| 504 | static UINT32 raster_op_15(UINT32 newpix, UINT32 oldpix) { return ~newpix; } | |
| 505 | static UINT32 raster_op_16(UINT32 newpix, UINT32 oldpix) { return newpix + oldpix; } | |
| 506 | static UINT32 raster_op_17(UINT32 newpix, UINT32 oldpix) | |
| 473 | 507 | { |
| 474 | INT32 max = (UINT32)0xffffffff >> (32 - IOREG(REG_PSIZE)); | |
| 475 | INT32 res = newpix + oldpix; | |
| 508 | UINT32 max = (UINT32)0xffffffff >> (32 - IOREG(REG_PSIZE)); | |
| 509 | UINT32 res = newpix + oldpix; | |
| 476 | 510 | return (res > max) ? max : res; |
| 477 | 511 | } |
| 478 | static INT32 raster_op_18(INT32 newpix, INT32 oldpix) { return oldpix - newpix; } | |
| 479 | static INT32 raster_op_19(INT32 newpix, INT32 oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; } | |
| 480 | static INT32 raster_op_20(INT32 newpix, INT32 oldpix) { return (oldpix > newpix) ? oldpix : newpix; } | |
| 481 | static INT32 raster_op_21(INT32 newpix, INT32 oldpix) { return (oldpix > newpix) ? newpix : oldpix; } | |
| 512 | static UINT32 raster_op_18(UINT32 newpix, UINT32 oldpix) { return oldpix - newpix; } | |
| 513 | static UINT32 raster_op_19(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; } | |
| 514 | static UINT32 raster_op_20(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix : newpix; } | |
| 515 | static UINT32 raster_op_21(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? newpix : oldpix; } | |
| 482 | 516 | |
| 483 | 517 | |
| 484 | 518 | |
| r1490 | r1491 | |
| 820 | 854 | PIXEL OPS |
| 821 | 855 | ***************************************************************************/ |
| 822 | 856 | |
| 823 | static void (*const pixel_write_ops[4][ | |
| 857 | static void (*const pixel_write_ops[4][6])(offs_t offset, UINT32 data) = | |
| 824 | 858 | { |
| 825 | { write_pixel_1, write_pixel_2, write_pixel_4, write_pixel_8, write_pixel_16 }, | |
| 826 | { write_pixel_r_1, write_pixel_r_2, write_pixel_r_4, write_pixel_r_8, write_pixel_r_16 }, | |
| 827 | { write_pixel_t_1, write_pixel_t_2, write_pixel_t_4, write_pixel_t_8, write_pixel_t_16 }, | |
| 828 | { write_pixel_r_t_1, write_pixel_r_t_2, write_pixel_r_t_4, write_pixel_r_t_8, write_pixel_r_t_16 } | |
| 859 | { write_pixel_1, write_pixel_2, write_pixel_4, write_pixel_8, write_pixel_16, write_pixel_32 }, | |
| 860 | { write_pixel_r_1, write_pixel_r_2, write_pixel_r_4, write_pixel_r_8, write_pixel_r_16, write_pixel_r_32 }, | |
| 861 | { write_pixel_t_1, write_pixel_t_2, write_pixel_t_4, write_pixel_t_8, write_pixel_t_16, write_pixel_t_32 }, | |
| 862 | { write_pixel_r_t_1, write_pixel_r_t_2, write_pixel_r_t_4, write_pixel_r_t_8, write_pixel_r_t_16, write_pixel_r_t_32 } | |
| 829 | 863 | }; |
| 830 | 864 | |
| 831 | static UINT32 (*const pixel_read_ops[ | |
| 865 | static UINT32 (*const pixel_read_ops[6])(offs_t offset) = | |
| 832 | 866 | { |
| 833 | read_pixel_1, read_pixel_2, read_pixel_4, read_pixel_8, read_pixel_16 | |
| 867 | read_pixel_1, read_pixel_2, read_pixel_4, read_pixel_8, read_pixel_16, read_pixel_32 | |
| 834 | 868 | }; |
| 835 | 869 | |
| 836 | 870 | |
| r1490 | r1491 | |
| 854 | 888 | case 0x04: i2 = 2; break; |
| 855 | 889 | case 0x08: i2 = 3; break; |
| 856 | 890 | case 0x10: i2 = 4; break; |
| 891 | case 0x20: i2 = 5; break; | |
| 857 | 892 | } |
| 858 | 893 | |
| 859 | 894 | if (IOREG(REG_CONTROL) & 0x20) |
| r1490 | r1491 | |
| 871 | 906 | RASTER OPS |
| 872 | 907 | ***************************************************************************/ |
| 873 | 908 | |
| 874 | static INT32 (*const raster_ops[32]) (INT32 newpix, INT32 oldpix) = | |
| 909 | static UINT32 (*const raster_ops[32]) (UINT32 newpix, UINT32 oldpix) = | |
| 875 | 910 | { |
| 876 | 911 | 0, raster_op_1 , raster_op_2 , raster_op_3, |
| 877 | 912 | raster_op_4 , raster_op_5 , raster_op_6 , raster_op_7, |
| r1490 | r1491 | |
| 973 | 1008 | if (visarea.min_x < visarea.max_x && visarea.max_x <= width && visarea.min_y < visarea.max_y && visarea.max_y <= height) |
| 974 | 1009 | { |
| 975 | 1010 | /* because many games play with the HEBLNK/HSBLNK for effects, we don't change |
| 976 | if they are the only thing that has changed */ | |
| 977 | if (width != screen->width || height != screen->height || visarea.min_y != screen->visarea.min_y || visarea.max_y != screen->visarea.max_y) | |
| 1011 | if they are the only thing that has changed, unless they are stable for a couple | |
| 1012 | of frames */ | |
| 1013 | if (width != screen->width || height != screen->height || visarea.min_y != screen->visarea.min_y || visarea.max_y != screen->visarea.max_y || | |
| 1014 | (state.hblank_stable > 2 && (visarea.min_x != screen->visarea.min_x || visarea.max_x != screen->visarea.max_x))) | |
| 1015 | { | |
| 978 | 1016 | video_screen_configure(state.config->scrnum, width, height, &visarea, refresh); |
| 1017 | } | |
| 1018 | state.hblank_stable++; | |
| 979 | 1019 | } |
| 980 | 1020 | |
| 981 | 1021 | LOG(("Configuring screen: HTOTAL=%3d BLANK=%3d-%3d VTOTAL=%3d BLANK=%3d-%3d refresh=%f\n", |
| r1490 | r1491 | |
| 1235 | 1275 | if (!(data & TMS34010_DI)) |
| 1236 | 1276 | IOREG(REG_INTPEND) &= ~TMS34010_DI; |
| 1237 | 1277 | break; |
| 1278 | ||
| 1279 | case REG_HEBLNK: | |
| 1280 | case REG_HSBLNK: | |
| 1281 | if (oldreg != data) | |
| 1282 | state.hblank_stable = 0; | |
| 1283 | break; | |
| 1238 | 1284 | } |
| 1239 | 1285 | |
| 1240 | 1286 | if (LOG_CONTROL_REGS) |
| r1490 | r1491 | |
| 1298 | 1344 | case 0x04: state.pixelshift = 2; break; |
| 1299 | 1345 | case 0x08: state.pixelshift = 3; break; |
| 1300 | 1346 | case 0x10: state.pixelshift = 4; break; |
| 1347 | case 0x20: state.pixelshift = 5; break; | |
| 1301 | 1348 | } |
| 1302 | 1349 | break; |
| 1303 | 1350 | |
| r1490 | r1491 | |
| 1412 | 1459 | case REG020_DPYADR: |
| 1413 | 1460 | case REG020_DPYTAP: |
| 1414 | 1461 | break; |
| 1462 | ||
| 1463 | case REG020_HEBLNK: | |
| 1464 | case REG020_HSBLNK: | |
| 1465 | if (oldreg != data) | |
| 1466 | state.hblank_stable = 0; | |
| 1467 | break; | |
| 1415 | 1468 | } |
| 1416 | 1469 | } |
| 1417 | 1470 | |
| r1490 | r1491 | |
| 1821 | 1874 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Texas Instruments 340x0"); break; |
| 1822 | 1875 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1823 | 1876 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1824 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1877 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1825 | 1878 | |
| 1826 | 1879 | case CPUINFO_STR_FLAGS: |
| 1827 | 1880 | sprintf(info->s, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TMS34010: Portable Texas Instruments TMS34010 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Parts based on code by Aaron Giles |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 825 | 825 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Texas Instruments TMS32031"); break; |
| 826 | 826 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 827 | 827 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 828 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 828 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 829 | 829 | |
| 830 | 830 | case CPUINFO_STR_FLAGS: |
| 831 | 831 | { |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Rules for building CPU cores |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 1237 | 1237 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "M7700"); break; |
| 1238 | 1238 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.2"); break; |
| 1239 | 1239 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1240 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1240 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1241 | 1241 | |
| 1242 | 1242 | case CPUINFO_STR_FLAGS: |
| 1243 | 1243 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | Based on: |
| 10 | 10 | G65C816 CPU Emulator V0.92 |
| 11 | 11 | |
| 12 | Copyright | |
| 12 | Copyright | |
| 13 | 13 | All rights reserved. |
| 14 | 14 | |
| 15 | 15 | */ |
| r1490 | r1491 | |
|---|---|---|
| 1106 | 1106 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "SHARC"); break; |
| 1107 | 1107 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "2.01"); break; |
| 1108 | 1108 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1109 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1109 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1110 | 1110 | |
| 1111 | 1111 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 1112 | 1112 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * z180.c |
| 4 | 4 | * Portable Z180 emulator V0.3 |
| 5 | 5 | * |
| 6 | * Copyright (C) 2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * | |
| 8 | * Copyright (C) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 9 | 7 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 10 | 8 | * |
| 11 | 9 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
| 2597 | 2595 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Zilog Z8x180"); break; |
| 2598 | 2596 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.3"); break; |
| 2599 | 2597 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2600 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2598 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2601 | 2599 | |
| 2602 | 2600 | case CPUINFO_STR_FLAGS: |
| 2603 | 2601 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * z180dasm.c |
| 4 | 4 | * Portable Z8x180 disassembler |
| 5 | 5 | * |
| 6 | * Copyright (C) 2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * | |
| 8 | * Copyright (C) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 9 | 7 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 10 | 8 | * |
| 11 | 9 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic dynamic recompiler frontend structures and utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * Portable uPD7810/11, 7810H/11H, 78C10/C11/C14 emulator V0.2 |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * |
| 6 | 6 | * 7810ops.c - opcode functions |
| 7 | 7 | * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * Portable uPD7810/11, 7810H/11H, 78C10/C11/C14 emulator V0.2 |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * |
| 6 | 6 | * 7810tbl.c - function pointer tables |
| 7 | 7 | * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * Portable uPD7810/11, 7810H/11H, 78C10/C11/C14 disassembler |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * |
| 6 | 6 | * NS20030112: added 7807. |
| 7 | 7 | * |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * upd7810.c |
| 4 | 4 | * Portable uPD7810/11, 7810H/11H, 78C10/C11/C14 emulator V0.3 |
| 5 | 5 | * |
| 6 | * Copyright (c) 2001 Juergen Buchmueller, all rights reserved. | |
| 7 | * | |
| 8 | * Copyright (C) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 9 | 7 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 10 | 8 | * |
| 11 | 9 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
| 1929 | 1927 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "NEC uPD7810"); break; |
| 1930 | 1928 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.3"); break; |
| 1931 | 1929 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1932 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1930 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1933 | 1931 | |
| 1934 | 1932 | case CPUINFO_STR_FLAGS: |
| 1935 | 1933 | sprintf(info->s, "%s:%s:%s:%s:%s:%s", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x86/x64 code logging helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic dynamic recompiler frontend structures and utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable sharp 61860 emulator interface |
| 5 | 5 | * (sharp pocket computers) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable sharp 61860 emulator interface |
| 5 | 5 | * (sharp pocket computers) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable sharp 61860 emulator interface |
| 5 | 5 | * (sharp pocket computers) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 223 | 223 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s = cpuintrf_temp_str(), "SC61860"); break; |
| 224 | 224 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0beta"); break; |
| 225 | 225 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 226 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 226 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 227 | 227 | |
| 228 | 228 | case CPUINFO_STR_FLAGS: |
| 229 | 229 | sprintf(info->s = cpuintrf_temp_str(), "%c%c", sc61860.zero?'Z':'.', sc61860.carry ? 'C':'.'); |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable sharp 61860 emulator interface |
| 5 | 5 | * (sharp pocket computers) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 286 | 286 | case CPUINFO_STR_CORE_FAMILY: strcpy( info->s = cpuintrf_temp_str(), "Nintendo Minx" ); break; |
| 287 | 287 | case CPUINFO_STR_CORE_VERSION: strcpy( info->s = cpuintrf_temp_str(), "0.1" ); break; |
| 288 | 288 | case CPUINFO_STR_CORE_FILE: strcpy( info->s = cpuintrf_temp_str(), __FILE__ ); break; |
| 289 | case CPUINFO_STR_CORE_CREDITS: strcpy( info->s = cpuintrf_temp_str(), "Copyright | |
| 289 | case CPUINFO_STR_CORE_CREDITS: strcpy( info->s = cpuintrf_temp_str(), "Copyright | |
| 290 | 290 | case CPUINFO_STR_FLAGS: |
| 291 | 291 | sprintf( info->s = cpuintrf_temp_str(), "%c%c%c%c%c%c%c%c-%c%c%c%c%c", |
| 292 | 292 | regs.F & FLAG_I ? 'I' : '.', |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | SPC700 CPU Emulator V0.90 |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | All rights reserved. |
| 10 | 10 | |
| 11 | 11 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | Sony SPC700 CPU Emulator V1.0 |
| 9 | 9 | |
| 10 | Copyright | |
| 10 | Copyright | |
| 11 | 11 | All rights reserved. |
| 12 | 12 | |
| 13 | 13 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 1799 | 1799 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Sony SPC700"); break; |
| 1800 | 1800 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1801 | 1801 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1802 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1802 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1803 | 1803 | |
| 1804 | 1804 | case CPUINFO_STR_FLAGS: |
| 1805 | 1805 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /************************************************************************** |
| 2 | 2 | * Intel 8039 Portable Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright (C) 1997 by Mirko Buffoni * | |
| 5 | * Based on the original work (C) 1997 by Dan Boris, an 8048 emulator * | |
| 4 | * Copyright Mirko Buffoni * | |
| 5 | * Based on the original work Copyright Dan Boris, an 8048 emulator * | |
| 6 | 6 | * You are not allowed to distribute this software commercially * |
| 7 | 7 | * Please, notify me, if you make any changes to this file * |
| 8 | 8 | **************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | * |
| 3 | 3 | * mcs48 disassembler |
| 4 | 4 | * |
| 5 | * This file is Copyright | |
| 5 | * This file is Copyright | |
| 6 | 6 | * Redistribution is allowed in source and binary form as long as both |
| 7 | 7 | * forms are distributed together with the file 'README'. This copyright |
| 8 | 8 | * notice must also accompany the files. |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************** |
| 2 | 2 | * Intel 8039 Portable Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright (C) 1997 by Mirko Buffoni * | |
| 5 | * Based on the original work (C) 1997 by Dan Boris, an 8048 emulator * | |
| 4 | * Copyright Mirko Buffoni * | |
| 5 | * Based on the original work Copyright Dan Boris, an 8048 emulator * | |
| 6 | 6 | * You are not allowed to distribute this software commercially * |
| 7 | 7 | * Please, notify me, if you make any changes to this file * |
| 8 | 8 | * * |
| r1490 | r1491 | |
| 865 | 865 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Intel 8039"); break; |
| 866 | 866 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.2"); break; |
| 867 | 867 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 868 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 868 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 869 | 869 | |
| 870 | 870 | case CPUINFO_STR_FLAGS: |
| 871 | 871 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | 6309dasm.c - a 6309 opcode disassembler |
| 4 | 4 | Version 1.0 5-AUG-2000 |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | Based on: |
| 8 | 8 | 6809dasm.c - a 6809 opcode disassembler |
| 9 | 9 | Version 1.4 1-MAR-95 |
| 10 | Copyright | |
| 10 | Copyright | |
| 11 | 11 | |
| 12 | 12 | Thanks to Franklin Bowen for bug fixes, ideas |
| 13 | 13 |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** hd6309: Portable 6309 emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright (C) John Butler 1997 | |
| 4 | Copyright (C) Tim Lindner 2000 | |
| 3 | Copyright John Butler | |
| 4 | Copyright Tim Lindner | |
| 5 | 5 | |
| 6 | 6 | References: |
| 7 | 7 | |
| r1490 | r1491 | |
| 1300 | 1300 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hitachi 6309"); break; |
| 1301 | 1301 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.01"); break; |
| 1302 | 1302 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1303 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1303 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1304 | 1304 | |
| 1305 | 1305 | case CPUINFO_STR_FLAGS: |
| 1306 | 1306 | sprintf(info->s, "%c%c%c%c%c%c%c%c (MD:%c%c%c%c)", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x86/x64 code logging helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 1605 | 1605 | case CPUINFO_STR_REGISTER + S2650_R1: sprintf(info->s, "R1:%02X", S.reg[1]); break; |
| 1606 | 1606 | case CPUINFO_STR_REGISTER + S2650_R2: sprintf(info->s, "R2:%02X", S.reg[2]); break; |
| 1607 | 1607 | case CPUINFO_STR_REGISTER + S2650_R3: sprintf(info->s, "R3:%02X", S.reg[3]); break; |
| 1608 | case CPUINFO_STR_REGISTER + S2650_R1A: sprintf(info->s, "R1'%02X", S.reg[4]); break; | |
| 1609 | case CPUINFO_STR_REGISTER + S2650_R2A: sprintf(info->s, "R2'%02X", S.reg[5]); break; | |
| 1610 | case CPUINFO_STR_REGISTER + S2650_R3A: sprintf(info->s, "R3'%02X", S.reg[6]); break; | |
| 1608 | case CPUINFO_STR_REGISTER + S2650_R1A: sprintf(info->s, "R1':%02X", S.reg[4]); break; | |
| 1609 | case CPUINFO_STR_REGISTER + S2650_R2A: sprintf(info->s, "R2':%02X", S.reg[5]); break; | |
| 1610 | case CPUINFO_STR_REGISTER + S2650_R3A: sprintf(info->s, "R3':%02X", S.reg[6]); break; | |
| 1611 | 1611 | case CPUINFO_STR_REGISTER + S2650_HALT: sprintf(info->s, "HALT:%X", S.halt); break; |
| 1612 | 1612 | case CPUINFO_STR_REGISTER + S2650_SI: sprintf(info->s, "SI:%X", (S.psu & SI) ? 1 : 0); break; |
| 1613 | 1613 | case CPUINFO_STR_REGISTER + S2650_FO: sprintf(info->s, "FO:%X", (S.psu & FO) ? 1 : 0); break; |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * disasm.c |
| 4 | 4 | * portable cosmac cdp1802 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 1011 | 1011 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "CDP1800"); break; |
| 1012 | 1012 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1013 | 1013 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1014 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1014 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 1015 | 1015 | |
| 1016 | 1016 | case CPUINFO_STR_REGISTER + CDP1802_PC: sprintf(info->s, "PC:%.4x", cdp1802.r[cdp1802.p]); break; |
| 1017 | 1017 | case CPUINFO_STR_REGISTER + CDP1802_R0: sprintf(info->s, "R0:%.4x", cdp1802.r[0]); break; |
| r1490 | r1491 | |
|---|---|---|
| 1915 | 1915 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Advanced Digital Chips Inc."); break; |
| 1916 | 1916 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.00"); break; |
| 1917 | 1917 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1918 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1918 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Migue | |
| 1919 | 1919 | |
| 1920 | 1920 | case CPUINFO_STR_FLAGS: |
| 1921 | 1921 | sprintf(info->s, "%c%c%c%c %c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 977 | 977 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Intel 386"); break; |
| 978 | 978 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 979 | 979 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 980 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 980 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 981 | 981 | |
| 982 | 982 | case CPUINFO_STR_FLAGS: sprintf(info->s, "%08X", get_flags()); break; |
| 983 | 983 |
| r1490 | r1491 | |
|---|---|---|
| 470 | 470 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola MC68HC11"); break; |
| 471 | 471 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 472 | 472 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 473 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 473 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 474 | 474 | |
| 475 | 475 | case CPUINFO_STR_FLAGS: |
| 476 | 476 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1956 | 1956 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "ADSP21xx"); break; |
| 1957 | 1957 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "2.0"); break; |
| 1958 | 1958 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1959 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1959 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1960 | 1960 | |
| 1961 | 1961 | case CPUINFO_STR_FLAGS: |
| 1962 | 1962 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x86 Dynamic recompiler support routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2553 | 2553 | |
| 2554 | 2554 | if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) ) |
| 2555 | 2555 | { |
| 2556 | rsp_icount = 0; | |
| 2556 | rsp_icount = MIN(rsp_icount, 0); | |
| 2557 | 2557 | } |
| 2558 | 2558 | |
| 2559 | 2559 | while (rsp_icount > 0) |
| r1490 | r1491 | |
| 2589 | 2589 | case 0x0d: /* BREAK */ |
| 2590 | 2590 | { |
| 2591 | 2591 | (config->sp_set_status)(0x3); |
| 2592 | rsp_icount = 1; | |
| 2592 | rsp_icount = MIN(rsp_icount, 1); | |
| 2593 | 2593 | |
| 2594 | 2594 | #if LOG_INSTRUCTION_EXECUTION |
| 2595 | 2595 | fprintf(exec_output, "\n---------- break ----------\n\n"); |
| r1490 | r1491 | |
| 2788 | 2788 | |
| 2789 | 2789 | if( rsp.sr & ( RSP_STATUS_HALT | RSP_STATUS_BROKE ) ) |
| 2790 | 2790 | { |
| 2791 | rsp_icount = 0; | |
| 2791 | rsp_icount = MIN(rsp_icount, 0); | |
| 2792 | 2792 | } |
| 2793 | 2793 | |
| 2794 | 2794 | } |
| r1490 | r1491 | |
| 2961 | 2961 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "RSP"); break; |
| 2962 | 2962 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 2963 | 2963 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2964 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2964 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 2965 | 2965 | |
| 2966 | 2966 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 2967 | 2967 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x86 Dynamic recompiler support routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP420 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | cop420ds.c | |
| 4 | ||
| 5 | National Semiconductor COP420 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | #include "cpuintrf.h" |
| 8 | 13 | |
| 9 | 14 | offs_t cop420_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP410 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | 410ops.c | |
| 4 | ||
| 5 | National Semiconductor COP410 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | #define ROM(A) cpu_readop(A) |
| 8 | 13 | #define RAM_W(A,V) (data_write_byte_8(A,V)) |
| 9 | 14 | #define RAM_R(A) (data_read_byte_8(A)) |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP410 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2005 by Dan Boris * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | version.c | |
| 4 | ||
| 5 | National Semiconductor COP410 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | /* |
| 8 | 13 | |
| 9 | 14 | TODO: |
| r1490 | r1491 | |
| 356 | 361 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "National Semiconductor COP410"); break; |
| 357 | 362 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 358 | 363 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 359 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 364 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 360 | 365 | |
| 361 | 366 | case CPUINFO_STR_FLAGS: |
| 362 | 367 | sprintf(info->s, " "); |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP420 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | 420ops.c | |
| 4 | ||
| 5 | National Semiconductor COP420 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | #define SC R.SC |
| 8 | 13 | |
| 9 | 14 | #define PUSH(addr) { SC = SB; SB = SA; SA = addr; } |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP420 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | cop420.c | |
| 4 | ||
| 5 | National Semiconductor COP420 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | /* |
| 8 | 13 | |
| 9 | 14 | TODO: |
| r1490 | r1491 | |
| 385 | 390 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "National Semiconductor COP420"); break; |
| 386 | 391 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 387 | 392 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 388 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 393 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 389 | 394 | |
| 390 | 395 | case CPUINFO_STR_FLAGS: |
| 391 | 396 | sprintf(info->s, " "); |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP400 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | cop400.h | |
| 4 | ||
| 5 | National Semiconductor COP400 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | #ifndef _COP400_H |
| 8 | 13 | #define _COP400_H |
| 9 | 14 |
| r1490 | r1491 | |
|---|---|---|
| 1 | /************************************************************************** | |
| 2 | * National Semiconductor COP410 Emulator * | |
| 3 | * * | |
| 4 | * Copyright (C) 2006 MAME Team * | |
| 5 | **************************************************************************/ | |
| 1 | /*************************************************************************** | |
| 6 | 2 | |
| 3 | cop410ds.c | |
| 4 | ||
| 5 | National Semiconductor COP410 Emulator. | |
| 6 | ||
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 7 | 12 | #include "cpuintrf.h" |
| 8 | 13 | |
| 9 | 14 | offs_t cop410_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * 6502dasm.c |
| 4 | 4 | * 6502/65c02/6510 disassembler |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m4510.c |
| 4 | 4 | * Portable 4510 emulator V1.0beta1 |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * documentation preliminary databook |
| 8 | 8 | * documentation by michael steil mist@c64.org |
| 9 | 9 | * available at ftp://ftp.funet.fi/pub/cbm/c65 |
| r1490 | r1491 | |
| 505 | 505 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "CBM Semiconductor Group CSG 65CE02"); break; |
| 506 | 506 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0beta"); break; |
| 507 | 507 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 508 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 508 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 509 | 509 | |
| 510 | 510 | case CPUINFO_STR_FLAGS: |
| 511 | 511 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tbl65sc02.c |
| 4 | 4 | * 65sc02 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | * of the ADC and SBC instructions, so all opcodes except ADC/SBC |
| 8 | 8 | * are simply mapped to the m6502 ones. |
| 9 | 9 | * |
| 10 | * Copyright | |
| 10 | * Copyright | |
| 11 | 11 | * |
| 12 | 12 | * - This source code is released as freeware for non-commercial purposes. |
| 13 | 13 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * ops02.h |
| 4 | 4 | * Addressing mode and opcode macros for 6502,65c02,65sc02,6510,n2a03 CPUs |
| 5 | 5 | * |
| 6 | * Copyright (c) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright (c) 2000 Peter Trauner, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright Peter Trauner, all rights reserved. | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m6502.c |
| 4 | 4 | * Portable 6502/65c02/65sc02/6510/n2a03 emulator V1.2 |
| 5 | 5 | * |
| 6 | * Copyright (c) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright (c) 2000 Peter Trauner. | |
| 8 | * Deco16 portions Copyright (c) 2001-2003 Bryan McPhail. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright Peter Trauner. | |
| 8 | * Deco16 portions Copyright Bryan McPhail. | |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| 11 | 11 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 754 | 754 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Mostek 6502"); break; |
| 755 | 755 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.2"); break; |
| 756 | 756 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 757 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 757 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 758 | 758 | |
| 759 | 759 | case CPUINFO_STR_FLAGS: |
| 760 | 760 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
| 957 | 957 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Metal Oxid Semiconductor MOS 6502"); break; |
| 958 | 958 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0beta"); break; |
| 959 | 959 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 960 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 960 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 961 | 961 | |
| 962 | 962 | default: m65c02_get_info(state, info); break; |
| 963 | 963 | } |
| r1490 | r1491 | |
| 1005 | 1005 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "DECO"); break; |
| 1006 | 1006 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.1"); break; |
| 1007 | 1007 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1008 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1008 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1009 | 1009 | |
| 1010 | 1010 | default: m6502_get_info(state, info); break; |
| 1011 | 1011 | } |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m4510.c |
| 4 | 4 | * Portable 4510 emulator V1.0beta |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m6502ops.h |
| 4 | 4 | * Addressing mode and opcode macros for 6502,65c02,65sc02,6510,n2a03 CPUs |
| 5 | 5 | * |
| 6 | * Copyright (c) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright (c) 2000 Peter Trauner, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright Peter Trauner, all rights reserved. | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m6502.h |
| 4 | 4 | * Portable 6502/65c02/65sc02/6510/n2a03 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright (c) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright (c) 2000 Peter Trauner. | |
| 8 | * Deco16 portions Copyright (c) 2001 Bryan McPhail. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright Peter Trauner. | |
| 8 | * Deco16 portions Copyright Bryan McPhail. | |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| 11 | 11 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | * |
| 3 | 3 | * ops09.h |
| 4 | 4 | * |
| 5 | * Copyright | |
| 5 | * Copyright | |
| 6 | 6 | * documentation by michael steil mist@c64.org |
| 7 | 7 | * available at ftp://ftp.funet.fi/pub/cbm/c65 |
| 8 | 8 | * |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tbl6510.c |
| 4 | 4 | * 6510 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * ops4510.h |
| 4 | 4 | * Addressing mode and opcode macros for 4510 CPU |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * documentation preliminary databook |
| 8 | 8 | * documentation by michael steil mist@c64.org |
| 9 | 9 | * available at ftp://ftp.funet.fi/pub/cbm/c65 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m6509.c |
| 4 | 4 | * Portable 6509 emulator V1.0beta1 |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * documentation by vice emulator team |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
| 380 | 380 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "MOS Technology 6509"); break; |
| 381 | 381 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0beta"); break; |
| 382 | 382 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 383 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 383 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 384 | 384 | |
| 385 | 385 | case CPUINFO_STR_FLAGS: |
| 386 | 386 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * opsce02.h |
| 4 | 4 | * Addressing mode and opcode macros for 65ce02 CPU |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * documentation preliminary databook |
| 8 | 8 | * documentation by michael steil mist@c64.org |
| 9 | 9 | * available at ftp://ftp.funet.fi/pub/cbm/c65 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tbl6502.c |
| 4 | 4 | * 6502 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m65ce02.c |
| 4 | 4 | * Portable 65ce02 emulator V1.0beta3 |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * documentation preliminary databook |
| 8 | 8 | * documentation by michael steil mist@c64.org |
| 9 | 9 | * available at ftp://ftp.funet.fi/pub/cbm/c65 |
| r1490 | r1491 | |
| 361 | 361 | case CPU_INFO_FAMILY: return "CBM Semiconductor Group CSG 65CE02"; |
| 362 | 362 | case CPU_INFO_VERSION: return "1.0beta"; |
| 363 | 363 | case CPU_INFO_CREDITS: |
| 364 | return "Copyright (c) 1998 Juergen Buchmueller\n" | |
| 365 | "Copyright (c) 2000 Peter Trauner\n" | |
| 364 | return "Copyright Juergen Buchmueller\n" | |
| 365 | "Copyright Peter Trauner\n" | |
| 366 | 366 | "all rights reserved."; |
| 367 | 367 | case CPU_INFO_FILE: return __FILE__; |
| 368 | 368 | case CPU_INFO_REG_LAYOUT: return (const char*)m65ce02_reg_layout; |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tbl65c02.c |
| 4 | 4 | * 65c02 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m6509.h |
| 4 | 4 | * Portable 6509 emulator V1.0beta |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * m65ce02.c |
| 4 | 4 | * Portable 65ce02 emulator V1.0beta |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * ill02.h |
| 4 | 4 | * Addressing mode and opcode macros for the NMOS 6502 illegal opcodes |
| 5 | 5 | * |
| 6 | * Copyright (c) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright (c) 2000 Peter Trauner, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 7 | * 65sc02 core Copyright Peter Trauner, all rights reserved. | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tbl6509.c |
| 4 | 4 | * 6509 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * t65ce02.c |
| 4 | 4 | * 65ce02 opcode functions and function pointer table |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 1662 | 1662 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Atari Jaguar"); break; |
| 1663 | 1663 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1664 | 1664 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1665 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1665 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1666 | 1666 | |
| 1667 | 1667 | case CPUINFO_STR_FLAGS: sprintf(info->s, "%c%c%c%c%c%c%c%c%c%c%c", |
| 1668 | 1668 | jaguar.FLAGS & 0x8000 ? 'D':'.', |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * 8085dasm.c |
| 4 | 4 | * Portable I8085A disassembler |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * i8085.c |
| 4 | 4 | * Portable I8085A emulator V1.2 |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * Partially based on information out of Z80Em by Marcel De Kogel |
| 8 | 8 | * |
| 9 | 9 | * changes in V1.3 |
| r1490 | r1491 | |
| 37 | 37 | * OUT (#),A 10 11 / |
| 38 | 38 | * EX (SP),HL 18 19 / |
| 39 | 39 | * |
| 40 | * Copyright | |
| 40 | * Copyright | |
| 41 | 41 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 42 | 42 | * |
| 43 | 43 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
| 1687 | 1687 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Intel 8080"); break; |
| 1688 | 1688 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.1"); break; |
| 1689 | 1689 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1690 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1690 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1691 | 1691 | |
| 1692 | 1692 | case CPUINFO_STR_FLAGS: |
| 1693 | 1693 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1819 | 1819 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "PowerPC"); break; |
| 1820 | 1820 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1821 | 1821 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1822 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1822 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 1823 | 1823 | |
| 1824 | 1824 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 1825 | 1825 |
| r1490 | r1491 | |
|---|---|---|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | static void ppcdrc_exit(void) | |
| 114 | { | |
| 115 | drc_exit(ppc.drc); | |
| 116 | } | |
| 117 | ||
| 113 | 118 | static UINT32 *ppcdrc_getopptr(UINT32 address) |
| 114 | 119 | { |
| 115 | 120 | UINT32 *result; |
| r1490 | r1491 | |
|---|---|---|
| 1101 | 1101 | #if LOG_CODE |
| 1102 | 1102 | //if (symfile) fclose(symfile); |
| 1103 | 1103 | #endif |
| 1104 | drc_exit( | |
| 1104 | ppcdrc_exit( | |
| 1105 | 1105 | } |
| 1106 | 1106 | |
| 1107 | 1107 | static void ppcdrc403_reset(void) |
| r1490 | r1491 | |
| 1343 | 1343 | #if LOG_CODE |
| 1344 | 1344 | //if (symfile) fclose(symfile); |
| 1345 | 1345 | #endif |
| 1346 | drc_exit( | |
| 1346 | ppcdrc_exit( | |
| 1347 | 1347 | } |
| 1348 | 1348 | #endif |
| 1349 | 1349 | |
| r1490 | r1491 | |
| 1534 | 1534 | #if LOG_CODE |
| 1535 | 1535 | //if (symfile) fclose(symfile); |
| 1536 | 1536 | #endif |
| 1537 | drc_exit( | |
| 1537 | ppcdrc_exit( | |
| 1538 | 1538 | } |
| 1539 | 1539 | |
| 1540 | 1540 | static void ppcdrc602_reset(void) |
| r1490 | r1491 | |
| 1718 | 1718 | |
| 1719 | 1719 | static void mpc8240drc_exit(void) |
| 1720 | 1720 | { |
| 1721 | ||
| 1721 | ppcdrc_exit(); | |
| 1722 | 1722 | } |
| 1723 | 1723 | #endif |
| 1724 | 1724 | |
| r1490 | r1491 | |
| 1865 | 1865 | #if LOG_CODE |
| 1866 | 1866 | //if (symfile) fclose(symfile); |
| 1867 | 1867 | #endif |
| 1868 | drc_exit( | |
| 1868 | ppcdrc_exit( | |
| 1869 | 1869 | } |
| 1870 | 1870 | #endif |
| 1871 | 1871 | |
| r1490 | r1491 | |
| 1998 | 1998 | #if LOG_CODE |
| 1999 | 1999 | //if (symfile) fclose(symfile); |
| 2000 | 2000 | #endif |
| 2001 | drc_exit( | |
| 2001 | ppcdrc_exit( | |
| 2002 | 2002 | } |
| 2003 | 2003 | #endif |
| 2004 | 2004 | |
| r1490 | r1491 | |
| 2162 | 2162 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "PowerPC"); break; |
| 2163 | 2163 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 2164 | 2164 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2165 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2165 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; | |
| 2166 | 2166 | |
| 2167 | 2167 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 2168 | 2168 |
| r1490 | r1491 | |
|---|---|---|
| 1540 | 1540 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Acorn Risc Machine"); break; |
| 1541 | 1541 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.3"); break; |
| 1542 | 1542 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1543 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1543 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1544 | 1544 | |
| 1545 | 1545 | case CPUINFO_STR_FLAGS: |
| 1546 | 1546 | sprintf(info->s, "%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * Portable Z8000(2) emulator |
| 5 | 5 | * Macros and types used in z8000.c / z8000ops.c / z8000tbl.c |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * Bug fixes and MSB_FIRST compliance Ernesto Corvi. |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * Portable Z8000(2) emulator |
| 5 | 5 | * Z8000 MAME interface |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
| 697 | 697 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Zilog Z8000"); break; |
| 698 | 698 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.1"); break; |
| 699 | 699 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 700 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 700 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 701 | 701 | |
| 702 | 702 | case CPUINFO_STR_FLAGS: |
| 703 | 703 | sprintf(info->s, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * Portable Z8000(2) emulator |
| 5 | 5 | * Opcode functions |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * Bug fixes and MSB_FIRST compliance Ernesto Corvi. |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * Portable Z8000(2) emulator |
| 5 | 5 | * Opcode table (including mnemonics) and initialization |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * Bug fixes and MSB_FIRST compliance Ernesto Corvi. |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * Portable Z8000(2) emulator |
| 5 | 5 | * Z8000 disassembler; requires the z8000_exec table to be initialized |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS32010 DSP Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * You are not allowed to distribute this software commercially. * |
| 6 | 6 | * Written for the MAME project. * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS32010 DSP Disassembler * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * You are not allowed to distribute this software commercially. * |
| 6 | 6 | * Written for the MAME project. * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS32010 DSP Disassembler * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * To be used with TMS32010 DSP Emulator engine. * |
| 6 | 6 | * You are not allowed to distribute this software commercially. * |
| 7 | 7 | * Written for the MAME project. * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS32010 DSP Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * You are not allowed to distribute this software commercially. * |
| 6 | 6 | * Written for the MAME project. * |
| 7 | 7 | * * |
| r1490 | r1491 | |
| 944 | 944 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Texas Instruments TMS32010"); break; |
| 945 | 945 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.22"); break; |
| 946 | 946 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 947 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 947 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 948 | 948 | |
| 949 | 949 | case CPUINFO_STR_FLAGS: |
| 950 | 950 | sprintf(info->s, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 504 | 504 | case CPUINFO_STR_CORE_FAMILY: strcpy( info->s = cpuintrf_temp_str(), "Sharp SM8500" ); break; |
| 505 | 505 | case CPUINFO_STR_CORE_VERSION: strcpy( info->s = cpuintrf_temp_str(), "0.1" ); break; |
| 506 | 506 | case CPUINFO_STR_CORE_FILE: strcpy( info->s = cpuintrf_temp_str(), __FILE__ ); break; |
| 507 | case CPUINFO_STR_CORE_CREDITS: strcpy( info->s = cpuintrf_temp_str(), "Copyright | |
| 507 | case CPUINFO_STR_CORE_CREDITS: strcpy( info->s = cpuintrf_temp_str(), "Copyright | |
| 508 | 508 | case CPUINFO_STR_FLAGS: |
| 509 | 509 | sprintf( info->s = cpuintrf_temp_str(), "%c%c%c%c%c%c%c%c", |
| 510 | 510 | regs.PS1 & FLAG_C ? 'C' : '.', |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * sh2.h |
| 4 | 4 | * Portable Hitachi SH-2 (SH7600 family) emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * all rights reserved. |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * sh2.c |
| 4 | 4 | * Portable Hitachi SH-2 (SH7600 family) emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * all rights reserved. |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
| 3137 | 3137 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hitachi SH7600"); break; |
| 3138 | 3138 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.01"); break; |
| 3139 | 3139 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 3140 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3140 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3141 | 3141 | |
| 3142 | 3142 | case CPUINFO_STR_FLAGS: |
| 3143 | 3143 | sprintf(info->s, "%c%c%d%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 638 | 638 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "TMS3205x"); break; |
| 639 | 639 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 640 | 640 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 641 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 641 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 642 | 642 | |
| 643 | 643 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 644 | 644 |
| r1490 | r1491 | |
|---|---|---|
| 4990 | 4990 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hitachi SH7750"); break; |
| 4991 | 4991 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 4992 | 4992 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 4993 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 4993 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 4994 | 4994 | |
| 4995 | 4995 | case CPUINFO_STR_FLAGS: |
| 4996 | 4996 | sprintf(info->s, "%s%s%s%s%c%c%d%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 859 | 859 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Fujitsu MB88xx"); break; |
| 860 | 860 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 861 | 861 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 862 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 862 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 863 | 863 | |
| 864 | 864 | case CPUINFO_STR_FLAGS: |
| 865 | 865 | sprintf(info->s, "%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************** |
| 2 | 2 | Alpha 8201/8301 Disassembler |
| 3 | 3 | |
| 4 | Copyright | |
| 4 | Copyright | |
| 5 | 5 | Originally written for the MAME project. |
| 6 | 6 | |
| 7 | 7 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************** |
| 2 | 2 | Alpha8201 Emulator |
| 3 | 3 | |
| 4 | Copyright | |
| 4 | Copyright | |
| 5 | 5 | Originally written for the MAME project. |
| 6 | 6 | |
| 7 | 7 | Notes : |
| r1490 | r1491 | |
| 956 | 956 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "AlphaDenshi MCU"); break; |
| 957 | 957 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.1"); break; |
| 958 | 958 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 959 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 959 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 960 | 960 | case CPUINFO_STR_FLAGS: sprintf(info->s, "%c%c", CF?'C':'.',ZF?'Z':'.'); break; |
| 961 | 961 | case CPUINFO_STR_REGISTER + ALPHA8201_PC: sprintf(info->s, "PC:%03X", PC); break; |
| 962 | 962 | case CPUINFO_STR_REGISTER + ALPHA8201_SP: sprintf(info->s, "SP:%02X", M_RDMEM(0x001) ); break; |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Alpha8201 Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Originally written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | G65C816 CPU Emulator V0.93 |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | All rights reserved. |
| 10 | 10 | |
| 11 | 11 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
| 442 | 442 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "6500"); break; |
| 443 | 443 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.94"); break; |
| 444 | 444 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 445 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 445 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 446 | 446 | |
| 447 | 447 | case CPUINFO_STR_FLAGS: |
| 448 | 448 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | G65C816 CPU Emulator V0.92 |
| 10 | 10 | |
| 11 | Copyright | |
| 11 | Copyright | |
| 12 | 12 | All rights reserved. |
| 13 | 13 | |
| 14 | 14 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | G65C816 CPU Emulator V0.90 |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | All rights reserved. |
| 10 | 10 | |
| 11 | 11 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | G65C816 CPU Emulator V0.92 |
| 9 | 9 | |
| 10 | Copyright | |
| 10 | Copyright | |
| 11 | 11 | All rights reserved. |
| 12 | 12 | |
| 13 | 13 | Permission is granted to use this source code for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | * 8054 Product Line (8054) |
| 10 | 10 | * 8058 Product Line (8058) |
| 11 | 11 | * |
| 12 | * Copyright | |
| 12 | * Copyright | |
| 13 | 13 | * |
| 14 | 14 | * - This source code is released as freeware for non-commercial purposes. |
| 15 | 15 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 30 | 30 | * |
| 31 | 31 | ***************************************************************************** |
| 32 | 32 | * Symbol Memory Name Tables borrowed from: |
| 33 | * D52 8052 Disassembler - Copyright (C) 1995-2002 by | |
| 34 | * Jeffery L. Post | |
| 33 | * D52 8052 Disassembler - Copyright Jeffery L. Post | |
| 35 | 34 | *****************************************************************************/ |
| 36 | 35 | |
| 37 | 36 | #include "debugger.h" |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | * 8054 Product Line (8054) |
| 10 | 10 | * 8058 Product Line (8058) |
| 11 | 11 | * |
| 12 | * Copyright | |
| 12 | * Copyright | |
| 13 | 13 | * |
| 14 | 14 | * - This source code is released as freeware for non-commercial purposes. |
| 15 | 15 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 2492 | 2492 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "MCS-51"); break; |
| 2493 | 2493 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 2494 | 2494 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2495 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2495 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2496 | 2496 | |
| 2497 | 2497 | case CPUINFO_STR_FLAGS: |
| 2498 | 2498 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | * 8054 Product Line (8054) |
| 10 | 10 | * 8058 Product Line (8058) |
| 11 | 11 | * |
| 12 | * Copyright | |
| 12 | * Copyright | |
| 13 | 13 | * |
| 14 | 14 | * - This source code is released as freeware for non-commercial purposes. |
| 15 | 15 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x64 MIPS III recompiler. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| r1490 | r1491 | |
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | #endif |
| 485 | drc_exit(mips3.drc); | |
| 485 | 486 | } |
| 486 | 487 | |
| 487 | 488 | |
| r1490 | r1491 | |
| 1852 | 1853 | |
| 1853 | 1854 | static void append_check_interrupts(drc_core *drc, compiler_state *compiler, const opcode_desc *desc) |
| 1854 | 1855 | { |
| 1855 | emit_link link1, link2; | |
| 1856 | emit_link link1, link2, link3 = { 0 }; | |
| 1856 | 1857 | |
| 1857 | 1858 | emit_mov_r32_m32(DRCTOP, REG_EAX, CPR0ADDR(COP0_Cause)); // mov eax,[Cause] |
| 1858 | 1859 | emit_and_r32_m32(DRCTOP, REG_EAX, CPR0ADDR(COP0_Status)); // and eax,[Status] |
| r1490 | r1491 | |
| 1864 | 1865 | if (desc == NULL) |
| 1865 | 1866 | { |
| 1866 | 1867 | emit_mov_r32_m32(DRCTOP, REG_P1, MDRC(drc->pcptr)); // mov p1,[pc] |
| 1867 | emit_jcc(DRCTOP, COND_Z, mips3.drcdata->generate_interrupt_exception); // jz generate_interrupt_exception | |
| 1868 | emit_jcc_short_link(DRCTOP, COND_NZ, &link3); // jnz skip | |
| 1869 | emit_jmp_m64(DRCTOP, MDRC(&mips3.drcdata->generate_interrupt_exception)); // jmp generate_interrupt_exception | |
| 1868 | 1870 | } |
| 1869 | 1871 | else |
| 1870 | 1872 | oob_request_callback(drc, COND_Z, oob_interrupt_cleanup, compiler, desc, mips3.drcdata->generate_interrupt_exception); |
| 1871 | 1873 | resolve_link(DRCTOP, &link1); // skip: |
| 1872 | 1874 | resolve_link(DRCTOP, &link2); |
| 1875 | if (desc == NULL) | |
| 1876 | resolve_link(DRCTOP, &link3); | |
| 1873 | 1877 | } |
| 1874 | 1878 | |
| 1875 | 1879 | |
| r1490 | r1491 | |
| 3033 | 3037 | emit_mov_r32_m32(DRCTOP, REG_EDX, CPR0ADDR(COP0_Status)); // mov edx,[Status] |
| 3034 | 3038 | emit_mov_m32_r32(DRCTOP, CPR0ADDR(COP0_Status), REG_EAX); // mov [Status],eax |
| 3035 | 3039 | emit_xor_r32_r32(DRCTOP, REG_EDX, REG_EAX); // xor edx,eax |
| 3036 | emit_test_r32_imm(DRCTOP, REG_EDX, | |
| 3040 | emit_test_r32_imm(DRCTOP, REG_EDX, SR_IMEX5); // test edx,0x8000 | |
| 3037 | 3041 | emit_jcc_short_link(DRCTOP, COND_Z, &link1); // jz skip |
| 3038 | 3042 | emit_lea_r64_m64(DRCTOP, REG_P1, COREADDR); // lea p1,[mips3.core] |
| 3039 | 3043 | emit_call_m64(DRCTOP, MDRC(&mips3.drcdata->mips3com_update_cycle_counting)); // call mips3com_update_cycle_counting |
| r1490 | r1491 | |
|---|---|---|
| 1296 | 1296 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "MIPS II"); break; |
| 1297 | 1297 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1298 | 1298 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1299 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1299 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1300 | 1300 | |
| 1301 | 1301 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 1302 | 1302 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Front-end for MIPS3 recompiler |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 3484 | 3484 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "mipscpu"); break; |
| 3485 | 3485 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.5"); break; |
| 3486 | 3486 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 3487 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3487 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3488 | 3488 | |
| 3489 | 3489 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 3490 | 3490 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Front-end for MIPS3 recompiler |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 252 | 252 | x86log_free_context(mips3.log); |
| 253 | 253 | |
| 254 | 254 | /* clean up the DRC */ |
| 255 | mips3drc_exit(); | |
| 256 | 255 | drcfe_exit(mips3.drcfe); |
| 257 | drc_exit( | |
| 256 | mips3drc_exit( | |
| 258 | 257 | |
| 259 | 258 | /* free the cache */ |
| 260 | 259 | osd_free_executable(mips3.core, CACHE_SIZE + sizeof(*mips3.core)); |
| r1490 | r1491 | |
|---|---|---|
| 268 | 268 | |
| 269 | 269 | static void mips3drc_exit(void) |
| 270 | 270 | { |
| 271 | drc_exit(mips3.drc); | |
| 271 | 272 | } |
| 272 | 273 | |
| 273 | 274 |
| r1490 | r1491 | |
|---|---|---|
| 174 | 174 | void mips3com_update_cycle_counting(mips3_state *mips) |
| 175 | 175 | { |
| 176 | 176 | /* modify the timer to go off */ |
| 177 | if ((mips->cpr[0][COP0_Status] & | |
| 177 | if ((mips->cpr[0][COP0_Status] & SR_IMEX5) && mips->cpr[0][COP0_Compare] != 0xffffffff) | |
| 178 | 178 | { |
| 179 | 179 | UINT32 count = (activecpu_gettotalcycles64() - mips->count_zero_time) / 2; |
| 180 | 180 | UINT32 compare = mips->cpr[0][COP0_Compare]; |
| 181 | 181 | UINT32 cyclesleft = compare - count; |
| 182 | 182 | attotime newtime = ATTOTIME_IN_CYCLES(((INT64)cyclesleft * 2), cpu_getactivecpu()); |
| 183 | ||
| 184 | /* due to accuracy issues, don't bother setting timers unless they're for less than 100msec */ | |
| 185 | if (attotime_compare(newtime, ATTOTIME_IN_MSEC(100)) < 0) | |
| 186 | timer_adjust(mips->compare_int_timer, newtime, cpu_getactivecpu(), attotime_zero); | |
| 183 | timer_adjust(mips->compare_int_timer, newtime, cpu_getactivecpu(), attotime_zero); | |
| 187 | 184 | } |
| 188 | 185 | else |
| 189 | 186 | timer_adjust(mips->compare_int_timer, attotime_never, cpu_getactivecpu(), attotime_zero); |
| r1490 | r1491 | |
| 620 | 617 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "MIPS III"); break; |
| 621 | 618 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.0"); break; |
| 622 | 619 | case CPUINFO_STR_CORE_FILE: /* provided by core */ break; |
| 623 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 620 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 624 | 621 | |
| 625 | 622 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 626 | 623 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tms7000.h (c header file) |
| 4 | 4 | * Portable TMS7000 emulator (Texas Instruments 7000) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tms70tb.c (function table) |
| 4 | 4 | * Portable TMS7000 emulator (Texas Instruments 7000) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tms70op.c (Op code functions) |
| 4 | 4 | * Portable TMS7000 emulator (Texas Instruments 7000) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * tms7000.c |
| 4 | 4 | * Portable TMS7000 emulator (Texas Instruments 7000) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 340 | 340 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s = cpuintrf_temp_str(), "Texas Instriuments TMS7000"); break; |
| 341 | 341 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0"); break; |
| 342 | 342 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 343 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 343 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 344 | 344 | |
| 345 | 345 | case CPUINFO_STR_FLAGS: |
| 346 | 346 | sprintf(info->s = cpuintrf_temp_str(), "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * f8.h |
| 4 | 4 | * Portable Fairchild F8 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * f8.c |
| 4 | 4 | * Portable F8 emulator (Fairchild 3850) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 2127 | 2127 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0"); break; |
| 2128 | 2128 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 2129 | 2129 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), |
| 2130 | "Copyright | |
| 2130 | "Copyright | |
| 2131 | 2131 | break; |
| 2132 | 2132 | |
| 2133 | 2133 | case CPUINFO_STR_FLAGS: |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * z80.c |
| 4 | 4 | * Portable Z80 emulator V3.5 |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 3770 | 3770 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Zilog Z80"); break; |
| 3771 | 3771 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.7"); break; |
| 3772 | 3772 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 3773 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3773 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 3774 | 3774 | |
| 3775 | 3775 | case CPUINFO_STR_FLAGS: |
| 3776 | 3776 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * z80dasm.c |
| 4 | 4 | * Portable Z80 disassembler |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 1815 | 1815 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Atari ASAP"); break; |
| 1816 | 1816 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1817 | 1817 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1818 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1818 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1819 | 1819 | |
| 1820 | 1820 | case CPUINFO_STR_FLAGS: strcpy(info->s, " "); break; |
| 1821 | 1821 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * 9900dasm.c |
| 4 | 4 | * TMS 9900 family disassembler |
| 5 | 5 | * |
| 6 | * Raphael Nabet 2003 | |
| 7 | * Based on previous work Copyright (c) 1998 John Butler. | |
| 6 | * Copyright Raphael Nabet | |
| 7 | * Based on previous work Copyright John Butler. | |
| 8 | 8 | * Based on 6502dasm.c 6502/65c02/6510 disassembler by Juergen Buchmueller |
| 9 | 9 | * |
| 10 | 10 | * - This source code is released as freeware for non-commercial purposes. |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic x86/x64 code emitters. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Released for general use under the MAME license |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x64 Dynamic recompiler support routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS320x25 DSP Disassembler * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * To be used with TMS320x25 DSP Emulator engine. * |
| 6 | 6 | * Written for the MAME project. * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS320x25 DSP Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
| 2396 | 2396 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Texas Instruments TMS320x25"); break; |
| 2397 | 2397 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.10"); break; |
| 2398 | 2398 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2399 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2399 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2400 | 2400 | |
| 2401 | 2401 | case CPUINFO_STR_FLAGS: |
| 2402 | 2402 | sprintf(info->s, "arp%d%c%c%c%cdp%03x arb%d%c%c%c%c%c%c%c%c%c%c%cpm%d", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS320x25 DSP Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * Note : This is a word based microcontroller, with addressing * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Texas Instruments TMS320x25 DSP Disassembler * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * Notes : Data is expected to be read from source file as MSB first. * |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | x64 Dynamic recompiler support routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Microchip PIC16C5x Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Originally written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
| 1021 | 1021 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Microchip"); break; |
| 1022 | 1022 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.12"); break; |
| 1023 | 1023 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1024 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1024 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1025 | 1025 | |
| 1026 | 1026 | case CPUINFO_STR_FLAGS: |
| 1027 | 1027 | sprintf(info->s, "%01x%c%c%c%c%c %c%c%c%03x", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Microchip PIC16C5x Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Originally written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Microchip PIC16C5x Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Originally written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /**************************************************************************\ |
| 2 | 2 | * Microchip PIC16C5x Emulator * |
| 3 | 3 | * * |
| 4 | * Copyright | |
| 4 | * Copyright | |
| 5 | 5 | * Originally written for the MAME project. * |
| 6 | 6 | * * |
| 7 | 7 | * * |
| r1490 | r1491 | |
|---|---|---|
| 1651 | 1651 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Fujitsu MB86233"); break; |
| 1652 | 1652 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 1653 | 1653 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 1654 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 1654 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Migue | |
| 1655 | 1655 | |
| 1656 | 1656 | case CPUINFO_STR_FLAGS: |
| 1657 | 1657 | sprintf(info->s, "%c%c", (GETSR()&SIGN_FLAG) ? 'N' : 'n', (GETSR()&ZERO_FLAG) ? 'Z' : 'z' ); |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** t11: Portable DEC T-11 emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright | |
| 4 | 4 | |
| 5 | 5 | System dependencies: long must be at least 32 bits |
| 6 | 6 | word must be 16 bit unsigned int |
| r1490 | r1491 | |
| 513 | 513 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "DEC T-11"); break; |
| 514 | 514 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 515 | 515 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 516 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 516 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 517 | 517 | |
| 518 | 518 | case CPUINFO_STR_FLAGS: |
| 519 | 519 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** t11: Portable DEC T-11 emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright | |
| 4 | 4 | |
| 5 | 5 | Actual opcode implementation. Excuse the excessive use of macros, it |
| 6 | 6 | was the only way I could bear to type all this in! |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** t11: Portable DEC T-11 emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright | |
| 4 | 4 | |
| 5 | 5 | Opcode table plus function prototypes |
| 6 | 6 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7core.c |
| 4 | 4 | * Portable ARM7TDMI Core Emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7core.h |
| 4 | 4 | * Portable ARM7TDMI Core Emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7.c |
| 4 | 4 | * Portable ARM7TDMI CPU Emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 351 | 351 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Acorn Risc Machine"); break; |
| 352 | 352 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.3"); break; |
| 353 | 353 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 354 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 354 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 355 | 355 | |
| 356 | 356 | case CPUINFO_STR_FLAGS: |
| 357 | 357 | sprintf(info->s, "%c%c%c%c%c%c%c %s", |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7.h |
| 4 | 4 | * Portable ARM7TDMI CPU Emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7dasm.c |
| 4 | 4 | * Portable ARM7TDMI Core Emulator - Disassembler |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * arm7exec.c |
| 4 | 4 | * Portable ARM7TDMI Core Emulator |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | h6280ops.h - Addressing modes and opcode macros for the Hu6820 cpu |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | This source code is based (with permission!) on the 6502 emulator by |
| 8 | 8 | Juergen Buchmueller. It is released as part of the Mame emulator project. |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | 6280dasm.c Hudsonsoft Hu6280 (HuC6280/Hu6280a) disassembler |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | This source code is based (with permission!) on the 6502 emulator by |
| 8 | 8 | Juergen Buchmueller. It is released as part of the Mame emulator project. |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | h6280.c - Portable HuC6280 emulator |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | This source code is based (with permission!) on the 6502 emulator by |
| 8 | 8 | Juergen Buchmueller. It is released as part of the Mame emulator project. |
| r1490 | r1491 | |
| 523 | 523 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hudsonsoft 6280"); break; |
| 524 | 524 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.11"); break; |
| 525 | 525 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 526 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 526 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 527 | 527 | |
| 528 | 528 | case CPUINFO_STR_FLAGS: |
| 529 | 529 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | tblh6280.c |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | This source code is based (with permission!) on the 6502 emulator by |
| 8 | 8 | Juergen Buchmueller. It is released as part of the Mame emulator project. |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | h6280.h Portable Hu6280 emulator interface |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | |
| 7 | 7 | This source code is based (with permission!) on the 6502 emulator by |
| 8 | 8 | Juergen Buchmueller. It is released as part of the Mame emulator project. |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * cp1610.h |
| 4 | 4 | * Portable General Instruments CP1610 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * cp1610.c |
| 4 | 4 | * Portable CP1610 emulator (General Instrument CP1610) |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 3500 | 3500 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0"); break; |
| 3501 | 3501 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 3502 | 3502 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), |
| 3503 | "Copyright | |
| 3503 | "Copyright | |
| 3504 | 3504 | break; |
| 3505 | 3505 | case CPUINFO_STR_FLAGS: |
| 3506 | 3506 | sprintf(info->s = cpuintrf_temp_str(), "%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable saturn emulator interface |
| 5 | 5 | * (hp calculators) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable saturn emulator interface |
| 5 | 5 | * (hp calculators) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | * portable saturn emulator interface |
| 5 | 5 | * (hp calculators) |
| 6 | 6 | * |
| 7 | * Copyright | |
| 7 | * Copyright | |
| 8 | 8 | * |
| 9 | 9 | * - This source code is released as freeware for non-commercial purposes. |
| 10 | 10 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 386 | 386 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s = cpuintrf_temp_str(), "Saturn"); break; |
| 387 | 387 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.0alpha"); break; |
| 388 | 388 | case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), __FILE__); break; |
| 389 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 389 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright | |
| 390 | 390 | |
| 391 | 391 | case CPUINFO_STR_REGISTER + SATURN_PC: sprintf(info->s = cpuintrf_temp_str(), "PC: %.5x", saturn.pc);break; |
| 392 | 392 | case CPUINFO_STR_REGISTER + SATURN_D0: sprintf(info->s = cpuintrf_temp_str(), "D0: %.5x", saturn.d[0]);break; |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * i8x41.h |
| 4 | 4 | * Portable UPI-41/8041/8741/8042/8742 emulator interface |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright | |
| 7 | 7 | * |
| 8 | 8 | * - This source code is released as freeware for non-commercial purposes. |
| 9 | 9 | * - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * i8x41.c |
| 4 | 4 | * Portable UPI-41/8041/8741/8042/8742 emulator V0.2 |
| 5 | 5 | * |
| 6 | * Copyright (c) 1999 Juergen Buchmueller, all rights reserved. | |
| 7 | * | |
| 8 | * Copyright (C) 1998,1999,2000 Juergen Buchmueller, all rights reserved. | |
| 6 | * Copyright Juergen Buchmueller, all rights reserved. | |
| 9 | 7 | * You can contact me at juergen@mame.net or pullmoll@stop1984.com |
| 10 | 8 | * |
| 11 | 9 | * - This source code is released as freeware for non-commercial purposes |
| r1490 | r1491 | |
| 2280 | 2278 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Intel 8x41"); break; |
| 2281 | 2279 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.3"); break; |
| 2282 | 2280 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2283 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2281 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 2284 | 2282 | |
| 2285 | 2283 | case CPUINFO_STR_FLAGS: |
| 2286 | 2284 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /*** konami: Portable Konami cpu emulator ****************************************** |
| 2 | 2 | |
| 3 | Copyright | |
| 3 | Copyright Nicola Salmoria and the MAME Team | |
| 4 | 4 | |
| 5 | Based on M6809 cpu core copyright | |
| 5 | Based on M6809 cpu core copyright | |
| 6 | 6 | |
| 7 | 7 | References: |
| 8 | 8 | |
| r1490 | r1491 | |
| 619 | 619 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "KONAMI 5000x"); break; |
| 620 | 620 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; |
| 621 | 621 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 622 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright | |
| 622 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team | |
| 623 | 623 | |
| 624 | 624 | case CPUINFO_STR_FLAGS: |
| 625 | 625 | sprintf(info->s, "%c%c%c%c%c%c%c%c", |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions which help convert between different handlers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Wrappers for handling MAME configuration files |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Handle general purpose audio streams |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple sound functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple sound functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Internal graphics viewer. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Functions used to retrieve text used by MAME, to aid in |
| 6 | 6 | translation. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Function to handle hash functions (checksums) |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | Started by Farfetch'd |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Handle general purpose audio streams |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | x86 (32 and 64-bit) inline implementations for GCC compilers. This |
| 6 | 6 | code is automatically included if appropriate by eminline.h. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Compute weights for resistors networks. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ****************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | * vector.c |
| 4 | 4 | * |
| 5 | 5 | * |
| 6 | * Copyright | |
| 6 | * Copyright Nicola | |
| 7 | 7 | * |
| 8 | 8 | * anti-alias code by Andrew Caldwell |
| 9 | 9 | * (still more to add) |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Compute weights for resistors networks. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | General RGB utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | VMX/Altivec optimised RGB utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple video functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Utility definitions for RGB manipulation. Allows RGB handling to be |
| 6 | 6 | performed in an abstracted fashion and optimized with SIMD. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple video functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 76 | 76 | #include "driver.h" |
| 77 | 77 | #include "s2636.h" |
| 78 | 78 | |
| 79 | static const int | |
| 79 | static const int sprite_offsets[4] = { 0x00, 0x10, 0x20, 0x40}; | |
| 80 | 80 | |
| 81 | 81 | /* To adjust sprites against bitmap */ |
| 82 | 82 | |
| r1490 | r1491 | |
| 88 | 88 | mame_bitmap *s2636_2_bitmap; |
| 89 | 89 | mame_bitmap *s2636_3_bitmap; |
| 90 | 90 | |
| 91 | UINT8 s2636_1_dirty[4]; | |
| 92 | UINT8 s2636_2_dirty[4]; | |
| 93 | UINT8 s2636_3_dirty[4]; | |
| 91 | int s2636_x_offset; | |
| 92 | int s2636_y_offset; | |
| 94 | 93 | |
| 95 | int s2636_x_offset=0; | |
| 96 | int s2636_y_offset=0; | |
| 97 | ||
| 98 | void s2636_w(UINT8 *workram,int offset,int data,UINT8 *dirty) | |
| 94 | const gfx_layout s2636_gfx_layout = | |
| 99 | 95 | { |
| 100 | if (workram[offset] != data) | |
| 101 | { | |
| 102 | workram[offset] = data; | |
| 96 | 8,10, | |
| 97 | 5, | |
| 98 | 1, | |
| 99 | { 0 }, | |
| 100 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 101 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 102 | 8*16 | |
| 103 | }; | |
| 103 | 104 | |
| 104 | if(offset < 10) | |
| 105 | dirty[0]=1; | |
| 106 | else | |
| 107 | { | |
| 108 | if((offset > 15) && (offset < 26)) | |
| 109 | dirty[1]=1; | |
| 110 | else | |
| 111 | { | |
| 112 | if((offset > 31) && (offset < 42)) | |
| 113 | dirty[2]=1; | |
| 114 | else | |
| 115 | { | |
| 116 | if((offset > 63) && (offset < 74)) | |
| 117 | dirty[3]=1; | |
| 118 | } | |
| 119 | } | |
| 120 | } | |
| 121 | } | |
| 122 | } | |
| 123 | 105 | |
| 124 | 106 | /*****************************************/ |
| 125 | 107 | /* Check for Collision between 2 sprites */ |
| r1490 | r1491 | |
| 132 | 114 | |
| 133 | 115 | // Does not check shadow sprites yet |
| 134 | 116 | |
| 135 | if((workram[ | |
| 117 | if((workram[sprite_offsets[first] + 10] != 0xff) && (workram[sprite_offsets[second] + 10] != 0xff)) | |
| 136 | 118 | { |
| 137 | int fx1 = workram[SpriteOffset[first] + 10] + s2636_x_offset; | |
| 138 | int fy1 = workram[SpriteOffset[first] + 12] + s2636_y_offset; | |
| 139 | int fx2 = workram[SpriteOffset[second] + 10] + s2636_x_offset; | |
| 140 | int fy2 = workram[SpriteOffset[second] + 12] + s2636_y_offset; | |
| 119 | int fx1 = workram[sprite_offsets[first] + 10] + s2636_x_offset; | |
| 120 | int fy1 = workram[sprite_offsets[first] + 12] + s2636_y_offset; | |
| 121 | int fx2 = workram[sprite_offsets[second] + 10] + s2636_x_offset; | |
| 122 | int fy2 = workram[sprite_offsets[second] + 12] + s2636_y_offset; | |
| 141 | 123 | |
| 142 | 124 | if((fx1>=0) && (fy1>=0) && (fx2>=0) && (fy2>=0)) |
| 143 | 125 | { |
| 144 | 126 | int expand1 = 1 << (16+((workram[0xC0]>>(first<<1)) & 3)); |
| 145 | 127 | int expand2 = 1 << (16+((workram[0xC0]>>(second<<1)) & 3)); |
| 146 | 128 | |
| 147 | int char1 = SpriteOffset[first]>>4; | |
| 148 | int char2 = SpriteOffset[second]>>4; | |
| 129 | int char1 = sprite_offsets[first]>>4; | |
| 130 | int char2 = sprite_offsets[second]>>4; | |
| 149 | 131 | |
| 150 | 132 | /* Draw first sprite */ |
| 151 | 133 | |
| r1490 | r1491 | |
| 218 | 200 | return Checksum; |
| 219 | 201 | } |
| 220 | 202 | |
| 221 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram, | |
| 203 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram, | |
| 222 | 204 | { |
| 223 | 205 | int CollisionSprite = 0; |
| 224 | 206 | int spriteno; |
| r1490 | r1491 | |
| 226 | 208 | |
| 227 | 209 | for(spriteno=0;spriteno<4;spriteno++) |
| 228 | 210 | { |
| 229 | offs = | |
| 211 | offs = sprite_offsets[spriteno]; | |
| 230 | 212 | |
| 231 | 213 | if(workram[offs+10]!=0xFF) |
| 232 | 214 | { |
| r1490 | r1491 | |
| 245 | 227 | |
| 246 | 228 | colour = (colour & 7) + 7; |
| 247 | 229 | |
| 248 | if(dirty[spriteno]) | |
| 249 | { | |
| 250 | decodechar(machine->gfx[Graphics_Bank],charno,workram,machine->drv->gfxdecodeinfo[Graphics_Bank].gfxlayout); | |
| 251 | dirty[spriteno] = 0; | |
| 252 | } | |
| 230 | decodechar(machine->gfx[Graphics_Bank],charno,workram,machine->drv->gfxdecodeinfo[Graphics_Bank].gfxlayout); | |
| 253 | 231 | |
| 254 | 232 | drawgfxzoom(bitmap,machine->gfx[Graphics_Bank], |
| 255 | 233 | charno, |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | extern mame_bitmap *s2636_2_bitmap; |
| 7 | 7 | extern mame_bitmap *s2636_3_bitmap; |
| 8 | 8 | |
| 9 | extern UINT8 s2636_1_dirty[4]; | |
| 10 | extern UINT8 s2636_2_dirty[4]; | |
| 11 | extern UINT8 s2636_3_dirty[4]; | |
| 12 | ||
| 13 | 9 | extern int s2636_x_offset; |
| 14 | 10 | extern int s2636_y_offset; |
| 15 | 11 | |
| 16 | void s2636_w(UINT8 *workram,int offset,int data,UINT8 *dirty); | |
| 17 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram,UINT8 *dirty,int Graphics_Bank,mame_bitmap *collision_bitmap); | |
| 12 | extern const gfx_layout s2636_gfx_layout; | |
| 18 | 13 | |
| 14 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram,int Graphics_Bank,mame_bitmap *collision_bitmap); | |
| 15 |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | WARNING: This code assumes SSE2 or greater capability. |
| 8 | 8 | |
| 9 | Copyright | |
| 9 | Copyright | |
| 10 | 10 | Visit http://mamedev.org for licensing and usage restrictions. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Internal graphics viewer. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Functions used to retrieve text used by MAME, to aid in |
| 6 | 6 | translation. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Function to handle hash functions (checksums) |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Dumps the MAME internal data as an XML file. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic tilemap management system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Options file and command line management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Dumps the MAME internal data as an XML file. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic tilemap management system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Options file and command line management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Internal MAME menus for the user interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Definitions for inline functions that can be overriden by OSD- |
| 6 | 6 | specific code. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ROM set auditing functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core MAME video routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 499 | 499 | int region_length = 8 * memory_region_length(gfxdecodeinfo[i].memory_region); |
| 500 | 500 | int xscale = (gfxdecodeinfo[i].xscale == 0) ? 1 : gfxdecodeinfo[i].xscale; |
| 501 | 501 | int yscale = (gfxdecodeinfo[i].yscale == 0) ? 1 : gfxdecodeinfo[i].yscale; |
| 502 | UINT32 extxoffs[MAX_ABS_GFX_SIZE], extyoffs[MAX_ABS_GFX_SIZE]; | |
| 502 | UINT32 *extpoffs, extxoffs[MAX_ABS_GFX_SIZE], extyoffs[MAX_ABS_GFX_SIZE]; | |
| 503 | 503 | gfx_layout glcopy; |
| 504 | const gfx_layout *gl = gfxdecodeinfo[i].gfxlayout; | |
| 505 | int israw = (gl->planeoffset[0] == GFX_RAW); | |
| 506 | int planes = gl->planes; | |
| 507 | UINT16 width = gl->width; | |
| 508 | UINT16 height = gl->height; | |
| 509 | UINT32 total = gl->total; | |
| 510 | UINT32 charincrement = gl->charincrement; | |
| 504 | 511 | int j; |
| 505 | 512 | |
| 506 | 513 | /* make a copy of the layout */ |
| r1490 | r1491 | |
| 520 | 527 | glcopy.extxoffs = extxoffs; |
| 521 | 528 | glcopy.extyoffs = extyoffs; |
| 522 | 529 | |
| 530 | extpoffs = glcopy.planeoffset; | |
| 531 | ||
| 523 | 532 | /* expand X and Y by the scale factors */ |
| 524 | 533 | if (xscale > 1) |
| 525 | 534 | { |
| 526 | glcopy.width *= xscale; | |
| 527 | for (j = glcopy.width - 1; j >= 0; j--) | |
| 535 | width *= xscale; | |
| 536 | for (j = width - 1; j >= 0; j--) | |
| 528 | 537 | extxoffs[j] = extxoffs[j / xscale]; |
| 529 | 538 | } |
| 530 | 539 | if (yscale > 1) |
| 531 | 540 | { |
| 532 | glcopy.height *= yscale; | |
| 533 | for (j = glcopy.height - 1; j >= 0; j--) | |
| 541 | height *= yscale; | |
| 542 | for (j = height - 1; j >= 0; j--) | |
| 534 | 543 | extyoffs[j] = extyoffs[j / yscale]; |
| 535 | 544 | } |
| 536 | 545 | |
| 537 | 546 | /* if the character count is a region fraction, compute the effective total */ |
| 538 | if (IS_FRAC( | |
| 547 | if (IS_FRAC( | |
| 539 | 548 | { |
| 540 | 549 | if (region_length == 0) |
| 541 | 550 | continue; |
| 542 | | |
| 551 | | |
| 543 | 552 | } |
| 544 | 553 | |
| 545 | 554 | /* for non-raw graphics, decode the X and Y offsets */ |
| 546 | if ( | |
| 555 | if ( | |
| 547 | 556 | { |
| 548 | 557 | /* loop over all the planes, converting fractions */ |
| 549 | for (j = 0; j < | |
| 558 | for (j = 0; j < | |
| 550 | 559 | { |
| 551 | UINT32 value = | |
| 560 | UINT32 value = | |
| 552 | 561 | if (IS_FRAC(value)) |
| 553 | | |
| 562 | | |
| 554 | 563 | } |
| 555 | 564 | |
| 556 | 565 | /* loop over all the X/Y offsets, converting fractions */ |
| 557 | for (j = 0; j < | |
| 566 | for (j = 0; j < | |
| 558 | 567 | { |
| 559 | 568 | UINT32 value = extxoffs[j]; |
| 560 | 569 | if (IS_FRAC(value)) |
| 561 | 570 | extxoffs[j] = FRAC_OFFSET(value) + region_length * FRAC_NUM(value) / FRAC_DEN(value); |
| 562 | 571 | } |
| 563 | 572 | |
| 564 | for (j = 0; j < | |
| 573 | for (j = 0; j < | |
| 565 | 574 | { |
| 566 | 575 | UINT32 value = extyoffs[j]; |
| 567 | 576 | if (IS_FRAC(value)) |
| r1490 | r1491 | |
| 569 | 578 | } |
| 570 | 579 | } |
| 571 | 580 | |
| 572 | /* otherwise, just use | |
| 581 | /* otherwise, just use | |
| 573 | 582 | else |
| 574 | 583 | { |
| 575 | 584 | int base = gfxdecodeinfo[i].start; |
| 576 | 585 | int end = region_length/8; |
| 586 | int linemod = gl->yoffset[0]; | |
| 577 | 587 | while (glcopy.total > 0) |
| 578 | 588 | { |
| 579 | int elementbase = base + (glcopy.total - 1) * glcopy.charincrement / 8; | |
| 580 | int lastpixelbase = elementbase + glcopy.height * glcopy.yoffset[0] / 8 - 1; | |
| 589 | int elementbase = base + (total - 1) * charincrement / 8; | |
| 590 | int lastpixelbase = elementbase + height * linemod / 8 - 1; | |
| 581 | 591 | if (lastpixelbase < end) |
| 582 | 592 | break; |
| 583 | | |
| 593 | | |
| 584 | 594 | } |
| 585 | 595 | } |
| 586 | 596 | |
| 597 | /* update glcopy */ | |
| 598 | glcopy.width = width; | |
| 599 | glcopy.height = height; | |
| 600 | glcopy.total = total; | |
| 601 | ||
| 587 | 602 | /* allocate the graphics */ |
| 588 | 603 | machine->gfx[i] = allocgfx(&glcopy); |
| 589 | 604 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Internal MAME menus for the user interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions which handle the CPU memory access. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | Caveats: |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ROM, disk, and sample auditing functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core MAME video routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # MAME emulation core makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
| 161 | 161 | $(EMUMACHINE)/x76f041.o \ |
| 162 | 162 | $(EMUMACHINE)/x76f100.o \ |
| 163 | 163 | $(EMUMACHINE)/z80ctc.o \ |
| 164 | $(EMUMACHINE)/z80dma.o \ | |
| 164 | 165 | $(EMUMACHINE)/z80pio.o \ |
| 165 | 166 | $(EMUMACHINE)/z80sio.o \ |
| 166 | 167 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions which handle the CPU memory accesses. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core MAME resource tracking. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Rendering system font management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Controls execution of the core MAME system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
| 1162 | 1162 | /* otherwise, generate the buffer and call the UI to display the message */ |
| 1163 | 1163 | else |
| 1164 | 1164 | { |
| 1165 | extern void CLIB_DECL ui_popup(const char *format, ...) ATTR_PRINTF(1,2); | |
| 1166 | 1165 | va_list arg; |
| 1167 | 1166 | |
| 1168 | 1167 | /* dump to the buffer */ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Input port handling. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | PowerPC (32 and 64-bit) inline implementations for GCC compilers. This |
| 6 | 6 | code is automatically included if appropriate by eminline.h. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |
| 227 | INLINE UINT16 v_get_counter1_value(struct via6522 *v) { | |
| 228 | UINT16 val; | |
| 229 | ||
| 230 | if (v->t1_active) { | |
| 231 | val = v_time_to_cycles(v, timer_timeleft(v->t1)) - IFR_DELAY; | |
| 232 | } else { | |
| 233 | val = 0xFFFF - v_time_to_cycles(v, attotime_sub(timer_get_time(), v->time1)); | |
| 234 | } | |
| 235 | return val; | |
| 236 | } | |
| 237 | ||
| 238 | ||
| 227 | 239 | /************************ shift register ************************/ |
| 228 | 240 | |
| 229 | 241 | static TIMER_CALLBACK( via_shift_callback ); |
| r1490 | r1491 | |
| 462 | 474 | |
| 463 | 475 | case VIA_T1CL: |
| 464 | 476 | via_clear_int (which, INT_T1); |
| 465 | if (v->t1_active) | |
| 466 | val = v_time_to_cycles(v, timer_timeleft(v->t1)) & 0xff; | |
| 467 | else | |
| 468 | { | |
| 469 | if ( T1_CONTINUOUS(v->acr) ) | |
| 470 | val = (TIMER1_VALUE(v) - (v_time_to_cycles(v, attotime_sub(timer_get_time(), v->time1)) % TIMER1_VALUE(v)) - 1) & 0xff; | |
| 471 | else | |
| 472 | val = (0x10000 - (v_time_to_cycles(v, attotime_sub(timer_get_time(), v->time1)) & 0xffff) - 1) & 0xff; | |
| 473 | } | |
| 477 | val = v_get_counter1_value(v) & 0xFF; | |
| 474 | 478 | break; |
| 475 | 479 | |
| 476 | 480 | case VIA_T1CH: |
| 477 | if (v->t1_active) | |
| 478 | val = v_time_to_cycles(v, timer_timeleft(v->t1)) >> 8; | |
| 479 | else | |
| 480 | { | |
| 481 | if ( T1_CONTINUOUS(v->acr) ) | |
| 482 | val = (TIMER1_VALUE(v)- (v_time_to_cycles(v, attotime_sub(timer_get_time(), v->time1)) % TIMER1_VALUE(v)) - 1) >> 8; | |
| 483 | else | |
| 484 | val = (0x10000- (v_time_to_cycles(v, attotime_sub(timer_get_time(), v->time1)) & 0xffff) - 1) >> 8; | |
| 485 | } | |
| 481 | val = v_get_counter1_value(v) >> 8; | |
| 486 | 482 | break; |
| 487 | 483 | |
| 488 | 484 | case VIA_T1LL: |
| r1490 | r1491 | |
| 784 | 780 | break; |
| 785 | 781 | |
| 786 | 782 | case VIA_ACR: |
| 787 | v->acr = data; | |
| 788 | if (T1_SET_PB7(v->acr)) | |
| 789 | 783 | { |
| 790 | if (v->t1_active) | |
| 791 | v->out_b &= ~0x80; | |
| 792 | else | |
| 793 | v->out_b |= 0x80; | |
| 794 | ||
| 795 | //if (v->ddr_b) | |
| 784 | UINT16 counter1 = v_get_counter1_value(v); | |
| 785 | v->acr = data; | |
| 786 | if (T1_SET_PB7(v->acr)) | |
| 796 | 787 | { |
| 797 | UINT8 write_data = (v->out_b & v->ddr_b) | (v->ddr_b ^ 0xff); | |
| 798 | ||
| 799 | if (v->intf->out_b_func) | |
| 800 | v->intf->out_b_func(0, write_data); | |
| 788 | if (v->t1_active) | |
| 789 | v->out_b &= ~0x80; | |
| 801 | 790 | else |
| 802 | logerror("6522VIA chip %d: Port B is being written to but has no handler. PC: %08X - %02X\n", which, safe_activecpu_get_pc(), write_data); | |
| 791 | v->out_b |= 0x80; | |
| 792 | ||
| 793 | //if (v->ddr_b) | |
| 794 | { | |
| 795 | UINT8 write_data = (v->out_b & v->ddr_b) | (v->ddr_b ^ 0xff); | |
| 796 | ||
| 797 | if (v->intf->out_b_func) | |
| 798 | v->intf->out_b_func(0, write_data); | |
| 799 | else | |
| 800 | logerror("6522VIA chip %d: Port B is being written to but has no handler. PC: %08X - %02X\n", which, safe_activecpu_get_pc(), write_data); | |
| 801 | } | |
| 803 | 802 | } |
| 803 | if (T1_CONTINUOUS(data)) | |
| 804 | { | |
| 805 | timer_adjust(v->t1, v_cycles_to_time(v, counter1 + IFR_DELAY), which, attotime_zero); | |
| 806 | v->t1_active = 1; | |
| 807 | } | |
| 804 | 808 | } |
| 805 | if (T1_CONTINUOUS(data)) | |
| 806 | { | |
| 807 | timer_adjust(v->t1, v_cycles_to_time(v, TIMER1_VALUE(v) + IFR_DELAY), which, attotime_zero); | |
| 808 | v->t1_active = 1; | |
| 809 | } | |
| 810 | 809 | break; |
| 811 | 810 | |
| 812 | 811 | case VIA_IER: |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic laserdisc support. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic laserdisc support. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *************************************************************************/ |
| r0 | r1491 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | Z80 DMA interface and emulation | |
| 4 | ||
| 5 | For datasheet http://www.zilog.com/docs/z80/ps0179.pdf | |
| 6 | ||
| 7 | 2008/01 couriersud | |
| 8 | ||
| 9 | - architecture copied from 8257 DMA | |
| 10 | - significant changes to implementation | |
| 11 | - This is only a minimum implementation to support dkong3 and mario drivers | |
| 12 | - Only memory to memory is tested! | |
| 13 | ||
| 14 | TODO: | |
| 15 | - implement missing features | |
| 16 | - implement interrupt support (not used in dkong3 and mario) | |
| 17 | - implement more asserts | |
| 18 | - implement a INPUT_LINE_BUSREQ for Z80. As a workaround, | |
| 19 | HALT is used. This implies burst mode. | |
| 20 | ||
| 21 | **********************************************************************/ | |
| 22 | ||
| 23 | #include "driver.h" | |
| 24 | #include "memconv.h" | |
| 25 | #include "z80dma.h" | |
| 26 | ||
| 27 | #define VERBOSE 0 | |
| 28 | ||
| 29 | #define LOG(x) do { if (VERBOSE) printf x; } while (0) | |
| 30 | ||
| 31 | ||
| 32 | #define REGNUM(_m, _s) (((_m)<<3) + (_s)) | |
| 33 | #define GET_REGNUM(_c, _r) (&(_r) - &(WR0(_c))) | |
| 34 | #define REG(_c, _m, _s) (_c)->regs[REGNUM(_m,_s)] | |
| 35 | #define WR0(_c) REG(_c, 0, 0) | |
| 36 | #define WR1(_c) REG(_c, 1, 0) | |
| 37 | #define WR2(_c) REG(_c, 2, 0) | |
| 38 | #define WR3(_c) REG(_c, 3, 0) | |
| 39 | #define WR4(_c) REG(_c, 4, 0) | |
| 40 | #define WR5(_c) REG(_c, 5, 0) | |
| 41 | #define WR6(_c) REG(_c, 6, 0) | |
| 42 | ||
| 43 | #define PORTA_ADDRESS_L(_c) REG(_c,0,1) | |
| 44 | #define PORTA_ADDRESS_H(_c) REG(_c,0,2) | |
| 45 | ||
| 46 | #define BLOCKLEN_L(_c) REG(_c,0,3) | |
| 47 | #define BLOCKLEN_H(_c) REG(_c,0,4) | |
| 48 | ||
| 49 | #define PORTA_TIMING(_c) REG(_c,1,1) | |
| 50 | #define PORTB_TIMING(_c) REG(_c,2,1) | |
| 51 | ||
| 52 | #define MASK_BYTE(_c) REG(_c,3,1) | |
| 53 | #define MATCH_BYTE(_c) REG(_c,3,2) | |
| 54 | ||
| 55 | #define PORTB_ADDRESS_L(_c) REG(_c,4,1) | |
| 56 | #define PORTB_ADDRESS_H(_c) REG(_c,4,2) | |
| 57 | #define INTERRUPT_CTRL(_c) REG(_c,4,3) | |
| 58 | #define INTERRUPT_VECTOR(_c) REG(_c,4,4) | |
| 59 | #define PULSE_CTRL(_c) REG(_c,4,5) | |
| 60 | ||
| 61 | #define READ_MASK(_c) REG(_c,6,1) | |
| 62 | ||
| 63 | ||
| 64 | #define PORTA_ADDRESS(_c) ((PORTA_ADDRESS_H(_c)<<8) | PORTA_ADDRESS_L(_c)) | |
| 65 | #define PORTB_ADDRESS(_c) ((PORTB_ADDRESS_H(_c)<<8) | PORTB_ADDRESS_L(_c)) | |
| 66 | #define BLOCKLEN(_c) ((BLOCKLEN_H(_c)<<8) | BLOCKLEN_L(_c)) | |
| 67 | ||
| 68 | #define PORTA_STEP(_c) (((WR1(_c) >> 4) & 0x03)*2-1) | |
| 69 | #define PORTB_STEP(_c) (((WR2(_c) >> 4) & 0x03)*2-1) | |
| 70 | #define PORTA_FIXED(_c) (((WR1(_c) >> 4) & 0x02) == 0x02) | |
| 71 | #define PORTB_FIXED(_c) (((WR2(_c) >> 4) & 0x02) == 0x02) | |
| 72 | #define PORTA_MEMORY(_c) (((WR1(_c) >> 3) & 0x01) == 0x00) | |
| 73 | #define PORTB_MEMORY(_c) (((WR2(_c) >> 3) & 0x01) == 0x00) | |
| 74 | ||
| 75 | #define PORTA_CYCLE_LEN(_c) (4-(PORTA_TIMING(_c) & 0x03)) | |
| 76 | #define PORTB_CYCLE_LEN(_c) (4-(PORTB_TIMING(_c) & 0x03)) | |
| 77 | ||
| 78 | #define PORTA_IS_SOURCE(_c) ((WR0(_c) >> 2) & 0x01) | |
| 79 | #define PORTB_IS_SOURCE(_c) (!PORTA_IS_SOURCE(_c)) | |
| 80 | #define TRANSFER_MODE(_c) (WR0(_c) & 0x03) | |
| 81 | ||
| 82 | #define TM_TRANSFER (0x01) | |
| 83 | #define TM_SEARCH (0x02) | |
| 84 | #define TM_SEARCH_TRANSFER (0x03) | |
| 85 | ||
| 86 | #define READY_ACTIVE_HIGH(_c) ((WR5(_c)>>3) & 0x01) | |
| 87 | ||
| 88 | struct z80dma | |
| 89 | { | |
| 90 | const struct z80dma_interface *intf; | |
| 91 | emu_timer *timer; | |
| 92 | ||
| 93 | UINT16 regs[REGNUM(6,1)+1]; | |
| 94 | UINT8 num_follow; | |
| 95 | UINT8 cur_follow; | |
| 96 | UINT8 regs_follow[4]; | |
| 97 | UINT8 status; | |
| 98 | UINT8 dma_enabled; | |
| 99 | ||
| 100 | UINT16 addressA; | |
| 101 | UINT16 addressB; | |
| 102 | UINT16 count; | |
| 103 | ||
| 104 | UINT8 rdy; | |
| 105 | ||
| 106 | UINT8 is_read; | |
| 107 | UINT8 cur_cycle; | |
| 108 | UINT8 latch; | |
| 109 | }; | |
| 110 | ||
| 111 | static struct z80dma *dma; | |
| 112 | static int dma_count; | |
| 113 | ||
| 114 | static TIMER_CALLBACK( z80dma_timerproc ); | |
| 115 | static void z80dma_update_status(int which); | |
| 116 | ||
| 117 | /* ----------------------------------------------------------------------- */ | |
| 118 | ||
| 119 | int z80dma_init(int count) | |
| 120 | { | |
| 121 | int which; | |
| 122 | ||
| 123 | dma = auto_malloc(count * sizeof(struct z80dma)); | |
| 124 | memset(dma, 0, count * sizeof(struct z80dma)); | |
| 125 | dma_count = count; | |
| 126 | ||
| 127 | for (which = 0; which < dma_count; which++) | |
| 128 | { | |
| 129 | dma[which].timer = timer_alloc(z80dma_timerproc, NULL); | |
| 130 | ||
| 131 | state_save_register_item_array("Z80DMA", which, dma[which].regs); | |
| 132 | state_save_register_item_array("Z80DMA", which, dma[which].regs_follow); | |
| 133 | ||
| 134 | state_save_register_item("Z80DMA", which, dma[which].num_follow); | |
| 135 | state_save_register_item("Z80DMA", which, dma[which].cur_follow); | |
| 136 | state_save_register_item("Z80DMA", which, dma[which].status); | |
| 137 | state_save_register_item("Z80DMA", which, dma[which].dma_enabled); | |
| 138 | ||
| 139 | state_save_register_item("Z80DMA", which, dma[which].addressA); | |
| 140 | state_save_register_item("Z80DMA", which, dma[which].addressB); | |
| 141 | state_save_register_item("Z80DMA", which, dma[which].count); | |
| 142 | state_save_register_item("Z80DMA", which, dma[which].rdy); | |
| 143 | state_save_register_item("Z80DMA", which, dma[which].is_read); | |
| 144 | state_save_register_item("Z80DMA", which, dma[which].cur_cycle); | |
| 145 | state_save_register_item("Z80DMA", which, dma[which].latch); | |
| 146 | ||
| 147 | } | |
| 148 | ||
| 149 | return 0; | |
| 150 | } | |
| 151 | ||
| 152 | ||
| 153 | ||
| 154 | void z80dma_config(int which, const struct z80dma_interface *intf) | |
| 155 | { | |
| 156 | dma[which].intf = intf; | |
| 157 | } | |
| 158 | ||
| 159 | ||
| 160 | ||
| 161 | void z80dma_reset(void) | |
| 162 | { | |
| 163 | int which; | |
| 164 | ||
| 165 | for (which = 0; which < dma_count; which++) | |
| 166 | { | |
| 167 | dma[which].status = 0; | |
| 168 | dma[which].rdy = 0; | |
| 169 | dma[which].num_follow = 0; | |
| 170 | dma[which].dma_enabled = 0; | |
| 171 | z80dma_update_status(which); | |
| 172 | } | |
| 173 | } | |
| 174 | ||
| 175 | ||
| 176 | ||
| 177 | /* ----------------------------------------------------------------------- */ | |
| 178 | ||
| 179 | static void z80dma_do_read(int which) | |
| 180 | { | |
| 181 | struct z80dma *cntx = &dma[which]; | |
| 182 | UINT8 mode; | |
| 183 | ||
| 184 | mode = TRANSFER_MODE(cntx); | |
| 185 | switch(mode) { | |
| 186 | case TM_TRANSFER: | |
| 187 | if (PORTA_IS_SOURCE(cntx)) | |
| 188 | { | |
| 189 | if (PORTA_MEMORY(cntx)) | |
| 190 | cntx->latch = cntx->intf->memory_read_func(cntx->addressA); | |
| 191 | else | |
| 192 | cntx->latch = cntx->intf->portA_read_func(cntx->addressA); | |
| 193 | cntx->addressA += PORTA_STEP(cntx); | |
| 194 | } | |
| 195 | else | |
| 196 | { | |
| 197 | if (PORTB_MEMORY(cntx)) | |
| 198 | cntx->latch = cntx->intf->memory_read_func(cntx->addressB); | |
| 199 | else | |
| 200 | cntx->latch = cntx->intf->portB_read_func(cntx->addressB); | |
| 201 | cntx->addressB += PORTB_STEP(cntx); | |
| 202 | } | |
| 203 | break; | |
| 204 | ||
| 205 | default: | |
| 206 | fatalerror("z80dma_do_operation: invalid mode %d!\n", mode); | |
| 207 | break; | |
| 208 | } | |
| 209 | } | |
| 210 | ||
| 211 | static int z80dma_do_write(int which) | |
| 212 | { | |
| 213 | struct z80dma *cntx = &dma[which]; | |
| 214 | int done; | |
| 215 | UINT8 mode; | |
| 216 | ||
| 217 | mode = TRANSFER_MODE(cntx); | |
| 218 | if (cntx->count == 0x0000) | |
| 219 | { | |
| 220 | //FIXME: Any signal here | |
| 221 | } | |
| 222 | switch(mode) { | |
| 223 | case TM_TRANSFER: | |
| 224 | if (PORTA_IS_SOURCE(cntx)) | |
| 225 | { | |
| 226 | if (PORTB_MEMORY(cntx)) | |
| 227 | cntx->intf->memory_write_func(cntx->addressB, cntx->latch); | |
| 228 | else | |
| 229 | cntx->intf->portB_write_func(cntx->addressB, cntx->latch); | |
| 230 | cntx->addressB += PORTB_STEP(cntx); | |
| 231 | } | |
| 232 | else | |
| 233 | { | |
| 234 | if (PORTA_MEMORY(cntx)) | |
| 235 | cntx->intf->memory_write_func(cntx->addressA, cntx->latch); | |
| 236 | else | |
| 237 | cntx->intf->portB_write_func(cntx->addressA, cntx->latch); | |
| 238 | cntx->addressA += PORTA_STEP(cntx); | |
| 239 | } | |
| 240 | cntx->count--; | |
| 241 | done = (cntx->count == 0xFFFF); | |
| 242 | break; | |
| 243 | ||
| 244 | default: | |
| 245 | fatalerror("z80dma_do_operation: invalid mode %d!\n", mode); | |
| 246 | break; | |
| 247 | } | |
| 248 | if (done) | |
| 249 | { | |
| 250 | //FIXME: interrupt ? | |
| 251 | } | |
| 252 | return done; | |
| 253 | } | |
| 254 | ||
| 255 | static TIMER_CALLBACK( z80dma_timerproc ) | |
| 256 | { | |
| 257 | int which = param; | |
| 258 | struct z80dma *cntx = &dma[which]; | |
| 259 | int done; | |
| 260 | ||
| 261 | if (--cntx->cur_cycle) | |
| 262 | { | |
| 263 | return; | |
| 264 | } | |
| 265 | if (cntx->is_read) | |
| 266 | { | |
| 267 | z80dma_do_read(which); | |
| 268 | done = 0; | |
| 269 | cntx->is_read = 0; | |
| 270 | cntx->cur_cycle = (PORTA_IS_SOURCE(cntx) ? PORTA_CYCLE_LEN(cntx) : PORTB_CYCLE_LEN(cntx)); | |
| 271 | } | |
| 272 | else | |
| 273 | { | |
| 274 | done = z80dma_do_write(which); | |
| 275 | cntx->is_read = 1; | |
| 276 | cntx->cur_cycle = (PORTB_IS_SOURCE(cntx) ? PORTA_CYCLE_LEN(cntx) : PORTB_CYCLE_LEN(cntx)); | |
| 277 | } | |
| 278 | if (done) | |
| 279 | { | |
| 280 | cntx->dma_enabled = 0; //FIXME: Correct? | |
| 281 | z80dma_update_status(which); | |
| 282 | } | |
| 283 | } | |
| 284 | ||
| 285 | static void z80dma_update_status(int which) | |
| 286 | { | |
| 287 | struct z80dma *cntx = &dma[which]; | |
| 288 | UINT16 pending_transfer; | |
| 289 | attotime next; | |
| 290 | ||
| 291 | /* no transfer is active right now; is there a transfer pending right now? */ | |
| 292 | pending_transfer = dma[which].rdy & dma[which].dma_enabled; | |
| 293 | ||
| 294 | if (pending_transfer) | |
| 295 | { | |
| 296 | dma[which].is_read = 1; | |
| 297 | dma[which].cur_cycle = (PORTA_IS_SOURCE(cntx) ? PORTA_CYCLE_LEN(cntx) : PORTB_CYCLE_LEN(cntx)); | |
| 298 | next = ATTOTIME_IN_HZ(dma[which].intf->clockhz); | |
| 299 | timer_adjust(dma[which].timer, | |
| 300 | attotime_zero, | |
| 301 | which, | |
| 302 | /* 1 byte transferred in 4 clock cycles */ | |
| 303 | next); | |
| 304 | } | |
| 305 | else | |
| 306 | { | |
| 307 | /* no transfers active right now */ | |
| 308 | timer_reset(dma[which].timer, attotime_never); | |
| 309 | } | |
| 310 | ||
| 311 | /* set the halt line */ | |
| 312 | if (dma[which].intf && dma[which].intf->cpunum >= 0) | |
| 313 | { | |
| 314 | //FIXME: Synchronization is done by BUSREQ! | |
| 315 | cpunum_set_input_line(dma[which].intf->cpunum, INPUT_LINE_HALT, | |
| 316 | pending_transfer ? ASSERT_LINE : CLEAR_LINE); | |
| 317 | } | |
| 318 | } | |
| 319 | ||
| 320 | /* ----------------------------------------------------------------------- */ | |
| 321 | ||
| 322 | static UINT8 z80dma_read(int which, offs_t offset) | |
| 323 | { | |
| 324 | fatalerror("z80dma_read: not implemented"); | |
| 325 | return 0; | |
| 326 | } | |
| 327 | ||
| 328 | ||
| 329 | ||
| 330 | static void z80dma_write(int which, offs_t offset, UINT8 data) | |
| 331 | { | |
| 332 | struct z80dma *cntx = &dma[which]; | |
| 333 | ||
| 334 | if (cntx->num_follow == 0) | |
| 335 | { | |
| 336 | if ((data & 0x87) == 0) // WR2 | |
| 337 | { | |
| 338 | WR2(cntx) = data; | |
| 339 | if (data & 0x40) | |
| 340 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTB_TIMING(cntx)); | |
| 341 | } | |
| 342 | else if ((data & 0x87) == 0x04) // WR1 | |
| 343 | { | |
| 344 | WR1(cntx) = data; | |
| 345 | if (data & 0x40) | |
| 346 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTA_TIMING(cntx)); | |
| 347 | } | |
| 348 | else if ((data & 0x80) == 0) // WR0 | |
| 349 | { | |
| 350 | WR0(cntx) = data; | |
| 351 | if (data & 0x08) | |
| 352 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_L(cntx)); | |
| 353 | if (data & 0x10) | |
| 354 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_H(cntx)); | |
| 355 | if (data & 0x20) | |
| 356 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, BLOCKLEN_L(cntx)); | |
| 357 | if (data & 0x40) | |
| 358 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, BLOCKLEN_H(cntx)); | |
| 359 | } | |
| 360 | else if ((data & 0x83) == 0x80) // WR3 | |
| 361 | { | |
| 362 | WR3(cntx) = data; | |
| 363 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, MASK_BYTE(cntx)); | |
| 364 | if (data & 0x10) | |
| 365 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, MATCH_BYTE(cntx)); | |
| 366 | } | |
| 367 | else if ((data & 0x83) == 0x81) // WR4 | |
| 368 | { | |
| 369 | WR4(cntx) = data; | |
| 370 | if (data & 0x04) | |
| 371 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTB_ADDRESS_L(cntx)); | |
| 372 | if (data & 0x08) | |
| 373 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PORTB_ADDRESS_H(cntx)); | |
| 374 | if (data & 0x10) | |
| 375 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, INTERRUPT_CTRL(cntx)); | |
| 376 | } | |
| 377 | else if ((data & 0xC7) == 0x82) // WR5 | |
| 378 | { | |
| 379 | WR5(cntx) = data; | |
| 380 | } | |
| 381 | else if ((data & 0x83) == 0x83) // WR6 | |
| 382 | { | |
| 383 | WR6(cntx) = data; | |
| 384 | switch (data) | |
| 385 | { | |
| 386 | case 0x88: /* Reinitialize status byte */ | |
| 387 | case 0xA3: /* Reset and disable interrupts */ | |
| 388 | case 0xA7: /* Initiate read sequence */ | |
| 389 | case 0xAB: /* Enable interrupts */ | |
| 390 | case 0xAF: /* Disable interrupts */ | |
| 391 | case 0xB3: /* Force ready */ | |
| 392 | case 0xB7: /* Enable after rti */ | |
| 393 | case 0xBF: /* Read status byte */ | |
| 394 | case 0xD3: /* Continue */ | |
| 395 | fatalerror("Unimplemented WR6 command %02x", data); | |
| 396 | break; | |
| 397 | case 0xC3: /* Reset */ | |
| 398 | LOG(("Reset\n")); | |
| 399 | break; | |
| 400 | case 0xCF: /* Load */ | |
| 401 | cntx->addressA = PORTA_ADDRESS(cntx); | |
| 402 | cntx->addressB = PORTB_ADDRESS(cntx); | |
| 403 | cntx->count = BLOCKLEN(cntx); | |
| 404 | LOG(("Load A: %x B: %x N: %x\n", cntx->addressA, cntx->addressB, cntx->count)); | |
| 405 | break; | |
| 406 | case 0x83: /* Disable dma */ | |
| 407 | cntx->dma_enabled = 0; | |
| 408 | z80dma_rdy_write(which, cntx->rdy); | |
| 409 | break; | |
| 410 | case 0x87: /* Enable dma */ | |
| 411 | cntx->dma_enabled = 1; | |
| 412 | z80dma_rdy_write(which, cntx->rdy); | |
| 413 | break; | |
| 414 | case 0xBB: | |
| 415 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, READ_MASK(cntx)); | |
| 416 | break; | |
| 417 | default: | |
| 418 | fatalerror("Unknown WR6 command %02x", data); | |
| 419 | } | |
| 420 | } | |
| 421 | else | |
| 422 | fatalerror("Unknown base register %02x", data); | |
| 423 | cntx->cur_follow = 0; | |
| 424 | } | |
| 425 | else | |
| 426 | { | |
| 427 | int nreg = cntx->regs_follow[cntx->cur_follow]; | |
| 428 | cntx->regs[nreg] = data; | |
| 429 | cntx->cur_follow++; | |
| 430 | if (cntx->cur_follow>=cntx->num_follow) | |
| 431 | cntx->num_follow = 0; | |
| 432 | if (nreg == REGNUM(4,3)) | |
| 433 | { | |
| 434 | cntx->num_follow=0; | |
| 435 | if (data & 0x08) | |
| 436 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, PULSE_CTRL(cntx)); | |
| 437 | if (data & 0x10) | |
| 438 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, INTERRUPT_VECTOR(cntx)); | |
| 439 | cntx->cur_follow = 0; | |
| 440 | } | |
| 441 | } | |
| 442 | } | |
| 443 | ||
| 444 | ||
| 445 | ||
| 446 | static TIMER_CALLBACK( z80dma_rdy_write_callback ) | |
| 447 | { | |
| 448 | int which = param >> 1; | |
| 449 | int state = param & 0x01; | |
| 450 | struct z80dma *cntx = &dma[which]; | |
| 451 | ||
| 452 | /* normalize state */ | |
| 453 | cntx->rdy = 1 ^ state ^ READY_ACTIVE_HIGH(cntx); | |
| 454 | cntx->status = (cntx->status & 0xFD) | (cntx->rdy<<1); | |
| 455 | ||
| 456 | z80dma_update_status(which); | |
| 457 | } | |
| 458 | ||
| 459 | ||
| 460 | ||
| 461 | void z80dma_rdy_write(int which, int state) | |
| 462 | { | |
| 463 | int param; | |
| 464 | ||
| 465 | param = (which << 1) | (state ? 1 : 0); | |
| 466 | LOG(("RDY: %d Active High: %d\n", state, READY_ACTIVE_HIGH(&dma[which]))); | |
| 467 | timer_call_after_resynch(NULL, param, z80dma_rdy_write_callback); | |
| 468 | } | |
| 469 | ||
| 470 | ||
| 471 | /******************* Standard 8-bit/32-bit/64-bit CPU interfaces *******************/ | |
| 472 | ||
| 473 | READ8_HANDLER( z80dma_0_r ) { return z80dma_read(0, offset); } | |
| 474 | READ8_HANDLER( z80dma_1_r ) { return z80dma_read(1, offset); } | |
| 475 | WRITE8_HANDLER( z80dma_0_w ) { z80dma_write(0, offset, data); } | |
| 476 | WRITE8_HANDLER( z80dma_1_w ) { z80dma_write(1, offset, data); } | |
| 477 | ||
| 478 | WRITE8_HANDLER( z80dma_0_rdy_w ) { z80dma_rdy_write(0, data); } | |
| 479 | WRITE8_HANDLER( z80dma_1_rdy_w ) { z80dma_rdy_write(1, data); } | |
| 480 | ||
| 481 | READ16_HANDLER( z80dma_16le_0_r ) { return read16le_with_read8_handler(z80dma_0_r, offset, mem_mask); } | |
| 482 | READ16_HANDLER( z80dma_16le_1_r ) { return read16le_with_read8_handler(z80dma_1_r, offset, mem_mask); } | |
| 483 | WRITE16_HANDLER( z80dma_16le_0_w ) { write16le_with_write8_handler(z80dma_0_w, offset, data, mem_mask); } | |
| 484 | WRITE16_HANDLER( z80dma_16le_1_w ) { write16le_with_write8_handler(z80dma_1_w, offset, data, mem_mask); } | |
| 485 | ||
| 486 | READ32_HANDLER( z80dma_32le_0_r ) { return read32le_with_read8_handler(z80dma_0_r, offset, mem_mask); } | |
| 487 | READ32_HANDLER( z80dma_32le_1_r ) { return read32le_with_read8_handler(z80dma_1_r, offset, mem_mask); } | |
| 488 | WRITE32_HANDLER( z80dma_32le_0_w ) { write32le_with_write8_handler(z80dma_0_w, offset, data, mem_mask); } | |
| 489 | WRITE32_HANDLER( z80dma_32le_1_w ) { write32le_with_write8_handler(z80dma_1_w, offset, data, mem_mask); } | |
| 490 | ||
| 491 | READ64_HANDLER( z80dma_64be_0_r ) { return read64be_with_read8_handler(z80dma_0_r, offset, mem_mask); } | |
| 492 | READ64_HANDLER( z80dma_64be_1_r ) { return read64be_with_read8_handler(z80dma_1_r, offset, mem_mask); } | |
| 493 | WRITE64_HANDLER( z80dma_64be_0_w ) { write64be_with_write8_handler(z80dma_0_w, offset, data, mem_mask); } | |
| 494 | WRITE64_HANDLER( z80dma_64be_1_w ) { write64be_with_write8_handler(z80dma_1_w, offset, data, mem_mask); } |
| r0 | r1491 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | 8257 DMA interface and emulation | |
| 4 | ||
| 5 | **********************************************************************/ | |
| 6 | ||
| 7 | #ifndef Z80DMA_H | |
| 8 | #define Z80DMA_H | |
| 9 | ||
| 10 | struct z80dma_interface | |
| 11 | { | |
| 12 | /* CPU to halt when DMA is active */ | |
| 13 | int cpunum; | |
| 14 | ||
| 15 | /* clock */ | |
| 16 | int clockhz; | |
| 17 | ||
| 18 | /* accessors to main memory */ | |
| 19 | UINT8 (*memory_read_func)(offs_t offset); | |
| 20 | void (*memory_write_func)(offs_t offset, UINT8 data); | |
| 21 | ||
| 22 | /* port accesors */ | |
| 23 | UINT8 (*portA_read_func)(UINT16 addr); | |
| 24 | void (*portA_write_func)(UINT16 addr, UINT8 data); | |
| 25 | UINT8 (*portB_read_func)(UINT16 addr); | |
| 26 | void (*portB_write_func)(UINT16 addr, UINT8 data); | |
| 27 | ||
| 28 | /* interrupt callback - not implemented */ | |
| 29 | /* void (*irqcb)(int state); */ | |
| 30 | }; | |
| 31 | ||
| 32 | int z80dma_init(int count); | |
| 33 | void z80dma_config(int which, const struct z80dma_interface *intf); | |
| 34 | void z80dma_reset(void); | |
| 35 | ||
| 36 | void z80dma_rdy_write(int which, int state); | |
| 37 | ||
| 38 | READ8_HANDLER(z80dma_0_r); | |
| 39 | READ8_HANDLER(z80dma_1_r); | |
| 40 | WRITE8_HANDLER(z80dma_0_w); | |
| 41 | WRITE8_HANDLER(z80dma_1_w); | |
| 42 | ||
| 43 | WRITE8_HANDLER(z80dma_0_rdy_w); | |
| 44 | WRITE8_HANDLER(z80dma_1_rdy_w); | |
| 45 | ||
| 46 | READ16_HANDLER(z80dma_16le_0_r); | |
| 47 | READ16_HANDLER(z80dma_16le_1_r); | |
| 48 | WRITE16_HANDLER(z80dma_16le_0_w); | |
| 49 | WRITE16_HANDLER(z80dma_16le_1_w); | |
| 50 | ||
| 51 | READ32_HANDLER(z80dma_32le_0_r); | |
| 52 | READ32_HANDLER(z80dma_32le_1_r); | |
| 53 | WRITE32_HANDLER(z80dma_32le_0_w); | |
| 54 | WRITE32_HANDLER(z80dma_32le_1_w); | |
| 55 | ||
| 56 | READ64_HANDLER(z80dma_64be_0_r); | |
| 57 | READ64_HANDLER(z80dma_64be_1_r); | |
| 58 | WRITE64_HANDLER(z80dma_64be_0_w); | |
| 59 | WRITE64_HANDLER(z80dma_64be_1_w); | |
| 60 | ||
| 61 | #endif /* Z80_H */ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple machine functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic simple machine functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | based on original version (c) 1997, Tatsuyuki Satoh |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 21 | 21 | /* CPU to halt when DMA is active */ |
| 22 | 22 | int cpunum; |
| 23 | 23 | |
| 24 | /* | |
| 24 | /* cl | |
| 25 | 25 | int clockhz; |
| 26 | 26 | |
| 27 | 27 | /* accessors to main memory */ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Z80 SIO (Z8440) implementation |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Z80 PIO implementation |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Z80 SIO (Z8440) implementation |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | based on original version (c) 1997, Tatsuyuki Satoh |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Z80 CTC (Z8430) implementation |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core MAME resource tracking. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Rendering system font management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Controls execution of the core MAME system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 65 | 65 | #define GAMENOUN "game" |
| 66 | 66 | #define GAMESNOUN "games" |
| 67 | 67 | #define HISTORYNAME "History" |
| 68 | #define COPYRIGHT "Copyright | |
| 68 | #define COPYRIGHT "Copyright | |
| 69 | 69 | #else |
| 70 | 70 | #define APPNAME "MESS" |
| 71 | 71 | #define APPNAME_LOWER "mess" |
| r1490 | r1491 | |
| 76 | 76 | #define GAMENOUN "system" |
| 77 | 77 | #define GAMESNOUN "systems" |
| 78 | 78 | #define HISTORYNAME "System Info" |
| 79 | #define COPYRIGHT "Copyright | |
| 79 | #define COPYRIGHT "Copyright | |
| 80 | 80 | #endif |
| 81 | 81 | |
| 82 | 82 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Handle input ports and mappings. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Support functions for working with attotime data. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Simple core functions that are defined in mamecore.h and which may |
| 6 | 6 | need to be accessed by other MAME-related tools. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Software-only rasterization system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core CPU interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Support functions for working with attotime data. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering utilities. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core multi-CPU execution engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | General core utilities and macros used throughout MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering layout parser and manager. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core CPU interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | General purpose output routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core multi-CPU execution engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering layout parser and manager. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | General purpose output routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 196 | 196 | case SNDINFO_STR_CORE_FAMILY: info->s = "RCA CDP1869"; break; |
| 197 | 197 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 198 | 198 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 199 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 199 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 200 | 200 | } |
| 201 | 201 | } |
| r1490 | r1491 | |
|---|---|---|
| 9 | 9 | - Support for non bit-flipped ROMs |
| 10 | 10 | - SPB-640 perpherial/RAM bus |
| 11 | 11 | |
| 12 | Copyright (c) 1998-2000, Joseph Zbiciak, all rights reserved. | |
| 13 | Copyright (c) 2006, tim lindner, all rights reserved. | |
| 12 | Copyright Joseph Zbiciak, all rights reserved. | |
| 13 | Copyright tim lindner, all rights reserved. | |
| 14 | 14 | |
| 15 | 15 | - This source code is released as freeware for non-commercial purposes. |
| 16 | 16 | - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
| 1369 | 1369 | case SNDINFO_STR_CORE_FAMILY: info->s = "GI"; break; |
| 1370 | 1370 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 1371 | 1371 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1372 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1372 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1373 | 1373 | } |
| 1374 | 1374 | } |
| 1375 | 1375 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | ** File: ym2413.c - software implementation of YM2413 |
| 4 | 4 | ** FM sound generator type OPLL |
| 5 | 5 | ** |
| 6 | ** Copyright | |
| 6 | ** Copyright | |
| 7 | 7 | ** |
| 8 | 8 | ** Version 1.0 |
| 9 | 9 | ** |
| r1490 | r1491 | |
| 252 | 252 | UINT8 address; /* address register */ |
| 253 | 253 | UINT8 status; /* status flag */ |
| 254 | 254 | |
| 255 | int index; /* index */ | |
| 255 | 256 | int clock; /* master clock (Hz) */ |
| 256 | 257 | int rate; /* sampling rate (Hz) */ |
| 257 | 258 | double freqbase; /* frequency base */ |
| r1490 | r1491 | |
| 1240 | 1241 | } |
| 1241 | 1242 | |
| 1242 | 1243 | |
| 1244 | static void OPLL_init_save(YM2413 *chip) | |
| 1245 | { | |
| 1246 | int chipitem = chip->index * 100; | |
| 1247 | int chnum; | |
| 1243 | 1248 | |
| 1249 | state_save_register_item_array("ym2413", chipitem, chip->instvol_r); | |
| 1250 | state_save_register_item("ym2413", chipitem, chip->eg_cnt); | |
| 1251 | state_save_register_item("ym2413", chipitem, chip->eg_timer); | |
| 1252 | state_save_register_item("ym2413", chipitem, chip->eg_timer_add); | |
| 1253 | state_save_register_item("ym2413", chipitem, chip->eg_timer_overflow); | |
| 1254 | state_save_register_item("ym2413", chipitem, chip->rhythm); | |
| 1255 | state_save_register_item("ym2413", chipitem, chip->lfo_am_cnt); | |
| 1256 | state_save_register_item("ym2413", chipitem, chip->lfo_am_inc); | |
| 1257 | state_save_register_item("ym2413", chipitem, chip->lfo_pm_cnt); | |
| 1258 | state_save_register_item("ym2413", chipitem, chip->lfo_pm_inc); | |
| 1259 | state_save_register_item("ym2413", chipitem, chip->noise_rng); | |
| 1260 | state_save_register_item("ym2413", chipitem, chip->noise_p); | |
| 1261 | state_save_register_item("ym2413", chipitem, chip->noise_f); | |
| 1262 | state_save_register_item_2d_array("ym2413", chipitem, chip->inst_tab); | |
| 1263 | state_save_register_item("ym2413", chipitem, chip->address); | |
| 1264 | state_save_register_item("ym2413", chipitem, chip->status); | |
| 1265 | ||
| 1266 | for (chnum = 0; chnum < ARRAY_LENGTH(chip->P_CH); chnum++) | |
| 1267 | { | |
| 1268 | OPLL_CH *ch = &chip->P_CH[chnum]; | |
| 1269 | int chitem = chipitem + (chnum + 1) * 10; | |
| 1270 | int slotnum; | |
| 1271 | ||
| 1272 | state_save_register_item("ym2413", chitem, ch->block_fnum); | |
| 1273 | state_save_register_item("ym2413", chitem, ch->fc); | |
| 1274 | state_save_register_item("ym2413", chitem, ch->ksl_base); | |
| 1275 | state_save_register_item("ym2413", chitem, ch->kcode); | |
| 1276 | state_save_register_item("ym2413", chitem, ch->sus); | |
| 1277 | ||
| 1278 | for (slotnum = 0; slotnum < ARRAY_LENGTH(ch->SLOT); slotnum++) | |
| 1279 | { | |
| 1280 | OPLL_SLOT *sl = &ch->SLOT[slotnum]; | |
| 1281 | int slitem = chitem + (slotnum + 1); | |
| 1282 | ||
| 1283 | state_save_register_item("ym2413", slitem, sl->ar); | |
| 1284 | state_save_register_item("ym2413", slitem, sl->dr); | |
| 1285 | state_save_register_item("ym2413", slitem, sl->rr); | |
| 1286 | state_save_register_item("ym2413", slitem, sl->KSR); | |
| 1287 | state_save_register_item("ym2413", slitem, sl->ksl); | |
| 1288 | state_save_register_item("ym2413", slitem, sl->ksr); | |
| 1289 | state_save_register_item("ym2413", slitem, sl->mul); | |
| 1290 | state_save_register_item("ym2413", slitem, sl->phase); | |
| 1291 | state_save_register_item("ym2413", slitem, sl->freq); | |
| 1292 | state_save_register_item("ym2413", slitem, sl->fb_shift); | |
| 1293 | state_save_register_item_array("ym2413", slitem, sl->op1_out); | |
| 1294 | state_save_register_item("ym2413", slitem, sl->eg_type); | |
| 1295 | state_save_register_item("ym2413", slitem, sl->state); | |
| 1296 | state_save_register_item("ym2413", slitem, sl->TL); | |
| 1297 | state_save_register_item("ym2413", slitem, sl->TLL); | |
| 1298 | state_save_register_item("ym2413", slitem, sl->volume); | |
| 1299 | state_save_register_item("ym2413", slitem, sl->sl); | |
| 1300 | state_save_register_item("ym2413", slitem, sl->eg_sh_dp); | |
| 1301 | state_save_register_item("ym2413", slitem, sl->eg_sel_dp); | |
| 1302 | state_save_register_item("ym2413", slitem, sl->eg_sh_ar); | |
| 1303 | state_save_register_item("ym2413", slitem, sl->eg_sel_ar); | |
| 1304 | state_save_register_item("ym2413", slitem, sl->eg_sh_dr); | |
| 1305 | state_save_register_item("ym2413", slitem, sl->eg_sel_dr); | |
| 1306 | state_save_register_item("ym2413", slitem, sl->eg_sh_rr); | |
| 1307 | state_save_register_item("ym2413", slitem, sl->eg_sel_rr); | |
| 1308 | state_save_register_item("ym2413", slitem, sl->eg_sh_rs); | |
| 1309 | state_save_register_item("ym2413", slitem, sl->eg_sel_rs); | |
| 1310 | state_save_register_item("ym2413", slitem, sl->key); | |
| 1311 | state_save_register_item("ym2413", slitem, sl->AMmask); | |
| 1312 | state_save_register_item("ym2413", slitem, sl->vib); | |
| 1313 | state_save_register_item("ym2413", slitem, sl->wavetable); | |
| 1314 | } | |
| 1315 | } | |
| 1316 | } | |
| 1317 | ||
| 1318 | ||
| 1244 | 1319 | static void OPLL_initalize(YM2413 *chip) |
| 1245 | 1320 | { |
| 1246 | 1321 | int i; |
| 1247 | 1322 | |
| 1323 | OPLL_init_save(chip); | |
| 1324 | ||
| 1248 | 1325 | /* frequency base */ |
| 1249 | 1326 | chip->freqbase = (chip->rate) ? ((double)chip->clock / 72.0) / chip->rate : 0; |
| 1250 | 1327 | #if 0 |
| r1490 | r1491 | |
| 1301 | 1378 | chip->eg_timer_add = (1<<EG_SH) * chip->freqbase; |
| 1302 | 1379 | chip->eg_timer_overflow = ( 1 ) * (1<<EG_SH); |
| 1303 | 1380 | /*logerror("YM2413init eg_timer_add=%8x eg_timer_overflow=%8x\n", chip->eg_timer_add, chip->eg_timer_overflow);*/ |
| 1304 | ||
| 1305 | 1381 | } |
| 1306 | 1382 | |
| 1307 | 1383 | INLINE void KEY_ON(OPLL_SLOT *SLOT, UINT32 key_set) |
| r1490 | r1491 | |
| 1925 | 2001 | /* Create one of virtual YM2413 */ |
| 1926 | 2002 | /* 'clock' is chip clock in Hz */ |
| 1927 | 2003 | /* 'rate' is sampling rate */ |
| 1928 | static YM2413 *OPLLCreate(int clock, int rate) | |
| 2004 | static YM2413 *OPLLCreate(int clock, int rate, int index) | |
| 1929 | 2005 | { |
| 1930 | 2006 | char *ptr; |
| 1931 | 2007 | YM2413 *chip; |
| r1490 | r1491 | |
| 1947 | 2023 | |
| 1948 | 2024 | chip = (YM2413 *)ptr; |
| 1949 | 2025 | |
| 2026 | chip->index = index; | |
| 1950 | 2027 | chip->clock = clock; |
| 1951 | 2028 | chip->rate = rate; |
| 1952 | 2029 | |
| r1490 | r1491 | |
| 2001 | 2078 | |
| 2002 | 2079 | |
| 2003 | 2080 | |
| 2004 | void * YM2413Init(int clock, int rate) | |
| 2081 | void * YM2413Init(int clock, int rate, int index) | |
| 2005 | 2082 | { |
| 2006 | 2083 | /* emulator create */ |
| 2007 | return OPLLCreate(clock, rate); | |
| 2084 | return OPLLCreate(clock, rate, index); | |
| 2008 | 2085 | } |
| 2009 | 2086 | |
| 2010 | 2087 | void YM2413Shutdown(void *chip) |
| r1490 | r1491 | |
|---|---|---|
| 240 | 240 | case SNDINFO_STR_CORE_FAMILY: info->s = "Gaelco custom"; break; |
| 241 | 241 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 242 | 242 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 243 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 243 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | 246 |
| r1490 | r1491 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | By Joe Zbiciak. Ported to MESS by tim lindner. |
| 8 | 8 | |
| 9 | Copyright (c) 1998-2000, Joseph Zbiciak, all rights reserved. | |
| 10 | Copyright (c) 2006, tim lindner, all rights reserved. | |
| 9 | Copyright Joseph Zbiciak, all rights reserved. | |
| 10 | Copyright tim lindner, all rights reserved. | |
| 11 | 11 | |
| 12 | 12 | - This source code is released as freeware for non-commercial purposes. |
| 13 | 13 | - You are free to use and redistribute this code in modified or |
| r1490 | r1491 | |
|---|---|---|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | |
| 30 | void *YM2413Init(int clock, int rate); | |
| 30 | void *YM2413Init(int clock, int rate, int index); | |
| 31 | 31 | void YM2413Shutdown(void *chip); |
| 32 | 32 | void YM2413ResetChip(void *chip); |
| 33 | 33 | void YM2413Write(void *chip, int a, int v); |
| r1490 | r1491 | |
|---|---|---|
| 298 | 298 | case SNDINFO_STR_CORE_FAMILY: info->s = "Irem custom"; break; |
| 299 | 299 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 300 | 300 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 301 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 301 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 302 | 302 | } |
| 303 | 303 | } |
| 304 | 304 |
| r1490 | r1491 | |
|---|---|---|
| 84 | 84 | case SNDINFO_STR_CORE_FAMILY: info->s = "None"; break; |
| 85 | 85 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 86 | 86 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 87 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 87 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 |
| r1490 | r1491 | |
|---|---|---|
| 372 | 372 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 373 | 373 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 374 | 374 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 375 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 375 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 376 | 376 | } |
| 377 | 377 | } |
| 378 | 378 | |
| r1490 | r1491 | |
| 408 | 408 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 409 | 409 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 410 | 410 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 411 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 411 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 |
| r1490 | r1491 | |
|---|---|---|
| 618 | 618 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco PCM"; break; |
| 619 | 619 | case SNDINFO_STR_CORE_VERSION: info->s = "1.1"; break; |
| 620 | 620 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 621 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 621 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 622 | 622 | } |
| 623 | 623 | } |
| 624 | 624 |
| r1490 | r1491 | |
|---|---|---|
| 249 | 249 | case SNDINFO_STR_CORE_FAMILY: info->s = "Konami custom"; break; |
| 250 | 250 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 251 | 251 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 252 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 252 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 |
| r1490 | r1491 | |
|---|---|---|
| 719 | 719 | case SNDINFO_STR_CORE_FAMILY: info->s = "Konami custom"; break; |
| 720 | 720 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 721 | 721 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 722 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 722 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 723 | 723 | } |
| 724 | 724 | } |
| 725 | 725 |
| r1490 | r1491 | |
|---|---|---|
| 222 | 222 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 223 | 223 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 224 | 224 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 225 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 225 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 |
| r1490 | r1491 | |
|---|---|---|
| 527 | 527 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco PCM"; break; |
| 528 | 528 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 529 | 529 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 530 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 530 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 |
| r1490 | r1491 | |
|---|---|---|
| 324 | 324 | case SNDINFO_STR_CORE_FAMILY: info->s = "ADPCM"; break; |
| 325 | 325 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 326 | 326 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 327 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 327 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 328 | 328 | } |
| 329 | 329 | } |
| 330 | 330 |
| r1490 | r1491 | |
|---|---|---|
| 402 | 402 | case SNDINFO_STR_CORE_FAMILY: info->s = "Capcom custom"; break; |
| 403 | 403 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 404 | 404 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 405 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 405 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 406 | 406 | } |
| 407 | 407 | } |
| 408 | 408 |
| r1490 | r1491 | |
|---|---|---|
| 184 | 184 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 185 | 185 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 186 | 186 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 187 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 187 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | |
| r1490 | r1491 | |
| 352 | 352 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 353 | 353 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 354 | 354 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 355 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 355 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | |
| r1490 | r1491 | |
| 558 | 558 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 559 | 559 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 560 | 560 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 561 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 561 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 562 | 562 | } |
| 563 | 563 | } |
| 564 | 564 |
| r1490 | r1491 | |
|---|---|---|
| 576 | 576 | case SNDINFO_STR_CORE_FAMILY: info->s = "Ricoh PCM"; break; |
| 577 | 577 | case SNDINFO_STR_CORE_VERSION: info->s = "1.1"; break; |
| 578 | 578 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 579 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 579 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 580 | 580 | } |
| 581 | 581 | } |
| r1490 | r1491 | |
|---|---|---|
| 513 | 513 | case SNDINFO_STR_CORE_FAMILY: info->s = "Philips"; break; |
| 514 | 514 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 515 | 515 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 516 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 516 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 517 | 517 | } |
| 518 | 518 | } |
| 519 | 519 |
| r1490 | r1491 | |
|---|---|---|
| 587 | 587 | case SNDINFO_STR_CORE_FAMILY: info->s = "Analog Synth"; break; |
| 588 | 588 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 589 | 589 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 590 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 590 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 591 | 591 | } |
| 592 | 592 | } |
| 593 | 593 |
| r1490 | r1491 | |
|---|---|---|
| 1121 | 1121 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha Wavetable"; break; |
| 1122 | 1122 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 1123 | 1123 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1124 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1124 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 1125 | 1125 | } |
| 1126 | 1126 | } |
| 1127 | 1127 |
| r1490 | r1491 | |
|---|---|---|
| 253 | 253 | case SNDINFO_STR_CORE_FAMILY: info->s = "Ricoh PCM"; break; |
| 254 | 254 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 255 | 255 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 256 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 256 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 |
| r1490 | r1491 | |
|---|---|---|
| 279 | 279 | case SNDINFO_STR_CORE_FAMILY: info->s = "Konami custom"; break; |
| 280 | 280 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 281 | 281 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 282 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 282 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 |
| r1490 | r1491 | |
|---|---|---|
| 184 | 184 | case SNDINFO_STR_CORE_FAMILY: info->s = "Votrax speech"; break; |
| 185 | 185 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 186 | 186 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 187 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 187 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | ** File: ymf262.c - software implementation of YMF262 |
| 4 | 4 | ** FM sound generator type OPL3 |
| 5 | 5 | ** |
| 6 | ** Copyright | |
| 6 | ** Copyright | |
| 7 | 7 | ** |
| 8 | 8 | ** Version 0.2 |
| 9 | 9 | ** |
| r1490 | r1491 | |
|---|---|---|
| 401 | 401 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; break; |
| 402 | 402 | case SNDINFO_STR_CORE_VERSION: info->s = "1.1"; break; |
| 403 | 403 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 404 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 404 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and | |
| 405 | 405 | } |
| 406 | 406 | } |
| 407 | 407 |
| r1490 | r1491 | |
|---|---|---|
| 96 | 96 | case SNDINFO_STR_CORE_FAMILY: info->s = "Cassette"; break; |
| 97 | 97 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 98 | 98 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 99 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 99 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 100 | 100 | } |
| 101 | 101 | } |
| r1490 | r1491 | |
|---|---|---|
| 350 | 350 | case SNDINFO_STR_CORE_FAMILY: info->s = "Bally"; break; |
| 351 | 351 | case SNDINFO_STR_CORE_VERSION: info->s = "2.0"; break; |
| 352 | 352 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 353 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 353 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 354 | 354 | } |
| 355 | 355 | } |
| r1490 | r1491 | |
|---|---|---|
| 315 | 315 | case SNDINFO_STR_CORE_FAMILY: info->s = "Seta custom"; break; |
| 316 | 316 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 317 | 317 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 318 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 318 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | copyright peter trauner | |
| 2 | copyright peter trauner | |
| 3 | 3 | |
| 4 | 4 | based on michael schwend's sid play |
| 5 | 5 |
| r1490 | r1491 | |
|---|---|---|
| 795 | 795 | case SNDINFO_STR_CORE_FAMILY: info->s = "NEC ADPCM"; break; |
| 796 | 796 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 797 | 797 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 798 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 798 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | 801 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | By R. Belmont. |
| 4 | 4 | Based in part on YMF278B emulator by R. Belmont and O. Galibert. |
| 5 | 5 | 12June04 update by Toshiaki Nijiura |
| 6 | Copyright | |
| 6 | Copyright | |
| 7 | 7 | |
| 8 | 8 | This software is dual-licensed: it may be used in MAME and properly licensed |
| 9 | 9 | MAME derivatives under the terms of the MAME license. For use outside of |
| r1490 | r1491 | |
| 1836 | 1836 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 1837 | 1837 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 1838 | 1838 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1839 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1839 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 1840 | 1840 | } |
| 1841 | 1841 | } |
| r1490 | r1491 | |
|---|---|---|
| 187 | 187 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 188 | 188 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 189 | 189 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 190 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 190 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 |
| r1490 | r1491 | |
|---|---|---|
| 21 | 21 | /* License Information and Copyright Notice */ |
| 22 | 22 | /* ======================================== */ |
| 23 | 23 | /* */ |
| 24 | /* TiaSound is Copyright | |
| 24 | /* TiaSound is Copyright | |
| 25 | 25 | /* */ |
| 26 | 26 | /* This library is free software; you can redistribute it and/or modify it */ |
| 27 | 27 | /* under the terms of version 2 of the GNU Library General Public License */ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * POKEY chip emulator 4.51 |
| 4 | * Copyright | |
| 4 | * Copyright Nicola Salmoria | |
| 5 | 5 | * |
| 6 | 6 | * Based on original info found in Ron Fries' Pokey emulator, |
| 7 | 7 | * with additions by Brad Oliver, Eric Smith and Juergen Buchmueller, |
| r1490 | r1491 | |
| 1542 | 1542 | case SNDINFO_STR_CORE_FAMILY: info->s = "Atari custom"; break; |
| 1543 | 1543 | case SNDINFO_STR_CORE_VERSION: info->s = "4.51"; break; |
| 1544 | 1544 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1545 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1545 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 1546 | 1546 | } |
| 1547 | 1547 | } |
| 1548 | 1548 |
| r1490 | r1491 | |
|---|---|---|
| 251 | 251 | case SNDINFO_STR_CORE_FAMILY: info->s = "GI speech"; break; |
| 252 | 252 | case SNDINFO_STR_CORE_VERSION: info->s = "1.1"; break; |
| 253 | 253 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 254 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 254 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and | |
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 |
| r1490 | r1491 | |
|---|---|---|
| 99 | 99 | case SNDINFO_STR_CORE_FAMILY: info->s = "Speaker"; break; |
| 100 | 100 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 101 | 101 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 102 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 102 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 103 | 103 | } |
| 104 | 104 | } |
| r1490 | r1491 | |
|---|---|---|
| 824 | 824 | case SNDINFO_STR_CORE_FAMILY: info->s = "PSG"; break; |
| 825 | 825 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 826 | 826 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 827 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 827 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 828 | 828 | } |
| 829 | 829 | } |
| 830 | 830 |
| r1490 | r1491 | |
|---|---|---|
| 326 | 326 | case SNDINFO_STR_CORE_FAMILY: info->s = "CD Audio"; break; |
| 327 | 327 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 328 | 328 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 329 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 329 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 330 | 330 | } |
| 331 | 331 | } |
| 332 | 332 |
| r1490 | r1491 | |
|---|---|---|
| 15 | 15 | /* License Information and Copyright Notice */ |
| 16 | 16 | /* ======================================== */ |
| 17 | 17 | /* */ |
| 18 | /* TiaSound is Copyright | |
| 18 | /* TiaSound is Copyright | |
| 19 | 19 | /* */ |
| 20 | 20 | /* This library is free software; you can redistribute it and/or modify it */ |
| 21 | 21 | /* under the terms of version 2 of the GNU Library General Public License */ |
| r1490 | r1491 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * POKEY chip emulator 4.3 |
| 4 | * Copyright | |
| 4 | * Copyright Nicola Salmoria and the MAME Team | |
| 5 | 5 | * |
| 6 | 6 | * Based on original info found in Ron Fries' Pokey emulator, |
| 7 | 7 | * with additions by Brad Oliver, Eric Smith and Juergen Buchmueller. |
| r1490 | r1491 | |
|---|---|---|
| 554 | 554 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; break; |
| 555 | 555 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 556 | 556 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 557 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 557 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 558 | 558 | } |
| 559 | 559 | } |
| 560 | 560 |
| r1490 | r1491 | |
|---|---|---|
| 171 | 171 | case SNDINFO_STR_CORE_FAMILY: info->s = "Seta custom"; break; |
| 172 | 172 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 173 | 173 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 174 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 174 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 |
| r1490 | r1491 | |
|---|---|---|
| 79 | 79 | case SNDINFO_STR_CORE_FAMILY: info->s = "Atari custom"; break; |
| 80 | 80 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 81 | 81 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 82 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 82 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | * MOS-6581 R1, R3, R4 |
| 6 | 6 | * |
| 7 | 7 | * Read-out combined waveforms taken from reSID 0.5. |
| 8 | * Copyright | |
| 8 | * Copyright | |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | static const UINT8 waveform30_6581[4096] = |
| r1490 | r1491 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | Legal information: |
| 38 | 38 | |
| 39 | Copyright | |
| 39 | Copyright | |
| 40 | 40 | |
| 41 | 41 | This library is free software; you can redistribute it and/or |
| 42 | 42 | modify it under the terms of the GNU Lesser General Public |
| r1490 | r1491 | |
| 364 | 364 | case SNDINFO_STR_CORE_FAMILY: info->s = "????"; break; |
| 365 | 365 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 366 | 366 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 367 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 367 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 |
| r1490 | r1491 | |
|---|---|---|
| 745 | 745 | case SNDINFO_STR_CORE_FAMILY: info->s = "Analog"; break; |
| 746 | 746 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 747 | 747 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 748 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 748 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 749 | 749 | } |
| 750 | 750 | } |
| 751 | 751 |
| r1490 | r1491 | |
|---|---|---|
| 606 | 606 | case SNDINFO_STR_CORE_FAMILY: info->s = "Big Hack"; break; |
| 607 | 607 | case SNDINFO_STR_CORE_VERSION: info->s = "1.1"; break; |
| 608 | 608 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 609 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 609 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | 612 |
| r1490 | r1491 | |
|---|---|---|
| 22 | 22 | Enabled DSP again. |
| 23 | 23 | * December 16, 2007 (kingshriek) Many EG bug fixes, implemented effects mixer, |
| 24 | 24 | implemented FM. |
| 25 | * January 5, 2007 (kingshriek+RB) Working, good-sounding FM, removed obsolete non-USEDSP code. | |
| 25 | 26 | */ |
| 26 | 27 | |
| 27 | 28 | #include <math.h> |
| r1490 | r1491 | |
| 39 | 40 | |
| 40 | 41 | |
| 41 | 42 | #define EG_SHIFT 16 |
| 43 | #define FM_DELAY 4 // delay in number of slots processed before samples are written to the FM ring buffer | |
| 42 | 44 | |
| 43 | 45 | // include the LFO handling code |
| 44 | 46 | #include "scsplfo.c" |
| r1490 | r1491 | |
| 184 | 186 | struct _SLOT Slots[32]; |
| 185 | 187 | signed short RINGBUF[64]; |
| 186 | 188 | unsigned char BUFPTR; |
| 189 | #if FM_DELAY | |
| 190 | signed short DELAYBUF[FM_DELAY]; | |
| 191 | unsigned char DELAYPTR; | |
| 192 | #endif | |
| 187 | 193 | unsigned char *SCSPRAM; |
| 188 | 194 | UINT32 SCSPRAM_LENGTH; |
| 189 | 195 | char Master; |
| r1490 | r1491 | |
| 216 | 222 | |
| 217 | 223 | int ARTABLE[64], DRTABLE[64]; |
| 218 | 224 | |
| 219 | #ifdef USEDSP | |
| 220 | 225 | struct _SCSPDSP DSP; |
| 221 | #endif | |
| 222 | 226 | }; |
| 223 | 227 | |
| 224 | 228 | static void dma_scsp(struct _SCSP *SCSP); /*SCSP DMA transfer function*/ |
| r1490 | r1491 | |
| 524 | 528 | { |
| 525 | 529 | SCSP->SCSPRAM = memory_region(intf->region); |
| 526 | 530 | SCSP->SCSPRAM_LENGTH = memory_region_length(intf->region); |
| 527 | #ifdef USEDSP | |
| 528 | 531 | SCSP->DSP.SCSPRAM = (UINT16 *)SCSP->SCSPRAM; |
| 529 | 532 | SCSP->DSP.SCSPRAM_LENGTH = memory_region_length(intf->region)/2; |
| 530 | #endif | |
| 531 | 533 | SCSP->SCSPRAM += intf->roffset; |
| 532 | 534 | } |
| 533 | 535 | } |
| r1490 | r1491 | |
| 695 | 697 | case 0x2: |
| 696 | 698 | case 0x3: |
| 697 | 699 | { |
| 698 | #ifdef USEDSP | |
| 699 | 700 | unsigned int v=RBL(SCSP); |
| 700 | 701 | SCSP->DSP.RBP=RBP(SCSP); |
| 701 | 702 | if(v==0) |
| r1490 | r1491 | |
| 706 | 707 | SCSP->DSP.RBL=32*1024; |
| 707 | 708 | if(v==3) |
| 708 | 709 | SCSP->DSP.RBL=64*1024; |
| 709 | #endif | |
| 710 | 710 | } |
| 711 | 711 | break; |
| 712 | 712 | case 0x6: |
| r1490 | r1491 | |
| 887 | 887 | SCSP->RINGBUF[(addr-0x600)/2]=val; |
| 888 | 888 | else |
| 889 | 889 | { |
| 890 | #ifdef USEDSP | |
| 891 | 890 | //DSP |
| 892 | 891 | if(addr<0x780) //COEF |
| 893 | 892 | *((unsigned short *) (SCSP->DSP.COEF+(addr-0x700)/2))=val; |
| r1490 | r1491 | |
| 900 | 899 | { |
| 901 | 900 | SCSPDSP_Start(&SCSP->DSP); |
| 902 | 901 | } |
| 903 | #endif | |
| 904 | 902 | } |
| 905 | 903 | } |
| 906 | 904 | |
| r1490 | r1491 | |
| 931 | 929 | |
| 932 | 930 | #define REVSIGN(v) ((~v)+1) |
| 933 | 931 | |
| 934 | ||
| 935 | #ifndef USEDSP | |
| 936 | static signed int *bufl1,*bufr1; | |
| 937 | #define SCSPNAME(_8bit,lfo,alfo,loop) \ | |
| 938 | static void SCSP_Update##_8bit##lfo##alfo##loop(struct _SCSP *SCSP, struct _SLOT *slot,unsigned int Enc,unsigned int nsamples) | |
| 939 | ||
| 940 | #define SCSPTMPL(_8bit,lfo,alfo,loop) \ | |
| 941 | SCSPNAME(_8bit,lfo,alfo,loop)\ | |
| 942 | {\ | |
| 943 | signed int sample;\ | |
| 944 | UINT32 addr;\ | |
| 945 | unsigned int s;\ | |
| 946 | for(s=0;s<nsamples;++s)\ | |
| 947 | {\ | |
| 948 | int step=slot->step;\ | |
| 949 | if(!slot->active)\ | |
| 950 | return;\ | |
| 951 | if(lfo) \ | |
| 952 | {\ | |
| 953 | step=step*PLFO_Step(&(slot->PLFO));\ | |
| 954 | step>>=SHIFT; \ | |
| 955 | }\ | |
| 956 | if(_8bit)\ | |
| 957 | {\ | |
| 958 | signed char *p=(signed char *) (slot->base+BYTE_XOR_BE((slot->cur_addr>>SHIFT)));\ | |
| 959 | int s;\ | |
| 960 | signed int fpart=slot->cur_addr&((1<<SHIFT)-1);\ | |
| 961 | s=(int) (p[0]<<8)*((1<<SHIFT)-fpart)+(int) slot->Prev*fpart;\ | |
| 962 | sample=(s>>SHIFT);\ | |
| 963 | slot->Prev=p[0]<<8;\ | |
| 964 | }\ | |
| 965 | else\ | |
| 966 | {\ | |
| 967 | signed short *p=(signed short *) (slot->base+((slot->cur_addr>>(SHIFT-1))&(~1)));\ | |
| 968 | int s;\ | |
| 969 | signed int fpart=slot->cur_addr&((1<<SHIFT)-1);\ | |
| 970 | s=(int) (p[0])*((1<<SHIFT)-fpart)+(int) slot->Prev*fpart;\ | |
| 971 | sample=(s>>SHIFT);\ | |
| 972 | slot->Prev=p[0];\ | |
| 973 | }\ | |
| 974 | if(slot->Backwards)\ | |
| 975 | slot->cur_addr-=step;\ | |
| 976 | else\ | |
| 977 | slot->cur_addr+=step;\ | |
| 978 | addr=slot->cur_addr>>SHIFT;\ | |
| 979 | if(loop==0)\ | |
| 980 | {\ | |
| 981 | if(addr>LEA(slot))\ | |
| 982 | {\ | |
| 983 | SCSP_StopSlot(slot,0);\ | |
| 984 | }\ | |
| 985 | }\ | |
| 986 | if(loop==1)\ | |
| 987 | {\ | |
| 988 | if(addr>=LEA(slot))\ | |
| 989 | slot->cur_addr=LSA(slot)<<SHIFT;\ | |
| 990 | }\ | |
| 991 | if(loop==2)\ | |
| 992 | {\ | |
| 993 | if(addr>=LEA(slot))\ | |
| 994 | {\ | |
| 995 | slot->cur_addr=LEA(slot)<<SHIFT;\ | |
| 996 | slot->step=REVSIGN(slot->step);\ | |
| 997 | }\ | |
| 998 | if(addr<LSA(slot) || (addr&0x80000000))\ | |
| 999 | slot->cur_addr=LEA(slot)<<SHIFT;\ | |
| 1000 | }\ | |
| 1001 | if(loop==3)\ | |
| 1002 | {\ | |
| 1003 | if(addr>=LEA(slot)) /*reached end, reverse till start*/ \ | |
| 1004 | {\ | |
| 1005 | slot->cur_addr=LEA(slot)<<SHIFT;\ | |
| 1006 | slot->Backwards=1;\ | |
| 1007 | }\ | |
| 1008 | if((addr<=LSA(slot) || (addr&0x80000000)) && (slot->Backwards))/*reached start or negative*/\ | |
| 1009 | {\ | |
| 1010 | slot->cur_addr=LSA(slot)<<SHIFT;\ | |
| 1011 | slot->Backwards=0;\ | |
| 1012 | }\ | |
| 1013 | }\ | |
| 1014 | if(alfo)\ | |
| 1015 | {\ | |
| 1016 | sample=sample*ALFO_Step(&(slot->ALFO));\ | |
| 1017 | sample>>=SHIFT;\ | |
| 1018 | }\ | |
| 1019 | *RBUFDST=sample;\ | |
| 1020 | \ | |
| 1021 | sample=(sample*EG_Update(slot))>>SHIFT;\ | |
| 1022 | \ | |
| 1023 | *bufl1=*bufl1 + ((sample*SCSP->LPANTABLE[Enc])>>SHIFT);\ | |
| 1024 | *bufr1=*bufr1 + ((sample*SCSP->RPANTABLE[Enc])>>SHIFT);\ | |
| 1025 | ++bufl1;\ | |
| 1026 | ++bufr1;\ | |
| 1027 | }\ | |
| 1028 | } | |
| 1029 | ||
| 1030 | SCSPTMPL(0,0,0,0) | |
| 1031 | SCSPTMPL(0,0,0,1) | |
| 1032 | SCSPTMPL(0,0,0,2) | |
| 1033 | SCSPTMPL(0,0,0,3) | |
| 1034 | SCSPTMPL(0,0,1,0) | |
| 1035 | SCSPTMPL(0,0,1,1) | |
| 1036 | SCSPTMPL(0,0,1,2) | |
| 1037 | SCSPTMPL(0,0,1,3) | |
| 1038 | SCSPTMPL(0,1,0,0) | |
| 1039 | SCSPTMPL(0,1,0,1) | |
| 1040 | SCSPTMPL(0,1,0,2) | |
| 1041 | SCSPTMPL(0,1,0,3) | |
| 1042 | SCSPTMPL(0,1,1,0) | |
| 1043 | SCSPTMPL(0,1,1,1) | |
| 1044 | SCSPTMPL(0,1,1,2) | |
| 1045 | SCSPTMPL(0,1,1,3) | |
| 1046 | SCSPTMPL(1,0,0,0) | |
| 1047 | SCSPTMPL(1,0,0,1) | |
| 1048 | SCSPTMPL(1,0,0,2) | |
| 1049 | SCSPTMPL(1,0,0,3) | |
| 1050 | SCSPTMPL(1,0,1,0) | |
| 1051 | SCSPTMPL(1,0,1,1) | |
| 1052 | SCSPTMPL(1,0,1,2) | |
| 1053 | SCSPTMPL(1,0,1,3) | |
| 1054 | SCSPTMPL(1,1,0,0) | |
| 1055 | SCSPTMPL(1,1,0,1) | |
| 1056 | SCSPTMPL(1,1,0,2) | |
| 1057 | SCSPTMPL(1,1,0,3) | |
| 1058 | SCSPTMPL(1,1,1,0) | |
| 1059 | SCSPTMPL(1,1,1,1) | |
| 1060 | SCSPTMPL(1,1,1,2) | |
| 1061 | SCSPTMPL(1,1,1,3) | |
| 1062 | ||
| 1063 | #undef SCSPTMPL | |
| 1064 | #define SCSPTMPL(_8bit,lfo,alfo,loop) \ | |
| 1065 | SCSP_Update##_8bit##lfo##alfo##loop , | |
| 1066 | ||
| 1067 | ||
| 1068 | typedef void (*_SCSPUpdateModes)(struct _SCSP *,struct _SLOT *,unsigned int,unsigned int); | |
| 1069 | ||
| 1070 | static const _SCSPUpdateModes SCSPUpdateModes[]= | |
| 1071 | { | |
| 1072 | SCSPTMPL(0,0,0,0) | |
| 1073 | SCSPTMPL(0,0,0,1) | |
| 1074 | SCSPTMPL(0,0,0,2) | |
| 1075 | SCSPTMPL(0,0,0,3) | |
| 1076 | SCSPTMPL(0,0,1,0) | |
| 1077 | SCSPTMPL(0,0,1,1) | |
| 1078 | SCSPTMPL(0,0,1,2) | |
| 1079 | SCSPTMPL(0,0,1,3) | |
| 1080 | SCSPTMPL(0,1,0,0) | |
| 1081 | SCSPTMPL(0,1,0,1) | |
| 1082 | SCSPTMPL(0,1,0,2) | |
| 1083 | SCSPTMPL(0,1,0,3) | |
| 1084 | SCSPTMPL(0,1,1,0) | |
| 1085 | SCSPTMPL(0,1,1,1) | |
| 1086 | SCSPTMPL(0,1,1,2) | |
| 1087 | SCSPTMPL(0,1,1,3) | |
| 1088 | SCSPTMPL(1,0,0,0) | |
| 1089 | SCSPTMPL(1,0,0,1) | |
| 1090 | SCSPTMPL(1,0,0,2) | |
| 1091 | SCSPTMPL(1,0,0,3) | |
| 1092 | SCSPTMPL(1,0,1,0) | |
| 1093 | SCSPTMPL(1,0,1,1) | |
| 1094 | SCSPTMPL(1,0,1,2) | |
| 1095 | SCSPTMPL(1,0,1,3) | |
| 1096 | SCSPTMPL(1,1,0,0) | |
| 1097 | SCSPTMPL(1,1,0,1) | |
| 1098 | SCSPTMPL(1,1,0,2) | |
| 1099 | SCSPTMPL(1,1,0,3) | |
| 1100 | SCSPTMPL(1,1,1,0) | |
| 1101 | SCSPTMPL(1,1,1,1) | |
| 1102 | SCSPTMPL(1,1,1,2) | |
| 1103 | SCSPTMPL(1,1,1,3) | |
| 1104 | }; | |
| 1105 | ||
| 1106 | ||
| 1107 | static void SCSP_DoMasterSamples(struct _SCSP *SCSP, int nsamples) | |
| 1108 | { | |
| 1109 | stream_sample_t *bufr,*bufl; | |
| 1110 | int sl, s; | |
| 1111 | ||
| 1112 | for(sl=0;sl<32;++sl) | |
| 1113 | { | |
| 1114 | bufr1=SCSP->buffertmpr; | |
| 1115 | bufl1=SCSP->buffertmpl; | |
| 1116 | ||
| 1117 | if(SCSP->Slots[sl].active) | |
| 1118 | { | |
| 1119 | struct _SLOT *slot=SCSP->Slots+sl; | |
| 1120 | unsigned short Enc=((TL(slot))<<0x0)|((DIPAN(slot))<<0x8)|((DISDL(slot))<<0xd); | |
| 1121 | unsigned int mode=LPCTL(slot); | |
| 1122 | ||
| 1123 | RBUFDST=SCSP->RINGBUF+SCSP->BUFPTR; | |
| 1124 | if(PLFOS(slot)) | |
| 1125 | mode|=8; | |
| 1126 | if(ALFOS(slot)) | |
| 1127 | mode|=4; | |
| 1128 | if(PCM8B(slot)) | |
| 1129 | mode|=0x10; | |
| 1130 | ||
| 1131 | SCSPUpdateModes[mode](SCSP,slot,Enc,nsamples); | |
| 1132 | ||
| 1133 | ++SCSP->BUFPTR; | |
| 1134 | SCSP->BUFPTR&=63; | |
| 1135 | } | |
| 1136 | } | |
| 1137 | ||
| 1138 | bufr=bufferr; | |
| 1139 | bufl=bufferl; | |
| 1140 | bufr1=SCSP->buffertmpr; | |
| 1141 | bufl1=SCSP->buffertmpl; | |
| 1142 | for(s=0;s<nsamples;++s) | |
| 1143 | { | |
| 1144 | signed int smpl=*bufl1>>2; | |
| 1145 | signed int smpr=*bufr1>>2; | |
| 1146 | ||
| 1147 | *bufl=ICLIP16(smpl); | |
| 1148 | *bufr=ICLIP16(smpr); | |
| 1149 | *bufl1=0; | |
| 1150 | *bufr1=0; | |
| 1151 | ++bufl; | |
| 1152 | ++bufr; | |
| 1153 | ++bufl1; | |
| 1154 | ++bufr1; | |
| 1155 | ||
| 1156 | } | |
| 1157 | } | |
| 1158 | #else | |
| 1159 | 932 | INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot) |
| 1160 | 933 | { |
| 1161 | 934 | INT32 sample; |
| r1490 | r1491 | |
| 1184 | 957 | addr2=(slot->nxt_addr>>(SHIFT-1))&0x7fffe; |
| 1185 | 958 | } |
| 1186 | 959 | |
| 1187 | /*if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0) | |
| 1188 | { | |
| 1189 | INT32 smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2; | |
| 1190 | INT32 cycle=LEA(slot)-LSA(slot); // cycle corresponds to 2 pi | |
| 960 | if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0) | |
| 961 | { | |
| 962 | INT32 smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2; | |
| 963 | INT32 cycle=LEA(slot)-LSA(slot); // cycle corresponds to 2 pi | |
| 1191 | 964 | |
| 1192 | smp*=cycle; // associate cycle with full 16-bit sample range | |
| 1193 | smp>>=0x1A-MDL(slot); // ex. for MDL=0xF, sample range corresponds to +/- 64 pi (32=2^5 cycles) so shift by 11 (16-5 == 0x1A-0xF) | |
| 1194 | while(smp<0) smp+=cycle; smp%=cycle; // keep modulation sampler within a single cycle | |
| 1195 | if(!PCM8B(slot)) smp<<=1; | |
| 965 | smp<<=0xA; // associate cycle with 1024 | |
| 966 | smp>>=0x1A-MDL(slot); // ex. for MDL=0xF, sample range corresponds to +/- 64 pi (32=2^5 cycles) so shift by 11 (16-5 == 0x1A-0xF) | |
| 967 | while(smp<0) smp+=cycle; smp%=cycle; // keep modulation sampler within a single cycle | |
| 968 | if(!PCM8B(slot)) smp<<=1; | |
| 1196 | 969 | |
| 1197 | addr1+=smp; addr2+=smp; | |
| 1198 | if(!PCM8B(slot)) | |
| 1199 | { | |
| 1200 | addr1&=0x7fffe; addr2&=0x7fffe; | |
| 1201 | } | |
| 1202 | else | |
| 1203 | { | |
| 1204 | addr1&=0x7ffff; addr2&=0x7ffff; | |
| 1205 | } | |
| 1206 | }*/ | |
| 970 | addr1+=smp; addr2+=smp; | |
| 971 | } | |
| 1207 | 972 | |
| 1208 | if(PCM8B(slot)) //8 bit signed | |
| 1209 | { | |
| 1210 | INT8 *p1=(signed char *) (SCSP->SCSPRAM+((SA(slot)+addr1)^1)); | |
| 1211 | INT8 *p2=(signed char *) (SCSP->SCSPRAM+((SA(slot)+addr2)^1)); | |
| 1212 | //sample=(p[0])<<8; | |
| 1213 | INT32 s; | |
| 1214 | INT32 fpart=slot->cur_addr&((1<<SHIFT)-1); | |
| 1215 | s=(int) (p1[0]<<8)*((1<<SHIFT)-fpart)+(int) (p2[0]<<8)*fpart; | |
| 1216 | sample=(s>>SHIFT); | |
| 1217 | } | |
| 1218 | else //16 bit signed (endianness?) | |
| 1219 | { | |
| 1220 | INT16 *p1=(signed short *) (slot->base+addr1); | |
| 1221 | INT16 *p2=(signed short *) (slot->base+addr2); | |
| 1222 | //sample=LE16(p[0]); | |
| 1223 | INT32 s; | |
| 1224 | INT32 fpart=slot->cur_addr&((1<<SHIFT)-1); | |
| 1225 | s=(int) (p1[0])*((1<<SHIFT)-fpart)+(int) (p2[0])*fpart; | |
| 1226 | sample=(s>>SHIFT); | |
| 1227 | } | |
| 973 | if(PCM8B(slot)) //8 bit signed | |
| 974 | { | |
| 975 | INT8 *p1=(signed char *) (SCSP->SCSPRAM+BYTE_XOR_BE(((SA(slot)+addr1))&0x7FFFF)); | |
| 976 | INT8 *p2=(signed char *) (SCSP->SCSPRAM+BYTE_XOR_BE(((SA(slot)+addr2))&0x7FFFF)); | |
| 977 | //sample=(p[0])<<8; | |
| 978 | INT32 s; | |
| 979 | INT32 fpart=slot->cur_addr&((1<<SHIFT)-1); | |
| 980 | s=(int) (p1[0]<<8)*((1<<SHIFT)-fpart)+(int) (p2[0]<<8)*fpart; | |
| 981 | sample=(s>>SHIFT); | |
| 982 | } | |
| 983 | else //16 bit signed (endianness?) | |
| 984 | { | |
| 985 | INT16 *p1=(signed short *) (SCSP->SCSPRAM+((SA(slot)+addr1)&0x7FFFE)); | |
| 986 | INT16 *p2=(signed short *) (SCSP->SCSPRAM+((SA(slot)+addr2)&0x7FFFE)); | |
| 987 | INT32 s; | |
| 988 | INT32 fpart=slot->cur_addr&((1<<SHIFT)-1); | |
| 989 | s=(int)(p1[0])*((1<<SHIFT)-fpart)+(int)(p2[0])*fpart; | |
| 990 | sample=(s>>SHIFT); | |
| 991 | } | |
| 1228 | 992 | |
| 1229 | 993 | if(SBCTL(slot)&0x1) |
| 1230 | 994 | sample ^= 0x7FFF; |
| r1490 | r1491 | |
| 1318 | 1082 | |
| 1319 | 1083 | for(sl=0;sl<32;++sl) |
| 1320 | 1084 | { |
| 1085 | #if FM_DELAY | |
| 1086 | RBUFDST=SCSP->DELAYBUF+SCSP->DELAYPTR; | |
| 1087 | #else | |
| 1321 | 1088 | RBUFDST=SCSP->RINGBUF+SCSP->BUFPTR; |
| 1089 | #endif | |
| 1322 | 1090 | if(SCSP->Slots[sl].active) |
| 1323 | 1091 | { |
| 1324 | 1092 | struct _SLOT *slot=SCSP->Slots+sl; |
| r1490 | r1491 | |
| 1337 | 1105 | smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT; |
| 1338 | 1106 | } |
| 1339 | 1107 | } |
| 1340 | --SCSP->BUFPTR; | |
| 1108 | ||
| 1109 | #if FM_DELAY | |
| 1110 | SCSP->RINGBUF[(SCSP->BUFPTR+64-(FM_DELAY-1))&63] = SCSP->DELAYBUF[(SCSP->DELAYPTR+FM_DELAY-(FM_DELAY-1))%FM_DELAY]; | |
| 1111 | #endif | |
| 1112 | ++SCSP->BUFPTR; | |
| 1341 | 1113 | SCSP->BUFPTR&=63; |
| 1114 | #if FM_DELAY | |
| 1115 | ++SCSP->DELAYPTR; | |
| 1116 | if(SCSP->DELAYPTR>FM_DELAY-1) SCSP->DELAYPTR=0; | |
| 1117 | #endif | |
| 1342 | 1118 | } |
| 1343 | 1119 | |
| 1344 | 1120 | SCSPDSP_Step(&SCSP->DSP); |
| r1490 | r1491 | |
| 1358 | 1134 | *bufr++ = ICLIP16(smpr>>2); |
| 1359 | 1135 | } |
| 1360 | 1136 | } |
| 1361 | #endif | |
| 1362 | 1137 | |
| 1363 | 1138 | static void dma_scsp(struct _SCSP *SCSP) |
| 1364 | 1139 | { |
| r1490 | r1491 | |
| 1459 | 1234 | if (SCSP) |
| 1460 | 1235 | { |
| 1461 | 1236 | SCSP->SCSPRAM = base; |
| 1462 | #ifdef USEDSP | |
| 1463 | 1237 | SCSP->DSP.SCSPRAM = base; |
| 1464 | #endif | |
| 1465 | 1238 | } |
| 1466 | 1239 | } |
| 1467 | 1240 | |
| r1490 | r1491 | |
| 1604 | 1377 | case SNDINFO_STR_CORE_FAMILY: info->s = "Sega/Yamaha custom"; break; |
| 1605 | 1378 | case SNDINFO_STR_CORE_VERSION: info->s = "2.1.1"; break; |
| 1606 | 1379 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1607 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1380 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 1608 | 1381 | } |
| 1609 | 1382 | } |
| 1610 | 1383 |
| r1490 | r1491 | |
|---|---|---|
| 797 | 797 | case SNDINFO_STR_CORE_FAMILY: info->s = "ADPCM"; break; |
| 798 | 798 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 799 | 799 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 800 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 800 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 801 | 801 | } |
| 802 | 802 | } |
| 803 | 803 |
| r1490 | r1491 | |
|---|---|---|
| 476 | 476 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 477 | 477 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 478 | 478 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 479 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 479 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 480 | 480 | } |
| 481 | 481 | } |
| 482 | 482 | #endif |
| r1490 | r1491 | |
| 513 | 513 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 514 | 514 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 515 | 515 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 516 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 516 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 517 | 517 | } |
| 518 | 518 | } |
| 519 | 519 |
| r1490 | r1491 | |
|---|---|---|
| 141 | 141 | case SNDINFO_STR_CORE_FAMILY: info->s = "Filters"; break; |
| 142 | 142 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 143 | 143 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 144 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 144 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 |
| r1490 | r1491 | |
|---|---|---|
| 192 | 192 | case SNDINFO_STR_CORE_FAMILY: info->s = "Beep"; break; |
| 193 | 193 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 194 | 194 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 195 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 195 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 196 | 196 | } |
| 197 | 197 | } |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | ** File: fmopl.c - software implementation of FM sound generator |
| 4 | 4 | ** types OPL and OPL2 |
| 5 | 5 | ** |
| 6 | ** Copyright (C) 2002,2003 Jarek Burczynski (bujar at mame dot net) | |
| 7 | ** Copyright (C) 1999,2000 Tatsuyuki Satoh , MultiArcadeMachineEmulator development | |
| 6 | ** Copyright Jarek Burczynski (bujar at mame dot net) | |
| 7 | ** Copyright Tatsuyuki Satoh , MultiArcadeMachineEmulator development | |
| 8 | 8 | ** |
| 9 | 9 | ** Version 0.72 |
| 10 | 10 | ** |
| r1490 | r1491 | |
|---|---|---|
| 120 | 120 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; break; |
| 121 | 121 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 122 | 122 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 123 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 123 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 124 | 124 | } |
| 125 | 125 | } |
| r1490 | r1491 | |
|---|---|---|
| 572 | 572 | case SNDINFO_STR_CORE_FAMILY: info->s = "ICS"; break; |
| 573 | 573 | case SNDINFO_STR_CORE_VERSION: info->s = "1.01"; break; |
| 574 | 574 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 575 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 575 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria | |
| 576 | 576 | } |
| 577 | 577 | } |
| 578 | 578 |
| r1490 | r1491 | |
|---|---|---|
| 181 | 181 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; break; |
| 182 | 182 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 183 | 183 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 184 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 184 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | By Jonathan Gevaryahu ("Lord Nightmare") with help from Kevin Horton ("kevtris") |
| 5 | 5 | MAME conversion and integration by R. Belmont |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | |
| 9 | 9 | Version history: |
| 10 | 10 | 0.8 initial version - LN |
| r1490 | r1491 | |
| 542 | 542 | case SNDINFO_STR_CORE_FAMILY: info->s = "TSI S14001A"; break; |
| 543 | 543 | case SNDINFO_STR_CORE_VERSION: info->s = "1.11"; break; |
| 544 | 544 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 545 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 545 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 546 | 546 | } |
| 547 | 547 | } |
| 548 | 548 |
| r1490 | r1491 | |
|---|---|---|
| 328 | 328 | case SNDINFO_STR_CORE_FAMILY: info->s = "Gaelco custom"; break; |
| 329 | 329 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 330 | 330 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 331 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 331 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 332 | 332 | } |
| 333 | 333 | } |
| 334 | 334 | |
| r1490 | r1491 | |
| 364 | 364 | case SNDINFO_STR_CORE_FAMILY: info->s = "Gaelco custom"; break; |
| 365 | 365 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 366 | 366 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 367 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 367 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | ** |
| 5 | 5 | ** File: fm.c -- software implementation of Yamaha FM sound generator |
| 6 | 6 | ** |
| 7 | ** Copyright (C) 2001, 2002, 2003 Jarek Burczynski (bujar at mame dot net) | |
| 8 | ** Copyright (C) 1998 Tatsuyuki Satoh , MultiArcadeMachineEmulator development | |
| 7 | ** Copyright Jarek Burczynski (bujar at mame dot net) | |
| 8 | ** Copyright Tatsuyuki Satoh , MultiArcadeMachineEmulator development | |
| 9 | 9 | ** |
| 10 | 10 | ** Version 1.4 (final beta) |
| 11 | 11 | ** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | BSMT2000 sound emulator. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | |
| 9 | 9 | Chip is actually a TMS320C15 DSP with embedded mask rom |
| 10 | 10 | Trivia: BSMT stands for "Brian Schmidt's Mouse Trap" |
| r1490 | r1491 | |
| 524 | 524 | case SNDINFO_STR_CORE_FAMILY: info->s = "Data East Wavetable"; break; |
| 525 | 525 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 526 | 526 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 527 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 527 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 528 | 528 | } |
| 529 | 529 | } |
| r1490 | r1491 | |
|---|---|---|
| 261 | 261 | case SNDINFO_STR_CORE_FAMILY: info->s = "DAC"; break; |
| 262 | 262 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 263 | 263 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 264 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 264 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 |
| r1490 | r1491 | |
|---|---|---|
| 1323 | 1323 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 1324 | 1324 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 1325 | 1325 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 1326 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 1326 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 1327 | 1327 | } |
| 1328 | 1328 | } |
| 1329 | 1329 |
| r1490 | r1491 | |
|---|---|---|
| 309 | 309 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 310 | 310 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 311 | 311 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 312 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 312 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 313 | 313 | } |
| 314 | 314 | } |
| r1490 | r1491 | |
|---|---|---|
| 670 | 670 | case SNDINFO_STR_CORE_FAMILY: info->s = "OKI ADPCM"; break; |
| 671 | 671 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 672 | 672 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 673 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 673 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 674 | 674 | } |
| 675 | 675 | } |
| 676 | 676 |
| r1490 | r1491 | |
|---|---|---|
| 2164 | 2164 | case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq Wavetable"; break; |
| 2165 | 2165 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 2166 | 2166 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 2167 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 2167 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 2168 | 2168 | } |
| 2169 | 2169 | } |
| 2170 | 2170 | |
| r1490 | r1491 | |
| 2199 | 2199 | case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq Wavetable"; break; |
| 2200 | 2200 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 2201 | 2201 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 2202 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 2202 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 2203 | 2203 | } |
| 2204 | 2204 | } |
| 2205 | 2205 |
| r1490 | r1491 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | By R. Belmont and O. Galibert. |
| 39 | 39 | |
| 40 | Copyright | |
| 40 | Copyright | |
| 41 | 41 | |
| 42 | 42 | This software is dual-licensed: it may be used in MAME and properly licensed |
| 43 | 43 | MAME derivatives under the terms of the MAME license. For use outside of |
| r1490 | r1491 | |
| 817 | 817 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 818 | 818 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 819 | 819 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 820 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 820 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 821 | 821 | } |
| 822 | 822 | } |
| 823 | 823 |
| r1490 | r1491 | |
|---|---|---|
| 124 | 124 | case SNDINFO_STR_CORE_FAMILY: info->s = "SID"; break; |
| 125 | 125 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 126 | 126 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 127 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 127 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 |
| r1490 | r1491 | |
|---|---|---|
| 74 | 74 | case SNDINFO_STR_CORE_FAMILY: info->s = "Filters"; break; |
| 75 | 75 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 76 | 76 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 77 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 77 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 |
| r1490 | r1491 | |
|---|---|---|
| 256 | 256 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; break; |
| 257 | 257 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 258 | 258 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 259 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 259 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 |
| r1490 | r1491 | |
|---|---|---|
| 231 | 231 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 232 | 232 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 233 | 233 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 234 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 234 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 235 | 235 | } |
| 236 | 236 | } |
| r1490 | r1491 | |
|---|---|---|
| 689 | 689 | case SNDINFO_STR_CORE_FAMILY: info->s = "Sony custom"; break; |
| 690 | 690 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 691 | 691 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 692 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 692 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 693 | 693 | } |
| 694 | 694 | } |
| 695 | 695 |
| r1490 | r1491 | |
|---|---|---|
| 481 | 481 | case SNDINFO_STR_CORE_FAMILY: info->s = "Konami custom"; break; |
| 482 | 482 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 483 | 483 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 484 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 484 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 485 | 485 | } |
| 486 | 486 | } |
| 487 | 487 |
| r1490 | r1491 | |
|---|---|---|
| 57 | 57 | memset(info, 0, sizeof(*info)); |
| 58 | 58 | |
| 59 | 59 | /* emulator create */ |
| 60 | info->chip = YM2413Init(clock, rate); | |
| 60 | info->chip = YM2413Init(clock, rate, sndindex); | |
| 61 | 61 | if (!info->chip) |
| 62 | 62 | return NULL; |
| 63 | 63 | |
| r1490 | r1491 | |
| 181 | 181 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 182 | 182 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 183 | 183 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 184 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 184 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 185 | 185 | } |
| 186 | 186 | } |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Rules for building sound cores |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 155 | 155 | case SNDINFO_STR_CORE_FAMILY: info->s = "Sega custom"; break; |
| 156 | 156 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 157 | 157 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 158 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 158 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 159 | 159 | } |
| 160 | 160 | } |
| r1490 | r1491 | |
|---|---|---|
| 268 | 268 | case SNDINFO_STR_CORE_FAMILY: info->s = "???"; break; |
| 269 | 269 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 270 | 270 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 271 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 271 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 |
| r1490 | r1491 | |
|---|---|---|
| 545 | 545 | case SNDINFO_STR_CORE_FAMILY: info->s = "Sega custom"; break; |
| 546 | 546 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 547 | 547 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 548 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 548 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 |
| r1490 | r1491 | |
|---|---|---|
| 853 | 853 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 854 | 854 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 855 | 855 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 856 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 856 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 857 | 857 | } |
| 858 | 858 | } |
| 859 | 859 | |
| r1490 | r1491 | |
| 887 | 887 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 888 | 888 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 889 | 889 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 890 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 890 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 891 | 891 | } |
| 892 | 892 | } |
| 893 | 893 | |
| r1490 | r1491 | |
| 921 | 921 | case SNDINFO_STR_CORE_FAMILY: info->s = "Namco custom"; break; |
| 922 | 922 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 923 | 923 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 924 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 924 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 925 | 925 | } |
| 926 | 926 | } |
| 927 | 927 |
| r1490 | r1491 | |
|---|---|---|
| 2494 | 2494 | case SNDINFO_STR_CORE_FAMILY: info->s = "Analog"; break; |
| 2495 | 2495 | case SNDINFO_STR_CORE_VERSION: info->s = "2.1"; break; |
| 2496 | 2496 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 2497 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 2497 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 2498 | 2498 | } |
| 2499 | 2499 | } |
| 2500 | 2500 |
| r1490 | r1491 | |
|---|---|---|
| 715 | 715 | case SNDINFO_STR_CORE_FAMILY: info->s = "VLM speech"; break; |
| 716 | 716 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 717 | 717 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 718 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 718 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 719 | 719 | } |
| 720 | 720 | } |
| 721 | 721 |
| r1490 | r1491 | |
|---|---|---|
| 269 | 269 | case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; break; |
| 270 | 270 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 271 | 271 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 272 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 272 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 |
| r1490 | r1491 | |
|---|---|---|
| 343 | 343 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 344 | 344 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 345 | 345 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 346 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 346 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 347 | 347 | } |
| 348 | 348 | } |
| r1490 | r1491 | |
|---|---|---|
| 503 | 503 | case SNDINFO_STR_CORE_FAMILY: info->s = "Konami custom"; break; |
| 504 | 504 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 505 | 505 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 506 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 506 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 507 | 507 | } |
| 508 | 508 | } |
| 509 | 509 |
| r1490 | r1491 | |
|---|---|---|
| 3 | 3 | ES5503 - Ensoniq ES5503 "DOC" emulator v1.0 |
| 4 | 4 | By R. Belmont. |
| 5 | 5 | |
| 6 | Copyright | |
| 6 | Copyright | |
| 7 | 7 | |
| 8 | 8 | This software is dual-licensed: it may be used in MAME and properly licensed |
| 9 | 9 | MAME derivatives under the terms of the MAME license. For use outside of |
| r1490 | r1491 | |
| 545 | 545 | case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq ES550x"; break; |
| 546 | 546 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 547 | 547 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 548 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 548 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 |
| r1490 | r1491 | |
|---|---|---|
| 473 | 473 | case SNDINFO_STR_CORE_FAMILY: info->s = "Excellent Systems ADPCM"; break; |
| 474 | 474 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 475 | 475 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 476 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 476 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 477 | 477 | } |
| 478 | 478 | } |
| 479 | 479 |
| r1490 | r1491 | |
|---|---|---|
| 783 | 783 | case SNDINFO_STR_CORE_FAMILY: info->s = "Nintendo custom"; break; |
| 784 | 784 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 785 | 785 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 786 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 786 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 787 | 787 | } |
| 788 | 788 | } |
| 789 | 789 |
| r1490 | r1491 | |
|---|---|---|
| 183 | 183 | case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; break; |
| 184 | 184 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 185 | 185 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 186 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 186 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Input sequence abstractions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Input sequence abstractions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions used to handle MAME's user interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions to manage profiling of MAME execution. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions used to handle MAME's crude user interface. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions to manage profiling of MAME execution. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core sound interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
| 958 | 958 | case SNDINFO_STR_CORE_FAMILY: info->s = "Dummy"; break; |
| 959 | 959 | case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; |
| 960 | 960 | case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; |
| 961 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright | |
| 961 | case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; | |
| 962 | 962 | } |
| 963 | 963 | } |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core sound functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | General debugging interfaces |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Driver construction helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core sound interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core sound interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Handle input from the user. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
| 39 | 39 | #define JOYSTICK_MAP_STICKY 0x0f |
| 40 | 40 | |
| 41 | 41 | /* the largest number of tracked pressed switches for memory */ |
| 42 | #define MAX_PRESSED_SWITCHES | |
| 42 | #define MAX_PRESSED_SWITCHES | |
| 43 | 43 | |
| 44 | 44 | /* invalid memory value for axis polling */ |
| 45 | 45 | #define INVALID_AXIS_VALUE 0x7fffffff |
| r1490 | r1491 | |
| 956 | 956 | |
| 957 | 957 | |
| 958 | 958 | /*------------------------------------------------- |
| 959 | input_code_poll_keyboard_switches - poll for | |
| 960 | any keyboard-specific input | |
| 961 | -------------------------------------------------*/ | |
| 962 | ||
| 963 | input_code input_code_poll_keyboard_switches(int reset) | |
| 964 | { | |
| 965 | input_device_list *devlist = &device_list[DEVICE_CLASS_KEYBOARD]; | |
| 966 | int devnum; | |
| 967 | ||
| 968 | /* if resetting memory, do it now */ | |
| 969 | if (reset) | |
| 970 | code_pressed_memory_reset(); | |
| 971 | ||
| 972 | /* iterate over devices within each class */ | |
| 973 | for (devnum = 0; devnum < devlist->count; devnum++) | |
| 974 | { | |
| 975 | input_device *device = &devlist->list[devnum]; | |
| 976 | input_item_id itemid; | |
| 977 | ||
| 978 | /* iterate over items within each device */ | |
| 979 | for (itemid = ITEM_ID_INVALID + 1; itemid <= device->maxitem; itemid++) | |
| 980 | { | |
| 981 | input_device_item *item = device->item[itemid]; | |
| 982 | if (item != NULL && item->itemclass == ITEM_CLASS_SWITCH) | |
| 983 | { | |
| 984 | input_code code = device_item_to_code(device, itemid); | |
| 985 | if (input_code_pressed_once(code)) | |
| 986 | return code; | |
| 987 | } | |
| 988 | } | |
| 989 | } | |
| 990 | ||
| 991 | /* if nothing, return an invalid code */ | |
| 992 | return INPUT_CODE_INVALID; | |
| 993 | } | |
| 994 | ||
| 995 | ||
| 996 | /*------------------------------------------------- | |
| 959 | 997 | input_code_poll_axes - poll for any input |
| 960 | 998 | -------------------------------------------------*/ |
| 961 | 999 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Include this with all MAME files. Includes all the core system pieces. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core multi-CPU interrupt engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic graphic functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
| 163 | 163 | |
| 164 | 164 | void decodechar(gfx_element *gfx, int num, const UINT8 *src, const gfx_layout *gl) |
| 165 | 165 | { |
| 166 | int israw = (gl->planeoffset[0] == GFX_RAW); | |
| 167 | int planes = gl->planes; | |
| 168 | UINT32 charincrement = gl->charincrement; | |
| 169 | const UINT32 *poffset = gl->planeoffset; | |
| 166 | 170 | const UINT32 *xoffset = gl->extxoffs ? gl->extxoffs : gl->xoffset; |
| 167 | 171 | const UINT32 *yoffset = gl->extyoffs ? gl->extyoffs : gl->yoffset; |
| 168 | 172 | UINT8 *dp = gfx->gfxdata + num * gfx->char_modulo; |
| 169 | 173 | int plane, x, y; |
| 170 | 174 | |
| 175 | assert_always(!israw, "decodechar: raw layouts not supported"); | |
| 176 | ||
| 171 | 177 | /* zap the data to 0 */ |
| 172 | 178 | memset(dp, 0, gfx->char_modulo); |
| 173 | 179 | |
| 174 | 180 | /* packed case */ |
| 175 | 181 | if (gfx->flags & GFX_ELEMENT_PACKED) |
| 176 | 182 | { |
| 177 | for (plane = 0; plane < | |
| 183 | for (plane = 0; plane < | |
| 178 | 184 | { |
| 179 | int planebit = 1 << (gl->planes - 1 - plane); | |
| 180 | int planeoffs = num * gl->charincrement + gl->planeoffset[plane]; | |
| 185 | int planebit = 1 << (planes - 1 - plane); | |
| 186 | int planeoffs = num * charincrement + poffset[plane]; | |
| 181 | 187 | |
| 182 | 188 | for (y = 0; y < gfx->height; y++) |
| 183 | 189 | { |
| r1490 | r1491 | |
| 198 | 204 | /* unpacked case */ |
| 199 | 205 | else |
| 200 | 206 | { |
| 201 | for (plane = 0; plane < | |
| 207 | for (plane = 0; plane < | |
| 202 | 208 | { |
| 203 | int planebit = 1 << (gl->planes - 1 - plane); | |
| 204 | int planeoffs = num * gl->charincrement + gl->planeoffset[plane]; | |
| 209 | int planebit = 1 << (planes - 1 - plane); | |
| 210 | int planeoffs = num * charincrement + poffset[plane]; | |
| 205 | 211 | |
| 206 | 212 | for (y = 0; y < gfx->height; y++) |
| 207 | 213 | { |
| r1490 | r1491 | |
| 232 | 238 | |
| 233 | 239 | gfx_element *allocgfx(const gfx_layout *gl) |
| 234 | 240 | { |
| 241 | int israw = (gl->planeoffset[0] == GFX_RAW); | |
| 242 | int planes = gl->planes; | |
| 243 | UINT16 width = gl->width; | |
| 244 | UINT16 height = gl->height; | |
| 245 | UINT32 total = gl->total; | |
| 235 | 246 | gfx_element *gfx; |
| 236 | 247 | |
| 237 | 248 | /* allocate memory for the gfx_element structure */ |
| r1490 | r1491 | |
| 254 | 265 | } |
| 255 | 266 | |
| 256 | 267 | /* fill in the rest */ |
| 257 | gfx->width = gl->width; | |
| 258 | gfx->height = gl->height; | |
| 259 | gfx->total_elements = gl->total; | |
| 268 | gfx->width = width; | |
| 269 | gfx->height = height; | |
| 270 | gfx->total_elements = total; | |
| 260 | 271 | gfx->color_base = 0; |
| 261 | gfx->color_depth = 1 << gl->planes; | |
| 262 | gfx->color_granularity = 1 << gl->planes; | |
| 272 | gfx->color_depth = 1 << planes; | |
| 273 | gfx->color_granularity = 1 << planes; | |
| 263 | 274 | if (gfx->color_depth <= 32) |
| 264 | 275 | gfx->pen_usage = malloc_or_die(gfx->total_elements * sizeof(*gfx->pen_usage)); |
| 265 | 276 | |
| 266 | 277 | /* raw graphics case */ |
| 267 | if ( | |
| 278 | if (i | |
| 268 | 279 | { |
| 269 | 280 | /* modulos are determined for us by the layout */ |
| 270 | 281 | gfx->line_modulo = (gl->extyoffs ? gl->extyoffs[0] : gl->yoffset[0]) / 8; |
| r1490 | r1491 | |
| 272 | 283 | |
| 273 | 284 | /* don't free the data because we will get a pointer at decode time */ |
| 274 | 285 | gfx->flags |= GFX_ELEMENT_DONT_FREE; |
| 275 | if ( | |
| 286 | if ( | |
| 276 | 287 | gfx->flags |= GFX_ELEMENT_PACKED; |
| 277 | 288 | } |
| 278 | 289 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Handle input from the user. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 535 | 535 | /* poll for any switch input, optionally resetting internal memory */ |
| 536 | 536 | input_code input_code_poll_switches(int reset); |
| 537 | 537 | |
| 538 | /* poll for any keyboard switch input, optionally resetting internal memory */ | |
| 539 | input_code input_code_poll_keyboard_switches(int reset); | |
| 540 | ||
| 538 | 541 | /* poll for any axis input, optionally resetting internal memory */ |
| 539 | 542 | input_code input_code_poll_axes(int reset); |
| 540 | 543 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | File access functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core multi-CPU interrupt engine. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic graphic functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
| 105 | 105 | #define GFXDECODE_SCALE(region,offset,layout,start,colors,xscale,yscale) { region, offset, &layout, start, colors, xscale, yscale }, |
| 106 | 106 | #define GFXDECODE_END { -1 } }; |
| 107 | 107 | |
| 108 | /* these macros are used for declaring gfx_layout structures. */ | |
| 109 | #define GFXLAYOUT_RAW( name, planes, width, height, linemod, charmod ) \ | |
| 110 | const gfx_layout name = { width, height, RGN_FRAC(1,1), planes, { GFX_RAW }, { 0 }, { linemod }, charmod }; | |
| 108 | 111 | |
| 112 | ||
| 109 | 113 | /*************************************************************************** |
| 110 | 114 | TYPE DEFINITIONS |
| 111 | 115 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core file I/O interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Command-line interface frontend for MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 115 | 115 | core_options *options; |
| 116 | 116 | astring *gamename = astring_alloc(); |
| 117 | 117 | astring *exename = astring_alloc(); |
| 118 | const char *gamename_option; | |
| 118 | 119 | const game_driver *driver; |
| 119 | 120 | int result; |
| 120 | 121 | |
| r1490 | r1491 | |
| 136 | 137 | goto error; |
| 137 | 138 | |
| 138 | 139 | /* find out what game we might be referring to */ |
| 139 | core_filename_extract_base(gamename, options_get_string(options, OPTION_GAMENAME), TRUE); | |
| 140 | gamename_option = options_get_string(options, OPTION_GAMENAME); | |
| 141 | core_filename_extract_base(gamename, gamename_option, TRUE); | |
| 140 | 142 | driver = driver_get_name(astring_c(gamename)); |
| 141 | 143 | |
| 142 | 144 | /* execute any commands specified */ |
| r1490 | r1491 | |
| 145 | 147 | goto error; |
| 146 | 148 | |
| 147 | 149 | /* if we don't have a valid driver selected, offer some suggestions */ |
| 148 | if ( | |
| 150 | if ( | |
| 149 | 151 | { |
| 150 | 152 | const game_driver *matches[10]; |
| 151 | 153 | int drvnum; |
| 152 | 154 | |
| 153 | 155 | /* get the top 10 approximate matches */ |
| 154 | driver_list_get_approx_matches(drivers, | |
| 156 | driver_list_get_approx_matches(drivers, | |
| 155 | 157 | |
| 156 | 158 | /* print them out */ |
| 157 | 159 | fprintf(stderr, "\n\"%s\" approximately matches the following\n" |
| 158 | "supported " GAMESNOUN " (best match first):\n\n", | |
| 160 | "supported " GAMESNOUN " (best match first):\n\n", | |
| 159 | 161 | for (drvnum = 0; drvnum < ARRAY_LENGTH(matches); drvnum++) |
| 160 | 162 | if (matches[drvnum] != NULL) |
| 161 | 163 | fprintf(stderr, "%-10s%s\n", matches[drvnum]->name, matches[drvnum]->description); |
| r1490 | r1491 | |
| 308 | 310 | { |
| 309 | 311 | #ifndef MESS |
| 310 | 312 | mame_printf_info("M.A.M.E. v%s - Multiple Arcade Machine Emulator\n" |
| 311 | "Copyright | |
| 313 | "Copyright | |
| 312 | 314 | mame_printf_info("%s\n", mame_disclaimer); |
| 313 | 315 | mame_printf_info("Usage: MAME gamename [options]\n\n" |
| 314 | 316 | " MAME -showusage for a brief list of options\n" |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Save state management functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Functions needed to generate timing and synchronization between several |
| 6 | 6 | CPUs. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Emulator palette handling functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ******************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core rendering routines for MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | MAME cheat system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
| 964 | 964 | |
| 965 | 965 | if(flush) // check key input |
| 966 | 966 | { |
| 967 | while(input_code_poll_switches(TRUE) != INPUT_CODE_INVALID) ; | |
| 967 | while(input_code_poll_keyboard_switches(TRUE) != INPUT_CODE_INVALID) ; | |
| 968 | 968 | |
| 969 | 969 | return 0; |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | while(1) // check pressed key |
| 973 | 973 | { |
| 974 | code = input_code_poll_switches(FALSE); | |
| 974 | code = input_code_poll_keyboard_switches(FALSE); | |
| 975 | 975 | |
| 976 | 976 | if(code == INPUT_CODE_INVALID) |
| 977 | 977 | { |
| r1490 | r1491 | |
| 4470 | 4470 | } |
| 4471 | 4471 | else |
| 4472 | 4472 | { |
| 4473 | int code = input_code_poll_switches(FALSE); | |
| 4473 | int code = input_code_poll_keyboard_switches(FALSE); | |
| 4474 | 4474 | |
| 4475 | 4475 | if(code == KEYCODE_ESC) |
| 4476 | 4476 | { |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Command-line interface frontend for MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Save state management functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 51 | 51 | #define state_save_register_item_2d_array(_mod, _inst, _val) \ |
| 52 | 52 | state_save_register_item_pointer(_mod, _inst, _val[0], sizeof(_val)/sizeof(_val[0][0])) |
| 53 | 53 | |
| 54 | #define state_save_register_item_bitmap(_mod, _inst, _val) \ | |
| 55 | state_save_register_bitmap(_mod, _inst, #_val, _val) | |
| 56 | ||
| 54 | 57 | #define state_save_register_global(_val) \ |
| 55 | 58 | state_save_register_item("globals", 0, _val) |
| 56 | 59 |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | Functions needed to generate timing and synchronization between several |
| 6 | 6 | CPUs. |
| 7 | 7 | |
| 8 | Copyright | |
| 8 | Copyright | |
| 9 | 9 | Visit http://mamedev.org for licensing and usage restrictions. |
| 10 | 10 | |
| 11 | 11 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Validity checks on internal data structures. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
| 866 | 866 | { |
| 867 | 867 | const gfx_decode_entry *gfx = &drv->gfxdecodeinfo[gfxnum]; |
| 868 | 868 | int region = gfx->memory_region; |
| 869 | int xscale = (drv->gfxdecodeinfo[gfxnum].xscale == 0) ? 1 : drv->gfxdecodeinfo[gfxnum].xscale; | |
| 870 | int yscale = (drv->gfxdecodeinfo[gfxnum].yscale == 0) ? 1 : drv->gfxdecodeinfo[gfxnum].yscale; | |
| 871 | const gfx_layout *gl = gfx->gfxlayout; | |
| 872 | int israw = (gl->planeoffset[0] == GFX_RAW); | |
| 873 | int planes = gl->planes; | |
| 874 | UINT16 width = gl->width; | |
| 875 | UINT16 height = gl->height; | |
| 876 | UINT32 total = gl->total; | |
| 869 | 877 | |
| 870 | 878 | /* if we have a valid region, and we're not using auto-sizing, check the decode against the region length */ |
| 871 | if (region && !IS_FRAC( | |
| 879 | if (region && !IS_FRAC( | |
| 872 | 880 | { |
| 873 | 881 | int len, avail, plane, start; |
| 882 | UINT32 charincrement = gl->charincrement; | |
| 883 | const UINT32 *poffset = gl->planeoffset; | |
| 874 | 884 | |
| 875 | 885 | /* determine which plane is the largest */ |
| 876 | 886 | start = 0; |
| 877 | for (plane = 0; plane < MAX_GFX_PLANES; plane++) | |
| 878 | if (gfx->gfxlayout->planeoffset[plane] > start) | |
| 879 | start = gfx->gfxlayout->planeoffset[plane]; | |
| 880 | start &= ~(gfx->gfxlayout->charincrement - 1); | |
| 887 | for (plane = 0; plane < planes; plane++) | |
| 888 | if (poffset[plane] > start) | |
| 889 | start = poffset[plane]; | |
| 890 | start &= ~(charincrement - 1); | |
| 881 | 891 | |
| 882 | 892 | /* determine the total length based on this info */ |
| 883 | len = | |
| 893 | len = | |
| 884 | 894 | |
| 885 | 895 | /* do we have enough space in the region to cover the whole decode? */ |
| 886 | avail = region_length[region] - (gfx->start & ~( | |
| 896 | avail = region_length[region] - (gfx->start & ~( | |
| 887 | 897 | |
| 888 | 898 | /* if not, this is an error */ |
| 889 | 899 | if ((start + len) / 8 > avail) |
| r1490 | r1491 | |
| 892 | 902 | error = TRUE; |
| 893 | 903 | } |
| 894 | 904 | } |
| 905 | if (israw) | |
| 906 | { | |
| 907 | if (total != RGN_FRAC(1,1)) | |
| 908 | { | |
| 909 | mame_printf_error("%s: %s has gfx[%d] with unsupported layout total\n", driver->source_file, driver->name, gfxnum); | |
| 910 | error = TRUE; | |
| 911 | } | |
| 912 | ||
| 913 | if (xscale != 1 || yscale != 1) | |
| 914 | { | |
| 915 | mame_printf_error("%s: %s has gfx[%d] with unsupported xscale/yscale\n", driver->source_file, driver->name, gfxnum); | |
| 916 | error = TRUE; | |
| 917 | } | |
| 918 | } | |
| 919 | else | |
| 920 | { | |
| 921 | if (planes > MAX_GFX_PLANES) | |
| 922 | { | |
| 923 | mame_printf_error("%s: %s has gfx[%d] with invalid planes\n", driver->source_file, driver->name, gfxnum); | |
| 924 | error = TRUE; | |
| 925 | } | |
| 926 | ||
| 927 | if (xscale * width > MAX_ABS_GFX_SIZE || yscale * height > MAX_ABS_GFX_SIZE) | |
| 928 | { | |
| 929 | mame_printf_error("%s: %s has gfx[%d] with invalid xscale/yscale\n", driver->source_file, driver->name, gfxnum); | |
| 930 | error = TRUE; | |
| 931 | } | |
| 932 | } | |
| 895 | 933 | } |
| 896 | 934 | |
| 897 | 935 | return error; |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Emulator palette handling functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | There are several levels of abstraction in the way MAME handles the palette, |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Cheat system. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Empty driver. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Documentation and consistent naming for known existing crystals. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *************************************************************************** |
| r1490 | r1491 | |
| 49 | 49 | XTAL_3_6864MHz = 3686400, /* CPS3 */ |
| 50 | 50 | XTAL_4MHz = 4000000, |
| 51 | 51 | XTAL_4_224MHz = 4224000, /* Used to drive OKI M6295 chips, usually with /4 divider */ |
| 52 | XTAL_4_433619MHz = 4433619, /* PAL subcarrier */ | |
| 52 | 53 | XTAL_4_9152MHz = 4915200, |
| 53 | 54 | XTAL_6MHz = 6000000, |
| 54 | 55 | XTAL_7_3728MHz = 7372800, |
| r1490 | r1491 | |
| 69 | 70 | XTAL_15_468MHz = 15468000, /* Bank Panic h/w, Sega G80 */ |
| 70 | 71 | XTAL_16MHz = 16000000, |
| 71 | 72 | XTAL_16_9344MHz = 16934400, /* Usually used to drive 90's Yamaha OPL/FM chips */ |
| 73 | XTAL_17_73447MHz = 17734470, /* 4 times the PAL subcarrier */ | |
| 72 | 74 | XTAL_18MHz = 18000000, |
| 73 | 75 | XTAL_18_432MHz = 18432000, |
| 74 | 76 | XTAL_19_968MHz = 19968000, /* Used mostly by Space Invaders games by Taito/Midway and clones */ |
| r1490 | r1491 | |
| 85 | 87 | XTAL_27MHz = 27000000, /* Some Banpresto games macrossp and Irem M92 */ |
| 86 | 88 | XTAL_27_164MHz = 27164000, /* Typically used on 90's Taito PCBs to drive the custom chips */ |
| 87 | 89 | XTAL_28MHz = 28000000, |
| 88 | XTAL_28_63636MHz = 28636360, /* later Leland games and Atari GT */ | |
| 90 | XTAL_28_37516MHz = 28375160, /* Amiga PAL systems */ | |
| 91 | XTAL_28_63636MHz = 28636360, /* later Leland games and Atari GT, Amiga NTSC */ | |
| 89 | 92 | XTAL_30_4761MHz = 30476100, /* Taito JC */ |
| 90 | 93 | XTAL_32MHz = 32000000, |
| 91 | 94 | XTAL_32_22MHz = 32220000, /* Typically used on 90's Data East PCBs */ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ROM loading functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # MAME dependent library makefile |
| 6 | 6 | # |
| 7 | # Copyright | |
| 7 | # Copyright | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Palette handling functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ******************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME hard disk implementation, with differencing files |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | MAME Compressed Hunks of Data file format |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core options code code |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | /* nettle, low-level cryptographics library |
| 7 | 7 | * |
| 8 | * Copyright | |
| 8 | * Copyright | |
| 9 | 9 | * |
| 10 | 10 | * The nettle library is free software; you can redistribute it and/or modify |
| 11 | 11 | * it under the terms of the GNU Lesser General Public License as published by |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core palette routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | MAME Compressed Hunks of Data file format |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Generic MAME CD-ROM utilties - build IDE and SCSI CD-ROMs on top of this |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Generic MAME cd-rom implementation |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core string functions used throughout MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | PNG reading functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core string functions used throughout MAME. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Unicode related functions |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Miscellaneous utility code |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | PNG file management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Miscellaneous utility code |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 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 | |
| 14 | Copyright | |
| 15 | 15 | Visit http://mamedev.org for licensing and usage restrictions. |
| 16 | 16 | |
| 17 | 17 | *********************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parser for .JED files into raw fusemaps. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | XML file parsing code. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Parser for .JED files into raw fusemaps. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Functions to manipulate data within ZIP files. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | XML file parsing code. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Allocated string manipulation functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ****************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Resource pool code |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ZIP file management. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Allocated string manipulation functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core bitmap routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Abstract object pool management |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core bitmap routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | Audio/video compression and decompression helpers. |
| 12 | 12 | |
| 13 | Copyright | |
| 13 | Copyright | |
| 14 | 14 | Visit http://mamedev.org for licensing and usage restrictions. |
| 15 | 15 | |
| 16 | 16 | **************************************************************************** |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | File access functions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Huffman compression routines. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Generic MAME hard disk implementation, with differencing files |
| 4 | 4 | |
| 5 | Copyright | |
| 5 | Copyright | |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Audio/video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core options code code |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | /* nettle, low-level cryptographics library |
| 7 | 7 | * |
| 8 | * Copyright | |
| 8 | * Copyright | |
| 9 | 9 | * |
| 10 | 10 | * The nettle library is free software; you can redistribute it and/or modify |
| 11 | 11 | * it under the terms of the GNU Lesser General Public License as published by |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core file I/O interface functions and definitions. |
| 6 | 6 | |
| 7 | Copyright | |
| 7 | Copyright | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1490 | r1491 | |
|---|---|---|
| 34 | 34 | |
| 35 | 35 | Source Changes: |
| 36 | 36 | ---------------- |
| 37 | - The core is based on MAME 0.122u | |
| 37 | - The core is based on MAME 0.122u4. This incorporates all features of the | |
| 38 | 38 | update to this core. [MAME team] |
| 39 | 39 | |
| 40 | 40 | - Conditional logging and core callback cleanups. [Atari Ace] |
| r1490 | r1491 | |
|---|---|---|
| 4 | 4 | # |
| 5 | 5 | # Core makefile for building MAME and derivatives |
| 6 | 6 | # |
| 7 | # Copyright (c) | |
| 7 | # Copyright (c) | |
| 8 | 8 | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | # |
| 10 | 10 | ########################################################################### |
| r1490 | r1491 | |
| 314 | 314 | # and make all errors into warnings |
| 315 | 315 | ifneq ($(OPTIMIZE),0) |
| 316 | 316 | CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing |
| 317 | #CFLAGS += $(ARCHOPTS) -fno-strict-aliasing | |
| 318 | 317 | endif |
| 319 | 318 | |
| 320 | 319 | # if symbols are on, make sure we have frame pointers |
| Previous | 15994 Revisions | Next |