From 620ce35e2f079ab43df03747e84f0a898676f991 Mon Sep 17 00:00:00 2001 From: messdev Date: Sat, 25 Mar 2000 11:51:26 +1300 Subject: [PATCH] MESS 0.36 rc 2 --- allegro/patch.txt | 9 + allegro/src/i386/iblit8.s | 561 ++ allegro/src/unicode.c | 2745 +++++++++ crc/gamegear.crc | 263 +- crc/nes.crc | 19 +- crc/pet.crc | 1 + crc/plus4.crc | 6 - crc/sms.crc | 447 +- crc/vc20.crc | 16 - gamelist.txt | 4352 ++++--------- hi/dir.txt | 2 +- inp/dir.txt | 2 +- makefile | 53 +- makefile.mes | 36 +- memcard/dir.txt | 2 +- mess.txt | 685 ++- messnew.txt | 63 + readme.txt | 13 +- roms/{sx64 => c16c}/dir.txt | 0 .../dir_list/roms/sx64 => roms/msxuk}/dir.txt | 0 roms/plus4c/dir.txt | 1 + samples/dir.txt | 2 +- seal/patch.txt | 9 + seal/src/audio.h | 382 ++ seal/src/mixdrv.c | 983 +++ src/artwork.c | 2 +- src/cheat.c | 1592 +++-- src/common.c | 35 + src/common.h | 7 +- src/cpu/h6280/6280dasm.c | 2 +- src/cpu/h6280/h6280.c | 4 +- src/cpu/h6280/h6280.h | 2 +- src/cpu/h6280/h6280ops.h | 2 +- src/cpu/h6280/tblh6280.c | 2 +- src/cpu/m6502/m6502.c | 8 +- src/cpu/m6502/m6509.c | 8 +- src/cpu/m6502/m65ce02.c | 38 +- src/cpu/m6502/m65ce02.h | 13 + src/cpu/m6502/opsce02.h | 86 +- src/cpu/m6800/6800ops.c | 2 + src/cpu/m6800/6800tbl.c | 6 + src/cpu/m68000/asmintf.c | 43 + src/driver.c | 70 +- src/driver.h | 1 + src/drivers/1943.c | 18 +- src/drivers/8080bw.c | 2240 +++---- src/drivers/88games.c | 55 + src/drivers/actfancr.c | 48 +- src/drivers/aeroboto.c | 4 +- src/drivers/aerofgt.c | 14 +- src/drivers/alpha68k.c | 28 +- src/drivers/arabian.c | 4 +- src/drivers/arkanoid.c | 2 +- src/drivers/armedf.c | 10 +- src/drivers/asteroid.c | 234 +- src/drivers/atarisy2.c | 4 +- src/drivers/ataxx.c | 4 +- src/drivers/bagman.c | 16 +- src/drivers/baraduke.c | 76 +- src/drivers/battlane.c | 6 +- src/drivers/blktiger.c | 8 +- src/drivers/blockade.c | 8 +- src/drivers/bogeyman.c | 12 +- src/drivers/bosco.c | 157 +- src/drivers/btime.c | 119 +- src/drivers/bublbobl.c | 14 +- src/drivers/bzone.c | 5 +- src/drivers/cabal.c | 6 +- src/drivers/canyon.c | 4 +- src/drivers/capbowl.c | 4 +- src/drivers/cbuster.c | 4 +- src/drivers/cheekyms.c | 10 +- src/drivers/circus.c | 73 +- src/drivers/citycon.c | 23 +- src/drivers/cloak.c | 57 +- src/drivers/cloud9.c | 2 +- src/drivers/cninja.c | 8 +- src/drivers/combatsc.c | 305 +- src/drivers/commando.c | 124 +- src/drivers/congo.c | 188 +- src/drivers/copsnrob.c | 2 +- src/drivers/cosmic.c | 35 +- src/drivers/cps1.c | 25 +- src/drivers/cps2.c | 4 +- src/drivers/crbaloon.c | 4 +- src/drivers/crimfght.c | 69 +- src/drivers/darkseal.c | 15 +- src/drivers/dcon.c | 4 +- src/drivers/dday.c | 20 +- src/drivers/ddragon3.c | 8 +- src/drivers/ddrible.c | 2 +- src/drivers/dec0.c | 84 +- src/drivers/dec8.c | 323 +- src/drivers/dkong.c | 2 +- src/drivers/dominos.c | 2 +- src/drivers/dynduke.c | 2 +- src/drivers/espial.c | 4 +- src/drivers/exctsccr.c | 38 +- src/drivers/exedexes.c | 4 +- src/drivers/exerion.c | 6 +- src/drivers/exidy.c | 18 +- src/drivers/exprraid.c | 6 +- src/drivers/finalizr.c | 4 +- src/drivers/flstory.c | 30 +- src/drivers/foodf.c | 4 +- src/drivers/funkybee.c | 6 +- src/drivers/funkyjet.c | 4 +- src/drivers/galaxian.c | 2 +- src/drivers/gaplus.c | 8 +- src/drivers/gladiatr.c | 4 +- src/drivers/gotya.c | 199 + src/drivers/gunsmoke.c | 8 +- src/drivers/hcastle.c | 17 +- src/drivers/irobot.c | 2 +- src/drivers/ironhors.c | 6 +- src/drivers/jackal.c | 8 +- src/drivers/jailbrek.c | 2 +- src/drivers/jedi.c | 2 +- src/drivers/kangaroo.c | 529 +- src/drivers/karnov.c | 12 +- src/drivers/kchamp.c | 8 +- src/drivers/kyugo.c | 4 +- src/drivers/labyrunr.c | 2 +- src/drivers/lasso.c | 299 + src/drivers/lastduel.c | 2 +- src/drivers/lazercmd.c | 40 +- src/drivers/liberatr.c | 4 +- src/drivers/locomotn.c | 65 +- src/drivers/lwings.c | 4 +- src/drivers/m107.c | 2 +- src/drivers/m72.c | 68 +- src/drivers/m92.c | 112 +- src/drivers/madmotor.c | 2 +- src/drivers/mainevt.c | 2 +- src/drivers/marvins.c | 2 +- src/drivers/mcr2.c | 2 +- src/drivers/mcr68.c | 2 +- src/drivers/megasys1.c | 4 +- src/drivers/namcos1.c | 2186 ++++--- src/drivers/namcos2.c | 5439 +++++++++-------- src/drivers/naughtyb.c | 36 +- src/drivers/neogeo.c | 33 +- src/drivers/nitedrvr.c | 2 +- src/drivers/pacland.c | 8 +- src/drivers/pacman.c | 94 +- src/drivers/pandoras.c | 2 +- src/drivers/parodius.c | 4 +- src/drivers/pcktgal.c | 2 +- src/drivers/phoenix.c | 264 +- src/drivers/phozon.c | 2 +- src/drivers/popeye.c | 6 +- src/drivers/prehisle.c | 8 +- src/drivers/psychic5.c | 6 +- src/drivers/punchout.c | 5 + src/drivers/qix.c | 24 +- src/drivers/quantum.c | 6 +- src/drivers/qwakprot.c | 2 +- src/drivers/rainbow.c | 6 +- src/drivers/rastan.c | 8 +- src/drivers/redalert.c | 2 +- src/drivers/renegade.c | 6 +- src/drivers/rockola.c | 4 +- src/drivers/segar.c | 22 +- src/drivers/seicross.c | 8 +- src/drivers/senjyo.c | 8 +- src/drivers/shootout.c | 217 +- src/drivers/sidearms.c | 11 +- src/drivers/sidepckt.c | 4 +- src/drivers/skydiver.c | 2 +- src/drivers/skykid.c | 4 +- src/drivers/slapfght.c | 554 +- src/drivers/smashtv.c | 74 +- src/drivers/snk.c | 48 +- src/drivers/snk68.c | 49 +- src/drivers/spacefb.c | 10 +- src/drivers/spiders.c | 4 +- src/drivers/sprint2.c | 14 +- src/drivers/srumbler.c | 238 +- src/drivers/ssi.c | 4 +- src/drivers/ssozumo.c | 2 +- src/drivers/stactics.c | 7 +- src/drivers/stadhero.c | 4 +- src/drivers/starfire.c | 9 +- src/drivers/subs.c | 2 +- src/drivers/supbtime.c | 6 +- src/drivers/superman.c | 3 +- src/drivers/superpac.c | 8 +- src/drivers/superqix.c | 4 +- src/drivers/system1.c | 98 +- src/drivers/system16.c | 2 +- src/drivers/taitof2.c | 64 +- src/drivers/taitol.c | 84 +- src/drivers/tecmo.c | 12 +- src/drivers/tempest.c | 64 +- src/drivers/tigeroad.c | 8 +- src/drivers/tmnt.c | 69 +- src/drivers/toaplan2.c | 1373 +++-- src/drivers/toki.c | 10 +- src/drivers/tp84.c | 4 +- src/drivers/tumblep.c | 6 +- src/drivers/turbo.c | 6 +- src/drivers/twin16.c | 6 +- src/drivers/ultraman.c | 31 +- src/drivers/vaportra.c | 4 +- src/drivers/vastar.c | 4 +- src/drivers/vigilant.c | 8 +- src/drivers/vulgus.c | 6 +- src/drivers/warpwarp.c | 10 +- src/drivers/wc90.c | 2 +- src/drivers/wc90b.c | 2 +- src/drivers/williams.c | 2 +- src/drivers/wiz.c | 4 + src/drivers/wow.c | 15 +- src/drivers/z80bw.c | 41 +- src/drivers/zaccaria.c | 8 +- src/drivers/zaxxon.c | 12 +- src/drivers/zn.c | 157 +- src/drivers/zodiack.c | 10 +- src/inptport.c | 16 + src/inptport.h | 1 + src/machine/8080bw.c | 137 +- src/machine/arkanoid.c | 4 +- src/machine/asteroid.c | 40 +- src/machine/dec0.c | 12 +- src/machine/namcos1.c | 1908 +++--- src/machine/namcos2.c | 193 +- src/machine/namcos2.h | 162 +- src/machine/neogeo.c | 3 +- src/machine/smashtv.c | 2 +- src/memory.c | 147 +- src/mess/dir_list/crc/gamegear.crc | 263 +- src/mess/dir_list/crc/nes.crc | 19 +- src/mess/dir_list/crc/pet.crc | 1 + src/mess/dir_list/crc/plus4.crc | 6 - src/mess/dir_list/crc/sms.crc | 447 +- src/mess/dir_list/crc/vc20.crc | 16 - src/mess/dir_list/roms/c16c/dir.txt | 1 + src/mess/dir_list/roms/msxuk/dir.txt | 1 + src/mess/dir_list/roms/plus4c/dir.txt | 1 + src/mess/docs/6522-via.txt | 1315 ---- src/mess/docs/mchanges.txt | 25 +- src/mess/docs/mess.txt | 268 - src/mess/docs/mess_old.txt | 912 --- src/mess/docs/messnew.txt | 63 + src/mess/filemngr.c | 89 +- src/mess/machine/a2600.c | 453 +- src/mess/machine/c128.c | 20 +- src/mess/machine/c1551.c | 35 +- src/mess/machine/c16.c | 221 +- src/mess/machine/c16.h | 24 +- src/mess/machine/c64.c | 49 +- src/mess/machine/c64.h | 56 +- src/mess/machine/c65.c | 16 +- src/mess/machine/cbm.c | 62 +- src/mess/machine/cbm.h | 85 +- src/mess/machine/cbmb.c | 18 +- src/mess/machine/cbmdrive.c | 30 +- src/mess/machine/cbmdrive.h | 6 + src/mess/machine/dragon.c | 378 +- src/mess/machine/kc.c | 2 +- src/mess/machine/msx.c | 58 +- src/mess/machine/riot.c | 3 +- src/mess/machine/tpi6525.c | 222 +- src/mess/machine/tpi6525.h | 59 +- src/mess/machine/trs80.c | 12 +- src/mess/machine/vc1541.c | 870 ++- src/mess/machine/vc1541.h | 162 +- src/mess/machine/vc20.c | 14 +- src/mess/machine/vc20tape.c | 5 +- src/mess/mess.c | 98 +- src/mess/mess.h | 2 + src/mess/msdos.c | 358 +- src/mess/msdos.h | 2 +- src/mess/sndhrdw/sid6581.c | 2 + src/mess/system.c | 9 +- src/mess/systems/a2600.c | 97 +- src/mess/systems/c128.c | 123 +- src/mess/systems/c16.c | 508 +- src/mess/systems/c64.c | 53 +- src/mess/systems/c65.c | 26 +- src/mess/systems/cbmb.c | 69 +- src/mess/systems/dragon.c | 31 +- src/mess/systems/enterp.c | 2 +- src/mess/systems/msx.c | 176 +- src/mess/systems/pce.c | 2 +- src/mess/systems/pet.c | 20 +- src/mess/systems/vc20.c | 393 +- src/mess/systems/vtech1.c | 4 +- src/mess/systems/zx.c | 12 +- src/mess/vidhrdw/dragon.c | 207 +- src/mess/vidhrdw/ted7360.c | 10 +- src/msdos/config.c | 7 +- src/msdos/fronthlp.c | 206 +- src/msdos/input.c | 8 +- src/msdos/msdos.c | 7 + src/msdos/sound.c | 6 +- src/msdos/ticker.c | 11 +- src/msdos/video.c | 4 +- src/osdepend.h | 19 +- src/palette.c | 4 +- src/sndhrdw/8080bw.c | 134 +- src/sndhrdw/asteroid.c | 652 +- src/sndhrdw/bzone.c | 351 +- src/sndhrdw/dday.c | 45 - src/sndhrdw/galaxian.c | 6 +- src/sndhrdw/mcr.c | 43 +- src/sndhrdw/monsterb.c | 254 - src/sndhrdw/phoenix.c | 759 ++- src/sndhrdw/pleiads.c | 397 +- src/sndhrdw/segar.c | 78 +- src/sndhrdw/seibu.c | 2 +- src/sndhrdw/z80bw.c | 10 +- src/sndintrf.c | 15 + src/sndintrf.h | 6 + src/sound/ay8910.c | 10 + src/sound/ay8910.h | 2 + src/sound/mixer.c | 49 +- src/sound/mixer.h | 12 +- src/sound/streams.c | 6 +- src/sound/tms36xx.c | 530 ++ src/sound/tms36xx.h | 31 + src/tilemap.c | 217 +- src/timer.c | 7 + src/usrintrf.c | 57 +- src/usrintrf.h | 5 +- src/version.c | 2 +- src/vidhrdw/8080bw.c | 757 +-- src/vidhrdw/actfancr.c | 2 +- src/vidhrdw/alpha68k.c | 2 +- src/vidhrdw/ambush.c | 6 +- src/vidhrdw/astrof.c | 23 +- src/vidhrdw/cbuster.c | 2 +- src/vidhrdw/citycon.c | 6 +- src/vidhrdw/cninja.c | 2 +- src/vidhrdw/combatsc.c | 394 +- src/vidhrdw/contra.c | 34 +- src/vidhrdw/darkseal.c | 2 +- src/vidhrdw/dday.c | 10 +- src/vidhrdw/dec0.c | 2 +- src/vidhrdw/dec8.c | 12 +- src/vidhrdw/fastlane.c | 56 +- src/vidhrdw/flkatck.c | 17 +- src/vidhrdw/funkyjet.c | 2 +- src/vidhrdw/gauntlet.c | 24 +- src/vidhrdw/gng.c | 40 +- src/vidhrdw/gotya.c | 212 + src/vidhrdw/hcastle.c | 25 +- src/vidhrdw/karnov.c | 2 +- src/vidhrdw/konamiic.c | 107 +- src/vidhrdw/labyrunr.c | 18 +- src/vidhrdw/lasso.c | 98 + src/vidhrdw/lazercmd.c | 2 +- src/vidhrdw/m107.c | 2 +- src/vidhrdw/m92.c | 2 +- src/vidhrdw/madmotor.c | 2 +- src/vidhrdw/namcos1.c | 173 +- src/vidhrdw/namcos2.c | 54 +- src/vidhrdw/prehisle.c | 2 +- src/vidhrdw/rallyx.c | 50 +- src/vidhrdw/shootout.c | 46 + src/vidhrdw/snk68.c | 2 +- src/vidhrdw/srumbler.c | 391 +- src/vidhrdw/stadhero.c | 2 +- src/vidhrdw/supbtime.c | 2 +- src/vidhrdw/toaplan2.c | 1046 +++- src/vidhrdw/tumblep.c | 2 +- src/vidhrdw/vaportra.c | 2 +- src/vidhrdw/vector.c | 2 +- src/vidhrdw/vindictr.c | 133 +- src/vidhrdw/z80bw.c | 175 - sta/dir.txt | 1 - whatsnew.txt | 90 +- 372 files changed, 28882 insertions(+), 20432 deletions(-) create mode 100644 allegro/patch.txt create mode 100644 allegro/src/i386/iblit8.s create mode 100644 allegro/src/unicode.c delete mode 100644 crc/plus4.crc delete mode 100644 crc/vc20.crc rename roms/{sx64 => c16c}/dir.txt (100%) rename {src/mess/dir_list/roms/sx64 => roms/msxuk}/dir.txt (100%) create mode 100644 roms/plus4c/dir.txt create mode 100644 seal/patch.txt create mode 100644 seal/src/audio.h create mode 100644 seal/src/mixdrv.c create mode 100644 src/drivers/gotya.c create mode 100644 src/drivers/lasso.c delete mode 100644 src/mess/dir_list/crc/plus4.crc delete mode 100644 src/mess/dir_list/crc/vc20.crc create mode 100644 src/mess/dir_list/roms/c16c/dir.txt create mode 100644 src/mess/dir_list/roms/msxuk/dir.txt create mode 100644 src/mess/dir_list/roms/plus4c/dir.txt delete mode 100644 src/mess/docs/6522-via.txt delete mode 100644 src/mess/docs/mess.txt delete mode 100644 src/mess/docs/mess_old.txt delete mode 100644 src/sndhrdw/dday.c delete mode 100644 src/sndhrdw/monsterb.c create mode 100644 src/sound/tms36xx.c create mode 100644 src/sound/tms36xx.h create mode 100644 src/vidhrdw/gotya.c create mode 100644 src/vidhrdw/lasso.c delete mode 100644 src/vidhrdw/z80bw.c delete mode 100644 sta/dir.txt diff --git a/allegro/patch.txt b/allegro/patch.txt new file mode 100644 index 000000000..758df075d --- /dev/null +++ b/allegro/patch.txt @@ -0,0 +1,9 @@ +This patch must be applied over Allegro 3.9.31 to fix a couple of bugs that +affect normal operation. + +The fixed bugs are: +1) 400x300 VESA modes not working. +2) some default parameters for tweaked modes being saved to mame.cfg with a + leading 0, and not being recognized afterwards. + +Don't forget to recompile the library after applying the patch! diff --git a/allegro/src/i386/iblit8.s b/allegro/src/i386/iblit8.s new file mode 100644 index 000000000..974589dca --- /dev/null +++ b/allegro/src/i386/iblit8.s @@ -0,0 +1,561 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * 256 color bitmap blitting (written for speed, not readability :-) + * + * By Shawn Hargreaves. + * + * Stefan Schimanski optimised the reverse blitting function. + * + * MMX clear code by Robert Ohannessian. + * + * See readme.txt for copyright information. + */ + + +#include "asmdefs.inc" +#include "blit.inc" + +#ifdef ALLEGRO_COLOR8 + +.text + + + +/* void _linear_clear_to_color8(BITMAP *bitmap, int color); + * Fills a linear bitmap with the specified color. + */ +FUNC(_linear_clear_to_color8) + pushl %ebp + movl %esp, %ebp + pushl %ebx + pushl %esi + pushl %edi + pushw %es + + movl ARG1, %edx /* edx = bmp */ + movl BMP_CT(%edx), %ebx /* line to start at */ + + movw BMP_SEG(%edx), %es /* select segment */ + + movl BMP_CR(%edx), %esi /* width to clear */ + subl BMP_CL(%edx), %esi + +#ifdef ALLEGRO_MMX /* only use MMX if compiler supports it */ + + movl GLOBL(cpu_mmx), %eax /* if MMX is enabled (or not disabled :) */ + orl %eax, %eax + jz clear_no_mmx + + movl %esi, %eax /* if less than 32 pixels, use non-MMX */ + shrl $5, %eax + orl %eax, %eax + jz clear_no_mmx + + movb ARG2, %al /* duplicate color 4 times */ + movb %al, %ah + shll $16, %eax + movb ARG2, %al + movb %al, %ah + + pushl %eax + + pushw %ds /* cheap hack to get es and ds in ax and cx */ + movw %es, %cx + popw %ax + + cmpw %ax, %cx /* can we use nearptr ? */ + jne clearMMXseg_loop /* if not, then we have to decode segments...*/ + /* else, we save one cycle per 8 pixels on PMMX/K6 */ + _align_ +clearMMX_loop: + movl %ebx, %eax + WRITE_BANK() /* select bank */ + movl %eax, %edi + addl BMP_CL(%edx), %edi /* get line address */ + + popl %eax /* get eax back */ + + movl %esi, %ecx /* width to clear */ + + movd %eax, %mm0 /* restore mmx reg 0 in case it's been clobbered by WRITE_BANK() */ + movd %eax, %mm1 + psllq $32, %mm0 + por %mm1, %mm0 + + pushl %eax /* save eax */ + + testl $7, %edi /* is destination aligned on 64-bit ? */ + jz clearMMX_aligned + +clearMMX_do_alignment: + movl %edi, %eax /* we want to adjust %ecx (pairing: see andl) */ + + movq %mm0, (%edi) /* we clear 8 pixels */ + + andl $7, %eax /* we calc how may pixels we actually wanted to clear (8 - %eax) (see subl) */ + + andl $0xFFFFFFF8, %edi /* instruction pairing (see inc %edi) */ + + subl $8, %eax + + addl $8, %edi /* we set %edi to the next aligned memory address */ + + addl %ecx, %eax /* and adjust %ecx to reflect the change */ + +clearMMX_aligned: + movl %ecx, %eax /* save for later */ + shrl $5, %ecx /* divide by 32 for 4 * 8-byte memory move */ + jz clearMMX_finish_line /* if there's less than 32 pixels to clear, no need for MMX */ + +clearMMX_continue_line: + movq %mm0, (%edi) /* move 4x 8 bytes */ + movq %mm0, 8(%edi) /* MMX instructions can't pair when both write to memory */ + movq %mm0, 16(%edi) + movq %mm0, 24(%edi) + addl $32, %edi /* inserting those in the MMX copy block makes no diffrence */ + decl %ecx + jnz clearMMX_continue_line + +clearMMX_finish_line: + movl %eax, %ecx /* get ecx back */ + + testl $31, %ecx /* check if there's any left */ + jz clearMMX_no_long + /* else, write trailing pixels */ + testl $16, %ecx + jz clearMMX_finish_line2 + + movq %mm0, (%edi) + movq %mm0, 8(%edi) + addl $16, %edi + +clearMMX_finish_line2: + testl $8, %ecx + jz clearMMX_finish_line3 + + movq %mm0, (%edi) + addl $8, %edi + +clearMMX_finish_line3: + andl $7, %ecx + subl $8, %ecx + + movq %mm0, (%edi, %ecx) + +clearMMX_no_long: + incl %ebx + cmpl %ebx, BMP_CB(%edx) + jg clearMMX_loop /* and loop */ + + popl %eax + + emms /* clear FPU tag word */ + + jmp clear_done + +clearMMXseg_loop: + movl %ebx, %eax + WRITE_BANK() /* select bank */ + movl %eax, %edi + addl BMP_CL(%edx), %edi /* get line address */ + + popl %eax /* Get eax back */ + + movl %esi, %ecx /* width to clear */ + + movd %eax, %mm0 /* restore mmx reg 0 in case it's been clobbered by WRITE_BANK() */ + movd %eax, %mm1 + psllq $32, %mm0 + por %mm1, %mm0 + + pushl %eax /* save eax */ + + testl $7, %edi /* is destination aligned on 64-bit ? */ + jz clearMMXseg_aligned + +clearMMXseg_do_alignment: + movl %edi, %eax /* we want to adjust %ecx (pairing: see andl) */ + + movq %mm0, %es:(%edi) /* we clear 8 pixels */ + + andl $7, %eax /* we calc how may pixels we actually wanted to clear (8 - %eax) (see subl) */ + + andl $0xFFFFFFF8, %edi /* instruction pairing (see inc %edi) */ + + subl $8, %eax + + addl $8, %edi /* we set %edi to the next aligned memory address */ + + addl %ecx, %eax /* and adjust %ecx to reflect the change */ + +clearMMXseg_aligned: + movl %ecx, %eax /* save for later */ + shrl $5, %ecx /* divide by 32 for 4 * 8-byte memory move */ + jz clearMMXseg_finish_line /* if there's less than 32 pixels to clear, no need for MMX */ + +clearMMXseg_continue_line: + movq %mm0, %es:(%edi) /* move 4x 8 bytes */ + movq %mm0, %es:8(%edi) /* MMX instructions can't pair when both write to memory */ + movq %mm0, %es:16(%edi) + movq %mm0, %es:24(%edi) + addl $32, %edi /* inserting those in the MMX copy block makes no diffrence */ + decl %ecx + jnz clearMMXseg_continue_line + +clearMMXseg_finish_line: + movl %eax, %ecx /* get ecx back */ + + testl $31, %ecx /* check if there's any left */ + jz clearMMXseg_no_long + /* else, write trailing pixels */ + testl $16, %ecx + jz clearMMXseg_finish_line2 + + movq %mm0, %es:(%edi) + movq %mm0, %es:8(%edi) + addl $16, %edi + +clearMMXseg_finish_line2: + testl $8, %ecx + jz clearMMXseg_finish_line3 + + movq %mm0, %es:(%edi) + addl $8, %edi + +clearMMXseg_finish_line3: + andl $7, %ecx + subl $8, %ecx + + movq %mm0, %es:(%edi, %ecx) + +clearMMXseg_no_long: + incl %ebx + cmpl %ebx, BMP_CB(%edx) + jg clearMMXseg_loop /* and loop */ + + popl %eax + + emms /* clear FPU tag word */ + + jmp clear_done + +#endif /* ALLEGRO_MMX */ + +clear_no_mmx: + cld + + _align_ +clear_loop: + movl %ebx, %eax + WRITE_BANK() /* select bank */ + movl %eax, %edi + addl BMP_CL(%edx), %edi /* get line address */ + + movb ARG2, %al /* duplicate color 4 times */ + movb %al, %ah + shll $16, %eax + movb ARG2, %al + movb %al, %ah + + movl %esi, %ecx /* width to clear */ + shrl $1, %ecx /* halve for 16 bit clear */ + jnc clear_no_byte + stosb /* clear an odd byte */ + +clear_no_byte: + shrl $1, %ecx /* halve again for 32 bit clear */ + jnc clear_no_word + stosw /* clear an odd word */ + +clear_no_word: + jz clear_no_long + + _align_ +clear_x_loop: + rep ; stosl /* clear the line */ + +clear_no_long: + incl %ebx + cmpl %ebx, BMP_CB(%edx) + jg clear_loop /* and loop */ + +clear_done: + UNWRITE_BANK() + + popw %es + popl %edi + popl %esi + popl %ebx + movl %ebp, %esp + popl %ebp + ret /* end of _linear_clear_to_color8() */ + + + + +/* void _linear_blit8(BITMAP *source, BITMAP *dest, int source_x, source_y, + * int dest_x, dest_y, int width, height); + * Normal forwards blitting routine for linear bitmaps. + */ +FUNC(_linear_blit8) + pushl %ebp + movl %esp, %ebp + pushw %es + pushl %edi + pushl %esi + pushl %ebx + + movl B_DEST, %edx + movw BMP_SEG(%edx), %es /* load destination segment */ + movw %ds, %bx /* save data segment selector */ + cld /* for forward copy */ + + shrl $1, B_WIDTH /* halve counter for word copies */ + jz blit_only_one_byte + jnc blit_even_bytes + + _align_ + BLIT_LOOP(words_and_byte, 1, /* word at a time, plus leftover byte */ + rep ; movsw + movsb + ) + jmp blit_done + + _align_ +blit_even_bytes: + shrl $1, B_WIDTH /* halve counter again, for long copies */ + jz blit_only_one_word + jnc blit_even_words + + _align_ + BLIT_LOOP(longs_and_word, 1, /* long at a time, plus leftover word */ + rep ; movsl + movsw + ) + jmp blit_done + + _align_ +blit_even_words: + BLIT_LOOP(even_words, 1, /* copy a long at a time */ + rep ; movsl + ) + jmp blit_done + + _align_ +blit_only_one_byte: + BLIT_LOOP(only_one_byte, 1, /* copy just the one byte */ + movsb + ) + jmp blit_done + + _align_ +blit_only_one_word: + BLIT_LOOP(only_one_word, 1, /* copy just the one word */ + movsw + ) + + _align_ +blit_done: + movl B_SOURCE, %edx + UNWRITE_BANK() + + movl B_DEST, %edx + UNWRITE_BANK() + + popl %ebx + popl %esi + popl %edi + popw %es + movl %ebp, %esp + popl %ebp + ret /* end of _linear_blit8() */ + + + + +/* void _linear_blit_backward8(BITMAP *source, BITMAP *dest, int source_x, + * int source_y, int dest_x, dest_y, int width, height); + * Reverse blitting routine, for overlapping linear bitmaps. + */ +FUNC(_linear_blit_backward8) + pushl %ebp + movl %esp, %ebp + pushw %es + pushl %edi + pushl %esi + pushl %ebx + + movl B_HEIGHT, %eax /* y values go from high to low */ + decl %eax + addl %eax, B_SOURCE_Y + addl %eax, B_DEST_Y + + movl B_WIDTH, %eax /* x values go from high to low */ + decl %eax + addl %eax, B_SOURCE_X + addl %eax, B_DEST_X + + movl B_DEST, %edx + movw BMP_SEG(%edx), %es /* load destination segment */ + movw %ds, %bx /* save data segment selector */ + + movl B_SOURCE_Y, %eax /* if different line -> fast dword blit */ + cmpl B_DEST_Y, %eax + jne blit_backwards_loop_fast + + movl B_SOURCE_X, %eax /* B_SOURCE_X-B_DEST_X */ + subl B_DEST_X, %eax + cmpl $3, %eax /* if greater than 3 -> fast dword blit */ + jg blit_backwards_loop_fast + + _align_ +blit_backwards_loop_slow: + movl B_DEST, %edx /* destination bitmap */ + movl B_DEST_Y, %eax /* line number */ + WRITE_BANK() /* select bank */ + addl B_DEST_X, %eax /* x offset */ + movl %eax, %edi + + movl B_SOURCE, %edx /* source bitmap */ + movl B_SOURCE_Y, %eax /* line number */ + READ_BANK() /* select bank */ + addl B_SOURCE_X, %eax /* x offset */ + movl %eax, %esi + + std /* backwards */ + movl B_WIDTH, %ecx /* x loop counter */ + movw BMP_SEG(%edx), %ds /* load data segment */ + rep ; movsb /* copy the line */ + + movw %bx, %ds /* restore data segment */ + decl B_SOURCE_Y + decl B_DEST_Y + decl B_HEIGHT + jg blit_backwards_loop_slow /* and loop */ + + jmp blit_backwards_end + + _align_ +blit_backwards_loop_fast: + movl B_DEST, %edx /* destination bitmap */ + movl B_DEST_Y, %eax /* line number */ + WRITE_BANK() /* select bank */ + addl B_DEST_X, %eax /* x offset */ + movl %eax, %edi + + movl B_SOURCE, %edx /* source bitmap */ + movl B_SOURCE_Y, %eax /* line number */ + READ_BANK() /* select bank */ + addl B_SOURCE_X, %eax /* x offset */ + movl %eax, %esi + + std /* backwards */ + movl B_WIDTH, %eax /* x loop counter */ + movw BMP_SEG(%edx), %ds /* load data segment */ + + movl %eax, %ecx + andl $3, %ecx /* copy bytes */ + rep ; movsb /* copy the line */ + + subl $3, %esi + subl $3, %edi + + movl %eax, %ecx + shrl $2, %ecx /* copy dwords */ + rep ; movsl /* copy the line */ + + movw %bx, %ds /* restore data segment */ + decl B_SOURCE_Y + decl B_DEST_Y + decl B_HEIGHT + jg blit_backwards_loop_fast /* and loop */ + +blit_backwards_end: + cld /* finished */ + + movl B_SOURCE, %edx + UNWRITE_BANK() + + movl B_DEST, %edx + UNWRITE_BANK() + + popl %ebx + popl %esi + popl %edi + popw %es + movl %ebp, %esp + popl %ebp + ret /* end of _linear_blit_backward8() */ + +FUNC(_linear_blit8_end) + ret + + + + +/* void _linear_masked_blit8(BITMAP *source, *dest, int source_x, source_y, + * int dest_x, dest_y, int width, height); + * Masked (skipping zero pixels) blitting routine for linear bitmaps. + */ +FUNC(_linear_masked_blit8) + pushl %ebp + movl %esp, %ebp + pushw %es + pushl %edi + pushl %esi + pushl %ebx + + movl B_DEST, %edx + movw BMP_SEG(%edx), %es + movw %ds, %bx + cld + + _align_ + BLIT_LOOP(masked, 1, + + _align_ + masked_blit_x_loop: + movb (%esi), %al /* read a byte */ + incl %esi + + orb %al, %al /* test it */ + jz masked_blit_skip + + movb %al, %es:(%edi) /* write the pixel */ + incl %edi + decl %ecx + jg masked_blit_x_loop + jmp masked_blit_x_loop_done + + _align_ + masked_blit_skip: + incl %edi /* skip zero pixels */ + decl %ecx + jg masked_blit_x_loop + + masked_blit_x_loop_done: + ) + + movl B_DEST, %edx + UNWRITE_BANK() + + popl %ebx + popl %esi + popl %edi + popw %es + movl %ebp, %esp + popl %ebp + ret /* end of _linear_masked_blit8() */ + + + + +#endif /* ifdef ALLEGRO_COLOR8 */ diff --git a/allegro/src/unicode.c b/allegro/src/unicode.c new file mode 100644 index 000000000..2ddb5ab06 --- /dev/null +++ b/allegro/src/unicode.c @@ -0,0 +1,2745 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * String handling functions (UTF-8, Unicode, ASCII, etc). + * + * By Shawn Hargreaves. + * + * Case conversion functions improved by Ole Laursen. + * + * ustrrchr() and usprintf() improvements by Sven Sandberg. + * + * See readme.txt for copyright information. + */ + + +#include +#include +#include + +#include "allegro.h" +#include "allegro/aintern.h" + + + +/* this is a valid encoding in any of the supported formats */ +char empty_string[] = EMPTY_STRING; + + + +/* ascii_getc: + * Reads a character from an ASCII string. + */ +static int ascii_getc(char *s) +{ + return *((unsigned char *)s); +} + + + +/* ascii_getx: + * Reads a character from an ASCII string, advancing the pointer position. + */ +static int ascii_getx(char **s) +{ + return *((unsigned char *)((*s)++)); +} + + + +/* ascii_setc: + * Sets a character in an ASCII string. + */ +static int ascii_setc(char *s, int c) +{ + *s = c; + return 1; +} + + + +/* ascii_width: + * Returns the width of an ASCII character. + */ +static int ascii_width(char *s) +{ + return 1; +} + + + +/* ascii_cwidth: + * Returns the width of an ASCII character. + */ +static int ascii_cwidth(int c) +{ + return 1; +} + + + +/* ascii_isok: + * Checks whether this character can be encoded in 8-bit ASCII format. + */ +static int ascii_isok(int c) +{ + return ((c >= 0) && (c <= 255)); +} + + + +/* lookup table for implementing 8-bit codepage modes */ +static unsigned short _codepage_table[] = +{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, + 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, +}; + + + +/* this default table reduces Latin 1 characters to similar 7 bit ones */ +static unsigned short _codepage_extras[] = +{ + 0xA1, '!', 0xA2, 'c', 0xA3, '#', 0xB5, 'u', 0xBF, '?', 0xC0, 'A', + 0xC1, 'A', 0xC2, 'A', 0xC3, 'A', 0xC4, 'A', 0xC5, 'A', 0xC6, 'A', + 0xC7, 'C', 0xC8, 'E', 0xC9, 'E', 0xCA, 'E', 0xCB, 'E', 0xCC, 'I', + 0xCD, 'I', 0xCE, 'I', 0xCF, 'I', 0xD0, 'D', 0xD1, 'N', 0xD2, 'O', + 0xD3, 'O', 0xD4, 'O', 0xD5, 'O', 0xD6, 'O', 0xD7, 'X', 0xD8, '0', + 0xD9, 'U', 0xDA, 'U', 0xDB, 'U', 0xDC, 'U', 0xDD, 'Y', 0xDE, 'P', + 0xDF, 'S', 0xE0, 'a', 0xE1, 'a', 0xE2, 'a', 0xE3, 'a', 0xE4, 'a', + 0xE5, 'a', 0xE6, 'a', 0xE7, 'c', 0xE8, 'e', 0xE9, 'e', 0xEA, 'e', + 0xEB, 'e', 0xEC, 'i', 0xED, 'i', 0xEE, 'i', 0xEF, 'i', 0xF0, 'o', + 0xF1, 'n', 0xF2, 'o', 0xF3, 'o', 0xF4, 'o', 0xF5, 'o', 0xF6, 'o', + 0xF8, 'o', 0xF9, 'u', 0xFA, 'u', 0xFB, 'u', 0xFC, 'u', 0xFD, 'y', + 0xFE, 'p', 0xFF, 'y', 0 +}; + + + +/* access via pointers so they can be changed by the user */ +static unsigned short *codepage_table = _codepage_table; +static unsigned short *codepage_extras = _codepage_extras; + + + +/* ascii_cp_getc: + * Reads a character from an ASCII codepage string. + */ +static int ascii_cp_getc(char *s) +{ + return codepage_table[*((unsigned char *)s)]; +} + + + +/* ascii_cp_getx: + * Reads from an ASCII codepage string, advancing pointer position. + */ +static int ascii_cp_getx(char **s) +{ + return codepage_table[*((unsigned char *)((*s)++))]; +} + + + +/* ascii_cp_setc: + * Sets a character in an ASCII codepage string. + */ +static int ascii_cp_setc(char *s, int c) +{ + int i; + + for (i=0; i<256; i++) { + if (codepage_table[i] == c) { + *s = i; + return 1; + } + } + + if (codepage_extras) { + for (i=0; codepage_extras[i]; i+=2) { + if (codepage_extras[i] == c) { + *s = codepage_extras[i+1]; + return 1; + } + } + } + + *s = '^'; + return 1; +} + + + +/* ascii_cp_isok: + * Checks whether this character can be encoded in ASCII codepage format. + */ +static int ascii_cp_isok(int c) +{ + int i; + + for (i=0; i<256; i++) { + if (codepage_table[i] == c) + return TRUE; + } + + if (codepage_extras) { + for (i=0; codepage_extras[i]; i+=2) { + if (codepage_extras[i] == c) + return TRUE; + } + } + + return FALSE; +} + + + +/* unicode_getc: + * Reads a character from a Unicode string. + */ +static int unicode_getc(char *s) +{ + return *((unsigned short *)s); +} + + + +/* unicode_getx: + * Reads a character from a Unicode string, advancing the pointer position. + */ +static int unicode_getx(char **s) +{ + int c = *((unsigned short *)(*s)); + (*s) += sizeof(unsigned short); + return c; +} + + + +/* unicode_setc: + * Sets a character in a Unicode string. + */ +static int unicode_setc(char *s, int c) +{ + *((unsigned short *)s) = c; + return sizeof(unsigned short); +} + + + +/* unicode_width: + * Returns the width of a Unicode character. + */ +static int unicode_width(char *s) +{ + return sizeof(unsigned short); +} + + + +/* unicode_cwidth: + * Returns the width of a Unicode character. + */ +static int unicode_cwidth(int c) +{ + return sizeof(unsigned short); +} + + + +/* unicode_isok: + * Checks whether this character can be encoded in 16-bit Unicode format. + */ +static int unicode_isok(int c) +{ + return ((c >= 0) && (c <= 65535)); +} + + + +/* utf8_getc: + * Reads a character from a UTF-8 string. + */ +static int utf8_getc(char *s) +{ + int c = *((unsigned char *)(s++)); + int n, t; + + if (c & 0x80) { + n = 1; + while (c & (0x80>>n)) + n++; + + c &= (1<<(8-n))-1; + + while (--n > 0) { + t = *((unsigned char *)(s++)); + + if ((!(t&0x80)) || (t&0x40)) + return '^'; + + c = (c<<6) | (t&0x3F); + } + } + + return c; +} + + + +/* utf8_getx: + * Reads a character from a UTF-8 string, advancing the pointer position. + */ +static int utf8_getx(char **s) +{ + int c = *((unsigned char *)((*s)++)); + int n, t; + + if (c & 0x80) { + n = 1; + while (c & (0x80>>n)) + n++; + + c &= (1<<(8-n))-1; + + while (--n > 0) { + t = *((unsigned char *)((*s)++)); + + if ((!(t&0x80)) || (t&0x40)) { + (*s)--; + return '^'; + } + + c = (c<<6) | (t&0x3F); + } + } + + return c; +} + + + +/* utf8_setc: + * Sets a character in a UTF-8 string. + */ +static int utf8_setc(char *s, int c) +{ + int size, bits, b, i; + + if (c < 128) { + *s = c; + return 1; + } + + bits = 7; + while (c >= (1<>b; + + for (i=0; i>i); + + for (i=1; i>b)&0x3F); + } + + return size; +} + + + +/* utf8_width: + * Returns the width of a UTF-8 character. + */ +static int utf8_width(char *s) +{ + int c = *((unsigned char *)s); + int n = 1; + + if (c & 0x80) { + while (c & (0x80>>n)) + n++; + } + + return n; +} + + + +/* utf8_cwidth: + * Returns the width of a UTF-8 character. + */ +static int utf8_cwidth(int c) +{ + int size, bits, b; + + if (c < 128) + return 1; + + bits = 7; + while (c >= (1<id; + ugetc = info->u_getc; + ugetx = info->u_getx; + usetc = info->u_setc; + uwidth = info->u_width; + ucwidth = info->u_cwidth; + uisok = info->u_isok; + } +} + + + +/* get_uformat: + * Returns the current text encoding format. + */ +int get_uformat() +{ + return utype; +} + + + +/* register_uformat: + * Allows the user to hook in custom routines for supporting a new string + * encoding format. + */ +void register_uformat(int type, int (*ugetc)(char *s), int (*ugetx)(char **s), int (*usetc)(char *s, int c), int (*uwidth)(char *s), int (*ucwidth)(int c), int (*uisok)(int c)) +{ + UTYPE_INFO *info = _find_utype(type); + + if (!info) + info = _find_utype(0); + + if (info) { + info->id = type; + info->u_getc = ugetc; + info->u_getx = ugetx; + info->u_setc = usetc; + info->u_width = uwidth; + info->u_cwidth = ucwidth; + info->u_isok = uisok; + } +} + + + +/* set_ucodepage: + * Sets lookup table data for the codepage conversion functions. + */ +void set_ucodepage(unsigned short *table, unsigned short *extras) +{ + codepage_table = table; + codepage_extras = extras; +} + + + +/* need_uconvert: + * Decides whether a conversion is required to make this string be in the + * new type. No conversion will be needed if both types are the same, or + * when going from ASCII <-> UTF8 where the data is 7-bit clean. + */ +int need_uconvert(char *s, int type, int newtype) +{ + int c; + + if (type == U_CURRENT) + type = utype; + + if (newtype == U_CURRENT) + newtype = utype; + + if (type == newtype) + return FALSE; + + if (((type == U_ASCII) || (type == U_UTF8)) && ((newtype == U_ASCII) || (newtype == U_UTF8))) { + do { + c = *((unsigned char *)(s++)); + if (!c) + return FALSE; + } while (c <= 127); + } + + return TRUE; +} + + + +/* uconvert_size: + * Returns the number of bytes this string will occupy when converted to + * the specified type. + */ +int uconvert_size(char *s, int type, int newtype) +{ + UTYPE_INFO *info, *outfo; + int size = 0; + int c; + + info = _find_utype(type); + if (!info) + return 0; + + outfo = _find_utype(newtype); + if (!outfo) + return 0; + + size = 0; + + while ((c = info->u_getx(&s)) != 0) + size += outfo->u_cwidth(c); + + return size + outfo->u_cwidth(0); +} + + + +/* do_uconvert: + * Converts a string from one format to another. + */ +void do_uconvert(char *s, int type, char *buf, int newtype, int size) +{ + UTYPE_INFO *info, *outfo; + int pos = 0; + int c; + + info = _find_utype(type); + if (!info) + return; + + outfo = _find_utype(newtype); + if (!outfo) + return; + + if (size < 0) + size = INT_MAX; + + size -= outfo->u_cwidth(0); + + while ((c = info->u_getx(&s)) != 0) { + if (!outfo->u_isok(c)) + c = '^'; + + size -= outfo->u_cwidth(c); + if (size < 0) + break; + + pos += outfo->u_setc(buf+pos, c); + } + + outfo->u_setc(buf+pos, 0); +} + + + +/* uconvert: + * Higher level version of do_uconvert(). This routine is intelligent + * enough to just return a copy of the input string if no conversion + * is required, and to use an internal static buffer if no user buffer + * is provided. + */ +char *uconvert(char *s, int type, char *buf, int newtype, int size) +{ + static char static_buf[512]; + + if (!need_uconvert(s, type, newtype)) + return s; + + if (!buf) { + buf = static_buf; + size = sizeof(static_buf); + } + + do_uconvert(s, type, buf, newtype, size); + return buf; +} + + + +/* uoffset: + * Returns the offset in bytes from the start of the string to the + * character at the specified index. If the index is negative, counts + * backward from the end of the string (-1 returns an offset to the + * last character). + */ +int uoffset(char *s, int index) +{ + char *orig = s; + char *last; + + if (index < 0) + index += ustrlen(s); + + while (index-- > 0) { + last = s; + if (!ugetx(&s)) { + s = last; + break; + } + } + + return (long)s - (long)orig; +} + + + +/* ugetat: + * Returns the character from the specified index within the string. + */ +int ugetat(char *s, int index) +{ + return ugetc(s + uoffset(s, index)); +} + + + +/* usetat: + * Modifies the character at the specified index within the string, + * handling adjustments for variable width data. Returns how far the + * rest of the string was moved. + */ +int usetat(char *s, int index, int c) +{ + int oldw, neww; + + s += uoffset(s, index); + + oldw = uwidth(s); + neww = ucwidth(c); + + if (oldw != neww) + memmove(s+neww, s+oldw, ustrsizez(s+oldw)); + + usetc(s, c); + + return neww-oldw; +} + + + +/* uinsert: + * Inserts a character at the specified index within a string, sliding + * following data along to make room. Returns how far the data was moved. + */ +int uinsert(char *s, int index, int c) +{ + int w = ucwidth(c); + + s += uoffset(s, index); + memmove(s+w, s, ustrsizez(s)); + usetc(s, c); + + return w; +} + + + +/* uremove: + * Removes the character at the specified index within the string, sliding + * following data back to make room. Returns how far the data was moved. + */ +int uremove(char *s, int index) +{ + int w; + + s += uoffset(s, index); + w = uwidth(s); + memmove(s, s+w, ustrsizez(s+w)); + + return -w; +} + + + +/* utolower: + * Unicode-aware version of the ANSI tolower() function. + */ +int utolower(int c) +{ + if ((c >= 65 && c <= 90) || + (c >= 192 && c <= 214) || + (c >= 216 && c <= 222) || + (c >= 913 && c <= 929) || + (c >= 931 && c <= 939) || + (c >= 1040 && c <= 1071)) + return c + 32; + if ((c >= 393 && c <= 394)) + return c + 205; + if ((c >= 433 && c <= 434)) + return c + 217; + if ((c >= 904 && c <= 906)) + return c + 37; + if ((c >= 910 && c <= 911)) + return c + 63; + if ((c >= 1025 && c <= 1036) || + (c >= 1038 && c <= 1039)) + return c + 80; + if ((c >= 1329 && c <= 1366) || + (c >= 4256 && c <= 4293)) + return c + 48; + if ((c >= 7944 && c <= 7951) || + (c >= 7960 && c <= 7965) || + (c >= 7976 && c <= 7983) || + (c >= 7992 && c <= 7999) || + (c >= 8008 && c <= 8013) || + (c >= 8040 && c <= 8047) || + (c >= 8072 && c <= 8079) || + (c >= 8088 && c <= 8095) || + (c >= 8104 && c <= 8111) || + (c >= 8120 && c <= 8121) || + (c >= 8152 && c <= 8153) || + (c >= 8168 && c <= 8169)) + return c + -8; + if ((c >= 8122 && c <= 8123)) + return c + -74; + if ((c >= 8136 && c <= 8139)) + return c + -86; + if ((c >= 8154 && c <= 8155)) + return c + -100; + if ((c >= 8170 && c <= 8171)) + return c + -112; + if ((c >= 8184 && c <= 8185)) + return c + -128; + if ((c >= 8186 && c <= 8187)) + return c + -126; + if ((c >= 8544 && c <= 8559)) + return c + 16; + if ((c >= 9398 && c <= 9423)) + return c + 26; + + switch (c) { + case 256: + case 258: + case 260: + case 262: + case 264: + case 266: + case 268: + case 270: + case 272: + case 274: + case 276: + case 278: + case 280: + case 282: + case 284: + case 286: + case 288: + case 290: + case 292: + case 294: + case 296: + case 298: + case 300: + case 302: + case 306: + case 308: + case 310: + case 313: + case 315: + case 317: + case 319: + case 321: + case 323: + case 325: + case 327: + case 330: + case 332: + case 334: + case 336: + case 338: + case 340: + case 342: + case 344: + case 346: + case 348: + case 350: + case 352: + case 354: + case 356: + case 358: + case 360: + case 362: + case 364: + case 366: + case 368: + case 370: + case 372: + case 374: + case 377: + case 379: + case 381: + case 386: + case 388: + case 391: + case 395: + case 401: + case 408: + case 416: + case 418: + case 420: + case 423: + case 428: + case 431: + case 435: + case 437: + case 440: + case 444: + case 453: + case 456: + case 459: + case 461: + case 463: + case 465: + case 467: + case 469: + case 471: + case 473: + case 475: + case 478: + case 480: + case 482: + case 484: + case 486: + case 488: + case 490: + case 492: + case 494: + case 498: + case 500: + case 506: + case 508: + case 510: + case 512: + case 514: + case 516: + case 518: + case 520: + case 522: + case 524: + case 526: + case 528: + case 530: + case 532: + case 534: + case 994: + case 996: + case 998: + case 1000: + case 1002: + case 1004: + case 1006: + case 1120: + case 1122: + case 1124: + case 1126: + case 1128: + case 1130: + case 1132: + case 1134: + case 1136: + case 1138: + case 1140: + case 1142: + case 1144: + case 1146: + case 1148: + case 1150: + case 1152: + case 1168: + case 1170: + case 1172: + case 1174: + case 1176: + case 1178: + case 1180: + case 1182: + case 1184: + case 1186: + case 1188: + case 1190: + case 1192: + case 1194: + case 1196: + case 1198: + case 1200: + case 1202: + case 1204: + case 1206: + case 1208: + case 1210: + case 1212: + case 1214: + case 1217: + case 1219: + case 1223: + case 1227: + case 1232: + case 1234: + case 1236: + case 1238: + case 1240: + case 1242: + case 1244: + case 1246: + case 1248: + case 1250: + case 1252: + case 1254: + case 1256: + case 1258: + case 1262: + case 1264: + case 1266: + case 1268: + case 1272: + case 7680: + case 7682: + case 7684: + case 7686: + case 7688: + case 7690: + case 7692: + case 7694: + case 7696: + case 7698: + case 7700: + case 7702: + case 7704: + case 7706: + case 7708: + case 7710: + case 7712: + case 7714: + case 7716: + case 7718: + case 7720: + case 7722: + case 7724: + case 7726: + case 7728: + case 7730: + case 7732: + case 7734: + case 7736: + case 7738: + case 7740: + case 7742: + case 7744: + case 7746: + case 7748: + case 7750: + case 7752: + case 7754: + case 7756: + case 7758: + case 7760: + case 7762: + case 7764: + case 7766: + case 7768: + case 7770: + case 7772: + case 7774: + case 7776: + case 7778: + case 7780: + case 7782: + case 7784: + case 7786: + case 7788: + case 7790: + case 7792: + case 7794: + case 7796: + case 7798: + case 7800: + case 7802: + case 7804: + case 7806: + case 7808: + case 7810: + case 7812: + case 7814: + case 7816: + case 7818: + case 7820: + case 7822: + case 7824: + case 7826: + case 7828: + case 7840: + case 7842: + case 7844: + case 7846: + case 7848: + case 7850: + case 7852: + case 7854: + case 7856: + case 7858: + case 7860: + case 7862: + case 7864: + case 7866: + case 7868: + case 7870: + case 7872: + case 7874: + case 7876: + case 7878: + case 7880: + case 7882: + case 7884: + case 7886: + case 7888: + case 7890: + case 7892: + case 7894: + case 7896: + case 7898: + case 7900: + case 7902: + case 7904: + case 7906: + case 7908: + case 7910: + case 7912: + case 7914: + case 7916: + case 7918: + case 7920: + case 7922: + case 7924: + case 7926: + case 7928: + return c + 1; + case 304: + return c + -199; + case 376: + return c + -121; + case 385: + return c + 210; + case 390: + return c + 206; + case 398: + return c + 79; + case 399: + return c + 202; + case 400: + return c + 203; + case 403: + return c + 205; + case 404: + return c + 207; + case 406: + case 412: + return c + 211; + case 407: + return c + 209; + case 413: + return c + 213; + case 415: + return c + 214; + case 422: + case 425: + case 430: + return c + 218; + case 439: + return c + 219; + case 452: + case 455: + case 458: + case 497: + return c + 2; + case 902: + return c + 38; + case 908: + return c + 64; + case 8025: + case 8027: + case 8029: + case 8031: + return c + -8; + case 8124: + case 8140: + case 8188: + return c + -9; + case 8172: + return c + -7; + default: + return c; + } +} + + + +/* utoupper: + * Unicode-aware version of the ANSI toupper() function. + */ +int utoupper(int c) +{ + if ((c >= 97 && c <= 122) || + (c >= 224 && c <= 246) || + (c >= 248 && c <= 254) || + (c >= 945 && c <= 961) || + (c >= 963 && c <= 971) || + (c >= 1072 && c <= 1103)) + return c + -32; + if ((c >= 598 && c <= 599)) + return c + -205; + if ((c >= 650 && c <= 651)) + return c + -217; + if ((c >= 941 && c <= 943)) + return c + -37; + if ((c >= 973 && c <= 974)) + return c + -63; + if ((c >= 1105 && c <= 1116) || + (c >= 1118 && c <= 1119)) + return c + -80; + if ((c >= 1377 && c <= 1414)) + return c + -48; + if ((c >= 7936 && c <= 7943) || + (c >= 7952 && c <= 7957) || + (c >= 7968 && c <= 7975) || + (c >= 7984 && c <= 7991) || + (c >= 8000 && c <= 8005) || + (c >= 8032 && c <= 8039) || + (c >= 8064 && c <= 8071) || + (c >= 8080 && c <= 8087) || + (c >= 8096 && c <= 8103) || + (c >= 8112 && c <= 8113) || + (c >= 8144 && c <= 8145) || + (c >= 8160 && c <= 8161)) + return c + 8; + if ((c >= 8048 && c <= 8049)) + return c + 74; + if ((c >= 8050 && c <= 8053)) + return c + 86; + if ((c >= 8054 && c <= 8055)) + return c + 100; + if ((c >= 8056 && c <= 8057)) + return c + 128; + if ((c >= 8058 && c <= 8059)) + return c + 112; + if ((c >= 8060 && c <= 8061)) + return c + 126; + if ((c >= 8560 && c <= 8575)) + return c + -16; + if ((c >= 9424 && c <= 9449)) + return c + -26; + + switch (c) { + case 255: + return c + 121; + case 257: + case 259: + case 261: + case 263: + case 265: + case 267: + case 269: + case 271: + case 273: + case 275: + case 277: + case 279: + case 281: + case 283: + case 285: + case 287: + case 289: + case 291: + case 293: + case 295: + case 297: + case 299: + case 301: + case 303: + case 307: + case 309: + case 311: + case 314: + case 316: + case 318: + case 320: + case 322: + case 324: + case 326: + case 328: + case 331: + case 333: + case 335: + case 337: + case 339: + case 341: + case 343: + case 345: + case 347: + case 349: + case 351: + case 353: + case 355: + case 357: + case 359: + case 361: + case 363: + case 365: + case 367: + case 369: + case 371: + case 373: + case 375: + case 378: + case 380: + case 382: + case 387: + case 389: + case 392: + case 396: + case 402: + case 409: + case 417: + case 419: + case 421: + case 424: + case 429: + case 432: + case 436: + case 438: + case 441: + case 445: + case 453: + case 456: + case 459: + case 462: + case 464: + case 466: + case 468: + case 470: + case 472: + case 474: + case 476: + case 479: + case 481: + case 483: + case 485: + case 487: + case 489: + case 491: + case 493: + case 495: + case 498: + case 501: + case 507: + case 509: + case 511: + case 513: + case 515: + case 517: + case 519: + case 521: + case 523: + case 525: + case 527: + case 529: + case 531: + case 533: + case 535: + case 995: + case 997: + case 999: + case 1001: + case 1003: + case 1005: + case 1007: + case 1121: + case 1123: + case 1125: + case 1127: + case 1129: + case 1131: + case 1133: + case 1135: + case 1137: + case 1139: + case 1141: + case 1143: + case 1145: + case 1147: + case 1149: + case 1151: + case 1153: + case 1169: + case 1171: + case 1173: + case 1175: + case 1177: + case 1179: + case 1181: + case 1183: + case 1185: + case 1187: + case 1189: + case 1191: + case 1193: + case 1195: + case 1197: + case 1199: + case 1201: + case 1203: + case 1205: + case 1207: + case 1209: + case 1211: + case 1213: + case 1215: + case 1218: + case 1220: + case 1224: + case 1228: + case 1233: + case 1235: + case 1237: + case 1239: + case 1241: + case 1243: + case 1245: + case 1247: + case 1249: + case 1251: + case 1253: + case 1255: + case 1257: + case 1259: + case 1263: + case 1265: + case 1267: + case 1269: + case 1273: + case 7681: + case 7683: + case 7685: + case 7687: + case 7689: + case 7691: + case 7693: + case 7695: + case 7697: + case 7699: + case 7701: + case 7703: + case 7705: + case 7707: + case 7709: + case 7711: + case 7713: + case 7715: + case 7717: + case 7719: + case 7721: + case 7723: + case 7725: + case 7727: + case 7729: + case 7731: + case 7733: + case 7735: + case 7737: + case 7739: + case 7741: + case 7743: + case 7745: + case 7747: + case 7749: + case 7751: + case 7753: + case 7755: + case 7757: + case 7759: + case 7761: + case 7763: + case 7765: + case 7767: + case 7769: + case 7771: + case 7773: + case 7775: + case 7777: + case 7779: + case 7781: + case 7783: + case 7785: + case 7787: + case 7789: + case 7791: + case 7793: + case 7795: + case 7797: + case 7799: + case 7801: + case 7803: + case 7805: + case 7807: + case 7809: + case 7811: + case 7813: + case 7815: + case 7817: + case 7819: + case 7821: + case 7823: + case 7825: + case 7827: + case 7829: + case 7841: + case 7843: + case 7845: + case 7847: + case 7849: + case 7851: + case 7853: + case 7855: + case 7857: + case 7859: + case 7861: + case 7863: + case 7865: + case 7867: + case 7869: + case 7871: + case 7873: + case 7875: + case 7877: + case 7879: + case 7881: + case 7883: + case 7885: + case 7887: + case 7889: + case 7891: + case 7893: + case 7895: + case 7897: + case 7899: + case 7901: + case 7903: + case 7905: + case 7907: + case 7909: + case 7911: + case 7913: + case 7915: + case 7917: + case 7919: + case 7921: + case 7923: + case 7925: + case 7927: + case 7929: + return c + -1; + case 305: + return c + -232; + case 383: + return c + -300; + case 454: + case 457: + case 460: + case 499: + return c + -2; + case 477: + case 1010: + return c + -79; + case 595: + return c + -210; + case 596: + return c + -206; + case 601: + return c + -202; + case 603: + return c + -203; + case 608: + return c + -205; + case 611: + return c + -207; + case 616: + return c + -209; + case 617: + case 623: + return c + -211; + case 626: + return c + -213; + case 629: + return c + -214; + case 640: + case 643: + case 648: + return c + -218; + case 658: + return c + -219; + case 837: + return c + 84; + case 940: + return c + -38; + case 962: + return c + -31; + case 972: + return c + -64; + case 976: + return c + -62; + case 977: + return c + -57; + case 981: + return c + -47; + case 982: + return c + -54; + case 1008: + return c + -86; + case 1009: + return c + -80; + case 7835: + return c + -59; + case 8017: + case 8019: + case 8021: + case 8023: + return c + 8; + case 8115: + case 8131: + case 8179: + return c + 9; + case 8126: + return c + -7205; + case 8165: + return c + 7; + default: + return c; + } +} + + + +/* uisspace: + * Unicode-aware version of the ANSI isspace() function. + */ +int uisspace(int c) +{ + return ((c == ' ') || (c == '\t') || (c == '\r') || + (c == '\n') || (c == '\f') || (c == '\v')); +} + + + +/* uisdigit: + * Unicode-aware version of the ANSI isdigit() function. + */ +int uisdigit(int c) +{ + return ((c >= '0') && (c <= '9')); +} + + + +/* ustrdup: + * Returns a newly allocated copy of the src string, which must later be + * freed by the caller. + */ +char *ustrdup(char *src) +{ + char *s = malloc(ustrsizez(src)); + + if (s) + ustrcpy(s, src); + + return s; +} + + + +/* ustrsize: + * Returns the size of the specified string in bytes, not including the + * trailing zero. + */ +int ustrsize(char *s) +{ + char *orig = s; + char *last; + + do { + last = s; + } while (ugetx(&s) != 0); + + return (long)last - (long)orig; +} + + + +/* ustrsizez: + * Returns the size of the specified string in bytes, including the + * trailing zero. + */ +int ustrsizez(char *s) +{ + char *orig = s; + + do { + } while (ugetx(&s) != 0); + + return (long)s - (long)orig; +} + + + +/* ustrcpy: + * Unicode-aware version of the ANSI strcpy() function. + */ +char *ustrcpy(char *dest, char *src) +{ + int pos = 0; + int c; + + while ((c = ugetx(&src)) != 0) + pos += usetc(dest+pos, c); + + usetc(dest+pos, 0); + + return dest; +} + + + +/* ustrcat: + * Unicode-aware version of the ANSI strcat() function. + */ +char *ustrcat(char *dest, char *src) +{ + int pos = ustrsize(dest); + int c; + + while ((c = ugetx(&src)) != 0) + pos += usetc(dest+pos, c); + + usetc(dest+pos, 0); + + return dest; +} + + + +/* ustrlen: + * Unicode-aware version of the ANSI strlen() function. + */ +int ustrlen(char *s) +{ + int c = 0; + + while (ugetx(&s)) + c++; + + return c; +} + + + +/* ustrcmp: + * Unicode-aware version of the ANSI strcmp() function. + */ +int ustrcmp(char *s1, char *s2) +{ + int c1, c2; + + for (;;) { + c1 = ugetx(&s1); + c2 = ugetx(&s2); + + if (c1 != c2) + return c1 - c2; + + if (!c1) + return 0; + } +} + + + +/* ustrncpy: + * Unicode-aware version of the ANSI strncpy() function. The n parameter + * is in bytes, on the assumption that you want to use this function to + * prevent overflowing a buffer size. + */ +char *ustrncpy(char *dest, char *src, int n) +{ + int pos = 0; + int c; + + while (((c = ugetx(&src)) != 0) && (pos < n)) + pos += usetc(dest+pos, c); + + usetc(dest+pos, 0); + + return dest; +} + + + +/* ustrncat: + * Unicode-aware version of the ANSI strncat() function. The n parameter + * is in bytes, on the assumption that you want to use this function to + * prevent overflowing a buffer size. + */ +char *ustrncat(char *dest, char *src, int n) +{ + char *d = dest + ustrsize(dest); + int pos = 0; + int c; + + while (((c = ugetx(&src)) != 0) && (pos < n)) + pos += usetc(d+pos, c); + + usetc(d+pos, 0); + + return dest; +} + + + +/* ustrncmp: + * Unicode-aware version of the ANSI strncmp() function. The n parameter + * is in characters, on the assumption that you want to use this function + * to compare only a few letters from a string. + */ +int ustrncmp(char *s1, char *s2, int n) +{ + int c1, c2; + + if (n <= 0) + return 0; + + for (;;) { + c1 = ugetx(&s1); + c2 = ugetx(&s2); + + if (c1 != c2) + return c1 - c2; + + if ((!c1) || (--n <= 0)) + return 0; + } +} + + + +/* ustricmp: + * Unicode-aware version of the ANSI stricmp() function. + */ +int ustricmp(char *s1, char *s2) +{ + int c1, c2; + + for (;;) { + c1 = utolower(ugetx(&s1)); + c2 = utolower(ugetx(&s2)); + + if (c1 != c2) + return c1 - c2; + + if (!c1) + return 0; + } +} + + + +/* ustrlwr: + * Unicode-aware version of the ANSI strlwr() function. + */ +char *ustrlwr(char *s) +{ + int pos = 0; + int c, lc; + + while ((c = ugetc(s+pos)) != 0) { + lc = utolower(c); + + if (lc != c) + usetat(s+pos, 0, lc); + + pos += uwidth(s+pos); + } + + return s; +} + + + +/* ustrupr: + * Unicode-aware version of the ANSI strupr() function. + */ +char *ustrupr(char *s) +{ + int pos = 0; + int c, uc; + + while ((c = ugetc(s+pos)) != 0) { + uc = utoupper(c); + + if (uc != c) + usetat(s+pos, 0, uc); + + pos += uwidth(s+pos); + } + + return s; +} + + + +/* ustrchr: + * Unicode-aware version of the ANSI strchr() function. + */ +char *ustrchr(char *s, int c) +{ + int d; + + while ((d = ugetc(s)) != 0) { + if (c == d) + return s; + + s += uwidth(s); + } + + if (!c) + return s; + + return NULL; +} + + + +/* ustrrchr: + * Unicode-aware version of the ANSI strrchr() function. + */ +char *ustrrchr(char *s, int c) +{ + char *last_match = NULL; + int c1, pos = 0; + + for (c1=ugetc(s); c1; c1=ugetc(s+pos)) { + if (c1 == c) + last_match = s + pos; + + pos += ucwidth(c1); + } + + return last_match; +} + + + +/* ustrstr: + * Unicode-aware version of the ANSI strstr() function. + */ +char *ustrstr(char *s1, char *s2) +{ + int len = ustrlen(s2); + + while (ugetc(s1)) { + if (ustrncmp(s1, s2, len) == 0) + return s1; + + s1 += uwidth(s1); + } + + return NULL; +} + + + +/* ustrpbrk: + * Unicode-aware version of the ANSI strpbrk() function. + */ +char *ustrpbrk(char *s, char *set) +{ + char *setp; + int c, d; + + while ((c = ugetc(s)) != 0) { + setp = set; + + while ((d = ugetx(&setp)) != 0) { + if (c == d) + return s; + } + + s += uwidth(s); + } + + return NULL; +} + + + +/* ustrtok: + * Unicode-aware version of the ANSI strtok() function. + */ +char *ustrtok(char *s, char *set) +{ + static char *last = NULL; + char *prev_str, *tok, *setp; + int c, sc; + + if (!s) { + s = last; + + if (!s) + return NULL; + } + + skip_leading_delimiters: + + prev_str = s; + c = ugetx(&s); + + setp = set; + + while ((sc = ugetx(&setp)) != 0) { + if (c == sc) + goto skip_leading_delimiters; + } + + if (!c) { + last = NULL; + return NULL; + } + + tok = prev_str; + + for (;;) { + prev_str = s; + c = ugetx(&s); + + setp = set; + + do { + sc = ugetx(&setp); + if (sc == c) { + if (!c) { + last = NULL; + return tok; + } + else { + s += usetat(prev_str, 0, 0); + last = s; + return tok; + } + } + } while (sc); + } +} + + + +/* uatof: + * Unicode-aware version of the ANSI atof() function. No need to bother + * implementing this ourselves, since all floating point numbers are + * valid ASCII in any case. + */ +double uatof(char *s) +{ + char tmp[64]; + return atof(uconvert_toascii(s, tmp)); +} + + + +/* ustrtol: + * Unicode-aware version of the ANSI strtol() function. Note the + * nicely bodged implementation :-) + */ +long ustrtol(char *s, char **endp, int base) +{ + char tmp[64]; + char *myendp; + long ret; + char *t; + + t = uconvert_toascii(s, tmp); + + ret = strtol(t, &myendp, base); + + if (endp) + *endp = s + uoffset(s, (long)myendp - (long)t); + + return ret; +} + + + +/* ustrtod: + * Unicode-aware version of the ANSI strtod() function. Note the + * nicely bodged implementation :-) + */ +double ustrtod(char *s, char **endp) +{ + char tmp[64]; + char *myendp; + double ret; + char *t; + + t = uconvert_toascii(s, tmp); + + ret = strtod(t, &myendp); + + if (endp) + *endp = s + uoffset(s, (long)myendp - (long)t); + + return ret; +} + + + +/* ustrerror: + * Fetch the error description from the OS and convert to Unicode. + */ +char *ustrerror(int err) +{ + char *s = strerror(err); + return uconvert_ascii(s, NULL); +} + + + +/* information about the current format conversion mode */ +typedef struct SPRINT_INFO +{ + int flags; + int field_width; + int precision; + int num_special; +} SPRINT_INFO; + + + +#define SPRINT_FLAG_LEFT_JUSTIFY 1 +#define SPRINT_FLAG_FORCE_PLUS_SIGN 2 +#define SPRINT_FLAG_FORCE_SPACE 4 +#define SPRINT_FLAG_ALTERNATE_CONVERSION 8 +#define SPRINT_FLAG_PAD_ZERO 16 +#define SPRINT_FLAG_SHORT_INT 32 +#define SPRINT_FLAG_LONG_INT 64 +#define SPRINT_FLAG_LONG_DOUBLE 128 +#define SPRINT_FLAG_LONG_LONG 256 + + + +/* va_int: + * Helper for reading an integer from the varargs list. + */ +#ifdef LONGLONG + + #define va_int(args, flags) \ + ( \ + ((flags) & SPRINT_FLAG_SHORT_INT) ? \ + va_arg(args, signed short int) \ + : \ + (((flags) & SPRINT_FLAG_LONG_LONG) ? \ + va_arg(args, signed LONGLONG) \ + : \ + (((flags) & SPRINT_FLAG_LONG_INT) ? \ + va_arg(args, signed long int) \ + : \ + va_arg(args, signed int))) \ + ) + +#else + + #define va_int(args, flags) \ + ( \ + ((flags) & SPRINT_FLAG_SHORT_INT) ? \ + va_arg(args, signed short int) \ + : \ + (((flags) & SPRINT_FLAG_LONG_INT) ? \ + va_arg(args, signed long int) \ + : \ + va_arg(args, signed int)) \ + ) + +#endif + + + +/* va_uint: + * Helper for reading an unsigned integer from the varargs list. + */ +#ifdef LONGLONG + + #define va_uint(args, flags) \ + ( \ + ((flags) & SPRINT_FLAG_SHORT_INT) ? \ + va_arg(args, unsigned short int) \ + : \ + (((flags) & SPRINT_FLAG_LONG_LONG) ? \ + va_arg(args, unsigned LONGLONG) \ + : \ + (((flags) & SPRINT_FLAG_LONG_INT) ? \ + va_arg(args, unsigned long int) \ + : \ + va_arg(args, unsigned int))) \ + ) + +#else + + #define va_uint(args, flags) \ + ( \ + ((flags) & SPRINT_FLAG_SHORT_INT) ? \ + va_arg(args, unsigned short int) \ + : \ + (((flags) & SPRINT_FLAG_LONG_INT) ? \ + va_arg(args, unsigned long int) \ + : \ + va_arg(args, unsigned int)) \ + ) + +#endif + + + +/* sprint_i: + * Worker function for formatting integers. + */ +static int sprint_i(char **buf, double val, int precision) +{ + char tmp[512]; + int i = 0; + int len; + + do { + tmp[i++] = (int)fmod(val, 10); + val /= 10; + } while ((val >= 1) && (i < 512)); + + for (len=i; len 0) + *buf += usetc(*buf, tmp[--i] + '0'); + + return len; +} + + + +/* sprint_plus_sign: + * Helper to add a plus sign or space in front of a number. + */ +static void sprint_plus_sign(char **buf, SPRINT_INFO *info, int *len) +{ + if (info->flags & SPRINT_FLAG_FORCE_PLUS_SIGN) { + *buf += usetc(*buf, '+'); + (*len)++; + } + else if (info->flags & SPRINT_FLAG_FORCE_SPACE) { + *buf += usetc(*buf, ' '); + (*len)++; + } +} + + + +/* sprint_int: + * Helper for formatting a signed integer. + */ +static int sprint_int(char **buf, SPRINT_INFO *info, long val) +{ + int len = 0; + + if (val < 0) { + val = -val; + *buf += usetc(*buf, '-'); + len++; + } + else + sprint_plus_sign(buf, info, &len); + + info->num_special = len; + + return sprint_i(buf, val, info->precision) + len; +} + + + +/* sprint_unsigned: + * Helper for formatting an unsigned integer. + */ +static int sprint_unsigned(char **buf, SPRINT_INFO *info, unsigned long val) +{ + sprint_plus_sign(buf, info, &info->num_special); + + return sprint_i(buf, val, info->precision) + info->num_special; +} + + + +/* sprint_hex: + * Helper for formatting a hex integer. + */ +static int sprint_hex(char **buf, SPRINT_INFO *info, int caps, unsigned long val) +{ + static char hex_digit_caps[] = "0123456789ABCDEF"; + static char hex_digit[] = "0123456789abcdef"; + + char tmp[16]; + char *table; + int i = 0; + int len; + + sprint_plus_sign(buf, info, &info->num_special); + + if (info->flags & SPRINT_FLAG_ALTERNATE_CONVERSION) { + *buf += usetc(*buf, '0'); + *buf += usetc(*buf, 'x'); + info->num_special += 2; + } + + do { + tmp[i++] = val & 15; + val >>= 4; + } while (val); + + for (len=i; lenprecision; len++) + *buf += usetc(*buf, '0'); + + if (caps) + table = hex_digit_caps; + else + table = hex_digit; + + while (i > 0) + *buf += usetc(*buf, table[(int)tmp[--i]]); + + return len + info->num_special; +} + + + +/* sprint_octal: + * Helper for formatting an octal integer. + */ +static int sprint_octal(char **buf, SPRINT_INFO *info, unsigned long val) +{ + char tmp[16]; + int i = 0; + int len; + + sprint_plus_sign(buf, info, &info->num_special); + + if (info->flags & SPRINT_FLAG_ALTERNATE_CONVERSION) { + *buf += usetc(*buf, '0'); + info->num_special++; + } + + do { + tmp[i++] = val & 7; + val >>= 3; + } while (val); + + for (len=i; lenprecision; len++) + *buf += usetc(*buf, '0'); + + while (i > 0) + *buf += usetc(*buf, tmp[--i] + '0'); + + return len + info->num_special; +} + + + +/* sprint_float: + * Helper for formatting a float. + */ +static int sprint_float(char **buf, SPRINT_INFO *info, double val) +{ + int len = 0; + int v, p, i; + double int_port, frac_port; + + if (val < 0) { + val = -val; + *buf += usetc(*buf, '-'); + len++; + } + else + sprint_plus_sign(buf, info, &len); + + info->num_special = len; + + frac_port = modf(val, &int_port); + + len += sprint_i(buf, int_port, -1); + + if (info->precision >= 0) + p = info->precision; + else + p = 8 - len + info->num_special; + + if (p > 0) { + *buf += usetc(*buf, '.'); + len++; + + for (i=0; i 9) + v = 9; + + frac_port -= v; + + *buf += usetc(*buf, v + '0'); + len++; + } + } + + return len; +} + + + +/* sprint_string: + * Helper for formatting a string. + */ +static int sprint_string(char **buf, SPRINT_INFO *info, char *s) +{ + int len = 0; + int c; + + while ((c = ugetx(&s)) != 0) { + if ((info->precision >= 0) && (len >= info->precision)) + break; + + *buf += usetc(*buf, c); + len++; + } + + return len; +} + + + +/* uvsprintf: + * Unicode-aware version of the ANSI vsprintf() function. + */ +int uvsprintf(char *buf, char *format, va_list args) +{ + SPRINT_INFO info; + char *orig; + int *pstr_pos; + int done, slen, c, i; + int shift, shiftbytes, shiftfiller; + int len = 0; + + while ((c = ugetx(&format)) != 0) { + + if (c == '%') { + if (ugetc(format) == '%') { + /* percent sign escape */ + format += uwidth(format); + buf += usetc(buf, '%'); + len++; + } + else { + /* format specifier */ + orig = buf; + + c = ugetc(format); + + #define NEXT_C() \ + { \ + format += uwidth(format); \ + c = ugetc(format); \ + } + + /* set default conversion flags */ + info.flags = 0; + info.field_width = 0; + info.precision = -1; + info.num_special = 0; + + /* check for conversion flags */ + done = FALSE; + + do { + switch (c) { + + case '-': + info.flags |= SPRINT_FLAG_LEFT_JUSTIFY; + NEXT_C(); + break; + + case '+': + info.flags |= SPRINT_FLAG_FORCE_PLUS_SIGN; + NEXT_C(); + break; + + case ' ': + info.flags |= SPRINT_FLAG_FORCE_SPACE; + NEXT_C(); + break; + + case '#': + info.flags |= SPRINT_FLAG_ALTERNATE_CONVERSION; + NEXT_C(); + break; + + case '0': + info.flags |= SPRINT_FLAG_PAD_ZERO; + NEXT_C(); + break; + + default: + done = TRUE; + break; + } + + } while (!done); + + /* check for a field width specifier */ + if (c == '*') { + NEXT_C(); + info.field_width = va_arg(args, int); + if (info.field_width < 0) { + info.flags |= SPRINT_FLAG_LEFT_JUSTIFY; + info.field_width = -info.field_width; + } + } + else if ((c >= '0') && (c <= '9')) { + info.field_width = 0; + do { + info.field_width *= 10; + info.field_width += c - '0'; + NEXT_C(); + } while ((c >= '0') && (c <= '9')); + } + + /* check for a precision specifier */ + if (c == '.') + NEXT_C(); + + if (c == '*') { + NEXT_C(); + info.precision = va_arg(args, int); + if (info.precision < 0) + info.precision = 0; + } + else if ((c >= '0') && (c <= '9')) { + info.precision = 0; + do { + info.precision *= 10; + info.precision += c - '0'; + NEXT_C(); + } while ((c >= '0') && (c <= '9')); + } + + /* check for size qualifiers */ + done = FALSE; + + do { + switch (c) { + + case 'h': + info.flags |= SPRINT_FLAG_SHORT_INT; + NEXT_C(); + break; + + case 'l': + if (info.flags & SPRINT_FLAG_LONG_INT) + info.flags |= SPRINT_FLAG_LONG_LONG; + else + info.flags |= SPRINT_FLAG_LONG_INT; + NEXT_C(); + break; + + case 'L': + info.flags |= (SPRINT_FLAG_LONG_DOUBLE | SPRINT_FLAG_LONG_LONG); + NEXT_C(); + break; + + default: + done = TRUE; + break; + } + + } while (!done); + + /* format the data */ + switch (c) { + + case 'c': + /* character */ + buf += usetc(buf, va_arg(args, int)); + slen = 1; + NEXT_C(); + break; + + case 'd': + case 'i': + /* signed integer */ + slen = sprint_int(&buf, &info, va_int(args, info.flags)); + NEXT_C(); + break; + + case 'D': + /* signed long integer */ + slen = sprint_int(&buf, &info, va_int(args, info.flags | SPRINT_FLAG_LONG_INT)); + NEXT_C(); + break; + + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + /* double */ + if (info.flags & SPRINT_FLAG_LONG_DOUBLE) + slen = sprint_float(&buf, &info, va_arg(args, long double)); + else + slen = sprint_float(&buf, &info, va_arg(args, double)); + NEXT_C(); + break; + + case 'n': + /* store current string position */ + pstr_pos = va_arg(args, int *); + *pstr_pos = len; + slen = 0; + NEXT_C(); + break; + + case 'o': + /* unsigned octal integer */ + slen = sprint_octal(&buf, &info, va_uint(args, info.flags)); + NEXT_C(); + break; + + case 'p': + /* pointer */ + slen = sprint_hex(&buf, &info, FALSE, (unsigned long)(va_arg(args, void *))); + NEXT_C(); + break; + + case 's': + /* string */ + slen = sprint_string(&buf, &info, va_arg(args, char *)); + NEXT_C(); + break; + + case 'u': + /* unsigned integer */ + slen = sprint_unsigned(&buf, &info, va_uint(args, info.flags)); + NEXT_C(); + break; + + case 'U': + /* unsigned long integer */ + slen = sprint_unsigned(&buf, &info, va_uint(args, info.flags | SPRINT_FLAG_LONG_INT)); + NEXT_C(); + break; + + case 'x': + case 'X': + /* unsigned hex integer */ + slen = sprint_hex(&buf, &info, (c == 'X'), va_uint(args, info.flags)); + NEXT_C(); + break; + + default: + /* weird shit... */ + slen = 0; + break; + } + + if (slen < info.field_width) { + if (info.flags & SPRINT_FLAG_LEFT_JUSTIFY) { + /* left align the result */ + while (slen < info.field_width) { + buf += usetc(buf, ' '); + slen++; + } + } + else { + /* right align the result */ + shift = info.field_width - slen; + + if (shift > 0) { + if (info.flags & SPRINT_FLAG_PAD_ZERO) { + shiftfiller = '0'; + + for (i=0; i68705 communication. - - - -Galaga ("galaga") -===================== -Namco version - -In the test screen, use movement & fire to change & hear sound effects - -Clone supported: - Midway copyright ("galagamw") - fast shoot hack ("galagads") - Bootleg called Gallag ("gallag") - Another bootleg, with Namco copyright left in ("galagab2") - -Known issues: -- The background starfield is wrong (using the Galaxian one, which is different) -- Sometimes explosion sprites appear on the left of the screen. - - - -Galaxian ("galaxian") -===================== -Original version with Namco copyright - - original with Midway copyright ("galmidw") - and several bootlegs: - one with Namco copyright ("galnamco") - Super Galaxians ("superg") - Galaxian Part X ("galapx") - Galaxian Part 1 ("galap1") - Galaxian Part 4 ("galap4") - Galaxian Turbo ("galturbo") - -Known issues: -- Bullet placement is not correct in cocktail mode -- Sound is not completely emulated. - - - -Gauntlet ("gauntlet") -===================== -The start button is also used to use potions. - -Clones supported: - Intermediate Release 1 ("guantir1") - Intermediate Release 2 ("guantir2") - 2 players version ("gaunt2p") - -Known issues: -- The Slapstic protection MIGHT cause some level layouts to be screwed up. Let - us know if you notice one. - - - -Ghosts'n Goblins ("gng") -======================== -Clones supported: - Taito license ("gngt") - alternate version with different graphics (the last weapon is a cross - instead of a shield) ("gngcross") - Japanese version 'Makai-mura' ("gngjap") - -Known issues: -- To continue a game, insert a coin and keep fire pressed while pressing 1 (or 2) - - - -Gladiator ("gladiatr") -====================== -Clones supported: - Japanese version, called Ohgon no Siro ("ogonsiro") - Golden Castle (the code is the same as the Japanese version) ("gcastle") - - - -Glob,The ("theglob") -==================== -To enter service mode, press Player 2 Button 2. It works only in Upright mode. - -Clones supported: - Beastie Feastie ("beastf") - - - -Golden Star ("goldstar") -======================== -Clones supported: - blue version (so called because the board is blue) ("goldstbl") - -Known issues: -- Ticket dispenser not emulated. - - - -Gorf ("gorf") -============= -Clones supported: - Program 1 ("gorfpgm1") - -Known issues: -- Colors are wrong in cocktail mode - - - -Gridiron Fight ("gridiron") -=========================== -The original game uses a LED display to show the number of the formation -selected. This is emulated by placing a character in the corner of the screen. - -Known issues: -- The game sometimes resets, though not as often as Tee'd Off. -- Sprite/foregound priority is not emulated. This makes the arrow showing the - position on the field map not visible. -- Dip switches not verified - - - -Gun Dealer ("gundealr") -======================= -Clones supported: - alternate version with different graphics ("gundeala") - - - -Hard Hat ("hardhat") -==================== -Known issues: -- dip switches and input ports not verified - - - -HigeMaru ("higemaru") -===================== -Press BUTTON1 during boot to enter service mode. - - - -Inferno ("inferno") -=================== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - - - -Invinco ("invinco") -================= -Known issues: -- dip switches not verified - - - -Invinco / Head On 2 dual game ("invho2") -======================================== -Press button 2 to select the game. - -Known issues: -- dip switches not verified - - - -Iron Horse ("ironhors") -======================= -Clones supported: - bootleg called Far West, running on different hardware (not working yet) - ("farwest") - -Known issues: -- Far West doesn't work. - - - -Jack Rabbit ("jackrabt") -======================== -Note that you must push the joystick diagonally to move. This is how the game -works. - -Clones supported: - alternate version labeled "Master Jackrabbit USA2" ("jackrab2") - alternate version labeled "Special Jackrabbit Do Not Ship" ("jackrabs") - - - -Jackal ("jackal") -================= -Clones supported: - Top Gunner ("topgunr") - Tokushu Butai Jackal ("jackalj") - bootleg Top Gunner ("topgunbl") - -topgunbl also allows to rotate the gun turret with a rotary switch. This -feature is not available in the original sets. In jackalj, the gun faces the -direction you are moving. In the others, it always faces up. - - - -Journey ("journey") -=================== -Known issues: -- No support for the cassette music - - - -Joust ("joust") -=============== -white/green label version - -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - -Clones supported: - white/red label version ("joustwr") - red label version ("joustr") -All of the alternate versions are older, and have the pterodactyl bug. The -order, from older to newer, is: white/red - red - white/green - - - -Joust 2 ("joust2") -================== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - -The transform button is the start button. - - - -Jump Bug ("jumpbug") -==================== -Clones supported: - "Sega" version (probably a bootleg) ("jumpbugb") - - - -Jumping Jack ("jjack") -====================== -CTRL+F3 Test mode - -Known issues: -- Dip switches not verified - - - -Kangaroo ("kangaroo") -============================ -In test mode, to test sound press 1 and 2 player start simultaneously. -Punch + 1 player start moves to the crosshatch pattern. - -Clones supported: - bootleg ("kangarob") - -Known issues: -- There is a custom microcontroller on the original board which is not - emulated. This MIGHT cause some problems, but we don't know of any. - - - -Karate Champ ("kchampvs") -========================= -VS version - -Clones supported: - Karatedo ("karatedo") - - - -Karnov ("karnov") -================= -Clones supported: - Japanese version. Gameplay is different in this version. ("karnovj") - - - -Kick Rider ("kickridr") -======================= -CTRL+F3 Test mode - -Known issues: -- Dip switches are wrong - - - -Kid Niki ("kidniki") -==================== -Known issues: -- Crashes/messes up in the confrontation with the final boss. Reason unknown. - - - -Klax ("klax") -============= -Clones supported: - earlier version ("klax2") - earlier version ("klax3") - - - -Kosmik Krooz'r ("kroozr") -========================== -MCR/II hardware -Press F2 before initial screen to configure - -Arrows Move -Track Aim -X/Z Aim -CTRL Fire -ALT Shields - -Known issues: -- Movement should be via an analog joystick - - - -Kram ("kram") -=========================== -Keep F2 pressed to enter test mode, then F1 to advance to the next test. - -There are no dip switches, press F1 to enter the service mode, then - F1 Next screen - F2 Next line - F5 Up - F6 Down - -The first time you run the game, it will ask the language. You can use F1 to -proceed through all the configuration screens, or just reset (F3). -To change the language afterwards, delete the KRAM.HI file from the HI -directory and re-run the program. - - - -Krull ("krull") -=============== -Known issues: -- The high score count page in the bookkeeping section of service mode doesn't - seem to work. Every score is registered as "More". - - - -Kung Fu Master ("kungfum") -========================== -In slow motion mode, press 2 to slow game speed -In stop mode, press 2 to stop and 1 to restart -In level selection mode, press 1 to select and 2 to restart - -Clones supported: - Data East license ("kungfud") - bootleg version copyright Irem ("kungfub") - bootleg version copyright O.K. ("kungfub2") - - - -Last Duel ("lastduel") -====================== -Clones supported: - bootleg version, the only difference in the code is a branch over some - startup routines (including the "not for use outside of the US" screen) - ("lstduelb") - - - -Leprechaun ("leprechn") -======================= -Hold down F2 while pressing F3 to enter test mode. Hit Advance (F1) to -cycle through test and hit F2 to execute. - -Clones supported: - Pot of Gold ("potogold") - - - -Lode Runner ("ldrun") -======================= -Clones supported: - alternate version which gives less time (3500 vs. 6000) ("ldruna") - - - -Lotto Fun ("lottofun") -====================== -Known issues: -- Sometimes you have to press F1 to proceed after the first screen. - - - -Lunar Lander ("llander") -======================== -Clones supported: - revision 1 ("llander1") - -Known issues: -- Selftest does not work. It seems page 0 and 1 are mirrored, and - the cpu emulation can't handle this correctly -- The language dip switch has no effect, this ROM set doesn't have support - for that (034597.01 is empty). - - - -Lunar Rescue ("lrescue") -======================== -Clones supported: - Destination Earth ("desterth") (uses Space Invaders color scheme) - -Known issues: - A free credit is awarded on the first docking of the first game. - - - -MACH 3 ("mach3") -================ -This is a laser disc game; since the disc contains data needed for gameplay, -it is not playable. - - - -Make Trax ("maketrax") -====================== -Clones supported: - Crush Roller, which is a bootleg version modified to run on a Pac Man - board. ("crush") - -Known issues: -- Colors are accurate for Crush Roller, but they could be wrong for Make Trax. - - - -Marble Madness ("marble") -========================= -Clones supported: - alternate version ("marblea") - older version ("marble2") - - - -Mariner ("mariner") -=================== -Known issues: -- gfx banking not figured out. -- sound seems incomplete. - - - -Mario Bros. ("mario") -===================== -F2 Test (keep it pressed) - -Clones supported: - bootleg called Masao, which uses a Z80 instead of 8039 for sound ("masao") - -Known issues: -- Masao locks up at level 16? - - - -Mat Mania ("matmania") -====================== -Clones supported: - Exciting Hour ("excthour") - -Known issues: -- Most colors seem correct, but the audience graphics use purple instead of - blue? - - - -Mikie ("mikie") -=============== -Hold down Start 1 & Start 2 keys to enter test mode on start up; -then use Start 1 to advance to the next screen - -Clones supported: - Japanese version. The program ROMs are identical to the US version, only the - graphics are different ("mikiej") - High School Graffiti. In this version your weapon is a whistle instead of - a headbutt ("mikiehs") - - - -Minefield ("minefld") -===================== -Press 1+F3 to enter test mode - -Known issues: -- Colors are accurate apart from the background, which is an approximation. -- Separate controls for player 2 in cocktail mode are not supported. - - - -Missile Command ("missile") -=========================== -Clones supported: - earlier version ("missile2") - Super Missile Attack ("suprmatk") - - - -Moon Alien Part 2 ("moonal2") -============================= -Clones supported: - alternate version, probably older ("moonal2b") - - - -Moon Cresta ("mooncrst") -======================== -This runs on a hardware very similar to Galaxian. -The ROMs are encrypted. Nichibutsu copyright. - -Arrows Move around -CTRL Fire - -Clones supported: - Unencrypted Gremlin version ("mooncrsg") - Unencrypted version, probably bootleg ("mooncrsb") - bootleg version called Fantazia ("fantazia") - Eagle ("eagle") - bootleg running on Galaxian hardware ("mooncrgx") - -Known issues: -- Dip switches for the alternate sets might be inaccurate. -- Wrong dip switches in "mooncrgx". - - - -Moon Patrol ("mpatrol") -======================= -Arrows Move around -CTRL Fire -ALT Jump -F2+F3 Test mode (press and release, then be patient. After the RAM/ROM - tests, press 2 for an additional menu of options, then - left/right to choose the option, and 1 to select it) - -Clones supported: - Williams license ("mpatrolw") - bootleg version, called Moon Ranger ("mranger") - -Known issues: -- Colors in test mode are not correct (black instead of R, G, B). The other - colors in the game seem to be correct, so I don't know what's going on. -- The background might not be entirely accurate -- Sometimes, when you kill an enemy ship which is falling down, the ship and - the score will stick on the screen for some time instead of disappearing. - This is a bug of the original, not of the emulation. - - - -Mouse Trap ("mtrap") -==================== -4+F3 to enter service mode - - - -Moon War II ("moonwar2") -======================== -Clones supported: - alternate version ("monwar2a") - -Known issues: -- The monwar2a input ports are wrong. - - - -Mr. Do! ("mrdo") -================ -CTRL+F3 Test mode - -Clones supported: - Version with additional Taito copyright ("mrdot") - Version with a fixed bug which would allow to get 255 lives ("mrdofix") - Mr. Lo! ("mrlo") - Mr. Du! ("mrdu") - bootleg with different graphics and music ("mrdoy") - bootleg with different graphics ("yankeedo") - - - -Mr. Do's Castle ("docastle") -============================ -CTRL+F3 Test mode - -Clones supported: - Different (probably earlier) version called Mr. Do vs the Unicorns. It has - significant differences in the gameplay ("douni") - Another alternate version, differences are unknown ("docastl2") - - - -Mr. Do! Run Run ("dorunrun") -============================ -CTRL+F3 Test mode - -Clones supported: - the Japanese version of Super Pierrot, a follow-up with improved graphics - ("spiero") - - -Mr. Do! WildRide ("dowild") -=========================== -Arrows Move around -CTRL Fire -CTRL+F3 Test mode - - - -Ms Pac Man ("mspacman") -======================= -Only the bootleg version is supported. - -CTRL Speed up cheat - -Clones supported: - Miss Pac Plus ("mspacatk") - -Known issues: -- In Miss Pac Plus, use the 2 player start button to accelerate. This is a - feature of the original game. -- In Miss Pac Plus the bonus fruits move through the maze walls. This is - normal, the original does the same. - - - -My Hero ("myhero") -================== -Clones supported: - Korean (?) version, Seishun Scandal (encrypted) ("myheroj") - - - -Mystic Marathon ("mysticm") -=========================== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - - - -Naughty Boy ("naughtyb") -======================== -Known issues: -- some colors seem wrong, maybe the PROM is bad or I made some mistake in - its interpretation. -- Music is wrong. - - - -New Zealand Story ("tnzs") -========================== -Clones supported: - bootleg, different ("tnzsb") - alternate, different, harder, version. Note that this has the old Taito - logo while the others have the new one. ("tnzs2") - -The story of TNZS2 isn't exactly known. Most of the console/computer ports -of TNZS had levels identical to TNZS, but surprisingly the Genesis TNZS -is identical to TNZS2. - - - -Nibbler ("nibbler") -=================== -Clones supported: - alternate version ("nibblera") - -In "nibblera" starting at level 32 you must complete each level on one life. If -you die, you'll have to start it all over again. -In "nibbler", you don't. When you die, you simply pick up where you left off -(at least as far as level 53). - - - -Night Driver ("nitedrvr") -========================= -The gear and track displays are not a part of the original game, but have been -added for playability. - - - -Ninja Kid 2 ("ninjakd2") -======================== -Clones supported: - alternate version ("ninjak2a") - -Known issues: -- Due to encryption, sound works only in the alternate version. - - - -Pengo ("pengo") -=============== -Original version, encrypted, with "Popcorn" music. - -Clones supported: - alternate version (earlier), with different music and no slow screen draw - ("pengo2") - same as pengo2, but not encrypted ("pengo2u") - bootleg called Penta, encrypted ("penta") - - - -Pepper II ("pepper2") -===================== -3+F3 Test mode - - - -Phoenix ("phoenix") -=================== -Amstar copyright - -Clones supported: - Taito copyright ("phoenixt") - bootleg by T.P.N. ("phoenix3") - bootleg (?) by IRECSA ("phoenixc") - -Known issues: -- The startup tune is missing. - - - -Pickin' ("pickin") -================== -Known issues: -- The dip switches don't work - - - -Pinball Action ("pbaction") -=========================== -Clones supported: - alternate version ("pbactio2") - -Known issues: -- The alternate set has code for a third Z80, whose function is unknown. - - - -Pitfall II ("pitfall2") -======================= -Clones supported: - not encrypted version. This version allows you to select the starting stage - using the dip switches. ("pitfallu") - - - -Pontoon ("pontoon") -=================== -The first time you run the game, push 'Reset All' (F5) after the game displays -'Battery Error' for the 3rd time. This will initialize the battery backed RAM. - -Enter switch test mode by holding down the Hit key, and when the -crosshatch pattern comes up, release it and push it again. - -After you get into Check Mode (F2), press the Hit key to switch pages. - -Known issues: -- The game hangs after you win because the hopper is not emualted. - - - -Popeye ("popeye") -================= -Clones supported: - alternate version ("popeye2") - bootleg version ("popeyebl") - -Known issues: -- Due to encryption, the original doesn't work. Use the bootleg instead. -- You get about 7 bonus lives when you reach level 4. - - - -Power Spikes ("pspikes") -======================== -Keep button 1 pressed during boot to have access to a wider range of options -in service mode. - - - -Pulsar ("pulsar") -================= -Known issues: -- dip switches not verified - - - -Punch Out ("punchout") -====================== -Known issues: -- When you die, a rectangle on the left of the screen blinks. - - - -Qix ("qix") -=========== -Keep F2 pressed to enter test mode, then F1 to advance to the next test. - -There are no dip switches, press F1 to enter the service mode, then - F1 Next screen - F2 Next line - F5 Up - F6 Down - -The first time you run the game, it will ask the language. You can use F1 to -proceed through all the configuration screens, or just reset (F3). -To change the language afterwards, delete the QIX.HI file from the HI -directory and re-run the program. - -Clones supported: - Qix II ("qix2") - - - -Q*Bert ("qbert") -================ -To enter your name in the high score list, use 1 or 2. - -When the Auto Round Advance dip switch is On, use 1 or 2 to advance to the -following round. You also get infinite lives. - -Clones supported: - Japanese version ("qbertjp") - - - -Q*Bert Qubes ("qbertqub") -========================= -To enter your name in the high score list, use 1 or 2. - - - -Radar Scope ("radarscp") -======================== -Known issues: -- Missing background grid (a la Juno First) - - - -Rainbow Islands ("rainbow") -=========================== -Clones supported: - Extra version ("rainbowe") - bootleg ("Jumping") - -Known issues: -- Only partially working due to protection -- The sky is black instead of blue - - - -Rally X ("rallyx") -================== -Known issues: -- Sprites are not turned off appropriately. -- Graphics placement in cocktail mode is not perfect. - - - -Reactor ("reactor") -=================== -1 Player 2 Energy -2 Player 2 Decoy - -To start a 1 player game with 7 lives, insert two coins and press BUTTON 2. To -start a 2 players game with 7 lives each, insert two coins and press BUTTON 1. - -Known issues: -- Speech is not emulated - - - -Red Baron ("redbaron") -====================== -- Red Baron tries to calibrate its analog joystick at the start, so you'll - have to move the "joystick" a bit before you can fly in all four directions. - - - -Renegade ("renegade") -===================== -To enter test mode, hold down Player#1 and Player#2 start buttons as the game -starts up. - -Clones supported: - bootleg Nekketsu Kouha Kunio Kun ("kuniokub") - -Known issues: -- Due to protection, the original doesn't work. Use the bootleg instead. -- Some graphic glitches in the bootleg, caused by bad ROMs. - - - -Rescue ("rescue") -=================== -Press 1+F3 to enter test mode - -Known issues: -- Colors are accurate apart from the background, which is an approximation. - - - -Return of the jedi ("jedi") -=========================== -Known issues: -- background graphics are blocky because the hardware which smoothes them is - not emulated. -- this game has an analog stick. Control with keyboard or mouse doesn't work - too well. - - - -River Patrol ("rpatrolb") -========================= -Clones supported: - Silver Land. Don't be fooled by the completely different graphics: this is - the same game in disguise. ("silvland") - - - -Robotron ("robotron") -=============== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - -Clones supported: - yellow/orange label version, where quarks are incorrectly called Cubeoids - during the demo ("robotryo") - - - -Roc'n Rope ("rocnrope") -======================= -Clones supported: - bootleg called Rope Man ("ropeman") - -Known issues: -- The bootleg version crashes when you start a game. This might be due to a - slightly different encryption scheme. - - - -Rolling Thunder ("rthunder") -============================ -Clones supported: - alternate version, older ("rthundrb") - -(set2), called 'old version' in japan.(1986/12) -(set1), called 'new version' in japan.(1987/1) -In 1987/1, All 'old version' romset changed 'new version' in amusement center. -because (i think) 'old version' was overdone that too hard difficulty game. - - - -Rygar ("rygar") -=============== -Clones supported: - alternate version. This has a typo on the title screen: ALL RIGHT RESERVED - instead of ALL RIGHT*S* RESERVED. ("rygar2") - Japanese version ("rygarj") - - - -Safari ("safari") -================= -Known issues: -- This game needs the overlay bad. The white rectangle on the screen is used - to simulate the tree visible on the flyer. - The flyer is at www.gamearchive.com/flyers/video/segagremlin/safari_b.jpg - - - -Scion ("scion") -=============== -Clones supported: - Cinematronics license ("scionc") - -Known issues: -- scion has some constant background noise. scionc doesn't. This might be due - to a bad ROM. - - - -Scramble ("scramble") -===================== -Known issues: -- The star background is probably not entirely accurate. Also, maybe it should - be clipped at the top and bottom of the screen? - - - -Showdown ("showdown") -===================== -Keep button 1 pressed at boot to skip the checks. -Keep start pressed to enter service mode. - - - -Sidearms ("sidearms") -===================== -Clones supported: - Tomstar license ("sidearmr") - Japanese version ("sidearjp") - -Known issues: -- The blinking star background is missing. - - - -Silkworm ("silkworm") -===================== -On startup, press the 2P start button to use the test mode. - -Clones supported: - alternate version, with a custom sound CPU. It also has the two coin inputs - swapped. ("silkwrm2") - - - -The Simpsons ("simpsons") -========================= -The first time you start the game, you'll get an EEPROM error. Keep F2 pressed -and hit F3 to initialize it. -To enter service mode, hit F2 while the game is in attract mode. - - - -Sinistar ("sinistar") -===================== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - -Clones supported: - older version, allegedly from a prototype machine that was displayed at the - 1982 AMOA show in Las Vegas ("sinista1") - revision 2 ("sinista2") - - - -Slap Fight ("slapfigh") -======================= -Clones supported: - Japanese bootleg ("slapbtjp") - English bootleg ("slapbtuk") - -Known issues: -- Due to protection, the original version doesn't work. Use one of the - bootlegs instead. -- Scrolling is jerky. -- Music tempo is too slow. - - - -Sly Spy ("slyspy") -================== -Clones supported: - alternate version (earlier) with one single different byte. ("slyspy2") - - - -Snow Bros ("snowbros") -====================== -Clones supported: - alternate version, probably earlier ("snowbroa") - -In snowbroa, you sometimes get a green potion that makes you invincible for a -few seconds (during which you can pass through walls and destroy any enemies -you touch). I looked at the GFX for this set vs snowbros and it appears that -only the snowbroa set has it. - - - -Space Attack ("sspaceat") -========================= -Note that this is NOT the same as "Space Attack II", which runs on Space -Invaders hardware. - -Known issues: -- dip switches not verified. The game plays only in cocktail mode. - - - -Space Duel ("spacduel") -======================= -Press "2" to choose level, the game won't start otherwise. - - - -Space Dungeon ("sdungeon") -========================== -Keep F2 pressed to enter test mode, then F1 to advance to the next test. - -There are no dip switches, press F1 to enter the service mode, then - F1 Next screen - F2 Next line - F5 Up - F6 Down - -The first time you run the game, it will ask the language. You can use F1 to -proceed through all the configuration screens, or just reset (F3). -To change the language afterwards, delete the SDUNGEON.HI file from the HI -directory and re-run the program. - -Known issues: -- The test mode works only the first time you run the game. To make it work - again you have to delete SDUNGEON.HI. -- At game over, you are sent back to service mode. - - - -Space Firebird ("spacefb") -========================== -Known issues: -- Red screen "flash" when you die is not supported -- Background star field not supported. It is NOT a Galaxians type star field -- The bullet color is wrong - -Bugs which aren't: -- The sprites/characters don't use transparency in the real game. This is - not a bug - - - -Space Invaders Deluxe ("invdelux") -================================== -Arrows Move around -CTRL Fire -T Activate Tilt -N Reset the name of the person with the highest score to MIDWAY - -Preset mode: - -Space Invaders Deluxe provided a way the operator could -enter his/her name each time the machine was turned on. - -HIGH SCORE AND NAME DISPLAY PROGRAM - -1. Turn preset mode ON in the DIP switch screen -2. Insert one credit -3. Depress one player select button 'Preset Mode' will be displayed on screen -4. Depress one player select button again to increase score until previous - high-score is beaten. - - Note: - If you press the two player select button you can skip the starting - level as well. - -5. Depress fire button to start game. After all bases have been destroyed - the alphabet will be displayed on screen. A new name may now be entered. -6. Turn preset mode OFF in the DIP switch screen to re-establish game mode. - - - -Spectar ("spectar") -=================== -Revision 3 - -Clones supported: - revision 1 ?? ("spectar1") - - - -Speed Ball ("speedbal") -======================= -Keep 3 and 4 pressed during boot to enter service mode. - - - -Splat ("splat") -=============== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - - - -Sprint 1 ("sprint1") -==================== -Clones supported: - Sprint 2 ("sprint2") - -Known issues: -- Dip switches in Sprint 1 are wrong - - - -Spy Hunter ("spyhunt") -====================== -MCR/III hardware variant -Press F2 before initial screen to configure - -UP Accelerate -DOWN Decelerate -LEFT Steer left -RIGHT Steer right -CTRL Machine guns -ALT Smoke screen -SPACE Weapons van -SHIFT Oil slick -BUTTON5 Missiles -ENTER Toggle gearshift (note you can't start in high gear) - - - -Stargate ("stargate") -===================== -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - - - -Star Jacker ("starjack") -======================== -Clones supported: - Stern copyright ("starjacs") - -The Stern version allows to play both in "multi" and "single" mode. The Sega -version is hardcoded for "multi" mode. - -Known issues: -- Sprites in the Stern version might be wrong - I'm using the ROMs from the - Sega version because the other ones were bad. - - - -Star Wars ("starwars") -====================== -The dip switches only have effect when the EEPROM is invalid (that is, when -there is no starwars.hi file). Afterwards, settings can be changed in the -service menu. - -Known issues: -- Sometimes, after the TIE level, instead of zooming into the Death Star the - game sits there endlessly. - - - -Strategy X ("stratgyx") -======================= -Stern version - -Clones supported: - bootleg, probably of the Konami version, different ("stratgyb") - -Known issues: -- Dip switches not verified, especially in the bootleg version - - - -Subs ("subs") -============= -This game uses two monitors, one for each player, aimed away from each -other. The emulation displays both monitors side by side on the screen. A -lot of the challenge is lost when you can see both monitors. Unfortunately, -there is no other simple solution to allow 2-player support on a -single-monitor computer. Also, Subs is mildly dependent on its overlay. -Without the overlay, it might not be obvious that the playfield is circular -in shape, and the blinking white box actually illuminates a box labelled -"Sonar". - - - -Sunset Riders ("ssriders") -========================== -To enter service mode, hit F2 while the game is in attract mode. Make sure to -go in the game options and enable stereo sound. - - - -Super Basketball ("sbasketb") -============================= -Hold down Start 1 & Start 2 keys to enter test mode on start up; -then use Start 1 to advance to the next screen - - - -Super Cobra ("scobra") -====================== -Stern copyright. - -Clones supported: - Konami copyright ("scobrak") - bootleg version ("scobrab") - -Known issues: -- The star background is probably not entirely accurate. Also, maybe it should - be clipped at the top and bottom of the screen? - - - -Pang ("pang") -==================== -Clones supported: - bootleg version ("pangb") - Buster Bros ("bbros") - -The bootleg version contains opcodes and data decrypted separately, plus a few -patches here and there. They disabled sound in attract mode (there isn't a -setting to do that, unlike Buster Bros), changed the lives option from 1,2,3,4 -to 1,3,4,6, and changed the copyright year from 1989 to 1990. - - - -Super Qix ("superqix") -====================== -Clones supported: - bootleg version ("sqixbl") - -Known issues: -- Speed is wrong (much too slow) -- Sprite flipping is not emulated. -- Due to protection, the original version doesn't work. Use the bootleg instead. - - - -Super Zaxxon ("szaxxon") -======================== -Known issues: -- Several people complained that it runs too fast. This is not the case: a real - board has been verified and it behaves the same. It's just insanely - difficult. - - - -T.M.N.T. 2 ("tmnt2") -==================== -To enter service mode, hit F2 while the game is in attract mode. Make sure to -go in the game options and enable stereo sound. - - - -Tempest ("tempest") -=================== -Clones supported: - version 2 ("tempest2") - version 1 ("tempest1") - Tempest Tubes ("temptube") - -Known issues: -- Several people complained that mouse control is reversed. This is not the - case. The more obvious place where this can be seen is the level selection - screen at the beginning: move the mouse right, the block goes right. - Anyway, if you don't like the key assignments, you can change them. - - - -Terra Cresta ("terracre") -========================= -Clones supported: - alternate version using YM2203 instead of YM3526 ("terracra") - - - -Tetris (Atari) ("atetris") -========================== -To start a game, press the ROTATE button. - -Clones supported: - alternate version ("atetrisa") - bootleg version ("atetrisb") - cocktail version ("atetcktl") - cocktail version, probably earlier ("atetckt2") - - - -Three Stooges ("3stooges") -========================== -Up to 3 players can play at once. After inserting coins, -Button 1 Player 1 = start a 1 player game -Button 1 Player 2 = start a 2 players game -Button 1 Player 3 = start a 3 players game - - - -Tiger Heli ("tigerh") -===================== -Clones supported: - alternate version ("tigerh2") - bootleg 1 ("tigerhb1") - bootleg 2 ("tigerhb2") - -Known issues: -- The original versions don't work, use the bootlegs. - - - -Tin Star,The ("tinstar") -======================== -Known issues: -- The aiming dial is emulated using a dual joystick setup. -- There might be some misbehaviours caused by imperfect emulation of the 68705 - protection. -- Sprite priority glitches. - - - -Toki ("toki") -============= -Known issues: -- The title screen is wrong - - - -Tokio ("tokio") -=============== -Clones supported: - bootleg version ("tokiob") - -Known issues: -- The original version doesn't work due to protection. Use the bootleg. - - - -Tomahawk 777 ("tomahawk") -========================= -Revision 1 - -Clones supported: - Revision 5 ("tomahaw5") - -Note: the two revisions are quite different! - - - -Track & Field ("trackfld") -========================== -Clones supported: - Centuri license ("trackflc") - Hyper Olympic ("hyprolym") - Hyper Olympic bootleg which uses a 6802 + ADPCM samples instead of the - VLM5030 speech chip ("hyprolyb") - - - -Turbo Force ("turbofrc") -======================== -Known issues: -- The front scrolling layer is completely wrong. You can see the title and - American flag correctly only due to a hack. Everything else is wrong. The - only explanation I have for this is a missing gfx ROM. - To toggle the front layer off and on, press the space bar. You'll need to - in later levels otherwise you won't see the background and some enemies. - - - -Turkey Shoot ("tshoot") -======================= -The first time you run the game, it will say "factory settings restored". -Press F2 to proceed. - -F2 tests -F1+F2 bookkeeping/setup - - - -Turtle Ship ("turtship") -======================== -Known issues: -- dip switches not mapped -- part of the gfx tiles are not used by the video driver, therefore the - background is probably wrong in later levels. - - - -Turtles ("turtles") -=================== -Clones supported: - Turpin ("turpin") - 600 (Konami version with different gameplay) ("600") - -Known issues: -- Colors in 600 might be wrong. - - - -Twin Cobra ("twincobr") -======================= -Clones supported: - Romstar license ("twincobu") - Kyukyoku Tiger ("ktiger") - -Known issues: -- Most enemies appear already destroyed. This is probably caused by the - incomplete emulation of the protection microcontroller. -- Kyukyoku Tiger doesn't boot. - - - -Two Tigers ("twotiger") -======================= -Known issues: -- Two players not well supported - - - -Us vs Them ("usvsthem") -======================= -This is a laser disc game; it is playable, but of course you can't see the -backgrounds that were stored on the laser disc. - - - -Venture ("venture") -=================== -3+F3 Test mode - -Clones supported: - alternate version ("venture2") - version 4 (the other two are version 5) ("venture4") - - - -Warlords ("warlords") -===================== -This game was designed to run either in a cocktail cabinet with color monitor, -or in an upright cabinet with b/w monitor, mirror and painted background. -By default, the driver runs in cocktail mode. - - - -Who Dunit ("whodunit") -====================== -Keep button 1 pressed at boot to skip the checks. -Keep start pressed to enter service mode. - - - -Wizard of Wor ("wow") -===================== -The original machine had a special joystick which could be moved either -partially or fully in a direction. Pushing it slightly would turn around the -player without making it move. The emulator assumes that you are always -pushing the joystick fully, to simulate the "half press" you can press Alt. - - - -Wonder Boy ("wboy") -=================== -Clones supported: - alternate version - harder! ("wboy2") - another version with different encryption ("wboy3") - another version with different encryption. The music in this version is - higher pitched. ("wboy4") - same as above, but not encrypted. The sound ROM is the "standard" one, not - the higher pitched one. ("wboy4u") - unencrypted version, different from the others - earlier? ("wboyu") - Wonder Boy Deluxe - this seems to be a bootleg of wboy4, it is not encrypted - but is almost identical apart from removed ROM checksums and the "Energy - Consumption" dip switch. ("wbdeluxe") - -Known issues: -- I haven't decoded wboy3 yet. - - - -World Tennis ("wtennis") -======================== -On startup, you have to reset the game (F3) to make it exit service mode. - - - -Xevious ("xevious") -=================== -Clones supported: - Atari license ("xeviousa") - Super Xevious ("sxevious") - -Known issues: -- Sometimes explosion sprites appear at the top of the screen. - - - -Xybots ("xybots") -================= -The start button is also the Zap button. - - - -Yie Ar Kung Fu ("yiear") -======================== -Known issues: -- Speech is not emulated correctly (and samples are not supported) - - - -Zaxxon ("zaxxon") -================= -Use F2 to enter test mode, then 1 to advance from one test to the following. - - - -Zoo Keeper ("zookeep") -====================== -Keep F2 pressed to enter test mode, then F1 to advance to the next test. - -There are no dip switches, press F1 to enter the service mode, then - F1 Next screen - F2 Next line - F5 Up - F6 Down - -The first time you run the game, it will ask the location. You can change the -name using F5/F6 and F2, then F1 to proceed through all the configuration -screens, or just reset (F3). +This is the complete list of games supported by MAME 0.36 RELEASE CANDIDATE 2 (Mar 13 2000) +Variants of the same game are not included, you can use the -listclones command +to get a list of the alternate versions of a given game. + +The list is generated automatically and is not 100% accurate, particularly in +the "Screen Flip" column. Please let us know of any errors you find so we can +correct them. + +The meanings of the columns are as follows: +Working - "No" means that the emulation has shortcomings that cause the game + not to work correctly. This can be anywhere from just showing a black screen + to to being playable with major problems. +Correct Colors - "Yes" means that colors should be identical to the original, + "Close" that they are very similar but wrong in places, "No" that they are + completely wrong. In some cases, we were not able to find the color PROMs of + the game. Those PROMs will be reported as "NO GOOD DUMP KNOWN" on startup, + and the game will have wrong colors. The game is still reported as "Yes" in + this column, because the code to handle the color PROMs is in the driver and + if you provide them colors will be correct. +Sound - "Partial" means that sound support is either incomplete or not entirely + accurate. Note that, due to analog circuitry which is difficult to emulate, + sound may be significantly different from the real board. A common case is + the presence of low pass filters that make the real board sound less harsh + than the emulation. +Screen Flip - A large number of games have a dip switch setting for "Cocktail" + cabinet, meaning that the players sit in front of each other, and the screen + is flipped when player 2 is playing. Some games also ahve a "Flip Screen" dip + switch. Those need special support in the driver, whcih is missing in many + cases. +Internal Name - This is the unique name that should be specified on the command + line to run the game. ROMs must be placed in the ROM path, either in a .zip + file or in a subdirectory of the same name. The former is suggested, because + the files will be identified by their CRC instead of requiring specific + names. + ++----------------------------------+-------+-------+-------+-------+----------+ +| | |Correct| |Screen | Internal | +| Game Name |Working|Colors | Sound | Flip | Name | ++----------------------------------+-------+-------+-------+-------+----------+ +| '88 Games | Yes | Yes | Yes | Yes | 88games | +| 005 | Yes | Yes | No | Yes | 005 | +| 10 Yard Fight | Yes | Yes | Yes | Yes | yard | +| 1941 - Counter Attack | Yes | Yes | Yes | Yes | 1941 | +| 1942 | Yes | Yes | Yes | Yes | 1942 | +| 1943 - The Battle of Midway | Yes | Yes | Yes | No | 1943 | +| 1943 Kai | Yes | Yes | Yes | No | 1943kai | +| 2020 Super Baseball | Yes | Yes | Yes | Yes | 2020bb | +| 3 Count Bout / Fire Suplex | Yes | Yes | Yes | Yes | 3countb | +| 4 Player Bowling | Yes | Yes | Yes | Yes | bowler | +| 4-D Warriors | Yes | Yes | Yes | No | 4dwarrio | +| 64th. Street - A Detective Story | Yes | Yes | Yes | Yes | 64street | +| 720 Degrees | Yes | Yes | Yes | Yes | 720 | +| Act-Fancer Cybernetick Hyper Weap| Yes | Yes | Yes | Yes | actfancr | +| Adventure Quiz 2 Hatena Hatena no| Yes | Yes | Yes | Yes | hatena | +| Aero Fighters | Yes | Yes | Yes | No | aerofgt | +| Aero Fighters 2 / Sonic Wings 2 | Yes | Yes | Yes | Yes | sonicwi2 | +| Aero Fighters 3 / Sonic Wings 3 | Yes | Yes | Yes | Yes | sonicwi3 | +| Aggressors of Dark Kombat / Tsuuk| Yes | Yes | Yes | Yes | aodk | +| Air Buster | Yes | Yes | Yes | Yes | airbustr | +| Air Wolf | Yes | Yes | Yes | Yes | airwolf | +| Ajax | Yes | Yes | Yes | Yes | ajax | +| Alex Kidd | No(1) | Yes | Yes | Yes | alexkidd | +| Ali Baba and 40 Thieves | Yes | Yes | Yes | Yes | alibaba | +| Alien Storm | No(1) | Yes | Yes | Yes | astorm | +| Alien Syndrome | Yes | Yes | Yes | Yes | aliensyn | +| Aliens | Yes | Yes | Yes | Yes | aliens | +| Alpha Mission II / ASO II - Last | Yes | Yes | Yes | Yes | alpham2 | +| Alpine Ski | Yes | Yes | Yes | Yes | alpine | +| Altered Beast | Yes | Yes | Yes | Yes | altbeast | +| Amazing Maze | Yes | Yes | Yes(2)| Yes | maze | +| Ambush | Yes | Yes | Yes | Yes | ambush | +| American Horseshoes | No | Yes | Yes | Yes | horshoes | +| Amidar | Yes | Yes | Yes | Yes | amidar | +| Andro Dunos | Yes | Yes | Yes | Yes | androdun | +| Anteater | Yes | Yes | Yes | Yes | anteater | +| APB - All Points Bulletin | Yes | Yes | Yes | Yes | apb | +| Appoooh | Yes | Yes | Yes | Yes | appoooh | +| Arabian | Yes | Close | Yes | No | arabian | +| Arcade Classics | Yes | Yes | Yes | Yes | arcadecl | +| Arch Rivals | Yes | Yes | Yes | Yes | archrivl | +| Ark Area | Yes | Yes | Yes | Yes | arkarea | +| Arkanoid | Yes | Yes | Yes | Yes | arkanoid | +| Arkanoid - Revenge of DOH | Yes | Yes | Yes | Yes | arkanoi2 | +| Arm Wrestling | Yes | Yes | Yes | Yes | armwrest | +| Armed Formation | Yes | Yes | Yes | No | armedf | +| Armor Attack | Yes | Yes | Yes(2)| Yes | armora | +| Armored Car | Yes | Yes | Yes | Yes | armorcar | +| Art of Fighting / Ryuuko no Ken | Yes | Yes | Yes | Yes | aof | +| Art of Fighting 2 / Ryuuko no Ken| Yes | Yes | Yes | Yes | aof2 | +| Art of Fighting 3 - The Path of t| Yes | Yes | Yes | Yes | aof3 | +| ASO - Armored Scrum Object | Yes | Yes |Partial| Yes | aso | +| Assault | Yes | Yes | Yes | Yes | assault | +| Asteroids | Yes | Yes | Yes | Yes | asteroid | +| Asteroids Deluxe | Yes | Yes | Yes | Yes | astdelux | +| Astro Blaster | Yes | Yes | Yes(2)| Yes | astrob | +| Astro Fighter | Yes | Yes | Yes(2)| Yes | astrof | +| Astro Invader | Yes | Yes | Yes(2)| Yes | astinvad | +| Astro Laser | Yes | Yes | Yes(2)| Yes | astlaser | +| Astyanax, The | Yes | Yes | Yes | Yes | astyanax | +| Atari Baseball | Yes | Yes | Yes | Yes | abaseb | +| Atari Football | Yes | Yes | Yes | Yes | atarifb | +| Atari Soccer | Yes | Yes | Yes | Yes | soccer | +| Athena | Yes | Yes | Yes | No | athena | +| Atomic Point | Yes | Yes | No | Yes | atomicp | +| Aurail | Yes | Yes | Yes | Yes | aurail | +| Avalanche | Yes | Yes | Yes | Yes | avalnche | +| Avengers | No | No | Yes | Yes | avengers | +| Avenging Spirit | Yes | Yes | Yes | Yes | avspirit | +| Aztarac | Yes | Yes | Yes | Yes | aztarac | +| Azurian Attack | Yes | Yes | Yes | Yes | azurian | +| Bad Dudes vs. Dragonninja | Yes | Yes | Yes | No | baddudes | +| Bad Lands | Yes | Yes | Yes | Yes | badlands | +| Bagman | Yes | Yes |Partial| Yes | bagman | +| Bakatonosama Mahjong Manyuki | Yes | Yes | Yes | Yes | bakatono | +| Balloon Bomber | Yes | Yes | Yes(2)| Yes | ballbomb | +| Baluba-louk no Densetsu | Yes | Close | Yes | Yes | baluba | +| Bandido | Yes | Yes |Partial| Yes | bandido | +| Bank Panic | Yes | Yes | Yes | Yes | bankp | +| Baraduke | Yes | Yes | Yes | No | baraduke | +| Barrier | Yes | Yes | Yes(2)| Yes | barrier | +| Baseball Stars 2 | Yes | Yes | Yes | Yes | bstars2 | +| Baseball Stars Professional | Yes | Yes | Yes | Yes | bstars | +| Basketball | Yes | Yes | Yes | Yes | bsktball | +| Batman | Yes | Yes | Yes | Yes | batman | +| Batsugun | Yes | Yes | No | Yes | batsugun | +| Battlantis | Yes | Yes | Yes | Yes | battlnts | +| Battle Chopper | Yes | Yes | Yes | No | bchopper | +| Battle Flip Shot | Yes | Yes | Yes | Yes | flipshot | +| Battle Lane Vol. 5 | Yes | No | Yes | No | battlane | +| Battle of Atlantis | Yes | Yes | Yes | Yes | atlantis | +| Battle Zone | Yes | Yes | Yes | Yes | bzone | +| Battle-Road, The | Yes | Yes | Yes | Yes | battroad | +| Bay Route | Yes | Yes | Yes | Yes | bayroute | +| Bells & Whistles | Yes | Yes | Yes | Yes | blswhstl | +| Beraboh Man | Yes | Yes | Yes | Yes | berabohm | +| Berlin Wall, The | Yes | No | No | Yes | berlwall | +| Bermuda Triangle | Yes | Yes | Yes | No | bermudat | +| Berzerk | Yes | Yes | Yes(2)| Yes | berzerk | +| Big Pro Wrestling!, The | Yes | Yes | Yes | Yes | bigprowr | +| Big Striker | Yes | Yes | Yes | Yes | bigstrik | +| Bio Attack | Yes | Yes | Yes | Yes | bioatack | +| Bionic Commando | Yes | Yes | Yes | Yes | bionicc | +| Birdie King 2 | Yes | Yes | Yes | Yes | bking2 | +| Black Hole | Yes | Yes | Yes | Yes | blkhole | +| Black Tiger | Yes | Yes | Yes | No | blktiger | +| Black Widow | Yes | Yes | Yes | Yes | bwidow | +| Blade Master | Yes | Yes | No | No | bmaster | +| Blades of Steel | Yes | Yes |Partial| Yes | bladestl | +| Blast Off | Yes | Yes | Yes | Yes | blastoff | +| Blasted | Yes | Yes | Yes | Yes | blasted | +| Blaster | Yes | Yes | Yes | Yes | blaster | +| Blasteroids | Yes | Yes | Yes | Yes | blstroid | +| Blasto | Yes | Yes |Part(2)| No | blasto | +| Blazer | Yes | Yes | Yes | Yes | blazer | +| Blazing Star | Yes | Yes | Yes | Yes | blazstar | +| Block Block | Yes | Yes | Yes | Yes | block | +| Block Gal | No | Yes | Yes | No | blockgal | +| Block Hole | Yes | Yes | Yes | Yes | blockhl | +| Block Out | Yes | Yes | Yes | Yes | blockout | +| Blockade | Yes | Yes |Part(2)| No | blockade | +| Blood Bros. | Yes | Yes | Yes | Yes | bloodbro | +| Blue Print | Yes | Yes | Yes | Yes | blueprnt | +| Blue Shark | Yes | Yes | Yes | Yes | blueshrk | +| Blue's Journey / Raguy | Yes | Yes | Yes | Yes | bjourney | +| Body Slam | Yes | Yes | Yes | Yes | bodyslam | +| Bogey Manor | Yes | Close | Yes | No | bogeyman | +| Bomb Bee | Yes | Yes | Yes | No | bombbee | +| Bomb Jack | Yes | Yes | Yes | Yes | bombjack | +| Bombjack Twin | Yes | Yes | Yes | Yes | bjtwin | +| Boot Hill | Yes | Yes | Yes(2)| Yes | boothill | +| Bosconian | Yes | Yes | Yes(2)| Yes | bosco | +| Bottom of the Ninth | Yes | Yes | Yes | Yes | bottom9 | +| Boulder Dash / Boulder Dash Part | Yes | Yes | Yes | No | bouldash | +| Bowl-O-Rama | Yes | Yes | Yes | Yes | bowlrama | +| Boxing Bugs | Yes | Close | Yes(2)| Yes | boxingb | +| Brain | Yes | Yes | Yes | No | brain | +| Break Thru | Yes | Yes | Yes | Yes | brkthru | +| Breakers | Yes | Yes | Yes | Yes | breakers | +| Bubble Bobble | Yes | Yes | Yes | No | bublbobl | +| Bubbles | Yes | Yes | Yes | Yes | bubbles | +| Burger Time | Yes | Yes | Yes | Yes | btime | +| Burnin' Rubber | Yes | Yes | Yes | Yes | brubber | +| Burning Fight | Yes | Yes | Yes | Yes | burningf | +| Burning Force | Yes | Yes | Yes | Yes | burnforc | +| Cabal | No(1) | Yes |Partial| No | cabal | +| Cachat | Yes | Yes | Yes | Yes | cachat | +| Cadillacs and Dinosaurs | Yes | Yes | Yes | Yes | dino | +| Calipso | Yes | Yes | Yes | Yes | calipso | +| Canyon Bomber | Yes | Yes | No | Yes | canyon | +| Capcom Baseball | Yes | Yes | Yes | Yes | cbasebal | +| Capcom Bowling | Yes | Yes | Yes | Yes | capbowl | +| Capcom World | Yes | Yes | Yes | Yes | cworld | +| Capcom World 2 | Yes | Yes | Yes | Yes | cworld2j | +| Captain Commando | Yes | Yes | Yes | Yes | captcomm | +| Captain Silver | Yes | Yes | Yes | No | csilver | +| Carnival | Yes | Yes | Yes | Yes | carnival | +| Carrier Air Wing | Yes | Yes | Yes | Yes | cawing | +| Caveman Ninja | Yes | Yes | Yes | Yes | cninja | +| Centipede | Yes | Yes | Yes | Yes | centiped | +| Challenger | Yes | Yes | Yes | Yes | challeng | +| Champion Baseball | Yes | Yes | Yes | Yes | champbas | +| Champion Baseball II | No | Yes | Yes | Yes | champbb2 | +| Champion Wrestler | Yes | Yes | No | Yes | champwr | +| Championship Sprint | Yes | Yes | Yes | Yes | csprint | +| Changes | Yes | Yes | Yes | Yes | changes | +| Checkman | Yes | Yes | Yes | Yes | checkman | +| Checkmate | Yes | Yes | Yes(2)| Yes | checkmat | +| Cheeky Mouse | Yes | No |Partial| Yes | cheekyms | +| Chelnov - Atomic Runner | Yes | Yes | Yes | No | chelnov | +| Cheyenne | Yes | Yes | Yes | Yes | cheyenne | +| Chibi Marukochan Deluxe Quiz | Yes | Yes | Yes | Yes | marukodq | +| Chicken Shift | Yes | Yes | Yes | Yes | cshift | +| Chiller | Yes | Yes | Yes | Yes | chiller | +| Chimera Beast | Yes | Yes | Yes | Yes | chimerab | +| Choplifter | No(1) | Yes | Yes | No | chplft | +| Chopper I | Yes | Yes |Partial| No | chopper | +| Chuka Taisen | Yes | Yes | Yes | Yes | chukatai | +| Circus | Yes | Yes |Partial| Yes | circus | +| Circus Charlie | Yes | Yes | Yes | Yes | circusc | +| Cisco Heat | Yes | Yes | Yes | Yes | cischeat | +| City Connection | Yes | Yes | Yes | Yes | citycon | +| Clay Pigeon | Yes | Yes | Yes | Yes | claypign | +| Cloak & Dagger | Yes | Yes | Yes | No | cloak | +| Cloud 9 | Yes | Yes | Yes | No | cloud9 | +| Clowns | Yes | Yes | Yes(2)| Yes | clowns | +| Cobra-Command | Yes | Yes | Yes | No | cobracom | +| Colony 7 | Yes | Yes | Yes | Yes | colony7 | +| Combat | Yes | Yes | Yes | Yes | combat | +| Combat School | Yes | Yes | Yes | Yes | combasc | +| Combatribes, The | Yes | Yes | Yes | No | ctribe | +| Commando | Yes | Yes | Yes | Yes | commando | +| Commando | Yes | Yes | Yes | Yes | commsega | +| Comotion | Yes | Yes |Part(2)| No | comotion | +| Congo Bongo | Yes | Yes | Yes(2)| Yes | congo | +| Contra | Yes | Yes | Yes | Yes | contra | +| Cop 01 | Yes | Close | Yes | Yes | cop01 | +| Cops'n Robbers | Yes | Yes | No | Yes | copsnrob | +| Cosmic Alien | Yes | Yes | No | Yes | cosmica | +| Cosmic Avenger | Yes | Yes | Yes | Yes | cavenger | +| Cosmic Chasm | Yes | Yes | Yes | Yes | cchasm | +| Cosmic Guerilla | Yes | Yes | Yes(2)| Yes | cosmicg | +| Cosmo Gang the Video | Yes | Yes | Yes | Yes | cosmogng | +| Crackshot | Yes | Yes | Yes | Yes | cracksht | +| Crash | Yes | Yes |Partial| Yes | crash | +| Crater Raider | Yes | Yes | Yes | Yes | crater | +| Crazy Balloon | Yes | Yes |Partial| Yes | crbaloon | +| Crazy Climber | Yes | Yes | Yes | Yes | cclimber | +| Crazy Climber 2 | Yes | Yes | Yes | No | cclimbr2 | +| Crazy Kong | Yes | Yes | Yes | Yes | ckong | +| Crime Fighters | Yes | Yes | Yes | Yes | crimfght | +| Crossbow | Yes | Yes | Yes | Yes | crossbow | +| Crossed Swords | Yes | Yes | Yes | Yes | crsword | +| Crude Buster | Yes | Yes | Yes | Yes | cbuster | +| Crush Roller | Yes | Yes | Yes | Yes | crush | +| Crystal Castles | Yes | Yes | Yes | Yes | ccastles | +| Cuebrick | Yes | Yes | Yes | Yes | cuebrick | +| Curve Ball | Yes | Yes | Yes | Yes | curvebal | +| Cutie Q | Yes | Yes | Yes | No | cutieq | +| Cybattler | Yes | Yes | Yes | Yes | cybattlr | +| Cyber-Lip | Yes | Yes | Yes | Yes | cyberlip | +| Cyberball | Yes | Yes | Yes | Yes | cyberbal | +| D-Con | Yes | Yes | Yes | No | dcon | +| D-Day | Yes | Close | Yes | Yes | dday | +| DakkoChan Jansoh | No | Yes | Yes | No | dakkochn | +| Dangar - Ufo Robo | Yes | Yes | Yes | Yes | dangar | +| Dangerous Seed | Yes | Yes | Yes | Yes | dangseed | +| Dark Planet | No | Yes | Yes | Yes | darkplnt | +| Dark Seal | Yes | Yes | Yes | No | darkseal | +| Darwin 4078 | Yes | Yes | Yes | Yes | darwin | +| Datsun 280 Zzzap | Yes | Yes | Yes | Yes | 280zzzap | +| Dead Eye | Yes | Yes | Yes | Yes | deadeye | +| Defend the Terra Attack on the Re| Yes | Yes | Yes | Yes | redufo | +| Defender | Yes | Yes | Yes | Yes | defender | +| Demolition Derby | Yes | Yes | Yes | Yes | destderb | +| Demon | Yes | Yes | Yes(2)| Yes | demon | +| Demon's World / Horror Story | Yes | Yes | Yes | Yes | demonwld | +| Depthcharge | Yes | Yes | Yes | Yes | depthch | +| Desert Gun | Yes | Yes | Yes | Yes | desertgu | +| Devastators | Yes | Yes | Yes | Yes | devstors | +| Devil Fish | Yes | Yes | Yes | Yes | devilfsh | +| Devil World | Yes | Yes | Yes | Yes | devilw | +| Devil Zone | Yes | Yes |Partial| Yes | devzone | +| Diamond Run | Yes | Yes | Yes | Yes | diamond | +| Dig Dug | Yes | Yes | Yes | Yes | digdug | +| Dig Dug II | Yes | Yes | Yes | Yes | digdug2 | +| Digger | Yes | Yes | No | Yes | digger | +| Disco No.1 | Yes | Yes | Yes | Yes | disco | +| Discs of Tron | Yes | Yes | Yes | Yes | dotron | +| Do! Run Run | Yes | Yes | Yes | Yes | dorunrun | +| Dog Fight | Yes | Close | Yes | Yes | dogfight | +| Dog Patch | Yes | Yes | Yes(2)| Yes | dogpatch | +| Dogyuun | Yes | Yes | No | Yes | dogyuun | +| Dokaben | Yes | Yes | Yes | Yes | dokaben | +| Domino Man | Yes | Yes | Yes | Yes | domino | +| Dominos | Yes | Yes | No | Yes | dominos | +| Donkey Kong | Yes | Yes | Yes(2)| Yes | dkong | +| Donkey Kong 3 | Yes | Yes | Yes | Yes | dkong3 | +| Donkey Kong Junior | Yes | Yes | Yes(2)| Yes | dkongjr | +| Dottori Kun | Yes | Yes | Yes | Yes | dotrikun | +| Double Dragon | Yes | Yes | Yes | Yes | doubledr | +| Double Dragon | No(1) | Yes | Yes | Yes | ddragon | +| Double Dragon 3 - The Rosetta Sto| Yes | Yes | Yes | No | ddragon3 | +| Double Dragon II - The Revenge | Yes | Yes | Yes | Yes | ddragon2 | +| Double Dribble | Yes | Yes | Yes | No | ddribble | +| Dr. Toppel's Tankentai | Yes | Yes | Yes | Yes | drtoppel | +| Dragon Breed | Yes | Yes | Yes | No | dbreed | +| Dragon Buster | Yes | Yes | Yes | No | drgnbstr | +| Dragon Saber | Yes | Yes | Yes | Yes | dsaber | +| Dragon Spirit | Yes | Yes | Yes | Yes | dspirit | +| Dream Shopper | Yes | Yes | Yes | Yes | dremshpr | +| Dream Soccer '94 | Yes | Yes | No | Yes | dsoccr94 | +| Dyger | Yes | Yes | Yes | No | dyger | +| Dynamite Duke | Yes | Yes | No | Yes | dynduke | +| Dynamite Dux | Yes | Yes | Yes | Yes | dduxbl | +| E-Swat | No(1) | Yes | Yes | Yes | eswat | +| Earth Defense Force | Yes | Yes | Yes | Yes | edf | +| Eight Man | Yes | Yes | Yes | Yes | eightman | +| Electric Yo-Yo, The | Yes | Yes | Yes | No | elecyoyo | +| Elevator Action | Yes | Yes | Yes | Yes | elevator | +| Eliminator | Yes | Yes | Yes(2)| Yes | elim2 | +| Empire City: 1931 | Yes | Yes | Yes | Yes | empcity | +| Empire Strikes Back, The | Yes | Yes | Yes | Yes | esb | +| End, The | Yes | Yes | Yes | Yes | theend | +| Enduro Racer | No(1) | Yes | Yes | Yes | enduror | +| Escape from the Planet of the Rob| Yes | Yes | Yes | Yes | eprom | +| Espial | Yes | Yes | Yes | No | espial | +| Exciting Soccer | Yes | Yes | Yes | No | exctsccr | +| Exed Exes | Yes | Yes | Yes | No | exedexes | +| Exerion | Yes | No | Yes | No | exerion | +| Express Raider | Yes | Yes | Yes | No | exprraid | +| Extermination | Yes | Yes | Yes | Yes | extrmatn | +| Exterminator | Yes | Yes | Yes | Yes | exterm | +| Extra Bases | Yes | No | Yes | Yes | ebases | +| Extra Innings | Yes | Yes | Yes(2)| Yes | einnings | +| Eyes | Yes | Yes | Yes | Yes | eyes | +| F-1 Dream | Yes | Yes | Yes | No | f1dream | +| F1 Grand Prix Star | Yes | Yes | Yes | Yes | f1gpstar | +| Face Off | Yes | Yes | Yes | Yes | faceoff | +| Fantasy | Yes | Yes |Partial| Yes | fantasy | +| Fantasy Zone | Yes | Yes | Yes | Yes | fantzone | +| Fast Lane | No | Close | Yes | Yes | fastlane | +| Faster, Harder, More Challenging | Yes | Yes | Yes | Yes | sqbert | +| Fatal Fury - King of Fighters / G| Yes | Yes | Yes | Yes | fatfury1 | +| Fatal Fury 2 / Garou Densetsu 2 -| Yes | Yes | Yes | Yes | fatfury2 | +| Fatal Fury 3 - Road to the Final | Yes | Yes | Yes | Yes | fatfury3 | +| Fatal Fury Special / Garou Denset| Yes | Yes | Yes | Yes | fatfursp | +| Fax | Yes | Yes |Partial| Yes | fax | +| Fight Fever / Crystal Legacy | Yes | Yes | Yes | Yes | fightfev | +| Fighting Golf | Yes | Yes | Yes | No | fitegolf | +| Fighting Hawk | Yes | Yes | No | Yes | fhawk | +| Fighting Soccer | Yes | Yes | Yes | No | ftsoccer | +| Final Fight | Yes | Yes | Yes | Yes | ffight | +| Final Round | Yes | Yes | Yes | Yes | fround | +| Finalizer - Super Transformation | Yes | Yes |Partial| No | finalizr | +| Finest Hour | Yes | Yes | Yes | Yes | finehour | +| Fire One | No | Yes | No | Yes | fireone | +| Fire Shark | Yes | Yes | No | Yes | fireshrk | +| Fire Trap | No(1) | Yes | Yes | Yes | firetrap | +| Flash Gal | Yes | Yes | Yes | Yes | flashgal | +| Flash Point | No(1) | Yes | Yes | Yes | fpoint | +| Flicky | Yes | Yes | Yes | No | flicky | +| Fly-Boy | No(1) | Yes | Yes | Yes | flyboy | +| Flying Shark | Yes | Yes | Yes | Yes | fshark | +| Food Fight | Yes | Yes | Yes | No | foodf | +| Football Frenzy | Yes | Yes | Yes | Yes | fbfrenzy | +| Forgotten Worlds | Yes | Yes | Yes | Yes | forgottn | +| Formation Z | No | Yes | Yes | No | formatz | +| Freeze | Yes | Yes | Yes | Yes | freeze | +| Frenzy | Yes | Yes | Yes(2)| Yes | frenzy | +| Frisky Tom | Yes | Yes | Yes | No | friskyt | +| Frogger | Yes | Yes | Yes | Yes | frogger | +| Frogs | Yes | Yes | No | Yes | frogs | +| Front Line | Yes | Yes | Yes | Yes | frontlin | +| Funky Bee | Yes | Yes | Yes | No | funkybee | +| Future Spy | Yes | Yes | Yes(2)| No | futspy | +| Galactic Warriors | Yes | Yes | Yes | Yes | gwarrior | +| Galaga | Yes | Yes | Yes(2)| Yes | galaga | +| Galaga '88 | Yes | Yes | Yes | Yes | galaga88 | +| Galaxian | Yes | Yes | Yes | Yes | galaxian | +| Galaxy Fight - Universal Warriors| Yes | Yes | Yes | Yes | galaxyfg | +| Galaxy Wars | Yes | Yes | Yes(2)| Yes | galxwars | +| Galivan - Cosmo Police | Yes | Yes | Yes | Yes | galivan | +| Gallop - Armed police Unit | Yes | Yes |Partial| No | gallop | +| Gals Panic | Yes | Yes | Yes | Yes | galpanic | +| Gang Busters | Yes | Yes | Yes | Yes | gbusters | +| Gang Wars | No(1) | Yes | Yes | No | gangwars | +| Gaplus | Yes | Yes | Yes(2)| No | gaplus | +| Gardia | No | Yes | Yes | No | gardia | +| Garyo Retsuden | Yes | Yes | Yes | No | garyoret | +| Gauntlet | Yes | Yes | Yes | Yes | gauntlet | +| Gauntlet II | Yes | Yes | Yes | Yes | gaunt2 | +| Gee Bee | Yes | Yes | Yes | Yes | geebee | +| Gemini Wing | Yes | Yes | Yes | No | gemini | +| Genpei ToumaDen | Yes | Yes | Yes | Yes | genpeitd | +| Ghost Pilots | Yes | Yes | Yes | Yes | gpilots | +| Ghosts'n Goblins | Yes | Yes | Yes | Yes | gng | +| Ghouls'n Ghosts | Yes | Yes | Yes | Yes | ghouls | +| Ghox | Yes | Yes | No | Yes | ghox | +| Gimme A Break | Yes | Yes | Yes | Yes | gimeabrk | +| Ginga NinkyouDen | Yes | Yes |Partial| Yes | ginganin | +| Gladiator | Yes | Yes | Yes | No | gladiatr | +| Glob, The | Yes | Yes | Yes | Yes | theglob | +| Go Go Mr. Yamaguchi / Yuke Yuke Y| Yes | Close | Yes | Yes | yamagchi | +| Goal! Goal! Goal! | Yes | Yes | Yes | Yes | goalx3 | +| Goalie Ghost | Yes | Yes | Yes | Yes | gghost | +| Goindol | Yes | Yes | Yes | Yes | goindol | +| Gold Medalist | No | Yes | Yes | No | goldmedl | +| Golden Axe | Yes | Yes | Yes | Yes | goldnaxe | +| Gondomania | Yes | Yes | Yes | No | gondo | +| Gorf | Yes | Close | Yes | Yes | gorf | +| Got-Ya | Yes | Yes | No | Yes | gotya | +| Gradius III | Yes | Yes | Yes | Yes | gradius3 | +| Gravitar | Yes | Yes | Yes | Yes | gravitar | +| Great 1000 Miles Rally | Yes | Yes | Yes | Yes | gtmr | +| Great Swordsman | Yes | Close | Yes | Yes | gsword | +| Green Beret | Yes | Yes | Yes | Yes | gberet | +| Gridiron Fight | Yes | Yes | Yes | Yes | gridiron | +| Grobda | Yes | Yes | Yes | Yes | grobda | +| Growl | Yes | Yes | Yes | No | growl | +| Guardian | No(1) | Yes | Yes | No | getstar | +| Guerrilla War | Yes | Yes | Yes | No | gwar | +| Guided Missile | Yes | Yes | Yes(2)| Yes | gmissile | +| Gun Dealer | Yes | Yes | Yes | Yes | gundealr | +| Gun Fight | Yes | Yes | Yes(2)| Yes | gunfight | +| Gun.Smoke | Yes | Yes | Yes | No | gunsmoke | +| Gunforce - Battle Fire Engulfed T| Yes | Yes | No | No | gunforce | +| Gururin | Yes | Yes | Yes | Yes | gururin | +| Guzzler | Yes | Yes | Yes | Yes | guzzler | +| Gypsy Juggler | Yes | Yes | Yes | Yes | gypsyjug | +| Gyrodine | Yes | Yes | Yes | Yes | gyrodine | +| Gyruss | Yes | Yes | Yes | Yes | gyruss | +| Hachoo! | Yes | Yes | Yes | Yes | hachoo | +| HAL21 | Yes | No | No | Yes | hal21 | +| Hammerin' Harry | Yes | Yes | Yes | No | hharry | +| Hang-On | Yes | Yes | Yes | Yes | hangon | +| Hard Hat | Yes | Yes |Partial| Yes | hardhat | +| Hat Trick | Yes | Yes | Yes | Yes | hattrick | +| Haunted Castle | Yes | Yes | Yes | No | hcastle | +| Head On | Yes | Yes | No | Yes | headon | +| Head On 2 | Yes | Yes | No | Yes | headon2 | +| Heavy Barrel | Yes | Yes | Yes | No | hbarrel | +| Heavy Metal | Yes | Yes | Yes | No | hvymetal | +| Heavyweight Champ | Yes | Yes | Yes | Yes | hwchamp | +| Heiankyo Alien | Yes | Yes | No | Yes | heiankyo | +| HeliFire | Yes | Yes | Yes | Yes | helifire | +| Hellfire | Yes | Yes | Yes | Yes | hellfire | +| Herbie at the Olympics | Yes | No | Yes | Yes | herbiedk | +| Hexa | Yes | Yes | Yes | Yes | hexa | +| High Impact Football | Yes | Yes | Yes | Yes | hiimpact | +| High Way Race | Yes | Yes | Yes | Yes | hwrace | +| Hippodrome | Yes | Yes | Yes | No | hippodrm | +| Hit 'n Miss | Yes | Yes | Yes | Yes | hitnmiss | +| Hoccer | Yes | Yes | Yes | Yes | hoccer | +| Hook | Yes | Yes | No | No | hook | +| Hopper Robo | Yes | Yes | Yes | Yes | hopprobo | +| Hopping Mappy | Yes | Yes | Yes | Yes | hopmappy | +| Hot Chase | Yes | Yes | Yes | Yes | hotchase | +| Hot Shocker | Yes | Yes | Yes | Yes | hotshock | +| Hunchback | Yes | No | Yes | Yes | hunchbkd | +| Hustle | Yes | Yes |Part(2)| No | hustle | +| Hustler, The | Yes | Yes | Yes | Yes | thehustl | +| Hydra | Yes | Yes | Yes | Yes | hydra | +| Hyper Sports | Yes | Yes | Yes | Yes | hyperspt | +| I'm Sorry | Yes | Yes | Yes | No | imsorry | +| I, Robot | Yes | Yes | Yes | No | irobot | +| Iga Ninjyutsuden | Yes | Yes | Yes | Yes | iganinju | +| Ikari III - The Rescue | Yes | Yes | Yes | No | ikari3 | +| Ikari Warriors | Yes | Yes | Yes | No | ikari | +| Image Fight | Yes | Yes | Yes | No | imgfight | +| In The Hunt | Yes | Yes | No | No | inthunt | +| Indiana Jones and the Temple of D| Yes | Yes | Yes | Yes | indytemp | +| Inferno | Yes | Yes |Partial| Yes | inferno | +| Insector X | Yes | Yes | Yes | Yes | insectx | +| Intrepid | Yes | Yes | Yes | Yes | intrepid | +| Invader's Revenge | Yes | Yes | Yes(2)| Yes | invrvnge | +| Invinco | Yes | Yes | Yes | Yes | invinco | +| Invinco / Deep Scan | Yes | Yes | Yes | Yes | invds | +| Invinco / Head On 2 | Yes | Yes | Yes | Yes | invho2 | +| Iron Horse | Yes | Yes | Yes | No | ironhors | +| Irritating Maze / Ultra Denryu Ir| Yes | Yes | Yes | Yes | irrmaze | +| Jack Rabbit | Yes | Yes | No | No | jackrabt | +| Jack the Giantkiller | Yes | Yes | Yes | Yes | jack | +| Jackal | Yes | Close | Yes | No | jackal | +| Jail Break | Yes | Yes | Yes | No | jailbrek | +| Journey | Yes | Yes |Partial| Yes | journey | +| Joust | Yes | Yes | Yes | Yes | joust | +| Joust 2 - Survival of the Fittest| Yes | Yes | Yes | Yes | joust2 | +| Joyful Road | Yes | No | Yes | Yes | joyfulr | +| Jr. Pac-Man | Yes | Yes | Yes | Yes | jrpacman | +| Jump Bug | Yes | Yes | Yes | Yes | jumpbug | +| Jump Coaster | Yes | Yes | Yes | Yes | jumpcoas | +| Jump Shot | No | Yes | Yes | Yes | jumpshot | +| Jumping Jack | Yes | Yes | Yes | Yes | jjack | +| Jungle King | Yes | Yes | Yes | Yes | junglek | +| Jungler | Yes | Yes | Yes | Yes | jungler | +| Juno First | Yes | Yes | Yes | Yes | junofrst | +| Jyanshin Densetsu - Quest of Jong| Yes | Yes | Yes | Yes | janshin | +| Kabuki Klash - Far East of Eden /| Yes | Yes | Yes | Yes | kabukikl | +| Kageki | Yes | Yes | Yes | Yes | kageki | +| Kaitei Takara Sagashi | Yes | Yes | Yes | Yes | kaitei | +| Kangaroo | Yes | Yes | Yes | Yes | kangaroo | +| Kaos | Yes | Yes | Yes | Yes | kaos | +| Karate Champ | Yes | Yes | Yes | No | kchamp | +| Karnov | Yes | Yes | Yes | No | karnov | +| Karnov's Revenge / Fighter's Hist| Yes | Yes | Yes | Yes | karnovr | +| Kick | Yes | Yes | Yes | Yes | kick | +| Kick and Run | Yes | Yes | Yes | Yes | kicknrun | +| Kick Off | Yes | Yes | Yes | Yes | kickoff | +| Kick Rider | Yes | Yes | Yes | Yes | kickridr | +| Kick Start Wheelie King | No | Yes | Yes | Yes | kikstart | +| Kicker | Yes | Yes | Yes | Yes | kicker | +| Kid Niki - Radical Ninja | Yes | Yes |Partial| Yes | kidniki | +| KiKi KaiKai | No | Yes | Yes | Yes | kikikai | +| Killer Comet | Yes | Yes | Yes | Yes | killcom | +| King & Balloon | Yes | Yes | Yes | Yes | kingball | +| King of Boxer | Yes | Yes | Yes | Yes | kingofb | +| King of Dragons, The | Yes | Yes | Yes | Yes | kod | +| King of Fighters '94, The | Yes | Yes | Yes | Yes | kof94 | +| King of Fighters '95, The | Yes | Yes | Yes | Yes | kof95 | +| King of Fighters '96, The | Yes | Yes | Yes | Yes | kof96 | +| King of Fighters '97, The | Yes | Yes | Yes | Yes | kof97 | +| King of Fighters '98 - The Slugfe| Yes | Yes | Yes | Yes | kof98 | +| King of the Monsters | Yes | Yes | Yes | Yes | kotm | +| King of the Monsters 2 - The Next| Yes | Yes | Yes | Yes | kotm2 | +| Kizuna Encounter - Super Tag Batt| Yes | Yes | Yes | Yes | kizuna | +| Klax | Yes | Yes | Yes | Yes | klax | +| Knights of the Round | Yes | Yes | Yes | Yes | knights | +| Knuckle Bash | Yes | Yes | No | Yes | kbash | +| Kodure Ookami | Yes | Yes | Yes | No | kodure | +| Konami GT | Yes | Yes | Yes | Yes | konamigt | +| Kozmik Kroozr | Yes | Yes | Yes | Yes | kroozr | +| Kram | Yes | Yes | Yes | No | kram | +| Krull | Yes | Yes | Yes | Yes | krull | +| Kung Fu Master | Yes | Yes | Yes | Yes | kungfum | +| Kyuukai Douchuuki | Yes | Yes | Yes | Yes | kyukaidk | +| Labyrinth Runner | No | Yes | Yes | Yes | labyrunr | +| Lady Bug | Yes | Yes | Yes | Yes | ladybug | +| Laguna Racer | Yes | Yes | Yes | Yes | lagunar | +| Lasso | Yes | Close |Partial| No | lasso | +| Last Blade / Bakumatsu Roman - Ge| Yes | Yes | Yes | Yes | lastblad | +| Last Blade 2 / Bakumatsu Roman - | Yes | Yes | Yes | Yes | lastbld2 | +| Last Duel | Yes | Yes | Yes | Yes | lastduel | +| Last Mission | Yes | Yes | Yes | No | lastmiss | +| Last Resort | Yes | Yes | Yes | Yes | lresort | +| Lazer Command | Yes | Yes | Yes | Yes | lazercmd | +| League Bowling | Yes | Yes | Yes | Yes | lbowling | +| Legend of Hero Tonma | Yes | Yes | Yes | No | loht | +| Legend of Kage, The | Yes | Yes | Yes | Yes | lkage | +| Legend of Makai | Yes | Yes | Yes | Yes | lomakai | +| Legend of Success Joe / Ashitano | Yes | Yes | Yes | Yes | legendos | +| Legend of the Valkyrie | Yes | Yes | Yes | Yes | valkyrie | +| Legendary Wings | Yes | Yes | Yes | Yes | lwings | +| Leprechaun | Yes | Yes | Yes | Yes | leprechn | +| Lethal Thunder | Yes | Yes | No | No | lethalth | +| Levers | Yes | Yes | Yes | Yes | levers | +| Liberator | Yes | Yes | Yes | No | liberatr | +| Lightning Fighters | Yes | Yes | Yes | Yes | lgtnfght | +| Liquid Kids | Yes | Yes | Yes | No | liquidk | +| Lizard Wizard | Yes | Yes | Yes | Yes | lizwiz | +| Lock'n'Chase | Yes | Yes | Yes | Yes | lnc | +| Loco-Motion | Yes | Yes | Yes | Yes | locomotn | +| Lode Runner | Yes | Yes | Yes | Yes | ldrun | +| Lode Runner II - The Bungeling St| Yes | Yes | Yes | Yes | ldrun2 | +| Lode Runner III - Majin No Fukkat| Yes | Yes | Yes | Yes | ldrun3 | +| Lode Runner IV - Teikoku Karano D| Yes | Yes | Yes | Yes | ldrun4 | +| Lost Tomb | Yes | Yes | Yes | Yes | losttomb | +| Lot Lot | Yes | Yes | Yes | Yes | lotlot | +| Lunar Lander | Yes | Yes | Yes | Yes | llander | +| Lunar Rescue | Yes | Yes | Yes(2)| Yes | lrescue | +| Lupin III | Yes | Yes | Yes(2)| Yes | lupin3 | +| M-4 | Yes | Yes | Yes(2)| Yes | m4 | +| M.A.C.H. 3 | No | Yes | Yes | Yes | mach3 | +| M79 Ambush | Yes | Yes | Yes | Yes | m79amb | +| Macho Mouse | Yes | No | Yes | Yes | machomou | +| Mad Crasher | Yes | Yes |Partial| Yes | madcrash | +| Mad Gear | Yes | Yes | Yes | Yes | madgear | +| Mad Motor | Yes | Yes | Yes | Yes | madmotor | +| Mad Planets | Yes | Yes | Yes | Yes | mplanets | +| Magic Sword - Heroic Fantasy | Yes | Yes | Yes | Yes | msword | +| Magical Drop II | Yes | Yes | Yes | Yes | magdrop2 | +| Magical Drop III | Yes | Yes | Yes | Yes | magdrop3 | +| Magical Spot II | Yes | Yes |Partial| Yes | magspot2 | +| Magician Lord | Yes | Yes | Yes | Yes | maglord | +| Mahjong Gakuen | Yes | Yes | Yes | Yes | mgakuen | +| Mahjong Gakuen 2 Gakuen-chou no F| Yes | Yes | Yes | Yes | mgakuen2 | +| Mahjong Kyoretsuden | Yes | Yes | Yes | Yes | mahretsu | +| Main Event, The | Yes | Yes | Yes | Yes | mainevt | +| Major Havoc | Yes | Yes | Yes | Yes | mhavoc | +| Major League | Yes | Yes | Yes | Yes | mjleague | +| Major Title | No | Yes | Yes | No | majtitle | +| Major Title 2 | Yes | Close | No | No | majtitl2 | +| Mania Challenge | Yes | Yes | Yes | Yes | maniach | +| Mappy | Yes | Yes | Yes | Yes | mappy | +| Marble Madness | Yes | Yes | Yes | Yes | marble | +| Marchen Maze | Yes | Yes | Yes | Yes | mmaze | +| Marine Boy | Yes | Yes | Yes | Yes | marineb | +| Mariner | Yes | Yes | Yes | Yes | mariner | +| Mario Bros. | Yes | Yes | Yes(2)| Yes | mario | +| Mars | Yes | Yes | Yes | Yes | mars | +| Marvel Land | Yes | Yes | Yes | Yes | marvland | +| Marvin's Maze | Yes | Yes | Yes | Yes | marvins | +| Mat Mania | Yes | Yes | Yes | Yes | matmania | +| Max RPM | Yes | Yes | Yes | Yes | maxrpm | +| Mayday | Yes | Yes | Yes | Yes | mayday | +| Meadows Lanes | Yes | Yes | Yes | Yes | medlanes | +| Mega Man - The Power Battle | Yes | Yes | Yes | Yes | megaman | +| Mega Twins | Yes | Yes | Yes | Yes | mtwins | +| Mega Zone | Yes | Yes | Yes | Yes | megazone | +| MegaTack | Yes | Yes | Yes | Yes | megatack | +| Meikyu Jima | Yes | Yes | Yes | No | kikcubic | +| Mercs | Yes | Yes | Yes | Yes | mercs | +| Metal Slug - Super Vehicle-001 | Yes | Yes | Yes | Yes | mslug | +| Metal Slug 2 - Super Vehicle-001/| Yes | Yes | Yes | Yes | mslug2 | +| Meteoroids | Yes | Yes | Yes | Yes | meteor | +| Metro-Cross | Yes | Yes | Yes | No | metrocrs | +| Midnight Resistance | Yes | Yes | Yes | No | midres | +| Mikie | Yes | Yes | Yes | Yes | mikie | +| Millipede | Yes | Yes | Yes | Yes | milliped | +| Minefield | Yes | Yes | Yes | Yes | minefld | +| Mini Golf | Yes | Yes | Yes | Yes | minigolf | +| Minivader | Yes | Yes | Yes | Yes | minivadr | +| Minky Monkey | Yes | Yes | Yes | Yes | mmonkey | +| Minnasanno Okagesamadesu | Yes | Yes | Yes | Yes | minasan | +| Mirai Ninja | Yes | Yes | Yes | Yes | mirninja | +| Missile Command | Yes | Yes | Yes | Yes | missile | +| Missing in Action | Yes | Yes | Yes | Yes | mia | +| Mister Viking | Yes | Yes | Yes | No | mrviking | +| Moguchan | Yes | No | Yes | Yes | moguchan | +| Mole Attack | Yes | Yes | Yes | Yes | mole | +| Money Money | Yes | Yes | No | No | monymony | +| Money Puzzle Exchanger / Money Id| Yes | Yes | Yes | Yes | miexchng | +| Monster Bash | Yes | Yes | Yes(2)| Yes | monsterb | +| Moon Alien Part 2 | Yes | Yes | Yes | Yes | moonal2 | +| Moon Cresta | Yes | Yes | Yes | Yes | mooncrst | +| Moon Patrol | Yes | Yes | Yes | Yes | mpatrol | +| Moon Quasar | Yes | Yes | Yes | Yes | moonqsr | +| Moon Walker | No(1) | Yes | Yes | Yes | moonwalk | +| Moon War II | Yes | Yes | Yes | Yes | moonwar2 | +| Mortal Kombat | No(1) | Yes | Yes | Yes | mk | +| Mortal Kombat II | No | Yes | Yes | Yes | mk2 | +| Motos | Yes | Yes | Yes | Yes | motos | +| Mouse Trap | Yes | Yes |Partial| Yes | mtrap | +| Mr. Do! | Yes | Yes | Yes | Yes | mrdo | +| Mr. Do's Castle | Yes | Yes | Yes | Yes | docastle | +| Mr. Do's Wild Ride | Yes | Yes | Yes | Yes | dowild | +| Mr. Goemon | Yes | Yes | Yes | Yes | mrgoemon | +| Mr. TNT | Yes | Yes | Yes | Yes | mrtnt | +| Ms. Pac-Man | Yes | Yes | Yes | Yes | mspacman | +| Mutant Night | Yes | Yes | Yes | Yes | mnight | +| Mutation Nation | Yes | Yes | Yes | Yes | mutnat | +| MX5000 | Yes | Yes | Yes | Yes | mx5000 | +| My Hero | Yes | Yes | Yes | No | myhero | +| Mysterious Stones | Yes | Yes | Yes | Yes | mystston | +| Mystic Marathon | Yes | Yes | Yes | Yes | mysticm | +| Mystic Riders | Yes | Yes | No | No | mysticri | +| NAM-1975 | Yes | Yes | Yes | Yes | nam1975 | +| Name That Tune | Yes | Yes | Yes | Yes | nametune | +| Narc | Yes | Yes | Yes | Yes | narc | +| Naughty Boy | Yes | Yes | Yes | No | naughtyb | +| Navalone | Yes | Yes |Partial| Yes | navalone | +| NBA Jam | No | Yes | Yes | Yes | nbajam | +| Nemesis | Yes | Yes | Yes | Yes | nemesis | +| Nemo | Yes | Yes | Yes | Yes | nemo | +| Neo Bomberman | Yes | Yes | Yes | Yes | neobombe | +| Neo Drift Out - New Technology | Yes | Yes | Yes | Yes | neodrift | +| Neo Mr. Do! | Yes | Yes | Yes | Yes | neomrdo | +| Neo Turf Masters / Big Tournament| Yes | Yes | Yes | Yes | turfmast | +| Neo-Geo Cup '98 - The Road to the| Yes | Yes | Yes | Yes | neocup98 | +| New Rally X | Yes | Yes | Yes(2)| Yes | nrallyx | +| New Sinbad 7 | Yes | Close | Yes | Yes | newsin7 | +| NewZealand Story, The | Yes | Yes | Yes | Yes | tnzs | +| Nibbler | Yes | Yes |Partial| Yes | nibbler | +| Night Driver | Yes | Yes | No | Yes | nitedrvr | +| Night Stocker | Yes | Yes | Yes | Yes | nstocker | +| Ninja Combat | Yes | Yes | Yes | Yes | ncombat | +| Ninja Commando | Yes | Yes | Yes | Yes | ncommand | +| Ninja Emaki | Yes | Yes | Yes | Yes | ninjemak | +| Ninja Gaiden | Yes | Yes | Yes | Yes | gaiden | +| Ninja Kid II | Yes | Yes | No | Yes | ninjakd2 | +| Ninja Master's - haoh-ninpo-cho | Yes | Yes | Yes | Yes | ninjamas | +| Ninja Spirit | Yes | Yes | Yes | No | nspirit | +| No Man's Land | Yes | No |Partial| Yes | nomnlnd | +| Nova 2001 | Yes | Yes | Yes | Yes | nova2001 | +| Nunchackun | Yes | No | Yes | Yes | nunchaku | +| Off the Wall | Yes | Yes | Yes | Yes | offtwall | +| Off the Wall | Yes | Yes | Yes | Yes | otwalls | +| Omega Race | Yes | Yes | Yes | Yes | omegrace | +| Operation Ragnagard / Shin-Oh-Ken| Yes | Yes | Yes | Yes | ragnagrd | +| Orbitron | Yes | Yes | Yes | Yes | orbitron | +| Ordyne | Yes | Yes | Yes | Yes | ordyne | +| Out Run | Yes | Yes | Yes | Yes | outrun | +| Out Zone | Yes | Yes | Yes | Yes | outzone | +| Over Top | Yes | Yes | Yes | Yes | overtop | +| Ozma Wars | Yes | Yes | Yes(2)| Yes | ozmawars | +| P-47 - The Phantom Fighter | Yes | Yes | Yes | Yes | p47 | +| P.O.W. - Prisoners of War | Yes | Yes | Yes | No | pow | +| Pac & Pal | Yes | Yes | Yes | No | pacnpal | +| Pac-Land | Yes | Yes | Yes | No | pacland | +| Pac-Man Plus | Yes | Yes | Yes | Yes | pacplus | +| Pac-Mania | Yes | Yes | Yes | Yes | pacmania | +| Palamedes | Yes | Yes | Yes | Yes | palamed | +| Pandora's Palace | Yes | Yes | Yes | No | pandoras | +| Pang | Yes | Yes | Yes | Yes | pang | +| Pang! 3 | Yes | Yes | Yes | Yes | pang3 | +| Panic Bomber | Yes | Yes | Yes | Yes | panicbom | +| Paperboy | Yes | Yes | Yes | Yes | paperboy | +| Parodius DA! | Yes | Yes | Yes | Yes | parodius | +| Passing Shot | No(1) | Yes | Yes | Yes | passsht | +| Peek-a-Boo! | Yes | Yes | Yes | Yes | peekaboo | +| Pengo | Yes | Yes | Yes | Yes | pengo | +| Penguin-Kun Wars | Yes | Yes | Yes | Yes | pkunwar | +| Pepper II | Yes | Yes |Partial| Yes | pepper2 | +| Percussor, The | Yes | Yes | Yes | Yes | percuss | +| Perfect Soldiers | Yes | Yes | No | No | psoldier | +| Peter Pack-Rat | Yes | Yes | Yes | Yes | peterpak | +| Phantom II | Yes | Yes | Yes(2)| Yes | phantom2 | +| Phelios | Yes | Yes | Yes | Yes | phelios | +| Phoenix | Yes | Yes | Yes | No | phoenix | +| Phozon | Yes | Yes | Yes | No | phozon | +| Pickin' | Yes | Yes | Yes | Yes | pickin | +| Pig Newton | Yes | Yes | No | Yes | pignewt | +| Pigskin 621AD | Yes | Yes | Yes | Yes | pigskin | +| Pinball Action | Yes | Yes | Yes | Yes | pbaction | +| Pinbo | Yes | Yes | Yes | Yes | pinbo | +| Ping Pong | Yes | Yes | Yes | Yes | pingpong | +| Pioneer Balloon | Yes | Yes |Partial| Yes | pballoon | +| Pipi & Bibis / Whoopee | Yes | Yes | Yes | Yes | pipibibs | +| Pirate Ship HigeMaru | Yes | Yes | Yes | Yes | higemaru | +| Pisces | Yes | Yes | Yes | Yes | pisces | +| Pistol Daimyo no Bouken | Yes | Yes | Yes | Yes | pistoldm | +| Pit Fighter | Yes | Yes | Yes | Yes | pitfight | +| Pit, The | Yes | Yes | Yes | Yes | thepit | +| Pitfall II | Yes | Yes | Yes | No | pitfall2 | +| Pleasure Goal / Futsal - 5 on 5 M| Yes | Yes | Yes | Yes | pgoal | +| Pleiads | Yes | Yes | Yes | No | pleiads | +| Plotting | Yes | Yes | Yes | Yes | plotting | +| Plump Pop | Yes | Yes | Yes | Yes | plumppop | +| Plus Alpha | Yes | Yes | Yes | Yes | plusalph | +| Pnickies | Yes | Yes | Yes | Yes | pnickj | +| Pocket Gal | Yes | Yes | Yes | Yes | pcktgal | +| Poker Ladies | Yes | Yes | Yes | Yes | pkladies | +| Polaris | Yes | Yes | Yes | Yes | polaris | +| Pole Position | Yes | Yes | Yes(2)| Yes | polepos | +| Pole Position II | Yes | Yes | Yes(2)| Yes | polepos2 | +| Ponpoko | Yes | Yes | Yes | Yes | ponpoko | +| Pooyan | Yes | Yes | Yes | Yes | pooyan | +| Pop 'n Bounce / Gapporin | Yes | Yes | Yes | Yes | popbounc | +| Pop Flamer | Yes | Yes | Yes | No | popflame | +| Popeye | No(1) | Yes | Yes | No | popeye | +| Port Man | Yes | Yes | Yes | Yes | portman | +| Power Drive | Yes | Yes | Yes | Yes | powerdrv | +| Power Spikes | Yes | Yes | Yes | No | pspikes | +| Power Spikes II | Yes | Yes | Yes | Yes | pspikes2 | +| Power Surge | Yes | Yes | Yes | Yes | psurge | +| Prehistoric Isle in 1930 | Yes | Yes | Yes | No | prehisle | +| Psychic 5 | Yes | Yes | Yes | No | psychic5 | +| Psycho Soldier | Yes | Yes |Partial| No | psychos | +| Psycho-Nics Oscar | Yes | Yes | Yes | No | oscar | +| PuckMan | Yes | Yes | Yes | Yes | pacman | +| Pulsar | Yes | Yes | Yes | Yes | pulsar | +| Pulstar | Yes | Yes | Yes | Yes | pulstar | +| Punch-Out!! | Yes | Yes | Yes | Yes | punchout | +| Punisher, The | Yes | Yes | Yes | Yes | punisher | +| Punk Shot | Yes | Yes | Yes | Yes | punkshot | +| Puzzle Bobble / Bust-A-Move | Yes | Yes | Yes | Yes | pbobble | +| Puzzle Club | Yes | Yes | Yes | Yes | puzlclub | +| Puzzle De Pon | Yes | Yes | Yes | Yes | puzzledp | +| Puzzled / Joy Joy Kid | Yes | Yes | Yes | Yes | joyjoy | +| Puzznic | Yes | Yes | Yes | Yes | puzznic | +| Q*bert | Yes | Yes | Yes | Yes | qbert | +| Q*bert's Qubes | Yes | Yes | Yes | Yes | qbertqub | +| Qix | Yes | Yes | Yes | No | qix | +| Quantum | Yes | No | Yes | Yes | quantum | +| Quartet | Yes | Yes | Yes | Yes | quartet | +| Quester | Yes | Yes | Yes | Yes | quester | +| Quiz & Dragons | Yes | Yes | Yes | Yes | qad | +| Quiz Daisousa Sen - The Last Coun| Yes | Yes | Yes | Yes | quizdais | +| Quiz King of Fighters | Yes | Yes | Yes | Yes | quizkof | +| Quiz Meintantei Neo Geo - Quiz Da| Yes | Yes | Yes | Yes | quizdai2 | +| Quiz Sangokushi | Yes | Yes | Yes | Yes | qsangoku | +| Quiz Tonosama no Yabou | Yes | Yes | Yes | Yes | qtono1 | +| Quiz Tonosama no Yabou 2 Zenkoku-| Yes | Yes | Yes | Yes | qtono2 | +| Qwak | Yes | Yes | Yes | No | qwakprot | +| R-Type | Yes | Yes | Yes | No | rtype | +| R-Type II | Yes | Yes | Yes | No | rtype2 | +| R-Type Leo | Yes | Yes | No | No | rtypeleo | +| Radar Scope | Yes | Yes |Part(2)| Yes | radarscp | +| Radical Radial | Yes | Yes | Yes | No | radrad | +| Raiden | Yes | Yes | Yes | Yes | raiden | +| Raimais | No | Yes | No | Yes | raimais | +| Rainbow Islands | Yes | Yes | Yes | No | rainbow | +| Rally Bike / Dash Yarou | Yes | Yes | Yes | Yes | rallybik | +| Rally X | Yes | Yes | Yes(2)| Yes | rallyx | +| Rampage | Yes | Yes | Yes | Yes | rampage | +| Rampart | Yes | Yes | Yes | Yes | rampart | +| Rastan | Yes | Yes | Yes | No | rastan | +| Razzmatazz | Yes | Yes | No | No | razmataz | +| Reactor | Yes | Yes | Yes | Yes | reactor | +| Real Bout Fatal Fury / Real Bout | Yes | Yes | Yes | Yes | rbff1 | +| Real Bout Fatal Fury 2 - The Newc| Yes | Yes | Yes | Yes | rbff2 | +| Real Bout Fatal Fury Special / Re| Yes | Yes | Yes | Yes | rbffspec | +| Real Ghostbusters, The | Yes | Yes | Yes | No | ghostb | +| Red Alert | Yes | No |Partial| Yes | redalert | +| Red Baron | Yes | Yes | Yes | Yes | redbaron | +| Regulus | Yes | Yes | Yes | No | regulus | +| Relief Pitcher | Yes | Yes | Yes | Yes | relief | +| Renegade | Yes | Yes | Yes | No | renegade | +| Rescue | Yes | Yes | Yes | Yes | rescue | +| Rescue Raider | Yes | Yes | Yes | Yes | rescraid | +| Return of Ishtar, The | Yes | Yes | Yes | Yes | roishtar | +| Return of the Invaders | Yes | Yes | Yes | Yes | retofinv | +| Return of the Jedi | Yes | Yes | Yes | No | jedi | +| Riding Hero | Yes | Yes | Yes | Yes | ridhero | +| Riot City | Yes | Yes | Yes | Yes | riotcity | +| Rip Cord | No | Yes | Yes | Yes | ripcord | +| Rip Off | Yes | Yes | Yes(2)| Yes | ripoff | +| River Patrol | Yes | Yes | Yes | Yes | rpatrolb | +| Road Blasters | Yes | Yes | Yes | Yes | roadblst | +| Road Fighter | Yes | Yes | Yes | Yes | roadf | +| Road Runner | Yes | Yes | Yes | Yes | roadrunn | +| Robby Roto | Yes | Close | Yes | Yes | robby | +| Robo Army | Yes | Yes | Yes | Yes | roboarmy | +| Robocop | No(1) | Yes | Yes | No | robocop | +| Robot Bowl | Yes | Yes |Partial| Yes | robotbwl | +| Robotron | Yes | Yes | Yes | Yes | robotron | +| Roc'n Rope | Yes | Yes | Yes | Yes | rocnrope | +| Rock 'n Rage | Yes | Yes | Yes | Yes | rockrage | +| RodLand | Yes | Yes | Yes | Yes | rodland | +| Rollergames | Yes | Yes | Yes | Yes | rollerg | +| Rolling Crash / Moon Base | Yes | Yes | Yes(2)| Yes | rollingc | +| Rolling Thunder | Yes | Yes | Yes | Yes | rthunder | +| Rolling Thunder 2 | Yes | Yes | Yes | Yes | rthun2 | +| Rompers | Yes | Yes | Yes | Yes | rompers | +| Round-Up | Yes | Yes | Yes | Yes | roundup | +| Route 16 | Yes | Yes | Yes | Yes | route16 | +| Rygar | Yes | Yes | Yes | No | rygar | +| S.P.Y. - Special Project Y | No | Yes | Yes | Yes | spy | +| S.R.D. Mission | Yes | Yes | Yes | Yes | srdmissn | +| Safari | Yes | Yes | No | Yes | safari | +| Saint Dragon | Yes | Yes | Yes | Yes | stdragon | +| Salamander | Yes | Yes | Yes | Yes | salamand | +| Samurai | Yes | Yes | No | Yes | samurai | +| Samurai Nihon-ichi | Yes | Yes | Yes | Yes | tsamurai | +| Samurai Shodown / Samurai Spirits| Yes | Yes | Yes | Yes | samsho | +| Samurai Shodown II / Shin Samurai| Yes | Yes | Yes | Yes | samsho2 | +| Samurai Shodown III / Samurai Spi| Yes | Yes | Yes | Yes | samsho3 | +| Samurai Shodown IV - Amakusa's Re| Yes | Yes | Yes | Yes | samsho4 | +| SAR - Search And Rescue | Yes | Yes | Yes | No | searchar | +| Sarge | Yes | Yes | Yes | Yes | sarge | +| Sasuke vs. Commander | Yes | Yes | No | Yes | sasuke | +| Satan of Saturn | Yes | Yes |Partial| Yes | satansat | +| Satan's Hollow | Yes | Yes | Yes | Yes | shollow | +| Saturday Night Slam Masters | Yes | Yes | Yes | Yes | slammast | +| Saturn | Yes | Yes | Yes | Yes | saturn | +| Sauro | Yes | Close | Yes | Yes | sauro | +| Savage Reign / Fu'un Mokushiroku | Yes | Yes | Yes | Yes | savagere | +| Scion | Yes | Close | Yes | Yes | scion | +| Scramble | Yes | Yes | Yes | Yes | scramble | +| Scrambled Egg | Yes | Yes | Yes | Yes | scregg | +| SDI - Strategic Defense Initiativ| Yes | Yes | Yes | Yes | sdi | +| Sea Fighter Poseidon | Yes | Yes | Yes | Yes | sfposeid | +| Sea Wolf | Yes | Yes | Yes(2)| Yes | seawolf | +| Sea Wolf II | Yes | Close | Yes | Yes | seawolf2 | +| Section Z | Yes | Yes | Yes | Yes | sectionz | +| Sega Ninja | Yes | Yes | Yes | No | seganinj | +| Seicross | Yes | Yes | Yes | No | seicross | +| Sengoku / Sengoku Denshou | Yes | Yes | Yes | Yes | sengoku | +| Sengoku 2 / Sengoku Denshou 2 | Yes | Yes | Yes | Yes | sengoku2 | +| Senjyo | Yes | Yes | Yes | Yes | senjyo | +| Sente Diagnostic Cartridge | Yes | Yes | Yes | Yes | sentetst | +| Shackled | Yes | Yes | Yes | No | shackled | +| Shadow Dancer | Yes | Yes | Yes | Yes | shdancer | +| Shadow Land | Yes | Yes | Yes | Yes | shadowld | +| Shanghai | No | Yes | Yes | Yes | shanghai | +| Shark Attack | Yes | Yes | Yes | Yes | sharkatt | +| Shinobi | Yes | Yes | Yes | Yes | shinobi | +| Shock Troopers | Yes | Yes | Yes | Yes | shocktro | +| Shock Troopers - 2nd Squad | Yes | Yes | Yes | Yes | shocktr2 | +| Shoot Out | Yes | Yes | Yes | No | shootout | +| Shooting Master | No | Yes | Yes | No | shtngmst | +| Showdown | Yes | Yes | Yes | Yes | showdown | +| Shuffleboard | Yes | Yes | Yes | Yes | shuffle | +| Shuuz | Yes | Yes | Yes | Yes | shuuz | +| Sichuan II | Yes | Yes | Yes | Yes | sichuan2 | +| Side Arms - Hyper Dyne | Yes | Yes | Yes | No | sidearms | +| Side Pocket | Yes | Yes | Yes | Yes | sidepckt | +| Side Track | Yes | Yes | Yes(2)| Yes | sidetrac | +| Silkworm | Yes | Yes | Yes | No | silkworm | +| Simpsons, The | Yes | Yes | Yes | Yes | simpsons | +| Sindbad Mystery | Yes | Yes | Yes | Yes | sindbadm | +| Sinistar | Yes | Yes | Yes | Yes | sinistar | +| Skull & Crossbones | Yes | Yes | Yes | Yes | skullxbo | +| Sky Adventure | Yes | Yes | Yes | No | skyadvnt | +| Sky Chuter | Yes | No | Yes | Yes | skychut | +| Sky Diver | Yes | Yes | No | Yes | skydiver | +| Sky Kid | Yes | Yes | Yes | No | skykid | +| Sky Kid Deluxe | Yes | Yes | Yes | Yes | skykiddx | +| Sky Lancer | Yes | Yes | Yes | No | skylancr | +| Sky Soldiers | Yes | Yes | Yes | No | skysoldr | +| Slap Fight | No(1) | Yes | Yes | No | slapfigh | +| Sly Spy | Yes | Yes | Yes | No | slyspy | +| Smash T.V. | Yes | Yes | Yes | Yes | smashtv | +| Snacks'n Jaxson | Yes | Yes | Yes | Yes | snakjack | +| Snake Pit | Yes | Yes | Yes | Yes | snakepit | +| Snap Jack | Yes | Yes | Yes | Yes | snapjack | +| Snow Bros. - Nick & Tom | Yes | Yes | Yes | Yes | snowbros | +| Snow Bros. 2 - With New Elves | Yes | Yes | Yes | Yes | snowbro2 | +| Soccer Brawl | Yes | Yes | Yes | Yes | socbrawl | +| Solar Fox | Yes | Yes | Yes | Yes | solarfox | +| Solar Quest | Yes | Yes | Yes(2)| Yes | solarq | +| Soldam | Yes | Yes | Yes | Yes | soldamj | +| Solomon's Key | Yes | Yes | Yes | Yes | solomon | +| Son of Phoenix | Yes | Yes | Yes | Yes | sonofphx | +| Son Son | Yes | Yes | Yes | Yes | sonson | +| SOS | Yes | Yes |Partial| Yes | sos | +| Souko Ban Deluxe | Yes | Yes | Yes | Yes | soukobdx | +| Space Attack | Yes | Yes | No | Yes | sspaceat | +| Space Chaser | Yes | Yes | Yes(2)| Yes | schaser | +| Space Duel | Yes | Yes | Yes | Yes | spacduel | +| Space Dungeon | Yes | Yes | Yes | No | sdungeon | +| Space Encounters | Yes | Yes | Yes(2)| Yes | spcenctr | +| Space Fever | Yes | Yes | Yes | Yes | sfeverbw | +| Space Fever | Yes | Yes | Yes | Yes | spacefev | +| Space Firebird | Yes | Close |Partial| Yes | spacefb | +| Space Fury | Yes | Yes | Yes(2)| Yes | spacfury | +| Space Harrier | Yes | Yes | Yes | Yes | sharrier | +| Space Intruder | Yes | No | No | Yes | spaceint | +| Space Invaders | Yes | Yes | Yes(2)| Yes | invaders | +| Space Invaders II | Yes | Yes | Yes(2)| Yes | invad2ct | +| Space Invaders Part II | Yes | Yes | Yes(2)| Yes | invadpt2 | +| Space Odyssey | Yes | Yes | Yes(2)| Yes | spaceod | +| Space Panic | Yes | Yes | Yes(2)| Yes | panic | +| Space Seeker | Yes | Yes | Yes | Yes | spaceskr | +| Space Tactics | Yes | Yes | No | Yes | stactics | +| Space Trek | Yes | Yes | No | Yes | spacetrk | +| Space Wars | Yes | Yes | Yes(2)| Yes | spacewar | +| Space Zap | Yes | Close | Yes | Yes | spacezap | +| Sparkz | Yes | Yes | Yes | Yes | sparkz | +| Spectar | Yes | Yes | Yes(2)| Yes | spectar | +| Speed Ball | Yes | Yes | Yes | Yes | speedbal | +| Speed Coin | Yes | Yes | Yes | Yes | spdcoin | +| Speed Freak | Yes | Yes | Yes(2)| Yes | speedfrk | +| Speed Rumbler, The | Yes | Yes | Yes | Yes | srumbler | +| Spelunker | Yes | Yes | Yes | Yes | spelunkr | +| Spelunker II | Yes | Yes | Yes | Yes | spelunk2 | +| Spiders | Yes | Yes | No | No | spiders | +| Spiker | Yes | Yes | Yes | Yes | spiker | +| Spinmaster / Miracle Adventure | Yes | Yes | Yes | Yes | spinmast | +| Splash | Yes | Yes |Partial| Yes | splash | +| Splat! | Yes | Yes | Yes | Yes | splat | +| Splatter House | Yes | Yes | Yes | Yes | splatter | +| Springer | Yes | Yes | Yes | Yes | springer | +| Sprint 1 | Yes | Yes | No | Yes | sprint1 | +| Spy Hunter | Yes | Yes | Yes | Yes | spyhunt | +| Spy Hunter 2 | Yes | Yes | Yes | Yes | spyhunt2 | +| Stadium Hero | Yes | Yes | Yes | Yes | stadhero | +| Stakes Winner / Stakes Winner - G| Yes | Yes | Yes | Yes | stakwin | +| Stakes Winner 2 | Yes | Yes | Yes | Yes | stakwin2 | +| Star Castle | Yes | Yes | Yes(2)| Yes | starcas | +| Star Cruiser | Yes | Yes | Yes(2)| Yes | starcrus | +| Star Fire | No | Yes | No | Yes | starfire | +| Star Force | Yes | Yes | Yes | Yes | starforc | +| Star Hawk | Yes | Yes | Yes(2)| Yes | starhawk | +| Star Jacker | Yes | Yes | Yes | No | starjack | +| Star Trek | Yes | Yes | Yes(2)| Yes | startrek | +| Star Wars | Yes | Yes | Yes | Yes | starwars | +| Stargate | Yes | Yes | Yes | Yes | stargate | +| Stinger | Yes | Close | Yes | Yes | stinger | +| Stocker | Yes | Yes | Yes | Yes | stocker | +| Strategy X | Yes | Yes | Yes | Yes | stratgyx | +| Stratovox | Yes | Yes | Yes | Yes | stratvox | +| Streaking | Yes | Yes | Yes | Yes | streakng | +| Street Fighter | Yes | Yes | Yes | Yes | sf1 | +| Street Fighter II - The World War| Yes | Yes | Yes | Yes | sf2 | +| Street Fighter II' - Champion Edi| Yes | Yes | Yes | Yes | sf2ce | +| Street Football | Yes | Yes | Yes | Yes | sfootbal | +| Street Hoop / Street Slam / Dunk | Yes | Yes | Yes | Yes | strhoop | +| Street Smart | Yes | Yes | Yes | No | streetsm | +| Strider | Yes | Yes | Yes | Yes | strider | +| Strike Force | Yes | Yes | Yes | Yes | strkforc | +| Subs | Yes | Yes | No | Yes | subs | +| Sundance | No | Yes | Yes(2)| Yes | sundance | +| Sunset Riders | Yes | Yes | Yes | Yes | ssriders | +| Super Bagman | Yes | Yes |Partial| Yes | sbagman | +| Super Basketball | Yes | Yes | Yes | Yes | sbasketb | +| Super Bond | Yes | Yes | Yes | Yes | superbon | +| Super Breakout | Yes | Yes | Yes | Yes | sbrkout | +| Super Burger Time | Yes | Yes | Yes | No | supbtime | +| Super Casino | Yes | Yes | Yes | Yes | sucasino | +| Super Champion Baseball | No | Yes | Yes | No | sbasebal | +| Super Cobra | Yes | Yes | Yes | Yes | scobra | +| Super Contra | Yes | Yes | Yes | Yes | scontra | +| Super Dodge Ball / Kunio no Nekke| Yes | Yes | Yes | Yes | sdodgeb | +| Super Hang-On | No(1) | Yes | Yes | Yes | shangon | +| Super High Impact | No | Yes | Yes | Yes | shimpact | +| Super Locomotive | Yes | Yes | Yes | Yes | suprloco | +| Super Marukin-Ban | Yes | Yes | Yes | Yes | marukin | +| Super Mouse | Yes | No | Yes | Yes | suprmous | +| Super Pac-Man | Yes | Yes | Yes | No | superpac | +| Super Pang | Yes | Yes | Yes | Yes | spang | +| Super Punch-Out!! | Yes | Yes | Yes | Yes | spnchout | +| Super Qix | No(1) | Yes | Yes | No | superqix | +| Super Real Darwin | Yes | Yes | Yes | No | srdarwin | +| Super Sidekicks / Tokuten Ou | Yes | Yes | Yes | Yes | ssideki | +| Super Sidekicks 2 - The World Cha| Yes | Yes | Yes | Yes | ssideki2 | +| Super Sidekicks 3 - The Next Glor| Yes | Yes | Yes | Yes | ssideki3 | +| Super Space Invaders '91 | Yes | Yes | Yes | No | ssi | +| Super Sprint | Yes | Yes | Yes | Yes | ssprint | +| Super Spy, The | Yes | Yes | Yes | Yes | superspy | +| Super World Stadium '92 | Yes | Yes | Yes | Yes | sws92 | +| Super Zaxxon | Yes | Yes | Yes(2)| No | szaxxon | +| Superman | Yes | Yes | Yes | No | superman | +| Surprise Attack | Yes | Yes | Yes | Yes | surpratk | +| SWAT | Yes | Yes | Yes | No | swat | +| Swimmer | Yes | Yes | Yes | Yes | swimmer | +| Syougi No Tatsujin - Master of Sy| Yes | Yes | Yes | Yes | mosyougi | +| Syusse Oozumou | Yes | Yes | Yes | No | ssozumo | +| Tac/Scan | Yes | Yes | Yes(2)| Yes | tacscan | +| Tailgunner | Yes | Yes | Yes(2)| Yes | tailg | +| Takeda Shingen | Yes | Yes | Yes | Yes | tshingen | +| Tank Battalion | Yes | Yes | Yes(2)| Yes | tankbatt | +| Tank Force | Yes | Yes | Yes | Yes | tankfrce | +| Tapper | Yes | Yes | Yes | Yes | tapper | +| Targ | Yes | Yes | Yes(2)| Yes | targ | +| Tazz-Mania | Yes | Yes | Yes | Yes | tazmania | +| Tecmo Knight | Yes | Yes | Yes | Yes | tknight | +| Tecmo World Soccer '96 | Yes | Yes | Yes | Yes | tws96 | +| TeddyBoy Blues | Yes | Yes | Yes | No | teddybb | +| Tee'd Off | No | Yes | Yes | Yes | teedoff | +| Teenage Mutant Ninja Turtles | Yes | Yes | Yes | Yes | tmnt | +| Teenage Mutant Ninja Turtles - Tu| Yes | Close | Yes | Yes | tmnt2 | +| Tehkan World Cup | Yes | Yes | Yes | Yes | tehkanwc | +| Teki Paki | Yes | Yes | No | Yes | tekipaki | +| Tempest | Yes | Yes | Yes | Yes | tempest | +| Tenchi wo Kurau | Yes | Yes | Yes | Yes | dwj | +| Terminator 2 - Judgment Day | No | Yes | Yes | Yes | term2 | +| Terra Cresta | Yes | Yes | Yes | Yes | terracre | +| Terra Force | Yes | Yes | Yes | No | terraf | +| Tetris | Yes | Yes | Yes | Yes | atetris | +| Tetris | No(1) | Yes | Yes | Yes | tetris | +| Thrash Rally | Yes | Yes | Yes | Yes | trally | +| Three Stooges | Yes | Yes |Partial| Yes | 3stooges | +| Three Wonders | Yes | Yes | Yes | Yes | 3wonders | +| Thunder Cross | No | Yes | Yes | Yes | thunderx | +| Thunder Cross II | Yes | Yes | Yes | Yes | thndrx2 | +| ThunderJaws | Yes | Yes | Yes | Yes | thunderj | +| Tiger Heli | No(1) | Yes | Yes | No | tigerh | +| Tiger Road | Yes | Yes | Yes | No | tigeroad | +| Timber | Yes | Yes | Yes | Yes | timber | +| Time Pilot | Yes | Yes | Yes | Yes | timeplt | +| Time Pilot '84 | Yes | Yes | Yes | No | tp84 | +| Time Scanner | Yes | Yes | Yes | Yes | timscanr | +| Time Soldiers | Yes | Yes | Yes | No | timesold | +| Time Tunnel | Yes | Yes | Yes | Yes | timetunl | +| Tin Star, The | Yes | Yes | Yes | Yes | tinstar | +| TNK III | Yes | Yes | Yes | No | tnk3 | +| Toggle | Yes | Yes | Yes | Yes | toggle | +| Toki | No(1) | Yes | Yes | No | toki | +| Toki no Senshi - Chrono Soldier | Yes | Yes | Yes | No | tokisens | +| Tokio / Scramble Formation | No(1) | Yes | Yes | No | tokio | +| Tomahawk 777 | Yes | Yes | Yes(2)| Yes | tomahawk | +| Toobin' | Yes | Yes | Yes | Yes | toobin | +| Top Hunter - Roddy & Cathy | Yes | Yes | Yes | Yes | tophuntr | +| Top Player's Golf | Yes | Yes | Yes | Yes | tpgolf | +| Top Secret | Yes | Yes | Yes | Yes | topsecex | +| Tornado Baseball | Yes | Yes | Yes(2)| Yes | tornbase | +| Toryumon | Yes | Yes | Yes | Yes | toryumon | +| Total Carnage | Yes | Yes | Yes | Yes | totcarn | +| TouchDown Fever | Yes | Yes | Yes | No | tdfever | +| Tough Turf | Yes | Yes | No | Yes | tturf | +| Tougyuu, The | Yes | Yes | Yes | No | bullfgtj | +| Tower of Druaga | Yes | Yes | Yes | Yes | todruaga | +| Track & Field | Yes | Yes | Yes | Yes | trackfld | +| Tranquilizer Gun | Yes | Yes | No | Yes | tranqgun | +| Traverse USA / Zippy Race | Yes | Yes | Yes | Yes | travrusa | +| Tri-Sports | Yes | Yes | Yes | Yes | trisport | +| Trio The Punch - Never Forget Me.| Yes | Yes | Yes | Yes | triothep | +| Triple Punch | Yes | Yes | Yes | Yes | triplep | +| Trivial Pursuit | Yes | Yes | Yes | Yes | triviabb | +| Trivial Pursuit | Yes | Yes | Yes | Yes | triviag1 | +| Trivial Pursuit | Yes | Yes | Yes | Yes | triviag2 | +| Trivial Pursuit | Yes | Yes | Yes | Yes | triviasp | +| Trivial Pursuit | Yes | Yes | Yes | Yes | triviayp | +| Trog | Yes | Yes | Yes | Yes | trog | +| Trojan | Yes | Yes | Yes | Yes | trojan | +| Tron | Yes | Yes | Yes | Yes | tron | +| Tropical Angel | Yes | Yes | Yes | Yes | troangel | +| Truxton / Tatsujin | Yes | Yes | Yes | Yes | truxton | +| Tumble Pop | Yes | Yes | Yes | Yes | tumblep | +| Turbo | Yes | Yes | Yes(2)| No | turbo | +| Turbo Force | Yes | Yes | Yes | No | turbofrc | +| Turbo Tag | Yes | Yes | Yes | Yes | turbotag | +| Turkey Shoot | Yes | Yes | Yes | Yes | tshoot | +| Turtle Ship | Yes | Yes | Yes | No | turtship | +| Turtles | Yes | Yes | Yes | Yes | turtles | +| Tutankham | Yes | Yes | Yes | Yes | tutankhm | +| Twin Cobra | Yes | Yes | Yes | Yes | twincobr | +| TwinBee | Yes | Yes | Yes | Yes | twinbee | +| Twinkle Star Sprites | Yes | Yes | Yes | Yes | twinspri | +| Two Tigers | Yes | Yes | Yes | Yes | twotiger | +| U.N. Squadron | Yes | Yes | Yes | Yes | unsquad | +| Ufo Senshi Yohko Chan | No | Yes | Yes | No | ufosensi | +| Ultimate 11 / Tokuten Ou - Honoo | Yes | Yes | Yes | Yes | ssideki4 | +| Ultraman | Yes | Yes | Yes | Yes | ultraman | +| Undercover Cops | Yes | Yes | No | No | uccops | +| UniWar S | Yes | Yes | Yes | Yes | uniwars | +| Up'n Down | Yes | Yes | Yes | No | upndown | +| Us vs. Them | No | Yes | Yes | Yes | usvsthem | +| V-Five | Yes | Yes | No | Yes | vfive | +| Van Van Car | Yes | Yes | Yes | Yes | vanvan | +| Vanguard | Yes | Yes |Partial| Yes | vanguard | +| Vanguard II | Yes | Yes | Yes | Yes | vangrd2 | +| Vapor Trail - Hyper Offence Forma| Yes | Yes | Yes | Yes | vaportra | +| Varth - Operation Thunderstorm | Yes | Yes | Yes | Yes | varth | +| Vastar | Yes | Yes | Yes | No | vastar | +| Vendetta | Yes | Yes | Yes | Yes | vendetta | +| Venture | Yes | Yes |Partial| Yes | venture | +| Victory Road | Yes | Yes | Yes | No | victroad | +| Video Hustler | Yes | Yes | Yes | Yes | hustler | +| Viewpoint | Yes | Yes | Yes | Yes | viewpoin | +| Vigilante | Yes | Yes | Yes | No | vigilant | +| Vimana | Yes | Yes | No | Yes | vimana | +| Vindicators | Yes | Yes | Yes | Yes | vindictr | +| Vindicators Part II | Yes | Yes | Yes | Yes | vindctr2 | +| Voltage Fighter - Gowcaizer / Cho| Yes | Yes | Yes | Yes | gowcaizr | +| Vulcan Venture | Yes | Yes | Yes | Yes | vulcan | +| Vulgus | Yes | Yes | Yes | No | vulgus | +| Wacko | Yes | Yes | Yes | Yes | wacko | +| Waku Waku 7 | Yes | Yes | Yes | Yes | wakuwak7 | +| Wanted | Yes | Yes | Yes | Yes | wanted | +| War of the Bugs | Yes | Yes | Yes | Yes | warofbug | +| War of the Worlds | Yes | Close | Yes(2)| Yes | wotw | +| Wardner | Yes | Yes | Yes | Yes | wardner | +| Warlords | Yes | Yes | Yes | Yes | warlord | +| Warp & Warp | Yes | Yes | Yes | No | warpwarp | +| Warrior | Yes | Yes | Yes(2)| Yes | warrior | +| Warriors of Fate | Yes | Yes | Yes | Yes | wof | +| Water Ski | Yes | Yes | Yes | Yes | waterski | +| WEC Le Mans 24 | Yes | No | Yes | Yes | wecleman | +| Who Dunit | Yes | Yes | Yes | Yes | whodunit | +| Wild Western | Yes | Yes | Yes | Yes | wwestern | +| Willow | Yes | Yes | Yes | Yes | willow | +| Windjammers / Flying Power Disc | Yes | Yes | Yes | Yes | wjammers | +| Wiping | Yes | Yes | Yes | Yes | wiping | +| Wiz | Yes | Close | Yes | Yes | wiz | +| Wizard of Wor | Yes | Close | Yes | Yes | wow | +| Wonder Boy | Yes | Yes | Yes | No | wboy | +| Wonder Boy III - Monster Lair | Yes | Yes | Yes | Yes | wb3 | +| Wonder Boy in Monster Land | Yes | Yes | Yes | No | wbml | +| Wonder Momo | Yes | Yes | Yes | Yes | wndrmomo | +| World Court | Yes | Yes | Yes | Yes | wldcourt | +| World Cup 90 | Yes | Yes |Partial| No | wc90 | +| World Heroes | Yes | Yes | Yes | Yes | wh1 | +| World Heroes 2 | Yes | Yes | Yes | Yes | wh2 | +| World Heroes 2 Jet | Yes | Yes | Yes | Yes | wh2j | +| World Heroes Perfect | Yes | Yes | Yes | Yes | whp | +| World Stadium | Yes | Yes | Yes | Yes | ws | +| World Tennis | Yes | Close | Yes | Yes | wtennis | +| Wrestle War | Yes | Yes | Yes | Yes | wrestwar | +| X Multiply | Yes | Yes | Yes | No | xmultipl | +| X-Men | Yes | Yes |Partial| Yes | xmen | +| Xain'd Sleena | Yes | Yes | Yes | Yes | xsleena | +| Xenophobe | Yes | Yes | Yes | Yes | xenophob | +| Xevious | Yes | Yes | Yes(2)| Yes | xevious | +| Xybots | Yes | Yes | Yes | Yes | xybots | +| Yam! Yam!? | Yes | Yes | Yes | Yes | yamyam | +| Yamato | Yes | Yes | Yes | Yes | yamato | +| Yie Ar Kung-Fu | Yes | Yes | Yes | Yes | yiear | +| Yosaku To Donbee | Yes | Yes | Yes(2)| Yes | yosakdon | +| Zaxxon | Yes | Yes | Yes(2)| No | zaxxon | +| Zed Blade / Operation Ragnarok | Yes | Yes | Yes | Yes | zedblade | +| Zektor | Yes | Yes | Yes(2)| Yes | zektor | +| Zero Wing | Yes | Yes | Yes | Yes | zerowing | +| Zero Zone | Yes | Yes | Yes | Yes | zerozone | +| Zig Zag | Yes | Yes | Yes | Yes | zigzag | +| Zoar | Yes | Yes | Yes | Yes | zoar | +| Zodiack | Yes | Close | Yes | Yes | zodiack | +| Zoo Keeper | Yes | Yes | Yes | No | zookeep | +| Zwackery | Yes | Yes | Yes | Yes | zwackery | +| Zzyzzyxx | Yes | Yes | Yes | Yes | zzyzzyxx | ++----------------------------------+-------+-------+-------+-------+----------+ + +(1) There are variants of the game (usually bootlegs) that work correctly +(2) Needs samples provided separately diff --git a/hi/dir.txt b/hi/dir.txt index fceeae79a..1616263a6 100644 --- a/hi/dir.txt +++ b/hi/dir.txt @@ -1 +1 @@ -hi files will be stored here. \ No newline at end of file +High score files will be placed here diff --git a/inp/dir.txt b/inp/dir.txt index 3f6fd9c31..80bc3c82d 100644 --- a/inp/dir.txt +++ b/inp/dir.txt @@ -1 +1 @@ -inp files will be stored here. \ No newline at end of file +Game recordings will be placed here diff --git a/makefile b/makefile index aab255b94..bc397712f 100644 --- a/makefile +++ b/makefile @@ -52,6 +52,7 @@ CPUS+=M6502@ CPUS+=M65C02@ #CPUS+=M65SC02@ #CPUS+=M65CE02@ +#CPUS+=M6509@ CPUS+=M6510@ CPUS+=N2A03@ CPUS+=H6280@ @@ -78,6 +79,7 @@ CPUS+=M6809@ CPUS+=KONAMI@ CPUS+=M68000@ CPUS+=M68010@ +CPUS+=M68EC020@ CPUS+=M68020@ CPUS+=T11@ CPUS+=S2650@ @@ -121,6 +123,7 @@ SOUNDS+=POKEY@ SOUNDS+=NES@ SOUNDS+=ASTROCADE@ SOUNDS+=NAMCO@ +SOUNDS+=TMS36XX@ SOUNDS+=TMS5220@ SOUNDS+=VLM5030@ SOUNDS+=ADPCM@ @@ -225,6 +228,13 @@ CPUOBJS += obj/cpu/m6502/m65ce02.o DBGOBJS += obj/cpu/m6502/6502dasm.o endif +CPU=$(strip $(findstring M6509@,$(CPUS))) +ifneq ($(CPU),) +CPUDEFS += -DHAS_M6509=1 +CPUOBJS += obj/cpu/m6502/m6509.o +DBGOBJS += obj/cpu/m6502/6502dasm.o +endif + CPU=$(strip $(findstring M6510@,$(CPUS))) ifneq ($(CPU),) CPUDEFS += -DHAS_M6510=1 @@ -421,6 +431,20 @@ endif DBGOBJS += obj/cpu/m68000/d68k.o endif +CPU=$(strip $(findstring M68EC020@,$(CPUS))) +ifneq ($(CPU),) +CPUDEFS += -DHAS_M68EC020=1 +ifdef X86_ASM_68K +CPUOBJS += obj/cpu/m68000/asmintf.o obj/cpu/m68000/68kem.oa +ASMDEFS += -DA68KEM +else +CPUOBJS += obj/cpu/m68000/m68kops.og obj/cpu/m68000/m68kopac.og \ + obj/cpu/m68000/m68kopdm.og obj/cpu/m68000/m68kopnz.og \ + obj/cpu/m68000/m68kcpu.o obj/cpu/m68000/m68kmame.o +endif +DBGOBJS += obj/cpu/m68000/d68k.o +endif + CPU=$(strip $(findstring M68020@,$(CPUS))) ifneq ($(CPU),) CPUDEFS += -DHAS_M68020=1 @@ -686,6 +710,12 @@ SOUNDDEFS += -DHAS_NAMCO=1 SOUNDOBJS += obj/sound/namco.o endif +SOUND=$(strip $(findstring TMS36XX@,$(SOUNDS))) +ifneq ($(SOUND),) +SOUNDDEFS += -DHAS_TMS36XX=1 +SOUNDOBJS += obj/sound/tms36xx.o +endif + SOUND=$(strip $(findstring TMS5220@,$(SOUNDS))) ifneq ($(SOUND),) SOUNDDEFS += -DHAS_TMS5220=1 @@ -853,7 +883,7 @@ COREOBJS = obj/version.o obj/driver.o obj/mame.o \ obj/machine/8255ppi.o \ obj/vidhrdw/generic.o obj/vidhrdw/vector.o \ obj/vidhrdw/avgdvg.o obj/machine/mathbox.o \ - obj/machine/ticket.o \ + obj/machine/ticket.o obj/machine/eeprom.o \ obj/mamedbg.o obj/window.o \ obj/profiler.o \ $(sort $(DBGOBJS)) \ @@ -861,7 +891,7 @@ COREOBJS = obj/version.o obj/driver.o obj/mame.o \ DRVLIBS = obj/pacman.a \ obj/nichibut.a \ obj/phoenix.a obj/namco.a obj/univers.a obj/nintendo.a \ - obj/midw8080.a obj/midwz80.a obj/meadows.a obj/midway.a \ + obj/midw8080.a obj/meadows.a obj/midway.a \ obj/irem.a obj/gottlieb.a obj/taito.a obj/toaplan.a \ obj/kyugo.a obj/williams.a obj/gremlin.a obj/vicdual.a \ obj/capcom.a obj/capbowl.a obj/leland.a \ @@ -905,6 +935,9 @@ $(EMULATOR_EXE): $(COREOBJS) $(MSDOSOBJS) $(OBJS) $(LIBS) $(LD) $(LDFLAGS) $(COREOBJS) $(MSDOSOBJS) $(OBJS) $(LIBS) -o $@ ifndef DEBUG upx $(EMULATOR_EXE) + $(EMULATOR_EXE) -gamelistheader -noclones > gamelist.txt + $(EMULATOR_EXE) -gamelist -noclones | sort >> gamelist.txt + $(EMULATOR_EXE) -gamelistfooter >> gamelist.txt endif romcmp.exe: obj/romcmp.o obj/unzip.o @@ -1006,9 +1039,7 @@ obj/midw8080.a: \ obj/machine/8080bw.o obj/machine/74123.o \ obj/vidhrdw/8080bw.o obj/sndhrdw/8080bw.o obj/drivers/8080bw.o \ obj/vidhrdw/m79amb.o obj/drivers/m79amb.o \ - -obj/midwz80.a: \ - obj/vidhrdw/z80bw.o obj/sndhrdw/z80bw.o obj/drivers/z80bw.o \ + obj/sndhrdw/z80bw.o obj/drivers/z80bw.o \ obj/meadows.a: \ obj/drivers/lazercmd.o obj/vidhrdw/lazercmd.o \ @@ -1098,7 +1129,7 @@ obj/capcom.a: \ obj/vidhrdw/tigeroad.o obj/drivers/tigeroad.o \ obj/vidhrdw/lastduel.o obj/drivers/lastduel.o \ obj/vidhrdw/sf1.o obj/drivers/sf1.o \ - obj/machine/kabuki.o obj/machine/eeprom.o \ + obj/machine/kabuki.o \ obj/vidhrdw/mitchell.o obj/drivers/mitchell.o \ obj/vidhrdw/cbasebal.o obj/drivers/cbasebal.o \ obj/vidhrdw/cps1.o obj/drivers/cps1.o \ @@ -1118,7 +1149,6 @@ obj/sega.a: \ obj/machine/segacrpt.o \ obj/vidhrdw/sega.o obj/sndhrdw/sega.o obj/machine/sega.o obj/drivers/sega.o \ obj/vidhrdw/segar.o obj/sndhrdw/segar.o obj/machine/segar.o obj/drivers/segar.o \ - obj/sndhrdw/monsterb.o \ obj/vidhrdw/zaxxon.o obj/sndhrdw/zaxxon.o obj/drivers/zaxxon.o \ obj/sndhrdw/congo.o obj/drivers/congo.o \ obj/machine/turbo.o obj/vidhrdw/turbo.o obj/drivers/turbo.o \ @@ -1300,6 +1330,7 @@ obj/atari.a: \ obj/snk.a: \ obj/vidhrdw/rockola.o obj/sndhrdw/rockola.o obj/drivers/rockola.o \ + obj/vidhrdw/lasso.o obj/drivers/lasso.o \ obj/drivers/munchmo.o \ obj/vidhrdw/marvins.o obj/drivers/marvins.o \ obj/drivers/hal21.o \ @@ -1409,7 +1440,7 @@ obj/other.a: \ obj/vidhrdw/spacefb.o obj/sndhrdw/spacefb.o obj/drivers/spacefb.o \ obj/vidhrdw/blueprnt.o obj/drivers/blueprnt.o \ obj/drivers/omegrace.o \ - obj/vidhrdw/dday.o obj/sndhrdw/dday.o obj/drivers/dday.o \ + obj/vidhrdw/dday.o obj/drivers/dday.o \ obj/vidhrdw/gundealr.o obj/drivers/gundealr.o \ obj/machine/leprechn.o obj/vidhrdw/leprechn.o obj/drivers/leprechn.o \ obj/vidhrdw/hexa.o obj/drivers/hexa.o \ @@ -1432,6 +1463,7 @@ obj/other.a: \ obj/vidhrdw/bjtwin.o obj/drivers/bjtwin.o \ obj/vidhrdw/aztarac.o obj/sndhrdw/aztarac.o obj/drivers/aztarac.o \ obj/vidhrdw/mole.o obj/drivers/mole.o \ + obj/vidhrdw/gotya.o obj/drivers/gotya.o \ # dependencies obj/cpu/z80/z80.o: z80.c z80.h z80daa.h @@ -1442,8 +1474,9 @@ obj/cpu/i8039/i8039.o: i8039.c i8039.h obj/cpu/i8085/i8085.o: i8085.c i8085.h i8085cpu.h i8085daa.h obj/cpu/i86/i86.o: i86.c i86.h i86intrf.h ea.h host.h instr.h modrm.h obj/cpu/nec/nec.o: nec.c nec.h necintrf.h necea.h nechost.h necinstr.h necmodrm.h -obj/cpu/m6502/m6502.o: m6502.c m6502.h ops02.h t6502.c t65c02.c t65sc02.c t6510.c tn2a03.c -obj/cpu/m65ce02/m65ce02.o: m65ce02.c m65ce02.h opsce02.h t6ce502.c +obj/cpu/m6502/m6502.o: m6502.c m6502.h ops02.h t6502.c t65c02.c t65sc02.c t6510.c +obj/cpu/m6502/m65ce02.o: m65ce02.c m65ce02.h opsce02.h t65ce02.c +obj/cpu/m6502/m6509.o: m6509.c m6509.h ops09.h t6509.c obj/cpu/m6800/m6800.o: m6800.c m6800.h 6800ops.c 6800tbl.c obj/cpu/m6805/m6805.o: m6805.c m6805.h 6805ops.c obj/cpu/m6809/m6809.o: m6809.c m6809.h 6809ops.c 6809tbl.c diff --git a/makefile.mes b/makefile.mes index ba4f0a24f..b98d0985a 100644 --- a/makefile.mes +++ b/makefile.mes @@ -79,6 +79,7 @@ CPUS+=M6809@ #CPUS+=KONAMI@ CPUS+=M68000@ #CPUS+=M68010@ +#CPUS+=M68EC020@ #CPUS+=M68020@ #CPUS+=T11@ #CPUS+=S2650@ @@ -99,7 +100,7 @@ CPUS+=PDP1@ # uncomment the following lines to include a sound core SOUNDS+=CUSTOM@ -#SOUNDS+=SAMPLES@ +SOUNDS+=SAMPLES@ SOUNDS+=DAC@ SOUNDS+=AY8910@ #SOUNDS+=YM2203@ @@ -122,6 +123,7 @@ SOUNDS+=TIA@ SOUNDS+=NES@ SOUNDS+=ASTROCADE@ #SOUNDS+=NAMCO@ +#SOUNDS+=TMS36XX@ SOUNDS+=TMS5220@ #SOUNDS+=VLM5030@ #SOUNDS+=ADPCM@ @@ -429,6 +431,20 @@ endif DBGOBJS += obj/cpu/m68000/d68k.o endif +CPU=$(strip $(findstring M68EC020@,$(CPUS))) +ifneq ($(CPU),) +CPUDEFS += -DHAS_M68EC020=1 +ifdef X86_ASM_68K +CPUOBJS += obj/cpu/m68000/asmintf.o obj/cpu/m68000/68kem.oa +ASMDEFS += -DA68KEM +else +CPUOBJS += obj/cpu/m68000/m68kops.og obj/cpu/m68000/m68kopac.og \ + obj/cpu/m68000/m68kopdm.og obj/cpu/m68000/m68kopnz.og \ + obj/cpu/m68000/m68kcpu.o obj/cpu/m68000/m68kmame.o +endif +DBGOBJS += obj/cpu/m68000/d68k.o +endif + CPU=$(strip $(findstring M68020@,$(CPUS))) ifneq ($(CPU),) CPUDEFS += -DHAS_M68020=1 @@ -694,6 +710,12 @@ SOUNDDEFS += -DHAS_NAMCO=1 SOUNDOBJS += obj/sound/namco.o endif +SOUND=$(strip $(findstring TMS36XX@,$(SOUNDS))) +ifneq ($(SOUND),) +SOUNDDEFS += -DHAS_TMS36XX=1 +SOUNDOBJS += obj/sound/tms36xx.o +endif + SOUND=$(strip $(findstring TMS5220@,$(SOUNDS))) ifneq ($(SOUND),) SOUNDDEFS += -DHAS_TMS5220=1 @@ -863,7 +885,7 @@ COREOBJS = obj/version.o obj/mess/system.o obj/mame.o obj/mess/mess.o \ obj/machine/8255ppi.o \ obj/vidhrdw/generic.o obj/vidhrdw/vector.o \ obj/vidhrdw/avgdvg.o obj/machine/mathbox.o \ - obj/machine/ticket.o \ + obj/machine/ticket.o obj/machine/eeprom.o \ obj/mamedbg.o obj/window.o \ obj/profiler.o \ $(sort $(DBGOBJS)) \ @@ -936,7 +958,10 @@ $(EMULATOR_EXE): $(COREOBJS) $(MSDOSOBJS) $(OBJS) $(LIBS) $(CC) $(CDEFS) $(CFLAGS) $(TINYFLAGS) -DMESS -c src/version.c -o obj/version.o $(LD) $(LDFLAGS) $(COREOBJS) $(MSDOSOBJS) $(OBJS) $(LIBS) -o $@ ifndef DEBUG + $(EMULATOR_EXE) -listtext > mess.txt + $(EMULATOR_EXE) -listdevices >> mess.txt upx $(EMULATOR_EXE) + endif romcmp.exe: obj/romcmp.o obj/unzip.o @@ -1245,7 +1270,6 @@ obj/motorola.a: \ obj/mess/machine/mekd2.o \ obj/mess/systems/mekd2.o - # dependencies obj/cpu/z80/z80.o: z80.c z80.h z80daa.h obj/cpu/z8000/z8000.o: z8000.c z8000.h z8000cpu.h z8000dab.h z8000ops.c z8000tbl.c @@ -1255,8 +1279,9 @@ obj/cpu/i8039/i8039.o: i8039.c i8039.h obj/cpu/i8085/i8085.o: i8085.c i8085.h i8085cpu.h i8085daa.h obj/cpu/i86/i86.o: i86.c i86.h i86intrf.h ea.h host.h instr.h modrm.h obj/cpu/nec/nec.o: nec.c nec.h necintrf.h necea.h nechost.h necinstr.h necmodrm.h -obj/cpu/m6502/m6502.o: m6502.c m6502.h ops02.h t6502.c t65c02.c t65sc02.c t6510.c tn2a03.c -obj/cpu/m65ce02/m65ce02.o: m65ce02.c m65ce02.h opsce02.h t6ce502.c +obj/cpu/m6502/m6502.o: m6502.c m6502.h ops02.h t6502.c t65c02.c t65sc02.c t6510.c +obj/cpu/m6502/m65ce02.o: m65ce02.c m65ce02.h opsce02.h t65ce02.c +obj/cpu/m6502/m6509.o: m6509.c m6509.h ops09.h t6509.c obj/cpu/m6800/m6800.o: m6800.c m6800.h 6800ops.c 6800tbl.c obj/cpu/m6805/m6805.o: m6805.c m6805.h 6805ops.c obj/cpu/m6809/m6809.o: m6809.c m6809.h 6809ops.c 6809tbl.c @@ -1355,6 +1380,7 @@ cleantiny: del obj\msdos\input.o + messdir: md obj\mess md obj\mess\machine diff --git a/memcard/dir.txt b/memcard/dir.txt index f6a46ef06..81f6b9267 100644 --- a/memcard/dir.txt +++ b/memcard/dir.txt @@ -1 +1 @@ -memcard files will be stored here (not used in MESS). \ No newline at end of file +Memory card files will be placed here diff --git a/mess.txt b/mess.txt index 7b16e6109..8440a8337 100644 --- a/mess.txt +++ b/mess.txt @@ -1,9 +1,12 @@ ========================================== M.E.S.S. - Multi-Emulator Super System - Copyright (C) 1999 by the MESS team - Official Page at: http://mess.emuverse.com + Copyright (C) 1998-2000 + by the MESS team + Official Page at: http://mess.emuverse.com ========================================== - + +This document is generated for MESS 0.36 RELEASE CANDIDATE 2 (Mar 25 2000) + Please note that many people helped with this project, either directly or by releasing source code which was used to write the drivers. We are not trying to appropriate merit which isn't ours. See the acknowledgemnts section for a list @@ -13,42 +16,25 @@ specific driver. Again, that list might be incomplete. We apologize in advance for any omission. All trademarks cited in this document are property of their respective owners. - -Especially, the MESS team would like to thank Nicola Salmoria and the MAME team -for letting us play with their code and, in fact, incorporating MESS specific -code into MAME. Without it, MESS would be substantially less than what it is +Especially, the MESS team would like to thank Nicola Salmoria and the MAME team +for letting us play with their code and, in fact, incorporating MESS specific +code into MAME. Without it, MESS would be substantially less than what it is right now! ;-) - Usage and Distribution Licence: =============================== - -- MESS usage and distribution follows that of MAME. Please read the MAME +- MESS usage and distribution follows that of MAME. Please read the MAME readme.txt file distributed with MESS for further information. - - How to Contact The MESS Team ============================ - -Here are some of the people contributing to MESS. If you have comments, -suggestions or bug reports about an existing driver, check the driver's Credits -section to find who has worked on it, and send comments to that person. If you -are not sure who to contact, write to Ben (ben@netstra.com.au) - who is the -current coordinator of the MESS project [DOS]. If you have comments specific to a -given operating system, they should be sent to the respective port maintainer. -You will find their e-mail address below. - -Mike Balfour mab22@po.cwru.edu -Richard Bannister titan@indigo.ie -Ben Bruscella ben@netstra.com.au -Juergen Buchmueller pullmoll@t-online.de -Jeff Mitchell skeezix@skeleton.org -Gareth Long gatch@elecslns.demon.co.uk -Brad Oliver bradman@primenet.com +Visit the web page at http://mess.emuverse.com to see a list of contributers +If you have comments, suggestions or bug reports about an existing driver, check +the page contacts section to find who has worked on it, and send comments to that +person. If you are not sure who to contact, write to Ben (ben@mame.net) - who is the +current coordinator of the MESS project [DOS]. PLEASE DON'T SEND BINARY ATTACHMENTS WITHOUT ASKING FIRST, *ESPECIALLY* ROM IMAGES. - THESE ARE NOT SUPPORT ADDRESSES. Support questions sent to these addresses *will* be ignored. Please understand that this is a *free* project, mostly targeted at experienced users. We don't have the resources to provide end user @@ -57,212 +43,461 @@ First of all, read this doc carefully. If you still can't find an answer to your question, try checking the beginner's sections that many emulation pages have, or ask on the appropriate Usenet newsgroups (e.g. comp.emulators.misc) or on the many emulation message boards. The official MESS message board is at: - http://mess.emuverse.com + http://mess.emuverse.com - -Also, DO NOT SEND REQUESTS FOR NEW SYSTEMS TO ADD, unless you have some original +Also, please DO NOT SEND REQUESTS FOR NEW SYSTEMS TO ADD, unless you have some original info on the hardware or, even better, have the technical expertise needed to help us. Please don't send us information widely available on the Internet - we are perfectly capable of finding it ourselves, thank you. - -CURRENTLY EMULATED: -============================================================================== -Here are the currently supported systems (mess -listfull): - -System: Description: ---------------------------------------------- -a400 "Atari 400 (NTSC)" -a400pal "Atari 400 (PAL)" -a5200 "Atari 5200" -a7800 "Atari 7800" -a800 "Atari 800 (NTSC)" -a800pal "Atari 800 (PAL)" -a800xl "Atari 800XL" -advision "Adventurevision" -amiga "Amiga (NTSC)" -apple1 "Apple 1 8k" -apple2c "Apple //c" -apple2c0 "Apple //c (3.5 ROM)" -apple2cp "Apple //c Plus" -apple2e "Apple //e" -apple2ee "Apple //e (enhanced)" -apple2ep "Apple //e (Platinum)" -astrocde "Bally Arcade/Astrocade" -aszmic "ZX.Aszmic" -c128 "Commodore C128 (NTSC) 656x216" -c128fra "Commodore C128 French (PAL) 656x432" -c128ger "Commodore C128 German (PAL) 336x216" -c16 "Commodore C16/C116/C232/C264 (PAL)" -c364 "Commodore 364 (Prototype)" -c64 "Commodore C64 (NTSC)" -c64gs "Commodore C64GS (NTSC)" -c64pal "Commodore C64/VC64/VIC64 (PAL)" -c65 "Commodore C65 Prototype (C64DX) (NTSC)" -c65ger "Commodore C65 Prototype German (C64DX) (PAL)" -cbm30 "Commodore CBM3000 Series (Basic 2)" -cbm30b "Commodore CBM3000 Series (Basic 2) (business keyboard)" -cbm40 "Commodore CBM4000 FAT Series (CRTC 50Hz)" -cbm4064 "Commodore CBM4064/Pet64/Educator64 (NTSC)" -cbm40b "Commodore CBM4000 THIN Series (business keyboard)" -cbm500 "Commodore B128-40/Pet-II/P500 60Hz" -cbm610 "Commodore B128-80LP/610 60Hz" -cbm620 "Commodore B256-80LP/620 Hungarian 50Hz" -cbm710 "Commodore B128-80HP/710" -cbm720 "Commodore B256-80HP/720" -cbm80 "Commodore CBM8000 60Hz" -cbm80ger "Commodore CBM8000 German (50Hz)" -cbm80swe "Commodore CBM8000 Swedish (50Hz)" -cgenie "Colour Genie EG2000" -coco "Color Computer" -coco3 "Color Computer 3" -coleco "Colecovision" -cp400 "Prologica CP400" -cpc464 "Amstrad/Schneider CPC464" -cpc6128 "Amstrad/Schneider CPC6128" -cpc664 "Amstrad/Schneider CPC664" -dragon32 "Dragon 32" -ep128 "Enterprise 128K" -fellow "Salora Fellow" -gameboy "GameBoy" -gamegear "Sega Game Gear" -genesis "Sega Megadrive / Genesis" -jupiter "Jupiter Ace 49k" -kaypro "Kaypro 2x" -kc85_4 "KC 85/4" -kccomp "KC Compact" -kim1 "KIM-1" -laser110 "Laser 110" -laser200 "Laser 200" -laser210 "Laser 210" -laser310 "Laser 310" -laser350 "Laser 350" -laser500 "Laser 500" -laser700 "Laser 700" -macplus "Macintosh Plus" -max "Commodore Max (VIC10/Ultimax/Vickie)" -mbee "Microbee 32K" -mbee56k "Microbee 56K (CP/M)" -mc10 "MC-10" -msx "MSX1" -msxj "MSX1 (Japan)" -msxkr "MSX1 (Korean)" -nascom1 "Nascom 1" -nes "Nintendo Entertainment System/Famicom" -oric1 "Oric 1" -orica "Oric Atmos" -p2000m "Philips P2000M" -p2000t "Philips P2000T" -pc8300 "PC8300" -pccga "IBM PC-XT CGA" -pce "PC-Engine" -pcmda "IBM PC-XT MDA" -pdp1 "PDP1 Spacewar!" -pet "Commodore PET2000/CBM2000 Series (Basic 1)" -plus4 "Commodore +4 (NTSC)" -pow3000 "Power 3000" -raaspec "RA+A Spectrum I+" -sfzch "CPS Changer (Street Fighter ZERO)" -sms "Sega Master System" -specpls3 "Spectrum +3" -spectrum "ZX-Spectrum 48k" -superbrd "Superboard" -sx64 "Commodore SX64/VIP64 (PAL)" -sys80 "System-80" -tandy1t "Tandy 1000TX" -ti99_4 "TI99/4 Home Computer (60 Hz)" -ti99_4a "TI99/4A Home Computer (60 Hz)" -ti99_4ae "TI99/4A Home Computer (50 Hz)" -ti99_4e "TI99/4 Home Computer (50 Hz)" -trs80 "TRS-80 Model I (Level II Basic)" -ts1000 "TS1000" -tx8000 "Texet TX8000" -uk101 "Compukit UK101" -vc20 "Commodore VC20 (PAL)" -vectrex "GCE Vectrex" -vic20 "Commodore VIC20 (NTSC)" -vz200 "Sanyo / Dick Smith VZ200" -vz300 "Sanyo / Dick Smith VZ300" -zx80 "ZX-80" -zx81 "ZX-81" - - -MESS USAGE -========== - -MESS <[file1] [file2] [file...]> +Complete Emulated System List +============================= +Here is the list of systems supported by MESS 0.36 RELEASE CANDIDATE 2 (Mar 25 2000) + +The meanings of the columns are as follows: +Working - "No" means that the emulation has shortcomings that cause the system + not to work correctly. This can be anywhere from just showing a black screen + to not being playable with major problems. +Correct Colors - "Yes" means that colors should be identical to the original, + "Close" that they are very similar but wrong in places, "No" that they are + completely wrong. +Sound - "Partial" means that sound support is either incomplete or not entirely + accurate. +Internal Name - This is the unique name that should be specified on the command + line to run the system. ROMs must be placed in the ROM path, either in a .zip + file or in a subdirectory of the same name. The former is suggested, because + the files will be identified by their CRC instead of requiring specific + names. NOTE! that as well as required ROM files to emulate the system, you may + also attach IMAGES of files created for system specific devices (some examples of + devices are cartridges, floppydisks, harddisks, etc). See below for a complete list + of a systems supported devices and common file formats used for that device + +System Information can be obtained from the SysInfo.dat file (online in the MESS UI +from the Machine history) or sysinfo.htm. To generate sysinfo.htm, execute +dat2html.exe. + + ++-----------------------------------------+-------+-------+-------+----------+ +| | |Correct| | Internal | +| System Name |Working|Colors | Sound | Name | ++-----------------------------------------+-------+-------+-------+----------+ +| Atari 5200 | Yes | Yes | Yes | a5200 | +| Atari 7800 | Yes | Yes | Yes | a7800 | +| Bally Arcade/Astrocade | Yes | Yes | Yes | astrocde | +| Colecovision | Yes | Yes | Yes | coleco | +| Nintendo Entertainment System/Famicom | Yes | Yes | Yes | nes | +| GameBoy | No | Yes | No | gameboy | +| PC-Engine | No | Yes | No | pce | +| Sega Game Gear | Yes | Yes | Yes | gamegear | +| Sega Master System | Yes | Yes | Yes | sms | +| Sega Megadrive / Genesis | Yes | Yes | Yes | genesis | +| GCE Vectrex | Yes | Yes | Yes | vectrex | +| RA+A Spectrum I+ | Yes | Yes | Yes | raaspec | +| Adventurevision | Yes | Yes | No | advision | +| Apple 1 8k | Yes | Yes | Yes | apple1 | +| Apple //c | Yes | Yes | Yes | apple2c | +| Apple //c (3.5 ROM) | Yes | Yes | Yes | apple2c0 | +| Apple //c Plus | Yes | Yes | Yes | apple2cp | +| Apple //e | Yes | Yes | Yes | apple2e | +| Apple //e (enhanced) | Yes | Yes | Yes | apple2ee | +| Apple //e (Platinum) | Yes | Yes | Yes | apple2ep | +| Macintosh Plus | No | Yes | Yes | macplus | +| Atari 400 (NTSC) | Yes | Yes | Yes | a400 | +| Atari 400 (PAL) | Yes | Yes | Yes | a400pal | +| Atari 800 (NTSC) | Yes | Yes | Yes | a800 | +| Atari 800 (PAL) | Yes | Yes | Yes | a800pal | +| Atari 800XL | No(1) | Yes | Yes | a800xl | +| Commodore C16/C116/C232/C264 (PAL) | Yes | Close |Partial| c16 | +| Commodore C16/C116/C232/C264 (PAL), C155| No(1) | Close |Partial| c16c | +| Commodore +4 (NTSC) | Yes | Close |Partial| plus4 | +| Commodore +4 (NTSC), C1551 | No(1) | Close |Partial| plus4c | +| Commodore 364 (Prototype) | Yes | Close |Partial| c364 | +| Commodore C64 (NTSC) | Yes | Yes | No | c64 | +| Commodore C64/VC64/VIC64 (PAL) | Yes | Yes | No | c64pal | +| Commodore C64GS (NTSC) | Yes | Yes | No | c64gs | +| Commodore CBM4064/Pet64/Educator64 (NTSC| Yes | Yes | No | cbm4064 | +| Commodore Max (VIC10/Ultimax/Vickie) | Yes | Yes | No | max | +| Commodore C65/C64DX (Prototype) NTSC | No | Yes | No | c65 | +| Commodore C65/C64DX (Prototype) German (| No | Yes | No | c65ger | +| Commodore C128 NTSC 656x216 | Yes | Yes | No | c128 | +| Commodore C128 German (PAL) 336x216 | Yes | Yes | No | c128ger | +| Commodore C128 French (PAL) 656x432 | Yes | Yes | No | c128fra | +| Commodore VIC20 (NTSC) | Yes | Yes |Partial| vic20 | +| Commodore VC20 (PAL) | Yes | Yes |Partial| vc20 | +| Commodore PET2001/CBM2000 Series (Basic | Yes | Yes | No | pet | +| Commodore CBM3000 Series (Basic 2) | Yes | Yes | No | cbm30 | +| Commodore CBM3000 Series (Basic 2) (busi| Yes | Yes | No | cbm30b | +| Commodore CBM4000 FAT Series (CRTC 50Hz)| Yes | Yes | No | cbm40 | +| Commodore CBM4000 THIN Series (business | Yes | Yes | No | cbm40b | +| Commodore CBM8000 60Hz | Yes | Yes | No | cbm80 | +| Commodore CBM8000 German (50Hz) | Yes | Yes | No | cbm80ger | +| Commodore CBM8000 Swedish (50Hz) | Yes | Yes | No | cbm80swe | +| Commodore B128-80HP/710 | No | Yes | No | cbm710 | +| Commodore B256-80HP/720 | No | Yes | No | cbm720 | +| Commodore B128-80LP/610 60Hz | No | Yes | No | cbm610 | +| Commodore B256-80LP/620 Hungarian 50Hz | No | Yes | No | cbm620 | +| Commodore B128-40/Pet-II/P500 60Hz | No | Yes | No | cbm500 | +| Amiga (NTSC) | No | Yes | Yes | amiga | +| Amstrad/Schneider CPC464 | Yes | Yes | Yes | cpc464 | +| Amstrad/Schneider CPC664 | Yes | Yes | Yes | cpc664 | +| Amstrad/Schneider CPC6128 | Yes | Yes | Yes | cpc6128 | +| KC Compact | Yes | Yes | Yes | kccomp | +| KC 85/4 | No | Yes | Yes | kc85_4 | +| Jupiter Ace 49k | Yes | Yes | Yes | jupiter | +| Enterprise 128K | Yes | Yes | No | ep128 | +| Kaypro 2x | Yes | Yes | Yes | kaypro | +| Microbee 32K | Yes | Yes | Yes | mbee | +| Microbee 56K (CP/M) | Yes | Yes | Yes | mbee56k | +| Color Computer | Yes | Yes | Yes | coco | +| Color Computer 3 | Yes | Yes | Yes | coco3 | +| Prologica CP400 | Yes | Yes | Yes | cp400 | +| TRS-80 Model I (Level II Basic) | Yes | Yes | Yes | trs80 | +| MC-10 | Yes | Yes | Yes | mc10 | +| Dragon 32 | Yes | Yes | Yes | dragon32 | +| Colour Genie EG2000 | Yes | Yes | Yes | cgenie | +| System-80 | Yes | Yes | Yes | sys80 | +| Laser 110 | Yes | Yes | Yes | laser110 | +| Laser 200 | Yes | Yes | Yes | laser200 | +| Laser 210 | Yes | Yes | Yes | laser210 | +| Sanyo / Dick Smith VZ200 | Yes | Yes | Yes | vz200 | +| Salora Fellow | Yes | Yes | Yes | fellow | +| Texet TX8000 | Yes | Yes | Yes | tx8000 | +| Laser 310 | Yes | Yes | Yes | laser310 | +| Sanyo / Dick Smith VZ300 | Yes | Yes | Yes | vz300 | +| Laser 350 | Yes | Yes | Yes | laser350 | +| Laser 500 | Yes | Yes | Yes | laser500 | +| Laser 700 | Yes | Yes | Yes | laser700 | +| Oric 1 | Yes | Yes | Yes | oric1 | +| Oric Atmos | Yes | Yes | Yes | orica | +| TI99/4 Home Computer (60 Hz) | Yes | Yes | Yes | ti99_4 | +| TI99/4 Home Computer (50 Hz) | Yes | Yes | Yes | ti99_4e | +| TI99/4A Home Computer (60 Hz) | Yes | Yes | Yes | ti99_4a | +| TI99/4A Home Computer (50 Hz) | Yes | Yes | Yes | ti99_4ae | +| IBM PC-XT MDA | Yes | Yes | Yes | pcmda | +| IBM PC-XT CGA | Yes | Yes | Yes | pccga | +| Tandy 1000TX | No(1) | Close | Yes | tandy1t | +| Philips P2000T | Yes | Yes | Yes | p2000t | +| Philips P2000M | Yes | Yes | Yes | p2000m | +| Compukit UK101 | Yes | Yes | Yes | uk101 | +| Superboard | Yes | Yes | Yes | superbrd | +| ZX-80 | No | Yes | Yes | zx80 | +| ZX-81 | No | Yes | Yes | zx81 | +| TS1000 | No | Yes | Yes | ts1000 | +| ZX.Aszmic | No | Yes | Yes | aszmic | +| PC8300 | No | Yes | Yes | pc8300 | +| Power 3000 | No | Yes | Yes | pow3000 | +| ZX-Spectrum 48k | Yes | Yes | Yes | spectrum | +| Spectrum +3 | Yes | Yes | Yes | specpls3 | +| MSX1 | Yes | Yes | Yes | msx | +| MSX1 (Japan) | Yes | Yes | Yes | msxj | +| MSX1 (Korean) | Yes | Yes | Yes | msxkr | +| MSX1 (UK) | Yes | Yes | Yes | msxuk | +| Nascom 1 | Yes | Yes | Yes | nascom1 | +| KIM-1 | Yes | Yes | Yes | kim1 | +| PDP1 Spacewar! | Yes | Yes | Yes | pdp1 | +| CPS Changer (Street Fighter ZERO) | Yes | Yes | Yes | sfzch | ++-----------------------------------------+-------+-------+-------+----------+ +(1) There are variants of the system that work correctly +(2) Needs samples provided separately + + + + +QUICK MESS USAGE GUIDE! +======================= +In order to use MESS, you must at least specify at the command line + + MESS + +This will emulate the system requested. Note that most systems require ROMS for +emulation. These system ROM files are copyright and ARE NOT supplied with MESS. + +To use files created for the system emulated (IMAGES), MESS works by attaching an image +of the file created for the particular device of that system, for example, a cartridge, +floppydisk, harddisk, cassette, image etc. Therefore, in order to attach an image to the +system, you must specify at the command line: + + MESS + +To manually manipulate the emulation options, you must specify: + + MESS *For a complete list of systems emulated, use: MESS -listfull -*For system files required by each system, use: MESS -listroms -*See the MAME readme.txt for a detailed list of options. -*make sure you have roms in a subdirectory from your ROMPATH - with the same name as the system (eg ROMS/COLECO) +*For system files (ROMS) required by each system, use: MESS -listroms +*See below for valid device names and usage.*See the MAME readme.txt and below for a detailed list of options. + +Make sure you have ROMS and IMAGES in a subdirectory from your ROMPATH +with the same name as the system (eg ROMS/COLECO) + Examples: -MESS nes zelda.nes - will run MESS in the following way: - = nes (Nintendo Entertainment System) - = zelda.nes (Zelda cartridge) - = default options (all listed in mess.cfg) - -MESS coleco dkong.rom -soundcard 0 + MESS nes -cart zelda.nes + will attach zelda.nes to the cartridge device and run MESS in + the following way: + = nes (Nintendo Entertainment System) + = CARTRIDGE + = zelda.nes (Zelda cartridge) + = none specified, so default options (see mess.cfg) + + MESS coleco -cart dkong -soundcard 0 will run MESS in the following way: - = coleco (Nintendo Entertainment System) - = dkong.rom (Donkey Kong cartridge) - = default options but without sound - -MESS trs80 boot.dsk arcade1.dsk + + = coleco (Nintendo Entertainment System) + = CARTRIDGE + = dkong.rom (Donkey Kong cartridge) + = default options without sound (see mess.cfg) + + MESS trs80 -flop boot.dsk -flop arcade1.dsk will run MESS in the following way: - = trs80 (TRs-80 model 1) - = boot.dsk (The Trs80 boot diskl) - = arcade1.dsk (Disk which contains games) - = default options (all listed in mess.cfg) - -MESS cgenie games1.dsk - will run the system Colour Genie with one disk image loaded - - - -A NOTE ABOUT FILES: - - Place files to be loaded in a subdirectory from you rompath with the - same name as the system you want to run. - (eg) ROMPATH = C:\MESS\ROMS; - The files for the coleco system would be placed here: - C:\MESS\ROMS\COLECO - - You can also specify the exact path to a file in the ROMPATH. - - - You can now specify switches on the commandlinem in which case - every image name following them goes to that respective slot, - regardless of it's extension. - - Some examples: - ; recognized by extension - mess a800 mule.xfd - mess oric1 game.tap - ; 'slot' overrides - mess vic20 -cassette a.dsk b.img c.d64 -floppy d.cas - mess amiga -floppy itdesert.adf - The switches are -rom, -floppy, -harddisk and -cassette. - Recognized extensions without overrides are now: - cassette: cas, cmd, tap, t64, vz - harddisk: img - floppy: d64, dsk, adf, atr, xfd, vzd - roms: everything else - - -MESS specific switches: ------------------------ --listextensions: obtain information about each driver in terms of - DEVICE supported, and common file extensions for each - of these devices. - - - -System Information: -------------------- - -See SysInfo.dat (online in the MESS UI from the Machine history) or -sysinfo.htm for all system related information. TO generate -sysinfo.html, execute dat2html.exe. + = trs80 (TRs-80 model 1) + = FLOPPYDISK + = boot.dsk (The Trs80 boot floppy diskl) + = FLOPPYDISK + = arcade1.dsk (floppy Disk which contains games) + = default options (all listed in mess.cfg) + + MESS cgenie -fd games1 + will run the system Colour Genie with one disk image loaded, + automatically appending the file extension .dsk. + + + + +DEVICE support list +=================== +As mentioned, in order to fully utilise MESS, you will need to attach image files +to the system devices. The following list specifies all the devices and image +file extensions currently supported by MESS. Remember to use the DEVICE name +(or the brief name) to attach an image. This list can easily be generated by +specifying: + + MESS -listdevices + +Also note that MESS has a preliminary built-in File Manager for attaching images to +system devices. Use the UI (TAB key) to access. + + + + SYSTEM DEVICE NAME (brief) IMAGE FILE EXTENSIONS SUPPORTED +---------- -------------------- ------------------------------------ +a5200 Cartridge (Cart) .rom .bin +a7800 Cartridge (Cart) .a78 +astrocde Cartridge (Cart) .bin +coleco Cartridge (Cart) .rom +nes Cartridge (Cart) .nes +gameboy Cartridge (Cart) .gb +pce Cartridge (Cart) .pce +gamegear Cartridge (Cart) .gg +sms Cartridge (Cart) .sms +genesis Cartridge (Cart) .smd .bin .md +vectrex Cartridge (Cart) .bin .gam +raaspec UNKNOWN +advision Cartridge (Cart) .bin +apple1 UNKNOWN +apple2c Floppydisk (Flop) .dsk +apple2c0 Floppydisk (Flop) .dsk +apple2cp Floppydisk (Flop) .dsk +apple2e Floppydisk (Flop) .dsk +apple2ee Floppydisk (Flop) .dsk +apple2ep Floppydisk (Flop) .dsk +macplus Floppydisk (Flop) .dsk +a400 Cartridge (Cart) .rom .bin + Floppydisk (Flop) .atr .dsk .xfd +a400pal Cartridge (Cart) .rom .bin + Floppydisk (Flop) .atr .dsk .xfd +a800 Cartridge (Cart) .rom .bin + Floppydisk (Flop) .atr .dsk .xfd +a800pal Cartridge (Cart) .rom .bin + Floppydisk (Flop) .atr .dsk .xfd +a800xl Cartridge (Cart) .rom .bin + Floppydisk (Flop) .atr .dsk .xfd +c16 Quickload (Quik) .p00 .prg + Cartridge (Cart) .bin .rom + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +c16c Quickload (Quik) .p00 .prg + Cartridge (Cart) .bin .rom + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +plus4 Quickload (Quik) .p00 .prg + Cartridge (Cart) .bin .rom + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +plus4c Quickload (Quik) .p00 .prg + Cartridge (Cart) .bin .rom + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +c364 Quickload (Quik) .p00 .prg + Cartridge (Cart) .bin .rom + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +c64 Quickload (Quik) .p00 .prg + Cartridge (Cart) .crt .80 + Floppydisk (Flop) .d64 +c64pal Quickload (Quik) .p00 .prg + Cartridge (Cart) .crt .80 + Floppydisk (Flop) .d64 +c64gs Cartridge (Cart) .crt .80 +cbm4064 Quickload (Quik) .p00 .prg + Cartridge (Cart) .crt .80 + Floppydisk (Flop) .d64 +max Quickload (Quik) .p00 .prg + Cartridge (Cart) .crt .e0 .f0 +c65 Quickload (Quik) .p00 .prg +c65ger Quickload (Quik) .p00 .prg +c128 Quickload (Quik) .p00 .prg + Floppydisk (Flop) .d64 +c128ger Quickload (Quik) .p00 .prg + Floppydisk (Flop) .d64 +c128fra Quickload (Quik) .p00 .prg + Floppydisk (Flop) .d64 +vic20 Quickload (Quik) .p00 .prg + Cartridge (Cart) .a0 .20 .40 .60 .rom .bin + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +vc20 Quickload (Quik) .p00 .prg + Cartridge (Cart) .a0 .20 .40 .60 .rom .bin + Cassette (Cass) .wav + Floppydisk (Flop) .d64 +pet Quickload (Quik) .p00 .prg +cbm30 Quickload (Quik) .p00 .prg +cbm30b Quickload (Quik) .p00 .prg +cbm40 Quickload (Quik) .p00 .prg +cbm40b Quickload (Quik) .p00 .prg +cbm80 Quickload (Quik) .p00 .prg +cbm80ger Quickload (Quik) .p00 .prg +cbm80swe Quickload (Quik) .p00 .prg +cbm710 Quickload (Quik) .p00 .prg +cbm720 Quickload (Quik) .p00 .prg +cbm610 Quickload (Quik) .p00 .prg +cbm620 Quickload (Quik) .p00 .prg +cbm500 Quickload (Quik) .p00 .prg +amiga Floppydisk (Flop) .adf +cpc464 Cartridge (Cart) .sna + Floppydisk (Flop) .dsk + Cassette (Cass) .wav +cpc664 Cartridge (Cart) .sna + Floppydisk (Flop) .dsk + Cassette (Cass) .wav +cpc6128 Cartridge (Cart) .sna + Floppydisk (Flop) .dsk + Cassette (Cass) .wav +kccomp Cartridge (Cart) .sna + Floppydisk (Flop) .dsk + Cassette (Cass) .wav +kc85_4 UNKNOWN +jupiter Cartridge (Cart) .ace + Cassette (Cass) .tap +ep128 Floppydisk (Flop) .dsk +kaypro Floppydisk (Flop) .dsk +mbee Cartridge (Cart) .rom + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +mbee56k Cartridge (Cart) .rom + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +coco Snapshot (Snap) .pak + Cassette (Cass) .cas .wav + Floppydisk (Flop) .dsk +coco3 Snapshot (Snap) .pak + Cassette (Cass) .cas .wav + Floppydisk (Flop) .dsk +cp400 Snapshot (Snap) .pak + Cassette (Cass) .cas .wav + Floppydisk (Flop) .dsk +trs80 Cartridge (Cart) .rom + Cassette (Cass) .cas .cmd + Floppydisk (Flop) .dsk +mc10 Cassette (Cass) .cas .wav +dragon32 Snapshot (Snap) .pak + Cassette (Cass) .cas .wav + Floppydisk (Flop) .dsk +cgenie Cartridge (Cart) .rom + Cassette (Cass) .cas .cmd + Floppydisk (Flop) .dsk +sys80 Cartridge (Cart) .rom + Cassette (Cass) .cas .cmd + Floppydisk (Flop) .dsk +laser110 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +laser200 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +laser210 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +vz200 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +fellow Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +tx8000 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +laser310 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +vz300 Cassette (Cass) .wav .cas + Snapshot (Snap) .vz + Floppydisk (Flop) .dsk +laser350 Cartridge (Cart) .rom + Cassette (Cass) .wav .cas + Floppydisk (Flop) .dsk +laser500 Cartridge (Cart) .rom + Cassette (Cass) .wav .cas + Floppydisk (Flop) .dsk +laser700 Cartridge (Cart) .rom + Cassette (Cass) .wav .cas + Floppydisk (Flop) .dsk +oric1 Cartridge (Cart) .tap +orica Cartridge (Cart) .tap +ti99_4 Cartridge (Cart) .bin + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +ti99_4e Cartridge (Cart) .bin + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +ti99_4a Cartridge (Cart) .bin + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +ti99_4ae Cartridge (Cart) .bin + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +pcmda Floppydisk (Flop) .dsk + Harddisk (Hard) .img +pccga Floppydisk (Flop) .dsk + Harddisk (Hard) .img +tandy1t Floppydisk (Flop) .dsk + Harddisk (Hard) .img +p2000t UNKNOWN +p2000m UNKNOWN +uk101 UNKNOWN +superbrd UNKNOWN +zx80 Cassette (Cass) .80 .o +zx81 Cassette (Cass) .81 .p +ts1000 Cassette (Cass) .81 .p +aszmic Cassette (Cass) .80 .o +pc8300 Cassette (Cass) .81 .p +pow3000 Cassette (Cass) .81 .p +spectrum Cartridge (Cart) .sna .z80 .tap + Cassette (Cass) .wav +specpls3 Cartridge (Cart) .sna .z80 .tap + Cassette (Cass) .wav + Floppydisk (Flop) .dsk +msx Cartridge (Cart) .rom + Cassette (Cass) .wav +msxj Cartridge (Cart) .rom + Cassette (Cass) .wav +msxkr Cartridge (Cart) .rom + Cassette (Cass) .wav +msxuk Cartridge (Cart) .rom + Cassette (Cass) .wav +nascom1 UNKNOWN +kim1 Cassette (Cass) .kim +pdp1 Cartridge (Cart) .bin +sfzch UNKNOWN diff --git a/messnew.txt b/messnew.txt index 56df44d63..2fb424700 100644 --- a/messnew.txt +++ b/messnew.txt @@ -1,3 +1,66 @@ +0.36 Release Candidate 2 + +Note: .inp record/playback does still not work currently. +Note: DOS image loading at the command line has changed. see below + + +New System Drivers Supported (in no particular order): +------------------------------------------------------ +MSX1 UK [Sean Young] +C16 (c1551) [Peter Trauner] +Plus4 (c1551) [Peter Trauner] + + +System Driver Changes: +---------------------- +- COCO/Dragon - Implemented several obscure video modes (CoCo 3), fixes a bug in + flashing on hires text (CoCo 3), implemented the CoCo 3 timer, added several new + additional key mappings so things like backspace work [Nate Woods] + +- CBM family bugfixes, C64/C128 Mouse support, VIC20 Dipswitches fixes + [Peter Trauner] + +-Msx system driver bug fixes. [Sean Young] Also, for the latest news regarding + this excellent system driver, check out his MSX1 WIP page at: + http://www.msxnet.org/mess/ + + + +Other Changes: +-------------- + +- [DOS] Images specified at the command line must now be accompanied by the device they + are to be attached to, and will not be loaded unless the device is specified *and* + supported by that system. Eg, to attach a cartridge for the NES, you must specify: + MESS nes -cart galaga.nes + This may affect the usage of frontends, however it brings the MESS command line + into sync with the well accepted MAME convention. See mess.txt for options and + usage. + +- The core is based on MAME 0.36RC2. This incorporates all + features of the update to this core. [MAME team] + +- Image CRC's for clones can now be retreived from the parent named CRC file [Sean Young] + +- IO_QUICKLOAD for CBM system drivers. [Peter Trauner] + +- M65CE02 changes [Peter Trauner] + +- File Manager now much more user friendly [Kev Thacker, Juergen Buchmueller] + +- Note that -listextensions has been renamed to -listdevices. Use this to obtain + valid device names for use at the command line to attach images to the system. + +- Extensive CRC updates. + [Sean Young, Chris Henry, Gerardo Jorrin, Peter Trauner, Cowering] + SysInfo.dat documentation update + [Thierry Schimbi, Chris Henry, Kev Thacker, Raphael Nabet] + Please send all CRC/sysinfo file contributions to Chris Henry. + (battlepriest@hotmail.com). + + +----------------------------------------- + 0.36 Release Candidate 1 Note: .inp record/playback does still not work currently. diff --git a/readme.txt b/readme.txt index 691538aa1..7c408c288 100644 --- a/readme.txt +++ b/readme.txt @@ -105,7 +105,7 @@ worked on. Also, a totally legal and free ROM set of Robby Roto is available on the same page. If you have bugs to report, check the MAME Testing Project at -http://mameworld.retrogames.com/mametesters +http://www.mameworld.net/mametesters Here are some of the people contributing to MAME. If you have comments, suggestions, or bug reports about an existing driver, check the driver's @@ -135,8 +135,9 @@ your question, try checking the beginner's sections that many emulation pages have, or ask on the appropriate Usenet newsgroups (e.g. comp.emulators.misc) or on the official MAME message board at http://www.mame.net/msg/ -For help in compiling MAME, check this page: -http://mameworld.retrogames.com +For help in compiling MAME, check these pages: +http://www.mame.net/compile.html +http://www.mameworld.net Also, DO NOT SEND REQUESTS FOR NEW GAMES TO ADD, unless you have some original info on the game hardware or, even better, own the board and have the technical @@ -191,6 +192,9 @@ Video modes created using Tweak 1.6b by Robert Schmidt, who also wrote TwkUser.c. "inflate" code for zip file support by Mark Adler. +DOS executable compressed with UPX by Markus F.X.J. Oberhumer & Laszlo Molnar, + http://upx.tsx.org/ + Big thanks to Gary Walton (garyw@excels-w.demon.co.uk) for too many things to mention. @@ -437,6 +441,9 @@ Options: -hotrod Sets a default keyboard configuration suitable for the HotRod joystick by HanaHo Games. +-hotrodse Sets a default keyboard configuration suitable for the HotRod SE + joystick by HanaHo Games. + -log Creates a log of illegal memory accesses in ERROR.LOG -help, -? Displays current MAME version and copyright notice diff --git a/roms/sx64/dir.txt b/roms/c16c/dir.txt similarity index 100% rename from roms/sx64/dir.txt rename to roms/c16c/dir.txt diff --git a/src/mess/dir_list/roms/sx64/dir.txt b/roms/msxuk/dir.txt similarity index 100% rename from src/mess/dir_list/roms/sx64/dir.txt rename to roms/msxuk/dir.txt diff --git a/roms/plus4c/dir.txt b/roms/plus4c/dir.txt new file mode 100644 index 000000000..0950580bf --- /dev/null +++ b/roms/plus4c/dir.txt @@ -0,0 +1 @@ +Files for this system go here. \ No newline at end of file diff --git a/samples/dir.txt b/samples/dir.txt index 248e0aa37..1980bb732 100644 --- a/samples/dir.txt +++ b/samples/dir.txt @@ -1 +1 @@ -sample files will be stored here (not used in MESS). \ No newline at end of file +Place samples directories here diff --git a/seal/patch.txt b/seal/patch.txt new file mode 100644 index 000000000..81880d585 --- /dev/null +++ b/seal/patch.txt @@ -0,0 +1,9 @@ +This is a patch that must be applied over SEAL 1.0.7 in order for sound +to work properly on 16-bit cards. + +If this patch is not applied, there will be a noticeable background noise +because the library only uses the 8 most significant bits of each sample +and throws away the others. + +Don't forget to recompile the library after applying the patch, and to copy +it into the djgpp/lib directory! diff --git a/seal/src/audio.h b/seal/src/audio.h new file mode 100644 index 000000000..bc60c7216 --- /dev/null +++ b/seal/src/audio.h @@ -0,0 +1,382 @@ +/* + * $Id: audio.h 1.17 1996/09/25 17:13:02 chasan released $ + * 1.18 1998/10/12 23:54:08 chasan released + * 1.19 1998/10/24 18:20:52 chasan released + * 1.20 1999/06/27 17:49:49 chasan released + * + * SEAL Synthetic Audio Library API Interface + * + * Copyright (C) 1995, 1996, 1997, 1998, 1999 Carlos Hasan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __AUDIO_H +#define __AUDIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef WIN32 +#define AIAPI +#else +#define AIAPI __stdcall +#endif + +#ifndef WINAPI + +/* atomic data types definitions */ + typedef void VOID; + typedef char CHAR; + typedef int INT; + typedef long LONG; + typedef int BOOL; + + typedef unsigned char BYTE; + typedef unsigned short WORD; + typedef unsigned int UINT; + typedef unsigned long DWORD; + + typedef VOID* LPVOID; + typedef CHAR* LPCHAR; + typedef INT* LPINT; + typedef LONG* LPLONG; + typedef BOOL* LPBOOL; + typedef BYTE* LPBYTE; + typedef WORD* LPWORD; + typedef UINT* LPUINT; + typedef DWORD* LPDWORD; + typedef CHAR* LPSTR; + typedef DWORD HANDLE; + +/* helper macros */ +#define LOBYTE(s) ((BYTE)(s)) +#define HIBYTE(s) ((BYTE)((WORD)(s)>>8)) +#define LOWORD(l) ((WORD)(l)) +#define HIWORD(l) ((WORD)((DWORD)(l)>>16)) +#define MAKEWORD(l,h) ((WORD)(((BYTE)(l))|(((WORD)((BYTE)(h)))<<8))) +#define MAKELONG(l,h) ((DWORD)(((WORD)(l))|(((DWORD)((WORD)(h)))<<16))) + +#endif + + +/* audio system version number */ +#define AUDIO_SYSTEM_VERSION 0x0106 + +/* audio capabilities bit fields definitions */ +#define AUDIO_FORMAT_1M08 0x00000001 +#define AUDIO_FORMAT_1S08 0x00000002 +#define AUDIO_FORMAT_1M16 0x00000004 +#define AUDIO_FORMAT_1S16 0x00000008 +#define AUDIO_FORMAT_2M08 0x00000010 +#define AUDIO_FORMAT_2S08 0x00000020 +#define AUDIO_FORMAT_2M16 0x00000040 +#define AUDIO_FORMAT_2S16 0x00000080 +#define AUDIO_FORMAT_4M08 0x00000100 +#define AUDIO_FORMAT_4S08 0x00000200 +#define AUDIO_FORMAT_4M16 0x00000400 +#define AUDIO_FORMAT_4S16 0x00000800 + +/* audio format bit fields defines for devices and waveforms */ +#define AUDIO_FORMAT_8BITS 0x0000 +#define AUDIO_FORMAT_16BITS 0x0001 +#define AUDIO_FORMAT_LOOP 0x0010 +#define AUDIO_FORMAT_BIDILOOP 0x0020 +#define AUDIO_FORMAT_REVERSE 0x0080 +#define AUDIO_FORMAT_MONO 0x0000 +#define AUDIO_FORMAT_STEREO 0x0100 +#define AUDIO_FORMAT_FILTER 0x8000 + +/*JB 2000-02-25*/ +#define AUDIO_FORMAT_RAW_SAMPLE 0x4000 +/*JB END*/ + + +/* audio resource limits defines */ +#define AUDIO_MAX_VOICES 32 +#define AUDIO_MAX_SAMPLES 16 +#define AUDIO_MAX_PATCHES 128 +#define AUDIO_MAX_PATTERNS 256 +#define AUDIO_MAX_ORDERS 256 +#define AUDIO_MAX_NOTES 96 +#define AUDIO_MAX_POINTS 12 +#define AUDIO_MIN_PERIOD 1 +#define AUDIO_MAX_PERIOD 31999 +#define AUDIO_MIN_VOLUME 0x00 +#define AUDIO_MAX_VOLUME 0x40 +#define AUDIO_MIN_PANNING 0x00 +#define AUDIO_MAX_PANNING 0xFF +#define AUDIO_MIN_POSITION 0x00000000L +#define AUDIO_MAX_POSITION 0x00100000L +#define AUDIO_MIN_FREQUENCY 0x00000200L +#define AUDIO_MAX_FREQUENCY 0x00080000L + +/* audio error code defines */ +#define AUDIO_ERROR_NONE 0x0000 +#define AUDIO_ERROR_INVALHANDLE 0x0001 +#define AUDIO_ERROR_INVALPARAM 0x0002 +#define AUDIO_ERROR_NOTSUPPORTED 0x0003 +#define AUDIO_ERROR_BADDEVICEID 0x0004 +#define AUDIO_ERROR_NODEVICE 0x0005 +#define AUDIO_ERROR_DEVICEBUSY 0x0006 +#define AUDIO_ERROR_BADFORMAT 0x0007 +#define AUDIO_ERROR_NOMEMORY 0x0008 +#define AUDIO_ERROR_NODRAMMEMORY 0x0009 +#define AUDIO_ERROR_FILENOTFOUND 0x000A +#define AUDIO_ERROR_BADFILEFORMAT 0x000B +#define AUDIO_LAST_ERROR 0x000B + +/* audio device identifiers */ +#define AUDIO_DEVICE_NONE 0x0000 +#define AUDIO_DEVICE_MAPPER 0xFFFF + +/* audio product identifiers */ +#define AUDIO_PRODUCT_NONE 0x0000 +#define AUDIO_PRODUCT_SB 0x0001 +#define AUDIO_PRODUCT_SB15 0x0002 +#define AUDIO_PRODUCT_SB20 0x0003 +#define AUDIO_PRODUCT_SBPRO 0x0004 +#define AUDIO_PRODUCT_SB16 0x0005 +#define AUDIO_PRODUCT_AWE32 0x0006 +#define AUDIO_PRODUCT_WSS 0x0007 +#define AUDIO_PRODUCT_ESS 0x0008 +#define AUDIO_PRODUCT_GUS 0x0009 +#define AUDIO_PRODUCT_GUSDB 0x000A +#define AUDIO_PRODUCT_GUSMAX 0x000B +#define AUDIO_PRODUCT_IWAVE 0x000C +#define AUDIO_PRODUCT_PAS 0x000D +#define AUDIO_PRODUCT_PAS16 0x000E +#define AUDIO_PRODUCT_ARIA 0x000F +#define AUDIO_PRODUCT_WINDOWS 0x0100 +#define AUDIO_PRODUCT_LINUX 0x0101 +#define AUDIO_PRODUCT_SPARC 0x0102 +#define AUDIO_PRODUCT_SGI 0x0103 +#define AUDIO_PRODUCT_DSOUND 0x0104 +#define AUDIO_PRODUCT_OS2MMPM 0x0105 +#define AUDIO_PRODUCT_OS2DART 0x0106 +#define AUDIO_PRODUCT_BEOSR3 0x0107 +#define AUDIO_PRODUCT_BEOS 0x0108 +#define AUDIO_PRODUCT_QNX 0x0109 + +/* audio mixer channels */ +#define AUDIO_MIXER_MASTER_VOLUME 0x0001 +#define AUDIO_MIXER_TREBLE 0x0002 +#define AUDIO_MIXER_BASS 0x0003 +#define AUDIO_MIXER_CHORUS 0x0004 +#define AUDIO_MIXER_REVERB 0x0005 + +/* audio envelope bit fields */ +#define AUDIO_ENVELOPE_ON 0x0001 +#define AUDIO_ENVELOPE_SUSTAIN 0x0002 +#define AUDIO_ENVELOPE_LOOP 0x0004 + +/* audio pattern bit fields */ +#define AUDIO_PATTERN_PACKED 0x0080 +#define AUDIO_PATTERN_NOTE 0x0001 +#define AUDIO_PATTERN_SAMPLE 0x0002 +#define AUDIO_PATTERN_VOLUME 0x0004 +#define AUDIO_PATTERN_COMMAND 0x0008 +#define AUDIO_PATTERN_PARAMS 0x0010 + +/* audio module bit fields */ +#define AUDIO_MODULE_AMIGA 0x0000 +#define AUDIO_MODULE_LINEAR 0x0001 +#define AUDIO_MODULE_PANNING 0x8000 + +#pragma pack(1) + +/* audio capabilities structure */ + typedef struct { + WORD wProductId; /* product identifier */ + CHAR szProductName[30]; /* product name */ + DWORD dwFormats; /* formats supported */ + } AUDIOCAPS, *LPAUDIOCAPS; + +/* audio format structure */ + typedef struct { + UINT nDeviceId; /* device identifier */ + WORD wFormat; /* playback format */ + WORD nSampleRate; /* sampling frequency */ + } AUDIOINFO, *LPAUDIOINFO; + +/* audio waveform structure */ + typedef struct { + LPBYTE lpData; /* data pointer */ + DWORD dwHandle; /* waveform handle */ + DWORD dwLength; /* waveform length */ + DWORD dwLoopStart; /* loop start point */ + DWORD dwLoopEnd; /* loop end point */ + WORD nSampleRate; /* sampling rate */ + WORD wFormat; /* format bits */ + } AUDIOWAVE, *LPAUDIOWAVE; + + +/* audio envelope point structure */ + typedef struct { + WORD nFrame; /* envelope frame */ + WORD nValue; /* envelope value */ + } AUDIOPOINT, *LPAUDIOPOINT; + +/* audio envelope structure */ + typedef struct { + AUDIOPOINT aEnvelope[AUDIO_MAX_POINTS]; /* envelope points */ + BYTE nPoints; /* number of points */ + BYTE nSustain; /* sustain point */ + BYTE nLoopStart; /* loop start point */ + BYTE nLoopEnd; /* loop end point */ + WORD wFlags; /* envelope flags */ + WORD nSpeed; /* envelope speed */ + } AUDIOENVELOPE, *LPAUDIOENVELOPE; + +/* audio sample structure */ + typedef struct { + CHAR szSampleName[32]; /* sample name */ + BYTE nVolume; /* default volume */ + BYTE nPanning; /* default panning */ + BYTE nRelativeNote; /* relative note */ + BYTE nFinetune; /* finetune */ + AUDIOWAVE Wave; /* waveform handle */ + } AUDIOSAMPLE, *LPAUDIOSAMPLE; + +/* audio patch structure */ + typedef struct { + CHAR szPatchName[32]; /* patch name */ + BYTE aSampleNumber[AUDIO_MAX_NOTES]; /* multi-sample table */ + WORD nSamples; /* number of samples */ + BYTE nVibratoType; /* vibrato type */ + BYTE nVibratoSweep; /* vibrato sweep */ + BYTE nVibratoDepth; /* vibrato depth */ + BYTE nVibratoRate; /* vibrato rate */ + WORD nVolumeFadeout; /* volume fadeout */ + AUDIOENVELOPE Volume; /* volume envelope */ + AUDIOENVELOPE Panning; /* panning envelope */ + LPAUDIOSAMPLE aSampleTable; /* sample table */ + } AUDIOPATCH, *LPAUDIOPATCH; + +/* audio pattern structure */ + typedef struct { + WORD nPacking; /* packing type */ + WORD nTracks; /* number of tracks */ + WORD nRows; /* number of rows */ + WORD nSize; /* data size */ + LPBYTE lpData; /* data pointer */ + } AUDIOPATTERN, *LPAUDIOPATTERN; + +/* audio module structure */ + typedef struct { + CHAR szModuleName[32]; /* module name */ + WORD wFlags; /* module flags */ + WORD nOrders; /* number of orders */ + WORD nRestart; /* restart position */ + WORD nTracks; /* number of tracks */ + WORD nPatterns; /* number of patterns */ + WORD nPatches; /* number of patches */ + WORD nTempo; /* initial tempo */ + WORD nBPM; /* initial BPM */ + BYTE aOrderTable[AUDIO_MAX_ORDERS]; /* order table */ + BYTE aPanningTable[AUDIO_MAX_VOICES]; /* panning table */ + LPAUDIOPATTERN aPatternTable; /* pattern table */ + LPAUDIOPATCH aPatchTable; /* patch table */ + } AUDIOMODULE, *LPAUDIOMODULE; + +/* audio music track structure */ + typedef struct { + BYTE nNote; /* note index */ + BYTE nPatch; /* patch number */ + BYTE nSample; /* sample number */ + BYTE nCommand; /* effect command */ + BYTE bParams; /* effect params */ + BYTE nVolumeCmd; /* volume command */ + BYTE nVolume; /* volume level */ + BYTE nPanning; /* stereo panning */ + LONG dwFrequency; /* note frequency */ + WORD wPeriod; /* note period */ + } AUDIOTRACK, *LPAUDIOTRACK; + +/* audio callback function defines */ + typedef VOID (AIAPI* LPFNAUDIOWAVE)(LPBYTE, UINT); + typedef VOID (AIAPI* LPFNAUDIOTIMER)(VOID); + typedef VOID (AIAPI* LPFNAUDIOCALLBACK)(BYTE, UINT, UINT); + +/* audio handle defines */ + typedef HANDLE HAC; + typedef HAC* LPHAC; + +#pragma pack() + +/* audio interface API prototypes */ + UINT AIAPI AInitialize(VOID); + UINT AIAPI AGetVersion(VOID); + UINT AIAPI AGetAudioNumDevs(VOID); + UINT AIAPI AGetAudioDevCaps(UINT nDeviceId, LPAUDIOCAPS lpCaps); + UINT AIAPI AGetErrorText(UINT nErrorCode, LPSTR lpText, UINT nSize); + + UINT AIAPI APingAudio(LPUINT lpnDeviceId); + UINT AIAPI AOpenAudio(LPAUDIOINFO lpInfo); + UINT AIAPI ACloseAudio(VOID); + UINT AIAPI AUpdateAudio(VOID); + UINT AIAPI AUpdateAudioEx(UINT nFrames); + + UINT AIAPI ASetAudioMixerValue(UINT nChannel, UINT nValue); + + UINT AIAPI AOpenVoices(UINT nVoices); + UINT AIAPI ACloseVoices(VOID); + + UINT AIAPI ASetAudioCallback(LPFNAUDIOWAVE lpfnAudioWave); + UINT AIAPI ASetAudioTimerProc(LPFNAUDIOTIMER lpfnAudioTimer); + UINT AIAPI ASetAudioTimerRate(UINT nTimerRate); + + LONG AIAPI AGetAudioDataAvail(VOID); + UINT AIAPI ACreateAudioData(LPAUDIOWAVE lpWave); + UINT AIAPI ADestroyAudioData(LPAUDIOWAVE lpWave); + UINT AIAPI AWriteAudioData(LPAUDIOWAVE lpWave, DWORD dwOffset, UINT nCount); + + UINT AIAPI ACreateAudioVoice(LPHAC lphVoice); + UINT AIAPI ADestroyAudioVoice(HAC hVoice); + + UINT AIAPI APlayVoice(HAC hVoice, LPAUDIOWAVE lpWave); + UINT AIAPI APrimeVoice(HAC hVoice, LPAUDIOWAVE lpWave); + UINT AIAPI AStartVoice(HAC hVoice); + UINT AIAPI AStopVoice(HAC hVoice); + + UINT AIAPI ASetVoicePosition(HAC hVoice, LONG dwPosition); + UINT AIAPI ASetVoiceFrequency(HAC hVoice, LONG dwFrequency); + UINT AIAPI ASetVoiceVolume(HAC hVoice, UINT nVolume); + UINT AIAPI ASetVoicePanning(HAC hVoice, UINT nPanning); + + UINT AIAPI AGetVoicePosition(HAC hVoice, LPLONG lpdwPosition); + UINT AIAPI AGetVoiceFrequency(HAC hVoice, LPLONG lpdwFrequency); + UINT AIAPI AGetVoiceVolume(HAC hVoice, LPUINT lpnVolume); + UINT AIAPI AGetVoicePanning(HAC hVoice, LPUINT lpnPanning); + UINT AIAPI AGetVoiceStatus(HAC hVoice, LPBOOL lpnStatus); + + UINT AIAPI APlayModule(LPAUDIOMODULE lpModule); + UINT AIAPI AStopModule(VOID); + UINT AIAPI APauseModule(VOID); + UINT AIAPI AResumeModule(VOID); + UINT AIAPI ASetModuleVolume(UINT nVolume); + UINT AIAPI ASetModulePosition(UINT nOrder, UINT nRow); + UINT AIAPI AGetModuleVolume(LPUINT lpnVolume); + UINT AIAPI AGetModulePosition(LPUINT pnOrder, LPUINT lpnRow); + UINT AIAPI AGetModuleStatus(LPBOOL lpnStatus); + UINT AIAPI ASetModuleCallback(LPFNAUDIOCALLBACK lpfnAudioCallback); + + UINT AIAPI ALoadModuleFile(LPSTR lpszFileName, + LPAUDIOMODULE* lplpModule, DWORD dwFileOffset); + UINT AIAPI AFreeModuleFile(LPAUDIOMODULE lpModule); + + UINT AIAPI ALoadWaveFile(LPSTR lpszFileName, + LPAUDIOWAVE* lplpWave, DWORD dwFileOffset); + UINT AIAPI AFreeWaveFile(LPAUDIOWAVE lpWave); + + UINT AIAPI AGetModuleTrack(UINT nTrack, LPAUDIOTRACK lpTrack); + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/seal/src/mixdrv.c b/seal/src/mixdrv.c new file mode 100644 index 000000000..c633c281e --- /dev/null +++ b/seal/src/mixdrv.c @@ -0,0 +1,983 @@ +/* + * $Id: mixdrv.c 1.13 1996/09/08 21:14:54 chasan released $ + * 1.14 1998/10/24 18:20:53 chasan released (Mixer API) + * + * Software-based waveform synthesizer emulator driver. + * + * Copyright (C) 1995-1999 Carlos Hasan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#define __FILTER__ + +#ifdef __GNUC__ +#include +#define cdecl +#endif +#include +#include +#include "audio.h" +#include "drivers.h" + + +/* + * Voice control bit fields + */ +#define VOICE_STOP 0x01 +#define VOICE_16BITS 0x02 +#define VOICE_LOOP 0x04 +#define VOICE_BIDILOOP 0x08 +#define VOICE_REVERSE 0x10 + +/* + * Voice pitch accurary and mixing buffer size + */ +#define ACCURACY 12 +#define BUFFERSIZE 512 + + +/* + * Waveform synthesizer voice structure + */ +typedef struct { + LPVOID lpData; + LONG dwAccum; + LONG dwFrequency; + LONG dwLoopStart; + LONG dwLoopEnd; + BYTE nVolume; + BYTE nPanning; + BYTE bControl; + BYTE bReserved; +} VOICE, *LPVOICE; + +/* + * Low level voice mixing routine prototype + */ +typedef VOID (cdecl* LPFNMIXAUDIO)(LPLONG, UINT, LPVOICE); + +/* + * Waveform synthesizer state structure + */ +static struct { + VOICE aVoices[AUDIO_MAX_VOICES]; + UINT nVoices; + UINT wFormat; + UINT nSampleRate; + LONG dwTimerRate; + LONG dwTimerAccum; + LPBYTE lpMemory; + LPFNAUDIOTIMER lpfnAudioTimer; + LPFNMIXAUDIO lpfnMixAudioProc[2]; +} Synth; + +LPLONG lpVolumeTable; +LPBYTE lpFilterTable; + +/*JB 2000-02-25*/ +static signed int MixerValue = 0; +/*JB END*/ + + +static VOID AIAPI UpdateVoices(LPBYTE lpData, UINT nCount); + +/* low level resamplation and quantization routines */ +#ifdef __ASM__ + +VOID cdecl QuantAudioData08(LPVOID lpBuffer, LPLONG lpData, UINT nCount); +VOID cdecl QuantAudioData16(LPVOID lpBuffer, LPLONG lpData, UINT nCount); +VOID cdecl MixAudioData08M(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData08S(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData08MI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData08SI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData16M(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData16S(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData16MI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); +VOID cdecl MixAudioData16SI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice); + +static VOID QuantAudioData(LPVOID lpBuffer, LPLONG lpData, UINT nCount) +{ + if (Synth.wFormat & AUDIO_FORMAT_16BITS) + QuantAudioData16(lpBuffer, lpData, nCount); + else + QuantAudioData08(lpBuffer, lpData, nCount); +} + +#else + +typedef short SHORT; +typedef SHORT* LPSHORT; + +static VOID QuantAudioData(LPVOID lpBuffer, LPLONG lpData, UINT nCount) +{ + LPSHORT lpwBuffer; + LPBYTE lpbBuffer; + LONG dwSample; + + if (Synth.wFormat & AUDIO_FORMAT_16BITS) { + lpwBuffer = (LPSHORT) lpBuffer; + while (nCount-- > 0) { + dwSample = *lpData++; + if (dwSample < -32768) + dwSample = -32768; + else if (dwSample > +32767) + dwSample = +32767; + *lpwBuffer++ = (SHORT) dwSample; + } + } + else { + lpbBuffer = (LPBYTE) lpBuffer; + while (nCount-- > 0) { + dwSample = *lpData++; + if (dwSample < -32768) + dwSample = -32768; + else if (dwSample > +32767) + dwSample = +32767; + *lpbBuffer++ = (BYTE) ((dwSample >> 8) + 128); + } + } +} + +static VOID AIAPI +MixAudioData08M(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT count; + register DWORD accum, delta; + register LPLONG table, buf; + register LPBYTE data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + table = lpVolumeTable + ((UINT) lpVoice->nVolume << 8); + data = lpVoice->lpData; + buf = lpBuffer; + count = nCount; + + do { + *buf++ += table[data[accum >> ACCURACY]]; + accum += delta; + } while (--count != 0); + + lpVoice->dwAccum = accum; +} + +#define min(a, b) ((a) < (b) ? (a) : (b)) + +static VOID AIAPI +MixAudioData08S(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT a; + register DWORD accum, delta; + register LPLONG ltable, rtable, buf; + register LPBYTE data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + a = ((UINT) lpVoice->nVolume * lpVoice->nPanning) >> 8; + rtable = lpVolumeTable + (a << 8); + ltable = lpVolumeTable + ((lpVoice->nVolume - a) << 8); + data = lpVoice->lpData; + buf = lpBuffer; + + do { + a = data[accum >> ACCURACY]; + buf[0] += ltable[a]; + buf[1] += rtable[a]; + accum += delta; + buf += 2; + } while (--nCount != 0); + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData08MI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register INT a, frac; + register DWORD accum, delta; + register LPLONG table, buf; + register LPBYTE data, ftable; + + /* adaptive oversampling interpolation comparison */ + if (lpVoice->dwFrequency < -(1 << ACCURACY) || + lpVoice->dwFrequency > +(1 << ACCURACY)) { + MixAudioData08M(lpBuffer, nCount, lpVoice); + return; + } + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + table = lpVolumeTable + ((UINT) lpVoice->nVolume << 8); + data = lpVoice->lpData; + buf = lpBuffer; + +#ifdef __FILTER__ + a = (BYTE) lpVoice->bReserved; + frac = ((long) delta < 0 ? -delta : +delta) >> (ACCURACY - 5); + ftable = lpFilterTable + (frac << 8); + do { + a = (BYTE)(a + ftable[data[accum >> ACCURACY]] - ftable[a]); + *buf++ += table[a]; + accum += delta; + } while (--nCount != 0); + lpVoice->bReserved = (BYTE) a; +#else + do { + register INT b; + a = (signed char) data[accum >> ACCURACY]; + b = (signed char) data[(accum >> ACCURACY) + 1]; + frac = (accum & ((1 << ACCURACY) - 1)) >> (ACCURACY - 5); + a = (BYTE)(a + ((frac * (b - a)) >> 5)); + *buf++ += table[a]; + accum += delta; + } while (--nCount != 0); +#endif + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData08SI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register INT a, frac; + register DWORD accum, delta; + register LPLONG buf, ltable, rtable; + register LPBYTE data, ftable; + + /* adaptive oversampling interpolation comparison */ + if (lpVoice->dwFrequency < -(1 << ACCURACY) || + lpVoice->dwFrequency > +(1 << ACCURACY)) { + MixAudioData08S(lpBuffer, nCount, lpVoice); + return; + } + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + a = ((UINT) lpVoice->nVolume * lpVoice->nPanning) >> 8; + rtable = lpVolumeTable + (a << 8); + ltable = lpVolumeTable + ((lpVoice->nVolume - a) << 8); + data = lpVoice->lpData; + buf = lpBuffer; + +#ifdef __FILTER__ + a = (BYTE) lpVoice->bReserved; + frac = ((long) delta < 0 ? -delta : +delta) >> (ACCURACY - 5); + ftable = lpFilterTable + (frac << 8); + do { + a = (BYTE)(a + ftable[data[accum >> ACCURACY]] - ftable[a]); + buf[0] += ltable[a]; + buf[1] += rtable[a]; + accum += delta; + buf += 2; + } while (--nCount != 0); + lpVoice->bReserved = (BYTE) a; +#else + do { + register INT b; + a = (signed char) data[accum >> ACCURACY]; + b = (signed char) data[(accum >> ACCURACY) + 1]; + frac = (accum & ((1 << ACCURACY) - 1)) >> (ACCURACY - 5); + a = (BYTE)(a + ((frac * (b - a)) >> 5)); + buf[0] += ltable[a]; + buf[1] += rtable[a]; + accum += delta; + buf += 2; + } while (--nCount != 0); +#endif + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData16M(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT a, count; + register DWORD accum, delta; + register LPLONG table, buf; + register LPWORD data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + table = lpVolumeTable + ((UINT) lpVoice->nVolume << 8); + data = lpVoice->lpData; + buf = lpBuffer; + count = nCount; + + do { + a = data[accum >> ACCURACY]; + *buf++ += table[a >> 8]; + accum += delta; + } while (--count != 0); + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData16S(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT a; + register DWORD accum, delta; + register LPLONG ltable, rtable, buf; + register LPWORD data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + a = ((UINT) lpVoice->nVolume * lpVoice->nPanning) >> 8; + rtable = lpVolumeTable + (a << 8); + ltable = lpVolumeTable + ((lpVoice->nVolume - a) << 8); + data = lpVoice->lpData; + buf = lpBuffer; + + do { + a = data[accum >> ACCURACY]; + buf[0] += ltable[a >> 8]; + buf[1] += rtable[a >> 8]; + accum += delta; + buf += 2; + } while (--nCount != 0); + + lpVoice->dwAccum = accum; +} + + +static VOID AIAPI +MixAudioData16MI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT frac, count; + register DWORD a, b, accum, delta; + register LPLONG table, buf; + register LPWORD data; + + /* adaptive oversampling interpolation comparison */ + if (lpVoice->dwFrequency < -(1 << ACCURACY) || + lpVoice->dwFrequency > +(1 << ACCURACY)) { + MixAudioData16M(lpBuffer, nCount, lpVoice); + return; + } + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + table = lpVolumeTable + ((UINT) lpVoice->nVolume << 8); + data = lpVoice->lpData; + buf = lpBuffer; + count = nCount; + + do { + a = data[accum >> ACCURACY]; + b = data[(accum >> ACCURACY) + 1]; + frac = (accum & ((1 << ACCURACY) - 1)) >> (ACCURACY - 5); + a = (WORD)((SHORT)a + ((frac * ((SHORT)b - (SHORT)a)) >> 5)); + *buf++ += table[a >> 8]; + accum += delta; + } while (--count != 0); + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData16SI(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + register UINT frac; + register DWORD a, b, accum, delta; + register LPLONG ltable, rtable, buf; + register LPWORD data; + + /* adaptive oversampling interpolation comparison */ + if (lpVoice->dwFrequency < -(1 << ACCURACY) || + lpVoice->dwFrequency > +(1 << ACCURACY)) { + MixAudioData16S(lpBuffer, nCount, lpVoice); + return; + } + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + a = ((UINT) lpVoice->nVolume * lpVoice->nPanning) >> 8; + rtable = lpVolumeTable + (a << 8); + ltable = lpVolumeTable + ((lpVoice->nVolume - a) << 8); + data = lpVoice->lpData; + buf = lpBuffer; + + do { + a = data[accum >> ACCURACY]; + b = data[(accum >> ACCURACY) + 1]; + frac = (accum & ((1 << ACCURACY) - 1)) >> (ACCURACY - 5); + a = (WORD)((SHORT)a + ((frac * ((int)(SHORT)b - (int)(SHORT)a)) >> 5)); + buf[0] += ltable[a >> 8]; + buf[1] += rtable[a >> 8]; + accum += delta; + buf += 2; + } while (--nCount != 0); + + lpVoice->dwAccum = accum; +} + +#endif + +/*JB 2000-02-25*/ +static VOID AIAPI +MixAudioData16MRaw(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + signed int a; + + DWORD accum, delta; + signed long* buf; + signed short* data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + data = lpVoice->lpData; + buf = lpBuffer; + + + do { + a = data[accum >> ACCURACY]; + a = (a*MixerValue)>>8; //since MixerValue is in 0-256 range + buf[0] += a; + accum += delta; + buf++; + } while (--nCount != 0); + + lpVoice->dwAccum = accum; +} + +static VOID AIAPI +MixAudioData16SRaw(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + signed int a; + DWORD accum, delta; + signed long* buf; + signed short* data; + + accum = lpVoice->dwAccum; + delta = lpVoice->dwFrequency; + data = lpVoice->lpData; + buf = lpBuffer; + + if (lpVoice->nPanning >= 0x80) + buf++; //set pointer to right channel + + do { + a = data[accum >> ACCURACY]; + a = (a*MixerValue)>>8; //since MixerValue is in 0-256 range + buf[0] += a; + //buf[1] += 0; //skip the other channel + accum += delta; + buf += 2; + } while (--nCount != 0); + + lpVoice->dwAccum = accum; +} +/*JB END*/ + + +static VOID MixAudioData(LPLONG lpBuffer, UINT nCount, LPVOICE lpVoice) +{ + UINT nSize; + + if (Synth.wFormat & AUDIO_FORMAT_STEREO) + nCount >>= 1; + + while (nCount > 0 && !(lpVoice->bControl & VOICE_STOP)) { + /* check boundary conditions */ + if (lpVoice->bControl & VOICE_REVERSE) { + if (lpVoice->dwAccum < lpVoice->dwLoopStart) { + if (lpVoice->bControl & VOICE_BIDILOOP) { + lpVoice->dwAccum = lpVoice->dwLoopStart + + (lpVoice->dwLoopStart - lpVoice->dwAccum); + lpVoice->bControl ^= VOICE_REVERSE; + continue; + } + else if (lpVoice->bControl & VOICE_LOOP) { + lpVoice->dwAccum = lpVoice->dwLoopEnd - + (lpVoice->dwLoopStart - lpVoice->dwAccum); + continue; + } + else { + lpVoice->bControl |= VOICE_STOP; + break; + } + } + } + else { + if (lpVoice->dwAccum > lpVoice->dwLoopEnd) { + if (lpVoice->bControl & VOICE_BIDILOOP) { + lpVoice->dwAccum = lpVoice->dwLoopEnd - + (lpVoice->dwAccum - lpVoice->dwLoopEnd); + lpVoice->bControl ^= VOICE_REVERSE; + continue; + } + else if (lpVoice->bControl & VOICE_LOOP) { + lpVoice->dwAccum = lpVoice->dwLoopStart + + (lpVoice->dwAccum - lpVoice->dwLoopEnd); + continue; + } + else { + lpVoice->bControl |= VOICE_STOP; + break; + } + } + } + + /* check for overflow and clip if necessary */ + nSize = nCount; + if (lpVoice->bControl & VOICE_REVERSE) { + if (nSize * lpVoice->dwFrequency > + lpVoice->dwAccum - lpVoice->dwLoopStart) + nSize = (lpVoice->dwAccum - lpVoice->dwLoopStart + + lpVoice->dwFrequency) / lpVoice->dwFrequency; + } + else { + if (nSize * lpVoice->dwFrequency > + lpVoice->dwLoopEnd - lpVoice->dwAccum) + nSize = (lpVoice->dwLoopEnd - lpVoice->dwAccum + + lpVoice->dwFrequency) / lpVoice->dwFrequency; + } + + if (lpVoice->bControl & VOICE_REVERSE) + lpVoice->dwFrequency = -lpVoice->dwFrequency; + + /* mixes chunk of data in a burst mode */ + if (lpVoice->bControl & VOICE_16BITS) { + Synth.lpfnMixAudioProc[1] (lpBuffer, nSize, lpVoice); + } + else { + Synth.lpfnMixAudioProc[0] (lpBuffer, nSize, lpVoice); + } + + if (lpVoice->bControl & VOICE_REVERSE) + lpVoice->dwFrequency = -lpVoice->dwFrequency; + + /* update mixing buffer address and counter */ + lpBuffer += nSize; + if (Synth.wFormat & AUDIO_FORMAT_STEREO) + lpBuffer += nSize; + nCount -= nSize; + } +} + +static VOID MixAudioVoices(LPLONG lpBuffer, UINT nCount) +{ + UINT nVoice, nSize; + + while (nCount > 0) { + nSize = nCount; + if (Synth.lpfnAudioTimer != NULL) { + nSize = (Synth.dwTimerRate - Synth.dwTimerAccum + 64L) & ~63L; + if (nSize > nCount) + nSize = nCount; + if ((Synth.dwTimerAccum += nSize) >= Synth.dwTimerRate) { + Synth.dwTimerAccum -= Synth.dwTimerRate; + Synth.lpfnAudioTimer(); + } + } + for (nVoice = 0; nVoice < Synth.nVoices; nVoice++) { + MixAudioData(lpBuffer, nSize, &Synth.aVoices[nVoice]); + } + lpBuffer += nSize; + nCount -= nSize; + } +} + + +/* + * High level waveform synthesizer interface + */ +static UINT AIAPI GetAudioCaps(LPAUDIOCAPS lpCaps) +{ + memset(lpCaps, 0, sizeof(AUDIOCAPS)); + return AUDIO_ERROR_NOTSUPPORTED; +} + +static UINT AIAPI PingAudio(VOID) +{ + return AUDIO_ERROR_NOTSUPPORTED; +} + +static UINT AIAPI OpenAudio(LPAUDIOINFO lpInfo) +{ + memset(&Synth, 0, sizeof(Synth)); + Synth.wFormat = lpInfo->wFormat; + Synth.nSampleRate = lpInfo->nSampleRate; + if (Synth.wFormat & AUDIO_FORMAT_FILTER) { + Synth.lpfnMixAudioProc[0] = (Synth.wFormat & AUDIO_FORMAT_STEREO) ? + MixAudioData08SI : MixAudioData08MI; + Synth.lpfnMixAudioProc[1] = (Synth.wFormat & AUDIO_FORMAT_STEREO) ? + MixAudioData16SI : MixAudioData16MI; + } + else { + Synth.lpfnMixAudioProc[0] = (Synth.wFormat & AUDIO_FORMAT_STEREO) ? + MixAudioData08S : MixAudioData08M; +/*JB 2000-02-25*/ + if (Synth.wFormat & AUDIO_FORMAT_RAW_SAMPLE) + { + /*printf("SEAL mixdrv.c: Synth.wFormat |= FORMAT_RAW_SAMPLE\n");*/ + Synth.lpfnMixAudioProc[1] = (Synth.wFormat & AUDIO_FORMAT_STEREO) ? + MixAudioData16SRaw : MixAudioData16MRaw; + } + else + { + Synth.lpfnMixAudioProc[1] = (Synth.wFormat & AUDIO_FORMAT_STEREO) ? + MixAudioData16S : MixAudioData16M; + } +/*JB END*/ + } + + /* allocate volume (0-64) and filter (0-31) table */ + Synth.lpMemory = malloc(sizeof(LONG) * 65 * 256 + + sizeof(BYTE) * 32 * 256 + 1023); + if (Synth.lpMemory != NULL) { + lpVolumeTable = (LPLONG) (((DWORD) Synth.lpMemory + 1023) & ~1023); + lpFilterTable = (LPBYTE) (lpVolumeTable + 65 * 256); + ASetAudioMixerValue(AUDIO_MIXER_MASTER_VOLUME, 96); + ASetAudioCallback(UpdateVoices); + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_NOMEMORY; +} + +static UINT AIAPI CloseAudio(VOID) +{ + if (Synth.lpMemory != NULL) + free(Synth.lpMemory); + memset(&Synth, 0, sizeof(Synth)); + return AUDIO_ERROR_NONE; +} + +static UINT AIAPI SetAudioMixerValue(UINT nChannel, UINT nMixerValue) +{ + LPBYTE lpFilter; + LPLONG lpVolume; + UINT nVolume, nSample; + LONG dwAccum, dwDelta; + + if (Synth.lpMemory == NULL) + return AUDIO_ERROR_NOTSUPPORTED; + + /* master volume must be less than 256 units */ + if (nChannel != AUDIO_MIXER_MASTER_VOLUME || nMixerValue > 256) + return AUDIO_ERROR_INVALPARAM; + + /* half dynamic range for mono output */ + if (!(Synth.wFormat & AUDIO_FORMAT_STEREO)) + nMixerValue >>= 1; + +/*JB 2000-02-25*/ + MixerValue = nMixerValue; +/*JB END*/ + + /* build volume table (0-64) */ + lpVolume = lpVolumeTable; + dwDelta = 0; + for (nVolume = 0; nVolume <= 64; nVolume++, dwDelta += nMixerValue) { + dwAccum = 0; + for (nSample = 0; nSample < 128; nSample++, dwAccum += dwDelta) + *lpVolume++ = dwAccum >> 4; + dwAccum = -dwAccum; + for (nSample = 0; nSample < 128; nSample++, dwAccum += dwDelta) + *lpVolume++ = dwAccum >> 4; + } + +#ifdef __FILTER__ + /* build lowpass filter table (0-31) */ + lpFilter = lpFilterTable; + for (nVolume = 0; nVolume < 32; nVolume++) { + dwAccum = 0; + for (nSample = 0; nSample < 128; nSample++, dwAccum += nVolume) + *lpFilter++ = dwAccum >> 5; + dwAccum = -dwAccum; + for (nSample = 0; nSample < 128; nSample++, dwAccum += nVolume) + *lpFilter++ = dwAccum >> 5; + } +#endif + + return AUDIO_ERROR_NONE; +} + +static UINT AIAPI OpenVoices(UINT nVoices) +{ + UINT nVoice; + + /* + * Initialize waveform synthesizer structure for playback + */ + if (nVoices >= 1 && nVoices <= AUDIO_MAX_VOICES) { + Synth.nVoices = nVoices; + for (nVoice = 0; nVoice < Synth.nVoices; nVoice++) + Synth.aVoices[nVoice].bControl = VOICE_STOP; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; +} + +static UINT AIAPI CloseVoices(VOID) +{ + UINT nVoice; + + memset(Synth.aVoices, 0, sizeof(Synth.aVoices)); + for (nVoice = 0; nVoice < AUDIO_MAX_VOICES; nVoice++) + Synth.aVoices[nVoice].bControl = VOICE_STOP; + return AUDIO_ERROR_NONE; +} + +static UINT AIAPI UpdateAudio(VOID) +{ + return AUDIO_ERROR_NONE; +} + +static LONG AIAPI GetAudioDataAvail(VOID) +{ + return 0; +} + +static UINT AIAPI CreateAudioData(LPAUDIOWAVE lpWave) +{ + if (lpWave != NULL) { + lpWave->dwHandle = (DWORD) lpWave->lpData; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI DestroyAudioData(LPAUDIOWAVE lpWave) +{ + if (lpWave != NULL && lpWave->dwHandle != 0) { + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI WriteAudioData(LPAUDIOWAVE lpWave, DWORD dwOffset, UINT nCount) +{ + if (lpWave != NULL && lpWave->dwHandle != 0) { + /* anticlick removal work around */ + if (lpWave->wFormat & AUDIO_FORMAT_LOOP) { + *(LPDWORD) (lpWave->dwHandle + lpWave->dwLoopEnd) = + *(LPDWORD) (lpWave->dwHandle + lpWave->dwLoopStart); + } + else if (dwOffset + nCount >= lpWave->dwLength) { + *(LPDWORD) (lpWave->dwHandle + lpWave->dwLength) = 0; + } + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI PrimeVoice(UINT nVoice, LPAUDIOWAVE lpWave) +{ + LPVOICE lpVoice; + + if (nVoice < Synth.nVoices && lpWave != NULL && lpWave->dwHandle != 0) { + lpVoice = &Synth.aVoices[nVoice]; + lpVoice->lpData = (LPVOID) lpWave->dwHandle; + lpVoice->bControl = VOICE_STOP; + lpVoice->dwAccum = 0; + if (lpWave->wFormat & (AUDIO_FORMAT_LOOP | AUDIO_FORMAT_BIDILOOP)) { + lpVoice->dwLoopStart = lpWave->dwLoopStart; + lpVoice->dwLoopEnd = lpWave->dwLoopEnd; + lpVoice->bControl |= VOICE_LOOP; + if (lpWave->wFormat & AUDIO_FORMAT_BIDILOOP) + lpVoice->bControl |= VOICE_BIDILOOP; + } + else { + lpVoice->dwLoopStart = lpWave->dwLength; + lpVoice->dwLoopEnd = lpWave->dwLength; + } + if (lpWave->wFormat & AUDIO_FORMAT_16BITS) { + lpVoice->dwLoopStart >>= 1; + lpVoice->dwLoopEnd >>= 1; + lpVoice->bControl |= VOICE_16BITS; + } + lpVoice->dwAccum <<= ACCURACY; + lpVoice->dwLoopStart <<= ACCURACY; + lpVoice->dwLoopEnd <<= ACCURACY; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI StartVoice(UINT nVoice) +{ + if (nVoice < Synth.nVoices) { + Synth.aVoices[nVoice].bControl &= ~VOICE_STOP; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI StopVoice(UINT nVoice) +{ + if (nVoice < Synth.nVoices) { + Synth.aVoices[nVoice].bControl |= VOICE_STOP; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALHANDLE; + +} + +static UINT AIAPI SetVoicePosition(UINT nVoice, LONG dwPosition) +{ + if (nVoice < Synth.nVoices) { + dwPosition <<= ACCURACY; + if (dwPosition >= 0 && dwPosition < Synth.aVoices[nVoice].dwLoopEnd) { + Synth.aVoices[nVoice].dwAccum = dwPosition; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI SetVoiceFrequency(UINT nVoice, LONG dwFrequency) +{ + if (nVoice < Synth.nVoices) { + if (dwFrequency >= AUDIO_MIN_FREQUENCY && + dwFrequency <= AUDIO_MAX_FREQUENCY) { + Synth.aVoices[nVoice].dwFrequency = ((dwFrequency << ACCURACY) + + (Synth.nSampleRate >> 1)) / Synth.nSampleRate; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI SetVoiceVolume(UINT nVoice, UINT nVolume) +{ + if (nVoice < Synth.nVoices) { + if (nVolume <= AUDIO_MAX_VOLUME) { + Synth.aVoices[nVoice].nVolume = nVolume >> 1; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI SetVoicePanning(UINT nVoice, UINT nPanning) +{ + if (nVoice < Synth.nVoices) { + if (nPanning <= AUDIO_MAX_PANNING) { + Synth.aVoices[nVoice].nPanning = nPanning; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI GetVoicePosition(UINT nVoice, LPLONG lpdwPosition) +{ + if (nVoice < Synth.nVoices) { + if (lpdwPosition != NULL) { + *lpdwPosition = Synth.aVoices[nVoice].dwAccum >> ACCURACY; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI GetVoiceFrequency(UINT nVoice, LPLONG lpdwFrequency) +{ + if (nVoice < Synth.nVoices) { + if (lpdwFrequency != NULL) { + *lpdwFrequency = (Synth.aVoices[nVoice].dwFrequency * + Synth.nSampleRate) >> ACCURACY; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI GetVoiceVolume(UINT nVoice, LPUINT lpnVolume) +{ + if (nVoice < Synth.nVoices) { + if (lpnVolume != NULL) { + *lpnVolume = Synth.aVoices[nVoice].nVolume << 1; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI GetVoicePanning(UINT nVoice, LPUINT lpnPanning) +{ + if (nVoice < Synth.nVoices) { + if (lpnPanning != NULL) { + *lpnPanning = Synth.aVoices[nVoice].nPanning; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI GetVoiceStatus(UINT nVoice, LPBOOL lpnStatus) +{ + if (nVoice < Synth.nVoices) { + if (lpnStatus != NULL) { + *lpnStatus = (Synth.aVoices[nVoice].bControl & VOICE_STOP) != 0; + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; + } + return AUDIO_ERROR_INVALHANDLE; +} + +static UINT AIAPI SetAudioTimerProc(LPFNAUDIOTIMER lpfnAudioTimer) +{ + Synth.lpfnAudioTimer = lpfnAudioTimer; + return AUDIO_ERROR_NONE; +} + +static UINT AIAPI SetAudioTimerRate(UINT nBPM) +{ + if (nBPM >= 0x20 && nBPM <= 0xFF) { + Synth.dwTimerRate = Synth.nSampleRate; + if (Synth.wFormat & AUDIO_FORMAT_STEREO) + Synth.dwTimerRate <<= 1; + Synth.dwTimerRate = (5 * Synth.dwTimerRate) / (2 * nBPM); + return AUDIO_ERROR_NONE; + } + return AUDIO_ERROR_INVALPARAM; +} + +static VOID AIAPI UpdateVoices(LPBYTE lpData, UINT nCount) +{ + static LONG aBuffer[BUFFERSIZE]; + UINT nSamples; + + if (Synth.wFormat & AUDIO_FORMAT_16BITS) + nCount >>= 1; + while (nCount > 0) { + if ((nSamples = nCount) > BUFFERSIZE) + nSamples = BUFFERSIZE; + memset(aBuffer, 0, nSamples << 2); + MixAudioVoices(aBuffer, nSamples); + QuantAudioData(lpData, aBuffer, nSamples); + lpData += nSamples << ((Synth.wFormat & AUDIO_FORMAT_16BITS) != 0); + nCount -= nSamples; + } +} + + +/* + * Waveform synthesizer public interface + */ +AUDIOSYNTHDRIVER EmuSynthDriver = +{ + GetAudioCaps, PingAudio, OpenAudio, CloseAudio, + UpdateAudio, OpenVoices, CloseVoices, + SetAudioTimerProc, SetAudioTimerRate, SetAudioMixerValue, + GetAudioDataAvail, CreateAudioData, DestroyAudioData, + WriteAudioData, PrimeVoice, StartVoice, StopVoice, + SetVoicePosition, SetVoiceFrequency, SetVoiceVolume, + SetVoicePanning, GetVoicePosition, GetVoiceFrequency, + GetVoiceVolume, GetVoicePanning, GetVoiceStatus +}; diff --git a/src/artwork.c b/src/artwork.c index 8955d054d..6a01e2835 100644 --- a/src/artwork.c +++ b/src/artwork.c @@ -1265,7 +1265,7 @@ static struct osd_bitmap *create_circle (int r, int pen) for (i = 0; i < twox; i++) { plot_pixel(circle, r-x+i, r-y , pen); - plot_pixel(circle, r-x+i, r+y+1, pen); + plot_pixel(circle, r-x+i, r+y-1, pen); } for (i = 0; i < twoy; i++) diff --git a/src/cheat.c b/src/cheat.c index 86b07867c..178c6aa39 100644 --- a/src/cheat.c +++ b/src/cheat.c @@ -6,7 +6,7 @@ /* Please don't move these #define : they'll be easier to find at the top of the file :) */ -#define LAST_UPDATE "99.07.17" +#define LAST_UPDATE "99.07.17" #define LAST_CODER "JCK" #define CHEAT_VERSION "v1.00" @@ -19,637 +19,637 @@ /*|*\ |*| Modifications by John Butler |*| -|*| JB 980407: Changes to support 68K processor and 24-bit addresses. -|*| This also provided a way to make the cheat system "aware" of -|*| RAM areas and have it ignores ROM areas. +|*| JB 980407: Changes to support 68K processor and 24-bit addresses. +|*| This also provided a way to make the cheat system "aware" of +|*| RAM areas and have it ignores ROM areas. |*| -|*| JB 980424: Many changes for more flexibility and more safeguards: -|*| - RD_GAMERAM now calls cpu_readmemXX (after swapping in the -|*| correct cpu memory context) for safer memory accesses. -|*| - References to addresses are limited to appropriate ranges -|*| for the cpu involved. -|*| - Watches are still only allowed for cpu 0, but adding -|*| support for other cpus will be much easier now. -|*| - I86 cpu (which uses 20-bit addresses) should be handled -|*| properly now. -|*| - CPUs addressing more than 24-bits will not work as-is, -|*| but support wouldn't be too difficult to add (if MAME -|*| ever emulates a cpu like that). -|*| - Searches for new cheats are still only allowed for cpu 0, -|*| but adding support for other cpus will be easier now. -|*| However, cheats are allowed for other cpus, and should -|*| always be correctly handled now. -|*| - Optimized some code for readability and code size. +|*| JB 980424: Many changes for more flexibility and more safeguards: +|*| - RD_GAMERAM now calls cpu_readmemXX (after swapping in the +|*| correct cpu memory context) for safer memory accesses. +|*| - References to addresses are limited to appropriate ranges +|*| for the cpu involved. +|*| - Watches are still only allowed for cpu 0, but adding +|*| support for other cpus will be much easier now. +|*| - I86 cpu (which uses 20-bit addresses) should be handled +|*| properly now. +|*| - CPUs addressing more than 24-bits will not work as-is, +|*| but support wouldn't be too difficult to add (if MAME +|*| ever emulates a cpu like that). +|*| - Searches for new cheats are still only allowed for cpu 0, +|*| but adding support for other cpus will be easier now. +|*| However, cheats are allowed for other cpus, and should +|*| always be correctly handled now. +|*| - Optimized some code for readability and code size. |*| -|*| CAVEATS: -|*| - Code is now heavily dependent on certain structures, -|*| defines, functions and assumptions in the main code, -|*| particulary memory-related. Watch out if they change! +|*| CAVEATS: +|*| - Code is now heavily dependent on certain structures, +|*| defines, functions and assumptions in the main code, +|*| particulary memory-related. Watch out if they change! |*| -|*| JB 980505: Changes to help functions to make more readable, easier -|*| to maintain, less redundant. +|*| JB 980505: Changes to help functions to make more readable, easier +|*| to maintain, less redundant. |*| |*| JB 980506: New tables KEYCODE_chars[] and KEYCODE_caps[], rewrite -|*| in EditCheat() to reduce code size, improve readability. +|*| in EditCheat() to reduce code size, improve readability. |*| -|*| Modifications/Thoughts By James R. Twine +|*| Modifications/Thoughts By James R. Twine |*| -|*| JRT1: These modifications fix the redraw problem with the watches, -|*| a drawing bug that can sometimes cause a crash, and adjusts -|*| the drawing location when a watch is added, if the added -|*| watch would be drawn off screen. +|*| JRT1: These modifications fix the redraw problem with the watches, +|*| a drawing bug that can sometimes cause a crash, and adjusts +|*| the drawing location when a watch is added, if the added +|*| watch would be drawn off screen. |*| -|*| JRT2: These modifications allow checking for Hex values when -|*| searching for cheats. Having a decimal limit limits the -|*| values that can be found. +|*| JRT2: These modifications allow checking for Hex values when +|*| searching for cheats. Having a decimal limit limits the +|*| values that can be found. |*| -|*| JRT3: This modification clears the screen after using to -|*| enable and disable cheats on the fly. This prevents the -|*| "CHEAT ON/OFF" message from hanging around on the vector -|*| games. It causes a slight "blink", but does no more harm -|*| than using "Pause" on the vector games. It also prevents -|*| handling if no cheats are loaded. +|*| JRT3: This modification clears the screen after using to +|*| enable and disable cheats on the fly. This prevents the +|*| "CHEAT ON/OFF" message from hanging around on the vector +|*| games. It causes a slight "blink", but does no more harm +|*| than using "Pause" on the vector games. It also prevents +|*| handling if no cheats are loaded. |*| -|*| JRT5: Geeze... Where to start? Changed some of the text/ -|*| prompts to make terms consistant. "Special" changed to -|*| "Type", because it IS the type of cheat. Menu prompts -|*| changed, and spacing altered. In-Application help added -|*| for the Cheat List and the Cheat Search pages. +|*| JRT5: Geeze... Where to start? Changed some of the text/ +|*| prompts to make terms consistant. "Special" changed to +|*| "Type", because it IS the type of cheat. Menu prompts +|*| changed, and spacing altered. In-Application help added +|*| for the Cheat List and the Cheat Search pages. |*| -|*| Support for modified characters in Edit Mode, name -|*| limit reduced to 25 while editing, to prevent problems. -|*| When an edit is started, the existing name comes in and -|*| is the default new name. Makes editing mistakes faster. +|*| Support for modified characters in Edit Mode, name +|*| limit reduced to 25 while editing, to prevent problems. +|*| When an edit is started, the existing name comes in and +|*| is the default new name. Makes editing mistakes faster. |*| -|*| Changes made that display different text depending on -|*| if a search is first continued (after initialization), or -|*| further down the line, to prevent confusion. +|*| Changes made that display different text depending on +|*| if a search is first continued (after initialization), or +|*| further down the line, to prevent confusion. |*| -|*| Changed all UPPERCASE ONLY TEXT to Mixed Case Text, so -|*| that the prompts are a little more friendly. +|*| Changed all UPPERCASE ONLY TEXT to Mixed Case Text, so +|*| that the prompts are a little more friendly. |*| -|*| Some of the Menus that I modified could be better, if you -|*| have a better design, please... IMPLEMENT IT!!! :) +|*| Some of the Menus that I modified could be better, if you +|*| have a better design, please... IMPLEMENT IT!!! :) |*| -|*| Most of the changes are bracketed by "JRT5", but I KNOW -|*| that I missed a few... Sorry. +|*| Most of the changes are bracketed by "JRT5", but I KNOW +|*| that I missed a few... Sorry. |*| -|*| JRT6: Slight modifications to change display and manipulation -|*| of Addresses so that the user cannot manipulate addresses -|*| that are out of the CPUs memory space. +|*| JRT6: Slight modifications to change display and manipulation +|*| of Addresses so that the user cannot manipulate addresses +|*| that are out of the CPUs memory space. |*| -|*| Additional Variables created for data display and -|*| manipulation. +|*| Additional Variables created for data display and +|*| manipulation. |*| |*| -|*| Thoughts: -|*| Could the cheat system become "aware" of the RAM and ROM -|*| area(s) of the games it is working with? If yes, it would -|*| prevent the cheat system from checking ROM areas (unless -|*| specifically requested to do so). This would prevent false -|*| (static) locations from popping up in searches. +|*| Thoughts: +|*| Could the cheat system become "aware" of the RAM and ROM +|*| area(s) of the games it is working with? If yes, it would +|*| prevent the cheat system from checking ROM areas (unless +|*| specifically requested to do so). This would prevent false +|*| (static) locations from popping up in searches. |*| -|*| Or, could the user specify a specific area to limit the -|*| search to? This would provide the same effect, but would -|*| require the user to know what (s)he is doing. +|*| Or, could the user specify a specific area to limit the +|*| search to? This would provide the same effect, but would +|*| require the user to know what (s)he is doing. |*| -|*| James R. Twine (JRT) +|*| James R. Twine (JRT) |*| |*| Modifications by JCK from The Ultimate Patchers |*| -|*| JCK 980917: Possibility of "circular" values in search method 1 : -|*| - if you press KEYCODE_LEFT or KEYCODE_DOWN when value is 0, -|*| it turns to 0xFF -|*| - if you press KEYCODE_RIGHT or KEYCODE_UP when value is 0xFF, -|*| it turns to 0. -|*| Added new #define (MAX_LOADEDCHEATS, MAX_ACTIVECHEATS, MAX_DISPLAYCHEATS, -|*| MAX_MATCHES and MAX_WATCHES) to improve readability and upgradibility -|*| (changes where it was needed) -|*| Added the possibility of toggling the watches display -|*| ON (KEYCODE_INSERT) and OFF (KEYCODE_DEL) . -|*| Possibility to work on another cheat file (CHEAT.DAT is just the default one) -|*| (have a look in confic.c) -|*| Added new types of cheats : 20 to 24 and 40 to 44 (see below) +|*| JCK 980917: Possibility of "circular" values in search method 1 : +|*| - if you press KEYCODE_LEFT or KEYCODE_DOWN when value is 0, +|*| it turns to 0xFF +|*| - if you press KEYCODE_RIGHT or KEYCODE_UP when value is 0xFF, +|*| it turns to 0. +|*| Added new #define (MAX_LOADEDCHEATS, MAX_ACTIVECHEATS, MAX_DISPLAYCHEATS, +|*| MAX_MATCHES and MAX_WATCHES) to improve readability and upgradibility +|*| (changes where it was needed) +|*| Added the possibility of toggling the watches display +|*| ON (KEYCODE_INSERT) and OFF (KEYCODE_DEL) . +|*| Possibility to work on another cheat file (CHEAT.DAT is just the default one) +|*| (have a look in confic.c) +|*| Added new types of cheats : 20 to 24 and 40 to 44 (see below) |*| -|*| JCK 981006: 15 active cheats instead of 10 -|*| Possibility of searches in CPUs other than 0 : -|*| a question is asked to the user to choose a CPU (0 default) when he starts -|*| a new search and the game has more than one CPU -|*| Possibility to copy a cheat code by pressing KEYCODE_F4 -|*| Possibility to save all the cheat codes to disk by pressing KEYCODE_F6 -|*| Possibility to remove all the cheat codes from the active list -|*| by pressing KEYCODE_F7 -|*| In the edit cheat, on the data line : -|*| - KEYCODE_HOME sets the value to 0 -|*| - KEYCODE_END sets the value to 0x80 -|*| Possibility to use to use KEYCODE_HOME, KEYCODE_END, KEYCODE_PGDN and -|*| KEYCODE_PGUP to select a cheat code in the list +|*| JCK 981006: 15 active cheats instead of 10 +|*| Possibility of searches in CPUs other than 0 : +|*| a question is asked to the user to choose a CPU (0 default) when he starts +|*| a new search and the game has more than one CPU +|*| Possibility to copy a cheat code by pressing KEYCODE_F4 +|*| Possibility to save all the cheat codes to disk by pressing KEYCODE_F6 +|*| Possibility to remove all the cheat codes from the active list +|*| by pressing KEYCODE_F7 +|*| In the edit cheat, on the data line : +|*| - KEYCODE_HOME sets the value to 0 +|*| - KEYCODE_END sets the value to 0x80 +|*| Possibility to use to use KEYCODE_HOME, KEYCODE_END, KEYCODE_PGDN and +|*| KEYCODE_PGUP to select a cheat code in the list |*| -|*| JCK 981008: Data is saved on 2 hex digits (%02X) -|*| Possibility to view watches for CPUs other than 0 -|*| Free memory before the start of a new search +|*| JCK 981008: Data is saved on 2 hex digits (%02X) +|*| Possibility to view watches for CPUs other than 0 +|*| Free memory before the start of a new search |*| -|*| JCK 981009: CPU is displayed with the watches -|*| Possibility to change the CPU of a watch by pressing KEYCODE_9 or KEYCODE_0 +|*| JCK 981009: CPU is displayed with the watches +|*| Possibility to change the CPU of a watch by pressing KEYCODE_9 or KEYCODE_0 |*| -|*| JCK 981016: Added a new help for CheatListHelp and CheatListHelpEmpty -|*| Corrected a minor bug in SelectCheat for KEYCODE_HOME and KEYCODE_END -|*| Possibility to rename the cheat filename is now by pressing KEYCODE_F9 -|*| Possibility to reload the cheat database by pressing KEYCODE_F8 -|*| Possibility to rename the cheat filename and reload the cheat database -|*| by pressing KEYCODE_F5 (same as KEYCODE_F9 + KEYCODE_F8) -|*| Moved while (keyboard_pressed(key)) after each case when there was the possibility -|*| to use KEYCODE_F10 (this key wasn't removed from the buffer as well as the -|*| other functions keys). The modified functions are EditCheat and SelectCheat -|*| Added while (keyboard_pressed(key)) in function ShowHelp -|*| Possibility to invoke help on StartCheat by pressing KEYCODE_F10 -|*| New functions : -|*| - int RenameCheatFile(void) : returns 1 if the cheat file has been renamed, else 0 -|*| - int IsBCD(int ParamValue) : returns 1 if ParamValue is a BCD value, else 0 -|*| - void LoadCheat(void) : loads the cheats for a game -|*| (this function is called by InitCheat and SelectCheat) -|*| Added Minimum and Maximum to struct cheat_struct (used by types 60-65 & 70-75) +|*| JCK 981016: Added a new help for CheatListHelp and CheatListHelpEmpty +|*| Corrected a minor bug in SelectCheat for KEYCODE_HOME and KEYCODE_END +|*| Possibility to rename the cheat filename is now by pressing KEYCODE_F9 +|*| Possibility to reload the cheat database by pressing KEYCODE_F8 +|*| Possibility to rename the cheat filename and reload the cheat database +|*| by pressing KEYCODE_F5 (same as KEYCODE_F9 + KEYCODE_F8) +|*| Moved while (keyboard_pressed(key)) after each case when there was the possibility +|*| to use KEYCODE_F10 (this key wasn't removed from the buffer as well as the +|*| other functions keys). The modified functions are EditCheat and SelectCheat +|*| Added while (keyboard_pressed(key)) in function ShowHelp +|*| Possibility to invoke help on StartCheat by pressing KEYCODE_F10 +|*| New functions : +|*| - int RenameCheatFile(void) : returns 1 if the cheat file has been renamed, else 0 +|*| - int IsBCD(int ParamValue) : returns 1 if ParamValue is a BCD value, else 0 +|*| - void LoadCheat(void) : loads the cheats for a game +|*| (this function is called by InitCheat and SelectCheat) +|*| Added Minimum and Maximum to struct cheat_struct (used by types 60-65 & 70-75) |*| -|*| JCK 981020: Added new types of cheats : 60 to 65 and 70 to 75 (see below) -|*| Possibility to change the maximum value when the user edits a cheat -|*| New functions : -|*| - int SelectValue(int v, int BCDOnly, int ZeroPoss, int Mini, int Maxi) : -|*| returns the value selected +|*| JCK 981020: Added new types of cheats : 60 to 65 and 70 to 75 (see below) +|*| Possibility to change the maximum value when the user edits a cheat +|*| New functions : +|*| - int SelectValue(int v, int BCDOnly, int ZeroPoss, int Mini, int Maxi) : +|*| returns the value selected |*| -|*| JCK 981021: Added the corrections made by Brad Oliver : -|*| - fixed the bug that didn't allow users to find cheats -|*| - changed function build_tables : it has now int ParamCpuNo as parameter -|*| - use KEYCODE_CHEAT_TOGGLE (= KEYCODE_F5) to to toggle cheats ON/OFF +|*| JCK 981021: Added the corrections made by Brad Oliver : +|*| - fixed the bug that didn't allow users to find cheats +|*| - changed function build_tables : it has now int ParamCpuNo as parameter +|*| - use KEYCODE_CHEAT_TOGGLE (= KEYCODE_F5) to to toggle cheats ON/OFF |*| -|*| JCK 981022: Possibility to copy any watch is the first empty space by pressing KEYCODE_F4 -|*| Possibility to add the selected watch to the cheat list by pressing KEYCODE_F1 -|*| Possibility to add all the watches to the cheat list by pressing KEYCODE_F6 -|*| Possibility to reset all the watches by pressing KEYCODE_F7 -|*| Possibility to invoke help on ChooseWatch by pressing KEYCODE_F10 -|*| Corrected help text in function CheatListHelp (F6 and F7 keys were inverted) -|*| Added while (keyboard_pressed(key)) to remove the function keys from the buffer -|*| in the edit part of functions RenameCheatFile and EditCheat -|*| Matches and Watches are added to the cheat list with a new format if many CPUs : -|*| %04X (%01X) = %02X (Address (CPU) = Data) -|*| New variables : -|*| - MachHeight = ( Machine -> uiheight ); -|*| - MachWidth = ( Machine -> uiwidth ); -|*| - FontHeight = ( Machine -> uifont -> height ); -|*| - FontWidth = ( Machine -> uifont -> width ); -|*| - ManyCpus = ( cpu_gettotalcpu() > 1 ); -|*| Changed function xprintf : it has now int ForEdit as first parameter -|*| (if ForEdit=1 then add a cursor at the end of the text) -|*| Removed function xprintfForEdit (use now the new xprintf function) -|*| Renamed function DisplayCheats into DisplayActiveCheats -|*| Rewritten functions : -|*| - int cheat_menu(void) -|*| - void EditCheat(int CheatNo) -|*| - void ChooseWatch(void) -|*| New functions : -|*| - int EditCheatHeader(void) -|*| - int ChooseWatchHeader(void) -|*| - int ChooseWatchFooter(int y) -|*| - void ChooseWatchHelp(void) +|*| JCK 981022: Possibility to copy any watch is the first empty space by pressing KEYCODE_F4 +|*| Possibility to add the selected watch to the cheat list by pressing KEYCODE_F1 +|*| Possibility to add all the watches to the cheat list by pressing KEYCODE_F6 +|*| Possibility to reset all the watches by pressing KEYCODE_F7 +|*| Possibility to invoke help on ChooseWatch by pressing KEYCODE_F10 +|*| Corrected help text in function CheatListHelp (F6 and F7 keys were inverted) +|*| Added while (keyboard_pressed(key)) to remove the function keys from the buffer +|*| in the edit part of functions RenameCheatFile and EditCheat +|*| Matches and Watches are added to the cheat list with a new format if many CPUs : +|*| %04X (%01X) = %02X (Address (CPU) = Data) +|*| New variables : +|*| - MachHeight = ( Machine -> uiheight ); +|*| - MachWidth = ( Machine -> uiwidth ); +|*| - FontHeight = ( Machine -> uifont -> height ); +|*| - FontWidth = ( Machine -> uifont -> width ); +|*| - ManyCpus = ( cpu_gettotalcpu() > 1 ); +|*| Changed function xprintf : it has now int ForEdit as first parameter +|*| (if ForEdit=1 then add a cursor at the end of the text) +|*| Removed function xprintfForEdit (use now the new xprintf function) +|*| Renamed function DisplayCheats into DisplayActiveCheats +|*| Rewritten functions : +|*| - int cheat_menu(void) +|*| - void EditCheat(int CheatNo) +|*| - void ChooseWatch(void) +|*| New functions : +|*| - int EditCheatHeader(void) +|*| - int ChooseWatchHeader(void) +|*| - int ChooseWatchFooter(int y) +|*| - void ChooseWatchHelp(void) |*| -|*| JCK 981023: New #define : NOVALUE -0x0100 (if no value is selected) -|*| CPU is added to the watches only if many CPUs -|*| Changed keys in the matches list : -|*| - KEYCODE_F1 adds the selected match to the cheat list (old key was KEYCODE_ENTER) -|*| - KEYCODE_F6 adds all the matches to the cheat list (old key was KEYCODE_F2) -|*| Changed function SelectValue : -|*| - int SelectValue(int v, int BCDOnly, int ZeroPoss, int WrapPoss, int DispTwice, -|*| int Mini, int Maxi, char *fmt, char *msg, int ClrScr, int yPos) -|*| * if BCDOnly=1 it accepts only BCD values -|*| * if ZeroPoss=1 the user can select 0 -|*| * if WrapPoss=1 the user can have wrap from Mini to Maxi and from Maxi to Mini -|*| * if DispTwice=1 the value is displayed twice when BCDOnly=0 -|*| * fmt is the format of the number when BCDOnly=0 -|*| * msg is displayed in the function -|*| * if ClrScr=1 it clears the screen -|*| - it also returns NOVALUE if KEYCODE_ESC or KEYCODE_TAB is pressed -|*| Renamed functions : -|*| - StartCheat into StartSearch -|*| - ContinueCheat into ContinueSearch -|*| Rewritten functions : -|*| - void StartSearch(void) -|*| - void ContinueSearch(void) -|*| New functions : -|*| - int SelectMenu(int *s, struct DisplayText *dt, -|*| int ArrowsOnly, int WaitForKey, -|*| int Mini, int Maxi, int ClrScr, int *done) : -|*| returns the key pressed as well as the selected item -|*| - void AddCpuToWatch(int NoWatch,char *buffer) -|*| - int StartSearchHeader(void) -|*| - int ContinueSearchHeader(void) -|*| - int ContinueSearchMatchHeader(int count) -|*| - int ContinueSearchMatchFooter(int count, int idx, int y) +|*| JCK 981023: New #define : NOVALUE -0x0100 (if no value is selected) +|*| CPU is added to the watches only if many CPUs +|*| Changed keys in the matches list : +|*| - KEYCODE_F1 adds the selected match to the cheat list (old key was KEYCODE_ENTER) +|*| - KEYCODE_F6 adds all the matches to the cheat list (old key was KEYCODE_F2) +|*| Changed function SelectValue : +|*| - int SelectValue(int v, int BCDOnly, int ZeroPoss, int WrapPoss, int DispTwice, +|*| int Mini, int Maxi, char *fmt, char *msg, int ClrScr, int yPos) +|*| * if BCDOnly=1 it accepts only BCD values +|*| * if ZeroPoss=1 the user can select 0 +|*| * if WrapPoss=1 the user can have wrap from Mini to Maxi and from Maxi to Mini +|*| * if DispTwice=1 the value is displayed twice when BCDOnly=0 +|*| * fmt is the format of the number when BCDOnly=0 +|*| * msg is displayed in the function +|*| * if ClrScr=1 it clears the screen +|*| - it also returns NOVALUE if KEYCODE_ESC or KEYCODE_TAB is pressed +|*| Renamed functions : +|*| - StartCheat into StartSearch +|*| - ContinueCheat into ContinueSearch +|*| Rewritten functions : +|*| - void StartSearch(void) +|*| - void ContinueSearch(void) +|*| New functions : +|*| - int SelectMenu(int *s, struct DisplayText *dt, +|*| int ArrowsOnly, int WaitForKey, +|*| int Mini, int Maxi, int ClrScr, int *done) : +|*| returns the key pressed as well as the selected item +|*| - void AddCpuToWatch(int NoWatch,char *buffer) +|*| - int StartSearchHeader(void) +|*| - int ContinueSearchHeader(void) +|*| - int ContinueSearchMatchHeader(int count) +|*| - int ContinueSearchMatchFooter(int count, int idx, int y) |*| -|*| JCK 981026: New #define : FIRSTPOS (FontHeight*3/2) (yPos of the 1st string displayed) -|*| Display [S] instead of (Saved) to fit the screen when KEYCODE_F1 is pressed -|*| Display [W] instead of (Watch) to fit the screen when KEYCODE_F2 is pressed -|*| Corrected digit change in function ChooseWatch : based on CPU instead of 0 -|*| Matches are displayed using function pShortAddrTemplate -|*| Matches list and watches list are centered according to variable length of text +|*| JCK 981026: New #define : FIRSTPOS (FontHeight*3/2) (yPos of the 1st string displayed) +|*| Display [S] instead of (Saved) to fit the screen when KEYCODE_F1 is pressed +|*| Display [W] instead of (Watch) to fit the screen when KEYCODE_F2 is pressed +|*| Corrected digit change in function ChooseWatch : based on CPU instead of 0 +|*| Matches are displayed using function pShortAddrTemplate +|*| Matches list and watches list are centered according to variable length of text |*| -|*| JCK 981027: Trapped function build_tables() -|*| Modified functions to support 32 bits CPU : -|*| - static char * pAddrTemplate (int cpu) -|*| - static char * pShortAddrTemplate (int cpu) -|*| - void EditCheat(int CheatNo) -|*| - void ChooseWatch(void) -|*| - int EditCheatHeader(void) -|*| - int ChooseWatchHeader(void) -|*| - void EditCheatHelp (void) -|*| - void ChooseWatchHelp (void) +|*| JCK 981027: Trapped function build_tables() +|*| Modified functions to support 32 bits CPU : +|*| - static char * pAddrTemplate (int cpu) +|*| - static char * pShortAddrTemplate (int cpu) +|*| - void EditCheat(int CheatNo) +|*| - void ChooseWatch(void) +|*| - int EditCheatHeader(void) +|*| - int ChooseWatchHeader(void) +|*| - void EditCheatHelp (void) +|*| - void ChooseWatchHelp (void) |*| -|*| JCK 981030: Fixed a bug to scroll through descriptions of cheats -|*| The active cheats are displayed with a check -|*| Added the possibility to add a watch when result of a search is displayed -|*| by pressing KEYCODE_F2 -|*| New functions : -|*| - void AddCheckToName(int NoCheat,char *buffer) +|*| JCK 981030: Fixed a bug to scroll through descriptions of cheats +|*| The active cheats are displayed with a check +|*| Added the possibility to add a watch when result of a search is displayed +|*| by pressing KEYCODE_F2 +|*| New functions : +|*| - void AddCheckToName(int NoCheat,char *buffer) |*| -|*| JCK 981123: Removed ParamCpuNo in function build_tables (now use the static SearchCpuNo) -|*| Added new #define : JCK - Please do not remove ! Just comment it out ! +|*| JCK 981123: Removed ParamCpuNo in function build_tables (now use the static SearchCpuNo) +|*| Added new #define : JCK - Please do not remove ! Just comment it out ! |*| -|*| JCK 981125: MEMORY_WRITE instead of memory_find_base in function write_gameram -|*| New functions : -|*| - int ConvertAddr(int ParamCpuNo, int ParamAddr) : -|*| returns a converted address to fit low endianess +|*| JCK 981125: MEMORY_WRITE instead of memory_find_base in function write_gameram +|*| New functions : +|*| - int ConvertAddr(int ParamCpuNo, int ParamAddr) : +|*| returns a converted address to fit low endianess |*| -|*| JCK 981126: The region of ext tables is the one of the CPU (no more crash) +|*| JCK 981126: The region of ext tables is the one of the CPU (no more crash) |*| -|*| JCK 981203: Change context before writing into memory +|*| JCK 981203: Change context before writing into memory |*| -|*| JCK 981204: New text when cheats are saved to file or added as watch -|*| Changed type of cheat (special field in cheat_struct) to match -|*| AddCheckToName function +|*| JCK 981204: New text when cheats are saved to file or added as watch +|*| Changed type of cheat (special field in cheat_struct) to match +|*| AddCheckToName function |*| -|*| JCK 981206: Ext memory is scanned only if search in a different CPU +|*| JCK 981206: Ext memory is scanned only if search in a different CPU |*| -|*| JCK 981207: Possibility to get info on a cheat by pressing KEYCODE_F12 -|*| Changed function CheatListHelp to include the new KEYCODE_F12 key -|*| Fixed display (not in function ChooseWatch because of rotation) -|*| New functions : -|*| - void ClearTextLine(int addskip, int ypos) -|*| - void ClearArea(int addskip, int ystart, int yend) +|*| JCK 981207: Possibility to get info on a cheat by pressing KEYCODE_F12 +|*| Changed function CheatListHelp to include the new KEYCODE_F12 key +|*| Fixed display (not in function ChooseWatch because of rotation) +|*| New functions : +|*| - void ClearTextLine(int addskip, int ypos) +|*| - void ClearArea(int addskip, int ystart, int yend) |*| -|*| JCK 981208: Integrated some of VM's changes (see below) -|*| Added new #define : FAST_SEARCH 1 (speed-up search of cheat codes) -|*| Speed-up search of cheat codes for TMS34010 and NEOGEO games -|*| Added messages to show that a search is in progress -|*| Error message in function build_tables is more user-friendly +|*| JCK 981208: Integrated some of VM's changes (see below) +|*| Added new #define : FAST_SEARCH 1 (speed-up search of cheat codes) +|*| Speed-up search of cheat codes for TMS34010 and NEOGEO games +|*| Added messages to show that a search is in progress +|*| Error message in function build_tables is more user-friendly |*| -|*| JCK 981209: Fixed display in ContinueSearch function +|*| JCK 981209: Fixed display in ContinueSearch function |*| -|*| JCK 981210: Integrated some of VM's changes : scan mwa instead of mra -|*| In searches, read memory instead of contents of ext. memories -|*| One loop to verify memory locations and count them -|*| New functions : -|*| - void ShowSearchInProgress(void) -|*| - void HideSearchInProgress(void) -|*| Removed functions : -|*| - int ConvertAddr(int ParamCpuNo, int ParamAddr) -|*| - static unsigned char read_ram (struct ExtMemory *table, int offset) -|*| Removed #define : -|*| - RD_STARTRAM(a) read_ram(StartRam,a) -|*| - WR_STARTRAM(a,v) write_ram(StartRam,a,v) -|*| - RD_BACKUPRAM(a) read_ram(BackupRam,a) -|*| - WR_BACKUPRAM(a,v) write_ram(BackupRam,a,v) -|*| - RD_FLAGTABLE(a) read_ram(FlagTable,a) -|*| - WR_FLAGTABLE(a,v) write_ram(FlagTable,a,v) +|*| JCK 981210: Integrated some of VM's changes : scan mwa instead of mra +|*| In searches, read memory instead of contents of ext. memories +|*| One loop to verify memory locations and count them +|*| New functions : +|*| - void ShowSearchInProgress(void) +|*| - void HideSearchInProgress(void) +|*| Removed functions : +|*| - int ConvertAddr(int ParamCpuNo, int ParamAddr) +|*| - static unsigned char read_ram (struct ExtMemory *table, int offset) +|*| Removed #define : +|*| - RD_STARTRAM(a) read_ram(StartRam,a) +|*| - WR_STARTRAM(a,v) write_ram(StartRam,a,v) +|*| - RD_BACKUPRAM(a) read_ram(BackupRam,a) +|*| - WR_BACKUPRAM(a,v) write_ram(BackupRam,a,v) +|*| - RD_FLAGTABLE(a) read_ram(FlagTable,a) +|*| - WR_FLAGTABLE(a,v) write_ram(FlagTable,a,v) |*| -|*| JCK 981211: Added new #define : COMMENTCHEAT 999 (type of cheat for comments) -|*| Added new type of cheat : 999 (comment) -|*| Comment is marked # in function AddCheckToName -|*| Cheat structure for a comment : -|*| - .Address = 0 -|*| - .Data = 0 -|*| - .Special = COMMENTCHEAT -|*| - other fields as usual -|*| New functions : -|*| - void EditComment(int CheatNo, int ypos) +|*| JCK 981211: Added new #define : COMMENTCHEAT 999 (type of cheat for comments) +|*| Added new type of cheat : 999 (comment) +|*| Comment is marked # in function AddCheckToName +|*| Cheat structure for a comment : +|*| - .Address = 0 +|*| - .Data = 0 +|*| - .Special = COMMENTCHEAT +|*| - other fields as usual +|*| New functions : +|*| - void EditComment(int CheatNo, int ypos) |*| -|*| JCK 981212: Added More to struct cheat_struct (more description on a cheat) -|*| Fields Name and More of struct cheat_struct are only 40 chars long -|*| Possibility to get a cheat comment by pressing KEYCODE_PLUS_PAD -|*| KEYCODE_DEL initialises string in xedit function -|*| Special is saved on 3 digits (%03d) -|*| Added linked cheats (types 100-144 same as types 0-44) -|*| Variable int fastsearch instead of #define FAST_SEARCH -|*| (this variable can be modified via options or command-line) -|*| Renamed CheatTotal to ActiveCheatTotal (variable and struct) -|*| Possibility to add codes from another filename by pressing -|*| (KEYCODE_LEFT_SHIFT or KEYCODE_RIGHT_SHIFT) + KEYCODE_F5 -|*| 15 matches instead of 10 -|*| New functions : -|*| - int xedit(int x,int y,char *inputs,int maxlen) -|*| - static char *FormatAddr(int cpu, int addtext) -|*| - void SearchInProgress(int yPos, int ShowMsg) -|*| - void DisplayWatches(int ClrScr, int *x,int *y, char *buffer) -|*| - void DeleteActiveCheatFromTable(int NoCheat) -|*| - void DeleteLoadedCheatFromTable(int NoCheat) -|*| Removed functions : -|*| - void EditComment(int CheatNo, int ypos) -|*| - static char * pAddrTemplate (int cpu) -|*| - static char * pShortAddrTemplate (int cpu) -|*| - void ShowSearchInProgress(void) -|*| - void HideSearchInProgress(void) -|*| Rewritten functions : -|*| - void DoCheat(void) -|*| - void LoadCheat(int merge, char *filename) -|*| - int RenameCheatFile(int DisplayFileName, char *filename) -|*| - void EditCheat(int CheatNo) -|*| - void DisplayActiveCheats(int y) +|*| JCK 981212: Added More to struct cheat_struct (more description on a cheat) +|*| Fields Name and More of struct cheat_struct are only 40 chars long +|*| Possibility to get a cheat comment by pressing KEYCODE_PLUS_PAD +|*| KEYCODE_DEL initialises string in xedit function +|*| Special is saved on 3 digits (%03d) +|*| Added linked cheats (types 100-144 same as types 0-44) +|*| Variable int fastsearch instead of #define FAST_SEARCH +|*| (this variable can be modified via options or command-line) +|*| Renamed CheatTotal to ActiveCheatTotal (variable and struct) +|*| Possibility to add codes from another filename by pressing +|*| (KEYCODE_LEFT_SHIFT or KEYCODE_RIGHT_SHIFT) + KEYCODE_F5 +|*| 15 matches instead of 10 +|*| New functions : +|*| - int xedit(int x,int y,char *inputs,int maxlen) +|*| - static char *FormatAddr(int cpu, int addtext) +|*| - void SearchInProgress(int yPos, int ShowMsg) +|*| - void DisplayWatches(int ClrScr, int *x,int *y, char *buffer) +|*| - void DeleteActiveCheatFromTable(int NoCheat) +|*| - void DeleteLoadedCheatFromTable(int NoCheat) +|*| Removed functions : +|*| - void EditComment(int CheatNo, int ypos) +|*| - static char * pAddrTemplate (int cpu) +|*| - static char * pShortAddrTemplate (int cpu) +|*| - void ShowSearchInProgress(void) +|*| - void HideSearchInProgress(void) +|*| Rewritten functions : +|*| - void DoCheat(void) +|*| - void LoadCheat(int merge, char *filename) +|*| - int RenameCheatFile(int DisplayFileName, char *filename) +|*| - void EditCheat(int CheatNo) +|*| - void DisplayActiveCheats(int y) |*| -|*| JCK 981213: Variable int sologame to load cheats for one player only -|*| (this variable can be modified via options or command-line) -|*| Fixed display in EditCheat function -|*| Possibility to edit the More field in EditCheat function -|*| Possibility to toggle cheats for one player only ON/OFF -|*| by pressing KEYCODE_F11 -|*| Possibility to scan many banks of memory -|*| Possibility to press KEYCODE_F1 in SelectValue function -|*| New functions : -|*| - int SkipBank(int CpuToScan, int *BankToScanTable, void (*handler)(int,int)) -|*| Rewritten functions : -|*| - static int build_tables (void) +|*| JCK 981213: Variable int sologame to load cheats for one player only +|*| (this variable can be modified via options or command-line) +|*| Fixed display in EditCheat function +|*| Possibility to edit the More field in EditCheat function +|*| Possibility to toggle cheats for one player only ON/OFF +|*| by pressing KEYCODE_F11 +|*| Possibility to scan many banks of memory +|*| Possibility to press KEYCODE_F1 in SelectValue function +|*| New functions : +|*| - int SkipBank(int CpuToScan, int *BankToScanTable, void (*handler)(int,int)) +|*| Rewritten functions : +|*| - static int build_tables (void) |*| -|*| JCK 981214: Integrated some of VM's changes : function SelectCheat has been rewritten -|*| No more reference to HardRefresh in SelectCheat function (label has been deleted) -|*| One function to save one or all cheats to the cheatfile (SaveCheat) -|*| New #define : -|*| - NEW_CHEAT ((struct cheat_struct *) -1) -|*| - YHEAD_SELECT (FontHeight * 9) -|*| - YFOOT_SELECT (MachHeight - (FontHeight * 2)) -|*| - YFOOT_MATCH (MachHeight - (FontHeight * 8)) -|*| - YFOOT_WATCH (MachHeight - (FontHeight * 3)) -|*| Rewritten functions : -|*| - void ContinueSearchMatchFooter(int count, int idx) -|*| - void ChooseWatchFooter(void) -|*| New functions : -|*| - void set_cheat(struct cheat_struct *dest, struct cheat_struct *src) -|*| - int build_cheat_list(int Index, struct DisplayText ext_dt[60], -|*| char ext_str2[MAX_DISPLAYCHEATS + 1][40]) -|*| - int SelectCheatHeader(void) -|*| - int SaveCheat(int NoCheat) -|*| - int FindFreeWatch(void) -|*| - void AddCpuToAddr(int cpu, int addr, int data, char *buffer) -|*| Modified functions to use the new set_cheat function : -|*| - void DeleteActiveCheatFromTable(int NoCheat) -|*| - void DeleteLoadedCheatFromTable(int NoCheat) -|*| - void ContinueSearch(void) -|*| - void ChooseWatch(void) +|*| JCK 981214: Integrated some of VM's changes : function SelectCheat has been rewritten +|*| No more reference to HardRefresh in SelectCheat function (label has been deleted) +|*| One function to save one or all cheats to the cheatfile (SaveCheat) +|*| New #define : +|*| - NEW_CHEAT ((struct cheat_struct *) -1) +|*| - YHEAD_SELECT (FontHeight * 9) +|*| - YFOOT_SELECT (MachHeight - (FontHeight * 2)) +|*| - YFOOT_MATCH (MachHeight - (FontHeight * 8)) +|*| - YFOOT_WATCH (MachHeight - (FontHeight * 3)) +|*| Rewritten functions : +|*| - void ContinueSearchMatchFooter(int count, int idx) +|*| - void ChooseWatchFooter(void) +|*| New functions : +|*| - void set_cheat(struct cheat_struct *dest, struct cheat_struct *src) +|*| - int build_cheat_list(int Index, struct DisplayText ext_dt[60], +|*| char ext_str2[MAX_DISPLAYCHEATS + 1][40]) +|*| - int SelectCheatHeader(void) +|*| - int SaveCheat(int NoCheat) +|*| - int FindFreeWatch(void) +|*| - void AddCpuToAddr(int cpu, int addr, int data, char *buffer) +|*| Modified functions to use the new set_cheat function : +|*| - void DeleteActiveCheatFromTable(int NoCheat) +|*| - void DeleteLoadedCheatFromTable(int NoCheat) +|*| - void ContinueSearch(void) +|*| - void ChooseWatch(void) |*| -|*| JCK 981215: Fixed the -sologame option : cheats for players 2, 3 and 4 are not loaded -|*| dt strcuture is correctly filled in SelectCheat function +|*| JCK 981215: Fixed the -sologame option : cheats for players 2, 3 and 4 are not loaded +|*| dt strcuture is correctly filled in SelectCheat function |*| -|*| JCK 981216: Partially fixed display for the watches : the last watch is now removed -|*| Fixed message when user wants to add a cheatfile (SHIFT + KEYCODE_F5) -|*| Name of an active cheat changes according to the name of the loaded cheat -|*| Added a new help for CheatListHelp and CheatListHelpEmpty -|*| Help is now centered according to the max. length of help text -|*| SelectCheatHeader is now correctly called -|*| Possibility to activate more than one cheat for types 20-24 and 40-44 -|*| Possibility to change the speed of search in the "Start Search" menu -|*| Check is made to see that a user hasn't pressed KEYCODE_xSHIFT in combinaison -|*| with the function keys (KEYCODE_Fx) in the following functions : -|*| - void SelectCheat(void) -|*| - void ContinueSearch(void) -|*| - void ChooseWatch(void) -|*| New functions : -|*| - int SelectFastSearchHeader(void) -|*| - void SelectFastSearchHelp(void) -|*| Rewritten functions : -|*| - void CheatListHelp (void) -|*| - void CheatListHelpEmpty (void) +|*| JCK 981216: Partially fixed display for the watches : the last watch is now removed +|*| Fixed message when user wants to add a cheatfile (SHIFT + KEYCODE_F5) +|*| Name of an active cheat changes according to the name of the loaded cheat +|*| Added a new help for CheatListHelp and CheatListHelpEmpty +|*| Help is now centered according to the max. length of help text +|*| SelectCheatHeader is now correctly called +|*| Possibility to activate more than one cheat for types 20-24 and 40-44 +|*| Possibility to change the speed of search in the "Start Search" menu +|*| Check is made to see that a user hasn't pressed KEYCODE_xSHIFT in combinaison +|*| with the function keys (KEYCODE_Fx) in the following functions : +|*| - void SelectCheat(void) +|*| - void ContinueSearch(void) +|*| - void ChooseWatch(void) +|*| New functions : +|*| - int SelectFastSearchHeader(void) +|*| - void SelectFastSearchHelp(void) +|*| Rewritten functions : +|*| - void CheatListHelp (void) +|*| - void CheatListHelpEmpty (void) |*| -|*| JCK 981217: Use of keyboard_pressed_memory() instead of keyboard_pressed() to test -|*| KEYCODE_CHEAT_TOGGLE, KEYCODE_INSERT and KEYCODE_DEL in DoCheat function -|*| dt strcuture is correctly filled in SelectCheat function +|*| JCK 981217: Use of keyboard_pressed_memory() instead of keyboard_pressed() to test +|*| KEYCODE_CHEAT_TOGGLE, KEYCODE_INSERT and KEYCODE_DEL in DoCheat function +|*| dt strcuture is correctly filled in SelectCheat function |*| -|*| JCK 990115: Fixed the AddCheckToName function (linked cheats) -|*| Sound OFF when entering the cheat menu and ON when exiting it -|*| Frameskip, autoframeskip, showfps and showprofile are set to 0 -|*| while in the cheat menu then set back to the original values -|*| Possibility to view the last results of a search -|*| Changed function ContinueSearch : it has now int ViewLast as parameter -|*| (if ViewLast=1 then only the results are displayed) +|*| JCK 990115: Fixed the AddCheckToName function (linked cheats) +|*| Sound OFF when entering the cheat menu and ON when exiting it +|*| Frameskip, autoframeskip, showfps and showprofile are set to 0 +|*| while in the cheat menu then set back to the original values +|*| Possibility to view the last results of a search +|*| Changed function ContinueSearch : it has now int ViewLast as parameter +|*| (if ViewLast=1 then only the results are displayed) |*| -|*| JCK 990120: Fixed bit-related linked cheats (types 120-124 and 140-144) +|*| JCK 990120: Fixed bit-related linked cheats (types 120-124 and 140-144) |*| -|*| JCK 990128: Type of cheat is displayed on 3 digits -|*| In the edit cheat, on the type line : -|*| - KEYCODE_HOME adds 0x100 -|*| - KEYCODE_END subs 0x100 -|*| In functions DoCheat and AddCheckToName, special cases linked -|*| with types 5-11 and 60-65 use 1000+ instead of 200+ +|*| JCK 990128: Type of cheat is displayed on 3 digits +|*| In the edit cheat, on the type line : +|*| - KEYCODE_HOME adds 0x100 +|*| - KEYCODE_END subs 0x100 +|*| In functions DoCheat and AddCheckToName, special cases linked +|*| with types 5-11 and 60-65 use 1000+ instead of 200+ |*| -|*| JCK 990131: 200 cheats instead of 150 -|*| New message if no match at the end of first search -|*| Number of match is correctly displayed when view last results -|*| Positions of the menus are saved -|*| Possibility of selecting specific memory areas : -|*| - keys when the list is displayed : -|*| * KEYCODE_ENTER : toggle memory area scanned ON/OFF -|*| * KEYCODE_F6 : all memory areas scanned ON -|*| * KEYCODE_F7 : all memory areas scanned OFF -|*| * KEYCODE_F12 : display info on a memory area -|*| - the tables are built each time the list is displayed -|*| New #define : -|*| - MAX_DISPLAYMEM 16 -|*| - YHEAD_MEMORY (FontHeight * 8) -|*| - YFOOT_MEMORY (MachHeight - (FontHeight * 2)) -|*| New struct : memory_struct -|*| New functions : -|*| - void AddCheckToMemArea(int NoMemArea,char *buffer) -|*| - void InitMemoryAreas(void) -|*| - int build_mem_list(int Index, struct DisplayText ext_dt[60], -|*| char ext_str2[MAX_DISPLAYMEM + 1][40]) -|*| - int SelectMemoryHeader(void) -|*| - void SelectMemoryAreas(void) -|*| Possibility to use KEYCODE_SPACE in the following functions : -|*| - void SelectCheat(void) -|*| - void SelectMemoryAreas(void) +|*| JCK 990131: 200 cheats instead of 150 +|*| New message if no match at the end of first search +|*| Number of match is correctly displayed when view last results +|*| Positions of the menus are saved +|*| Possibility of selecting specific memory areas : +|*| - keys when the list is displayed : +|*| * KEYCODE_ENTER : toggle memory area scanned ON/OFF +|*| * KEYCODE_F6 : all memory areas scanned ON +|*| * KEYCODE_F7 : all memory areas scanned OFF +|*| * KEYCODE_F12 : display info on a memory area +|*| - the tables are built each time the list is displayed +|*| New #define : +|*| - MAX_DISPLAYMEM 16 +|*| - YHEAD_MEMORY (FontHeight * 8) +|*| - YFOOT_MEMORY (MachHeight - (FontHeight * 2)) +|*| New struct : memory_struct +|*| New functions : +|*| - void AddCheckToMemArea(int NoMemArea,char *buffer) +|*| - void InitMemoryAreas(void) +|*| - int build_mem_list(int Index, struct DisplayText ext_dt[60], +|*| char ext_str2[MAX_DISPLAYMEM + 1][40]) +|*| - int SelectMemoryHeader(void) +|*| - void SelectMemoryAreas(void) +|*| Possibility to use KEYCODE_SPACE in the following functions : +|*| - void SelectCheat(void) +|*| - void SelectMemoryAreas(void) |*| -|*| JCK 990201: Header correctly displayed in fuction SelectCheat -|*| Position of the selectcheat menu is saved +|*| JCK 990201: Header correctly displayed in fuction SelectCheat +|*| Position of the selectcheat menu is saved |*| -|*| JCK 990220: New cheat descriptions in the EditCheat window -|*| Rename the #define of the methods of search : -|*| - SEARCH_VALUE 1 (old Method_1) -|*| - SEARCH_TIME 2 (old Method_2) -|*| - SEARCH_ENERGY 3 (old Method_3) -|*| - SEARCH_BIT 4 (old Method_4) -|*| - SEARCH_BYTE 5 (old Method_5) -|*| Message displayed when KEYCODE_CHEAT_TOGGLE is pressed lasts for 0.5 seconds -|*| (in fact, Machine->drv->frames_per_second / 2) +|*| JCK 990220: New cheat descriptions in the EditCheat window +|*| Rename the #define of the methods of search : +|*| - SEARCH_VALUE 1 (old Method_1) +|*| - SEARCH_TIME 2 (old Method_2) +|*| - SEARCH_ENERGY 3 (old Method_3) +|*| - SEARCH_BIT 4 (old Method_4) +|*| - SEARCH_BYTE 5 (old Method_5) +|*| Message displayed when KEYCODE_CHEAT_TOGGLE is pressed lasts for 0.5 seconds +|*| (in fact, Machine->drv->frames_per_second / 2) |*| -|*| JCK 990221: 20 watches instead of 10 -|*| Possibility to select a starting value for search methods 3, 4 and 5 -|*| Possibility to restore the previous values of a search -|*| Possibility to add al matches to the watches by pressing KEYCODE_F8 -|*| New functions : -|*| - int SelectSearchValue(void) -|*| - int SelectSearchValueHeader(void) -|*| - static void copy_ram (struct ExtMemory *dest, struct ExtMemory *src) +|*| JCK 990221: 20 watches instead of 10 +|*| Possibility to select a starting value for search methods 3, 4 and 5 +|*| Possibility to restore the previous values of a search +|*| Possibility to add al matches to the watches by pressing KEYCODE_F8 +|*| New functions : +|*| - int SelectSearchValue(void) +|*| - int SelectSearchValueHeader(void) +|*| - static void copy_ram (struct ExtMemory *dest, struct ExtMemory *src) |*| -|*| JCK 990224: Added messages in the restoration of the previous values of a search -|*| New #define : -|*| - #define RESTORE_NOINIT 0 -|*| - #define RESTORE_NOSAVE 1 -|*| - #define RESTORE_DONE 2 -|*| - #define RESTORE_OK 3 -|*| New functions : -|*| - void RestoreSearch(void) -|*| Rewritten functions : -|*| - int cheat_readkey(void) +|*| JCK 990224: Added messages in the restoration of the previous values of a search +|*| New #define : +|*| - #define RESTORE_NOINIT 0 +|*| - #define RESTORE_NOSAVE 1 +|*| - #define RESTORE_DONE 2 +|*| - #define RESTORE_OK 3 +|*| New functions : +|*| - void RestoreSearch(void) +|*| Rewritten functions : +|*| - int cheat_readkey(void) |*| -|*| JCK 990228: Fixed old key for menus -|*| Added new #define : WATCHCHEAT 998 (type of cheat for "watch-only" cheats) -|*| Added new type of cheat : 998 ("watch-only" cheats) +|*| JCK 990228: Fixed old key for menus +|*| Added new #define : WATCHCHEAT 998 (type of cheat for "watch-only" cheats) +|*| Added new type of cheat : 998 ("watch-only" cheats) |*| -|*| JCK 990303: Added the corrections from the original MAME 035B4 source file : -|*| unused variables have been removed -|*| New #define : -|*| - LAST_UPDATE (date of the last modifications to the cheat engine) -|*| - LAST_CODER (initials (3 letters max) of the coder who made the modifications) -|*| - CHEAT_VERSION (version of the cheat engine) +|*| JCK 990303: Added the corrections from the original MAME 035B4 source file : +|*| unused variables have been removed +|*| New #define : +|*| - LAST_UPDATE (date of the last modifications to the cheat engine) +|*| - LAST_CODER (initials (3 letters max) of the coder who made the modifications) +|*| - CHEAT_VERSION (version of the cheat engine) |*| -|*| JCK 990305: New functions : -|*| - void DisplayVersion(void) -|*| - void cheat_clearbitmap(void) -|*| Replaced calls to function osd_clearbitmap() by cheat_clearbitmap() +|*| JCK 990305: New functions : +|*| - void DisplayVersion(void) +|*| - void cheat_clearbitmap(void) +|*| Replaced calls to function osd_clearbitmap() by cheat_clearbitmap() |*| -|*| JCK 990307: New functions : -|*| - void LoadDatabases(int InCheat) -|*| Added to possibility to merge many cheatfiles : -|*| - separate them by a semi-colon (;) in MAME.CFG (ex: cheatfile=CHEAT.DAT;CHEAT_UP.DAT) -|*| - line must not exceed 127 chars -|*| Possibility to select all cheats by pressing -|*| (KEYCODE_LEFT_SHIFT or KEYCODE_RIGHT_SHIFT) + KEYCODE_F7 -|*| Possibility to select a starting value for search method 2 +|*| JCK 990307: New functions : +|*| - void LoadDatabases(int InCheat) +|*| Added to possibility to merge many cheatfiles : +|*| - separate them by a semi-colon (;) in MAME.CFG (ex: cheatfile=CHEAT.DAT;CHEAT_UP.DAT) +|*| - line must not exceed 127 chars +|*| Possibility to select all cheats by pressing +|*| (KEYCODE_LEFT_SHIFT or KEYCODE_RIGHT_SHIFT) + KEYCODE_F7 +|*| Possibility to select a starting value for search method 2 |*| -|*| JCK 990308: Smaller space between each watch to have more watches on screen -|*| Modified functions affected by the space between watches : -|*| - void DisplayWatches(int ClrScr, int *x,int *y,char *buffer) -|*| - void ChooseWatch(void) +|*| JCK 990308: Smaller space between each watch to have more watches on screen +|*| Modified functions affected by the space between watches : +|*| - void DisplayWatches(int ClrScr, int *x,int *y,char *buffer) +|*| - void ChooseWatch(void) |*| -|*| JCK 990312: General help in an external file (CHEAT.HLP) -|*| New #define : -|*| - MAX_TEXT_LINE 1000 -|*| New struct : TextLine -|*| New functions : -|*| - static void reset_texttable (struct TextLine *table) -|*| - void LoadHelp(char *filename, struct TextLine *table) -|*| - void DisplayHelpFile(struct TextLine *table) -|*| Cheats, Matches and Memory Areas are limited to the height of the screen -|*| Possibility to access directly in the main menu by pressing KEYCODE_HOME -|*| Possibility to access directly in "Continue Search" sub-menu by pressing KEYCODE_END -|*| Changed function ContinueSearch : void ContinueSearch(int selected, int ViewLast) +|*| JCK 990312: General help in an external file (CHEAT.HLP) +|*| New #define : +|*| - MAX_TEXT_LINE 1000 +|*| New struct : TextLine +|*| New functions : +|*| - static void reset_texttable (struct TextLine *table) +|*| - void LoadHelp(char *filename, struct TextLine *table) +|*| - void DisplayHelpFile(struct TextLine *table) +|*| Cheats, Matches and Memory Areas are limited to the height of the screen +|*| Possibility to access directly in the main menu by pressing KEYCODE_HOME +|*| Possibility to access directly in "Continue Search" sub-menu by pressing KEYCODE_END +|*| Changed function ContinueSearch : void ContinueSearch(int selected, int ViewLast) |*| -|*| JCK 990316: New functions : -|*| - void cheat_save_frameskips(void) -|*| - void cheat_rest_frameskips(void) -|*| Sound is fixed when entering the cheat engine by pressing KEYCODE_HOME or KEYCODE_END -|*| No search of (value-1) for search methods other than 1 (value) -|*| Fixed the info display in function SelectMemoryAreas +|*| JCK 990316: New functions : +|*| - void cheat_save_frameskips(void) +|*| - void cheat_rest_frameskips(void) +|*| Sound is fixed when entering the cheat engine by pressing KEYCODE_HOME or KEYCODE_END +|*| No search of (value-1) for search methods other than 1 (value) +|*| Fixed the info display in function SelectMemoryAreas |*| -|*| JCK 990318: Possibility to edit the addresses by pressing KEYCODE_F3 -|*| Changed function xedit : it has now int hexaonly as last parameter -|*| Modified functions to edit the addresses -|*| - void EditCheat(int CheatNo) -|*| - void ChooseWatch(void) +|*| JCK 990318: Possibility to edit the addresses by pressing KEYCODE_F3 +|*| Changed function xedit : it has now int hexaonly as last parameter +|*| Modified functions to edit the addresses +|*| - void EditCheat(int CheatNo) +|*| - void ChooseWatch(void) |*| -|*| JCK 990319: Fixed display for rotation and flip -|*| Modified variables : -|*| - FontHeight = ( Machine -> uifontheight ); -|*| - FontWidth = ( Machine -> uifontwidth ); -|*| Changed function DisplayWatches : it has now int highlight, dx and dy as parameters -|*| - highlights watch highlight or none if highlight = MAX_WATCHES) -|*| - dx and dy are the variations since last display -|*| Rewritten functions : -|*| - void ClearTextLine(int addskip, int ypos) -|*| - void ClearArea(int addskip, int ystart, int yend) +|*| JCK 990319: Fixed display for rotation and flip +|*| Modified variables : +|*| - FontHeight = ( Machine -> uifontheight ); +|*| - FontWidth = ( Machine -> uifontwidth ); +|*| Changed function DisplayWatches : it has now int highlight, dx and dy as parameters +|*| - highlights watch highlight or none if highlight = MAX_WATCHES) +|*| - dx and dy are the variations since last display +|*| Rewritten functions : +|*| - void ClearTextLine(int addskip, int ypos) +|*| - void ClearArea(int addskip, int ystart, int yend) |*| -|*| JCK 990321: Added new #define : USENEWREADKEY - Please do not remove ! Just comment it out ! -|*| New or changed keys in function xedit : -|*| - KEYCODE_LEFT and KEYCODE_RIGHT moves the cursor one car. left/right -|*| - KEYCODE_HOME and KEYCODE_END moves the cursor at the begining/end of the text -|*| - KEYCODE_BACKSPACE dels the car. under the cursor -|*| - KEYCODE_INSERT adds a space in the text -|*| - KEYCODE_DEL erases all the text +|*| JCK 990321: Added new #define : USENEWREADKEY - Please do not remove ! Just comment it out ! +|*| New or changed keys in function xedit : +|*| - KEYCODE_LEFT and KEYCODE_RIGHT moves the cursor one car. left/right +|*| - KEYCODE_HOME and KEYCODE_END moves the cursor at the begining/end of the text +|*| - KEYCODE_BACKSPACE dels the car. under the cursor +|*| - KEYCODE_INSERT adds a space in the text +|*| - KEYCODE_DEL erases all the text |*| -|*| JCK 990404: Fixed function IsBCD -|*| Fixed display in function ContinueSearch -|*| Modified function LoadHelp : it now returns a int -|*| In the edit cheat, on the data line : -|*| - KEYCODE_HOME subs 0x80 to the value -|*| - KEYCODE_END adds 0x80 to the value -|*| Help has been completely rewritten -|*| New functions : -|*| - int CreateHelp (char **paDisplayText, struct TextLine *table) -|*| Rewritten functions : -|*| - void ShowHelp(int LastHelpLine, struct TextLine *table) -|*| - void CheatListHelp (void) -|*| - void CheatListHelpEmpty (void) -|*| - void StartSearchHelp (void) -|*| - void EditCheatHelp (void) -|*| - void ChooseWatchHelp (void) -|*| - void SelectFastSearchHelp (void) -|*| New #define : -|*| - MAX_DT 130 -|*| - OFFSET_LINK_CHEAT 500 -|*| Modified #define : -|*| - TOTAL_CHEAT_TYPES 75 -|*| Linked cheats are now 500+ instead of 100+ +|*| JCK 990404: Fixed function IsBCD +|*| Fixed display in function ContinueSearch +|*| Modified function LoadHelp : it now returns a int +|*| In the edit cheat, on the data line : +|*| - KEYCODE_HOME subs 0x80 to the value +|*| - KEYCODE_END adds 0x80 to the value +|*| Help has been completely rewritten +|*| New functions : +|*| - int CreateHelp (char **paDisplayText, struct TextLine *table) +|*| Rewritten functions : +|*| - void ShowHelp(int LastHelpLine, struct TextLine *table) +|*| - void CheatListHelp (void) +|*| - void CheatListHelpEmpty (void) +|*| - void StartSearchHelp (void) +|*| - void EditCheatHelp (void) +|*| - void ChooseWatchHelp (void) +|*| - void SelectFastSearchHelp (void) +|*| New #define : +|*| - MAX_DT 130 +|*| - OFFSET_LINK_CHEAT 500 +|*| Modified #define : +|*| - TOTAL_CHEAT_TYPES 75 +|*| Linked cheats are now 500+ instead of 100+ |*| -|*| JCK 990529: Fixed function ContinueSearch (frameskips) +|*| JCK 990529: Fixed function ContinueSearch (frameskips) |*| -|*| JCK 990701: Fixed cheat types 061 & 071 -|*| Added a message in function SelectValue if value is out of range +|*| JCK 990701: Fixed cheat types 061 & 071 +|*| Added a message in function SelectValue if value is out of range |*| -|*| JCK 990717: Cheat types 060 to 075 are now correctly saved to the text file -|*| Watches are correctly dipslayed when you move them with the I,J,K,L keys +|*| JCK 990717: Cheat types 060 to 075 are now correctly saved to the text file +|*| Watches are correctly dipslayed when you move them with the I,J,K,L keys |*| |*| |*| Modifications by Felipe de Almeida Leme (FAL) |*| -|*| FAL 981029: Pointer checking to avoid segmentation fault when reading an incorrect cheat file +|*| FAL 981029: Pointer checking to avoid segmentation fault when reading an incorrect cheat file |*| |*| Modifications by MSH |*| -|*| MSH 990217: New function int cheat_readkey(void) to fix the keyboard_read_sync under Windows -|*| Replaced calls to function keyboard_read_sync() by cheat_readkey() when it was necessary +|*| MSH 990217: New function int cheat_readkey(void) to fix the keyboard_read_sync under Windows +|*| Replaced calls to function keyboard_read_sync() by cheat_readkey() when it was necessary |*| -|*| MSH 990310: Use of the #ifdef WIN32 to fix the keyboard under Windows +|*| MSH 990310: Use of the #ifdef WIN32 to fix the keyboard under Windows |*| |*| -|*| MLR 991114: Support for gzipped cheat files +|*| MLR 991114: Support for gzipped cheat files |*| \*|*/ /*\ |*| TO DO list by JCK from The Ultimate Patchers |*| -|*| JCK 990712: Possibility to search for BCD values in search method 2 (timer) -|*| Rewrite the help (general and other) and try to use the functions in DATAFILE.C -|*| Fix function DisplayWatches (more than one line of watches) -|*| Trap the Shift keys : correct bug when they are pressed in xedit function -|*| Merge functions DeleteActiveCheatFromTable and DeleteLoadedCheatFromTable -|*| Rewrite function FormatAddr ? +|*| JCK 990712: Possibility to search for BCD values in search method 2 (timer) +|*| Rewrite the help (general and other) and try to use the functions in DATAFILE.C +|*| Fix function DisplayWatches (more than one line of watches) +|*| Trap the Shift keys : correct bug when they are pressed in xedit function +|*| Merge functions DeleteActiveCheatFromTable and DeleteLoadedCheatFromTable +|*| Rewrite function FormatAddr ? \*|*/ #include "driver.h" #include #include -#include /* for toupper() and tolower() */ +#include /* for toupper() and tolower() */ /* The CHEAT.DAT file: -This file should be in the same directory of MAME.EXE . -This file can be edited with a text editor, but keep the same format: - all fields are separated by a colon (:) + all fields are separated by a colon (:) * Name of the game (short name) * No of the CPU * Address in Hexadecimal @@ -665,7 +665,7 @@ Types of cheats: 003-Wait 2 second between 2 writes 004-Wait 5 second between 2 writes 005-When the original value is not like the cheat, wait 1 second then write it - Needed by Tempest for the Super Zapper + Needed by Tempest for the Super Zapper 006-When the original value is not like the cheat, wait 2 second then write it 007-When the original value is not like the cheat, wait 5 second then write it 008-Do not change if value decrease by 1 each frames @@ -679,29 +679,29 @@ JCK 980917 JCK 981020 060-Select a decimal value from 0 to maximum (0 is allowed - display 0 ... maximum) - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 061-Select a decimal value from 0 to maximum (0 isn't allowed - display 1 ... maximum+1) - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 062-Select a decimal value from 1 to maximum - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 063-Select a BCD value from 0 to maximum (0 is allowed - display 0 ... maximum) - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 064-Select a BCD value from 0 to maximum (0 isn't allowed - display 1 ... maximum+1) - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 065-Select a BCD value from 1 to maximum - this value is written in memory when it changes then delete cheat from active list + this value is written in memory when it changes then delete cheat from active list 070-Select a decimal value from 0 to maximum (0 is allowed - display 0 ... maximum) - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list 071-Select a decimal value from 0 to maximum (0 isn't allowed - display 1 ... maximum+1) - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list 072-Select a decimal value from 1 to maximum - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list 073-Select a BCD value from 0 to maximum (0 is allowed - display 0 ... maximum) - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list 074-Select a BCD value from 0 to maximum (0 isn't allowed - display 1 ... maximum+1) - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list 075-Select a BCD value from 1 to maximum - this value is written once in memory then delete cheat from active list + this value is written once in memory then delete cheat from active list JCK 990404 500 to 544-Used for linked cheats; same as 0 to 44 otherwize @@ -763,20 +763,20 @@ static struct TextLine HelpLine[MAX_TEXT_LINE]; /* macros stolen from memory.c for our nefarious purposes: */ #define MEMORY_READ(index,offset) ((*cpuintf[Machine->drv->cpu[index].cpu_type & ~CPU_FLAGS_MASK].memory_read)(offset)) #define MEMORY_WRITE(index,offset,data) ((*cpuintf[Machine->drv->cpu[index].cpu_type & ~CPU_FLAGS_MASK].memory_write)(offset,data)) -#define ADDRESS_BITS(index) (cpuintf[Machine->drv->cpu[index].cpu_type & ~CPU_FLAGS_MASK].address_bits) +#define ADDRESS_BITS(index) (cpuintf[Machine->drv->cpu[index].cpu_type & ~CPU_FLAGS_MASK].address_bits) #define MAX_ADDRESS(cpu) (0xFFFFFFFF >> (32-ADDRESS_BITS(cpu))) #define RD_GAMERAM(cpu,a) read_gameram(cpu,a) -#define WR_GAMERAM(cpu,a,v) write_gameram(cpu,a,v) +#define WR_GAMERAM(cpu,a,v) write_gameram(cpu,a,v) #define MAX_LOADEDCHEATS 200 #define MAX_ACTIVECHEATS 15 -#define MAX_WATCHES 20 -#define MAX_MATCHES (MachHeight / FontHeight - 13) +#define MAX_WATCHES 20 +#define MAX_MATCHES (MachHeight / FontHeight - 13) #define MAX_DISPLAYCHEATS (MachHeight / FontHeight - 12) -#define MAX_DISPLAYMEM (MachHeight / FontHeight - 10) +#define MAX_DISPLAYMEM (MachHeight / FontHeight - 10) #define MAX_DT 130 @@ -787,10 +787,10 @@ static struct TextLine HelpLine[MAX_TEXT_LINE]; #define CHEAT_FILENAME_MAXLEN 255 #define SEARCH_VALUE 1 -#define SEARCH_TIME 2 +#define SEARCH_TIME 2 #define SEARCH_ENERGY 3 #define SEARCH_BIT 4 -#define SEARCH_BYTE 5 +#define SEARCH_BYTE 5 #define RESTORE_NOINIT 0 #define RESTORE_NOSAVE 1 @@ -801,8 +801,8 @@ static struct TextLine HelpLine[MAX_TEXT_LINE]; #define FIRSTPOS (FontHeight*3/2) /* yPos of the 1st string displayed */ -#define COMMENTCHEAT 999 /* Type of cheat for comments */ -#define WATCHCHEAT 998 /* Type of cheat for "watch-only" */ +#define COMMENTCHEAT 999 /* Type of cheat for comments */ +#define WATCHCHEAT 998 /* Type of cheat for "watch-only" */ /* VM 981213 BEGIN */ /* Q: Would 0/NULL be better than -1? */ @@ -868,9 +868,6 @@ static int SaveContinueSearch; static int SaveIndex; -static int cheat_framecounter; -static int cheat_updatescreen; - static int StartValue; static int CurrentMethod; static int SaveMethod; @@ -918,41 +915,41 @@ static char CWatch[2] = "?"; /* These variables are also declared in function displaymenu (USRINTRF.C) */ /* They should be moved somewhere else, so we could use them as extern :) */ -static char lefthilight[2] = "\x1A"; +static char lefthilight[2] = "\x1A"; static char righthilight[2] = "\x1B"; -static char uparrow[2] = "\x18"; -static char downarrow[2] = "\x19"; +static char uparrow[2] = "\x18"; +static char downarrow[2] = "\x19"; static unsigned char KEYCODE_chars[] = { -/* 0 1 2 3 4 5 6 7 8 9 */ - 0 , 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', /* 0 */ - 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', /* 1 */ - 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', /* 2 */ - '3', '4', '5', '6', '7', '8', '9', 0 , 0 , 0 , /* 3 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 4 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 5 */ - '`', '-', '=', 0 , 0 , '[', ']', 0 , ';', '\'', /* 6 */ - '\\', 0 , ',', '.', '/', ' ', 0 , 0 , 0 , 0 , /* 7 */ - 0 , 0 , 0 , 0 , 0 , 0 , '/', '*', '-', '+', /* 8 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 9 */ - 0 , 0 , 0 , 0 , 0 /* 10 */ +/* 0 1 2 3 4 5 6 7 8 9 */ + 0 , 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', /* 0 */ + 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', /* 1 */ + 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', /* 2 */ + '3', '4', '5', '6', '7', '8', '9', 0 , 0 , 0 , /* 3 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 4 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 5 */ + '`', '-', '=', 0 , 0 , '[', ']', 0 , ';', '\'', /* 6 */ + '\\', 0 , ',', '.', '/', ' ', 0 , 0 , 0 , 0 , /* 7 */ + 0 , 0 , 0 , 0 , 0 , 0 , '/', '*', '-', '+', /* 8 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 9 */ + 0 , 0 , 0 , 0 , 0 , 0 /* 10 */ }; static unsigned char KEYCODE_caps[] = { -/* 0 1 2 3 4 5 6 7 8 9 */ - 0 , 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', /* 0 */ - 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', /* 1 */ - 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ')', '!', '@', /* 2 */ - '#', '$', '%', '^', '&', '*', '(', 0 , 0 , 0 , /* 3 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 4 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 5 */ - '~', '_', '+', 0 , 0 , '{', '}', 0 , ':', '"', /* 6 */ - '|', 0 , '<', '>', '?', ' ', 0 , 0 , 0 , 0 , /* 7 */ - 0 , 0 , 0 , 0 , 0 , 0 , '/', '*', '-', '+', /* 8 */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 9 */ - 0 , 0 , 0 , 0 , 0 /* 10 */ +/* 0 1 2 3 4 5 6 7 8 9 */ + 0 , 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', /* 0 */ + 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', /* 1 */ + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ')', '!', '@', /* 2 */ + '#', '$', '%', '^', '&', '*', '(', 0 , 0 , 0 , /* 3 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 4 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 5 */ + '~', '_', '+', 0 , 0 , '{', '}', 0 , ':', '"', /* 6 */ + '|', 0 , '<', '>', '?', ' ', 0 , 0 , 0 , 0 , /* 7 */ + 0 , 0 , 0 , 0 , 0 , 0 , '/', '*', '-', '+', /* 8 */ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 9 */ + 0 , 0 , 0 , 0 , 0 , 0 /* 10 */ }; void cheat_save_frameskips(void) @@ -960,23 +957,23 @@ void cheat_save_frameskips(void) saveframeskip = frameskip; saveautoframeskip = autoframeskip; #ifdef JCK - saveshowfps = showfps; + saveshowfps = showfps; saveshowprofile = showprofile; #endif frameskip = 0; autoframeskip = 0; #ifdef JCK showfps = 0; - showprofile = 0; + showprofile = 0; #endif } void cheat_rest_frameskips(void) { - frameskip = saveframeskip; + frameskip = saveframeskip; autoframeskip = saveautoframeskip; #ifdef JCK - showfps = saveshowfps; + showfps = saveshowfps; showprofile = saveshowprofile; #endif } @@ -985,9 +982,9 @@ void cheat_rest_frameskips(void) int cheat_readkey(void) { #ifdef WIN32 /* MSH 990310 */ - int key = keyboard_read_sync(); - while (keyboard_pressed(key)); - return key; + int key = keyboard_read_sync(); + while (keyboard_pressed(key)); + return key; #else int key = 0; @@ -1105,10 +1102,10 @@ void DisplayVersion(void) strcpy(buffer, LAST_CODER); strcat(buffer, " - "); strcat(buffer, LAST_UPDATE); -/* xprintf(0, 1, MachHeight-FontHeight, buffer); */ +/* xprintf(0, 1, MachHeight-FontHeight, buffer); */ #else strcpy(buffer, CHEAT_VERSION); -/* xprintf(0, 1, MachHeight-FontHeight, buffer); */ +/* xprintf(0, 1, MachHeight-FontHeight, buffer); */ #endif xprintf(0, 1, MachHeight-FontHeight, ""); @@ -1137,7 +1134,7 @@ int xedit(int x,int y,char *inputs,int maxlen,int hexaonly) int trueorientation; if ((buffer = malloc(maxlen+1)) == NULL) - return(2); /* Cancel as if used pressed Esc */ + return(2); /* Cancel as if used pressed Esc */ memset (buffer, '\0', sizeof(buffer)); strncpy (buffer, inputs, maxlen+1); @@ -1166,7 +1163,7 @@ int xedit(int x,int y,char *inputs,int maxlen,int hexaonly) drawgfx(Machine->scrbitmap,Machine->uifont,c,CarColor,0,0, xpos+Machine->uixmin+(i * FontWidth),ypos+Machine->uiymin,0,TRANSPARENCY_NONE,0); } - DisplayVersion(); /* Hack to update the video */ + DisplayVersion(); /* Hack to update the video */ key = keyboard_read_sync(); #ifdef WIN32 /* MSH 990310 */ @@ -1246,7 +1243,7 @@ int xedit(int x,int y,char *inputs,int maxlen,int hexaonly) case KEYCODE_7: case KEYCODE_8: case KEYCODE_9: - c = KEYCODE_chars[key]; + c = KEYCODE_chars[key+1]; break; case KEYCODE_A: case KEYCODE_B: @@ -1254,7 +1251,7 @@ int xedit(int x,int y,char *inputs,int maxlen,int hexaonly) case KEYCODE_D: case KEYCODE_E: case KEYCODE_F: - c = KEYCODE_caps[key]; + c = KEYCODE_caps[key+1]; break; } } @@ -1262,9 +1259,9 @@ int xedit(int x,int y,char *inputs,int maxlen,int hexaonly) { if (keyboard_pressed (KEYCODE_LSHIFT) || keyboard_pressed (KEYCODE_RSHIFT)) - c = KEYCODE_caps[key]; + c = KEYCODE_caps[key+1]; else - c = KEYCODE_chars[key]; + c = KEYCODE_chars[key+1]; } if (c) @@ -1396,7 +1393,7 @@ int SelectMenu(int *s, struct DisplayText *dt, int ArrowsOnly, int WaitForKey, (*s)++; else *s = Mini; - while ((*s < Maxi) && (!dt[*s].text[0])) /* For Space In Menu */ + while ((*s < Maxi) && (!dt[*s].text[0])) /* For Space In Menu */ (*s)++; *done = 3; break; @@ -1406,7 +1403,7 @@ int SelectMenu(int *s, struct DisplayText *dt, int ArrowsOnly, int WaitForKey, (*s)--; else *s = Maxi; - while ((*s > Mini) && (!dt[*s].text[0])) /* For Space In Menu */ + while ((*s > Mini) && (!dt[*s].text[0])) /* For Space In Menu */ (*s)--; *done = 3; break; @@ -1477,7 +1474,7 @@ int SelectValue(int v, int BCDOnly, int ZeroPoss, int WrapPoss, int DispTwice, Maxi ++; while ((IsBCD(Maxi) == 0) && (BCDOnly == 1)) Maxi++ ; /* JCK 990701 */ w = v + 1; - while ((IsBCD(w) == 0) && (BCDOnly == 1)) w++ ; /* JCK 990701 */ + while ((IsBCD(w) == 0) && (BCDOnly == 1)) w++ ; /* JCK 990701 */ } else w = v; @@ -1525,7 +1522,7 @@ int SelectValue(int v, int BCDOnly, int ZeroPoss, int WrapPoss, int DispTwice, #ifdef WIN32 /* MSH 990310 */ key = keyboard_read_sync(); - if (!keyboard_pressed_memory_repeat(key,8)) + if (!keyboard_pressed_memory_repeat(key,8)) key = 0; #else key = cheat_readkey(); /* MSH 990217 */ @@ -1620,7 +1617,7 @@ static char *FormatAddr(int cpu, int addtext) { static char bufadr[10]; static char buffer[18]; - int i; + int i; memset (buffer, '\0', strlen(buffer)); switch ((ADDRESS_BITS(cpu)+3) >> 2) @@ -1644,13 +1641,13 @@ static char *FormatAddr(int cpu, int addtext) strcpy (bufadr, "%X"); break; } - if (addtext) - { + if (addtext) + { strcpy (buffer, "Addr: "); - for (i = strlen(bufadr) + 1; i < 8; i ++) + for (i = strlen(bufadr) + 1; i < 8; i ++) strcat (buffer, " "); - } - strcat (buffer,bufadr); + } + strcat (buffer,bufadr); return buffer; } @@ -1899,17 +1896,17 @@ static int build_tables (void) int NoMemArea = 0; - /* Trap memory allocation errors */ + /* Trap memory allocation errors */ int MemoryNeeded = 0; /* Search speedup : (the games should be dasmed to confirm this) */ - /* Games based on Exterminator driver should scan BANK1 */ - /* Games based on SmashTV driver should scan BANK2 */ - /* NEOGEO games should only scan BANK1 (0x100000 -> 0x01FFFF) */ + /* Games based on Exterminator driver should scan BANK1 */ + /* Games based on SmashTV driver should scan BANK2 */ + /* NEOGEO games should only scan BANK1 (0x100000 -> 0x01FFFF) */ int CpuToScan = -1; - int BankToScanTable[9]; /* 0 for RAM & 1-8 for Banks 1-8 */ + int BankToScanTable[9]; /* 0 for RAM & 1-8 for Banks 1-8 */ - for (i = 0; i < 9;i ++) + for (i = 0; i < 9;i ++) BankToScanTable[i] = ( fastsearch != 2 ); #if (HAS_TMS34010) @@ -1937,26 +1934,26 @@ static int build_tables (void) #endif #endif - /* No CPU so we scan RAM & BANKn */ - if ((CpuToScan == -1) && (fastsearch == 2)) + /* No CPU so we scan RAM & BANKn */ + if ((CpuToScan == -1) && (fastsearch == 2)) for (i = 0; i < 9;i ++) BankToScanTable[i] = 1; /* free memory that was previously allocated if no error occured */ - /* it must also be there because mwa varies from one CPU to another */ - if (!MallocFailure) - { + /* it must also be there because mwa varies from one CPU to another */ + if (!MallocFailure) + { reset_table (StartRam); reset_table (BackupRam); reset_table (FlagTable); reset_table (OldBackupRam); reset_table (OldFlagTable); - } + } - MallocFailure = 0; + MallocFailure = 0; - /* Message to show that something is in progress */ + /* Message to show that something is in progress */ cheat_clearbitmap(); yPos = (MachHeight - FontHeight) / 2; xprintf(0, 0, yPos, "Allocating Memory..."); @@ -2040,8 +2037,8 @@ static int build_tables (void) } /* free memory that was previously allocated if an error occured */ - if (MallocFailure) - { + if (MallocFailure) + { int key; reset_table (StartRam); @@ -2052,7 +2049,7 @@ static int build_tables (void) reset_table (OldFlagTable); cheat_clearbitmap(); - yPos = (MachHeight - 10 * FontHeight) / 2; + yPos = (MachHeight - 10 * FontHeight) / 2; xprintf(0, 0, yPos, "Error while allocating memory !"); yPos += (2 * FontHeight); xprintf(0, 0, yPos, "You need %d more bytes", MemoryNeeded); @@ -2065,7 +2062,7 @@ static int build_tables (void) key = keyboard_read_sync(); while (keyboard_pressed(key)) ; /* wait for key release */ cheat_clearbitmap(); - } + } ClearTextLine (1, yPos); @@ -2109,16 +2106,16 @@ int RenameCheatFile(int merge, int DisplayFileName, char *filename) if (done == 1) { strcpy (filename, buffer); - if (DisplayFileName) - { + if (DisplayFileName) + { cheat_clearbitmap(); - xprintf (0, 0, EditYPos-(FontHeight*2), "Cheat Filename is now:"); + xprintf (0, 0, EditYPos-(FontHeight*2), "Cheat Filename is now:"); xprintf (0, 0, EditYPos, "%s", buffer); EditYPos += 4*FontHeight; xprintf(0, 0,EditYPos,"Press A Key To Continue..."); key = keyboard_read_sync(); while (keyboard_pressed(key)) ; /* wait for key release */ - } + } } cheat_clearbitmap(); return(done); @@ -2164,13 +2161,13 @@ int SaveCheat(int NoCheat) /* form fmt string, adjusting length of address field for cpu address range */ sprintf(fmt, "%%s:%%d:%s:%%02X:%%03d:%%s%s\n", FormatAddr(LoadedCheatTable[i].CpuNo,0), - (addmore ? ":%s" : "")); + (addmore ? ":%s" : "")); #ifdef macintosh if (uncompressed) - fprintf(f, "\r"); /* force DOS-style line enders */ + fprintf(f, "\r"); /* force DOS-style line enders */ else - gzprintf(gz, "\r"); /* force DOS-style line enders */ + gzprintf(gz, "\r"); /* force DOS-style line enders */ #endif /* JCK 990717 BEGIN */ @@ -2258,12 +2255,12 @@ void LoadCheat(int merge, char *filename) { yPos = (MachHeight - FontHeight) / 2 - FontHeight; /* xprintf(0, 0, yPos, "Loading cheats from file"); */ - yPos += FontHeight; + yPos += FontHeight; /* xprintf(0, 0, yPos, "%s...",filename); */ for(;;) { - if (gzgets(f,str,90) == NULL) + if (gzgets(f,str,90) == NULL) break; #ifdef macintosh /* JB 971004 */ @@ -2407,7 +2404,7 @@ void LoadDatabases(int InCheat) memset (filename, '\0', sizeof(filename)); strncpy(filename, &str[pos1], (pos2 - pos1)); LoadCheat(1, filename); - pos1 = pos2 + 1; + pos1 = pos2 + 1; } } @@ -2437,7 +2434,7 @@ int LoadHelp(char *filename, struct TextLine *table) txt = table; for(;;) { - if (gzgets(f,str,32) == NULL) + if (gzgets(f,str,32) == NULL) break; #ifdef macintosh /* JB 971004 */ @@ -2473,18 +2470,18 @@ int LoadHelp(char *filename, struct TextLine *table) void InitMemoryAreas(void) { const struct MemoryWriteAddress *mwa = Machine->drv->cpu[SearchCpuNo].memory_write; - char buffer[40]; + char buffer[40]; MemoryAreasSelected = 0; - MemoryAreasTotal = 0; + MemoryAreasTotal = 0; while (mwa->start != -1) { sprintf (buffer, FormatAddr(SearchCpuNo,0), mwa->start); - strcpy (MemToScanTable[MemoryAreasTotal].Name, buffer); - strcat (MemToScanTable[MemoryAreasTotal].Name," -> "); + strcpy (MemToScanTable[MemoryAreasTotal].Name, buffer); + strcat (MemToScanTable[MemoryAreasTotal].Name," -> "); sprintf (buffer, FormatAddr(SearchCpuNo,0), mwa->end); - strcat (MemToScanTable[MemoryAreasTotal].Name, buffer); - MemToScanTable[MemoryAreasTotal].handler = mwa->handler; + strcat (MemToScanTable[MemoryAreasTotal].Name, buffer); + MemToScanTable[MemoryAreasTotal].handler = mwa->handler; MemToScanTable[MemoryAreasTotal].Enabled = 0; MemoryAreasTotal++; mwa++; @@ -2513,7 +2510,7 @@ void InitCheat(void) FontHeight = ( Machine -> uifontheight ); FontWidth = ( Machine -> uifontwidth ); - ManyCpus = ( cpu_gettotalcpu() > 1 ); + ManyCpus = ( cpu_gettotalcpu() > 1 ); SaveMenu = 0; SaveStartSearch = 0; @@ -2521,9 +2518,6 @@ void InitCheat(void) SaveIndex = 0; - cheat_framecounter = 0; - cheat_updatescreen = 0; - reset_table (StartRam); reset_table (BackupRam); reset_table (FlagTable); @@ -2583,10 +2577,10 @@ void DisplayActiveCheats(int y) void DisplayWatches(int ClrScr, int *x,int *y,char *buffer, int highlight, int dx, int dy) { - int i; - char bufadr[4]; + int i; + char bufadr[4]; - int FirstWatch = 1; + int FirstWatch = 1; int WatchColor = DT_COLOR_WHITE; @@ -2622,7 +2616,7 @@ void DisplayWatches(int ClrScr, int *x,int *y,char *buffer, { if ( Watches[i] != MAX_ADDRESS(WatchesCpuNo[i])) { - if (!FirstWatch) /* If not 1st watch add a space */ + if (!FirstWatch) /* If not 1st watch add a space */ { strcat(buffer," "); WatchGfxLen += (FontWidth / 2); @@ -2640,7 +2634,7 @@ void DisplayWatches(int ClrScr, int *x,int *y,char *buffer, } } - /* Adjust x offset to fit the screen */ + /* Adjust x offset to fit the screen */ /* while ( (*x >= (MachWidth - (FontWidth * (int)strlen(buffer)))) && */ while ( (*x >= (MachWidth - WatchGfxLen)) && (*x > Machine->uixmin) ) @@ -2697,11 +2691,11 @@ void set_cheat(struct cheat_struct *dest, struct cheat_struct *src) src = &new_cheat; } - dest->CpuNo = src->CpuNo; + dest->CpuNo = src->CpuNo; dest->Address = src->Address; dest->Data = src->Data; dest->Special = src->Special; - dest->Count = src->Count; + dest->Count = src->Count; dest->Backup = src->Backup; dest->Minimum = src->Minimum; dest->Maximum = src->Maximum; @@ -3159,7 +3153,7 @@ void EditCheat(int CheatNo) LoadedCheatTable[CheatNo].Address); cheat_clearbitmap(); y = EditCheatHeader(); - break; + break; } break; @@ -3187,7 +3181,7 @@ void EditCheat(int CheatNo) sprintf(str2[0],"%s",LoadedCheatTable[CheatNo].Name); cheat_clearbitmap(); y = EditCheatHeader(); - break; + break; case 5: /* More */ for (i = 0; i < total; i++) dt[i].color = DT_COLOR_WHITE; @@ -3199,7 +3193,7 @@ void EditCheat(int CheatNo) sprintf(str2[5],"%s",LoadedCheatTable[CheatNo].More); cheat_clearbitmap(); y = EditCheatHeader(); - break; + break; } break; @@ -3546,7 +3540,7 @@ void SelectCheat(void) xprintf (0, 0, YFOOT_SELECT, "%s", LoadedCheatTable[highlighted + Index].More); break; - case KEYCODE_F1: /* Save cheat to file */ + case KEYCODE_F1: /* Save cheat to file */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3564,7 +3558,7 @@ void SelectCheat(void) break; - case KEYCODE_F2: /* Add to watch list */ + case KEYCODE_F2: /* Add to watch list */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3605,7 +3599,7 @@ void SelectCheat(void) } break; - case KEYCODE_F3: /* Edit current cheat */ + case KEYCODE_F3: /* Edit current cheat */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3631,7 +3625,7 @@ void SelectCheat(void) break; - case KEYCODE_F4: /* Copy the current cheat */ + case KEYCODE_F4: /* Copy the current cheat */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3660,7 +3654,7 @@ void SelectCheat(void) break; - case KEYCODE_F5: /* Rename the cheatfile and reload the database */ + case KEYCODE_F5: /* Rename the cheatfile and reload the database */ while (keyboard_pressed(key)); oldkey = 0; @@ -3690,7 +3684,7 @@ void SelectCheat(void) break; - case KEYCODE_F6: /* Save all cheats to file */ + case KEYCODE_F6: /* Save all cheats to file */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3708,7 +3702,7 @@ void SelectCheat(void) break; - case KEYCODE_F7: /* Remove all active cheats from the list */ + case KEYCODE_F7: /* Remove all active cheats from the list */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3729,7 +3723,7 @@ void SelectCheat(void) } if ( (LoadedCheatTable[i].Special != COMMENTCHEAT) && - (LoadedCheatTable[i].Special != WATCHCHEAT) ) + (LoadedCheatTable[i].Special != WATCHCHEAT) ) { set_cheat(&ActiveCheatTable[ActiveCheatTotal], &LoadedCheatTable[i]); ActiveCheatTable[ActiveCheatTotal].Count = 0; @@ -3744,7 +3738,7 @@ void SelectCheat(void) total = build_cheat_list(Index, dt, str2); break; - case KEYCODE_F8: /* Reload the database */ + case KEYCODE_F8: /* Reload the database */ while (keyboard_pressed(key)); oldkey = 0; @@ -3763,7 +3757,7 @@ void SelectCheat(void) break; - case KEYCODE_F9: /* Rename the cheatfile */ + case KEYCODE_F9: /* Rename the cheatfile */ while (keyboard_pressed(key)); oldkey = 0; @@ -3778,7 +3772,7 @@ void SelectCheat(void) break; - case KEYCODE_F10: /* Invoke help */ + case KEYCODE_F10: /* Invoke help */ while (keyboard_pressed(key)); oldkey = 0; @@ -3795,7 +3789,7 @@ void SelectCheat(void) break; - case KEYCODE_F11: /* Toggle sologame ON/OFF then reload the database */ + case KEYCODE_F11: /* Toggle sologame ON/OFF then reload the database */ while (keyboard_pressed(key)); oldkey = 0; @@ -3815,7 +3809,7 @@ void SelectCheat(void) break; - case KEYCODE_F12: /* Display info about a cheat */ + case KEYCODE_F12: /* Display info about a cheat */ while (keyboard_pressed(key)); oldkey = 0; if (LoadedCheatTotal == 0) @@ -3947,7 +3941,7 @@ void SelectCheat(void) ActiveCheatTable[ActiveCheatTotal].Data = RD_GAMERAM (ActiveCheatTable[ActiveCheatTotal].CpuNo, ActiveCheatTable[ActiveCheatTotal].Address); - BCDOnly = ( (ActiveCheatTable[ActiveCheatTotal].Special == 63) || + BCDOnly = ( (ActiveCheatTable[ActiveCheatTotal].Special == 63) || (ActiveCheatTable[ActiveCheatTotal].Special == 64) || (ActiveCheatTable[ActiveCheatTotal].Special == 65) || (ActiveCheatTable[ActiveCheatTotal].Special == 73) || @@ -4008,7 +4002,7 @@ void SelectCheat(void) while (keyboard_pressed(key)); - SaveIndex = Index + highlighted; + SaveIndex = Index + highlighted; /* clear the screen before returning */ cheat_clearbitmap(); @@ -4187,7 +4181,7 @@ int SelectMemoryHeader(void) void SelectMemoryAreas(void) { - int SaveMemoryAreas[MAX_EXT_MEMORY]; + int SaveMemoryAreas[MAX_EXT_MEMORY]; int i, x, y, highlighted, key, done, total; struct DisplayText dt[MAX_DT + 1]; @@ -4195,10 +4189,10 @@ void SelectMemoryAreas(void) char str2[60][40]; - char buffer[40]; + char buffer[40]; for (i = 0; i < MemoryAreasTotal; i++) - SaveMemoryAreas[i] = MemToScanTable[i].Enabled; + SaveMemoryAreas[i] = MemToScanTable[i].Enabled; cheat_clearbitmap(); @@ -4361,7 +4355,7 @@ void SelectMemoryAreas(void) total = build_mem_list(Index, dt, str2); break; - case KEYCODE_F12: /* Display info about a cheat */ + case KEYCODE_F12: /* Display info about a cheat */ while (keyboard_pressed(key)); oldkey = 0; strcpy (buffer,str2[Index + highlighted]); @@ -4434,14 +4428,14 @@ void SelectMemoryAreas(void) /* clear the screen before returning */ cheat_clearbitmap(); - MemoryAreasSelected = 0; + MemoryAreasSelected = 0; for (i = 0; i < MemoryAreasTotal; i++) { - if (SaveMemoryAreas[i] != MemToScanTable[i].Enabled) + if (SaveMemoryAreas[i] != MemToScanTable[i].Enabled) { RebuildTables = 1; } - if (MemToScanTable[i].Enabled) + if (MemToScanTable[i].Enabled) { MemoryAreasSelected = 1; } @@ -4547,7 +4541,7 @@ void SelectFastSearch(void) case 3: fastsearch = 3; - SelectMemoryAreas(); + SelectMemoryAreas(); done = 1; break; @@ -4606,16 +4600,16 @@ int SelectSearchValue(void) * In all cases, backup the ram. * * Ask the user to select one of the following: - * 1 - Lives or other number (byte) (exact) ask a start value , ask new value - * 2 - Timers (byte) (+ or - X) nothing at start, ask +-X - * 3 - Energy (byte) (less, equal or greater) nothing at start, ask less, equal or greater - * 4 - Status (bit) (true or false) nothing at start, ask same or opposite - * 5 - Slow but sure (Same as start or different) nothing at start, ask same or different + * 1 - Lives or other number (byte) (exact) ask a start value , ask new value + * 2 - Timers (byte) (+ or - X) nothing at start, ask +-X + * 3 - Energy (byte) (less, equal or greater) nothing at start, ask less, equal or greater + * 4 - Status (bit) (true or false) nothing at start, ask same or opposite + * 5 - Slow but sure (Same as start or different) nothing at start, ask same or different * * Another method is used in the Pro action Replay the Energy method - * you can tell that the value is now 25%/50%/75%/100% as the start - * the problem is that I probably cannot search for exactly 50%, so - * that do I do? search +/- 10% ? + * you can tell that the value is now 25%/50%/75%/100% as the start + * the problem is that I probably cannot search for exactly 50%, so + * that do I do? search +/- 10% ? * If you think of other way to search for codes, let me know. */ @@ -4671,64 +4665,64 @@ void StartSearch(void) case 0: SaveMethod = CurrentMethod; CurrentMethod = SEARCH_VALUE; - StartValueNeeded = 1; + StartValueNeeded = 1; done = 1; break; case 1: SaveMethod = CurrentMethod; CurrentMethod = SEARCH_TIME; - StartValueNeeded = SelectSearchValue(); - if (StartValueNeeded == 2) - { + StartValueNeeded = SelectSearchValue(); + if (StartValueNeeded == 2) + { done = 0; - } - else - { + } + else + { done = 1; - } + } break; case 2: SaveMethod = CurrentMethod; CurrentMethod = SEARCH_ENERGY; - StartValueNeeded = SelectSearchValue(); - if (StartValueNeeded == 2) - { + StartValueNeeded = SelectSearchValue(); + if (StartValueNeeded == 2) + { done = 0; - } - else - { + } + else + { done = 1; - } + } break; case 3: SaveMethod = CurrentMethod; CurrentMethod = SEARCH_BIT; - StartValueNeeded = SelectSearchValue(); - if (StartValueNeeded == 2) - { + StartValueNeeded = SelectSearchValue(); + if (StartValueNeeded == 2) + { done = 0; - } - else - { + } + else + { done = 1; - } + } break; case 4: SaveMethod = CurrentMethod; CurrentMethod = SEARCH_BYTE; - StartValueNeeded = SelectSearchValue(); - if (StartValueNeeded == 2) - { + StartValueNeeded = SelectSearchValue(); + if (StartValueNeeded == 2) + { done = 0; - } - else - { + } + else + { done = 1; - } + } break; case 6: @@ -4739,7 +4733,7 @@ void StartSearch(void) case 8: done = 2; - s = 0; + s = 0; break; } break; @@ -4758,7 +4752,7 @@ void StartSearch(void) { ValTmp = SelectValue(SearchCpuNo, 0, 1, 1, 0, 0, cpu_gettotalcpu()-1, "%01X", "Enter CPU To Search In:", 1, - FIRSTPOS + 3 * FontHeight); + FIRSTPOS + 3 * FontHeight); cheat_clearbitmap(); @@ -4794,10 +4788,10 @@ void StartSearch(void) if (SearchCpuNoOld != SearchCpuNo) { RebuildTables = 1; - if (SearchCpuNoOld != -1) - { + if (SearchCpuNoOld != -1) + { InitMemoryAreas(); - } + } } if ((fastsearch == 3) && (!MemoryAreasSelected)) SelectMemoryAreas(); @@ -4805,7 +4799,7 @@ void StartSearch(void) { if (!build_tables()) SearchCpuNoOld = SearchCpuNo; - else + else { CurrentMethod = 0; return; @@ -4858,7 +4852,7 @@ void StartSearch(void) if (StartValueNeeded) { struct ExtMemory *ext; - count = 0; + count = 0; for (ext = FlagTable; ext->data; ext++) { for (i=0; i <= ext->end - ext->start; i++) @@ -4878,7 +4872,7 @@ void StartSearch(void) else { struct ExtMemory *ext; - count = 0; + count = 0; for (ext = FlagTable; ext->data; ext++) count += ext->end - ext->start + 1; @@ -5052,14 +5046,14 @@ void ContinueSearch(int selected, int ViewLast) if (CurrentMethod == SEARCH_ENERGY) { char *paDisplayText[] = - { + { "New Value is Less", "New Value is Equal", "New Value is Greater", "", "Return To Cheat Menu", 0 - }; + }; total = create_menu(paDisplayText, dt, y); y = dt[total-1].y + ( 3 * FontHeight ); @@ -5092,7 +5086,7 @@ void ContinueSearch(int selected, int ViewLast) cheat_clearbitmap(); - SaveContinueSearch = s; + SaveContinueSearch = s; /* User select to return to the previous menu */ if (done == 2) @@ -5115,13 +5109,13 @@ void ContinueSearch(int selected, int ViewLast) if (CurrentMethod == SEARCH_BIT) { char *paDisplayText[] = - { + { "Bit is Same as Start", "Bit is Opposite from Start", "", "Return To Cheat Menu", 0 - }; + }; total = create_menu(paDisplayText, dt, y); y = dt[total-1].y + ( 3 * FontHeight ); @@ -5152,7 +5146,7 @@ void ContinueSearch(int selected, int ViewLast) } } while ((done != 1) && (done != 2)); - SaveContinueSearch = s; + SaveContinueSearch = s; cheat_clearbitmap(); @@ -5177,13 +5171,13 @@ void ContinueSearch(int selected, int ViewLast) if (CurrentMethod == SEARCH_BYTE) { char *paDisplayText[] = - { + { "Memory is Same as Start", "Memory is Different from Start", "", "Return To Cheat Menu", 0 - }; + }; total = create_menu(paDisplayText, dt, y); y = dt[total-1].y + ( 3 * FontHeight ); @@ -5216,7 +5210,7 @@ void ContinueSearch(int selected, int ViewLast) cheat_clearbitmap(); - SaveContinueSearch = s; + SaveContinueSearch = s; /* User select to return to the previous menu */ if (done == 2) @@ -5247,7 +5241,7 @@ void ContinueSearch(int selected, int ViewLast) for (ext = FlagTable, ext_sr = StartRam, ext_br = BackupRam; ext->data; ext++, ext_sr++, ext_br++) { for (i=0; i <= ext->end - ext->start; i++) - { + { if (ext->data[i] != 0) { int ValRead = RD_GAMERAM(SearchCpuNo, i+ext->start); @@ -5261,7 +5255,7 @@ void ContinueSearch(int selected, int ViewLast) if (ValRead != (ext_br->data[i] + s)) ext->data[i] = 0; break; - case SEARCH_ENERGY: /* Energy */ + case SEARCH_ENERGY: /* Energy */ switch (s) { case 0: /* Less */ @@ -5311,7 +5305,7 @@ void ContinueSearch(int selected, int ViewLast) } if (ext->data[i] != 0) count ++; - } + } } if ((CurrentMethod == SEARCH_TIME) || (CurrentMethod == SEARCH_ENERGY)) backup_ram (BackupRam); @@ -5323,11 +5317,11 @@ void ContinueSearch(int selected, int ViewLast) } /* For all methods: - - Display how much locations we have found - - Display them - - The user can press F2 to add one to the watches - - The user can press F1 to add one to the cheat list - - The user can press F6 to add all to the cheat list */ + - Display how much locations we have found + - Display them + - The user can press F2 to add one to the watches + - The user can press F1 to add one to the cheat list + - The user can press F6 to add all to the cheat list */ cheat_clearbitmap(); @@ -5709,7 +5703,7 @@ void RestoreSearch(void) copy_ram (FlagTable, OldFlagTable); MatchFound = OldMatchFound; CurrentMethod = SaveMethod; - RestoreStatus = RESTORE_DONE; + RestoreStatus = RESTORE_DONE; strcpy(msg2, "Restoration Successful :)"); } else @@ -5808,20 +5802,20 @@ void ChooseWatch(void) dt[total].text = str2[ i ]; - if (i < MAX_WATCHES / 2) - { + if (i < MAX_WATCHES / 2) + { dt[total].x = ((MachWidth / 2) - FontWidth * strlen(dt[total].text)) / 2; - } - else - { + } + else + { dt[total].x = ((MachWidth / 2) - FontWidth * strlen(dt[total].text)) / 2 + (MachWidth / 2); - } + } dt[total].y = y; dt[total].color = DT_COLOR_WHITE; total++; y += FontHeight; - if (i == (MAX_WATCHES / 2 - 1)) + if (i == (MAX_WATCHES / 2 - 1)) y = savey; } dt[total].text = 0; /* terminate array */ @@ -6020,14 +6014,14 @@ void ChooseWatch(void) ClearTextLine(0, dt[s].y); /* dt[s].x = (MachWidth - FontWidth * strlen(str2[ s ])) / 2; */ - if (s < MAX_WATCHES / 2) - { + if (s < MAX_WATCHES / 2) + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2; - } - else - { + } + else + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2 + (MachWidth / 2); - } + } cheat_clearbitmap(); @@ -6059,14 +6053,14 @@ void ChooseWatch(void) ClearTextLine(0, dt[s].y); /* dt[s].x = (MachWidth - FontWidth * strlen(str2[ s ])) / 2; */ - if (s < MAX_WATCHES / 2) - { + if (s < MAX_WATCHES / 2) + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2; - } - else - { + } + else + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2 + (MachWidth / 2); - } + } cheat_clearbitmap(); @@ -6092,14 +6086,14 @@ void ChooseWatch(void) ClearTextLine(0, dt[s].y); /* dt[s].x = (MachWidth - FontWidth * strlen(str2[ s ])) / 2; */ - if (s < MAX_WATCHES / 2) - { + if (s < MAX_WATCHES / 2) + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2; - } - else - { + } + else + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2 + (MachWidth / 2); - } + } cheat_clearbitmap(); @@ -6192,14 +6186,14 @@ void ChooseWatch(void) ClearTextLine(0, dt[i].y); /* dt[i].x = (MachWidth - FontWidth * strlen(str2[ i ])) / 2; */ - if (i < MAX_WATCHES / 2) - { + if (i < MAX_WATCHES / 2) + { dt[i].x = ((MachWidth / 2) - FontWidth * strlen(str2[ i ])) / 2; - } - else - { + } + else + { dt[i].x = ((MachWidth / 2) - FontWidth * strlen(str2[ i ])) / 2 + (MachWidth / 2); - } + } cheat_clearbitmap(); @@ -6298,14 +6292,14 @@ void ChooseWatch(void) ClearTextLine(0, dt[s].y); /* dt[s].x = (MachWidth - FontWidth * strlen(str2[ s ])) / 2; */ - if (s < MAX_WATCHES / 2) - { + if (s < MAX_WATCHES / 2) + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2; - } - else - { + } + else + { dt[s].x = ((MachWidth / 2) - FontWidth * strlen(str2[ s ])) / 2 + (MachWidth / 2); - } + } cheat_clearbitmap(); @@ -6422,7 +6416,7 @@ int cheat_menu(void) case 9: done = 1; - s = 0; + s = 0; break; } break; @@ -6457,11 +6451,11 @@ void StopCheat(void) void DoCheat(void) { - int i,y; + int i; char buf[80]; - DisplayWatches(0, &WatchX, &WatchY, buf, MAX_WATCHES, 0, 0); + DisplayWatches(0, &WatchX, &WatchY, buf, MAX_WATCHES, 0, 0); /* Affect the memory */ for (i = 0; CheatEnabled == 1 && i < ActiveCheatTotal;i ++) @@ -6485,7 +6479,7 @@ void DoCheat(void) WR_GAMERAM (ActiveCheatTable[i].CpuNo, ActiveCheatTable[i].Address, ActiveCheatTable[i].Data); - DeleteActiveCheatFromTable(i); + DeleteActiveCheatFromTable(i); break; case 2: case 2 + OFFSET_LINK_CHEAT: @@ -6510,7 +6504,7 @@ void DoCheat(void) break; /* 5,6,7 check if the value has changed, if yes, start a timer - when the timer end, change the location*/ + when the timer end, change the location*/ case 5: case 5 + OFFSET_LINK_CHEAT: if ( RD_GAMERAM (ActiveCheatTable[i].CpuNo, @@ -6614,7 +6608,7 @@ void DoCheat(void) RD_GAMERAM (ActiveCheatTable[i].CpuNo, ActiveCheatTable[i].Address) | ActiveCheatTable[i].Data); - DeleteActiveCheatFromTable(i); + DeleteActiveCheatFromTable(i); break; case 22: case 22 + OFFSET_LINK_CHEAT: @@ -6658,7 +6652,7 @@ void DoCheat(void) RD_GAMERAM (ActiveCheatTable[i].CpuNo, ActiveCheatTable[i].Address) & ~ActiveCheatTable[i].Data); - DeleteActiveCheatFromTable(i); + DeleteActiveCheatFromTable(i); break; case 42: case 42 + OFFSET_LINK_CHEAT: @@ -6709,7 +6703,7 @@ void DoCheat(void) WR_GAMERAM (ActiveCheatTable[i].CpuNo, ActiveCheatTable[i].Address, ActiveCheatTable[i].Data); - DeleteActiveCheatFromTable(i); + DeleteActiveCheatFromTable(i); break; /*Special case, linked with 5,6,7 */ @@ -6809,24 +6803,8 @@ void DoCheat(void) /* KEYCODE_CHEAT_TOGGLE Enable/Disable the active cheats on the fly. Required for some cheat */ if (input_ui_pressed(IPT_UI_TOGGLE_CHEAT) && ActiveCheatTotal) { - CheatEnabled ^= 1; - cheat_framecounter = Machine->drv->frames_per_second / 2; - cheat_updatescreen = 1; - } - - if (cheat_updatescreen) - { - if (--cheat_framecounter > 0) - { - y = (MachHeight - FontHeight) / 2; - xprintf(0, 0,y,"Cheats %s", (CheatEnabled ? "On" : "Off")); - } - else - { - osd_clearbitmap( Machine -> scrbitmap ); /* Clear Screen */ - (Machine->drv->vh_update)(Machine->scrbitmap,1); /* Make Game Redraw Screen */ - cheat_updatescreen = 0; - } + CheatEnabled ^= 1; + usrintf_showmessage("Cheats %s", (CheatEnabled ? "On" : "Off")); } /* KEYCODE_INSERT toggles the Watch display ON */ diff --git a/src/common.c b/src/common.c index 90b0a2706..7b3429a15 100644 --- a/src/common.c +++ b/src/common.c @@ -237,6 +237,39 @@ int readroms(void) printf("Unable to read ROM %s\n",name); } } + else if (romp->length & ROMFLAG_QUAD) { + static int which_quad=0; /* This is multi session friendly, as we only care about the modulus */ + unsigned char *temp; + int base=0; + + temp = malloc(length); /* Need to load rom to temporary space */ + osd_fread(f,temp,length); + + /* Copy quad to region */ + c = Machine->memory_region[region] + romp->offset; + + #ifdef LSB_FIRST + switch (which_quad%4) { + case 0: base=1; break; + case 1: base=0; break; + case 2: base=3; break; + case 3: base=2; break; + } + #else + switch (which_quad%4) { + case 0: base=0; break; + case 1: base=1; break; + case 2: base=2; break; + case 3: base=3; break; + } + #endif + + for (i=base; i< length*4; i += 4) + c[i]=temp[i/4]; + + which_quad++; + free(temp); + } else { int wide = romp->length & ROMFLAG_WIDE; @@ -571,6 +604,8 @@ struct GameSamples *readsamples(const char **samplenames,const char *basename) i = 0; while (samplenames[i+skipfirst] != 0) i++; + if (!i) return 0; + if ((samples = malloc(sizeof(struct GameSamples) + (i-1)*sizeof(struct GameSample))) == 0) return 0; diff --git a/src/common.h b/src/common.h index d75591740..3b893a144 100644 --- a/src/common.h +++ b/src/common.h @@ -23,13 +23,14 @@ struct RomModule /* that marks the start of a new memory region. Confused? Well, don't worry, just use */ /* the macros below. */ -#define ROMFLAG_MASK 0xf0000000 /* 4 bits worth of flags in the high nibble */ +#define ROMFLAG_MASK 0xf8000000 /* 5 bits worth of flags in the high nibble */ /* Masks for individual ROMs */ #define ROMFLAG_ALTERNATE 0x80000000 /* Alternate bytes, either even or odd, or nibbles, low or high */ #define ROMFLAG_WIDE 0x40000000 /* 16-bit ROM; may need byte swapping */ #define ROMFLAG_SWAP 0x20000000 /* 16-bit ROM with bytes in wrong order */ #define ROMFLAG_NIBBLE 0x10000000 /* Nibble-wide ROM image */ +#define ROMFLAG_QUAD 0x08000000 /* 32-bit data arranged as 4 interleaved 8-bit roms */ /* start of table */ #define ROM_START(name) static struct RomModule rom_##name[] = { @@ -74,7 +75,7 @@ enum { REGION_MAX }; -#define REGIONFLAG_MASK 0xf0000000 +#define REGIONFLAG_MASK 0xf8000000 #define REGIONFLAG_DISPOSE 0x80000000 /* Dispose of this region when done */ #define REGIONFLAG_SOUNDONLY 0x40000000 /* load only if sound emulation is turned on */ @@ -106,6 +107,8 @@ enum { #define ROM_RELOAD_WIDE(offset,length) { (char *)-1, offset, (length) | ROMFLAG_WIDE, 0 }, #define ROM_LOAD_WIDE_SWAP(name,offset,length,crc) { name, offset, (length) | ROMFLAG_WIDE | ROMFLAG_SWAP, crc }, #define ROM_RELOAD_WIDE_SWAP(offset,length) { (char *)-1, offset, (length) | ROMFLAG_WIDE | ROMFLAG_SWAP, 0 }, +/* Data is split between 4 roms, always use this in groups of 4! */ +#define ROM_LOAD_QUAD(name,offset,length,crc) { name, offset, length | ROMFLAG_QUAD, crc }, #ifdef LSB_FIRST #define ROM_LOAD_V20_EVEN ROM_LOAD_EVEN diff --git a/src/cpu/h6280/6280dasm.c b/src/cpu/h6280/6280dasm.c index 6cb8c43a8..c76aa6d68 100644 --- a/src/cpu/h6280/6280dasm.c +++ b/src/cpu/h6280/6280dasm.c @@ -2,7 +2,7 @@ 6280dasm.c Hudsonsoft Hu6280 (HuC6280/Hu6280a) disassembler - Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net + Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk This source code is based (with permission!) on the 6502 emulator by Juergen Buchmueller. It is released as part of the Mame emulator project. diff --git a/src/cpu/h6280/h6280.c b/src/cpu/h6280/h6280.c index e4316703d..9b9e6569c 100644 --- a/src/cpu/h6280/h6280.c +++ b/src/cpu/h6280/h6280.c @@ -2,7 +2,7 @@ h6280.c - Portable HuC6280 emulator - Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net + Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk This source code is based (with permission!) on the 6502 emulator by Juergen Buchmueller. It is released as part of the Mame emulator project. @@ -413,7 +413,7 @@ const char *h6280_info(void *context, int regnum) case CPU_INFO_FAMILY: return "Hudsonsoft 6280"; case CPU_INFO_VERSION: return "1.05"; case CPU_INFO_FILE: return __FILE__; - case CPU_INFO_CREDITS: return "Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net"; + case CPU_INFO_CREDITS: return "Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk"; case CPU_INFO_REG_LAYOUT: return (const char*)reg_layout; case CPU_INFO_WIN_LAYOUT: return (const char*)win_layout; } diff --git a/src/cpu/h6280/h6280.h b/src/cpu/h6280/h6280.h index 124ae9243..7b216b0b0 100644 --- a/src/cpu/h6280/h6280.h +++ b/src/cpu/h6280/h6280.h @@ -2,7 +2,7 @@ h6280.h Portable Hu6280 emulator interface - Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net + Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk This source code is based (with permission!) on the 6502 emulator by Juergen Buchmueller. It is released as part of the Mame emulator project. diff --git a/src/cpu/h6280/h6280ops.h b/src/cpu/h6280/h6280ops.h index 11bb8271b..647c8a44f 100644 --- a/src/cpu/h6280/h6280ops.h +++ b/src/cpu/h6280/h6280ops.h @@ -2,7 +2,7 @@ h6280ops.h - Addressing modes and opcode macros for the Hu6820 cpu - Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net + Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk This source code is based (with permission!) on the 6502 emulator by Juergen Buchmueller. It is released as part of the Mame emulator project. diff --git a/src/cpu/h6280/tblh6280.c b/src/cpu/h6280/tblh6280.c index 3d3a88faa..1ab52ac2f 100644 --- a/src/cpu/h6280/tblh6280.c +++ b/src/cpu/h6280/tblh6280.c @@ -2,7 +2,7 @@ tblh6280.c - Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net + Copyright (c) 1999 Bryan McPhail, mish@tendril.co.uk This source code is based (with permission!) on the 6502 emulator by Juergen Buchmueller. It is released as part of the Mame emulator project. diff --git a/src/cpu/m6502/m6502.c b/src/cpu/m6502/m6502.c index f70714627..7d1102f34 100644 --- a/src/cpu/m6502/m6502.c +++ b/src/cpu/m6502/m6502.c @@ -20,7 +20,7 @@ * *****************************************************************************/ /* 2.February 2000 PeT added 65sc02 subtype */ -/* 10.February 2000 PeT added 6502 set overflow input line */ +/* 10.March 2000 PeT added 6502 set overflow input line */ #include #include "driver.h" @@ -312,8 +312,10 @@ void m6502_set_nmi_line(int state) void m6502_set_irq_line(int irqline, int state) { - if (irqline==M6502_SET_OVERFLOW) { - if (m6502.so_state&&!state) { + if( irqline == M6502_SET_OVERFLOW ) + { + if( m6502.so_state && !state ) + { LOG((errorlog, "M6502#%d set overflow\n", cpu_getactivecpu())); P|=F_V; } diff --git a/src/cpu/m6502/m6509.c b/src/cpu/m6502/m6509.c index 9ffc6fbf8..3c29e754b 100644 --- a/src/cpu/m6502/m6509.c +++ b/src/cpu/m6502/m6509.c @@ -20,7 +20,7 @@ * *****************************************************************************/ /* - 2000 February 10 PeT added SO input line + 2000 March 10 PeT added SO input line The basic difference is the amount of RAM these machines have been supplied with. The B128 and the CBM *10 models had 128k RAM, the others 256k. This implies some banking scheme, as the 6502 can only address 64k. And @@ -340,8 +340,10 @@ void m6509_set_nmi_line(int state) void m6509_set_irq_line(int irqline, int state) { - if (irqline==M6509_SET_OVERFLOW) { - if (m6509.so_state&&!state) { + if( irqline == M6509_SET_OVERFLOW ) + { + if( m6509.so_state && !state ) + { LOG((errorlog, "M6509#%d set overflow\n", cpu_getactivecpu())); P|=F_V; } diff --git a/src/cpu/m6502/m65ce02.c b/src/cpu/m6502/m65ce02.c index 3b34fc145..2581cc7b4 100644 --- a/src/cpu/m6502/m65ce02.c +++ b/src/cpu/m6502/m65ce02.c @@ -3,7 +3,8 @@ * m65ce02.c * Portable 65ce02 emulator V1.0beta2 * - * Copyright (c) 2000 Peter Trauner, all rights reserved. + * Copyright (c) 2000 Peter Trauner, all rights reserved + * documentation preliminary databook * documentation by michael steil mist@c64.org * available at ftp://ftp.funet.fi/pub/cbm/c65 * @@ -23,6 +24,7 @@ /* 4. February 2000 PeT fixed relative word operand */ /* 4. February 2000 PeT jsr (absolut) jsr (absolut,x) inw dew */ /* 17.February 2000 PeT phw */ +/* 16.March 2000 PeT fixed some instructions accordingly to databook */ /* chapter3.txt lines about 5400 @@ -30,25 +32,14 @@ * neg is now simple 2er komplement negation with set of N and Z -* asw is arithmetic (signed) shift left -* row is rotate left - -* inw has zeropage address operand! (not absolute) (c65 dos at 0xba1a) - -* row, asw has absolute adressing - * phw push low order byte, push high order byte! -* cle/see - maybe extended stack flag (real 16 bit stack pointer inc/dec) - usage of high order byte? - tys txs not interruptable ?? +* tys txs not interruptable, not implemented * map jmp/jsr bank lda # ldy #0 ldx #$e0 or bank&0xf ldy #$f0 or bank&0xf - notes (differences to michael steil document) sequences in c65 0xc800 (interface code) (system init) @@ -62,14 +53,6 @@ i think, map configures memory management! e flag set maybe means not the c64 compatible mode - ldx #$ff - ldy #$01 - txs - tys -* makes me feel, we have a real 16bit stackpointer ! - and the tys and tsy mnemonics access the highbyte! -* having a real stackpointer high byte makes me feel - irq handler pha phx phy phz tsy tsx phy phx ldy #$05 lda ($01,x),y the new lda sta (byte indexed stack), indirect, indexed ) @@ -258,8 +241,11 @@ void m65ce02_reset (void *param) PCL = RDMEM(M65CE02_RST_VEC); PCH = RDMEM(M65CE02_RST_VEC+1); - m65ce02.sp.d = 0x01ff; - m65ce02.p = F_T|F_I|F_Z; /* set T, I and Z flags */ + /* after reset in 6502 compatibility mode */ + m65ce02.sp.d = 0x01ff; /* high byte descriped in databook */ + m65ce02.z = 0; + B = 0; + m65ce02.p = F_E|F_I|F_Z; /* set E, I and Z flags */ m65ce02.pending_irq = 0; /* nonzero if an IRQ is pending */ m65ce02.after_cli = 0; /* pending IRQ and last insn cleared I */ m65ce02.irq_callback = NULL; @@ -533,15 +519,15 @@ const char *m65ce02_info(void *context, int regnum) sprintf(buffer[which], "%c%c%c%c%c%c%c%c", r->p & 0x80 ? 'N':'.', r->p & 0x40 ? 'V':'.', - r->p & 0x20 ? 'R':'.', + r->p & 0x20 ? 'E':'.', r->p & 0x10 ? 'B':'.', r->p & 0x08 ? 'D':'.', r->p & 0x04 ? 'I':'.', r->p & 0x02 ? 'Z':'.', r->p & 0x01 ? 'C':'.'); break; - case CPU_INFO_NAME: return "M65ce02"; - case CPU_INFO_FAMILY: return "CBM Semiconductor Group CSG 65ce02"; + case CPU_INFO_NAME: return "M65CE02"; + case CPU_INFO_FAMILY: return "CBM Semiconductor Group CSG 65CE02"; case CPU_INFO_VERSION: return "1.0beta"; case CPU_INFO_CREDITS: return "Copyright (c) 1998 Juergen Buchmueller\n" diff --git a/src/cpu/m6502/m65ce02.h b/src/cpu/m6502/m65ce02.h index ecf8cb678..cba0e0005 100644 --- a/src/cpu/m6502/m65ce02.h +++ b/src/cpu/m6502/m65ce02.h @@ -45,6 +45,10 @@ timer 6510/8500 (used in some designs) 6 io pins (p0 bis p5) +6510T (used in commodore C1551 floppy) +8 io pins +integrated clock generation? + 7501/8501 (c16, c116, c232, c264, plus4, c364) 7 io pins (no p5) no nmi @@ -88,6 +92,15 @@ z register b bank register, highbyte of all zerozape addressing register for stack high byte additional command (some from the 65816) + +Commodore C65 CPU (4510) +65ce02 compatible +integrated memory management (not in standard m65ce02!) + +Set Overflow Pin +in 6502 and pin compatibles (65C02 65SC02 65SC802 65CE02), M6509 +no SO pin 6510/7501/8500/8501/8502/65sc816 +6510T ? */ #ifndef _M65CE02_H diff --git a/src/cpu/m6502/opsce02.h b/src/cpu/m6502/opsce02.h index efcd5e128..56552c1ab 100644 --- a/src/cpu/m6502/opsce02.h +++ b/src/cpu/m6502/opsce02.h @@ -4,6 +4,7 @@ * Addressing mode and opcode macros for 65ce02 CPU * * Copyright (c) 2000 Peter Trauner, all rights reserved. + * documentation preliminary databook * documentation by michael steil mist@c64.org * available at ftp://ftp.funet.fi/pub/cbm/c65 * @@ -24,12 +25,18 @@ #define m6502 m65ce02 #define m6502_ICount m65ce02_ICount +/* stack disable extended (word) mode */ +#define F_E 0x20 + /* some shortcuts for improved readability */ #define Z m65ce02.z #define B m65ce02.zp.b.h +#define SW m6502.sp.w.l #define SPL m6502.sp.b.l #define SPH m6502.sp.b.h +#define PEEK_OP() cpu_readop(PCW) + #define RDMEM_WORD(addr, pair) \ pair.b.l=cpu_readmem16(addr); \ pair.b.h=cpu_readmem16((addr+1)&0xffff); @@ -62,14 +69,18 @@ * EA = zero page indexed stack, indirect + Y (post indexed) * subtract 1 cycle if page boundary is crossed ***************************************************************/ -/* i think its based on on stack high byte instead of of bank register */ +/* i think its based on stack high byte instead of of bank register */ #define EA_ZP_INSP_INY \ { \ PAIR pair={{0}}; \ pair.b.l = SPL+RDOPARG(); \ pair.b.h = SPH; \ EAL = RDMEM(pair.d); \ - pair.b.l++; \ + if (P&F_E) { \ + pair.b.l++; \ + } else { \ + pair.w.l++; \ + } \ EAH = RDMEM(pair.d); \ if (EAL + Y > 0xff) \ m6502_ICount--; \ @@ -89,6 +100,18 @@ #define RD_ZPG_WORD EA_ZPG; RDMEM_WORD(EAD, tmp) #define WR_ZPG_WORD EA_ZPG; WRMEM_WORD(EAD, tmp) +/*************************************************************** + * push a register onto the stack + ***************************************************************/ +#undef PUSH +#define PUSH(Rg) WRMEM(SPD, Rg); if (P&F_E) { S--; } else { SW--; } + +/*************************************************************** + * pull a register from the stack + ***************************************************************/ +#undef PULL +#define PULL(Rg) if (P&F_E) { S++; } else { SW++; } Rg = RDMEM(SPD) + /* the order in which the args are pushed is correct! */ #define PUSH_WORD(pair) PUSH(pair.b.l);PUSH(pair.b.h) @@ -113,20 +136,16 @@ } /* 65ce02 ******************************************************** - * cle clear emu flag + * cle clear disable extended stack flag ***************************************************************/ -/* who knows */ #define CLE \ -if (errorlog) \ - fprintf(errorlog,"m65ce02 at pc:%.4x unknown op cle\n",m65ce02.pc.w.l-1); + P|=F_E /* 65ce02 ******************************************************** - * see set emu flag + * see set disable extended stack flag ***************************************************************/ -/* who knows */ #define SEE \ -if (errorlog) \ - fprintf(errorlog,"m65ce02 at pc:%.4x unknown op see\n",m65ce02.pc.w.l-1); + P&=~F_E /* 65ce02 ******************************************************** * map @@ -144,7 +163,9 @@ if (errorlog) \ /* 65ce02 ******************************************************** * rts imm ***************************************************************/ -/* who knows */ +/* who knows + freeing local variables of procedure + or freeing parameters of procedure call (more likely) */ #define RTS_IMM \ RD_IMM; \ if (errorlog) \ @@ -176,21 +197,17 @@ if (errorlog) \ SET_NZ(tmp) /* 65ce02 ******************************************************** - * ASW arithmetic (signed) shift right word + * ASW arithmetic shift left word * [c] <- [15]..[6][5][4][3][2][1][0] ***************************************************************/ /* not sure about how 16 bit memory modifying is executed */ -/* or arithmetic shift left word!?*/ #define ASW \ tmp.w.l = tmp.w.l << 1; \ P = (P & ~F_C) | (tmp.b.h2 & F_C); \ - SET_NZ_WORD(tmp); \ -if (errorlog) \ - fprintf(errorlog,"m65ce02 at pc:%.4x not sure asw %.2x\n", \ - m65ce02.pc.w.l-2, ZPL); + SET_NZ_WORD(tmp); /* 65ce02 ******************************************************** - * ROW arithmetic (signed) shift right word + * ROW rotate left word * [c] <- [15]..[6][5][4][3][2][1][0] <- C ***************************************************************/ /* not sure about how 16 bit memory modifying is executed */ @@ -199,9 +216,6 @@ if (errorlog) \ tmp.w.l |= (P & F_C); \ P = (P & ~F_C) | (tmp.w.l & F_C); \ SET_NZ_WORD(tmp); \ -if (errorlog) \ - fprintf(errorlog,"m65ce02 at pc:%.4x not sure row %.2x\n", \ - m65ce02.pc.w.l-2,ZPL); /* 65ce02 ******************************************************** * CPZ Compare index Z @@ -235,9 +249,8 @@ if (errorlog) \ SET_NZ(Z) /* 65ce02 ******************************************************** - * DEC Decrement memory word + * INW Increment memory word ***************************************************************/ -/* not sure about this */ #define INW \ tmp.w.l = ++tmp.w.l; \ SET_NZ_WORD(tmp) @@ -378,3 +391,30 @@ if (errorlog) \ PCH = RDMEM(EAD); \ change_pc16(PCD) +/* 65ce02 ******************************************************** + * PLP Pull processor status (flags) + ***************************************************************/ +#undef PLP +#define PLP \ + if ( P & F_I ) { \ + PULL(P); \ + if ((m6502.irq_state != CLEAR_LINE) && !(P & F_I)) { \ + LOG((errorlog, "M65ce02#%d PLP sets after_cli\n",cpu_getactivecpu())); \ + m6502.after_cli = 1; \ + } \ + } else { \ + PULL(P); \ + } + +/* 65ce02 ******************************************************** + * TXS Transfer index X to stack LSB + * no flags changed (sic!) + * txs tys not interruptable + ***************************************************************/ +#undef TXS +#define TXS \ + S = X; \ + if (PEEK_OP()==0x2b /*TYS*/ ) { \ + UINT8 op=RDOP(); \ + (*m65ce02.insn[op])(); \ + } diff --git a/src/cpu/m6800/6800ops.c b/src/cpu/m6800/6800ops.c index 51514c529..7a5deda95 100644 --- a/src/cpu/m6800/6800ops.c +++ b/src/cpu/m6800/6800ops.c @@ -205,6 +205,7 @@ INLINE void daa( void ) /* $1a ILLEGAL */ +#if (HAS_HD63701) /* $1a SLP */ /* HD63701YO only */ INLINE void slp (void) { @@ -212,6 +213,7 @@ INLINE void slp (void) m6808.wai_state |= HD63701_SLP; EAT_CYCLES; } +#endif /* $1b ABA inherent ***** */ INLINE void aba (void) diff --git a/src/cpu/m6800/6800tbl.c b/src/cpu/m6800/6800tbl.c index 9e938f573..d91bcbe97 100644 --- a/src/cpu/m6800/6800tbl.c +++ b/src/cpu/m6800/6800tbl.c @@ -188,7 +188,9 @@ INLINE void sbcb_ix(void); INLINE void sec(void); INLINE void sei(void); INLINE void sev(void); +#if (HAS_HD63701) INLINE void slp(void); +#endif INLINE void sta_di(void); INLINE void sta_ex(void); INLINE void sta_im(void); @@ -316,6 +318,7 @@ subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex, eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex }; +#if (HAS_HD63701) static void (*hd63701_insn[0x100])(void) = { trap ,nop, trap ,trap ,lsrd, asld, tap, tpa, inx, dex, clv, sev, clc, sec, cli, sei, @@ -350,7 +353,9 @@ eorb_ix,adcb_ix,orb_ix, addb_ix,ldd_ix, std_ix, ldx_ix, stx_ix, subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex, eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex }; +#endif +#if (HAS_NSC8105) static void (*nsc8105_insn[0x100])(void) = { illegal,illegal,nop, illegal,illegal,tap, illegal,tpa, inx, clv, dex, sev, clc, cli, sec, sei, @@ -385,3 +390,4 @@ eorb_ix,orb_ix, adcb_ix,addb_ix,illegal,ldx_ix, illegal,stx_ix, subb_ex,sbcb_ex,cmpb_ex,illegal,andb_ex,ldb_ex, bitb_ex,stb_ex, eorb_ex,orb_ex, adcb_ex,addb_ex,addx_ex,ldx_ex, illegal,stx_ex }; +#endif diff --git a/src/cpu/m68000/asmintf.c b/src/cpu/m68000/asmintf.c index 943e1ce4f..080a8b51b 100644 --- a/src/cpu/m68000/asmintf.c +++ b/src/cpu/m68000/asmintf.c @@ -466,6 +466,49 @@ unsigned m68010_dasm(char *buffer, unsigned pc) * M68020 section ****************************************************************************/ +#if HAS_M68EC020 + +void m68ec020_reset(void *param) +{ + m68000_reset(param); + regs.CPUtype=2; +} + +void m68ec020_exit(void) { m68000_exit(); } +int m68ec020_execute(int cycles) { return m68000_execute(cycles); } +unsigned m68ec020_get_context(void *dst) { return m68000_get_context(dst); } +void m68ec020_set_context(void *src) { m68000_set_context(src); } +unsigned m68ec020_get_pc(void) { return m68000_get_pc(); } +void m68ec020_set_pc(unsigned val) { m68000_set_pc(val); } +unsigned m68ec020_get_sp(void) { return m68000_get_sp(); } +void m68ec020_set_sp(unsigned val) { m68000_set_sp(val); } +unsigned m68ec020_get_reg(int regnum) { return m68000_get_reg(regnum); } +void m68ec020_set_reg(int regnum, unsigned val) { m68000_set_reg(regnum,val); } +void m68ec020_set_nmi_line(int state) { m68000_set_nmi_line(state); } +void m68ec020_set_irq_line(int irqline, int state) { m68000_set_irq_line(irqline,state); } +void m68ec020_set_irq_callback(int (*callback)(int irqline)) { m68000_set_irq_callback(callback); } + +const char *m68ec020_info(void *context, int regnum) +{ + switch( regnum ) + { + case CPU_INFO_NAME: return "68EC020"; + } + return m68000_info(context,regnum); +} + +unsigned m68ec020_dasm(char *buffer, unsigned pc) +{ + change_pc24(pc); +#ifdef MAME_DEBUG + return m68k_disassemble(buffer, pc); +#else + sprintf(buffer, "$%04X", cpu_readop16(pc) ); + return 2; +#endif +} +#endif + #if HAS_M68020 void m68020_reset(void *param) diff --git a/src/driver.c b/src/driver.c index 94755e1bc..a01dffecb 100644 --- a/src/driver.c +++ b/src/driver.c @@ -295,6 +295,7 @@ const struct GameDriver *drivers[] = DRIVER( commsega ) /* (c) 1983 Sega */ /* the following ones all have a custom I/O chip */ DRIVER( bosco ) /* (c) 1981 */ + DRIVER( boscoo ) /* (c) 1981 */ DRIVER( boscomd ) /* (c) 1981 Midway */ DRIVER( boscomdo ) /* (c) 1981 Midway */ DRIVER( galaga ) /* (c) 1981 */ @@ -373,8 +374,8 @@ const struct GameDriver *drivers[] = DRIVER( galaga88 ) /* (c) 1987 */ DRIVER( galag88b ) /* (c) 1987 */ DRIVER( galag88j ) /* (c) 1987 (Japan) */ - /* 1988 World Stadium */ -TESTDRIVER( berabohm ) /* (c) 1988 */ + DRIVER( ws ) /* (c) 1988 (Japan) */ + DRIVER( berabohm ) /* (c) 1988 (Japan) */ /* 1988 Alice in Wonderland (English version of Marchen maze) */ DRIVER( mmaze ) /* (c) 1988 (Japan) */ TESTDRIVER( bakutotu ) /* (c) 1988 */ @@ -382,12 +383,14 @@ TESTDRIVER( bakutotu ) /* (c) 1988 */ DRIVER( splatter ) /* (c) 1988 (Japan) */ DRIVER( faceoff ) /* (c) 1988 (Japan) */ DRIVER( rompers ) /* (c) 1989 (Japan) */ + DRIVER( romperso ) /* (c) 1989 (Japan) */ DRIVER( blastoff ) /* (c) 1989 (Japan) */ - /* World Stadium '89 */ + DRIVER( ws89 ) /* (c) 1989 (Japan) */ DRIVER( dangseed ) /* (c) 1989 (Japan) */ DRIVER( ws90 ) /* (c) 1990 (Japan) */ DRIVER( pistoldm ) /* (c) 1990 (Japan) */ DRIVER( soukobdx ) /* (c) 1990 (Japan) */ + DRIVER( puzlclub ) /* (c) 1990 (Japan) */ DRIVER( tankfrce ) /* (c) 1991 (US) */ DRIVER( tankfrcj ) /* (c) 1991 (Japan) */ @@ -411,7 +414,8 @@ TESTDRIVER( fourtrax ) /* 89.11 */ DRIVER( marvland ) /* (c) 1989 (US) */ DRIVER( marvlanj ) /* (c) 1989 (Japan) */ DRIVER( valkyrie ) /* (c) 1989 (Japan) */ - /* 90.5 [Kyuukai Douchuuki] (baseball game. uses character of Youkai Douchuuki) */ + DRIVER ( kyukaidk ) /* (c) 1990 (Japan) */ + DRIVER ( kyukaido ) /* (c) 1990 (Japan) */ DRIVER( dsaber ) /* (c) 1990 */ DRIVER( dsaberj ) /* (c) 1990 (Japan) */ DRIVER( rthun2 ) /* (c) 1990 */ @@ -447,13 +451,14 @@ TESTDRIVER( suzuk8h2 ) */ /* Universal games */ - DRIVER( cosmicg ) /* (c) 1979 */ - DRIVER( cosmica ) /* (c) [1979] */ + DRIVER( cosmicg ) /* 7907 (c) 1979 */ + DRIVER( cosmica ) /* 7910 (c) [1979] */ + DRIVER( cosmica2 ) /* 7910 (c) 1979 */ DRIVER( panic ) /* (c) 1980 */ DRIVER( panica ) /* (c) 1980 */ DRIVER( panicger ) /* (c) 1980 */ - DRIVER( magspot2 ) /* (c) [1980?] */ - DRIVER( devzone ) /* (c) [1980?] */ + DRIVER( magspot2 ) /* 8013 (c) [1980] */ + DRIVER( devzone ) /* 8022 (c) [1980] */ DRIVER( nomnlnd ) /* (c) [1980?] */ DRIVER( nomnlndg ) /* (c) [1980?] + Gottlieb */ DRIVER( cheekyms ) /* (c) [1980?] */ @@ -513,8 +518,7 @@ TESTDRIVER( herocast ) DRIVER( maze ) /* 611 [1976] */ DRIVER( boothill ) /* 612 [1977] */ DRIVER( checkmat ) /* 615 [1977] */ - /* 618 - Road Runner [1977] */ - /* 618 - Desert Gun [1977] */ + DRIVER( desertgu ) /* 618 [1977] */ DRIVER( dplay ) /* 619 [1977] */ DRIVER( lagunar ) /* 622 [1977] */ DRIVER( gmissile ) /* 623 [1977] */ @@ -522,7 +526,7 @@ TESTDRIVER( herocast ) DRIVER( clowns ) /* 630 [1978] */ /* 640 - Space Walk [1978] */ DRIVER( einnings ) /* 642 [1978] Midway */ - /* 643 - Shuffleboard [1978] */ + DRIVER( shuffle ) /* 643 [1978] */ DRIVER( dogpatch ) /* 644 [1977] */ DRIVER( spcenctr ) /* 645 (c) 1980 Midway */ DRIVER( phantom2 ) /* 652 [1979] */ @@ -563,12 +567,12 @@ TESTDRIVER( herocast ) DRIVER( ballbomb ) /* (c) 1980 Taito */ DRIVER( m79amb ) DRIVER( alieninv ) - DRIVER( si_tv ) - DRIVER( si_cv ) - DRIVER( si_sv ) + DRIVER( sitv ) + DRIVER( sicv ) + DRIVER( sisv ) DRIVER( sisv2 ) DRIVER( spacewr3 ) - DRIVER( logitec ) + DRIVER( invaderl ) DRIVER( yosakdon ) DRIVER( spceking ) DRIVER( spcewars ) @@ -823,7 +827,8 @@ TESTDRIVER( firebarr ) /* (c) 1993 Irem (Japan) */ DRIVER( tsamura2 ) /* (c) 1985 Taito */ DRIVER( nunchaku ) /* (c) 1985 Taito */ DRIVER( yamagchi ) /* (c) 1985 Taito */ -TESTDRIVER( flstory ) /* (c) 1985 Taito */ +TESTDRIVER( flstory ) /* (c) 1985 Taito Corporation */ +TESTDRIVER( flstoryj ) /* (c) 1985 Taito Corporation (Japan) */ DRIVER( gladiatr ) /* (c) 1986 Taito America Corporation (US) */ DRIVER( ogonsiro ) /* (c) 1986 Taito Corporation (Japan) */ DRIVER( bublbobl ) /* (c) 1986 Taito Corporation */ @@ -901,6 +906,7 @@ TESTDRIVER( megab ) /* Toaplan games */ DRIVER( tigerh ) /* GX-551 [not a Konami board!] */ DRIVER( tigerh2 ) /* GX-551 [not a Konami board!] */ + DRIVER( tigerhj ) /* GX-551 [not a Konami board!] */ DRIVER( tigerhb1 ) /* bootleg but (c) 1985 Taito Corporation */ DRIVER( tigerhb2 ) /* bootleg but (c) 1985 Taito Corporation */ DRIVER( slapfigh ) /* TP-??? */ @@ -940,14 +946,16 @@ TESTDRIVER( megab ) DRIVER( snowbroj ) /* MIN16-02 (c) 1990 Toaplan */ DRIVER( tekipaki ) /* TP-020 (c) 1991 Toaplan */ -TESTDRIVER( ghox ) /* TP-021 (c) 1991 Toaplan */ -TESTDRIVER( dogyuun ) /* TP-022 (c) 1992 Toaplan */ + DRIVER( ghox ) /* TP-021 (c) 1991 Toaplan */ + DRIVER( dogyuun ) /* TP-022 (c) 1992 Toaplan */ DRIVER( kbash ) /* TP-023 (c) 1993 Toaplan */ TESTDRIVER( tatsujn2 ) /* TP-024 */ DRIVER( pipibibs ) /* TP-025 */ - DRIVER( pipibibi ) /* bootleg */ +TESTDRIVER( pipibibi ) /* bootleg */ DRIVER( whoopee ) /* TP-025 */ TESTDRIVER( fixeight ) /* TP-026 (c) 1992 + Taito license */ + DRIVER( vfive ) /* TP-027 (c) 1993 Toaplan */ + DRIVER( batsugun ) /* TP-030 (c) 1993 Toaplan */ DRIVER( snowbro2 ) /* TP-??? (c) 1994 Hanafram */ /* @@ -1637,6 +1645,8 @@ TESTDRIVER( decocass ) DRIVER( brkthruj ) /* (c) 1986 Data East Corporation (Japan) */ DRIVER( darwin ) /* (c) 1986 Data East Corporation (Japan) */ DRIVER( shootout ) /* (c) 1985 Data East USA (US) */ + DRIVER( shootouj ) /* (c) 1985 Data East USA (Japan) */ + DRIVER( shootoub ) /* bootleg */ DRIVER( sidepckt ) /* (c) 1986 Data East Corporation */ DRIVER( sidepctj ) /* (c) 1986 Data East Corporation */ DRIVER( sidepctb ) /* bootleg */ @@ -1649,6 +1659,7 @@ TESTDRIVER( decocass ) DRIVER( spool3 ) /* (c) 1989 Data East Corporation (World?) */ DRIVER( spool3i ) /* (c) 1990 Data East Corporation + I-Vics license */ DRIVER( actfancr ) /* (c) 1989 Data East Corporation (World) */ + DRIVER( actfanc1 ) /* (c) 1989 Data East Corporation (World) */ DRIVER( actfancj ) /* (c) 1989 Data East Corporation (Japan) */ DRIVER( triothep ) /* (c) 1989 Data East Corporation (Japan) */ @@ -1665,7 +1676,8 @@ TESTDRIVER( decocass ) DRIVER( gondo ) /* (c) 1987 Data East USA (US) */ DRIVER( makyosen ) /* (c) 1987 Data East Corporation (Japan) */ DRIVER( garyoret ) /* (c) 1987 Data East Corporation (Japan) */ - DRIVER( cobracom ) /* (c) 1988 Data East Corporation (Japan) */ + DRIVER( cobracom ) /* (c) 1988 Data East Corporation (World) */ + DRIVER( cobracmj ) /* (c) 1988 Data East Corporation (Japan) */ DRIVER( oscar ) /* (c) 1988 Data East USA (US) */ DRIVER( oscarj ) /* (c) 1987 Data East Corporation (Japan) */ @@ -1866,9 +1878,11 @@ TESTDRIVER( funkyjet ) /* MAT (c) 1992 Mitchell */ DRIVER( garuka ) /* GX890 (c) 1988 (Japan) */ DRIVER( 88games ) /* GX861 (c) 1988 */ DRIVER( konami88 ) /* GX861 (c) 1988 */ + DRIVER( hypsptsp ) /* GX861 (c) 1988 (Japan) */ DRIVER( gbusters ) /* GX878 (c) 1988 */ DRIVER( crazycop ) /* GX878 (c) 1988 (Japan) */ DRIVER( crimfght ) /* GX821 (c) 1989 (US) */ + DRIVER( crimfgt2 ) /* GX821 (c) 1989 (World) */ DRIVER( crimfgtj ) /* GX821 (c) 1989 (Japan) */ DRIVER( spy ) /* GX857 (c) 1989 (US) */ DRIVER( bottom9 ) /* GX891 (c) 1989 */ @@ -2012,6 +2026,7 @@ Konami System GX game list /* Atari vector games */ DRIVER( asteroid ) /* (c) 1979 */ DRIVER( asteroi1 ) /* no copyright notice */ + DRIVER( asteroib ) /* bootleg */ DRIVER( astdelux ) /* (c) 1980 */ DRIVER( astdelu1 ) /* (c) 1980 */ DRIVER( bwidow ) /* (c) 1982 */ @@ -2067,11 +2082,13 @@ Konami System GX game list DRIVER( milliped ) /* (c) 1982 */ DRIVER( qwakprot ) /* (c) 1982 */ - /* Atari "Kangaroo hardware" games */ - DRIVER( kangaroo ) /* (c) 1982 */ + /* "Kangaroo hardware" games */ +TESTDRIVER( fnkyfish ) /* (c) 1981 Sun Electronics */ + DRIVER( kangaroo ) /* (c) 1982 Sun Electronics */ + DRIVER( kangaroa ) /* (c) 1982 Atari */ DRIVER( kangarob ) /* bootleg */ DRIVER( arabian ) /* (c) 1983 Sun Electronics */ - DRIVER( arabiana ) /* (c) 1983 */ + DRIVER( arabiana ) /* (c) 1983 Atari */ /* Atari "Missile Command hardware" games */ DRIVER( missile ) /* (c) 1980 */ @@ -2173,6 +2190,7 @@ TESTDRIVER( liberat2 ) /* later SNK games, each game can be identified by PCB code and ROM code, the ROM code is the same between versions, and usually based upon the Japanese title. */ + DRIVER( lasso ) /* 'WM' (c) 1982 */ DRIVER( joyfulr ) /* A2001 (c) 1983 */ DRIVER( mnchmobl ) /* A2001 (c) 1983 + Centuri license */ DRIVER( marvins ) /* A2003 (c) 1983 */ @@ -2363,6 +2381,8 @@ TESTDRIVER( narc3 ) /* (c) 1988 Williams */ DRIVER( mk2r32 ) /* (c) 1993 Midway */ DRIVER( mk2r14 ) /* (c) 1993 Midway */ DRIVER( nbajam ) /* (c) 1993 Midway */ + DRIVER( nbajamr2 ) /* (c) 1993 Midway */ + DRIVER( nbajamte ) /* (c) 1994 Midway */ /* Cinematronics raster games */ DRIVER( jack ) /* (c) 1982 Cinematronics */ @@ -2615,6 +2635,7 @@ TESTDRIVER( dlair ) DRIVER( bjtwin ) /* (c) 1993 NMK */ DRIVER( aztarac ) /* (c) 1983 Centuri (vector game) */ DRIVER( mole ) /* (c) 1982 Yachiyo Electronics, Ltd. */ + DRIVER( gotya ) /* (c) 1981 Game-A-Tron */ #endif /* NEOMAME */ @@ -2778,6 +2799,9 @@ TESTDRIVER( pbobbl2n ) /* 0248 (c) 1999 Taito (SNK license) */ TESTDRIVER( ctomaday ) /* 0249 (c) 1999 Visco */ TESTDRIVER( mslugx ) /* 0250 (c) 1999 SNK */ TESTDRIVER( kof99 ) /* 0251 (c) 1999 SNK */ +TESTDRIVER( garou ) /* 0253 (c) 1999 SNK */ + /* Prehistoric Isle 2 */ + /* Strikers 1945 */ #endif /* NEOFREE */ diff --git a/src/driver.h b/src/driver.h index ded3bbd49..edbf951b9 100644 --- a/src/driver.h +++ b/src/driver.h @@ -376,6 +376,7 @@ struct GameDriver #define GAME_NO_SOUND 0x0040 /* sound is missing */ #define GAME_IMPERFECT_SOUND 0x0080 /* sound is known to be wrong */ #define GAME_REQUIRES_16BIT 0x0100 /* cannot fit in 256 colors */ +#define GAME_NO_COCKTAIL 0x0200 /* screen flip support is missing */ #define NOT_A_DRIVER 0x4000 /* set by the fake "root" driver_ and by "containers" */ /* e.g. driver_neogeo. */ #ifdef MESS diff --git a/src/drivers/1943.c b/src/drivers/1943.c index 12f2ab474..d29ae070b 100644 --- a/src/drivers/1943.c +++ b/src/drivers/1943.c @@ -349,7 +349,7 @@ ROM_START( 1943 ) ROM_LOAD( "1943.14", 0x0000, 0x8000, 0x4d3c6401 ) /* front background */ ROM_LOAD( "1943.23", 0x8000, 0x8000, 0xa52aecbd ) /* back background */ - ROM_REGION( 0x0a00, REGION_PROMS ) + ROM_REGION( 0x0c00, REGION_PROMS ) ROM_LOAD( "bmprom.01", 0x0000, 0x0100, 0x74421f18 ) /* red component */ ROM_LOAD( "bmprom.02", 0x0100, 0x0100, 0xac27541f ) /* green component */ ROM_LOAD( "bmprom.03", 0x0200, 0x0100, 0x251fb6ff ) /* blue component */ @@ -360,6 +360,8 @@ ROM_START( 1943 ) ROM_LOAD( "bmprom.11", 0x0700, 0x0100, 0x405aae37 ) /* background palette bank */ ROM_LOAD( "bmprom.08", 0x0800, 0x0100, 0xc2010a9e ) /* sprite lookup table */ ROM_LOAD( "bmprom.07", 0x0900, 0x0100, 0xb56f30c3 ) /* sprite palette bank */ + ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, 0x91a8a2e1 ) /* priority encoder / palette selector (not used) */ + ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END ROM_START( 1943j ) @@ -402,7 +404,7 @@ ROM_START( 1943j ) ROM_LOAD( "1943.14", 0x0000, 0x8000, 0x4d3c6401 ) /* front background */ ROM_LOAD( "1943.23", 0x8000, 0x8000, 0xa52aecbd ) /* back background */ - ROM_REGION( 0x0a00, REGION_PROMS ) + ROM_REGION( 0x0c00, REGION_PROMS ) ROM_LOAD( "bmprom.01", 0x0000, 0x0100, 0x74421f18 ) /* red component */ ROM_LOAD( "bmprom.02", 0x0100, 0x0100, 0xac27541f ) /* green component */ ROM_LOAD( "bmprom.03", 0x0200, 0x0100, 0x251fb6ff ) /* blue component */ @@ -413,6 +415,8 @@ ROM_START( 1943j ) ROM_LOAD( "bmprom.11", 0x0700, 0x0100, 0x405aae37 ) /* background palette bank */ ROM_LOAD( "bmprom.08", 0x0800, 0x0100, 0xc2010a9e ) /* sprite lookup table */ ROM_LOAD( "bmprom.07", 0x0900, 0x0100, 0xb56f30c3 ) /* sprite palette bank */ + ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, 0x91a8a2e1 ) /* priority encoder / palette selector (not used) */ + ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END ROM_START( 1943kai ) @@ -455,7 +459,7 @@ ROM_START( 1943kai ) ROM_LOAD( "1943kai.14", 0x0000, 0x8000, 0xcf0f5a53 ) /* front background */ ROM_LOAD( "1943kai.23", 0x8000, 0x8000, 0x17f77ef9 ) /* back background */ - ROM_REGION( 0x0a00, REGION_PROMS ) + ROM_REGION( 0x0c00, REGION_PROMS ) ROM_LOAD( "bmk01.bin", 0x0000, 0x0100, 0xe001ea33 ) /* red component */ ROM_LOAD( "bmk02.bin", 0x0100, 0x0100, 0xaf34d91a ) /* green component */ ROM_LOAD( "bmk03.bin", 0x0200, 0x0100, 0x43e9f6ef ) /* blue component */ @@ -466,10 +470,12 @@ ROM_START( 1943kai ) ROM_LOAD( "bmk11.bin", 0x0700, 0x0100, 0x87a8854e ) /* background palette bank */ ROM_LOAD( "bmk08.bin", 0x0800, 0x0100, 0xdad17e2d ) /* sprite lookup table */ ROM_LOAD( "bmk07.bin", 0x0900, 0x0100, 0x76307f8d ) /* sprite palette bank */ + ROM_LOAD( "bmprom.04", 0x0a00, 0x0100, 0x91a8a2e1 ) /* priority encoder / palette selector (not used) */ + ROM_LOAD( "bmprom.06", 0x0b00, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END -GAME( 1987, 1943, 0, 1943, 1943, 0, ROT270, "Capcom", "1943 - The Battle of Midway (US)" ) -GAME( 1987, 1943j, 1943, 1943, 1943, 0, ROT270, "Capcom", "1943 - The Battle of Midway (Japan)" ) -GAME( 1987, 1943kai, 0, 1943, 1943, 0, ROT270, "Capcom", "1943 Kai" ) +GAMEX( 1987, 1943, 0, 1943, 1943, 0, ROT270, "Capcom", "1943 - The Battle of Midway (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, 1943j, 1943, 1943, 1943, 0, ROT270, "Capcom", "1943 - The Battle of Midway (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, 1943kai, 0, 1943, 1943, 0, ROT270, "Capcom", "1943 Kai", GAME_NO_COCKTAIL ) diff --git a/src/drivers/8080bw.c b/src/drivers/8080bw.c index 5aa8b2ba5..7a6708481 100644 --- a/src/drivers/8080bw.c +++ b/src/drivers/8080bw.c @@ -3,41 +3,13 @@ /* 8080bw.c */ /* */ /* Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni */ -/* Lee Taylor, Valerio Verrando, Marco Cassili and others */ +/* Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari and others */ /* */ /* */ /* Exidy */ /* ----- */ /* Bandido (bandido) */ /* */ -/* Midway */ -/* ------ */ -/* 596 - Sea Wolf (seawolf) */ -/* 597 - Gunfight (gunfight) */ -/* 605 - Tornado Baseball (tornbase) */ -/* 610 - 280-ZZZAP (zzzap) */ -/* 611 - Amazing Maze (maze) */ -/* 612 - Boot Hill (boothill) */ -/* 615 - Checkmate (checkmat) */ -/* 618 - Desert Gun NO DRIVER */ -/* 619 - Double Play (dplay) */ -/* 622 - Laguna Racer (lracer) */ -/* 623 - Guided Missile (gmissile) */ -/* 626 - M-4 (m4) */ -/* 630 - Clowns (clowns) */ -/* 640 - Space Walk NO DRIVER */ -/* 642 - Extra Innings (einnings) */ -/* 643 - Shuffleboard NO DRIVER */ -/* 644 - Dog Patch (dogpatch) */ -/* 645 - Space Encounters (spcenctr) */ -/* 652 - Phantom II (phantom2) */ -/* 730 - 4 Player Bowling (midwbowl) */ -/* 739 - Space Invaders (invaders) */ -/* 742 - Blue Shark (blueshrk) */ -/* 851 - Space Invaders II cocktail (invad2ct) */ -/* 852 - Space Invaders Deluxe (invdpt2m) */ -/* 870 - Space Invaders Deluxe cocktail NO DRIVER */ -/* */ /* Taito */ /* ----- */ /* Space Invaders Part II (Taito) (invadpt2) */ @@ -73,49 +45,45 @@ /* Space Phantoms (spaceph) */ /* */ /* */ -/* Notes: */ -/* Space Chaser writes to $c400-$df9f. Color? */ -/* */ -/* */ /* Known problems: */ /* -------------- */ -/* Space Encounter, Sea Wolf need their movement controls fixed. */ /* The accelerator in 280 Zzzap could be handled better. */ -/* */ -/* List of Changes */ -/* --------------- */ -/* MJC - 22.01.98 - Boot hill controls/memory mappings */ -/* LBO - 5 May 98 - Cleaned up the code, added Al's extra drivers, */ -/* rotation support */ +/* */ +/* */ +/* To Do: */ +/* */ +/* - Space Encounters: 'trench' video overlay */ +/* */ +/* - Phantom II: little fluffy clouds you still see */ +/* them sometimes in the desert */ +/* */ /* */ /****************************************************************************/ -#include #include "driver.h" #include "vidhrdw/generic.h" #include "cpu/i8039/i8039.h" /* in machine/8080bw.c */ -int invaders_shift_data_r(int offset); -int midbowl_shift_data_r(int offset); -int midbowl_shift_data_rev_r(int offset); -int blueshrk_shift_data_r(int offset); -int blueshrk_shift_data_rev_r(int offset); void invaders_shift_amount_w(int offset,int data); void invaders_shift_data_w(int offset,int data); +int invaders_shift_data_r(int offset); +int invaders_shift_data_rev_r(int offset); +int invaders_shift_data_comp_r(int offset); int invaders_interrupt(void); -int boothill_shift_data_r(int offset); /* MJC 310198 */ -int boothill_port_0_r(int offset); /* MJC 310198 */ -int boothill_port_1_r(int offset); /* MJC 310198 */ -void boothill_sh_port3_w(int offset, int data); /* HC 4/14/98 */ -void boothill_sh_port5_w(int offset, int data); /* HC 4/14/98 */ +int boothill_shift_data_r(int offset); +int boothill_port_0_r(int offset); +int boothill_port_1_r(int offset); +void boothill_sh_port3_w(int offset, int data); +void boothill_sh_port5_w(int offset, int data); int gray6bit_controller0_r(int offset); int gray6bit_controller1_r(int offset); -int seawolf_shift_data_r(int offset); int seawolf_port_0_r(int offset); +int desertgu_port_1_r(int offset); +void desertgu_controller_select_w(int offset, int data); void init_machine_bandido(void); void bandido_sh_port4_w(int offset, int data); @@ -128,156 +96,99 @@ int bandido_sh_gett1(int offset); /* in video/8080bw.c */ -extern unsigned char *invaders_videoram; +int invaders_vh_start(void); +void invaders_vh_stop(void); + +void init_8080bw(void); +void init_invaders(void); +void init_invadpt2(void); +void init_invdpt2m(void); +void init_invrvnge(void); +void init_invad2ct(void); +void init_schaser(void); +void init_rollingc(void); +void init_seawolf(void); +void init_blueshrk(void); +void init_desertgu(void); -void boothill_videoram_w(int offset,int data); /* MAB */ void invaders_videoram_w(int offset,int data); -void invdpt2m_videoram_w(int offset,int data); /* V.V */ -void invad2ct_videoram_w(int offset,int data); /* F.P.*/ -void invrvnge_videoram_w(int offset,int data); /* V.V */ -void lrescue_videoram_w(int offset,int data); /* V.V */ -void rollingc_videoram_w(int offset,int data); /* L.T */ +void schaser_colorram_w(int offset,int data); -int invaders_vh_start(void); -void invaders_vh_stop(void); -void invaders_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); void invad2ct_sh_port1_w(int offset,int data); void invaders_sh_port3_w(int offset,int data); -void invaders_sh_port4_w(int offset,int data); -void invadpt2_sh_port3_w(int offset,int data); void invaders_sh_port5_w(int offset,int data); void invad2ct_sh_port7_w(int offset,int data); -void invaders_sh_update(void); -void seawolf_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); -void blueshrk_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); -static unsigned char palette[] = /* V.V */ /* Smoothed pure colors, overlays are not so contrasted */ +void invaders_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); + +void invadpt2_vh_convert_color_prom(unsigned char *pallete, unsigned short *colortable,const unsigned char *color_prom); + + +static unsigned char invaders_palette[] = { 0x00,0x00,0x00, /* BLACK */ - 0xff,0x20,0x20, /* RED */ - 0x20,0xff,0x20, /* GREEN */ - 0xff,0xff,0x20, /* YELLOW */ 0xff,0xff,0xff, /* WHITE */ - 0x20,0xff,0xff, /* CYAN */ - 0xff,0x20,0xff /* PURPLE */ }; -static void init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom) -{ - memcpy(game_palette,palette,sizeof(palette)); -} - -/****************************************************************************/ -/* mix_hiscoreprint: special thanks to: Mirko , John B., Frank, and Mike B */ -/* x = x position */ -/* y = y Position */ -/* value = value to display */ -/* width = number of characters */ -/* size = size of a character in the character rom */ -/* adjust = number of rows to adjust the display (line characters up) */ -/* romarea = where into memory the character rom is loaded */ -/* offset = where in the character rom the 1st number starts */ -/* type = to make this as flexible as possible i've added code for all */ -/* the types of character drawing the current drivers need */ -/* to add a new one just add a new case to the case statement */ -/* case 0 : plain horizontal */ -/* case 1 : horizontal using colors from lrescue */ -/* case 2 : plain vertical */ -/* case 3 : inverted vertical */ - - -/* HSC 11/16/98 */ -void mix_hiscoreprint(int x, int y, int value, int width,int size, int adjust,int romarea, int offset, int type) +static void init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom) { - int i,j; - - j = x+width-1; - while (j >= x) - { - int disp = (value % 10) * size; - for (i=0; i < size; i++) - switch (type) - { - case 0: - invaders_videoram_w((31-y) + (i+adjust)*32 + j*256, - memory_region(REGION_CPU1)[romarea+offset+disp+i]); - break; - - case 1: - lrescue_videoram_w((31-y) + (i+adjust)*32 + j*256, - memory_region(REGION_CPU1)[romarea+offset+disp+i]); - break; - - case 2: - boothill_videoram_w((31-j) + (i+adjust)*32 + y*256, - memory_region(REGION_CPU1)[romarea+offset+disp+i]); - break; - - case 3: - boothill_videoram_w((31-j) + (i+adjust)*32 + y*256, - ~(memory_region(REGION_CPU1)[romarea+offset+disp+i])); - break; - } - - value /= 10; - j--; - } + memcpy(game_palette,invaders_palette,sizeof(invaders_palette)); } - /*******************************************************/ /* */ /* Midway "Space Invaders" */ /* */ /*******************************************************/ -/* invaders, earthinv, spaceatt, invrvnge, invdpt2m, invadpt2, galxwars, lrescue, */ -/* desterth, cosmicmo, spaceph */ static struct MemoryReadAddress readmem[] = { { 0x0000, 0x1fff, MRA_ROM }, { 0x2000, 0x3fff, MRA_RAM }, - { 0x4000, 0x57ff, MRA_ROM }, + { 0x4000, 0x5fff, MRA_ROM }, { -1 } /* end of table */ }; -/* invaders, earthinv, spaceatt, invdpt2m, galxwars, desterth, cosmicmo */ static struct MemoryWriteAddress writemem[] = { { 0x0000, 0x1fff, MWA_ROM }, { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, invaders_videoram_w, &invaders_videoram }, - { 0x4000, 0x57ff, MWA_ROM }, + { 0x2400, 0x3fff, invaders_videoram_w, &videoram, &videoram_size }, + { 0x4000, 0x5fff, MWA_ROM }, { -1 } /* end of table */ }; static struct IOReadPort readport[] = { - { 0x01, 0x01, input_port_0_r }, - { 0x02, 0x02, input_port_1_r }, + { 0x00, 0x00, input_port_0_r }, + { 0x01, 0x01, input_port_1_r }, + { 0x02, 0x02, input_port_2_r }, { 0x03, 0x03, invaders_shift_data_r }, { -1 } /* end of table */ }; - -/* Catch the write to unmapped I/O port 6 */ -void invaders_dummy_write(int offset,int data) -{ -} - static struct IOWritePort writeport[] = { { 0x02, 0x02, invaders_shift_amount_w }, { 0x03, 0x03, invaders_sh_port3_w }, { 0x04, 0x04, invaders_shift_data_w }, { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, { -1 } /* end of table */ }; INPUT_PORTS_START( invaders ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -286,6 +197,7 @@ INPUT_PORTS_START( invaders ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -302,15 +214,7 @@ INPUT_PORTS_START( invaders ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -390,10 +294,10 @@ static struct MachineDriver machine_driver_invaders = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -416,35 +320,6 @@ static struct MachineDriver machine_driver_invaders = /* */ /*******************************************************/ -static struct IOReadPort invadpt2_readport[] = -{ - { 0x00, 0x00, input_port_0_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_2_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - -/* LT 20-3-1998 */ -static struct IOWritePort invadpt2_writeport[] = -{ - { 0x02, 0x02, invaders_shift_amount_w }, - { 0x03, 0x03, invadpt2_sh_port3_w }, - { 0x04, 0x04, invaders_shift_data_w }, - { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, - { -1 } /* end of table */ -}; - -static struct MemoryWriteAddress invadpt2_writemem[] = -{ - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, lrescue_videoram_w, &invaders_videoram }, - { 0x0000, 0x1fff, MWA_ROM }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( invadpt2 ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -453,8 +328,9 @@ INPUT_PORTS_START( invadpt2 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -464,6 +340,7 @@ INPUT_PORTS_START( invadpt2 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -481,21 +358,16 @@ INPUT_PORTS_START( invadpt2 ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END + +/* same as regular invaders, but with a color board added */ + static struct MachineDriver machine_driver_invadpt2 = { /* basic machine hardware */ @@ -503,7 +375,7 @@ static struct MachineDriver machine_driver_invadpt2 = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem, invadpt2_writemem, invadpt2_readport, invadpt2_writeport, + readmem,writemem,readport,writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -514,10 +386,10 @@ static struct MachineDriver machine_driver_invadpt2 = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, + 8, 0, + invadpt2_vh_convert_color_prom, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -542,6 +414,16 @@ static struct MachineDriver machine_driver_invadpt2 = INPUT_PORTS_START( earthinv ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -550,6 +432,7 @@ INPUT_PORTS_START( earthinv ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "2" ) @@ -578,6 +461,16 @@ INPUT_PORTS_END INPUT_PORTS_START( spaceatt ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -586,6 +479,7 @@ INPUT_PORTS_START( spaceatt ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -604,23 +498,25 @@ INPUT_PORTS_START( spaceatt ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) INPUT_PORTS_END + /*******************************************************/ /* */ /* Zenitone Microsec "Invaders Revenge" */ /* */ /*******************************************************/ -static struct MemoryWriteAddress invrvnge_writemem[] = -{ - { 0x0000, 0x1fff, MWA_ROM }, - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, invrvnge_videoram_w, &invaders_videoram }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( invrvnge ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -629,6 +525,7 @@ INPUT_PORTS_START( invrvnge ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -647,43 +544,6 @@ INPUT_PORTS_START( invrvnge ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) INPUT_PORTS_END -static struct MachineDriver machine_driver_invrvnge = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, invrvnge_writemem, readport, writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - /*******************************************************/ /* */ @@ -691,24 +551,6 @@ static struct MachineDriver machine_driver_invrvnge = /* */ /*******************************************************/ -static struct IOReadPort invdpt2m_readport[] = -{ - { 0x00, 0x00, input_port_0_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_2_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - -static struct MemoryWriteAddress invdpt2m_writemem[] = -{ - { 0x0000, 0x1fff, MWA_ROM }, - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, invdpt2m_videoram_w, &invaders_videoram }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( invdpt2m ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -717,8 +559,9 @@ INPUT_PORTS_START( invdpt2m ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -728,6 +571,7 @@ INPUT_PORTS_START( invdpt2m ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -745,6 +589,7 @@ INPUT_PORTS_START( invdpt2m ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -752,58 +597,12 @@ INPUT_PORTS_START( invdpt2m ) INPUT_PORTS_END -static struct MachineDriver machine_driver_invdpt2m = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, invdpt2m_writemem, invdpt2m_readport, writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - /*******************************************************/ /* */ /* Midway "Space Invaders II Cocktail" */ /* */ /*******************************************************/ -static struct MemoryWriteAddress invad2ct_writemem[] = -{ - { 0x0000, 0x1fff, MWA_ROM }, - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, invad2ct_videoram_w, &invaders_videoram }, - { 0x4000, 0x5fff, MWA_ROM }, - { -1 } /* end of table */ -}; - static struct IOWritePort invad2ct_writeport[] = { { 0x01, 0x01, invad2ct_sh_port1_w }, @@ -811,7 +610,6 @@ static struct IOWritePort invad2ct_writeport[] = { 0x03, 0x03, invaders_sh_port3_w }, { 0x04, 0x04, invaders_shift_data_w }, { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, { 0x07, 0x07, invad2ct_sh_port7_w }, { -1 } /* end of table */ }; @@ -826,6 +624,7 @@ INPUT_PORTS_START( invad2ct ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* tied to pull-up */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* labelled reset but tied to pull-up */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* tied to pull-up */ + PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -835,6 +634,7 @@ INPUT_PORTS_START( invad2ct ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* tied to pull-up */ + PORT_START PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) /* dips 4 & 3 */ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) @@ -853,27 +653,6 @@ INPUT_PORTS_START( invad2ct ) PORT_DIPSETTING( 0x00, "2000" ) INPUT_PORTS_END -static unsigned char invad2ct_palette[] = -{ - 0x00,0x00,0x00, /* BLACK */ - 0xff,0x20,0x20, /* RED */ - 0x20,0xff,0x20, /* GREEN */ - 0xff,0xff,0x20, /* YELLOW */ - 0xff,0xff,0xff, /* WHITE */ - 0x20,0xff,0xff, /* CYAN */ - 0xff,0x20,0xff, /* PURPLE */ - - /* I need some extra colors for the transition regions in the overlay */ - - 0xff,0x90,0x20, /* ORANGE */ - 0x90,0xff,0x20, /* YELLOW_GREEN */ - 0x20,0xff,0x90, /* GREEN_CYAN */ -}; -static void invad2ct_init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom) -{ - memcpy(game_palette,invad2ct_palette,sizeof(invad2ct_palette)); -} - static struct MachineDriver machine_driver_invad2ct = { /* basic machine hardware */ @@ -881,7 +660,7 @@ static struct MachineDriver machine_driver_invad2ct = { CPU_8080, 1996800, /* 19.968Mhz / 10 */ - readmem, invad2ct_writemem, invdpt2m_readport, invad2ct_writeport, + readmem,writemem,readport,invad2ct_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -892,10 +671,10 @@ static struct MachineDriver machine_driver_invad2ct = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(invad2ct_palette) / sizeof(invad2ct_palette[0]) / 3, 0, - invad2ct_init_palette, + 256, 0, /* leave extra colors for the overlay */ + init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -911,6 +690,7 @@ static struct MachineDriver machine_driver_invad2ct = } }; + /*******************************************************/ /* */ /* ?????? "Astro Laser" */ @@ -925,8 +705,9 @@ INPUT_PORTS_START( astlaser ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -936,6 +717,7 @@ INPUT_PORTS_START( astlaser ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -953,6 +735,7 @@ INPUT_PORTS_START( astlaser ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -960,7 +743,6 @@ INPUT_PORTS_START( astlaser ) INPUT_PORTS_END - /*******************************************************/ /* */ /* Game Plan "Intruder" */ @@ -975,8 +757,9 @@ INPUT_PORTS_START( intruder ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -986,6 +769,7 @@ INPUT_PORTS_START( intruder ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -1003,12 +787,14 @@ INPUT_PORTS_START( intruder ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END + /*******************************************************/ /* */ /* Taito "Galaxy Wars" */ @@ -1017,10 +803,20 @@ INPUT_PORTS_END INPUT_PORTS_START( galxwars ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) @@ -1051,18 +847,18 @@ INPUT_PORTS_END /* */ /*******************************************************/ -/* lrescue, invadpt2, spaceph */ -static struct MemoryWriteAddress lrescue_writemem[] = -{ - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, lrescue_videoram_w, &invaders_videoram }, - { 0x0000, 0x1fff, MWA_ROM }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( lrescue ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -1090,44 +886,6 @@ INPUT_PORTS_START( lrescue ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END -static struct MachineDriver machine_driver_lrescue = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, lrescue_writemem, readport, writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - - /*******************************************************/ /* */ @@ -1137,6 +895,16 @@ static struct MachineDriver machine_driver_lrescue = INPUT_PORTS_START( desterth ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -1145,6 +913,7 @@ INPUT_PORTS_START( desterth ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -1172,6 +941,16 @@ INPUT_PORTS_END INPUT_PORTS_START( cosmicmo ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -1180,6 +959,7 @@ INPUT_PORTS_START( cosmicmo ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "2" ) @@ -1208,10 +988,10 @@ INPUT_PORTS_END static struct MemoryReadAddress rollingc_readmem[] = { -// { 0x2000, 0x2002, MRA_RAM }, -// { 0x2003, 0x2003, hack }, - { 0x2000, 0x3fff, MRA_RAM }, { 0x0000, 0x1fff, MRA_ROM }, + { 0x2000, 0x3fff, MRA_RAM }, +// { 0x2000, 0x2002, MRA_RAM }, +// { 0x2003, 0x2003, hack }, { 0x4000, 0x5fff, MRA_ROM }, { 0xa400, 0xbfff, MRA_RAM }, { 0xe400, 0xffff, MRA_RAM }, @@ -1220,14 +1000,15 @@ static struct MemoryReadAddress rollingc_readmem[] = static struct MemoryWriteAddress rollingc_writemem[] = { - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, rollingc_videoram_w, &invaders_videoram }, { 0x0000, 0x1fff, MWA_ROM }, + { 0x2000, 0x23ff, MWA_RAM }, + { 0x2400, 0x3fff, invaders_videoram_w, &videoram, &videoram_size }, { 0x4000, 0x5fff, MWA_ROM }, - { 0xa400, 0xbfff, MWA_RAM }, + { 0xa400, 0xbfff, schaser_colorram_w, &colorram }, { 0xe400, 0xffff, MWA_RAM }, { -1 } /* end of table */ }; + INPUT_PORTS_START( rollingc ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -1238,6 +1019,7 @@ INPUT_PORTS_START( rollingc ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -1247,6 +1029,7 @@ INPUT_PORTS_START( rollingc ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) /* Player 1 Controls */ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) /* Player 1 Controls */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -1265,31 +1048,6 @@ INPUT_PORTS_START( rollingc ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END -static unsigned char rollingc_palette[] = -{ - 0xff,0xff,0xff, /* WHITE */ - 0xa0,0xa0,0xa0, /* ?????? */ - 0x00,0xff,0x00, /* GREEN */ - 0x00,0xa0,0xa0, /* GREEN */ - 0xff,0x00,0xff, /* PURPLE */ - 0x00,0xff,0xff, /* CYAN */ - 0xa0,0x00,0xa0, /* WHITE */ - 0xff,0x00,0x00, /* RED */ - 0xff,0xff,0x00, /* YELLOW */ - 0x80,0x40,0x20, /* ?????? */ - 0x80,0x80,0x00, /* GREEN */ - 0x00,0x80,0x80, /* GREEN */ - 0xa0,0xa0,0xff, /* PURPLE */ - 0xa0,0xff,0x80, /* CYAN */ - 0xff,0xff,0x00, /* WHITE */ - 0xff,0x00,0xa0, /* RED */ - 0x00,0x00,0x00 /* BLACK */ -}; -static void rollingc_init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom) -{ - memcpy(game_palette,rollingc_palette,sizeof(rollingc_palette)); -} - static struct MachineDriver machine_driver_rollingc = { @@ -1298,7 +1056,7 @@ static struct MachineDriver machine_driver_rollingc = { CPU_8080, 2000000, /* 2 Mhz? */ - rollingc_readmem,rollingc_writemem,invdpt2m_readport,writeport, + rollingc_readmem,rollingc_writemem,readport,writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -1309,10 +1067,10 @@ static struct MachineDriver machine_driver_rollingc = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(rollingc_palette) / sizeof(rollingc_palette[0]) / 3, 0, - rollingc_init_palette, + 8, 0, + invadpt2_vh_convert_color_prom, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -1342,19 +1100,19 @@ static struct MachineDriver machine_driver_rollingc = static struct MemoryReadAddress bandido_readmem[] = { { 0x0000, 0x27ff, MRA_ROM }, - { 0x4200, 0x7FFF, MRA_RAM }, + { 0x4200, 0x7fff, MRA_RAM }, { -1 } /* end of table */ }; static struct MemoryWriteAddress bandido_writemem[] = { - { 0x4200, 0x5dff, boothill_videoram_w, &invaders_videoram }, - { 0x5E00, 0x7fff, MWA_RAM }, { 0x0000, 0x27ff, MWA_ROM }, + { 0x4200, 0x5dff, invaders_videoram_w, &videoram, &videoram_size }, + { 0x5e00, 0x7fff, MWA_RAM }, { -1 } /* end of table */ }; -static struct IOReadPort bandido_readport[] = /* MJC */ +static struct IOReadPort bandido_readport[] = { { 0x00, 0x00, input_port_0_r }, { 0x01, 0x01, input_port_1_r }, @@ -1364,7 +1122,7 @@ static struct IOReadPort bandido_readport[] = { -1 } /* end of table */ }; -static struct IOWritePort bandido_writeport[] = /* MJC */ +static struct IOWritePort bandido_writeport[] = { { 0x02, 0x02, invaders_shift_amount_w }, { 0x03, 0x03, invaders_shift_data_w }, @@ -1404,8 +1162,7 @@ static struct IOWritePort bandido_sound_writeport[] = /* probably never completed. */ /* e.g. cocktail players button will give 6 credits! */ -INPUT_PORTS_START( bandido ) /* MJC */ - +INPUT_PORTS_START( bandido ) PORT_START /* 00 Main Controls */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY ) @@ -1445,16 +1202,16 @@ INPUT_PORTS_START( bandido ) /* MJC */ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x08, 0x00, "Unknown" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) @@ -1498,7 +1255,7 @@ static struct MachineDriver machine_driver_bandido = { CPU_8080, 20160000/8, /* 2.52 MHz */ - bandido_readmem, bandido_writemem, bandido_readport, bandido_writeport, + bandido_readmem,bandido_writemem,bandido_readport,bandido_writeport, invaders_interrupt,2 /* two interrupts per frame */ }, { @@ -1516,10 +1273,10 @@ static struct MachineDriver machine_driver_bandido = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -1539,22 +1296,108 @@ static struct MachineDriver machine_driver_bandido = } }; + /*******************************************************/ /* */ -/* Midway "Boot Hill" */ +/* Midway "Space Encounters" */ +/* */ /* */ /*******************************************************/ -static struct MemoryWriteAddress boothill_writemem[] = +static struct IOWritePort spcenctr_writeport[] = { - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, boothill_videoram_w, &invaders_videoram }, - { 0x0000, 0x1fff, MWA_ROM }, - { 0x4000, 0x57ff, MWA_ROM }, + { 0x01, 0x01, invaders_shift_amount_w }, + { 0x02, 0x02, invaders_shift_data_w }, + { -1 } /* end of table */ +}; + +static struct IOReadPort spcenctr_readport[] = +{ + { 0x00, 0x00, gray6bit_controller0_r }, /* These 2 ports use Gray's binary encoding */ + { 0x01, 0x01, gray6bit_controller1_r }, + { 0x02, 0x02, input_port_2_r }, { -1 } /* end of table */ }; -static struct IOReadPort boothill_readport[] = /* MJC 310198 */ +INPUT_PORTS_START( spcenctr ) + PORT_START /* IN0 */ + PORT_ANALOG( 0x3f, 0x1f, IPT_AD_STICK_X | IPF_REVERSE, 25, 10, 0, 0x3f) /* 6 bit horiz encoder - Gray's binary */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* fire */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + + PORT_START /* IN1 */ + PORT_ANALOG( 0x3f, 0x1f, IPT_AD_STICK_Y, 25, 10, 0, 0x3f) /* 6 bit vert encoder - Gray's binary */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START /* IN2 Dips & Coins */ + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, "2000 4000 8000" ) + PORT_DIPSETTING( 0x01, "3000 6000 12000" ) + PORT_DIPSETTING( 0x02, "4000 8000 16000" ) + PORT_DIPSETTING( 0x03, "5000 10000 20000" ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) + PORT_DIPNAME( 0x30, 0x00, "Bonus/Test Mode" ) + PORT_DIPSETTING( 0x00, "Bonus On" ) + PORT_DIPSETTING( 0x30, "Bonus Off" ) + PORT_DIPSETTING( 0x20, "Cross Hatch" ) + PORT_DIPSETTING( 0x10, "Test Mode" ) + PORT_DIPNAME( 0xc0, 0x00, "Time" ) + PORT_DIPSETTING( 0x00, "45" ) + PORT_DIPSETTING( 0x40, "60" ) + PORT_DIPSETTING( 0x80, "75" ) + PORT_DIPSETTING( 0xc0, "90" ) +INPUT_PORTS_END + +static struct MachineDriver machine_driver_spcenctr = +{ + /* basic machine hardware */ + { + { + CPU_8080, + 2000000, /* 2 Mhz? */ + readmem,writemem,spcenctr_readport,spcenctr_writeport, + invaders_interrupt,2 /* two interrupts per frame */ + } + }, + 60, DEFAULT_60HZ_VBLANK_DURATION, + 1, /* single CPU, no need for interleaving */ + 0, + + /* video hardware */ + 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, + 0, /* no gfxdecodeinfo - bitmapped display */ + 256, 0, /* leave extra colors for the overlay */ + init_palette, + + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, + 0, + invaders_vh_start, + invaders_vh_stop, + invaders_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + { + SOUND_SAMPLES, + &samples_interface + } + } +}; + + +/*******************************************************/ +/* */ +/* Midway "Boot Hill" */ +/* */ +/*******************************************************/ + +static struct IOReadPort boothill_readport[] = { { 0x00, 0x00, boothill_port_0_r }, { 0x01, 0x01, boothill_port_1_r }, @@ -1563,7 +1406,7 @@ static struct IOReadPort boothill_readport[] = { -1 } /* end of table */ }; -static struct IOWritePort boothill_writeport[] = /* MJC 310198 */ +static struct IOWritePort boothill_writeport[] = { { 0x01, 0x01, invaders_shift_amount_w }, { 0x02, 0x02, invaders_shift_data_w }, @@ -1572,8 +1415,7 @@ static struct IOWritePort boothill_writeport[] = { -1 } /* end of table */ }; - -INPUT_PORTS_START( boothill ) /* MJC 310198 */ +INPUT_PORTS_START( boothill ) /* Gun position uses bits 4-6, handled using fake paddles */ PORT_START /* IN0 - Player 2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) @@ -1600,7 +1442,7 @@ INPUT_PORTS_START( boothill ) /* MJC 31019 PORT_DIPSETTING( 0x04, "74" ) PORT_DIPSETTING( 0x08, "84" ) PORT_DIPSETTING( 0x0C, "94" ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Test */ + PORT_SERVICE( 0x10, IP_ACTIVE_HIGH ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) @@ -1612,14 +1454,14 @@ INPUT_PORTS_START( boothill ) /* MJC 31019 PORT_ANALOGX( 0xff, 0x00, IPT_PADDLE, 50, 10, 1, 255, KEYCODE_Z, KEYCODE_A, IP_JOY_NONE, IP_JOY_NONE ) INPUT_PORTS_END -static struct MachineDriver machine_driver_boothill = +static struct MachineDriver machine_driver_gmissile = { /* basic machine hardware */ { { CPU_8080, 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, boothill_readport, boothill_writeport, + readmem,writemem,boothill_readport,spcenctr_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -1630,10 +1472,10 @@ static struct MachineDriver machine_driver_boothill = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -1644,19 +1486,22 @@ static struct MachineDriver machine_driver_boothill = { { SOUND_SAMPLES, - &boothill_samples_interface + &samples_interface } } }; -static struct MachineDriver machine_driver_gmissile = + +/* same as gmissile with a different samples_interface */ + +static struct MachineDriver machine_driver_boothill = { /* basic machine hardware */ { { CPU_8080, 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, boothill_readport, boothill_writeport, + readmem,writemem,boothill_readport,boothill_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -1667,10 +1512,10 @@ static struct MachineDriver machine_driver_gmissile = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -1681,7 +1526,7 @@ static struct MachineDriver machine_driver_gmissile = { { SOUND_SAMPLES, - &samples_interface + &boothill_samples_interface } } }; @@ -1693,8 +1538,37 @@ static struct MachineDriver machine_driver_gmissile = /* */ /*******************************************************/ +static struct MemoryReadAddress schaser_readmem[] = +{ + { 0x0000, 0x1fff, MRA_ROM }, + { 0x2000, 0x3fff, MRA_RAM }, + { 0x4000, 0x5fff, MRA_ROM }, + { 0xc400, 0xdfff, MRA_RAM }, + { -1 } /* end of table */ +}; + +static struct MemoryWriteAddress schaser_writemem[] = +{ + { 0x0000, 0x1fff, MWA_ROM }, + { 0x2000, 0x23ff, MWA_RAM }, + { 0x2400, 0x3fff, invaders_videoram_w, &videoram, &videoram_size }, + { 0x4000, 0x5fff, MWA_ROM }, + { 0xc400, 0xdfff, schaser_colorram_w, &colorram }, + { -1 } /* end of table */ +}; + INPUT_PORTS_START( schaser ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) @@ -1703,6 +1577,7 @@ INPUT_PORTS_START( schaser ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_START /* IN1 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -1728,89 +1603,32 @@ INPUT_PORTS_START( schaser ) INPUT_PORTS_END -/*******************************************************/ -/* */ -/* Midway "Space Encounters" */ -/* */ -/* To Do : 'trench' video overlay */ -/* */ -/*******************************************************/ - -static struct IOWritePort spcenctr_writeport[] = +static struct MachineDriver machine_driver_schaser = { - { 0x01, 0x01, invaders_shift_amount_w }, - { 0x02, 0x02, invaders_shift_data_w }, - { -1 } /* end of table */ -}; - -static struct IOReadPort spcenctr_readport[] = -{ - { 0x00, 0x00, gray6bit_controller0_r }, /* These 2 ports use Gray's binary encoding */ - { 0x01, 0x01, gray6bit_controller1_r }, - { 0x02, 0x02, input_port_2_r }, - { -1 } /* end of table */ -}; - -INPUT_PORTS_START( spcenctr ) - PORT_START /* IN0 */ - PORT_ANALOG( 0x3f, 0x1f, IPT_AD_STICK_X, 25, 10, 0x01, 0x3e) /* 6 bit horiz encoder - Gray's binary? */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* fire */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) - - PORT_START /* IN1 */ - PORT_ANALOG( 0x3f, 0x1f, IPT_AD_STICK_Y, 25, 10, 0x01, 0x3e) /* 6 bit vert encoder - Gray's binary? */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - - PORT_START /* IN2 Dips & Coins */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "2000 4000 8000" ) - PORT_DIPSETTING( 0x01, "3000 6000 12000" ) - PORT_DIPSETTING( 0x02, "4000 8000 16000" ) - PORT_DIPSETTING( 0x03, "5000 10000 20000" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x30, 0x00, "Bonus/Test Mode" ) - PORT_DIPSETTING( 0x00, "Bonus On" ) - PORT_DIPSETTING( 0x30, "Bonus Off" ) - PORT_DIPSETTING( 0x20, "Cross Hatch" ) - PORT_DIPSETTING( 0x10, "Ram/Rom Test" ) - PORT_DIPNAME( 0xc0, 0x00, "Play Time" ) - PORT_DIPSETTING( 0x00, "45 Sec" ) - PORT_DIPSETTING( 0x40, "60 Sec" ) - PORT_DIPSETTING( 0x80, "75 Sec" ) - PORT_DIPSETTING( 0xc0, "90 Sec" ) -INPUT_PORTS_END - -static struct MachineDriver machine_driver_spcenctr = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, spcenctr_readport, spcenctr_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, - 1, /* single CPU, no need for interleaving */ - 0, + /* basic machine hardware */ + { + { + CPU_8080, + 2000000, /* 2 Mhz? */ + schaser_readmem,schaser_writemem,readport,writeport, + invaders_interrupt,2 /* two interrupts per frame */ + } + }, + 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, /* single CPU, no need for interleaving */ + 0, /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, + 8, 0, + invadpt2_vh_convert_color_prom, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, - invaders_vh_screenrefresh, + invaders_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, @@ -1867,9 +1685,7 @@ INPUT_PORTS_START( clowns ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x40, "4" ) - PORT_DIPNAME( 0x80, 0x00, "Test Mode" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) INPUT_PORTS_END static struct MachineDriver machine_driver_clowns = @@ -1879,7 +1695,7 @@ static struct MachineDriver machine_driver_clowns = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, invdpt2m_readport, spcenctr_writeport, + readmem,writemem,readport,spcenctr_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -1890,10 +1706,10 @@ static struct MachineDriver machine_driver_clowns = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -1954,9 +1770,7 @@ INPUT_PORTS_START( gmissile ) PORT_DIPSETTING( 0x10, "1000" ) PORT_DIPSETTING( 0x30, "None" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x80, 0x80, "Test Mode" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) INPUT_PORTS_END /*******************************************************/ @@ -1967,7 +1781,7 @@ INPUT_PORTS_END static struct IOReadPort seawolf_readport[] = { - { 0x00, 0x00, seawolf_shift_data_r }, + { 0x00, 0x00, invaders_shift_data_rev_r }, { 0x01, 0x01, seawolf_port_0_r }, { 0x02, 0x02, input_port_1_r }, { 0x03, 0x03, invaders_shift_data_r }, @@ -1983,13 +1797,8 @@ static struct IOWritePort seawolf_writeport[] = INPUT_PORTS_START( seawolf ) PORT_START /* IN0 */ - PORT_ANALOG( 0x1f, 0x01, IPT_PADDLE, 100, 10, 0x01, 0xfe) -// PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // x movement -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // x movement -// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // x movement -// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // x movement -// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // x movement - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_ANALOG( 0x1f, 0x01, IPT_PADDLE, 20, 5, 0, 0x1f) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_DIPNAME( 0xc0, 0xc0, "Time" ) PORT_DIPSETTING( 0x00, "61" ) PORT_DIPSETTING( 0x40, "71" ) @@ -2005,15 +1814,15 @@ INPUT_PORTS_START( seawolf ) PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_TILT ) // Reset High Scores - PORT_DIPNAME( 0xe0, 0x00, "Extended Play" ) + PORT_DIPNAME( 0xe0, 0x20, "Extended Play" ) + PORT_DIPSETTING( 0x00, "None" ) PORT_DIPSETTING( 0x20, "2000" ) PORT_DIPSETTING( 0x40, "3000" ) PORT_DIPSETTING( 0x60, "4000" ) PORT_DIPSETTING( 0x80, "5000" ) PORT_DIPSETTING( 0xa0, "6000" ) PORT_DIPSETTING( 0xc0, "7000" ) - PORT_DIPSETTING( 0xe0, "8000" ) - PORT_DIPSETTING( 0x00, "None" ) + PORT_DIPSETTING( 0xe0, "Test Mode" ) INPUT_PORTS_END static struct MachineDriver machine_driver_seawolf = @@ -2023,7 +1832,7 @@ static struct MachineDriver machine_driver_seawolf = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,seawolf_readport,seawolf_writeport, + readmem,writemem,seawolf_readport,seawolf_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -2034,14 +1843,14 @@ static struct MachineDriver machine_driver_seawolf = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, - seawolf_vh_screenrefresh, + invaders_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, @@ -2138,7 +1947,7 @@ static struct MachineDriver machine_driver_gunfight = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,boothill_readport,gunfight_writeport, + readmem,writemem,boothill_readport,gunfight_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -2149,10 +1958,10 @@ static struct MachineDriver machine_driver_gunfight = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -2168,23 +1977,14 @@ static struct MachineDriver machine_driver_gunfight = } }; + /*******************************************************/ /* */ /* Midway "280 ZZZAP" */ /* */ /*******************************************************/ -static struct IOWritePort zzzap_writeport[] = -{ - /*{ 0x02, 0x02, zzzap_snd2_w}, */ - /*{ 0x05, 0x05, zzzap_snd5_w}, */ - { 0x03, 0x03, invaders_shift_data_w }, - { 0x04, 0x04, invaders_shift_amount_w }, - /*{ 0x07, 0x07, zzzap_wdog }, */ - { -1 } /* end of table */ -}; - -INPUT_PORTS_START( zzzap ) +INPUT_PORTS_START( 280zzzap ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* 4 bit accel */ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -2204,11 +2004,11 @@ INPUT_PORTS_START( zzzap ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x0c, 0x00, "Play Time" ) - PORT_DIPSETTING( 0x0c, "60 Sec" ) - PORT_DIPSETTING( 0x00, "80 Sec" ) - PORT_DIPSETTING( 0x08, "99 Sec" ) - PORT_DIPSETTING( 0x04, "Test" ) + PORT_DIPNAME( 0x0c, 0x00, "Time" ) + PORT_DIPSETTING( 0x0c, "60" ) + PORT_DIPSETTING( 0x00, "80" ) + PORT_DIPSETTING( 0x08, "99" ) + PORT_DIPSETTING( 0x04, "Test Mode" ) PORT_DIPNAME( 0x30, 0x00, "Extended Time" ) PORT_DIPSETTING( 0x00, "Score >= 2.5" ) PORT_DIPSETTING( 0x10, "Score >= 2" ) @@ -2221,15 +2021,15 @@ INPUT_PORTS_START( zzzap ) PORT_DIPSETTING( 0xc0, "Spanish" ) INPUT_PORTS_END -static struct MachineDriver machine_driver_zzzap = +static struct MachineDriver machine_driver_280zzzap = { /* basic machine hardware */ { { CPU_8080, 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,invdpt2m_readport,zzzap_writeport, - invaders_interrupt, 2 /* two interrupts per frame */ + readmem,writemem,readport,seawolf_writeport, + invaders_interrupt,2 /* two interrupts per frame */ } }, 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -2239,10 +2039,10 @@ static struct MachineDriver machine_driver_zzzap = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -2259,15 +2059,6 @@ static struct MachineDriver machine_driver_zzzap = /* */ /*******************************************************/ -static struct MemoryWriteAddress lupin3_writemem[] = -{ - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, lrescue_videoram_w, &invaders_videoram }, - { 0x0000, 0x1fff, MWA_ROM }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( lupin3 ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -2278,6 +2069,7 @@ INPUT_PORTS_START( lupin3 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN | IPF_4WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT | IPF_4WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP | IPF_4WAY ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -2287,6 +2079,7 @@ INPUT_PORTS_START( lupin3 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN | IPF_4WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT | IPF_4WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP | IPF_4WAY ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -2310,43 +2103,6 @@ INPUT_PORTS_START( lupin3 ) INPUT_PORTS_END -static struct MachineDriver machine_driver_lupin3 = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem,lupin3_writemem,invdpt2m_readport,writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - /*******************************************************/ /* */ /* Nintendo "Heli Fire" */ @@ -2404,7 +2160,6 @@ INPUT_PORTS_START( helifire ) INPUT_PORTS_END - /*******************************************************/ /* */ /* Nintendo "Space Fever (Color)" */ @@ -2412,7 +2167,6 @@ INPUT_PORTS_END /*******************************************************/ INPUT_PORTS_START( spacefev ) - PORT_START /* 00 Main Controls */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) @@ -2439,46 +2193,18 @@ INPUT_PORTS_START( spacefev ) PORT_DIPSETTING( 0x01, "4" ) PORT_DIPSETTING( 0x02, "5" ) PORT_DIPSETTING( 0x03, "6" ) -// PORT_DIPNAME( 0xfc, 0x00, "Unknown" ) +// PORT_DIPNAME( 0xfc, 0x00, DEF_STR( Unknown ) ) // PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // PORT_DIPSETTING( 0xfc, DEF_STR( Off ) ) INPUT_PORTS_END - /*******************************************************/ /* */ /* Taito "Polaris" */ /* */ /*******************************************************/ -static struct MemoryReadAddress polaris_readmem[] = -{ - { 0x0000, 0x1fff, MRA_ROM }, - { 0x2000, 0x3fff, MRA_RAM }, - { 0x4000, 0x4fff, MRA_ROM }, - { -1 } /* end of table */ -}; - -static struct MemoryWriteAddress polaris_writemem[] = -{ - { 0x0000, 0x1fff, MWA_ROM }, - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, boothill_videoram_w, &invaders_videoram }, - { 0x4000, 0x4fff, MWA_ROM }, - { -1 } /* end of table */ -}; - - -static struct IOReadPort polaris_readport[] = -{ - { 0x00, 0x00, input_port_0_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_2_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - static struct IOWritePort polaris_writeport[] = { { 0x01, 0x01, invaders_shift_amount_w }, @@ -2507,7 +2233,6 @@ INPUT_PORTS_START( polaris ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -2534,7 +2259,7 @@ static struct MachineDriver machine_driver_polaris = { CPU_8080, 2000000, /* 2 Mhz? */ - polaris_readmem,polaris_writemem,polaris_readport,polaris_writeport, + readmem,writemem,readport,polaris_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -2545,10 +2270,10 @@ static struct MachineDriver machine_driver_polaris = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, + 8, 0, + invadpt2_vh_convert_color_prom, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -2559,8 +2284,6 @@ static struct MachineDriver machine_driver_polaris = }; - - /*******************************************************/ /* */ /* Midway "Laguna Racer" */ @@ -2587,11 +2310,11 @@ INPUT_PORTS_START( lagunar ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Play Time" ) - PORT_DIPSETTING( 0x00, "45 Sec" ) - PORT_DIPSETTING( 0x04, "60 Sec" ) - PORT_DIPSETTING( 0x08, "75 Sec" ) - PORT_DIPSETTING( 0x0c, "90 Sec" ) + PORT_DIPNAME( 0x0c, 0x0c, "Time" ) + PORT_DIPSETTING( 0x00, "45" ) + PORT_DIPSETTING( 0x04, "60" ) + PORT_DIPSETTING( 0x08, "75" ) + PORT_DIPSETTING( 0x0c, "90" ) PORT_DIPNAME( 0x30, 0x00, "Extended Time" ) PORT_DIPSETTING( 0x00, "350" ) PORT_DIPSETTING( 0x10, "400" ) @@ -2605,14 +2328,13 @@ INPUT_PORTS_START( lagunar ) INPUT_PORTS_END - /*******************************************************/ /* */ /* Midway "M-4" */ /* */ /*******************************************************/ -static struct IOReadPort m4_readport[] = /* MJC 310198 */ +static struct IOReadPort m4_readport[] = { { 0x00, 0x00, input_port_0_r }, { 0x01, 0x01, input_port_1_r }, @@ -2653,7 +2375,7 @@ INPUT_PORTS_START( m4 ) PORT_DIPSETTING( 0x04, "70" ) PORT_DIPSETTING( 0x08, "80" ) PORT_DIPSETTING( 0x0C, "90" ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2666,7 +2388,7 @@ static struct MachineDriver machine_driver_m4 = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, m4_readport, boothill_writeport, + readmem,writemem,m4_readport,spcenctr_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -2677,10 +2399,10 @@ static struct MachineDriver machine_driver_m4 = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -2696,6 +2418,7 @@ static struct MachineDriver machine_driver_m4 = } }; + /*******************************************************/ /* */ /* Midway "Phantom II" */ @@ -2705,17 +2428,7 @@ static struct MachineDriver machine_driver_m4 = /* */ /*******************************************************/ -static struct IOReadPort phantom2_readport[] = /* MJC 310198 */ -{ - { 0x00, 0x00, input_port_0_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_2_r }, - { 0x03, 0x03, boothill_shift_data_r }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( phantom2 ) - PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -2729,7 +2442,7 @@ INPUT_PORTS_START( phantom2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Fire */ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_START /* IN2 Dips & Coins */ @@ -2741,48 +2454,10 @@ INPUT_PORTS_START( phantom2 ) PORT_DIPSETTING( 0x02, "60sec 25sec 25" ) PORT_DIPSETTING( 0x04, "75sec 30sec 30" ) PORT_DIPSETTING( 0x06, "90sec 35sec 35" ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) /* Test */ + PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) INPUT_PORTS_END -static struct MachineDriver machine_driver_phantom2 = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, boothill_writemem, phantom2_readport, boothill_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - - /*******************************************************/ /* */ @@ -2790,27 +2465,6 @@ static struct MachineDriver machine_driver_phantom2 = /* */ /*******************************************************/ - -static struct IOReadPort dogpatch_readport[] = -{ - { 0x00, 0x00, input_port_0_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_2_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - -static struct IOWritePort dogpatch_writeport[] = -{ - { 0x01, 0x01, invaders_shift_amount_w }, - { 0x02, 0x02, invaders_shift_data_w }, - { 0x03, 0x03, invaders_dummy_write }, - { 0x04, 0x04, invaders_dummy_write }, - { 0x05, 0x05, invaders_dummy_write }, - { 0x06, 0x06, invaders_dummy_write }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( dogpatch ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -2840,9 +2494,7 @@ INPUT_PORTS_START( dogpatch ) PORT_DIPNAME( 0x10, 0x00, "Extended Play" ) PORT_DIPSETTING( 0x10, "3 extra cans" ) PORT_DIPSETTING( 0x00, "5 extra cans" ) - PORT_DIPNAME( 0x20, 0x20, "Test Mode" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPNAME( 0xc0, 0x00, "Extended Play" ) PORT_DIPSETTING( 0xc0, "150 Pts" ) PORT_DIPSETTING( 0x80, "175 Pts" ) @@ -2850,42 +2502,6 @@ INPUT_PORTS_START( dogpatch ) PORT_DIPSETTING( 0x00, "275 Pts" ) INPUT_PORTS_END -static struct MachineDriver machine_driver_dogpatch = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,dogpatch_readport,dogpatch_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; /*******************************************************/ /* */ @@ -2893,32 +2509,23 @@ static struct MachineDriver machine_driver_dogpatch = /* */ /*******************************************************/ - -static struct IOReadPort midwbowl_readport[] = +static struct IOReadPort bowler_readport[] = { - { 0x01, 0x01, midbowl_shift_data_r }, + { 0x01, 0x01, invaders_shift_data_comp_r }, { 0x02, 0x02, input_port_0_r }, /* dip switch */ - { 0x03, 0x03, midbowl_shift_data_rev_r }, { 0x04, 0x04, input_port_1_r }, /* coins / switches */ { 0x05, 0x05, input_port_2_r }, /* ball vert */ { 0x06, 0x06, input_port_3_r }, /* ball horz */ { -1 } /* end of table */ }; -static struct IOWritePort midwbowl_writeport[] = -{ - { 0x01, 0x01, invaders_shift_amount_w }, - { 0x02, 0x02, invaders_shift_data_w }, - { -1 } /* end of table */ -}; - -INPUT_PORTS_START( midwbowl ) +INPUT_PORTS_START( bowler ) PORT_START /* IN2 */ PORT_DIPNAME( 0x03, 0x00, "Language" ) PORT_DIPSETTING( 0x00, "English" ) PORT_DIPSETTING( 0x01, "French" ) PORT_DIPSETTING( 0x02, "German" ) -/* 0x03 same as 0x02 */ + /*PORT_DIPSETTING( 0x03, "German" )*/ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) @@ -2926,9 +2533,7 @@ INPUT_PORTS_START( midwbowl ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* effects button 1 */ - PORT_DIPNAME( 0x80, 0x00, "Test Mode" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_START /* IN4 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -2947,15 +2552,15 @@ INPUT_PORTS_START( midwbowl ) PORT_ANALOG( 0xff, 0, IPT_TRACKBALL_X, 10, 10, 0, 0) INPUT_PORTS_END -static struct MachineDriver machine_driver_midwbowl = +static struct MachineDriver machine_driver_bowler = { /* basic machine hardware */ { { CPU_8080, 2000000, /* 2 Mhz */ - readmem, boothill_writemem, midwbowl_readport, midwbowl_writeport, - invaders_interrupt, 2 /* two interrupts per frame */ + readmem,writemem,bowler_readport,spcenctr_writeport, + invaders_interrupt,2 /* two interrupts per frame */ } }, 60, DEFAULT_60HZ_VBLANK_DURATION, @@ -2965,10 +2570,10 @@ static struct MachineDriver machine_driver_midwbowl = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -2979,36 +2584,112 @@ static struct MachineDriver machine_driver_midwbowl = }; - /*******************************************************/ /* */ -/* Midway "Blue Shark" */ +/* Midway "Shuffleboard" */ /* */ /*******************************************************/ -static struct IOReadPort blueshrk_readport[] = -{ - { 0x00, 0x00, blueshrk_shift_data_rev_r }, - { 0x01, 0x01, input_port_1_r }, - { 0x02, 0x02, input_port_0_r }, - { 0x03, 0x03, blueshrk_shift_data_r }, - { -1 } /* end of table */ -}; - -static struct IOWritePort blueshrk_writeport[] = +static struct IOReadPort shuffle_readport[] = { - { 0x01, 0x01, invaders_shift_amount_w }, - { 0x02, 0x02, invaders_shift_data_w }, - { 0x03, 0x03, invaders_dummy_write }, - { 0x04, 0x04, invaders_dummy_write }, + { 0x01, 0x01, invaders_shift_data_r }, + { 0x02, 0x02, input_port_0_r }, /* dip switch */ + { 0x04, 0x04, input_port_1_r }, /* coins / switches */ + { 0x05, 0x05, input_port_2_r }, /* ball vert */ + { 0x06, 0x06, input_port_3_r }, /* ball horz */ { -1 } /* end of table */ }; -INPUT_PORTS_START( blueshrk ) - - PORT_START /* IN2 Dips & Coins */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) +INPUT_PORTS_START( shuffle ) + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x03, 0x00, "Language" ) + PORT_DIPSETTING( 0x00, "English" ) + PORT_DIPSETTING( 0x01, "French" ) + PORT_DIPSETTING( 0x02, "German" ) + /*PORT_DIPSETTING( 0x03, "German" )*/ + PORT_DIPNAME( 0x0c, 0x04, "Points to Win" ) + PORT_DIPSETTING( 0x00, "25" ) + PORT_DIPSETTING( 0x04, "35" ) + PORT_DIPSETTING( 0x08, "40" ) + PORT_DIPSETTING( 0x0c, "50" ) + PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x30, "2 Coins/1 Player 4 Coins/2 Players" ) + PORT_DIPSETTING( 0x20, "2 Coins/1 or 2 Players" ) + PORT_DIPSETTING( 0x10, "1 Coin/1 Player 2 Coins/2 Players" ) + PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Players" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) /* time limit? */ + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_BUTTON1, "Game Select", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START /* IN2 */ + PORT_ANALOG( 0xff, 0, IPT_TRACKBALL_Y, 10, 10, 0, 0) + + PORT_START /* IN3 */ + PORT_ANALOG( 0xff, 0, IPT_TRACKBALL_X | IPF_REVERSE, 10, 10, 0, 0) +INPUT_PORTS_END + +static struct MachineDriver machine_driver_shuffle = +{ + /* basic machine hardware */ + { + { + CPU_8080, + 2000000, /* 2 Mhz */ + readmem,writemem,shuffle_readport,spcenctr_writeport, + invaders_interrupt,2 /* two interrupts per frame */ + } + }, + 60, DEFAULT_60HZ_VBLANK_DURATION, + 1, /* single CPU, no need for interleaving */ + 0, + + /* video hardware */ + 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, + 0, /* no gfxdecodeinfo - bitmapped display */ + 256, 0, /* leave extra colors for the overlay */ + init_palette, + + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, + 0, + invaders_vh_start, + invaders_vh_stop, + invaders_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, +}; + + +/*******************************************************/ +/* */ +/* Midway "Blue Shark" */ +/* */ +/*******************************************************/ + +static struct IOReadPort blueshrk_readport[] = +{ + { 0x00, 0x00, invaders_shift_data_rev_r }, + { 0x01, 0x01, input_port_1_r }, + { 0x02, 0x02, input_port_0_r }, + { 0x03, 0x03, invaders_shift_data_r }, + { -1 } /* end of table */ +}; + +INPUT_PORTS_START( blueshrk ) + PORT_START /* IN2 Dips & Coins */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3017,9 +2698,7 @@ INPUT_PORTS_START( blueshrk ) PORT_DIPSETTING( 0x40, "18000" ) PORT_DIPSETTING( 0x60, "22000" ) PORT_DIPSETTING( 0x00, "None" ) - PORT_DIPNAME( 0x80, 0x80, "Test Mode" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_START /* IN1 */ PORT_ANALOG( 0x7f, 0x45, IPT_PADDLE, 100, 10, 0xf, 0x7f) @@ -3032,8 +2711,8 @@ static struct MachineDriver machine_driver_blueshrk = { CPU_8080, 2000000, - readmem, boothill_writemem, blueshrk_readport, blueshrk_writeport, - invaders_interrupt, 2 /* two interrupts per frame */ + readmem,writemem,blueshrk_readport,spcenctr_writeport, + invaders_interrupt,2 /* two interrupts per frame */ } }, 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -3043,20 +2722,101 @@ static struct MachineDriver machine_driver_blueshrk = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, - blueshrk_vh_screenrefresh, + invaders_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, }; +/*******************************************************/ +/* */ +/* Midway "Desert Gun" */ +/* */ +/*******************************************************/ + +static struct IOReadPort desertgu_readport[] = +{ + { 0x00, 0x00, invaders_shift_data_rev_r }, + { 0x01, 0x01, desertgu_port_1_r }, + { 0x02, 0x02, input_port_0_r }, + { 0x03, 0x03, invaders_shift_data_r }, + { -1 } /* end of table */ +}; + +static struct IOWritePort desertgu_writeport[] = +{ + { 0x01, 0x01, invaders_shift_amount_w }, + { 0x02, 0x02, invaders_shift_data_w }, + { 0x07, 0x07, desertgu_controller_select_w }, + { -1 } /* end of table */ +}; + +INPUT_PORTS_START( desertgu ) + PORT_START + PORT_DIPNAME( 0x03, 0x00, "Time" ) + PORT_DIPSETTING( 0x00, "40" ) + PORT_DIPSETTING( 0x01, "50" ) + PORT_DIPSETTING( 0x02, "60" ) + PORT_DIPSETTING( 0x03, "70" ) + PORT_DIPNAME( 0x0c, 0x00, "Language" ) + PORT_DIPSETTING( 0x00, "English" ) + PORT_DIPSETTING( 0x04, "German" ) + PORT_DIPSETTING( 0x08, "French" ) + PORT_DIPSETTING( 0x0c, "Scandinavian" ) + PORT_DIPNAME( 0x30, 0x00, "Extended Play" ) + PORT_DIPSETTING( 0x00, "5000" ) + PORT_DIPSETTING( 0x10, "7000" ) + PORT_DIPSETTING( 0x20, "9000" ) + PORT_DIPSETTING( 0x30, "Test Mode" ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START /* IN1 */ + PORT_ANALOG( 0x7f, 0x45, IPT_AD_STICK_X, 70, 10, 0xf, 0x7f) + + PORT_START /* IN2 */ + PORT_ANALOG( 0x7f, 0x45, IPT_AD_STICK_Y, 70, 10, 0xf, 0x7f) +INPUT_PORTS_END + + +static struct MachineDriver machine_driver_desertgu = +{ + /* basic machine hardware */ + { + { + CPU_8080, + 2000000, + readmem,writemem,desertgu_readport,desertgu_writeport, + invaders_interrupt,2 /* two interrupts per frame */ + } + }, + 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, /* single CPU, no need for interleaving */ + 0, + + /* video hardware */ + 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, + 0, /* no gfxdecodeinfo - bitmapped display */ + 256, 0, /* leave extra colors for the overlay */ + init_palette, + + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, + 0, + invaders_vh_start, + invaders_vh_stop, + invaders_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, +}; /*******************************************************/ @@ -3102,9 +2862,7 @@ INPUT_PORTS_START( einnings ) /* 0x06 and 0x07 same as 0x00 */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x40, 0x40, "Test Mode") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) INPUT_PORTS_END @@ -3125,6 +2883,7 @@ INPUT_PORTS_START( maze ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_PLAYER2 ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -3133,64 +2892,35 @@ INPUT_PORTS_START( maze ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, "Unknown" ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) + + PORT_START /* DSW0 - Never read (?) */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, "Unknown" ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, "Unknown" ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, "Unknown" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END -static struct MachineDriver machine_driver_maze = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,invdpt2m_readport,writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0 -}; /*******************************************************/ /* */ @@ -3208,6 +2938,7 @@ INPUT_PORTS_START( tornbase ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_PLAYER1 ) @@ -3217,6 +2948,7 @@ INPUT_PORTS_START( tornbase ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN) + PORT_START /* DSW0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3238,41 +2970,9 @@ INPUT_PORTS_START( tornbase ) PORT_DIPSETTING( 0x70, "3 Coins/9 Innings" ) PORT_DIPSETTING( 0x68, "2 Coins/9 Innings" ) PORT_DIPSETTING( 0x60, "1 Coin/9 Innings" ) - PORT_DIPNAME( 0x80, 0x00, "Test Mode" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) INPUT_PORTS_END -static struct MachineDriver machine_driver_tornbase = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,invdpt2m_readport,writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0 -}; /*******************************************************/ /* */ @@ -3319,7 +3019,7 @@ INPUT_PORTS_START( checkmat ) PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Playera" ) PORT_DIPSETTING( 0x01, "1 Coin/1 to 4 Players" ) - PORT_DIPNAME( 0x02, 0x00, "Unknown" ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x0c, 0x00, "Rounds" ) @@ -3327,7 +3027,7 @@ INPUT_PORTS_START( checkmat ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x08, "4" ) PORT_DIPSETTING( 0x0c, "5" ) - PORT_DIPNAME( 0x10, 0x00, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x60, 0x00, "Language?" ) @@ -3335,9 +3035,7 @@ INPUT_PORTS_START( checkmat ) PORT_DIPSETTING( 0x20, "German?" ) PORT_DIPSETTING( 0x40, "French?" ) PORT_DIPSETTING( 0x60, "Spanish?" ) - PORT_DIPNAME( 0x80, 0x00, "Test Mode") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_START /* IN3 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) @@ -3348,7 +3046,6 @@ INPUT_PORTS_START( checkmat ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - INPUT_PORTS_END static struct MachineDriver machine_driver_checkmat = @@ -3358,7 +3055,7 @@ static struct MachineDriver machine_driver_checkmat = { CPU_8080, 2000000, /* 2 Mhz? */ - readmem,boothill_writemem,checkmat_readport,checkmat_writeport, + readmem,writemem,checkmat_readport,checkmat_writeport, invaders_interrupt,2 /* two interrupts per frame */ } }, @@ -3369,10 +3066,10 @@ static struct MachineDriver machine_driver_checkmat = /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, + 256, 0, /* leave extra colors for the overlay */ init_palette, - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, invaders_vh_start, invaders_vh_stop, @@ -3388,6 +3085,7 @@ static struct MachineDriver machine_driver_checkmat = } }; + /*******************************************************/ /* */ /* Taito "Ozma Wars" */ @@ -3402,8 +3100,9 @@ INPUT_PORTS_START( ozmawars ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -3413,6 +3112,7 @@ INPUT_PORTS_START( ozmawars ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, "Energy" ) PORT_DIPSETTING( 0x00, "15000" ) @@ -3429,15 +3129,7 @@ INPUT_PORTS_START( ozmawars ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -3452,8 +3144,9 @@ INPUT_PORTS_START( solfight ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -3463,6 +3156,7 @@ INPUT_PORTS_START( solfight ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, "Energy" ) PORT_DIPSETTING( 0x00, "15000" ) @@ -3479,7 +3173,15 @@ INPUT_PORTS_START( solfight ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_START /* BSR */ + + PORT_START /* Dummy port for cocktail mode */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) +INPUT_PORTS_END + +INPUT_PORTS_START( spaceph ) + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -3488,14 +3190,8 @@ INPUT_PORTS_START( solfight ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* Dummy port for cocktail mode */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) -INPUT_PORTS_END -INPUT_PORTS_START( spaceph ) - PORT_START /* IN0 */ + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -3504,6 +3200,7 @@ INPUT_PORTS_START( spaceph ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_DIPNAME( 0x03, 0x00, "Fuel" ) PORT_DIPSETTING( 0x03, "35000" ) @@ -3533,6 +3230,16 @@ INPUT_PORTS_END INPUT_PORTS_START( sinvemag ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -3541,6 +3248,7 @@ INPUT_PORTS_START( sinvemag ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -3557,15 +3265,7 @@ INPUT_PORTS_START( sinvemag ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -3582,32 +3282,6 @@ INPUT_PORTS_END INPUT_PORTS_START( alieninv ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPNAME( 0x02, 0x02, "Pence Coinage" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) /* Pence Coin */ - PORT_DIPNAME( 0x08, 0x08, "Unknown" ) /* Not bonus */ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, "2Cs/1C 50p/3Cs (+1 life)" ) - PORT_DIPSETTING( 0x80, "1C/1C 50p/5Cs" ) - PORT_START /* BSR */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -3616,160 +3290,61 @@ INPUT_PORTS_START( alieninv ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* Dummy port for cocktail mode */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) -INPUT_PORTS_END - - -/*******************************************************/ -/* */ -/* Space Invaders TV Version (Taito) */ -/* */ -/*LT 24-12-1998 */ -/*******************************************************/ - - -static struct IOReadPort sitv_readport[] = -{ - { 0x00, 0x00, input_port_4_r }, - { 0x01, 0x01, input_port_0_r }, - { 0x02, 0x02, input_port_1_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - - -static struct IOWritePort sitv_writeport[] = -{ - { 0x02, 0x02, invaders_shift_amount_w }, - { 0x03, 0x03, invaders_sh_port3_w }, - { 0x04, 0x04, invaders_shift_data_w }, - { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, - { -1 } /* end of table */ -}; - - -INPUT_PORTS_START( sitv ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x08, "1000" ) - PORT_DIPSETTING( 0x00, "1500" ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* Dummy port for cocktail mode */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - - PORT_START /* TEST MODE */ - PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -INPUT_PORTS_END - - -static struct MachineDriver machine_driver_sitv = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem,writemem,sitv_readport,sitv_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPNAME( 0x02, 0x02, "Pence Coinage" ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) /* Pence Coin */ + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* Not bonus */ + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x00, "2Cs/1C 50p/3Cs (+1 life)" ) + PORT_DIPSETTING( 0x80, "1C/1C 50p/5Cs" ) - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; + PORT_START /* Dummy port for cocktail mode */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) +INPUT_PORTS_END /*******************************************************/ /* */ -/* Space Invaders Colour (Taito) */ -/* LT 24-12-1998 */ +/* Space Invaders TV Version (Taito) */ +/* */ +/*LT 24-12-1998 */ /*******************************************************/ +INPUT_PORTS_START( sitv ) + PORT_START /* TEST MODE */ + PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) -static struct IOReadPort sicv_readport[] = -{ - { 0x01, 0x01, input_port_0_r }, - { 0x02, 0x02, input_port_1_r }, - { 0x03, 0x03, invaders_shift_data_r }, - { -1 } /* end of table */ -}; - - -static struct IOWritePort sicv_writeport[] = -{ - { 0x02, 0x02, invaders_shift_amount_w }, - { 0x03, 0x03, invadpt2_sh_port3_w }, - { 0x04, 0x04, invaders_shift_data_w }, - { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, - { -1 } /* end of table */ -}; - - -INPUT_PORTS_START( sicv ) - PORT_START /* IN0 */ + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -3778,29 +3353,24 @@ INPUT_PORTS_START( sicv ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) PORT_DIPSETTING( 0x02, "5" ) PORT_DIPSETTING( 0x03, "6" ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Tilt */ + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPSETTING( 0x08, "1000" ) PORT_DIPSETTING( 0x00, "1500" ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -3808,54 +3378,6 @@ INPUT_PORTS_START( sicv ) INPUT_PORTS_END - - -static struct MachineDriver machine_driver_sicv = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, invadpt2_writemem, sicv_readport, sicv_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - sizeof(palette) / sizeof(palette[0]) / 3, 0, - init_palette, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0, - { - { - SOUND_SAMPLES, - &samples_interface - } - } -}; - - - -/*******************************************************/ -/* */ -/* Space Invaders SV VERSION (Taito) */ -/* LT 24-12-1998 */ -/*******************************************************/ - - /*******************************************************/ /* */ /* Jatre Specter (Taito?) */ @@ -3864,6 +3386,16 @@ static struct MachineDriver machine_driver_sicv = INPUT_PORTS_START( jspecter ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -3876,7 +3408,8 @@ INPUT_PORTS_START( jspecter ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x80, "Easy" ) PORT_DIPSETTING( 0x00, "Hard" ) - PORT_START /* DSW0 */ + + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -3892,53 +3425,21 @@ INPUT_PORTS_START( jspecter ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END + /*******************************************************/ /* */ /* Taito "Balloon Bomber" */ /* */ /*******************************************************/ -void ballbomb_videoram_w(int offset, int data); -void ballbomb_sh_port3_w(int offset, int data); -void ballbomb_vh_convert_color_prom(unsigned char *pallete, unsigned short *colortable,const unsigned char *color_prom); - - -static struct MemoryWriteAddress ballbomb_writemem[] = -{ - { 0x2000, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, ballbomb_videoram_w, &invaders_videoram }, - { 0x0000, 0x1fff, MWA_ROM }, - { 0x4000, 0x57ff, MWA_ROM }, - { -1 } /* end of table */ -}; - -static struct IOWritePort ballbomb_writeport[] = -{ - { 0x02, 0x02, invaders_shift_amount_w }, - { 0x03, 0x03, ballbomb_sh_port3_w }, - { 0x04, 0x04, invaders_shift_data_w }, - { 0x05, 0x05, invaders_sh_port5_w }, - { 0x06, 0x06, invaders_dummy_write }, - { -1 } /* end of table */ -}; - INPUT_PORTS_START( ballbomb ) - PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -3946,7 +3447,7 @@ INPUT_PORTS_START( ballbomb ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START /* IN1 */ @@ -3974,37 +3475,6 @@ INPUT_PORTS_START( ballbomb ) INPUT_PORTS_END -static struct MachineDriver machine_driver_ballbomb = -{ - /* basic machine hardware */ - { - { - CPU_8080, - 2000000, /* 2 Mhz? */ - readmem, ballbomb_writemem, invadpt2_readport, ballbomb_writeport, - invaders_interrupt,2 /* two interrupts per frame */ - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* single CPU, no need for interleaving */ - 0, - - /* video hardware */ - 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, - 0, /* no gfxdecodeinfo - bitmapped display */ - 8, 0, - ballbomb_vh_convert_color_prom, - - VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE, - 0, - invaders_vh_start, - invaders_vh_stop, - invaders_vh_screenrefresh, - - /* sound hardware */ - 0, 0, 0, 0 -}; - /*******************************************************/ /* */ @@ -4016,6 +3486,16 @@ static struct MachineDriver machine_driver_ballbomb = INPUT_PORTS_START( spacewr3 ) PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -4024,6 +3504,7 @@ INPUT_PORTS_START( spacewr3 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -4039,15 +3520,7 @@ INPUT_PORTS_START( spacewr3 ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -4063,8 +3536,9 @@ INPUT_PORTS_START( spceking ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* N ? */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) @@ -4074,6 +3548,7 @@ INPUT_PORTS_START( spceking ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -4090,15 +3565,7 @@ INPUT_PORTS_START( spceking ) PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START /* BSR */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START /* Dummy port for cocktail mode */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -4151,7 +3618,7 @@ ROM_START( alieninv ) ROM_LOAD( "1e.bin", 0x1800, 0x0800, 0x0449CB52 ) ROM_END -ROM_START( si_tv ) +ROM_START( sitv ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "tv0h.s1", 0x0000, 0x0800, 0xfef18aad ) ROM_LOAD( "tv04.m1", 0x1800, 0x0800, 0xcd2c67f6 ) @@ -4159,22 +3626,44 @@ ROM_START( si_tv ) ROM_LOAD( "tv02.rp1", 0x0800, 0x0800, 0x3c759a90 ) ROM_END -ROM_START( si_cv ) +ROM_START( sicv ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "cv17.bin", 0x0000, 0x0800, 0x3dfbe9e6 ) ROM_LOAD( "cv18.bin", 0x0800, 0x0800, 0xbc3c82bf ) ROM_LOAD( "cv19.bin", 0x1000, 0x0800, 0xd202b41c ) ROM_LOAD( "cv20.bin", 0x1800, 0x0800, 0xc74ee7b6 ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color maps player 1/player 2 */ + ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, 0xaac24f34 ) + ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, 0x2bdf83a0 ) ROM_END -ROM_START( si_sv ) +ROM_START( sisv ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, 0x86bb8cb6 ) + ROM_LOAD( "sv02.bin", 0x0400, 0x0400, 0x0e159534 ) ROM_LOAD( "sv10.bin", 0x0800, 0x0400, 0x483e651e ) ROM_LOAD( "sv04.bin", 0x1400, 0x0400, 0x1293b826 ) ROM_LOAD( "sv09.bin", 0x1800, 0x0400, 0xcd80b13f ) ROM_LOAD( "sv06.bin", 0x1c00, 0x0400, 0x2c68e0b4 ) - ROM_LOAD( "sv02.bin", 0x0400, 0x0400, 0x0e159534 ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color maps player 1/player 2 */ + ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, 0xaac24f34 ) + ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, 0x2bdf83a0 ) +ROM_END + +ROM_START( sisv2 ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ + ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, 0x86bb8cb6 ) + ROM_LOAD( "emag_si.b", 0x0400, 0x0400, 0xfebe6d1a ) + ROM_LOAD( "sv12", 0x0800, 0x0400, 0xa08e7202 ) + ROM_LOAD( "sv04.bin", 0x1400, 0x0400, 0x1293b826 ) + ROM_LOAD( "sv13", 0x1800, 0x0400, 0xa9011634 ) + ROM_LOAD( "sv14", 0x1c00, 0x0400, 0x58730370 ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color maps player 1/player 2 */ + ROM_LOAD( "cv01_1.bin", 0x0000, 0x0400, 0xaac24f34 ) + ROM_LOAD( "cv02_2.bin", 0x0400, 0x0400, 0x2bdf83a0 ) ROM_END ROM_START( spceking ) @@ -4207,7 +3696,7 @@ ROM_START( spacewr3 ) ROM_LOAD( "ic32.bin", 0x4000, 0x0800, 0x1e5a753c ) ROM_END -ROM_START( logitec ) +ROM_START( invaderl ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "c01", 0x0000, 0x0400, 0x499f253a ) ROM_LOAD( "c02", 0x0400, 0x0400, 0x2d0b2e1f ) @@ -4218,16 +3707,6 @@ ROM_START( logitec ) ROM_LOAD( "c07", 0x1000, 0x0400, 0x5a7bbf1f ) ROM_END -ROM_START( sisv2 ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ - ROM_LOAD( "sv0h.bin", 0x0000, 0x0400, 0x86bb8cb6 ) - ROM_LOAD( "emag_si.b", 0x0400, 0x0400, 0xfebe6d1a ) - ROM_LOAD( "sv12", 0x0800, 0x0400, 0xa08e7202 ) - ROM_LOAD( "sv04.bin", 0x1400, 0x0400, 0x1293b826 ) - ROM_LOAD( "sv13", 0x1800, 0x0400, 0xa9011634 ) - ROM_LOAD( "sv14", 0x1c00, 0x0400, 0x58730370 ) -ROM_END - ROM_START( jspecter ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "3305.u6", 0x0000, 0x1000, 0xab211a4f ) @@ -4241,6 +3720,10 @@ ROM_START( invadpt2 ) ROM_LOAD( "pv.03", 0x1000, 0x0800, 0x1766337e ) ROM_LOAD( "pv.04", 0x1800, 0x0800, 0x8f0e62e0 ) ROM_LOAD( "pv.05", 0x4000, 0x0800, 0x19b505e9 ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color maps player 1/player 2 */ + ROM_LOAD( "pv06_1.bin", 0x0000, 0x0400, 0xa732810b ) + ROM_LOAD( "pv07_2.bin", 0x0400, 0x0400, 0x2c5b91cb ) ROM_END ROM_START( invdpt2m ) @@ -4300,7 +3783,6 @@ ROM_START( spcewarl ) ROM_LOAD( "spcewarl.2", 0x0800, 0x0800, 0x43bc65c5 ) ROM_LOAD( "spcewarl.3", 0x1000, 0x0800, 0x7820df3a ) ROM_LOAD( "spcewarl.4", 0x1800, 0x0800, 0xadc05b8d ) - ROM_LOAD( "spcewarl.5", 0x4000, 0x0800, 0x3f55d17f ) ROM_END ROM_START( galxwars ) @@ -4331,6 +3813,10 @@ ROM_START( lrescue ) ROM_LOAD( "lrescue.4", 0x1800, 0x0800, 0x782fee3c ) ROM_LOAD( "lrescue.5", 0x4000, 0x0800, 0x58fde8bc ) ROM_LOAD( "lrescue.6", 0x4800, 0x0800, 0xbfb0f65d ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color map */ + ROM_LOAD( "7643-1.cpu", 0x0000, 0x0400, 0x8b2e38de ) + ROM_RELOAD( 0x0400, 0x0400 ) ROM_END ROM_START( grescue ) @@ -4341,6 +3827,10 @@ ROM_START( grescue ) ROM_LOAD( "grescue.4", 0x1800, 0x0800, 0xca412991 ) ROM_LOAD( "grescue.5", 0x4000, 0x0800, 0xa419a4d6 ) ROM_LOAD( "lrescue.6", 0x4800, 0x0800, 0xbfb0f65d ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color map */ + ROM_LOAD( "7643-1.cpu", 0x0000, 0x0400, 0x8b2e38de ) + ROM_RELOAD( 0x0400, 0x0400 ) ROM_END ROM_START( desterth ) @@ -4478,6 +3968,13 @@ ROM_START( polaris ) ROM_LOAD( "ps-04", 0x1800, 0x0800, 0x65694948 ) ROM_LOAD( "ps-05", 0x4000, 0x0800, 0x772e31f3 ) ROM_LOAD( "ps-10", 0x4800, 0x0800, 0x3df77bac ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color map */ + ROM_LOAD( "ps07", 0x0000, 0x0400, 0x164aa05d ) + ROM_RELOAD( 0x0400, 0x0400 ) + + ROM_REGION( 0x0100, REGION_USER1 ) /* don't know what this is for */ + ROM_LOAD( "mb7052.2c", 0x0000, 0x0100, 0x2953253b ) ROM_END ROM_START( polarisa ) @@ -4489,8 +3986,13 @@ ROM_START( polarisa ) ROM_LOAD( "ps-05", 0x4000, 0x0800, 0x772e31f3 ) ROM_LOAD( "ps-10", 0x4800, 0x0800, 0x3df77bac ) ROM_LOAD( "ps26", 0x5000, 0x0800, 0x9d5c3d50 ) -// ROM_LOAD( "ps07", 0x5800, 0x0400, 0x164aa05d ) -// ROM_LOAD( "ps08", 0x5c00, 0x0100, 0x2953253b ) + + ROM_REGION( 0x0800, REGION_PROMS ) /* color map */ + ROM_LOAD( "ps07", 0x0000, 0x0400, 0x164aa05d ) + ROM_RELOAD( 0x0400, 0x0400 ) + + ROM_REGION( 0x0100, REGION_USER1 ) /* don't know what this is for */ + ROM_LOAD( "mb7052.2c", 0x0000, 0x0100, 0x2953253b ) ROM_END ROM_START( lagunar ) @@ -4534,6 +4036,14 @@ ROM_START( bowler ) ROM_LOAD( "d.cpu", 0x4000, 0x0800, 0xe7dbc9d9 ) ROM_END +ROM_START( shuffle ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ + ROM_LOAD( "shuffle.h", 0x0000, 0x0800, 0x0d422a18 ) + ROM_LOAD( "shuffle.g", 0x0800, 0x0800, 0x7db7fcf9 ) + ROM_LOAD( "shuffle.f", 0x1000, 0x0800, 0xcd04d848 ) + ROM_LOAD( "shuffle.e", 0x1800, 0x0800, 0x2c118357 ) +ROM_END + ROM_START( blueshrk ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "blueshrk.h", 0x0000, 0x0800, 0x4ff94187 ) @@ -4567,7 +4077,7 @@ ROM_END ROM_START( tornbase ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "tb.h", 0x0000, 0x0800, 0x653f4797 ) - ROM_LOAD( "tb.g", 0x0800, 0x0800, 0x33468006 ) + ROM_LOAD( "tb.g", 0x0800, 0x0800, BADCRC(0x33468006) ) /* this ROM fails the test */ ROM_LOAD( "tb.f", 0x1000, 0x0800, 0x215e070c ) ROM_END @@ -4579,6 +4089,14 @@ ROM_START( checkmat ) ROM_LOAD( "checkmat.e", 0x0c00, 0x0400, 0x59330d84 ) ROM_END +ROM_START( desertgu ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ + ROM_LOAD( "desertgu.h", 0x0000, 0x0800, 0xc0030d7c ) + ROM_LOAD( "desertgu.g", 0x0800, 0x0800, 0x1ddde10b ) + ROM_LOAD( "desertgu.f", 0x1000, 0x0800, 0x808e46f1 ) + ROM_LOAD( "desertgu.e", 0x1800, 0x0800, 0xac64dc62 ) +ROM_END + ROM_START( ozmawars ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "mw01", 0x0000, 0x0800, 0x31f4397d ) @@ -4623,10 +4141,7 @@ ROM_START( ballbomb ) ROM_LOAD( "tn04", 0x1800, 0x0800, 0xd0689a22 ) ROM_LOAD( "tn05-1", 0x4000, 0x0800, 0x5d5e94f1 ) - /* The only difference between the 2 colourmaps is the colour */ - /* of the ships - each player has there own colour! */ - - ROM_REGION( 0x800, REGION_PROMS ) /* Colour Maps */ + ROM_REGION( 0x0800, REGION_PROMS ) /* color maps player 1/player 2 */ ROM_LOAD( "tn06", 0x0000, 0x0400, 0x7ec554c4 ) ROM_LOAD( "tn07", 0x0400, 0x0400, 0xdeb0ac82 ) ROM_END @@ -4642,9 +4157,7 @@ ROM_START( yosakdon ) ROM_LOAD( "yd7.bin", 0x1c00, 0x0400, 0x2744e68b ) ROM_END - - -ROM_START( bandido ) /* MJC */ +ROM_START( bandido ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "baf1-3", 0x0000, 0x0400, 0xaec94829 ) ROM_LOAD( "baf2-1", 0x0400, 0x0400, 0xda67721a ) @@ -4661,7 +4174,7 @@ ROM_START( bandido ) ROM_LOAD( "basnd.u2", 0x0000, 0x0400, 0x75731745 ) ROM_END -ROM_START( helifire ) /* MJC */ +ROM_START( helifire ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "tub.f1b", 0x0000, 0x0400, 0x032f89ca ) ROM_LOAD( "tub.f2b", 0x0400, 0x0400, 0x2774e70f ) @@ -4695,7 +4208,7 @@ ROM_START( helifira ) ROM_LOAD( "tub.snd", 0x0000, 0x0400, 0x9d77a31f ) ROM_END -ROM_START( spacefev ) /* MJC */ +ROM_START( spacefev ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "tsf.f1", 0x0000, 0x0400, 0x35f295bd ) ROM_LOAD( "tsf.f2", 0x0400, 0x0400, 0x0c633f4c ) @@ -4706,7 +4219,7 @@ ROM_START( spacefev ) ROM_LOAD( "tsf.i1", 0x1800, 0x0400, 0xd4f3b50d ) ROM_REGION( 0x1000, REGION_CPU2 ) /* Sound 8035 + 76477 Sound Generator */ - ROM_LOAD( "tsf.snd", 0x0000, 0x0400, 0x75731745 ) + ROM_LOAD( "basnd.u2", 0x0000, 0x0400, 0x75731745 ) ROM_END ROM_START( sfeverbw ) @@ -4721,72 +4234,83 @@ ROM_START( sfeverbw ) ROM_LOAD( "spacefev.i2", 0x1c00, 0x0400, 0xeff9f82d ) ROM_REGION( 0x1000, REGION_CPU2 ) /* Sound 8035 + 76477 Sound Generator */ - ROM_LOAD( "tsf.snd", 0x0000, 0x0400, 0x75731745 ) + ROM_LOAD( "basnd.u2", 0x0000, 0x0400, 0x75731745 ) ROM_END -GAME( 1978, invaders, 0, invaders, invaders, 0, ROT270, "Midway", "Space Invaders" ) -GAME( 1980, earthinv, invaders, invaders, earthinv, 0, ROT270, "bootleg", "Super Earth Invasion" ) -GAME( 1980, spaceatt, invaders, invaders, spaceatt, 0, ROT270, "Zenitone Microsec", "Space Attack II" ) -GAME( ????, sinvemag, invaders, invaders, sinvemag, 0, ROT270, "bootleg", "Super Invaders" ) -GAME( ????, alieninv, invaders, invaders, alieninv, 0, ROT270, "bootleg", "Alien Invasion Part II" ) -GAME( 1978, si_tv, invaders, sitv, sitv, 0, ROT270, "Taito", "Space Invaders (TV Version)" ) -GAME( 1979, si_cv, invaders, sicv, sicv, 0, ROT270, "Taito", "Space Invaders Colour (CV Version)" ) -GAME( 1978, si_sv, invaders, invaders, sicv, 0, ROT270, "Taito", "Space Invaders (SV Version)" ) -GAME( 1978, spceking, invaders, invadpt2, spceking, 0, ROT270, "Leijac (Konami)","Space King" ) -GAME( 1978, spcewars, invaders, invadpt2, invadpt2, 0, ROT270, "Sanritsu", "Space War (Sanritsu)" ) -GAME( 1978, spacewr3, invaders, invaders, spacewr3, 0, ROT270, "bootleg", "Space War Part 3" ) -GAME( 1978, logitec, invaders, invaders, invaders, 0, ROT270, "bootleg", "Space Invaders (Logitec)" ) -GAME( 1978, sisv2, invaders, invaders, invaders, 0, ROT270, "Taito", "Space Invaders (SV Version 2)" ) -GAME( 1979, jspecter, invaders, invaders, jspecter, 0, ROT270, "Jatre", "Jatre Specter" ) -GAME( 1980, invadpt2, 0, invadpt2, invadpt2, 0, ROT270, "Taito", "Space Invaders Part II (Taito)" ) -GAME( 1980, invdpt2m, invadpt2, invdpt2m, invdpt2m, 0, ROT270, "Midway", "Space Invaders Part II (Midway)" ) -GAME( 1980, invad2ct, 0, invad2ct, invad2ct, 0, ROT90, "Midway", "Space Invaders II Cocktail (Midway)" ) -GAME( ????, invrvnge, 0, invrvnge, invrvnge, 0, ROT270, "Zenitone Microsec", "Invader's Revenge" ) -GAME( ????, invrvnga, invrvnge, invrvnge, invrvnge, 0, ROT270, "Zenitone Microsec (Dutchford license)", "Invader's Revenge (Dutchford)" ) -GAME( 1980, astlaser, 0, invdpt2m, astlaser, 0, ROT270, "", "Astro Laser" ) -GAME( 1980, intruder, astlaser, invdpt2m, intruder, 0, ROT270, "Game Plan, Inc. (Taito)", "Intruder" ) -GAME( 1979, spcewarl, astlaser, invdpt2m, astlaser, 0, ROT270, "Leijac (Konami)","Space War (Leijac)" ) -GAME( 1979, galxwars, 0, invaders, galxwars, 0, ROT270, "Taito", "Galaxy Wars" ) -GAME( 1979, starw, galxwars, invaders, galxwars, 0, ROT270, "bootleg", "Star Wars" ) -GAME( 1979, lrescue, 0, lrescue, lrescue, 0, ROT270, "Taito", "Lunar Rescue" ) -GAME( 1979, grescue, lrescue, lrescue, lrescue, 0, ROT270, "Taito (Universal license?)", "Galaxy Rescue" ) -GAME( 1979, desterth, lrescue, invaders, desterth, 0, ROT270, "bootleg", "Destination Earth" ) -GAME( 1979, cosmicmo, invaders, invaders, cosmicmo, 0, ROT270, "Universal", "Cosmic Monsters" ) -GAME( 1979, rollingc, 0, rollingc, rollingc, 0, ROT270, "Nichibutsu", "Rolling Crash / Moon Base" ) -GAME( 1977, boothill, 0, boothill, boothill, 0, ROT0, "Midway", "Boot Hill" ) -GAME( 1980, schaser, 0, lrescue, schaser, 0, ROT270, "Taito", "Space Chaser" ) -GAME( 1980, spcenctr, 0, spcenctr, spcenctr, 0, ROT0, "Midway", "Space Encounters" ) -GAME( 1978, clowns, 0, clowns, clowns, 0, ROT0, "Midway", "Clowns" ) -GAME( 1977, gmissile, 0, gmissile, gmissile, 0, ROT0, "Midway", "Guided Missile" ) -GAME( 1976, seawolf, 0, seawolf, seawolf, 0, ROT0, "Midway", "Sea Wolf" ) -GAME( 1975, gunfight, 0, gunfight, gunfight, 0, ROT0, "Midway", "Gun Fight" ) -GAME( 1976, 280zzzap, 0, zzzap, zzzap, 0, ROT0, "Midway", "Datsun 280 Zzzap" ) -GAME( 1980, lupin3, 0, lupin3, lupin3, 0, ROT270, "Taito", "Lupin III" ) -GAME( 1980, polaris, 0, polaris, polaris, 0, ROT270, "Taito", "Polaris (set 1)" ) -GAME( 1980, polarisa, polaris, polaris, polaris, 0, ROT270, "Taito", "Polaris (set 2)" ) -GAME( 1977, lagunar, 0, zzzap, lagunar, 0, ROT90, "Midway", "Laguna Racer" ) -GAME( 1977, m4, 0, m4, m4, 0, ROT0, "Midway", "M-4" ) -GAME( 1979, phantom2, 0, phantom2, phantom2, 0, ROT0, "Midway", "Phantom II" ) -GAME( 1977, dogpatch, 0, dogpatch, dogpatch, 0, ROT0, "Midway", "Dog Patch" ) -GAME( 1978, bowler, 0, midwbowl, midwbowl, 0, ROT90, "Midway", "4 Player Bowling" ) -GAME( 1978, blueshrk, 0, blueshrk, blueshrk, 0, ROT0, "Midway", "Blue Shark" ) -GAME( 1978, einnings, 0, gmissile, einnings, 0, ROT0, "Midway", "Extra Innings" ) -GAME( 1977, dplay, 0, gmissile, einnings, 0, ROT0, "Midway", "Double Play" ) -/* "The Amazing Maze Game" on title screen, but manual, flyer, */ -/* cabinet side art all call it just "Amazing Maze" */ -GAME( 1976, maze, 0, maze, maze, 0, ROT0, "Midway", "Amazing Maze" ) -GAME( 1976, tornbase, 0, tornbase, tornbase, 0, ROT0, "Midway", "Tornado Baseball" ) -GAME( 1977, checkmat, 0, checkmat, checkmat, 0, ROT0, "Midway", "Checkmate" ) -GAME( 1979, ozmawars, 0, invadpt2, ozmawars, 0, ROT270, "SNK", "Ozma Wars" ) -GAME( 1979, solfight, ozmawars, invadpt2, solfight, 0, ROT270, "bootleg", "Solar Fight" ) -GAME( 1979, spaceph, ozmawars, lrescue, spaceph, 0, ROT270, "Zilec Games", "Space Phantoms" ) -GAME( 1980, ballbomb, 0, ballbomb, ballbomb, 0, ROT270, "Taito", "Balloon Bomber" ) -GAME( 1979, yosakdon, 0, lrescue, lrescue, 0, ROT270, "bootleg", "Yosaku To Donbee (bootleg)" ) - -GAMEX(1980, bandido, 0, bandido, bandido, 0, ROT270, "Exidy", "Bandido", GAME_IMPERFECT_SOUND ) -GAME( 1980, helifire, 0, bandido, helifire, 0, ROT270, "Nintendo", "HeliFire (revision B)" ) -GAME( 1980, helifira, helifire, bandido, helifire, 0, ROT270, "Nintendo", "HeliFire (revision A)" ) -GAME( 1980, spacefev, 0, bandido, spacefev, 0, ROT270, "Nintendo", "Color Space Fever" ) -GAME( 1980, sfeverbw, 0, bandido, spacefev, 0, ROT270, "Nintendo", "Space Fever" ) +/* Midway games */ + +/* Note - "The Amazing Maze Game" on title screen, but manual, flyer, */ +/* cabinet side art all call it just "Amazing Maze" */ +/* - Desert Gun is also known as Road Runner */ + +/* board # rom parent machine inp init (overlay/color hardware setup) */ + +/* 596 */ GAME( 1976, seawolf, 0, seawolf, seawolf, seawolf, ROT0, "Midway", "Sea Wolf" ) +/* 597 */ GAME( 1975, gunfight, 0, gunfight, gunfight, 8080bw, ROT0, "Midway", "Gun Fight" ) +/* 605 */ GAME( 1976, tornbase, 0, invaders, tornbase, 8080bw, ROT0, "Midway", "Tornado Baseball" ) +/* 610 */ GAME( 1976, 280zzzap, 0, 280zzzap, 280zzzap, 8080bw, ROT0, "Midway", "Datsun 280 Zzzap" ) +/* 611 */ GAME( 1976, maze, 0, invaders, maze, 8080bw, ROT0, "Midway", "Amazing Maze" ) +/* 612 */ GAME( 1977, boothill, 0, boothill, boothill, 8080bw, ROT0, "Midway", "Boot Hill" ) +/* 615 */ GAME( 1977, checkmat, 0, checkmat, checkmat, 8080bw, ROT0, "Midway", "Checkmate" ) +/* 618 */ GAME( 1977, desertgu, 0, desertgu, desertgu, desertgu, ROT0, "Midway", "Desert Gun" ) +/* 619 */ GAME( 1977, dplay, einnings, gmissile, einnings, 8080bw, ROT0, "Midway", "Double Play" ) +/* 622 */ GAME( 1977, lagunar, 0, 280zzzap, lagunar, 8080bw, ROT90, "Midway", "Laguna Racer" ) +/* 623 */ GAME( 1977, gmissile, 0, gmissile, gmissile, 8080bw, ROT0, "Midway", "Guided Missile" ) +/* 626 */ GAME( 1977, m4, 0, m4, m4, 8080bw, ROT0, "Midway", "M-4" ) +/* 630 */ GAME( 1978, clowns, 0, clowns, clowns, 8080bw, ROT0, "Midway", "Clowns" ) +/* 640 "Midway", "Space Walk" */ +/* 642 */ GAME( 1978, einnings, 0, gmissile, einnings, 8080bw, ROT0, "Midway", "Extra Innings" ) +/* 643 */ GAME( 1978, shuffle, 0, shuffle, shuffle, 8080bw, ROT90, "Midway", "Shuffleboard") +/* 644 */ GAME( 1977, dogpatch, 0, clowns, dogpatch, 8080bw, ROT0, "Midway", "Dog Patch" ) +/* 645 */ GAME( 1980, spcenctr, 0, spcenctr, spcenctr, 8080bw, ROT0, "Midway", "Space Encounters" ) +/* 652 */ GAME( 1979, phantom2, 0, m4, phantom2, 8080bw, ROT0, "Midway", "Phantom II" ) +/* 730 */ GAME( 1978, bowler, 0, bowler, bowler, 8080bw, ROT90, "Midway", "4 Player Bowling" ) +/* 739 */ GAME( 1978, invaders, 0, invaders, invaders, invaders, ROT270, "Midway", "Space Invaders" ) +/* 742 */ GAME( 1978, blueshrk, 0, blueshrk, blueshrk, blueshrk, ROT0, "Midway", "Blue Shark" ) +/* 851 */ GAME( 1980, invad2ct, 0, invad2ct, invad2ct, invad2ct, ROT90, "Midway", "Space Invaders II (Midway, cocktail)" ) +/* 852 */ GAME( 1980, invdpt2m, invadpt2, invaders, invdpt2m, invdpt2m, ROT270, "Midway", "Space Invaders Part II (Midway)" ) +/* 870 "Midway", "Space Invaders Deluxe (cocktail) "*/ + + GAME( 1980, earthinv, invaders, invaders, earthinv, invaders, ROT270, "bootleg", "Super Earth Invasion" ) + GAME( 1980, spaceatt, invaders, invaders, spaceatt, invaders, ROT270, "Zenitone Microsec", "Space Attack II" ) + GAME( ????, sinvemag, invaders, invaders, sinvemag, invaders, ROT270, "bootleg", "Super Invaders" ) + GAME( ????, alieninv, invaders, invaders, alieninv, invaders, ROT270, "bootleg", "Alien Invasion Part II" ) + GAME( 1978, sitv, invaders, invaders, sitv, invaders, ROT270, "Taito", "Space Invaders (TV Version)" ) + GAME( 1979, sicv, invaders, invadpt2, invaders, invadpt2, ROT270, "Taito", "Space Invaders (CV Version)" ) + GAME( 1978, sisv, invaders, invadpt2, invaders, invadpt2, ROT270, "Taito", "Space Invaders (SV Version)" ) + GAME( 1978, sisv2, invaders, invadpt2, invaders, invadpt2, ROT270, "Taito", "Space Invaders (SV Version 2)" ) + GAME( 1978, spceking, invaders, invaders, spceking, 8080bw, ROT270, "Leijac (Konami)","Space King" ) + GAME( 1978, spcewars, invaders, invaders, invadpt2, 8080bw, ROT270, "Sanritsu", "Space War (Sanritsu)" ) + GAME( 1978, spacewr3, invaders, invaders, spacewr3, invaders, ROT270, "bootleg", "Space War Part 3" ) + GAME( 1978, invaderl, invaders, invaders, invaders, invaders, ROT270, "bootleg", "Space Invaders (Logitec)" ) + GAME( 1979, jspecter, invaders, invaders, jspecter, invaders, ROT270, "Jatre", "Jatre Specter" ) + GAME( 1979, cosmicmo, invaders, invaders, cosmicmo, invaders, ROT270, "Universal", "Cosmic Monsters" ) + GAME( 1980, invadpt2, 0, invadpt2, invadpt2, invadpt2, ROT270, "Taito", "Space Invaders Part II (Taito)" ) + GAME( ????, invrvnge, 0, invaders, invrvnge, invrvnge, ROT270, "Zenitone Microsec", "Invader's Revenge" ) + GAME( ????, invrvnga, invrvnge, invaders, invrvnge, invrvnge, ROT270, "Zenitone Microsec (Dutchford license)", "Invader's Revenge (Dutchford)" ) + GAME( 1980, astlaser, 0, invaders, astlaser, invdpt2m, ROT270, "", "Astro Laser" ) + GAME( 1980, intruder, astlaser, invaders, intruder, invdpt2m, ROT270, "Game Plan, Inc. (Taito)", "Intruder" ) + GAME( 1979, spcewarl, astlaser, invaders, astlaser, invdpt2m, ROT270, "Leijac (Konami)","Space War (Leijac)" ) + GAME( 1979, galxwars, 0, invaders, galxwars, invaders, ROT270, "Taito", "Galaxy Wars" ) + GAME( 1979, starw, galxwars, invaders, galxwars, invaders, ROT270, "bootleg", "Star Wars" ) + GAME( 1979, lrescue, 0, invadpt2, lrescue, invadpt2, ROT270, "Taito", "Lunar Rescue" ) + GAME( 1979, grescue, lrescue, invadpt2, lrescue, invadpt2, ROT270, "Taito (Universal license?)", "Galaxy Rescue" ) + GAME( 1979, desterth, lrescue, invaders, desterth, invaders, ROT270, "bootleg", "Destination Earth" ) + GAME( 1979, rollingc, 0, rollingc, rollingc, rollingc, ROT270, "Nichibutsu", "Rolling Crash / Moon Base" ) + GAME( 1980, schaser, 0, schaser, schaser, schaser, ROT270, "Taito", "Space Chaser" ) + GAME( 1980, lupin3, 0, invaders, lupin3, 8080bw, ROT270, "Taito", "Lupin III" ) + GAME( 1980, polaris, 0, polaris, polaris, invadpt2, ROT270, "Taito", "Polaris (set 1)" ) + GAME( 1980, polarisa, polaris, polaris, polaris, invadpt2, ROT270, "Taito", "Polaris (set 2)" ) + GAME( 1979, ozmawars, 0, invaders, ozmawars, 8080bw, ROT270, "SNK", "Ozma Wars" ) + GAME( 1979, solfight, ozmawars, invaders, solfight, 8080bw, ROT270, "bootleg", "Solar Fight" ) + GAME( 1979, spaceph, ozmawars, invaders, spaceph, 8080bw, ROT270, "Zilec Games", "Space Phantoms" ) + GAME( 1980, ballbomb, 0, invadpt2, ballbomb, invadpt2, ROT270, "Taito", "Balloon Bomber" ) + GAME( 1979, yosakdon, 0, invaders, lrescue, 8080bw, ROT270, "bootleg", "Yosaku To Donbee (bootleg)" ) + GAMEX(1980, bandido, 0, bandido, bandido, 8080bw, ROT270, "Exidy", "Bandido", GAME_IMPERFECT_SOUND ) + GAME( 1980, helifire, 0, bandido, helifire, 8080bw, ROT270, "Nintendo", "HeliFire (revision B)" ) + GAME( 1980, helifira, helifire, bandido, helifire, 8080bw, ROT270, "Nintendo", "HeliFire (revision A)" ) + GAME( 1980, spacefev, 0, bandido, spacefev, 8080bw, ROT270, "Nintendo", "Space Fever (color)" ) + GAME( 1980, sfeverbw, 0, bandido, spacefev, 8080bw, ROT270, "Nintendo", "Space Fever (black and white)" ) + diff --git a/src/drivers/88games.c b/src/drivers/88games.c index 89de0b6ce..8dbbef356 100644 --- a/src/drivers/88games.c +++ b/src/drivers/88games.c @@ -478,6 +478,60 @@ ROM_START( konami88 ) ROM_LOAD( "861a07.d", 0x010000, 0x10000, 0x86731451 ) ROM_END +ROM_START( hypsptsp ) + ROM_REGION( 0x21000, REGION_CPU1 ) /* code + banked roms + space for banked ram */ + ROM_LOAD( "861f03.k18", 0x08000, 0x08000, 0x8c61aebd ) + ROM_LOAD( "861f02.k16", 0x10000, 0x10000, 0xd2460c28 ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* Z80 code */ + ROM_LOAD( "861d01.d9", 0x00000, 0x08000, 0x0ff1dec0 ) + + ROM_REGION( 0x080000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */ + ROM_LOAD_GFX_EVEN( "861a08.a", 0x000000, 0x10000, 0x77a00dd6 ) /* characters */ + ROM_LOAD_GFX_ODD ( "861a08.c", 0x000000, 0x10000, 0xb422edfc ) + ROM_LOAD_GFX_EVEN( "861a08.b", 0x020000, 0x10000, 0x28a8304f ) + ROM_LOAD_GFX_ODD ( "861a08.d", 0x020000, 0x10000, 0xe01a3802 ) + ROM_LOAD_GFX_EVEN( "861a09.a", 0x040000, 0x10000, 0xdf8917b6 ) + ROM_LOAD_GFX_ODD ( "861a09.c", 0x040000, 0x10000, 0xf577b88f ) + ROM_LOAD_GFX_EVEN( "861a09.b", 0x060000, 0x10000, 0x4917158d ) + ROM_LOAD_GFX_ODD ( "861a09.d", 0x060000, 0x10000, 0x2bb3282c ) + + ROM_REGION( 0x100000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */ + ROM_LOAD_GFX_EVEN( "861a05.a", 0x000000, 0x10000, 0xcedc19d0 ) /* sprites */ + ROM_LOAD_GFX_ODD ( "861a05.e", 0x000000, 0x10000, 0x725af3fc ) + ROM_LOAD_GFX_EVEN( "861a05.b", 0x020000, 0x10000, 0xdb2a8808 ) + ROM_LOAD_GFX_ODD ( "861a05.f", 0x020000, 0x10000, 0x32d830ca ) + ROM_LOAD_GFX_EVEN( "861a05.c", 0x040000, 0x10000, 0xcf03c449 ) + ROM_LOAD_GFX_ODD ( "861a05.g", 0x040000, 0x10000, 0xfd51c4ea ) + ROM_LOAD_GFX_EVEN( "861a05.d", 0x060000, 0x10000, 0x97d78c77 ) + ROM_LOAD_GFX_ODD ( "861a05.h", 0x060000, 0x10000, 0x60d0c8a5 ) + ROM_LOAD_GFX_EVEN( "861a06.a", 0x080000, 0x10000, 0x85e2e30e ) + ROM_LOAD_GFX_ODD ( "861a06.e", 0x080000, 0x10000, 0x6f96651c ) + ROM_LOAD_GFX_EVEN( "861a06.b", 0x0a0000, 0x10000, 0xce17eaf0 ) + ROM_LOAD_GFX_ODD ( "861a06.f", 0x0a0000, 0x10000, 0x88310bf3 ) + ROM_LOAD_GFX_EVEN( "861a06.c", 0x0c0000, 0x10000, 0xa568b34e ) + ROM_LOAD_GFX_ODD ( "861a06.g", 0x0c0000, 0x10000, 0x4a55beb3 ) + ROM_LOAD_GFX_EVEN( "861a06.d", 0x0e0000, 0x10000, 0xbc70ab39 ) + ROM_LOAD_GFX_ODD ( "861a06.h", 0x0e0000, 0x10000, 0xd906b79b ) + + ROM_REGION( 0x040000, REGION_GFX3 ) /* graphics ( dont dispose as the program can read them ) */ + ROM_LOAD( "861a04.a", 0x000000, 0x10000, 0x092a8b15 ) /* zoom/rotate */ + ROM_LOAD( "861a04.b", 0x010000, 0x10000, 0x75744b56 ) + ROM_LOAD( "861a04.c", 0x020000, 0x10000, 0xa00021c5 ) + ROM_LOAD( "861a04.d", 0x030000, 0x10000, 0xd208304c ) + + ROM_REGION( 0x0100, REGION_PROMS ) + ROM_LOAD( "861.g3", 0x0000, 0x0100, 0x429785db ) /* priority encoder (not used) */ + + ROM_REGION( 0x20000, REGION_SOUND1 ) /* samples for UPD7759 #0 */ + ROM_LOAD( "861a07.a", 0x000000, 0x10000, 0x5d035d69 ) + ROM_LOAD( "861a07.b", 0x010000, 0x10000, 0x6337dd91 ) + + ROM_REGION( 0x20000, REGION_SOUND2 ) /* samples for UPD7759 #1 */ + ROM_LOAD( "861a07.c", 0x000000, 0x10000, 0x5067a38b ) + ROM_LOAD( "861a07.d", 0x010000, 0x10000, 0x86731451 ) +ROM_END + static void k88games_banking( int lines ) @@ -538,3 +592,4 @@ static void init_88games(void) GAME( 1988, 88games, 0, 88games, 88games, 88games, ROT0, "Konami", "'88 Games" ) GAME( 1988, konami88, 88games, 88games, 88games, 88games, ROT0, "Konami", "Konami '88" ) +GAME( 1988, hypsptsp, 88games, 88games, 88games, 88games, ROT0, "Konami", "Hyper Sports Special (Japan)" ) diff --git a/src/drivers/actfancr.c b/src/drivers/actfancr.c index 213c67df3..20149e1fb 100644 --- a/src/drivers/actfancr.c +++ b/src/drivers/actfancr.c @@ -11,7 +11,7 @@ I believe the USA version of Act Fancer is called 'Out Fencer' - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk *******************************************************************************/ @@ -411,8 +411,8 @@ static struct YM3812interface ym3812_interface = static struct OKIM6295interface okim6295_interface = { 1, /* 1 chip */ - { 8000 }, /* 8000Hz frequency */ - { REGION_SOUND1 }, /* memory region 3 */ + { 7759 }, /* frequency */ + { REGION_SOUND1 }, { 85 } }; @@ -440,7 +440,7 @@ static struct MachineDriver machine_driver_actfancr = ignore_interrupt,0 /* Interrupts from OPL chip */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION*2, + 60, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written*/ 0, @@ -492,7 +492,7 @@ static struct MachineDriver machine_driver_triothep = ignore_interrupt,0 /* Interrupts from OPL chip */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION*2, + 60, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written*/ 0, @@ -530,6 +530,39 @@ static struct MachineDriver machine_driver_triothep = /******************************************************************************/ ROM_START( actfancr ) + ROM_REGION( 0x200000, REGION_CPU1 ) /* Need to allow full RAM allocation for now */ + ROM_LOAD( "fe08-2.bin", 0x00000, 0x10000, 0x0d36fbfa ) + ROM_LOAD( "fe09-2.bin", 0x10000, 0x10000, 0x27ce2bb1 ) + ROM_LOAD( "10", 0x20000, 0x10000, 0xcabad137 ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 6502 Sound CPU */ + ROM_LOAD( "17-1", 0x08000, 0x8000, 0x289ad106 ) + + ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "15", 0x00000, 0x10000, 0xa1baf21e ) /* Chars */ + ROM_LOAD( "16", 0x10000, 0x10000, 0x22e64730 ) + + ROM_REGION( 0x60000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "02", 0x00000, 0x10000, 0xb1db0efc ) /* Sprites */ + ROM_LOAD( "03", 0x10000, 0x08000, 0xf313e04f ) + ROM_LOAD( "06", 0x18000, 0x10000, 0x8cb6dd87 ) + ROM_LOAD( "07", 0x28000, 0x08000, 0xdd345def ) + ROM_LOAD( "00", 0x30000, 0x10000, 0xd50a9550 ) + ROM_LOAD( "01", 0x40000, 0x08000, 0x34935e93 ) + ROM_LOAD( "04", 0x48000, 0x10000, 0xbcf41795 ) + ROM_LOAD( "05", 0x58000, 0x08000, 0xd38b94aa ) + + ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "14", 0x00000, 0x10000, 0xd6457420 ) /* Tiles */ + ROM_LOAD( "12", 0x10000, 0x10000, 0x08787b7a ) + ROM_LOAD( "13", 0x20000, 0x10000, 0xc30c37dc ) + ROM_LOAD( "11", 0x30000, 0x10000, 0x1f006d9f ) + + ROM_REGION( 0x10000, REGION_SOUND1 ) /* ADPCM sounds */ + ROM_LOAD( "18", 0x00000, 0x10000, 0x5c55b242 ) +ROM_END + +ROM_START( actfanc1 ) ROM_REGION( 0x200000, REGION_CPU1 ) /* Need to allow full RAM allocation for now */ ROM_LOAD( "08-1", 0x00000, 0x10000, 0x3bf214a4 ) ROM_LOAD( "09-1", 0x10000, 0x10000, 0x13ae78d5 ) @@ -672,6 +705,7 @@ static void init_actfancj(void) -GAME( 1989, actfancr, 0, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World)" ) -GAME( 1989, actfancj, actfancr, actfancr, actfancr, actfancj, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (Japan)" ) +GAME( 1989, actfancr, 0, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 2)" ) +GAME( 1989, actfanc1, actfancr, actfancr, actfancr, actfancr, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (World revision 1)" ) +GAME( 1989, actfancj, actfancr, actfancr, actfancr, actfancj, ROT0, "Data East Corporation", "Act-Fancer Cybernetick Hyper Weapon (Japan revision 1)" ) GAME( 1989, triothep, 0, triothep, triothep, 0, ROT0, "Data East Corporation", "Trio The Punch - Never Forget Me... (Japan)" ) diff --git a/src/drivers/aeroboto.c b/src/drivers/aeroboto.c index 002d3253d..c2bbdd68b 100644 --- a/src/drivers/aeroboto.c +++ b/src/drivers/aeroboto.c @@ -328,5 +328,5 @@ ROM_END -GAMEX( 1984, formatz, 0, formatz, formatz, 0, ROT0, "Jaleco", "Formation Z", GAME_NOT_WORKING ) -GAMEX( 1984, aeroboto, formatz, formatz, formatz, 0, ROT0, "[Jaleco] (Williams license)", "Aeroboto", GAME_NOT_WORKING ) +GAMEX( 1984, formatz, 0, formatz, formatz, 0, ROT0, "Jaleco", "Formation Z", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1984, aeroboto, formatz, formatz, formatz, 0, ROT0, "[Jaleco] (Williams license)", "Aeroboto", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/aerofgt.c b/src/drivers/aerofgt.c index e88da27b9..1d3d85d8a 100644 --- a/src/drivers/aerofgt.c +++ b/src/drivers/aerofgt.c @@ -1320,12 +1320,12 @@ ROM_END -GAME( 1991, pspikes, 0, pspikes, pspikes, 0, ROT0, "Video System Co.", "Power Spikes (Korea)" ) -GAME( 1991, svolly91, pspikes, pspikes, pspikes, 0, ROT0, "Video System Co.", "Super Volley '91 (Japan)" ) -GAME( 1991, turbofrc, 0, turbofrc, turbofrc, 0, ROT270, "Video System Co.", "Turbo Force" ) -GAME( 1992, aerofgt, 0, aerofgt, aerofgt, 0, ROT270, "Video System Co.", "Aero Fighters" ) -GAME( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 1)" ) -GAME( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 2)" ) +GAMEX( 1991, pspikes, 0, pspikes, pspikes, 0, ROT0, "Video System Co.", "Power Spikes (Korea)", GAME_NO_COCKTAIL ) +GAMEX( 1991, svolly91, pspikes, pspikes, pspikes, 0, ROT0, "Video System Co.", "Super Volley '91 (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1991, turbofrc, 0, turbofrc, turbofrc, 0, ROT270, "Video System Co.", "Turbo Force", GAME_NO_COCKTAIL ) +GAMEX( 1992, aerofgt, 0, aerofgt, aerofgt, 0, ROT270, "Video System Co.", "Aero Fighters", GAME_NO_COCKTAIL ) +GAMEX( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 2)", GAME_NO_COCKTAIL ) /* note: this one has a 2608, not a 2610 */ -GAME( ????, unkvsys, 0, unkvsys, aerofgt, 0, ROT90, "Video System Co.", "unknown" ) +GAMEX( ????, unkvsys, 0, unkvsys, aerofgt, 0, ROT90, "Video System Co.", "unknown", GAME_NO_COCKTAIL ) diff --git a/src/drivers/alpha68k.c b/src/drivers/alpha68k.c index 479b1264f..f79484ab6 100644 --- a/src/drivers/alpha68k.c +++ b/src/drivers/alpha68k.c @@ -40,7 +40,7 @@ General notes: Paddle Mania is (c) 1988 but is crude hardware and there are probably several earlier games running on it. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -1909,16 +1909,16 @@ static void init_btlfield(void) /******************************************************************************/ -GAMEX(1987, kyros, 0, kyros, timesold, 0, ROT90, "World Games Inc", "Kyros", GAME_NOT_WORKING ) -GAMEX(1988, sstingry, 0, kyros, sstingry, 0, ROT90, "SNK", "Super Stingray", GAME_NOT_WORKING ) -GAMEX(1988, paddlema, 0, alpha68k_I, timesold, 0, ROT90, "SNK", "Paddle Mania", GAME_NOT_WORKING ) -GAME( 1987, timesold, 0, alpha68k_II, timesold, timesold, ROT90, "SNK / Romstar", "Time Soldiers (Rev 3)" ) -GAMEX(1987, timesol1, timesold, alpha68k_II, timesold, 0, ROT90, "SNK / Romstar", "Time Soldiers (Rev 1)", GAME_NOT_WORKING ) -GAMEX(1987, btlfield, timesold, alpha68k_II, timesold, btlfield, ROT90, "SNK / Romstar", "Battlefield (Japan)", GAME_NOT_WORKING ) -GAME( 1988, skysoldr, 0, alpha68k_II, skysoldr, skysoldr, ROT90, "SNK / Romstar", "Sky Soldiers" ) -GAMEX(1988, goldmedl, 0, alpha68k_II, goldmedl, 0, ROT0, "SNK", "Gold Medalist", GAME_NOT_WORKING ) -GAMEX(1988, goldmedb, goldmedl, alpha68k_II, goldmedl, goldmedb, ROT0, "bootleg", "Gold Medalist (bootleg)", GAME_NOT_WORKING ) -GAME( 1989, skyadvnt, 0, alpha68k_V, skyadvnt, 0, ROT90, "SNK of America (licensed from Alpha)", "Sky Adventure" ) -GAMEX(1989, gangwars, 0, alpha68k_V, gangwars, gangwars, ROT0_16BIT, "Alpha", "Gang Wars", GAME_NOT_WORKING ) -GAME( 1989, gangwarb, gangwars, alpha68k_V, gangwars, gangwarb, ROT0_16BIT, "bootleg", "Gang Wars (bootleg)" ) -GAMEX(1989, sbasebal, 0, alpha68k_V_sb, sbasebal, 0, ROT0, "SNK of America (licensed from Alpha)", "Super Champion Baseball", GAME_NOT_WORKING ) +GAMEX( 1987, kyros, 0, kyros, timesold, 0, ROT90, "World Games Inc", "Kyros", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, sstingry, 0, kyros, sstingry, 0, ROT90, "SNK", "Super Stingray", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, paddlema, 0, alpha68k_I, timesold, 0, ROT90, "SNK", "Paddle Mania", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1987, timesold, 0, alpha68k_II, timesold, timesold, ROT90, "SNK / Romstar", "Time Soldiers (Rev 3)", GAME_NO_COCKTAIL ) +GAMEX( 1987, timesol1, timesold, alpha68k_II, timesold, 0, ROT90, "SNK / Romstar", "Time Soldiers (Rev 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1987, btlfield, timesold, alpha68k_II, timesold, btlfield, ROT90, "SNK / Romstar", "Battlefield (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, skysoldr, 0, alpha68k_II, skysoldr, skysoldr, ROT90, "SNK / Romstar", "Sky Soldiers", GAME_NO_COCKTAIL ) +GAMEX( 1988, goldmedl, 0, alpha68k_II, goldmedl, 0, ROT0, "SNK", "Gold Medalist", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, goldmedb, goldmedl, alpha68k_II, goldmedl, goldmedb, ROT0, "bootleg", "Gold Medalist (bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, skyadvnt, 0, alpha68k_V, skyadvnt, 0, ROT90, "SNK of America (licensed from Alpha)", "Sky Adventure", GAME_NO_COCKTAIL ) +GAMEX( 1989, gangwars, 0, alpha68k_V, gangwars, gangwars, ROT0_16BIT, "Alpha", "Gang Wars", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, gangwarb, gangwars, alpha68k_V, gangwars, gangwarb, ROT0_16BIT, "bootleg", "Gang Wars (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1989, sbasebal, 0, alpha68k_V_sb, sbasebal, 0, ROT0, "SNK of America (licensed from Alpha)", "Super Champion Baseball", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/arabian.c b/src/drivers/arabian.c index c83723d1d..2f606cf85 100644 --- a/src/drivers/arabian.c +++ b/src/drivers/arabian.c @@ -325,5 +325,5 @@ ROM_END -GAMEX( 1983, arabian, 0, arabian, arabian, 0, ROT270, "Sun Electronics", "Arabian", GAME_IMPERFECT_COLORS ) -GAMEX( 1983, arabiana, arabian, arabian, arabian, 0, ROT270, "[Sun Electronics] (Atari license)", "Arabian (Atari)", GAME_IMPERFECT_COLORS ) +GAMEX( 1983, arabian, 0, arabian, arabian, 0, ROT270, "Sun Electronics", "Arabian", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1983, arabiana, arabian, arabian, arabian, 0, ROT270, "[Sun Electronics] (Atari license)", "Arabian (Atari)", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/arkanoid.c b/src/drivers/arkanoid.c index ae4e3c09c..42f101607 100644 --- a/src/drivers/arkanoid.c +++ b/src/drivers/arkanoid.c @@ -252,7 +252,7 @@ static struct GfxLayout charlayout = static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0x00000, &charlayout, 0, 64 }, + { REGION_GFX1, 0, &charlayout, 0, 64 }, /* sprites use the same characters above, but are 16x8 */ { -1 } /* end of array */ }; diff --git a/src/drivers/armedf.c b/src/drivers/armedf.c index 0d19d66e0..6b2df2e88 100644 --- a/src/drivers/armedf.c +++ b/src/drivers/armedf.c @@ -1105,8 +1105,8 @@ ROM_END -GAME( 1987, terraf, 0, terraf, terraf, 0, ROT0, "Nichibutsu", "Terra Force" ) -GAME( 1987, terrafu, terraf, terraf, terraf, 0, ROT0, "Nichibutsu USA", "Terra Force (US)" ) -GAME( 1987, kodure, 0, kodure, kodure, 0, ROT0, "Nichibutsu", "Kodure Ookami (Japan)" ) -GAME( 1988, armedf, 0, armedf, armedf, 0, ROT270, "Nichibutsu", "Armed Formation" ) -GAME( 1988, cclimbr2, 0, cclimbr2, cclimbr2, 0, ROT0, "Nichibutsu", "Crazy Climber 2 (Japan)" ) +GAMEX( 1987, terraf, 0, terraf, terraf, 0, ROT0, "Nichibutsu", "Terra Force", GAME_NO_COCKTAIL ) +GAMEX( 1987, terrafu, terraf, terraf, terraf, 0, ROT0, "Nichibutsu USA", "Terra Force (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, kodure, 0, kodure, kodure, 0, ROT0, "Nichibutsu", "Kodure Ookami (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, armedf, 0, armedf, armedf, 0, ROT270, "Nichibutsu", "Armed Formation", GAME_NO_COCKTAIL ) +GAMEX( 1988, cclimbr2, 0, cclimbr2, cclimbr2, 0, ROT0, "Nichibutsu", "Crazy Climber 2 (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/asteroid.c b/src/drivers/asteroid.c index 9d9040700..1881c21fe 100644 --- a/src/drivers/asteroid.c +++ b/src/drivers/asteroid.c @@ -167,6 +167,7 @@ void llander_sh_stop(void); void llander_sh_update(void); int asteroid_IN0_r(int offset); +int asteroib_IN0_r(int offset); int asteroid_IN1_r(int offset); int asteroid_DSW1_r(int offset); int llander_IN0_r(int offset); @@ -208,6 +209,20 @@ static struct MemoryReadAddress asteroid_readmem[] = { -1 } /* end of table */ }; +static struct MemoryReadAddress asteroib_readmem[] = +{ + { 0x0000, 0x03ff, MRA_RAM }, + { 0x2000, 0x2000, asteroib_IN0_r }, /* IN0 */ + { 0x2003, 0x2003, input_port_3_r }, /* hyperspace */ + { 0x2400, 0x2407, asteroid_IN1_r }, /* IN1 */ + { 0x2800, 0x2803, asteroid_DSW1_r }, /* DSW1 */ + { 0x4000, 0x47ff, MRA_RAM }, + { 0x5000, 0x57ff, MRA_ROM }, /* vector rom */ + { 0x6800, 0x7fff, MRA_ROM }, + { 0xf800, 0xffff, MRA_ROM }, /* for the reset / interrupt vectors */ + { -1 } /* end of table */ +}; + static struct MemoryWriteAddress asteroid_writemem[] = { { 0x0000, 0x03ff, MWA_RAM }, @@ -288,26 +303,73 @@ static struct MemoryWriteAddress llander_writemem[] = INPUT_PORTS_START( asteroid ) PORT_START /* IN0 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Bit 2 and 3 are handled in the machine dependent part. */ /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ - PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) - PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BITX( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_START /* IN1 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) + + PORT_START /* DSW1 */ + PORT_DIPNAME( 0x03, 0x00, "Language" ) + PORT_DIPSETTING ( 0x00, "English" ) + PORT_DIPSETTING ( 0x01, "German" ) + PORT_DIPSETTING ( 0x02, "French" ) + PORT_DIPSETTING ( 0x03, "Spanish" ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) + PORT_DIPSETTING ( 0x04, "3" ) + PORT_DIPSETTING ( 0x00, "4" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING ( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING ( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING ( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Coinage ) ) + PORT_DIPSETTING ( 0xc0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING ( 0x80, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING ( 0x40, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING ( 0x00, DEF_STR( Free_Play ) ) +INPUT_PORTS_END + +INPUT_PORTS_START( asteroib ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* resets */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* resets */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + /* Bit 7 is VG_HALT, handled in the machine dependant part */ + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x00, "Language" ) @@ -315,7 +377,7 @@ INPUT_PORTS_START( asteroid ) PORT_DIPSETTING ( 0x01, "German" ) PORT_DIPSETTING ( 0x02, "French" ) PORT_DIPSETTING ( 0x03, "Spanish" ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPSETTING ( 0x04, "3" ) PORT_DIPSETTING ( 0x00, "4" ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) @@ -332,30 +394,34 @@ INPUT_PORTS_START( asteroid ) PORT_DIPSETTING ( 0x80, DEF_STR( 1C_1C ) ) PORT_DIPSETTING ( 0x40, DEF_STR( 1C_2C ) ) PORT_DIPSETTING ( 0x00, DEF_STR( Free_Play ) ) + + PORT_START /* hyperspace */ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) INPUT_PORTS_END INPUT_PORTS_START( astdelux ) PORT_START /* IN0 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Bit 2 and 3 are handled in the machine dependent part. */ /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ - PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) - PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BITX ( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BITX( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_START /* IN1 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_START /* DSW 1 */ PORT_DIPNAME( 0x03, 0x00, "Language" ) @@ -405,22 +471,22 @@ INPUT_PORTS_END INPUT_PORTS_START( llander ) PORT_START /* IN0 */ /* Bit 0 is VG_HALT, handled in the machine dependant part */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) - PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */ - PORT_BIT ( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) PORT_START /* IN1 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BITX( 0x10, IP_ACTIVE_HIGH, IPT_START2, "Select Game", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) - PORT_BITX( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, "Abort", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BITX(0x10, IP_ACTIVE_HIGH, IPT_START2, "Select Game", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, "Abort", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x01, "Right Coin" ) @@ -454,22 +520,22 @@ INPUT_PORTS_END INPUT_PORTS_START( llander1 ) PORT_START /* IN0 */ /* Bit 0 is VG_HALT, handled in the machine dependant part */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) - PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */ - PORT_BIT ( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", KEYCODE_F1, IP_JOY_NONE ) PORT_START /* IN1 */ - PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BITX( 0x10, IP_ACTIVE_HIGH, IPT_START2, "Select Game", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) - PORT_BITX( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, "Abort", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) - PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) - PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BITX(0x10, IP_ACTIVE_HIGH, IPT_START2, "Select Game", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, "Abort", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x01, "Right Coin" ) @@ -574,6 +640,43 @@ static struct MachineDriver machine_driver_asteroid = } }; +static struct MachineDriver machine_driver_asteroib = +{ + /* basic machine hardware */ + { + { + CPU_M6502, + 1500000, /* 1.5 Mhz */ + asteroib_readmem,asteroid_writemem,0,0, + asteroid_interrupt,4 /* 250 Hz */ + } + }, + 60, 0, /* frames per second, vblank duration (vector game, so no vblank) */ + 1, + asteroid_init_machine, + + /* video hardware */ + 400, 300, { 0, 1040, 70, 950 }, + 0, + 256, 256, + avg_init_palette_white, + + VIDEO_TYPE_VECTOR, + 0, + dvg_start, + dvg_stop, + dvg_screenrefresh, + + /* sound hardware */ + 0,0,0,0, + { + { + SOUND_CUSTOM, + &asteroid_custom_interface + } + } +}; + static struct POKEYinterface pokey_interface = @@ -619,7 +722,7 @@ static struct MachineDriver machine_driver_astdelux = 400, 300, { 0, 1040, 70, 950 }, 0, 256, 256, - avg_init_palette_aqua, + avg_init_palette_astdelux, VIDEO_TYPE_VECTOR, 0, @@ -695,6 +798,16 @@ static struct MachineDriver machine_driver_llander = ***************************************************************************/ +ROM_START( asteroid ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ + ROM_LOAD( "035145.02", 0x6800, 0x0800, 0x0cc75459 ) + ROM_LOAD( "035144.02", 0x7000, 0x0800, 0x096ed35c ) + ROM_LOAD( "035143.02", 0x7800, 0x0800, 0x312caa02 ) + ROM_RELOAD( 0xf800, 0x0800 ) /* for reset/interrupt vectors */ + /* Vector ROM */ + ROM_LOAD( "035127.02", 0x5000, 0x0800, 0x8b71fd9e ) +ROM_END + ROM_START( asteroi1 ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ ROM_LOAD( "035145.01", 0x6800, 0x0800, 0xe9bfda64 ) @@ -705,11 +818,11 @@ ROM_START( asteroi1 ) ROM_LOAD( "035127.01", 0x5000, 0x0800, 0x99699366 ) ROM_END -ROM_START( asteroid ) +ROM_START( asteroib ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ - ROM_LOAD( "035145.02", 0x6800, 0x0800, 0x0cc75459 ) - ROM_LOAD( "035144.02", 0x7000, 0x0800, 0x096ed35c ) - ROM_LOAD( "035143.02", 0x7800, 0x0800, 0x312caa02 ) + ROM_LOAD( "035145ll.bin", 0x6800, 0x0800, 0x605fc0f2 ) + ROM_LOAD( "035144ll.bin", 0x7000, 0x0800, 0xe106de77 ) + ROM_LOAD( "035143ll.bin", 0x7800, 0x0800, 0x6b1d8594 ) ROM_RELOAD( 0xf800, 0x0800 ) /* for reset/interrupt vectors */ /* Vector ROM */ ROM_LOAD( "035127.02", 0x5000, 0x0800, 0x8b71fd9e ) @@ -773,6 +886,7 @@ ROM_END GAME( 1979, asteroid, 0, asteroid, asteroid, 0, ROT0, "Atari", "Asteroids (rev 2)" ) GAME( 1979, asteroi1, asteroid, asteroid, asteroid, 0, ROT0, "Atari", "Asteroids (rev 1)" ) +GAME( 1979, asteroib, asteroid, asteroib, asteroib, 0, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)" ) GAME( 1980, astdelux, 0, astdelux, astdelux, 0, ROT0, "Atari", "Asteroids Deluxe (rev 2)" ) GAME( 1980, astdelu1, astdelux, astdelux, astdelux, 0, ROT0, "Atari", "Asteroids Deluxe (rev 1)" ) GAME( 1979, llander, 0, llander, llander, 0, ROT0, "Atari", "Lunar Lander (rev 2)" ) diff --git a/src/drivers/atarisy2.c b/src/drivers/atarisy2.c index 2707a7db9..36a7f29b5 100644 --- a/src/drivers/atarisy2.c +++ b/src/drivers/atarisy2.c @@ -2003,5 +2003,5 @@ GAME( 1986, 720, 0, a720, 720, a720, ROT0, "Atari Games", GAME( 1986, 720b, 720, a720, 720, a720, ROT0, "Atari Games", "720 Degrees (set 2)" ) GAME( 1986, ssprint, 0, sprint, ssprint, ssprint, ROT0, "Atari Games", "Super Sprint" ) GAME( 1986, csprint, 0, sprint, csprint, csprint, ROT0, "Atari Games", "Championship Sprint" ) -GAME( 1987, apb, 0, paperboy, apb, apb, ROT270, "Atari Games", "APB (set 1)" ) -GAME( 1987, apb2, apb, paperboy, apb, apb, ROT270, "Atari Games", "APB (set 2)" ) +GAME( 1987, apb, 0, paperboy, apb, apb, ROT270, "Atari Games", "APB - All Points Bulletin (set 1)" ) +GAME( 1987, apb2, apb, paperboy, apb, apb, ROT270, "Atari Games", "APB - All Points Bulletin (set 2)" ) diff --git a/src/drivers/ataxx.c b/src/drivers/ataxx.c index e41eb358d..da88a8af1 100644 --- a/src/drivers/ataxx.c +++ b/src/drivers/ataxx.c @@ -854,7 +854,7 @@ ATAXX_MACHINE_DRIVER(ataxx,ataxx_readport, ataxx_writeport, ROM_START( ataxx ) ROM_REGION( 0x80000, REGION_CPU1 ) - ROM_LOAD( "ataxx.038", 0x00000, 0x20000, 0x0e1cf6236) + ROM_LOAD( "ataxx.038", 0x00000, 0x20000, 0x0e1cf6236 ) ROM_REGION( 0xc0000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "ataxx.098", 0x00000, 0x20000, 0x059d0f2ae ) @@ -881,7 +881,7 @@ ROM_END ROM_START( ataxxa ) ROM_REGION( 0x80000, REGION_CPU1 ) - ROM_LOAD( "u38", 0x00000, 0x20000, 0x3378937d) + ROM_LOAD( "u38", 0x00000, 0x20000, 0x3378937d ) ROM_REGION( 0xc0000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "ataxx.098", 0x00000, 0x20000, 0x059d0f2ae ) diff --git a/src/drivers/bagman.c b/src/drivers/bagman.c index bb6f02f7a..5141022b0 100644 --- a/src/drivers/bagman.c +++ b/src/drivers/bagman.c @@ -5,6 +5,10 @@ Bagman memory map (preliminary) driver by Nicola Salmoria protection emulation by Jarek Burczynski and Andrew Deschenes +TODO: +- speech + + 0000-5fff ROM 6000-67ff RAM 9000-93ff Video RAM @@ -676,10 +680,10 @@ ROM_END -GAME( 1982, bagman, 0, bagman, bagman, 0, ROT270, "Valadon Automation", "Bagman" ) -GAME( 1982, bagnard, bagman, bagman, bagman, 0, ROT270, "Valadon Automation", "Le Bagnard" ) -GAME( 1982, bagmans, bagman, bagman, bagmans, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 1)" ) -GAME( 1982, bagmans2, bagman, bagman, bagman, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 2)" ) -GAME( 1984, sbagman, 0, bagman, sbagman, 0, ROT270, "Valadon Automation", "Super Bagman" ) -GAME( 1984, sbagmans, sbagman, bagman, sbagman, 0, ROT270, "Valadon Automation (Stern license)", "Super Bagman (Stern)" ) +GAMEX(1982, bagman, 0, bagman, bagman, 0, ROT270, "Valadon Automation", "Bagman", GAME_IMPERFECT_SOUND ) +GAMEX(1982, bagnard, bagman, bagman, bagman, 0, ROT270, "Valadon Automation", "Le Bagnard", GAME_IMPERFECT_SOUND ) +GAMEX(1982, bagmans, bagman, bagman, bagmans, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 1)", GAME_IMPERFECT_SOUND ) +GAMEX(1982, bagmans2, bagman, bagman, bagman, 0, ROT270, "Valadon Automation (Stern license)", "Bagman (Stern set 2)", GAME_IMPERFECT_SOUND ) +GAMEX(1984, sbagman, 0, bagman, sbagman, 0, ROT270, "Valadon Automation", "Super Bagman", GAME_IMPERFECT_SOUND ) +GAMEX(1984, sbagmans, sbagman, bagman, sbagman, 0, ROT270, "Valadon Automation (Stern license)", "Super Bagman (Stern)", GAME_IMPERFECT_SOUND ) GAME( 1983, pickin, 0, pickin, pickin, 0, ROT270, "Valadon Automation", "Pickin'" ) diff --git a/src/drivers/baraduke.c b/src/drivers/baraduke.c index 252fe1da9..97bf96732 100644 --- a/src/drivers/baraduke.c +++ b/src/drivers/baraduke.c @@ -164,9 +164,9 @@ INPUT_PORTS_START( baraduke ) PORT_START /* DSW A */ PORT_SERVICE( 0x01, IP_ACTIVE_HIGH ) PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x02, "4" ) - PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x06, "5" ) PORT_DIPNAME( 0x18, 0x00, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x18, DEF_STR( 3C_1C ) ) @@ -174,8 +174,8 @@ INPUT_PORTS_START( baraduke ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) @@ -184,22 +184,22 @@ INPUT_PORTS_START( baraduke ) PORT_START /* DSW B */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "10k every 20k" ) - PORT_DIPSETTING( 0x01, "every 20k" ) - PORT_DIPSETTING( 0x02, "every 10k" ) - PORT_DIPSETTING( 0x03, "nothing" ) + PORT_DIPSETTING( 0x02, "Every 10k" ) + PORT_DIPSETTING( 0x00, "10k and every 20k" ) + PORT_DIPSETTING( 0x01, "Every 20k" ) + PORT_DIPSETTING( 0x03, "None" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x08, "Easy" ) PORT_DIPSETTING( 0x00, "Normal" ) PORT_DIPSETTING( 0x04, "Hard" ) - PORT_DIPSETTING( 0x08, "Easy" ) PORT_DIPSETTING( 0x0c, "Very hard" ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_BITX( 0x10, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack test", IP_KEY_NONE, IP_JOY_NONE ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Freeze" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x00, "Allow continue from last level" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) @@ -216,13 +216,11 @@ INPUT_PORTS_START( baraduke ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Another service dip */ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 0 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START3 ) /* service */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) @@ -232,20 +230,20 @@ INPUT_PORTS_START( baraduke ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 1 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 2 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -261,9 +259,9 @@ INPUT_PORTS_START( metrocrs ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) PORT_DIPNAME( 0x18, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x10, "Easy" ) PORT_DIPSETTING( 0x00, "Normal" ) PORT_DIPSETTING( 0x08, "Hard" ) - PORT_DIPSETTING( 0x10, "Easy" ) PORT_DIPSETTING( 0x18, "Very hard" ) PORT_DIPNAME( 0x20, 0x00, "Allow Continue" ) PORT_DIPSETTING( 0x20, DEF_STR( No ) ) @@ -276,14 +274,14 @@ INPUT_PORTS_START( metrocrs ) PORT_START /* DSW B */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, "Round Skip" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BITX( 0x02, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack test", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x00, "Freeze" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) @@ -310,13 +308,11 @@ INPUT_PORTS_START( metrocrs ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Another service dip */ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 0 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START3 ) /* service */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) @@ -326,20 +322,20 @@ INPUT_PORTS_START( metrocrs ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 1 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START /* IN 2 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -593,5 +589,5 @@ static void init_metrocrs( void ) -GAME( 1985, baraduke, 0, baraduke, baraduke, 0, ROT0, "Namco", "Baraduke" ) -GAME( 1985, metrocrs, 0, metrocrs, metrocrs, metrocrs, ROT0, "Namco", "Metro-Cross" ) +GAMEX( 1985, baraduke, 0, baraduke, baraduke, 0, ROT0, "Namco", "Baraduke", GAME_NO_COCKTAIL ) +GAMEX( 1985, metrocrs, 0, metrocrs, metrocrs, metrocrs, ROT0, "Namco", "Metro-Cross", GAME_NO_COCKTAIL ) diff --git a/src/drivers/battlane.c b/src/drivers/battlane.c index 974972fd9..672745c79 100644 --- a/src/drivers/battlane.c +++ b/src/drivers/battlane.c @@ -452,6 +452,6 @@ static void init_battlane(void) -GAMEX( 1986, battlane, 0, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 1)", GAME_WRONG_COLORS ) -GAMEX( 1986, battlan2, battlane, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 2)", GAME_WRONG_COLORS ) -GAMEX( 1986, battlan3, battlane, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 3)", GAME_WRONG_COLORS ) +GAMEX( 1986, battlane, 0, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 1)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1986, battlan2, battlane, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 2)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1986, battlan3, battlane, battlane, battlane, battlane, ROT90, "Technos (Taito license)", "Battle Lane Vol. 5 (set 3)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/blktiger.c b/src/drivers/blktiger.c index e412ac19a..0f1184c3c 100644 --- a/src/drivers/blktiger.c +++ b/src/drivers/blktiger.c @@ -464,7 +464,7 @@ ROM_END -GAME( 1987, blktiger, 0, blktiger, blktiger, 0, ROT0, "Capcom", "Black Tiger" ) -GAME( 1987, bktigerb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Tiger (bootleg)" ) -GAME( 1987, blkdrgon, blktiger, blktiger, blktiger, 0, ROT0, "Capcom", "Black Dragon" ) -GAME( 1987, blkdrgnb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Dragon (bootleg)" ) +GAMEX( 1987, blktiger, 0, blktiger, blktiger, 0, ROT0, "Capcom", "Black Tiger", GAME_NO_COCKTAIL ) +GAMEX( 1987, bktigerb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Tiger (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1987, blkdrgon, blktiger, blktiger, blktiger, 0, ROT0, "Capcom", "Black Dragon", GAME_NO_COCKTAIL ) +GAMEX( 1987, blkdrgnb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Dragon (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/blockade.c b/src/drivers/blockade.c index bbc4b0867..9242e55b0 100644 --- a/src/drivers/blockade.c +++ b/src/drivers/blockade.c @@ -703,7 +703,7 @@ ROM_END -GAME( 1976, blockade, 0, blockade, blockade, blockade, ROT0, "Gremlin", "Blockade" ) -GAME( 1976, comotion, 0, comotion, comotion, comotion, ROT0, "Gremlin", "Comotion" ) -GAME( 1978, blasto, 0, blasto, blasto, comotion, ROT0, "Gremlin", "Blasto" ) -GAME( 1977, hustle, 0, hustle, hustle, comotion, ROT0, "Gremlin", "Hustle" ) +GAMEX( 1976, blockade, 0, blockade, blockade, blockade, ROT0, "Gremlin", "Blockade", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1976, comotion, 0, comotion, comotion, comotion, ROT0, "Gremlin", "Comotion", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1978, blasto, 0, blasto, blasto, comotion, ROT0, "Gremlin", "Blasto", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1977, hustle, 0, hustle, hustle, comotion, ROT0, "Gremlin", "Hustle", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/bogeyman.c b/src/drivers/bogeyman.c index 181d98bbf..742652d05 100644 --- a/src/drivers/bogeyman.c +++ b/src/drivers/bogeyman.c @@ -4,9 +4,9 @@ This game runs on Data East designed hardware. - Todo: Colour, input ports, cocktail mode + Todo: Cocktail mode - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk and T.Nogi ***************************************************************************/ @@ -166,7 +166,7 @@ static struct GfxLayout charlayout1 = 8,8, /* 8*8 chars */ 512, 3, - { 0x8000*8+4, 0, 4 }, // Modified by T.Nogi 1999/11/07 + { 0x8000*8+4, 0, 4 }, { 0x2000*8+3, 0x2000*8+2, 0x2000*8+1, 0x2000*8+0, 3, 2, 1, 0, }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, 8*8 /* every char takes 16 consecutive bytes */ @@ -177,7 +177,7 @@ static struct GfxLayout charlayout2 = 8,8, /* 8*8 chars */ 512, 3, - { 0x8000*8, 0+0x1000*8, 4+0x1000*8, 0 }, // Modified by T.Nogi 1999/11/07 + { 0x8000*8, 0+0x1000*8, 4+0x1000*8, 0 }, { 0x2000*8+3, 0x2000*8+2, 0x2000*8+1, 0x2000*8+0, 3, 2, 1, 0, }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, 8*8 /* every char takes 16 consecutive bytes */ @@ -201,7 +201,7 @@ static struct GfxLayout tiles1b = 16,16, 0x80, 3, - { 0x8000*8+0, 0+0x1000*8+0, 4+0x1000*8 }, // Modified by T.Nogi 1999/11/07 + { 0x8000*8+0, 0+0x1000*8+0, 4+0x1000*8 }, { 1024*8*8+3, 1024*8*8+2, 1024*8*8+1, 1024*8*8+0, 3,2,1,0, 1024*8*8+3+64, 1024*8*8+2+64, 1024*8*8+1+64, 1024*8*8+0+64, 3+64,2+64,1+64,0+64 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, @@ -320,4 +320,4 @@ ROM_END /******************************************************************************/ -GAMEX( 1985?, bogeyman, 0, bogeyman, bogeyman, 0, ROT0, "Technos Japan", "Bogey Manor", GAME_IMPERFECT_COLORS ) +GAMEX( 1985?, bogeyman, 0, bogeyman, bogeyman, 0, ROT0, "Technos Japan", "Bogey Manor", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/bosco.c b/src/drivers/bosco.c index 76da10933..0642991dd 100644 --- a/src/drivers/bosco.c +++ b/src/drivers/bosco.c @@ -233,7 +233,7 @@ INPUT_PORTS_START( bosco ) PORT_DIPSETTING( 0x20, "20K 70K 70K" ) PORT_DIPSETTING( 0x28, "30K 100K 100K" ) PORT_DIPSETTING( 0x00, "None" ) - PORT_DIPNAME( 0xc0, 0x80, "Fighters" ) + PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x40, "2" ) PORT_DIPSETTING( 0x80, "3" ) @@ -316,7 +316,7 @@ INPUT_PORTS_START( boscomd ) PORT_DIPSETTING( 0x20, "20K 70K 70K" ) PORT_DIPSETTING( 0x28, "30K 100K 100K" ) PORT_DIPSETTING( 0x00, "None" ) - PORT_DIPNAME( 0xc0, 0x80, "Fighters" ) + PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x40, "2" ) PORT_DIPSETTING( 0x80, "3" ) @@ -528,6 +528,46 @@ static struct MachineDriver machine_driver_bosco = ***************************************************************************/ ROM_START( bosco ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code for the first CPU */ + ROM_LOAD( "bos3_1.bin", 0x0000, 0x1000, 0x96021267 ) + ROM_LOAD( "bos1_2.bin", 0x1000, 0x1000, 0x2d8f3ebe ) + ROM_LOAD( "bos1_3.bin", 0x2000, 0x1000, 0xc80ccfa5 ) + ROM_LOAD( "bos1_4b.bin", 0x3000, 0x1000, 0xa3f7f4ab ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the second CPU */ + ROM_LOAD( "bos1_5c.bin", 0x0000, 0x1000, 0xa7c8e432 ) + ROM_LOAD( "bos3_6.bin", 0x1000, 0x1000, 0x4543cf82 ) + + ROM_REGION( 0x10000, REGION_CPU3 ) /* 64k for the third CPU */ + ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) + + ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) + + ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) + + ROM_REGION( 0x0100, REGION_GFX3 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ + + ROM_REGION( 0x0260, REGION_PROMS ) + ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ + ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ + ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ + ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ + ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ + + ROM_REGION( 0x0200, REGION_SOUND1 ) /* sound prom */ + ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) + ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ + + ROM_REGION( 0x3000, REGION_SOUND2 ) /* ROMs for digitised speech */ + ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) + ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) + ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) +ROM_END + +ROM_START( boscoo ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code for the first CPU */ ROM_LOAD( "bos1_1.bin", 0x0000, 0x1000, 0x0d9920e7 ) ROM_LOAD( "bos1_2.bin", 0x1000, 0x1000, 0x2d8f3ebe ) @@ -536,119 +576,120 @@ ROM_START( bosco ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the second CPU */ ROM_LOAD( "bos1_5c.bin", 0x0000, 0x1000, 0xa7c8e432 ) - ROM_LOAD( "2800.3h", 0x1000, 0x1000, 0x31b8c648 ) + ROM_LOAD( "2800.3h", 0x1000, 0x1000, 0x31b8c648 ) ROM_REGION( 0x10000, REGION_CPU3 ) /* 64k for the third CPU */ - ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) + ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) + ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) + ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) ROM_REGION( 0x0100, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ + ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ ROM_REGION( 0x0260, REGION_PROMS ) - ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ - ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ - ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ - ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ - ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ + ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ + ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ + ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ + ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ + ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ ROM_REGION( 0x0200, REGION_SOUND1 ) /* sound prom */ - ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) - ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ + ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) + ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ ROM_REGION( 0x3000, REGION_SOUND2 ) /* ROMs for digitised speech */ - ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) - ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) - ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) + ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) + ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) + ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) ROM_END ROM_START( boscomd ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code for the first CPU */ - ROM_LOAD( "3n", 0x0000, 0x1000, 0x441b501a ) - ROM_LOAD( "3m", 0x1000, 0x1000, 0xa3c5c7ef ) - ROM_LOAD( "3l", 0x2000, 0x1000, 0x6ca9a0cf ) - ROM_LOAD( "3k", 0x3000, 0x1000, 0xd83bacc5 ) + ROM_LOAD( "3n", 0x0000, 0x1000, 0x441b501a ) + ROM_LOAD( "3m", 0x1000, 0x1000, 0xa3c5c7ef ) + ROM_LOAD( "3l", 0x2000, 0x1000, 0x6ca9a0cf ) + ROM_LOAD( "3k", 0x3000, 0x1000, 0xd83bacc5 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the second CPU */ - ROM_LOAD( "3j", 0x0000, 0x1000, 0x4374e39a ) - ROM_LOAD( "3h", 0x1000, 0x1000, 0x04e9fcef ) + ROM_LOAD( "3j", 0x0000, 0x1000, 0x4374e39a ) + ROM_LOAD( "3h", 0x1000, 0x1000, 0x04e9fcef ) ROM_REGION( 0x10000, REGION_CPU3 ) /* 64k for the third CPU */ - ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) + ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) + ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) + ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) ROM_REGION( 0x0100, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ + ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ ROM_REGION( 0x0260, REGION_PROMS ) - ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ - ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ - ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ - ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ - ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ + ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ + ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ + ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ + ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ + ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ ROM_REGION( 0x0200, REGION_SOUND1 ) /* sound prom */ - ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) - ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ + ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) + ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ ROM_REGION( 0x3000, REGION_SOUND2 ) /* ROMs for digitised speech */ - ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) - ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) - ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) + ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) + ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) + ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) ROM_END ROM_START( boscomdo ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code for the first CPU */ - ROM_LOAD( "2300.3n", 0x0000, 0x1000, 0xdb6128b0 ) - ROM_LOAD( "2400.3m", 0x1000, 0x1000, 0x86907614 ) - ROM_LOAD( "2500.3l", 0x2000, 0x1000, 0xa21fae11 ) - ROM_LOAD( "2600.3k", 0x3000, 0x1000, 0x11d6ae23 ) + ROM_LOAD( "2300.3n", 0x0000, 0x1000, 0xdb6128b0 ) + ROM_LOAD( "2400.3m", 0x1000, 0x1000, 0x86907614 ) + ROM_LOAD( "2500.3l", 0x2000, 0x1000, 0xa21fae11 ) + ROM_LOAD( "2600.3k", 0x3000, 0x1000, 0x11d6ae23 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the second CPU */ - ROM_LOAD( "2700.3j", 0x0000, 0x1000, 0x7254e65e ) - ROM_LOAD( "2800.3h", 0x1000, 0x1000, 0x31b8c648 ) + ROM_LOAD( "2700.3j", 0x0000, 0x1000, 0x7254e65e ) + ROM_LOAD( "2800.3h", 0x1000, 0x1000, 0x31b8c648 ) ROM_REGION( 0x10000, REGION_CPU3 ) /* 64k for the third CPU */ - ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) + ROM_LOAD( "2900.3e", 0x0000, 0x1000, 0xd45a4911 ) ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) + ROM_LOAD( "5300.5d", 0x0000, 0x1000, 0xa956d3c5 ) ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) + ROM_LOAD( "5200.5e", 0x0000, 0x1000, 0xe869219c ) ROM_REGION( 0x0100, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ + ROM_LOAD( "prom.2d", 0x0000, 0x0100, 0x9b69b543 ) /* dots */ ROM_REGION( 0x0260, REGION_PROMS ) - ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ - ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ - ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ - ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ - ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ + ROM_LOAD( "bosco.6b", 0x0000, 0x0020, 0xd2b96fb0 ) /* palette */ + ROM_LOAD( "bosco.4m", 0x0020, 0x0100, 0x4e15d59c ) /* lookup table */ + ROM_LOAD( "prom.1d", 0x0120, 0x0100, 0xde2316c6 ) /* ?? */ + ROM_LOAD( "prom.2r", 0x0220, 0x0020, 0xb88d5ba9 ) /* ?? */ + ROM_LOAD( "prom.7h", 0x0240, 0x0020, 0x87d61353 ) /* ?? */ ROM_REGION( 0x0200, REGION_SOUND1 ) /* sound prom */ - ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) - ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ + ROM_LOAD( "bosco.spr", 0x0000, 0x0100, 0xee8ca3a8 ) + ROM_LOAD( "prom.5c", 0x0100, 0x0100, 0x77245b66 ) /* timing - not used */ ROM_REGION( 0x3000, REGION_SOUND2 ) /* ROMs for digitised speech */ - ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) - ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) - ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) + ROM_LOAD( "4900.5n", 0x0000, 0x1000, 0x09acc978 ) + ROM_LOAD( "5000.5m", 0x1000, 0x1000, 0xe571e959 ) + ROM_LOAD( "5100.5l", 0x2000, 0x1000, 0x17ac9511 ) ROM_END -GAME( 1981, bosco, 0, bosco, bosco, 0, ROT0, "Namco", "Bosconian" ) +GAME( 1981, bosco, 0, bosco, bosco, 0, ROT0, "Namco", "Bosconian (new version)" ) +GAME( 1981, boscoo, bosco, bosco, bosco, 0, ROT0, "Namco", "Bosconian (old version)" ) GAME( 1981, boscomd, bosco, bosco, boscomd, 0, ROT0, "[Namco] (Midway license)", "Bosconian (Midway, new version)" ) GAME( 1981, boscomdo, bosco, bosco, boscomd, 0, ROT0, "[Namco] (Midway license)", "Bosconian (Midway, old version)" ) diff --git a/src/drivers/btime.c b/src/drivers/btime.c index cde15c589..c10554510 100644 --- a/src/drivers/btime.c +++ b/src/drivers/btime.c @@ -555,9 +555,9 @@ static void sound_command_w(int offset,int data) INPUT_PORTS_START( btime ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -565,9 +565,9 @@ INPUT_PORTS_START( btime ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -632,9 +632,9 @@ INPUT_PORTS_END INPUT_PORTS_START( cookrace ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED ) @@ -642,9 +642,9 @@ INPUT_PORTS_START( cookrace ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED ) @@ -700,29 +700,28 @@ INPUT_PORTS_START( cookrace ) PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0xc0, "Easy" ) + PORT_DIPSETTING( 0x80, "Normal" ) + PORT_DIPSETTING( 0x40, "Hard" ) + PORT_DIPSETTING( 0x00, "Hardest" ) INPUT_PORTS_END INPUT_PORTS_START( zoar ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -787,17 +786,17 @@ INPUT_PORTS_END INPUT_PORTS_START( lnc ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -836,7 +835,7 @@ INPUT_PORTS_START( lnc ) PORT_DIPSETTING( 0x06, "15000" ) PORT_DIPSETTING( 0x04, "20000" ) PORT_DIPSETTING( 0x02, "30000" ) - PORT_DIPSETTING( 0x00, "Never" ) + PORT_DIPSETTING( 0x00, "None" ) PORT_DIPNAME( 0x08, 0x08, "Game Speed" ) PORT_DIPSETTING( 0x08, "Slow" ) PORT_DIPSETTING( 0x00, "Hard" ) @@ -857,17 +856,17 @@ INPUT_PORTS_END INPUT_PORTS_START( wtennis ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -907,7 +906,7 @@ INPUT_PORTS_START( wtennis ) PORT_DIPSETTING( 0x06, "10000" ) PORT_DIPSETTING( 0x04, "20000" ) PORT_DIPSETTING( 0x02, "30000" ) - PORT_DIPSETTING( 0x00, "Never" ) + PORT_DIPSETTING( 0x00, "None" ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* definately used */ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) @@ -928,17 +927,17 @@ INPUT_PORTS_END INPUT_PORTS_START( mmonkey ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -975,15 +974,15 @@ INPUT_PORTS_START( mmonkey ) PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x00, "5" ) PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x06, "Never" ) PORT_DIPSETTING( 0x02, "Every 15000" ) - PORT_DIPSETTING( 0x00, "20000" ) PORT_DIPSETTING( 0x04, "Every 30000" ) + PORT_DIPSETTING( 0x00, "20000" ) + PORT_DIPSETTING( 0x06, "None" ) PORT_DIPNAME( 0x18, 0x08, DEF_STR( Difficulty ) ) - PORT_BITX( 0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Level Skip Mode", IP_KEY_NONE, IP_JOY_NONE ) PORT_DIPSETTING( 0x18, "Easy" ) PORT_DIPSETTING( 0x08, "Medium" ) PORT_DIPSETTING( 0x10, "Hard" ) + PORT_BITX( 0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Level Skip Mode", IP_KEY_NONE, IP_JOY_NONE ) PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) /* almost certainly unused */ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) @@ -996,9 +995,9 @@ INPUT_PORTS_END INPUT_PORTS_START( bnj ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1006,9 +1005,9 @@ INPUT_PORTS_START( bnj ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1074,18 +1073,18 @@ INPUT_PORTS_END INPUT_PORTS_START( disco ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 ) @@ -1127,7 +1126,7 @@ INPUT_PORTS_START( disco ) PORT_DIPSETTING( 0x00, "10000" ) PORT_DIPSETTING( 0x02, "20000" ) PORT_DIPSETTING( 0x04, "30000" ) - PORT_DIPSETTING( 0x06, "Never" ) + PORT_DIPSETTING( 0x06, "None" ) PORT_DIPNAME( 0x08, 0x00, "Music Weapons" ) PORT_DIPSETTING( 0x00, "5" ) PORT_DIPSETTING( 0x08, "8" ) diff --git a/src/drivers/bublbobl.c b/src/drivers/bublbobl.c index 3de33bd6a..fa0af6d7c 100644 --- a/src/drivers/bublbobl.c +++ b/src/drivers/bublbobl.c @@ -1086,10 +1086,10 @@ void init_boblbobl(void) -GAME( 1986, bublbobl, 0, bublbobl, bublbobl, 0, ROT0, "Taito Corporation", "Bubble Bobble" ) -GAME( 1986, bublbobr, bublbobl, bublbobl, bublbobl, 0, ROT0, "Taito America Corporation (Romstar license)", "Bubble Bobble (US set 1)" ) -GAME( 1986, bubbobr1, bublbobl, bublbobl, bublbobl, 0, ROT0, "Taito America Corporation (Romstar license)", "Bubble Bobble (US set 2)" ) -GAME( 1986, boblbobl, bublbobl, boblbobl, boblbobl, boblbobl, ROT0, "bootleg", "Bobble Bobble" ) -GAME( 1986, sboblbob, bublbobl, boblbobl, sboblbob, 0, ROT0, "bootleg", "Super Bobble Bobble" ) -GAMEX(1986, tokio, 0, tokio, tokio, 0, ROT90, "Taito", "Tokio / Scramble Formation", GAME_NOT_WORKING ) -GAME( 1986, tokiob, tokio, tokio, tokio, 0, ROT90, "bootleg", "Tokio / Scramble Formation (bootleg)" ) +GAMEX( 1986, bublbobl, 0, bublbobl, bublbobl, 0, ROT0, "Taito Corporation", "Bubble Bobble", GAME_NO_COCKTAIL ) +GAMEX( 1986, bublbobr, bublbobl, bublbobl, bublbobl, 0, ROT0, "Taito America Corporation (Romstar license)", "Bubble Bobble (US set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1986, bubbobr1, bublbobl, bublbobl, bublbobl, 0, ROT0, "Taito America Corporation (Romstar license)", "Bubble Bobble (US set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1986, boblbobl, bublbobl, boblbobl, boblbobl, boblbobl, ROT0, "bootleg", "Bobble Bobble", GAME_NO_COCKTAIL ) +GAMEX( 1986, sboblbob, bublbobl, boblbobl, sboblbob, 0, ROT0, "bootleg", "Super Bobble Bobble", GAME_NO_COCKTAIL ) +GAMEX( 1986, tokio, 0, tokio, tokio, 0, ROT90, "Taito", "Tokio / Scramble Formation", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1986, tokiob, tokio, tokio, tokio, 0, ROT90, "bootleg", "Tokio / Scramble Formation (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/bzone.c b/src/drivers/bzone.c index ff14b5f2d..690ae9b4d 100644 --- a/src/drivers/bzone.c +++ b/src/drivers/bzone.c @@ -197,7 +197,6 @@ All different denominations |Off |Off | | | #define IN0_VG_HALT (1<<6) void redbaron_sounds_w (int offset,int data); -void bzone_pokey_w (int offset, int data); void bzone_sounds_w (int offset, int data); int bzone_sh_start(const struct MachineSound *msound); void bzone_sh_stop(void); @@ -283,9 +282,9 @@ static struct MemoryWriteAddress bzone_writemem[] = { 0x0000, 0x03ff, MWA_RAM }, { 0x1000, 0x1000, coin_counter_w }, { 0x1200, 0x1200, avgdvg_go }, - { 0x1400, 0x1400, MWA_NOP }, /* watchdog clear */ + { 0x1400, 0x1400, watchdog_reset_w }, { 0x1600, 0x1600, avgdvg_reset }, - { 0x1820, 0x182f, bzone_pokey_w }, + { 0x1820, 0x182f, pokey1_w }, { 0x1840, 0x1840, bzone_sounds_w }, { 0x1860, 0x187f, mb_go }, { 0x2000, 0x2fff, MWA_RAM, &vectorram, &vectorram_size }, diff --git a/src/drivers/cabal.c b/src/drivers/cabal.c index 64582da39..c556bbce9 100644 --- a/src/drivers/cabal.c +++ b/src/drivers/cabal.c @@ -590,6 +590,6 @@ ROM_END -GAMEX(1988, cabal, 0, cabal, cabal, 0, ROT0, "Tad (Fabtek license)", "Cabal (US set 1)", GAME_NOT_WORKING ) -GAMEX(1988, cabal2, cabal, cabal, cabal, 0, ROT0, "Tad (Fabtek license)", "Cabal (US set 2)", GAME_NOT_WORKING ) -GAME( 1988, cabalbl, cabal, cabalbl, cabal, 0, ROT0, "bootleg", "Cabal (bootleg)" ) +GAMEX( 1988, cabal, 0, cabal, cabal, 0, ROT0, "Tad (Fabtek license)", "Cabal (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1988, cabal2, cabal, cabal, cabal, 0, ROT0, "Tad (Fabtek license)", "Cabal (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1988, cabalbl, cabal, cabalbl, cabal, 0, ROT0, "bootleg", "Cabal (bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/canyon.c b/src/drivers/canyon.c index 8d0098d76..da6a2aaf6 100644 --- a/src/drivers/canyon.c +++ b/src/drivers/canyon.c @@ -278,5 +278,5 @@ ROM_END -GAME( 1977, canyon, 0, canyon, canyon, 0, ROT0, "Atari", "Canyon Bomber" ) -GAME( 1977, canbprot, canyon, canyon, canyon, 0, ROT0, "Atari", "Canyon Bomber (prototype)" ) +GAMEX( 1977, canyon, 0, canyon, canyon, 0, ROT0, "Atari", "Canyon Bomber", GAME_NO_SOUND ) +GAMEX( 1977, canbprot, canyon, canyon, canyon, 0, ROT0, "Atari", "Canyon Bomber (prototype)", GAME_NO_SOUND ) diff --git a/src/drivers/capbowl.c b/src/drivers/capbowl.c index d1ae4e765..8c9ee9fd6 100644 --- a/src/drivers/capbowl.c +++ b/src/drivers/capbowl.c @@ -252,10 +252,10 @@ INPUT_PORTS_START( capbowl ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_START /* FAKE */ - PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_Y | IPF_REVERSE, 20, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_Y | IPF_REVERSE, 20, 40, 0, 0 ) PORT_START /* FAKE */ - PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_X, 20, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_X, 20, 40, 0, 0 ) PORT_START /* FAKE */ /* This fake input port is used to get the status of the F2 key, */ diff --git a/src/drivers/cbuster.c b/src/drivers/cbuster.c index 540a6be40..bfe87c9b9 100644 --- a/src/drivers/cbuster.c +++ b/src/drivers/cbuster.c @@ -9,7 +9,7 @@ both boards have 'export' stickers which usually indicates a World version. Maybe one is a UK or European version. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -412,7 +412,7 @@ static struct MachineDriver machine_driver_twocrude = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* frames per second, vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, diff --git a/src/drivers/cheekyms.c b/src/drivers/cheekyms.c index 38b1e92a4..438e5b6a6 100644 --- a/src/drivers/cheekyms.c +++ b/src/drivers/cheekyms.c @@ -71,24 +71,24 @@ INPUT_PORTS_START( cheekyms ) PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) - //PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) +//PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x20, 0x20, "Attract Sound" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPSETTING( 0x40, "3000" ) PORT_DIPSETTING( 0x80, "4500" ) PORT_DIPSETTING( 0xc0, "6000" ) - PORT_DIPSETTING( 0x00, "Never" ) + PORT_DIPSETTING( 0x00, "None" ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) @@ -215,4 +215,4 @@ ROM_END -GAMEX( 1980?, cheekyms, 0, cheekyms, cheekyms, 0, ROT270, "Universal", "Cheeky Mouse", GAME_WRONG_COLORS ) +GAMEX( 1980?, cheekyms, 0, cheekyms, cheekyms, 0, ROT270, "Universal", "Cheeky Mouse", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/circus.c b/src/drivers/circus.c index c6a0e6c8b..888253496 100644 --- a/src/drivers/circus.c +++ b/src/drivers/circus.c @@ -78,24 +78,29 @@ INPUT_PORTS_START( circus ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_START /* Dip Switch */ - PORT_DIPNAME( 0x03, 0x00, "Jumps" ) + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) PORT_DIPSETTING( 0x02, "7" ) PORT_DIPSETTING( 0x03, "9" ) - PORT_DIPNAME( 0x0C, 0x04, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, "2 Player - 1 Coin" ) - PORT_DIPSETTING( 0x04, "1 Player - 1 Coin" ) - PORT_DIPSETTING( 0x08, "1 Player - 2 Coin" ) + PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Coinage ) ) +// PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_DIPNAME( 0x10, 0x00, "Top Score" ) PORT_DIPSETTING( 0x10, "Credit Awarded" ) PORT_DIPSETTING( 0x00, "No Award" ) PORT_DIPNAME( 0x20, 0x00, "Bonus" ) PORT_DIPSETTING( 0x00, "Single Line" ) PORT_DIPSETTING( 0x20, "Super Bonus" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) PORT_START /* IN2 - paddle */ @@ -109,24 +114,31 @@ INPUT_PORTS_START( robotbwl ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BITX(0x04, IP_ACTIVE_HIGH, 0,"Hook Right", KEYCODE_X, 0 ) PORT_BITX(0x08, IP_ACTIVE_HIGH, 0,"Hook Left", KEYCODE_Z, 0 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_START /* Dip Switch */ - PORT_DIPNAME( 0x60, 0x00, "Bowl Timer" ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x20, "5" ) - PORT_DIPSETTING( 0x40, "7" ) - PORT_DIPSETTING( 0x60, "9" ) - PORT_DIPNAME( 0x18, 0x08, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, "2 Player - 1 Coin" ) - PORT_DIPSETTING( 0x08, "1 Player - 1 Coin" ) - PORT_DIPSETTING( 0x10, "1 Player - 2 Coin" ) + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x01, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, "Beer Frame" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x18, 0x08, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00, "1 Coin - 2 Players game" ) +// PORT_DIPSETTING( 0x18, "1 Coin - 2 Players game" ) + PORT_DIPNAME( 0x60, 0x00, "Bowl Timer" ) + PORT_DIPSETTING( 0x00, "3 seconds" ) + PORT_DIPSETTING( 0x20, "5 seconds" ) + PORT_DIPSETTING( 0x40, "7 seconds" ) + PORT_DIPSETTING( 0x60, "9 seconds" ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) INPUT_PORTS_END @@ -136,10 +148,10 @@ INPUT_PORTS_START( crash ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_START /* Dip Switch */ @@ -172,15 +184,16 @@ INPUT_PORTS_START( ripcord ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_START /* Dip Switch */ - PORT_DIPNAME( 0x03, 0x03, "Jumps" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) PORT_DIPSETTING( 0x02, "7" ) PORT_DIPSETTING( 0x03, "9" ) - PORT_DIPNAME( 0x0C, 0x04, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x00, "2 Player - 1 Coin" ) PORT_DIPSETTING( 0x04, "1 Player - 1 Coin" ) PORT_DIPSETTING( 0x08, "1 Player - 2 Coin" ) +// PORT_DIPSETTING( 0x0c, "1 Player - ? Coin" ) PORT_DIPNAME( 0x10, 0x10, "Top Score" ) PORT_DIPSETTING( 0x10, "Credit Awarded" ) PORT_DIPSETTING( 0x00, "No Award" ) @@ -241,15 +254,15 @@ static struct GfxLayout robotlayout = static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout, 0, 2 }, - { REGION_GFX2, 0, &clownlayout, 0, 2 }, + { REGION_GFX1, 0, &charlayout, 0, 1 }, + { REGION_GFX2, 0, &clownlayout, 0, 1 }, { -1 } /* end of array */ }; static struct GfxDecodeInfo robotbowl_gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout, 0, 2 }, - { REGION_GFX2, 0, &robotlayout, 0, 2 }, + { REGION_GFX1, 0, &charlayout, 0, 1 }, + { REGION_GFX2, 0, &robotlayout, 0, 1 }, { -1 } /* end of array */ }; @@ -524,7 +537,7 @@ ROM_END -GAME( 1977, circus, 0, circus, circus, 0, ROT0, "Exidy", "Circus" ) -GAME( 1977, robotbwl, 0, robotbwl, robotbwl, robotbwl, ROT0, "Exidy", "Robot Bowl" ) -GAME( 1979, crash, 0, crash, crash, 0, ROT0, "Exidy", "Crash" ) -GAMEX(1977, ripcord, 0, ripcord, ripcord, 0, ROT0, "Exidy", "Rip Cord", GAME_NOT_WORKING ) +GAMEX( 1977, circus, 0, circus, circus, 0, ROT0, "Exidy", "Circus", GAME_IMPERFECT_SOUND ) +GAMEX( 1977, robotbwl, 0, robotbwl, robotbwl, robotbwl, ROT0, "Exidy", "Robot Bowl", GAME_IMPERFECT_SOUND ) +GAMEX( 1979, crash, 0, crash, crash, 0, ROT0, "Exidy", "Crash", GAME_IMPERFECT_SOUND ) +GAMEX( 1977, ripcord, 0, ripcord, ripcord, 0, ROT0, "Exidy", "Rip Cord", GAME_NOT_WORKING ) diff --git a/src/drivers/citycon.c b/src/drivers/citycon.c index 26282dd22..bc7bbef86 100644 --- a/src/drivers/citycon.c +++ b/src/drivers/citycon.c @@ -11,6 +11,7 @@ extern unsigned char *citycon_scroll; extern unsigned char *citycon_charlookup; void citycon_charlookup_w(int offset,int data); void citycon_background_w(int offset,int data); +int citycon_in_r(int offset); void citycon_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); int citycon_vh_start(void); @@ -21,9 +22,9 @@ void citycon_vh_stop(void); static struct MemoryReadAddress readmem[] = { { 0x0000, 0x1fff, MRA_RAM }, - { 0x3000, 0x3000, input_port_0_r }, - { 0x3001, 0x3001, input_port_1_r }, - { 0x3002, 0x3002, input_port_2_r }, + { 0x3000, 0x3000, citycon_in_r }, /* player 1 & 2 inputs multiplexed */ + { 0x3001, 0x3001, input_port_2_r }, + { 0x3002, 0x3002, input_port_3_r }, { 0x3007, 0x3007, watchdog_reset_r }, /* ? */ { 0x4000, 0xffff, MRA_ROM }, { -1 } /* end of table */ @@ -68,15 +69,25 @@ static struct MemoryWriteAddress writemem_sound[] = INPUT_PORTS_START( citycon ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + PORT_START + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) diff --git a/src/drivers/cloak.c b/src/drivers/cloak.c index 3965393d0..e6c937c0d 100644 --- a/src/drivers/cloak.c +++ b/src/drivers/cloak.c @@ -191,20 +191,20 @@ INPUT_PORTS_START( cloak ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_8WAY ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_8WAY ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY | IPF_COCKTAIL ) PORT_START /* IN2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK ) @@ -214,7 +214,7 @@ INPUT_PORTS_START( cloak ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) @@ -224,23 +224,28 @@ INPUT_PORTS_START( cloak ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_START /* DSW1 */ - PORT_DIPNAME( 0x03, 0x02, "Credit mode" ) - PORT_DIPSETTING( 0x02, "1 Credit=1 Game" ) - PORT_DIPSETTING( 0x01, "1 Credit=2 Games" ) - PORT_DIPSETTING( 0x03, "2 Credits=1 Game" ) + PORT_DIPNAME( 0x03, 0x02, "Credits" ) + PORT_DIPSETTING( 0x02, "*1" ) + PORT_DIPSETTING( 0x01, "*2" ) + PORT_DIPSETTING( 0x03, "/2" ) PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x30, 0x00, "Right Coin" ) - PORT_DIPSETTING( 0x00, "1 Coin=1 Credit" ) - PORT_DIPSETTING( 0x10, "1 Coin=2 Credits" ) - PORT_DIPNAME( 0x0C, 0x00, "Left Coin" ) - PORT_DIPSETTING( 0x00, "1 Coin=1 Credit" ) - PORT_DIPSETTING( 0x04, "1 Coin=4 Credits" ) - PORT_DIPSETTING( 0x08, "1 Coin=5 Credits" ) - PORT_DIPSETTING( 0x0C, "1 Coin=6 Credits" ) - PORT_DIPNAME( 0x40, 0x00, "Demo mode" ) - PORT_DIPSETTING( 0x40, "Freeze on" ) - PORT_DIPSETTING( 0x00, "Freeze off" ) - + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, "Allow Freeze" ) /* when active, press button 1 to freeze */ + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -378,4 +383,4 @@ ROM_END -GAME( 1983, cloak, 0, cloak, cloak, 0, ROT0, "Atari", "Cloak & Dagger" ) +GAMEX( 1983, cloak, 0, cloak, cloak, 0, ROT0, "Atari", "Cloak & Dagger", GAME_NO_COCKTAIL ) diff --git a/src/drivers/cloud9.c b/src/drivers/cloud9.c index 741b14a28..4aaad7689 100644 --- a/src/drivers/cloud9.c +++ b/src/drivers/cloud9.c @@ -295,4 +295,4 @@ ROM_END -GAME( 1983, cloud9, 0, cloud9, cloud9, 0, ROT0, "Atari", "Cloud 9 (prototype)" ) +GAMEX( 1983, cloud9, 0, cloud9, cloud9, 0, ROT0, "Atari", "Cloud 9 (prototype)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/cninja.c b/src/drivers/cninja.c index 27704e6eb..f23174493 100644 --- a/src/drivers/cninja.c +++ b/src/drivers/cninja.c @@ -26,7 +26,7 @@ Sound (Bootleg): Caveman Ninja Issues: End of level 2 is corrupt. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -750,7 +750,7 @@ static struct MachineDriver machine_driver_cninja = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -802,7 +802,7 @@ static struct MachineDriver machine_driver_stoneage = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -850,7 +850,7 @@ static struct MachineDriver machine_driver_edrandy = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, diff --git a/src/drivers/combatsc.c b/src/drivers/combatsc.c index d2c03c8bd..d91a74837 100644 --- a/src/drivers/combatsc.c +++ b/src/drivers/combatsc.c @@ -1,12 +1,20 @@ /*************************************************************************** TODO: -- wrong sprite/char priority (see cpu head at beginning of arm wrestling, - and heads in intermission after firing range III) -- wrong chars in original versions -- hook up sound in bootleg (the current sound is a hack, making use of the Konami ROMset) -- use the real PROOMs in the bootleg version - +- in combasc (and more generally the 007121) the number of sprites can be + increased from 0x40 to 0x80. There is a hack in konamiic.c to handle that, + but it is wrong. If you don't pass the Iron Man stage, a few sprites are + left dangling on the screen. +- priority orthogonality problems in the last level of combasc - see the + comments in vidhrdw. +- it seems that to get correct target colors in firing range III we have to + use the WRONG lookup table (the one for tiles instead of the one for + sprites). +- in combascb, wrong sprite/char priority (see cpu head at beginning of arm + wrestling, and heads in intermission after firing range III) +- hook up sound in bootleg (the current sound is a hack, making use of the + Konami ROMset) +- understand how the trackball really works "Combat School" (also known as "Boot Camp") - (Konami GX611) @@ -97,30 +105,31 @@ e000-e001 YM2203 extern unsigned char* banked_area; -/* from machine/combatsc.c */ +/* from vidhrdw/combasc.c */ +void combasc_convert_color_prom( unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ); +void combascb_convert_color_prom( unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ); +int combasc_video_r( int offset ); +void combasc_video_w( int offset, int data ); +int combasc_vh_start( void ); +int combascb_vh_start( void ); +void combasc_vh_stop( void ); + void combascb_bankselect_w( int offset, int data ); -void combatsc_bankselect_w( int offset, int data ); -void combatsc_init_machine( void ); -void combatsc_pf_control_w( int offset, int data ); -int combatsc_scrollram_r( int offset ); -void combatsc_scrollram_w( int offset, int data ); +void combasc_bankselect_w( int offset, int data ); +void combasc_init_machine( void ); +void combasc_pf_control_w( int offset, int data ); +int combasc_scrollram_r( int offset ); +void combasc_scrollram_w( int offset, int data ); -/* from vidhrdw/combatsc.c */ -void combatsc_convert_color_prom( unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ); -int combatsc_video_r( int offset ); -void combatsc_video_w( int offset, int data ); -int combatsc_vh_start( void ); -void combatsc_vh_stop( void ); -void cmbatscb_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ); -void combatsc_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ); -void combatsc_io_w( int offset, int data ); -void combatsc_vreg_w(int offset, int data); -void combatsc_sh_irqtrigger_w(int offset, int data); +void combascb_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ); +void combasc_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ); +void combasc_io_w( int offset, int data ); +void combasc_vreg_w(int offset, int data); -static void combatsc_coin_counter_w(int offset,int data) +static void combasc_coin_counter_w(int offset,int data) { /* b7-b3: unused? */ /* b1: coin counter 2 */ @@ -130,64 +139,117 @@ static void combatsc_coin_counter_w(int offset,int data) coin_counter_w(1,data & 0x02); } +static int trackball_r(int offset) +{ + static UINT8 pos[4],sign[4]; + + if (offset == 0) + { + int i,dir[4]; + + for (i = 0;i < 4;i++) + { + UINT8 curr; + + curr = readinputport(4 + i); + + dir[i] = curr - pos[i]; + sign[i] = dir[i] & 0x80; + pos[i] = curr; + } + + /* fix sign for orthogonal movements */ + if (dir[0] || dir[1]) + { + if (!dir[0]) sign[0] = sign[1] ^ 0x80; + if (!dir[1]) sign[1] = sign[0]; + } + if (dir[2] || dir[3]) + { + if (!dir[2]) sign[2] = sign[3] ^ 0x80; + if (!dir[3]) sign[3] = sign[2]; + } + } + + return sign[offset] | (pos[offset] & 0x7f); +} + + +/* the protection is a simple multiply */ +static int prot[2]; + +static void protection_w(int offset,int data) +{ + prot[offset] = data; +} +static int protection_r(int offset) +{ + return ((prot[0] * prot[1]) >> (offset * 8)) & 0xff; +} +static void protection_clock(int offset,int data) +{ + /* 0x3f is written here every time before accessing the other registers */ +} + + /****************************************************************************/ -void combatsc_play_w(int offset,int data) +static void combasc_sh_irqtrigger_w(int offset,int data) +{ + cpu_cause_interrupt(1,0xff); +} + +static void combasc_play_w(int offset,int data) { if (data & 0x02) UPD7759_start_w(0, 0); } -void combatsc_voice_reset_w(int offset,int data) +static void combasc_voice_reset_w(int offset,int data) { UPD7759_reset_w(0,data & 1); } -void combatsc_portA_w(int offset,int data) +static void combasc_portA_w(int offset,int data) { /* unknown. always write 0 */ } /****************************************************************************/ -static struct MemoryReadAddress combatsc_readmem[] = +static struct MemoryReadAddress combasc_readmem[] = { - { 0x0020, 0x003f, combatsc_scrollram_r }, - { 0x0040, 0x005f, MRA_RAM }, /* ??? */ - { 0x0200, 0x0201, MRA_RAM }, /* ??? */ + { 0x0020, 0x005f, combasc_scrollram_r }, + { 0x0200, 0x0201, protection_r }, { 0x0400, 0x0400, input_port_0_r }, { 0x0401, 0x0401, input_port_1_r }, /* DSW #3 */ { 0x0402, 0x0402, input_port_2_r }, /* DSW #1 */ { 0x0403, 0x0403, input_port_3_r }, /* DSW #2 */ - { 0x0404, 0x0404, input_port_4_r }, /* 1P & 2P controls / 1P trackball V */ - { 0x0405, 0x0405, input_port_5_r }, /* 1P trackball H */ - { 0x0406, 0x0406, input_port_6_r }, /* 2P trackball V */ - { 0x0407, 0x0407, input_port_7_r }, /* 2P trackball H */ + { 0x0404, 0x0407, trackball_r }, /* 1P & 2P controls / trackball */ { 0x0600, 0x06ff, MRA_RAM }, /* palette */ { 0x0800, 0x1fff, MRA_RAM }, - { 0x2000, 0x3fff, combatsc_video_r }, + { 0x2000, 0x3fff, combasc_video_r }, { 0x4000, 0x7fff, MRA_BANK1 }, /* banked ROM area */ { 0x8000, 0xffff, MRA_ROM }, /* ROM */ { -1 } }; -static struct MemoryWriteAddress combatsc_writemem[] = +static struct MemoryWriteAddress combasc_writemem[] = { - { 0x0000, 0x0007, combatsc_pf_control_w }, - { 0x0020, 0x003f, combatsc_scrollram_w }, - { 0x0040, 0x005f, MWA_RAM }, /* ??? */ + { 0x0000, 0x0007, combasc_pf_control_w }, + { 0x0020, 0x005f, combasc_scrollram_w }, // { 0x0060, 0x00ff, MWA_RAM }, /* RAM */ - { 0x0200, 0x0201, MWA_RAM }, /* ??? */ - { 0x0206, 0x0206, MWA_RAM }, /* ??? */ - { 0x0408, 0x0408, combatsc_coin_counter_w }, /* coin counters */ - { 0x040c, 0x040c, combatsc_vreg_w }, - { 0x0410, 0x0410, combatsc_bankselect_w }, - { 0x0414, 0x0414, combatsc_sh_irqtrigger_w }, - { 0x0418, 0x0418, MWA_NOP }, /* ??? */ + { 0x0200, 0x0201, protection_w }, + { 0x0206, 0x0206, protection_clock }, + { 0x0408, 0x0408, combasc_coin_counter_w }, /* coin counters */ + { 0x040c, 0x040c, combasc_vreg_w }, + { 0x0410, 0x0410, combasc_bankselect_w }, + { 0x0414, 0x0414, soundlatch_w }, + { 0x0418, 0x0418, combasc_sh_irqtrigger_w }, { 0x041c, 0x041c, watchdog_reset_w }, /* watchdog reset? */ { 0x0600, 0x06ff, paletteram_xBBBBBGGGGGRRRRR_w, &paletteram }, { 0x0800, 0x1fff, MWA_RAM }, /* RAM */ - { 0x2000, 0x3fff, combatsc_video_w }, + { 0x2000, 0x3fff, combasc_video_w }, { 0x4000, 0x7fff, MWA_ROM }, /* banked ROM area */ { 0x8000, 0xffff, MWA_ROM }, /* ROM */ { -1 } @@ -198,7 +260,7 @@ static struct MemoryReadAddress combascb_readmem[] = { 0x0000, 0x04ff, MRA_RAM }, { 0x0600, 0x06ff, MRA_RAM }, /* palette */ { 0x0800, 0x1fff, MRA_RAM }, - { 0x2000, 0x3fff, combatsc_video_r }, + { 0x2000, 0x3fff, combasc_video_r }, { 0x4000, 0x7fff, MRA_BANK1 }, /* banked ROM/RAM area */ { 0x8000, 0xffff, MRA_ROM }, /* ROM */ { -1 } @@ -210,7 +272,7 @@ static struct MemoryWriteAddress combascb_writemem[] = { 0x0500, 0x0500, combascb_bankselect_w }, { 0x0600, 0x06ff, paletteram_xBBBBBGGGGGRRRRR_w, &paletteram }, { 0x0800, 0x1fff, MWA_RAM }, - { 0x2000, 0x3fff, combatsc_video_w }, + { 0x2000, 0x3fff, combasc_video_w }, { 0x4000, 0x7fff, MWA_BANK1, &banked_area },/* banked ROM/RAM area */ { 0x8000, 0xffff, MWA_ROM }, /* ROM */ { -1 } @@ -237,15 +299,15 @@ static struct MemoryWriteAddress writemem_sound[] = { 0x87f0, 0x87ff, MWA_RAM }, /* ??? */ { 0x9000, 0x9000, YM2203_control_port_0_w },/* YM 2203 */ { 0x9001, 0x9001, YM2203_write_port_0_w }, /* YM 2203 */ - //{ 0x9800, 0x9800, combatsc_unknown_w_1 }, /* OKIM5205? */ - //{ 0xa800, 0xa800, combatsc_unknown_w_2 }, /* OKIM5205? */ + //{ 0x9800, 0x9800, combasc_unknown_w_1 }, /* OKIM5205? */ + //{ 0xa800, 0xa800, combasc_unknown_w_2 }, /* OKIM5205? */ { 0x8800, 0xfffb, MWA_ROM }, /* ROM */ { 0xfffc, 0xffff, MWA_RAM }, /* ??? */ { -1 } }; #endif -static struct MemoryReadAddress combatsc_readmem_sound[] = +static struct MemoryReadAddress combasc_readmem_sound[] = { { 0x0000, 0x7fff, MRA_ROM }, /* ROM */ { 0x8000, 0x87ff, MRA_RAM }, /* RAM */ @@ -255,20 +317,20 @@ static struct MemoryReadAddress combatsc_readmem_sound[] = { -1 } }; -static struct MemoryWriteAddress combatsc_writemem_sound[] = +static struct MemoryWriteAddress combasc_writemem_sound[] = { { 0x0000, 0x7fff, MWA_ROM }, /* ROM */ { 0x8000, 0x87ff, MWA_RAM }, /* RAM */ - { 0x9000, 0x9000, combatsc_play_w }, /* uPD7759 play voice */ + { 0x9000, 0x9000, combasc_play_w }, /* uPD7759 play voice */ { 0xa000, 0xa000, UPD7759_message_w }, /* uPD7759 voice select */ - { 0xc000, 0xc000, combatsc_voice_reset_w }, /* uPD7759 reset? */ + { 0xc000, 0xc000, combasc_voice_reset_w }, /* uPD7759 reset? */ { 0xe000, 0xe000, YM2203_control_port_0_w },/* YM 2203 */ { 0xe001, 0xe001, YM2203_write_port_0_w }, /* YM 2203 */ { -1 } }; -#define COMBATSC_COINAGE \ +#define COINAGE \ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) \ PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ @@ -304,10 +366,10 @@ static struct MemoryWriteAddress combatsc_writemem_sound[] = PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) \ PORT_DIPSETTING( 0x00, "coin 2 invalidity" ) -INPUT_PORTS_START( combatsc ) +INPUT_PORTS_START( combasc ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -319,7 +381,7 @@ INPUT_PORTS_START( combatsc ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -332,13 +394,13 @@ INPUT_PORTS_START( combatsc ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START /* DSW # 1 */ - COMBATSC_COINAGE + COINAGE PORT_START /* DSW #2 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) @@ -364,10 +426,10 @@ INPUT_PORTS_START( combatsc ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 | IPF_8WAY ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 | IPF_8WAY ) PORT_START /* only used in trackball version */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -379,10 +441,10 @@ INPUT_PORTS_START( combatsc ) PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END -INPUT_PORTS_START( combatsct ) +INPUT_PORTS_START( combasct ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -394,6 +456,7 @@ INPUT_PORTS_START( combatsct ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -406,13 +469,13 @@ INPUT_PORTS_START( combatsct ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START /* DSW # 1 */ - COMBATSC_COINAGE + COINAGE PORT_START /* DSW #2 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) @@ -435,23 +498,23 @@ INPUT_PORTS_START( combatsct ) /* trackball 1P */ PORT_START - PORT_ANALOG( 0xff, 0x7f, IPT_TRACKBALL_Y | IPF_CENTER, 25, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_Y | IPF_PLAYER1 | IPF_REVERSE, 10, 10, 0, 0 ) PORT_START - PORT_ANALOG( 0xff, 0x7f, IPT_TRACKBALL_X | IPF_CENTER | IPF_REVERSE, 25, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_X | IPF_PLAYER1, 10, 10, 0, 0 ) /* trackball 2P (not implemented yet) */ PORT_START - PORT_ANALOG( 0xff, 0x7f, IPT_TRACKBALL_Y | IPF_CENTER | IPF_PLAYER2, 25, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_Y | IPF_PLAYER2 | IPF_REVERSE, 10, 10, 0, 0 ) PORT_START - PORT_ANALOG( 0xff, 0x7f, IPT_TRACKBALL_X | IPF_CENTER | IPF_REVERSE | IPF_PLAYER2, 25, 10, 0, 0 ) + PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_X | IPF_PLAYER2, 10, 10, 0, 0 ) INPUT_PORTS_END -INPUT_PORTS_START( cmbatscb ) +INPUT_PORTS_START( combascb ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -464,13 +527,13 @@ INPUT_PORTS_START( cmbatscb ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 | IPF_8WAY ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 | IPF_8WAY ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 | IPF_8WAY ) PORT_START - COMBATSC_COINAGE + COINAGE PORT_START PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) @@ -540,7 +603,7 @@ static struct GfxLayout sprite_layout = 8*8*4 }; -static struct GfxDecodeInfo combatsc_gfxdecodeinfo[] = +static struct GfxDecodeInfo combasc_gfxdecodeinfo[] = { { REGION_GFX1, 0x00000, &gfx_layout, 0, 8*16 }, { REGION_GFX2, 0x00000, &gfx_layout, 0, 8*16 }, @@ -563,7 +626,7 @@ static struct YM2203interface ym2203_interface = { YM2203_VOL(20,20) }, { 0 }, { 0 }, - { combatsc_portA_w }, + { combasc_portA_w }, { 0 } }; @@ -580,35 +643,36 @@ static struct UPD7759_interface upd7759_interface = /* combat school (original) */ -static struct MachineDriver machine_driver_combatsc = +static struct MachineDriver machine_driver_combasc = { { { CPU_HD6309, 5000000, /* 5 MHz? */ - combatsc_readmem,combatsc_writemem,0,0, + combasc_readmem,combasc_writemem,0,0, interrupt,1 }, { CPU_Z80 | CPU_AUDIO_CPU, 1500000, /* 1.5 MHz? */ - combatsc_readmem_sound,combatsc_writemem_sound,0,0, + combasc_readmem_sound,combasc_writemem_sound,0,0, ignore_interrupt,1 /* IRQs are caused by the main CPU */ } }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, 10, /* CPU slices */ - combatsc_init_machine, + combasc_init_machine, /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 }, - combatsc_gfxdecodeinfo, - 128,128*16,combatsc_convert_color_prom, + combasc_gfxdecodeinfo, + 128,8*16*16, + combasc_convert_color_prom, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE, 0, - combatsc_vh_start, - combatsc_vh_stop, - combatsc_vh_screenrefresh, + combasc_vh_start, + combasc_vh_stop, + combasc_vh_screenrefresh, /* sound hardware */ 0,0,0,0, @@ -625,7 +689,7 @@ static struct MachineDriver machine_driver_combatsc = }; /* combat school (bootleg on different hardware) */ -static struct MachineDriver machine_driver_cmbatscb = +static struct MachineDriver machine_driver_combascb = { { { @@ -637,23 +701,24 @@ static struct MachineDriver machine_driver_cmbatscb = { CPU_Z80 | CPU_AUDIO_CPU, 1500000, - combatsc_readmem_sound,combatsc_writemem_sound,0,0, /* FAKE */ + combasc_readmem_sound,combasc_writemem_sound,0,0, /* FAKE */ ignore_interrupt,0 /* IRQs are caused by the main CPU */ }, }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, 10, /* CPU slices */ - combatsc_init_machine, + combasc_init_machine, /* video hardware */ 32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 }, combascb_gfxdecodeinfo, - 128,128*16,combatsc_convert_color_prom, + 128,8*16*16, + combascb_convert_color_prom, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE, 0, - combatsc_vh_start, - combatsc_vh_stop, - cmbatscb_vh_screenrefresh, + combascb_vh_start, + combasc_vh_stop, + combascb_vh_screenrefresh, /* We are using the original sound subsystem */ 0,0,0,0, @@ -815,11 +880,9 @@ ROM_START( combascb ) ROM_LOAD( "combat.018", 0x60000, 0x10000, 0x575db729 ) ROM_LOAD( "combat.020", 0x70000, 0x10000, 0x8d748a1a ) - ROM_REGION( 0x0400, REGION_PROMS ) /* TODO: WRONG, the bootleg uses different PROMs */ - ROM_LOAD( "611g06.h14", 0x0000, 0x0100, 0xf916129a ) /* sprites lookup table */ - ROM_LOAD( "611g05.h15", 0x0100, 0x0100, 0x207a7b07 ) /* chars lookup table */ - ROM_LOAD( "611g10.h6", 0x0200, 0x0100, 0xf916129a ) /* sprites lookup table */ - ROM_LOAD( "611g09.h7", 0x0300, 0x0100, 0x207a7b07 ) /* chars lookup table */ + ROM_REGION( 0x0200, REGION_PROMS ) + ROM_LOAD( "prom.d10", 0x0000, 0x0100, 0x265f4c97 ) /* sprites lookup table */ + ROM_LOAD( "prom.c11", 0x0100, 0x0100, 0xa7a5c0b4 ) /* priority? */ ROM_REGION( 0x20000, REGION_SOUND1 ) /* uPD7759 data */ ROM_LOAD( "611g04.rom", 0x00000, 0x20000, 0x2987e158 ) /* FAKE - from Konami set! */ @@ -827,18 +890,30 @@ ROM_END +static void init_combasc( void ) +{ + /* joystick instead of trackball */ + install_mem_read_handler(0,0x0404,0x0404,input_port_4_r); +} + static void init_combascb( void ) { - unsigned char *gfx = memory_region(REGION_GFX1); + unsigned char *gfx; int i; + + gfx = memory_region(REGION_GFX1); for (i = 0;i < memory_region_length(REGION_GFX1);i++) gfx[i] = ~gfx[i]; + + gfx = memory_region(REGION_GFX2); + for (i = 0;i < memory_region_length(REGION_GFX2);i++) + gfx[i] = ~gfx[i]; } -GAMEX(1988, combasc, 0, combatsc, combatsc, 0, ROT0, "Konami", "Combat School (joystick)", GAME_NOT_WORKING ) -GAMEX(1987, combasct, combasc, combatsc, combatsct, 0, ROT0, "Konami", "Combat School (trackball)", GAME_NOT_WORKING ) -GAMEX(1987, combascj, combasc, combatsc, combatsct, 0, ROT0, "Konami", "Combat School (Japan trackball)", GAME_NOT_WORKING ) -GAMEX(1987, bootcamp, combasc, combatsc, combatsct, 0, ROT0, "Konami", "Boot Camp", GAME_NOT_WORKING ) -GAME( 1988, combascb, combasc, cmbatscb, cmbatscb, combascb, ROT0, "bootleg", "Combat School (bootleg)" ) +GAME( 1988, combasc, 0, combasc, combasc, combasc, ROT0, "Konami", "Combat School (joystick)" ) +GAME( 1987, combasct, combasc, combasc, combasct, 0, ROT0, "Konami", "Combat School (trackball)" ) +GAME( 1987, combascj, combasc, combasc, combasct, 0, ROT0, "Konami", "Combat School (Japan trackball)" ) +GAME( 1987, bootcamp, combasc, combasc, combasct, 0, ROT0, "Konami", "Boot Camp" ) +GAMEX(1988, combascb, combasc, combascb, combascb, combascb, ROT0, "bootleg", "Combat School (bootleg)", GAME_IMPERFECT_COLORS ) diff --git a/src/drivers/commando.c b/src/drivers/commando.c index 2d92739de..f269c99f4 100644 --- a/src/drivers/commando.c +++ b/src/drivers/commando.c @@ -194,6 +194,84 @@ INPUT_PORTS_START( commando ) PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) ) INPUT_PORTS_END +/* service mode replaces demo sounds, different bonus */ +INPUT_PORTS_START( commandu ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x03, 0x03, "Starting Stage" ) + PORT_DIPSETTING( 0x03, "1" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x00, "7" ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x04, "2" ) + PORT_DIPSETTING( 0x0c, "3" ) + PORT_DIPSETTING( 0x08, "4" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) + + PORT_START /* DSW1 */ + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x07, "10000 50000" ) + PORT_DIPSETTING( 0x03, "10000 60000" ) + PORT_DIPSETTING( 0x05, "20000 60000" ) + PORT_DIPSETTING( 0x01, "20000 70000" ) + PORT_DIPSETTING( 0x06, "30000 70000" ) + PORT_DIPSETTING( 0x02, "30000 80000" ) + PORT_DIPSETTING( 0x04, "40000 100000" ) + PORT_DIPSETTING( 0x00, "None" ) + PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x10, "Normal" ) + PORT_DIPSETTING( 0x00, "Difficult" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, "Upright One Player" ) + PORT_DIPSETTING( 0x40, "Upright Two Players" ) +/* PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) */ + PORT_DIPSETTING( 0xc0, DEF_STR( Cocktail ) ) +INPUT_PORTS_END + static struct GfxLayout charlayout = @@ -335,10 +413,13 @@ ROM_START( commando ) ROM_LOAD( "h08_vt09.bin", 0x10000, 0x4000, 0x98703982 ) ROM_LOAD( "h09_vt10.bin", 0x14000, 0x4000, 0xf069d2f8 ) - ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) - ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) - ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) + ROM_REGION( 0x0600, REGION_PROMS ) + ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) /* red */ + ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) /* green */ + ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) /* blue */ + ROM_LOAD( "01h_vtb4.bin", 0x0300, 0x0100, 0xb388c246 ) /* palette selector (not used) */ + ROM_LOAD( "06l_vtb5.bin", 0x0400, 0x0100, 0x712ac508 ) /* interrupt timing (not used) */ + ROM_LOAD( "06e_vtb6.bin", 0x0500, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END ROM_START( commandu ) @@ -368,10 +449,13 @@ ROM_START( commandu ) ROM_LOAD( "h08_vt09.bin", 0x10000, 0x4000, 0x98703982 ) ROM_LOAD( "h09_vt10.bin", 0x14000, 0x4000, 0xf069d2f8 ) - ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) - ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) - ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) + ROM_REGION( 0x0600, REGION_PROMS ) + ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) /* red */ + ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) /* green */ + ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) /* blue */ + ROM_LOAD( "01h_vtb4.bin", 0x0300, 0x0100, 0xb388c246 ) /* palette selector (not used) */ + ROM_LOAD( "06l_vtb5.bin", 0x0400, 0x0100, 0x712ac508 ) /* interrupt timing (not used) */ + ROM_LOAD( "06e_vtb6.bin", 0x0500, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END ROM_START( commandj ) @@ -401,10 +485,13 @@ ROM_START( commandj ) ROM_LOAD( "h08_vt09.bin", 0x10000, 0x4000, 0x98703982 ) ROM_LOAD( "h09_vt10.bin", 0x14000, 0x4000, 0xf069d2f8 ) - ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) - ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) - ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) + ROM_REGION( 0x0600, REGION_PROMS ) + ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) /* red */ + ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) /* green */ + ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) /* blue */ + ROM_LOAD( "01h_vtb4.bin", 0x0300, 0x0100, 0xb388c246 ) /* palette selector (not used) */ + ROM_LOAD( "06l_vtb5.bin", 0x0400, 0x0100, 0x712ac508 ) /* interrupt timing (not used) */ + ROM_LOAD( "06e_vtb6.bin", 0x0500, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END ROM_START( spaceinv ) @@ -434,10 +521,13 @@ ROM_START( spaceinv ) ROM_LOAD( "h08_vt09.bin", 0x10000, 0x4000, 0x98703982 ) ROM_LOAD( "h09_vt10.bin", 0x14000, 0x4000, 0xf069d2f8 ) - ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) - ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) - ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) + ROM_REGION( 0x0600, REGION_PROMS ) + ROM_LOAD( "01d_vtb1.bin", 0x0000, 0x0100, 0x3aba15a1 ) /* red */ + ROM_LOAD( "02d_vtb2.bin", 0x0100, 0x0100, 0x88865754 ) /* green */ + ROM_LOAD( "03d_vtb3.bin", 0x0200, 0x0100, 0x4c14c3f6 ) /* blue */ + ROM_LOAD( "01h_vtb4.bin", 0x0300, 0x0100, 0xb388c246 ) /* palette selector (not used) */ + ROM_LOAD( "06l_vtb5.bin", 0x0400, 0x0100, 0x712ac508 ) /* interrupt timing (not used) */ + ROM_LOAD( "06e_vtb6.bin", 0x0500, 0x0100, 0x0eaf5158 ) /* video timing (not used) */ ROM_END @@ -484,6 +574,6 @@ static void init_spaceinv(void) GAME( 1985, commando, 0, commando, commando, commando, ROT90, "Capcom", "Commando (World)" ) -GAME( 1985, commandu, commando, commando, commando, commando, ROT90, "Capcom (Data East USA license)", "Commando (US)" ) +GAME( 1985, commandu, commando, commando, commandu, commando, ROT90, "Capcom (Data East USA license)", "Commando (US)" ) GAME( 1985, commandj, commando, commando, commando, commando, ROT90, "Capcom", "Senjo no Ookami" ) GAME( 1985, spaceinv, commando, commando, commando, spaceinv, ROT90, "bootleg", "Space Invasion" ) diff --git a/src/drivers/congo.c b/src/drivers/congo.c index c9c7f8c42..4f5bfab99 100644 --- a/src/drivers/congo.c +++ b/src/drivers/congo.c @@ -140,9 +140,9 @@ static int congo_interrupt(void) INPUT_PORTS_START( congo ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ @@ -150,9 +150,9 @@ INPUT_PORTS_START( congo ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ @@ -170,7 +170,7 @@ INPUT_PORTS_START( congo ) PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_HIGH, IPT_COIN2, 1 ) /* Coin Aux doesn't need IMPULSE to pass the test, but it still needs it */ /* to avoid the freeze. */ - PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_HIGH, IPT_COIN3, 1 ) + PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1, 1 ) PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) @@ -196,40 +196,142 @@ INPUT_PORTS_START( congo ) PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) PORT_START /* DSW1 */ - PORT_DIPNAME( 0x0f, 0x03, "B Coin/Cred" ) - PORT_DIPSETTING( 0x0f, "4/1" ) - PORT_DIPSETTING( 0x07, "3/1" ) - PORT_DIPSETTING( 0x0b, "2/1" ) - PORT_DIPSETTING( 0x06, "2/1+Bonus each 5" ) - PORT_DIPSETTING( 0x0a, "2/1+Bonus each 2" ) - PORT_DIPSETTING( 0x03, "1/1" ) - PORT_DIPSETTING( 0x02, "1/1+Bonus each 5" ) - PORT_DIPSETTING( 0x0c, "1/1+Bonus each 4" ) - PORT_DIPSETTING( 0x04, "1/1+Bonus each 2" ) - PORT_DIPSETTING( 0x0d, "1/2" ) - PORT_DIPSETTING( 0x08, "1/2+Bonus each 5" ) - PORT_DIPSETTING( 0x00, "1/2+Bonus each 4" ) - PORT_DIPSETTING( 0x05, "1/3" ) - PORT_DIPSETTING( 0x09, "1/4" ) - PORT_DIPSETTING( 0x01, "1/5" ) - PORT_DIPSETTING( 0x0e, "1/6" ) - PORT_DIPNAME( 0xf0, 0x30, "A Coin/Cred" ) - PORT_DIPSETTING( 0xf0, "4/1" ) - PORT_DIPSETTING( 0x70, "3/1" ) - PORT_DIPSETTING( 0xb0, "2/1" ) - PORT_DIPSETTING( 0x60, "2/1+Bonus each 5" ) - PORT_DIPSETTING( 0xa0, "2/1+Bonus each 2" ) - PORT_DIPSETTING( 0x30, "1/1" ) - PORT_DIPSETTING( 0x20, "1/1+Bonus each 5" ) - PORT_DIPSETTING( 0xc0, "1/1+Bonus each 4" ) - PORT_DIPSETTING( 0x40, "1/1+Bonus each 2" ) - PORT_DIPSETTING( 0xd0, "1/2" ) - PORT_DIPSETTING( 0x80, "1/2+Bonus each 5" ) - PORT_DIPSETTING( 0x00, "1/2+Bonus each 4" ) - PORT_DIPSETTING( 0x50, "1/3" ) - PORT_DIPSETTING( 0x90, "1/4" ) - PORT_DIPSETTING( 0x10, "1/5" ) - PORT_DIPSETTING( 0xe0, "1/6" ) + PORT_DIPNAME( 0x0f, 0x03, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0f, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0b, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x06, "2C/1C 5C/3C 6C/4C" ) + PORT_DIPSETTING( 0x0a, "2C/1C 3C/2C 4C/3C" ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x02, "1C/1C 5C/6C" ) + PORT_DIPSETTING( 0x0c, "1C/1C 4C/5C" ) + PORT_DIPSETTING( 0x04, "1C/1C 2C/3C" ) + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x08, "1C/2C 5C/11C" ) + PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x09, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0xf0, 0x30, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0xb0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x60, "2C/1C 5C/3C 6C/4C" ) + PORT_DIPSETTING( 0xa0, "2C/1C 3C/2C 4C/3C" ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x20, "1C/1C 5C/6C" ) + PORT_DIPSETTING( 0xc0, "1C/1C 4C/5C" ) + PORT_DIPSETTING( 0x40, "1C/1C 2C/3C" ) + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, "1C/2C 5C/11C" ) + PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" ) + PORT_DIPSETTING( 0x50, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x90, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_6C ) ) + + PORT_START /* FAKE */ + /* This fake input port is used to get the status of the F2 key, */ + /* and activate the test mode, which is triggered by a NMI */ + PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) +INPUT_PORTS_END + +/* Same as Congo Bongo, except the Demo Sounds dip, that here turns the + sound off in the whole game. */ +INPUT_PORTS_START( tiptop ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused (the self test doesn't mention it) */ + /* the coin inputs must stay active for exactly one frame, otherwise */ + /* the game will keep inserting coins. */ + PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_COIN1, 1 ) + PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_HIGH, IPT_COIN2, 1 ) + /* Coin Aux doesn't need IMPULSE to pass the test, but it still needs it */ + /* to avoid the freeze. */ + PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1, 1 ) + + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x03, "10000" ) + PORT_DIPSETTING( 0x01, "20000" ) + PORT_DIPSETTING( 0x02, "30000" ) + PORT_DIPSETTING( 0x00, "40000" ) + PORT_DIPNAME( 0x0c, 0x0c, "Difficulty???" ) + PORT_DIPSETTING( 0x0c, "Easy?" ) + PORT_DIPSETTING( 0x04, "Medium?" ) + PORT_DIPSETTING( 0x08, "Hard?" ) + PORT_DIPSETTING( 0x00, "Hardest?" ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x30, "3" ) + PORT_DIPSETTING( 0x10, "4" ) + PORT_DIPSETTING( 0x20, "5" ) + PORT_BITX( 0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPNAME( 0x40, 0x40, "Sound" ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) + + PORT_START /* DSW1 */ + PORT_DIPNAME( 0x0f, 0x03, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0f, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0b, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x06, "2C/1C 5C/3C 6C/4C" ) + PORT_DIPSETTING( 0x0a, "2C/1C 3C/2C 4C/3C" ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x02, "1C/1C 5C/6C" ) + PORT_DIPSETTING( 0x0c, "1C/1C 4C/5C" ) + PORT_DIPSETTING( 0x04, "1C/1C 2C/3C" ) + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x08, "1C/2C 5C/11C" ) + PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x09, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0xf0, 0x30, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0xb0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x60, "2C/1C 5C/3C 6C/4C" ) + PORT_DIPSETTING( 0xa0, "2C/1C 3C/2C 4C/3C" ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x20, "1C/1C 5C/6C" ) + PORT_DIPSETTING( 0xc0, "1C/1C 4C/5C" ) + PORT_DIPSETTING( 0x40, "1C/1C 2C/3C" ) + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, "1C/2C 5C/11C" ) + PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" ) + PORT_DIPSETTING( 0x50, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x90, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_6C ) ) PORT_START /* FAKE */ /* This fake input port is used to get the status of the F2 key, */ @@ -429,5 +531,5 @@ ROM_END -GAME( 1983, congo, 0, congo, congo, 0, ROT90, "Sega", "Congo Bongo" ) -GAME( 1983, tiptop, congo, congo, congo, 0, ROT90, "Sega", "Tip Top" ) +GAME( 1983, congo, 0, congo, congo, 0, ROT90, "Sega", "Congo Bongo" ) +GAME( 1983, tiptop, congo, congo, tiptop, 0, ROT90, "Sega", "Tip Top" ) diff --git a/src/drivers/copsnrob.c b/src/drivers/copsnrob.c index d6d8e57c1..20d79b7ba 100644 --- a/src/drivers/copsnrob.c +++ b/src/drivers/copsnrob.c @@ -281,4 +281,4 @@ ROM_START( copsnrob ) ROM_END -GAME( 1976, copsnrob, 0, copsnrob, copsnrob, 0, ROT0, "Atari", "Cops'n Robbers" ) +GAMEX( 1976, copsnrob, 0, copsnrob, copsnrob, 0, ROT0, "Atari", "Cops'n Robbers", GAME_NO_SOUND ) diff --git a/src/drivers/cosmic.c b/src/drivers/cosmic.c index cc9e04b3e..840bcdfc0 100644 --- a/src/drivers/cosmic.c +++ b/src/drivers/cosmic.c @@ -1418,6 +1418,30 @@ ROM_START( cosmica ) ROM_LOAD( "ca.sub", 0x0000, 0x0400, 0xacbd4e98 ) ROM_END +ROM_START( cosmica2 ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ + ROM_LOAD( "ca.e3", 0x0000, 0x0800, 0x535ee0c5 ) + ROM_LOAD( "c3.bin", 0x0800, 0x0400, 0x699c849e ) + ROM_LOAD( "d4.bin", 0x0c00, 0x0400, 0x168e38da ) + ROM_LOAD( "ca.e5", 0x1000, 0x0800, 0x6a111e5e ) + ROM_LOAD( "ca.e6", 0x1800, 0x0800, 0xc9b5ca2a ) + ROM_LOAD( "i9.bin", 0x2000, 0x0400, 0x3bb57720 ) + ROM_LOAD( "j0.bin", 0x2400, 0x0400, 0x4ff70f45 ) + + ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "ca.n1", 0x0000, 0x0800, 0x431e866c ) + ROM_LOAD( "ca.n2", 0x0800, 0x0800, 0xaa6c6079 ) + + ROM_REGION( 0x0020, REGION_PROMS ) + ROM_LOAD( "ca.d9", 0x0000, 0x0020, 0xdfb60f19 ) + + ROM_REGION( 0x0400, REGION_USER1 ) /* color map */ + ROM_LOAD( "ca.e2", 0x0000, 0x0400, 0xea4ee931 ) + + ROM_REGION( 0x0400, REGION_USER2 ) /* starfield generator */ + ROM_LOAD( "ca.sub", 0x0000, 0x0400, 0xacbd4e98 ) +ROM_END + ROM_START( cosmicg ) ROM_REGION( 0x10000, REGION_CPU1 ) /* 8k for code */ COSMICG_ROM_LOAD( "cosmicg1.bin", 0x0000, 0x0400, 0xe1b9f894 ) @@ -1524,11 +1548,12 @@ ROM_END GAME( 1979, cosmicg, 0, cosmicg, cosmicg, cosmicg, ROT270, "Universal", "Cosmic Guerilla" ) -GAME( 1980, cosmica, 0, cosmica, cosmica, 0, ROT270, "Universal", "Cosmic Alien" ) +GAMEX(1979, cosmica, 0, cosmica, cosmica, 0, ROT270, "Universal", "Cosmic Alien", GAME_NO_SOUND ) +GAMEX(1979, cosmica2, cosmica, cosmica, cosmica, 0, ROT270, "Universal", "Cosmic Alien (older)", GAME_NO_SOUND ) GAME( 1980, panic, 0, panic, panic, 0, ROT270, "Universal", "Space Panic (set 1)" ) GAME( 1980, panica, panic, panic, panic, 0, ROT270, "Universal", "Space Panic (set 2)" ) GAME( 1980, panicger, panic, panic, panic, 0, ROT270, "Universal (ADP Automaten license)", "Space Panic (German)" ) -GAME( 1980, magspot2, 0, magspot2, magspot2, 0, ROT270, "Universal", "Magical Spot II" ) -GAME( 1980, devzone, 0, magspot2, devzone, 0, ROT270, "Universal", "Devil Zone" ) -GAMEX(1980?,nomnlnd, 0, nomnlnd, nomnlnd, 0, ROT270, "Universal", "No Man's Land", GAME_WRONG_COLORS ) -GAMEX(1980?,nomnlndg, nomnlnd, nomnlnd, nomnlnd, 0, ROT270, "Universal (Gottlieb license)", "No Man's Land (Gottlieb)", GAME_WRONG_COLORS ) +GAMEX(1980, magspot2, 0, magspot2, magspot2, 0, ROT270, "Universal", "Magical Spot II", GAME_IMPERFECT_SOUND ) +GAMEX(1980, devzone, 0, magspot2, devzone, 0, ROT270, "Universal", "Devil Zone", GAME_IMPERFECT_SOUND ) +GAMEX(1980?,nomnlnd, 0, nomnlnd, nomnlnd, 0, ROT270, "Universal", "No Man's Land", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND ) +GAMEX(1980?,nomnlndg, nomnlnd, nomnlnd, nomnlnd, 0, ROT270, "Universal (Gottlieb license)", "No Man's Land (Gottlieb)", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/cps1.c b/src/drivers/cps1.c index 06c1dda9f..4bebf1fce 100644 --- a/src/drivers/cps1.c +++ b/src/drivers/cps1.c @@ -3540,13 +3540,13 @@ static struct OKIM6295interface okim6295_interface_7576 = * ********************************************************************/ -#define MACHINE_DRIVER(DRVNAME,CPU_FRQ,OKI_FREQ,NVRAM) \ +#define MACHINE_DRIVER(DRVNAME,CPU,CPU_FRQ,OKI_FREQ,NVRAM) \ static struct MachineDriver machine_driver_##DRVNAME = \ { \ /* basic machine hardware */ \ { \ { \ - CPU_M68000, \ + CPU, \ CPU_FRQ, \ cps1_readmem,cps1_writemem,0,0, \ cps1_interrupt, 1 \ @@ -3631,10 +3631,11 @@ static struct MachineDriver machine_driver_qsound = }; -MACHINE_DRIVER( forgottn, 10000000, 6061, 0 ) -MACHINE_DRIVER( cps1, 10000000, 7576, 0 ) /* 10 MHz?? */ -MACHINE_DRIVER( sf2, 12000000, 7576, 0 ) /* 12 MHz */ -MACHINE_DRIVER( pang3, 10000000, 7576, pang3_nvram_handler ) /* 10 MHz?? */ +MACHINE_DRIVER( forgottn, CPU_M68000, 10000000, 6061, 0 ) +MACHINE_DRIVER( cps1, CPU_M68000, 10000000, 7576, 0 ) /* 10 MHz?? */ +MACHINE_DRIVER( sf2, CPU_M68000, 12000000, 7576, 0 ) /* 12 MHz */ +MACHINE_DRIVER( sf2accp2, CPU_M68EC020, 12000000, 7576, 0 ) /* 12 MHz */ +MACHINE_DRIVER( pang3, CPU_M68000, 10000000, 7576, pang3_nvram_handler ) /* 10 MHz?? */ @@ -6011,18 +6012,18 @@ GAME( 1991, wonder3, 3wonders, cps1, 3wonders, 0, ROT0, "Capco GAME( 1991, kod, 0, cps1, kod, 0, ROT0, "Capcom", "The King of Dragons (World)" ) GAME( 1991, kodj, kod, cps1, kod, 0, ROT0, "Capcom", "The King of Dragons (Japan)" ) GAMEX(1991, kodb, kod, cps1, kod, 0, ROT0, "Capcom", "The King of Dragons (bootleg)", GAME_NOT_WORKING ) -GAME( 1991, captcomm, 0, cps1, captcomm, 0, ROT0, "Capcom", "Captain Commando (World)" ) -GAME( 1991, captcomu, captcomm, cps1, captcomm, 0, ROT0, "Capcom", "Captain Commando (US)" ) -GAME( 1991, captcomj, captcomm, cps1, captcomm, 0, ROT0, "Capcom", "Captain Commando (Japan)" ) -GAME( 1991, knights, 0, cps1, knights, 0, ROT0, "Capcom", "Knights of the Round (World)" ) -GAME( 1991, knightsj, knights, cps1, knights, 0, ROT0, "Capcom", "Knights of the Round (Japan)" ) +GAME( 1991, captcomm, 0, cps1, captcomm, 0, ROT0_16BIT, "Capcom", "Captain Commando (World)" ) +GAME( 1991, captcomu, captcomm, cps1, captcomm, 0, ROT0_16BIT, "Capcom", "Captain Commando (US)" ) +GAME( 1991, captcomj, captcomm, cps1, captcomm, 0, ROT0_16BIT, "Capcom", "Captain Commando (Japan)" ) +GAME( 1991, knights, 0, cps1, knights, 0, ROT0_16BIT, "Capcom", "Knights of the Round (World)" ) +GAME( 1991, knightsj, knights, cps1, knights, 0, ROT0_16BIT, "Capcom", "Knights of the Round (Japan)" ) GAME( 1992, sf2ce, 0, sf2, sf2, 0, ROT0, "Capcom", "Street Fighter II' - Champion Edition (World)" ) GAME( 1992, sf2cea, sf2ce, sf2, sf2, 0, ROT0, "Capcom", "Street Fighter II' - Champion Edition (US rev A)" ) GAME( 1992, sf2ceb, sf2ce, sf2, sf2, 0, ROT0, "Capcom", "Street Fighter II' - Champion Edition (US rev B)" ) GAME( 1992, sf2cej, sf2ce, sf2, sf2, 0, ROT0, "Capcom", "Street Fighter II' - Champion Edition (Japan)" ) GAME( 1992, sf2rb, sf2ce, sf2, sf2, 0, ROT0, "hack", "Street Fighter II' - Champion Edition (Rainbow)" ) GAME( 1992, sf2red, sf2ce, sf2, sf2, 0, ROT0, "hack", "Street Fighter II' - Champion Edition (Red Wave)" ) -GAME( 1992, sf2accp2, sf2ce, sf2, sf2, 0, ROT0, "hack", "Street Fighter II' - Champion Edition (Accelerator Pt.II)" ) +GAME( 1992, sf2accp2, sf2ce, sf2accp2, sf2, 0, ROT0, "hack", "Street Fighter II' - Champion Edition (Accelerator Pt.II)" ) GAME( 1992, varth, 0, cps1, varth, 0, ROT270, "Capcom", "Varth - Operation Thunderstorm (World)" ) GAME( 1992, varthu, varth, cps1, varth, 0, ROT270, "Capcom (Romstar license)", "Varth - Operation Thunderstorm (US)" ) GAME( 1992, varthj, varth, cps1, varth, 0, ROT270, "Capcom", "Varth - Operation Thunderstorm (Japan)" ) diff --git a/src/drivers/cps2.c b/src/drivers/cps2.c index 5c925ea5c..e6c3f552f 100644 --- a/src/drivers/cps2.c +++ b/src/drivers/cps2.c @@ -799,7 +799,7 @@ ROM_END ROM_START( sfa ) ROM_REGION( CODE_SIZE, REGION_CPU1 ) /* 68000 code */ ROM_LOAD_WIDE_SWAP( "sfzu.03a", 0x000000, 0x80000, 0x49fc7db9 ) - ROM_LOAD_WIDE_SWAP( "sfzu.04a", 0x080000, 0x80000, 0x5f99e9a5 ) + ROM_LOAD_WIDE_SWAP( "sfz.04a", 0x080000, 0x80000, 0x5f99e9a5 ) ROM_LOAD_WIDE_SWAP( "sfz.05", 0x100000, 0x80000, 0x0810544d ) ROM_LOAD_WIDE_SWAP( "sfz.06", 0x180000, 0x80000, 0x806e8f38 ) @@ -822,7 +822,7 @@ ROM_END ROM_START( sfzj ) ROM_REGION( CODE_SIZE, REGION_CPU1 ) /* 68000 code */ ROM_LOAD_WIDE_SWAP( "sfzj.03a", 0x000000, 0x80000, 0x844220c2 ) - ROM_LOAD_WIDE_SWAP( "sfzu.04a", 0x080000, 0x80000, 0x5f99e9a5 ) + ROM_LOAD_WIDE_SWAP( "sfz.04a", 0x080000, 0x80000, 0x5f99e9a5 ) ROM_LOAD_WIDE_SWAP( "sfz.05", 0x100000, 0x80000, 0x0810544d ) ROM_LOAD_WIDE_SWAP( "sfz.06", 0x180000, 0x80000, 0x806e8f38 ) diff --git a/src/drivers/crbaloon.c b/src/drivers/crbaloon.c index a2cab15a9..38b66949d 100644 --- a/src/drivers/crbaloon.c +++ b/src/drivers/crbaloon.c @@ -435,5 +435,5 @@ ROM_END -GAME( 1980, crbaloon, 0, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 1)" ) -GAME( 1980, crbalon2, crbaloon, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 2)" ) +GAMEX( 1980, crbaloon, 0, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 1)", GAME_IMPERFECT_SOUND ) +GAMEX( 1980, crbalon2, crbaloon, crbaloon, crbaloon, 0, ROT90, "Taito Corporation", "Crazy Balloon (set 2)", GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/crimfght.c b/src/drivers/crimfght.c index 7d2476c4f..8a84b106c 100644 --- a/src/drivers/crimfght.c +++ b/src/drivers/crimfght.c @@ -22,26 +22,6 @@ int crimfght_vh_start( void ); void crimfght_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); - -static int paletteram_selected; -static unsigned char *ram; - -static int bankedram_r(int offset) -{ - if (paletteram_selected) - return paletteram_r(offset); - else - return ram[offset]; -} - -static void bankedram_w(int offset,int data) -{ - if (paletteram_selected) - paletteram_xBBBBBGGGGGRRRRR_swap_w(offset,data); - else - ram[offset] = data; -} - static void crimfght_coin_w(int offset,int data) { coin_counter_w(0,data & 1); @@ -88,7 +68,7 @@ static int speedup_r( int offs ) static struct MemoryReadAddress crimfght_readmem[] = { - { 0x0000, 0x03ff, bankedram_r }, /* banked RAM */ + { 0x0000, 0x03ff, MRA_BANK1 }, /* banked RAM */ { 0x0414, 0x0414, speedup_r }, { 0x0400, 0x1fff, MRA_RAM }, /* RAM */ { 0x3f80, 0x3f80, input_port_7_r }, /* Coinsw */ @@ -101,14 +81,14 @@ static struct MemoryReadAddress crimfght_readmem[] = { 0x3f87, 0x3f87, input_port_0_r }, /* DSW #1 */ { 0x3f88, 0x3f88, watchdog_reset_r }, /* watchdog reset */ { 0x2000, 0x5fff, K052109_051960_r }, /* video RAM + sprite RAM */ - { 0x6000, 0x7fff, MRA_BANK1 }, /* banked ROM */ + { 0x6000, 0x7fff, MRA_BANK2 }, /* banked ROM */ { 0x8000, 0xffff, MRA_ROM }, /* ROM */ { -1 } /* end of table */ }; static struct MemoryWriteAddress crimfght_writemem[] = { - { 0x0000, 0x03ff, bankedram_w, &ram }, /* banked RAM */ + { 0x0000, 0x03ff, MWA_BANK1 }, /* banked RAM */ { 0x0400, 0x1fff, MWA_RAM }, /* RAM */ { 0x3f88, 0x3f88, crimfght_coin_w }, /* coin counters */ { 0x3f8c, 0x3f8c, crimfght_sh_irqtrigger_w }, /* cause interrupt on audio CPU? */ @@ -308,7 +288,7 @@ INPUT_PORTS_START( crimfgtj ) // PORT_DIPSETTING( 0x00, "Invalid" ) PORT_START /* DSW #2 */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) + PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "1" ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x01, "3" ) @@ -514,6 +494,28 @@ ROM_START( crimfgtj ) ROM_LOAD( "821k03.e5", 0x00000, 0x40000, 0xfef8505a ) ROM_END +ROM_START( crimfgt2 ) +ROM_REGION( 0x28000, REGION_CPU1 ) /* code + banked roms */ + ROM_LOAD( "crimefb.r02", 0x10000, 0x18000, 0x4ecdd923 ) + ROM_CONTINUE( 0x08000, 0x08000 ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sound CPU */ + ROM_LOAD( "821l01.h4", 0x0000, 0x8000, 0x0faca89e ) + + ROM_REGION( 0x080000, REGION_GFX1 ) /* graphics ( don't dispose as the program can read them ) */ + ROM_LOAD( "821k06.k13", 0x000000, 0x040000, 0xa1eadb24 ) /* characters */ + ROM_LOAD( "821k07.k19", 0x040000, 0x040000, 0x060019fa ) + + ROM_REGION( 0x100000, REGION_GFX2 ) /* graphics ( don't dispose as the program can read them ) */ + ROM_LOAD( "821k04.k2", 0x000000, 0x080000, 0x00e0291b ) /* sprites */ + ROM_LOAD( "821k05.k8", 0x080000, 0x080000, 0xe09ea05d ) + + ROM_REGION( 0x0100, REGION_PROMS ) + ROM_LOAD( "821a08.i15", 0x0000, 0x0100, 0x7da55800 ) /* priority encoder (not used) */ + + ROM_REGION( 0x40000, REGION_SOUND1 ) /* data for the 007232 */ + ROM_LOAD( "821k03.e5", 0x00000, 0x40000, 0xfef8505a ) +ROM_END /*************************************************************************** @@ -527,13 +529,20 @@ static void crimfght_banking( int lines ) int offs = 0; /* bit 5 = select work RAM or palette */ - paletteram_selected = lines & 0x20; + if (lines & 0x20){ + cpu_setbankhandler_r (1, paletteram_r); /* palette */ + cpu_setbankhandler_w (1, paletteram_xBBBBBGGGGGRRRRR_swap_w); /* palette */ + } + else{ + cpu_setbankhandler_r (1, MRA_RAM); /* RAM */ + cpu_setbankhandler_w (1, MWA_RAM); /* RAM */ + } /* bit 6 = enable char ROM reading through the video RAM */ K052109_set_RMRD_line((lines & 0x40) ? ASSERT_LINE : CLEAR_LINE); offs = 0x10000 + ( ( lines & 0x0f ) * 0x2000 ); - cpu_setbank( 1, &RAM[offs] ); + cpu_setbank( 2, &RAM[offs] ); } static void crimfght_init_machine( void ) @@ -541,10 +550,9 @@ static void crimfght_init_machine( void ) unsigned char *RAM = memory_region(REGION_CPU1); konami_cpu_setlines_callback = crimfght_banking; - paletteram_selected = 0; /* init the default bank */ - cpu_setbank( 1, &RAM[0x10000] ); + cpu_setbank( 2, &RAM[0x10000] ); } static void init_crimfght(void) @@ -555,5 +563,6 @@ static void init_crimfght(void) -GAME( 1989, crimfght, 0, crimfght, crimfght, crimfght, ROT0, "Konami", "Crime Fighters (US)" ) -GAME( 1989, crimfgtj, crimfght, crimfght, crimfgtj, crimfght, ROT0, "Konami", "Crime Fighters (Japan)" ) +GAME( 1989, crimfght, 0, crimfght, crimfght, crimfght, ROT0, "Konami", "Crime Fighters (US 4 players)" ) +GAME( 1989, crimfgt2, crimfght, crimfght, crimfgtj, crimfght, ROT0, "Konami", "Crime Fighters (World 2 Players)" ) +GAME( 1989, crimfgtj, crimfght, crimfght, crimfgtj, crimfght, ROT0, "Konami", "Crime Fighters (Japan 2 Players)" ) diff --git a/src/drivers/darkseal.c b/src/drivers/darkseal.c index 8e063d142..1f7fb41bc 100644 --- a/src/drivers/darkseal.c +++ b/src/drivers/darkseal.c @@ -11,7 +11,7 @@ the difference on the music that plays as the game starts, the lead instrument is missing. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -340,7 +340,7 @@ static struct MachineDriver machine_driver_darkseal = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration inaccurate */ + 58, 529, /* frames per second, vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -571,11 +571,10 @@ static void init_darkseal(void) darkseal_decrypt(); } - /******************************************************************************/ -GAME( 1990, darkseal, 0, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 3)" ) -GAME( 1990, darksea1, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 1)" ) -GAME( 1990, darkseaj, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (Japan)" ) -GAME( 1990, gatedoom, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 4)" ) -GAME( 1990, gatedom1, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 1)" ) +GAMEX( 1990, darkseal, 0, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 3)", GAME_NO_COCKTAIL ) +GAMEX( 1990, darksea1, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 1)", GAME_NO_COCKTAIL ) +GAMEX( 1990, darkseaj, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Dark Seal (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1990, gatedoom, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 4)", GAME_NO_COCKTAIL ) +GAMEX( 1990, gatedom1, darkseal, darkseal, darkseal, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 1)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/dcon.c b/src/drivers/dcon.c index 112e22005..acd5b7ebf 100644 --- a/src/drivers/dcon.c +++ b/src/drivers/dcon.c @@ -4,7 +4,7 @@ Success seems related to Seibu - this game runs on Seibu hardware. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -330,4 +330,4 @@ static void init_dcon(void) /***************************************************************************/ -GAME( 1992, dcon, 0, dcon, dcon, dcon, ROT0, "Success (Seibu hardware)", "D-Con" ) +GAMEX( 1992, dcon, 0, dcon, dcon, dcon, ROT0, "Success (Seibu hardware)", "D-Con", GAME_NO_COCKTAIL ) diff --git a/src/drivers/dday.c b/src/drivers/dday.c index cceea89de..f243125a0 100644 --- a/src/drivers/dday.c +++ b/src/drivers/dday.c @@ -60,8 +60,6 @@ void dday_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); void dday_colorram_w(int offset, int data); int dday_colorram_r(int offset); void dday_control_w (int offset, int data); -void dday_AY8910_0_w(int offset, int data); -void dday_AY8910_1_w(int offset, int data); void dday_searchlight_w(int offset, int data); void dday_decode(void); @@ -120,8 +118,22 @@ static struct MemoryWriteAddress writemem[] = { 0x5800, 0x5bff, MWA_RAM, &videoram, &videoram_size }, { 0x5c00, 0x5fff, dday_colorram_w, &colorram }, { 0x6000, 0x63ff, MWA_RAM }, - { 0x6400, 0x640d, dday_AY8910_0_w }, - { 0x6800, 0x6801, dday_AY8910_1_w }, + { 0x6400, 0x6400, AY8910_control_port_0_w }, + { 0x6401, 0x6401, AY8910_write_port_0_w }, + { 0x6402, 0x6402, AY8910_control_port_0_w }, + { 0x6403, 0x6403, AY8910_write_port_0_w }, + { 0x6404, 0x6404, AY8910_control_port_0_w }, + { 0x6405, 0x6405, AY8910_write_port_0_w }, + { 0x6406, 0x6406, AY8910_control_port_0_w }, + { 0x6407, 0x6407, AY8910_write_port_0_w }, + { 0x6408, 0x6408, AY8910_control_port_0_w }, + { 0x6409, 0x6409, AY8910_write_port_0_w }, + { 0x640a, 0x640a, AY8910_control_port_0_w }, + { 0x640b, 0x640b, AY8910_write_port_0_w }, + { 0x640c, 0x640c, AY8910_control_port_0_w }, + { 0x640d, 0x640d, AY8910_write_port_0_w }, + { 0x6800, 0x6800, AY8910_control_port_1_w }, + { 0x6801, 0x6801, AY8910_write_port_1_w }, { 0x7800, 0x7800, dday_control_w }, { -1 } /* end of table */ }; diff --git a/src/drivers/ddragon3.c b/src/drivers/ddragon3.c index 1702b56d3..15da98536 100644 --- a/src/drivers/ddragon3.c +++ b/src/drivers/ddragon3.c @@ -865,7 +865,7 @@ ROM_END /**************************************************************************/ -GAME( 1990, ddragon3, 0, ddragon3, ddragon3, 0, ROT0, "Technos", "Double Dragon 3 - The Rosetta Stone" ) -GAME( 1990, ddrago3b, ddragon3, ddrago3b, ddrago3b, 0, ROT0, "bootleg", "Double Dragon 3 - The Rosetta Stone (bootleg)" ) -GAME( 1990, ctribe, 0, ctribe, ctribe, 0, ROT0, "Technos", "The Combatribes (US)" ) -GAME( 1990, ctribeb, ctribe, ctribe, ctribe, 0, ROT0, "bootleg", "The Combatribes (bootleg)" ) +GAMEX( 1990, ddragon3, 0, ddragon3, ddragon3, 0, ROT0, "Technos", "Double Dragon 3 - The Rosetta Stone", GAME_NO_COCKTAIL ) +GAMEX( 1990, ddrago3b, ddragon3, ddrago3b, ddrago3b, 0, ROT0, "bootleg", "Double Dragon 3 - The Rosetta Stone (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1990, ctribe, 0, ctribe, ctribe, 0, ROT0, "Technos", "The Combatribes (US)", GAME_NO_COCKTAIL ) +GAMEX( 1990, ctribeb, ctribe, ctribe, ctribe, 0, ROT0, "bootleg", "The Combatribes (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/ddrible.c b/src/drivers/ddrible.c index 04067a458..d2738c5cf 100644 --- a/src/drivers/ddrible.c +++ b/src/drivers/ddrible.c @@ -479,4 +479,4 @@ ROM_END -GAME( 1986, ddribble, 0, ddribble, ddribble, 0, ROT0, "Konami", "Double Dribble" ) +GAMEX( 1986, ddribble, 0, ddribble, ddribble, 0, ROT0, "Konami", "Double Dribble", GAME_NO_COCKTAIL ) diff --git a/src/drivers/dec0.c b/src/drivers/dec0.c index 30af4cf80..c4e7f2af8 100644 --- a/src/drivers/dec0.c +++ b/src/drivers/dec0.c @@ -1,6 +1,6 @@ /*************************************************************************** - Data East 16 bit games - Bryan McPhail, mish@tendril.force9.net + Data East 16 bit games - Bryan McPhail, mish@tendril.co.uk This file contains drivers for: @@ -33,20 +33,6 @@ Boulderdash use the same graphics chips but are different pcbs. Gouky's patch for Bad Dudes & YM3812 information! Thanks to JC Alexander for fix to Robocop ending! -Cheats: - -Hippodrome: Level number held in 0xFF8011 - -Bad Dudes: level number held in FF821D -Put a bpx at 0x1b94 to halt at level check and choose level or end-seq -Sly Spy: bpx at 5d8 for level check, can go to any level. -(see comments in patch section below). - -Mid res: bpx at c02 for level check, can go straight to credits. - Level number held in 100006 (word) - bpx 10a6 - so you can choose level at start of game. - Put PC to 0xa1e in game to trigger continue screen - ***************************************************************************/ #include "driver.h" @@ -992,7 +978,7 @@ static struct MachineDriver machine_driver_hbarrel = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1044,7 +1030,7 @@ static struct MachineDriver machine_driver_baddudes = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1096,7 +1082,7 @@ static struct MachineDriver machine_driver_birdtry = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1154,7 +1140,7 @@ static struct MachineDriver machine_driver_robocop = ignore_interrupt,0 }, }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1206,7 +1192,7 @@ static struct MachineDriver machine_driver_robocopb = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1264,7 +1250,7 @@ static struct MachineDriver machine_driver_hippodrm = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 5, /* Interleave between H6280 & 68000 */ 0, @@ -1316,7 +1302,7 @@ static struct MachineDriver machine_driver_slyspy = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1368,7 +1354,7 @@ static struct MachineDriver machine_driver_midres = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58 Hz, 529ms Vblank */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, @@ -1604,7 +1590,7 @@ ROM_START( birdtry ) ROM_LOAD( "ek-23.bin", 0x70000, 0x10000, 0xd0ed0116 ) ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* tiles */ - /* This game doesn't seem to have the extra playfield chip, so no roms */ + /* This game doesn't have the extra playfield chip, so no roms */ ROM_REGION( 0x80000, REGION_GFX4 | REGIONFLAG_DISPOSE ) /* sprites */ ROM_LOAD( "ek-15.bin", 0x00000, 0x10000, 0xa6a041a3 ) @@ -1799,12 +1785,12 @@ ROM_START( hippodrm ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 6502 sound */ ROM_LOAD( "ew04", 0x8000, 0x8000, 0x9871b98d ) - ROM_REGION( 0x10000, REGION_CPU3 ) /* Encrypted code bank */ + ROM_REGION( 0x10000, REGION_CPU3 ) /* HuC6280 CPU */ ROM_LOAD( "ew08", 0x00000, 0x10000, 0x53010534 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* chars */ - ROM_LOAD( "ev14", 0x00000, 0x10000, 0x686f72c1 ) - ROM_LOAD( "ev13", 0x10000, 0x10000, 0xb787dcc9 ) + ROM_LOAD( "ew14", 0x00000, 0x10000, 0x71ca593d ) + ROM_LOAD( "ew13", 0x10000, 0x10000, 0x86be5fa7 ) ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* tiles */ ROM_LOAD( "ew19", 0x00000, 0x08000, 0x6b80d7a3 ) @@ -1842,12 +1828,12 @@ ROM_START( ffantasy ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 6502 sound */ ROM_LOAD( "ew04", 0x8000, 0x8000, 0x9871b98d ) - ROM_REGION( 0x10000, REGION_CPU3 ) /* Encrypted code bank */ + ROM_REGION( 0x10000, REGION_CPU3 ) /* HuC6280 CPU */ ROM_LOAD( "ew08", 0x00000, 0x10000, 0x53010534 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* chars */ - ROM_LOAD( "ew14", 0x00000, 0x10000, 0x71ca593d ) - ROM_LOAD( "ew13", 0x10000, 0x10000, 0x86be5fa7 ) + ROM_LOAD( "ev14", 0x00000, 0x10000, 0x686f72c1 ) + ROM_LOAD( "ev13", 0x10000, 0x10000, 0xb787dcc9 ) ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* tiles */ ROM_LOAD( "ew19", 0x00000, 0x08000, 0x6b80d7a3 ) @@ -2202,22 +2188,22 @@ static void init_slyspy(void) /******************************************************************************/ -GAME( 1987, hbarrel, 0, hbarrel, hbarrel, dec0, ROT270, "Data East USA", "Heavy Barrel (US)" ) -GAME( 1987, hbarrelw, hbarrel, hbarrel, hbarrel, dec0, ROT270, "Data East Corporation", "Heavy Barrel (World)" ) -GAME( 1988, baddudes, 0, baddudes, baddudes, dec0, ROT0, "Data East USA", "Bad Dudes vs. Dragonninja (US)" ) -GAME( 1988, drgninja, baddudes, baddudes, baddudes, dec0, ROT0, "Data East Corporation", "Dragonninja (Japan)" ) -GAMEX(1988, birdtry, 0, birdtry, hbarrel, dec0, ROT270, "Data East Corporation", "Birdie Try (Japan)", GAME_NOT_WORKING ) -GAMEX(1988, robocop, 0, robocop, robocop, dec0, ROT0, "Data East Corporation", "Robocop (World revision 3)", GAME_NOT_WORKING ) -GAMEX(1988, robocopu, robocop, robocop, robocop, dec0, ROT0, "Data East USA", "Robocop (US revision 1)", GAME_NOT_WORKING ) -GAMEX(1988, robocpu0, robocop, robocop, robocop, dec0, ROT0, "Data East USA", "Robocop (US revision 0)", GAME_NOT_WORKING ) -GAME( 1988, robocopb, robocop, robocopb, robocop, dec0, ROT0, "bootleg", "Robocop (World bootleg)" ) -GAME( 1989, hippodrm, 0, hippodrm, hippodrm, hippodrm, ROT0, "Data East USA", "Hippodrome (US)" ) -GAME( 1989, ffantasy, hippodrm, hippodrm, hippodrm, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan)" ) -GAME( 1989, slyspy, 0, slyspy, slyspy, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 3)" ) -GAME( 1989, slyspy2, slyspy, slyspy, slyspy, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 2)" ) -GAME( 1989, secretag, slyspy, slyspy, slyspy, slyspy, ROT0, "Data East Corporation", "Secret Agent (World)" ) -GAME( 1989, secretab, slyspy, slyspy, slyspy, dec0, ROT0, "Data East USA", "Sly Spy (revision 2)" ) -GAME( 1989, midres, 0, midres, midres, dec0, ROT0, "Data East Corporation", "Midnight Resistance (World)" ) -GAME( 1989, midresu, midres, midres, midres, dec0, ROT0, "Data East USA", "Midnight Resistance (US)" ) -GAME( 1989, midresj, midres, midres, midres, dec0, ROT0, "Data East Corporation", "Midnight Resistance (Japan)" ) -GAME( 1990, bouldash, 0, slyspy, bouldash, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (World)" ) +GAMEX( 1987, hbarrel, 0, hbarrel, hbarrel, dec0, ROT270, "Data East USA", "Heavy Barrel (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, hbarrelw, hbarrel, hbarrel, hbarrel, dec0, ROT270, "Data East Corporation", "Heavy Barrel (World)", GAME_NO_COCKTAIL ) +GAMEX( 1988, baddudes, 0, baddudes, baddudes, dec0, ROT0, "Data East USA", "Bad Dudes vs. Dragonninja (US)", GAME_NO_COCKTAIL ) +GAMEX( 1988, drgninja, baddudes, baddudes, baddudes, dec0, ROT0, "Data East Corporation", "Dragonninja (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, birdtry, 0, birdtry, hbarrel, dec0, ROT270, "Data East Corporation", "Birdie Try (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL) +GAMEX( 1988, robocop, 0, robocop, robocop, dec0, ROT0, "Data East Corporation", "Robocop (World revision 3)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, robocopu, robocop, robocop, robocop, dec0, ROT0, "Data East USA", "Robocop (US revision 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, robocpu0, robocop, robocop, robocop, dec0, ROT0, "Data East USA", "Robocop (US revision 0)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, robocopb, robocop, robocopb, robocop, dec0, ROT0, "bootleg", "Robocop (World bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1989, hippodrm, 0, hippodrm, hippodrm, hippodrm, ROT0, "Data East USA", "Hippodrome (US)", GAME_NO_COCKTAIL ) +GAMEX( 1989, ffantasy, hippodrm, hippodrm, hippodrm, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1989, slyspy, 0, slyspy, slyspy, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 3)", GAME_NO_COCKTAIL ) +GAMEX( 1989, slyspy2, slyspy, slyspy, slyspy, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 2)", GAME_NO_COCKTAIL ) +GAMEX( 1989, secretag, slyspy, slyspy, slyspy, slyspy, ROT0, "Data East Corporation", "Secret Agent (World)", GAME_NO_COCKTAIL ) +GAMEX( 1989, secretab, slyspy, slyspy, slyspy, dec0, ROT0, "Data East USA", "Sly Spy (revision 2)", GAME_NO_COCKTAIL ) +GAMEX( 1989, midres, 0, midres, midres, dec0, ROT0, "Data East Corporation", "Midnight Resistance (World)", GAME_NO_COCKTAIL ) +GAMEX( 1989, midresu, midres, midres, midres, dec0, ROT0, "Data East USA", "Midnight Resistance (US)", GAME_NO_COCKTAIL ) +GAMEX( 1989, midresj, midres, midres, midres, dec0, ROT0, "Data East Corporation", "Midnight Resistance (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1990, bouldash, 0, slyspy, bouldash, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (World)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/dec8.c b/src/drivers/dec8.c index 49d1592bd..c72c59064 100644 --- a/src/drivers/dec8.c +++ b/src/drivers/dec8.c @@ -2,7 +2,8 @@ Various Data East 8 bit games: - Cobra Command (c) 1988 Data East Corporation (6809) + Cobra Command (World) (c) 1988 Data East Corporation (6809) + Cobra Command (Japan) (c) 1988 Data East Corporation (6809) The Real Ghostbusters (2p) (c) 1987 Data East USA (6809 + I8751) The Real Ghostbusters (3p) (c) 1987 Data East USA (6809 + I8751) Meikyuu Hunter G (c) 1987 Data East Corporation (6809 + I8751) @@ -24,7 +25,7 @@ Various Data East 8 bit games: Meikyuu Hunter G was formerly known as Mazehunter. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk To do: Slight graphics glitches in Captain Silver, Breywood, Shackled. @@ -147,7 +148,7 @@ static void ghostb_i8751_w(int offset, int data) if (i8751_value==0x00aa) i8751_return=0x655; if (i8751_value==0x021a) i8751_return=0x6e5; /* Ghostbusters ID */ - if (i8751_value==0x021b) i8751_return=0x6e4; /* Mazehunter ID */ + if (i8751_value==0x021b) i8751_return=0x6e4; /* Meikyuu Hunter G ID */ } static void srdarwin_i8751_w(int offset, int data) @@ -375,7 +376,7 @@ static void dec8_bank_w(int offset, int data) cpu_setbank(1,&RAM[bankaddress]); } -/* Used by Ghostbusters, Mazehunter & Gondomania */ +/* Used by Ghostbusters, Meikyuu Hunter G & Gondomania */ static void ghostb_bank_w(int offset, int data) { int bankaddress; @@ -522,8 +523,8 @@ static struct MemoryReadAddress cobra_readmem[] = static struct MemoryWriteAddress cobra_writemem[] = { - { 0x0000, 0x07ff, MWA_RAM }, - { 0x0800, 0x17ff, dec8_video_w }, + { 0x0000, 0x07ff, MWA_RAM }, + { 0x0800, 0x17ff, dec8_video_w }, { 0x1800, 0x1fff, MWA_RAM }, { 0x2000, 0x27ff, MWA_RAM, &videoram, &videoram_size }, { 0x2800, 0x2fff, MWA_RAM, &spriteram, &spriteram_size }, @@ -1084,7 +1085,7 @@ INPUT_PORTS_START( cobracom ) PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) @@ -1093,7 +1094,7 @@ INPUT_PORTS_START( cobracom ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) @@ -1111,13 +1112,13 @@ INPUT_PORTS_START( cobracom ) PORT_DIPNAME( 0x10, 0x10, "Allow Continue" ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -1152,7 +1153,7 @@ INPUT_PORTS_START( ghostb ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_DIPNAME( 0x10, 0x10, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) @@ -1161,7 +1162,7 @@ INPUT_PORTS_START( ghostb ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -1193,9 +1194,78 @@ INPUT_PORTS_START( ghostb ) PORT_DIPNAME( 0x80, 0x80, "Beam Energy Pickup" ) /* Ghostb only */ PORT_DIPSETTING( 0x00, "Up 1.5%" ) PORT_DIPSETTING( 0x80, "Normal" ) -// PORT_DIPNAME( 0x80, 0x80, "Freeze" ) /* Mazeh only */ -// PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) -// PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + + +INPUT_PORTS_START( meikyuh ) + PORT_START /* Player 1 controls */ + PLAYER1_JOYSTICK + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START /* Player 2 controls */ + PLAYER2_JOYSTICK + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START /* Player 3 controls */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + PORT_START /* Dummy input for i8751 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) + + PORT_START /* Dip switch */ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x01, "1" ) + PORT_DIPSETTING( 0x03, "3" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_BITX( 0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x04, "Easy" ) + PORT_DIPSETTING( 0x0c, "Normal" ) + PORT_DIPSETTING( 0x08, "Hard" ) + PORT_DIPSETTING( 0x00, "Hardest" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, "Allow Continue" ) + PORT_DIPSETTING( 0x40, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x80, 0x80, "Freeze" ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END INPUT_PORTS_START( srdarwin ) @@ -1222,7 +1292,7 @@ INPUT_PORTS_START( srdarwin ) PORT_START /* The bottom bits of this dip (coinage) are for the i8751 */ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) @@ -1246,13 +1316,13 @@ INPUT_PORTS_START( srdarwin ) PORT_DIPSETTING( 0x0c, "Normal" ) PORT_DIPSETTING( 0x08, "Hard" ) PORT_DIPSETTING( 0x00, "Hardest" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x80, "Continues" ) @@ -1313,7 +1383,7 @@ INPUT_PORTS_START( gondo ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, "Unknown" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -1328,16 +1398,16 @@ INPUT_PORTS_START( gondo ) PORT_DIPSETTING( 0x0c, "Normal" ) PORT_DIPSETTING( 0x08, "Hard" ) PORT_DIPSETTING( 0x00, "Hardest" ) - PORT_DIPNAME( 0x10, 0x00, "Allow Continue" ) + PORT_DIPNAME( 0x10, 0x10, "Allow Continue" ) PORT_DIPSETTING( 0x10, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -1387,7 +1457,7 @@ INPUT_PORTS_START( oscar ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) @@ -1407,7 +1477,7 @@ INPUT_PORTS_START( oscar ) PORT_DIPSETTING( 0x20, "Every 60000" ) PORT_DIPSETTING( 0x10, "Every 90000" ) PORT_DIPSETTING( 0x00, "50000 only" ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x80, "Allow Continue" ) @@ -1445,7 +1515,7 @@ INPUT_PORTS_START( lastmiss ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) @@ -1469,13 +1539,13 @@ INPUT_PORTS_START( lastmiss ) PORT_DIPNAME( 0x10, 0x10, "Allow Continue?" ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -1507,7 +1577,7 @@ INPUT_PORTS_START( shackled ) PORT_START /* Dip switch bank 1 */ /* Coinage not supported */ - PORT_DIPNAME( 0x10, 0x10, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) @@ -1534,13 +1604,13 @@ INPUT_PORTS_START( shackled ) PORT_DIPNAME( 0x10, 0x10, "Allow Continue" ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -1572,7 +1642,7 @@ INPUT_PORTS_START( csilver ) PORT_START /* Dip switch bank 1 */ /* Coinage not supported */ - PORT_DIPNAME( 0x10, 0x10, "Unknown" ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) @@ -1599,13 +1669,13 @@ INPUT_PORTS_START( csilver ) PORT_DIPNAME( 0x10, 0x10, "Allow Continue" ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -1770,7 +1840,7 @@ static struct GfxLayout tiles_r = static struct GfxDecodeInfo cobracom_gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout_32k, 0, 4 }, + { REGION_GFX1, 0, &charlayout_32k, 0, 8 }, { REGION_GFX2, 0, &tiles, 64, 4 }, { REGION_GFX3, 0, &tiles, 192, 4 }, { REGION_GFX4, 0, &tiles, 128, 4 }, @@ -1942,7 +2012,7 @@ static struct MachineDriver machine_driver_cobracom = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, /* 58Hz, 529ms Vblank duration */ 1, 0, /* init machine */ @@ -1991,7 +2061,7 @@ static struct MachineDriver machine_driver_ghostb = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, /* init machine */ @@ -2040,7 +2110,7 @@ static struct MachineDriver machine_driver_srdarwin = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, /* init machine */ @@ -2089,7 +2159,7 @@ static struct MachineDriver machine_driver_gondo = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, /* init machine */ @@ -2144,7 +2214,7 @@ static struct MachineDriver machine_driver_oscar = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 40, /* 40 CPU slices per frame */ 0, /* init machine */ @@ -2199,7 +2269,7 @@ static struct MachineDriver machine_driver_lastmiss = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 200, 0, /* init machine */ @@ -2254,7 +2324,7 @@ static struct MachineDriver machine_driver_shackled = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 80, 0, /* init machine */ @@ -2309,7 +2379,7 @@ static struct MachineDriver machine_driver_csilver = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 60, 0, /* init machine */ @@ -2362,7 +2432,7 @@ static struct MachineDriver machine_driver_garyoret = /* NMIs are caused by the main CPU */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION*2, /* frames per second, vblank duration */ + 58, 529, /* 58Hz, 529ms Vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, /* init machine */ @@ -2397,15 +2467,46 @@ static struct MachineDriver machine_driver_garyoret = ROM_START( cobracom ) ROM_REGION( 0x30000, REGION_CPU1 ) - ROM_LOAD( "eh-11.rom", 0x08000, 0x08000, 0x868637e1 ) - ROM_LOAD( "eh-12.rom", 0x10000, 0x10000, 0x7c878a83 ) - ROM_LOAD( "eh-13.rom", 0x20000, 0x10000, 0x04505acb ) + ROM_LOAD( "el11-5.bin", 0x08000, 0x08000, 0xaf0a8b05 ) + ROM_LOAD( "el12-4.bin", 0x10000, 0x10000, 0x7a44ef38 ) + ROM_LOAD( "el13.bin", 0x20000, 0x10000, 0x04505acb ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64K for sound CPU */ + ROM_LOAD( "el10-4.bin", 0x8000, 0x8000, 0xedfad118 ) + + ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "el14.bin", 0x00000, 0x08000, 0x47246177 ) + + ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "el00-4.bin", 0x00000, 0x10000, 0x122da2a8 ) + ROM_LOAD( "el01-4.bin", 0x20000, 0x10000, 0x27bf705b ) + ROM_LOAD( "el02-4.bin", 0x40000, 0x10000, 0xc86fede6 ) + ROM_LOAD( "el03-4.bin", 0x60000, 0x10000, 0x1d8a855b ) + + ROM_REGION( 0x80000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* tiles 1 */ + ROM_LOAD( "el05.bin", 0x00000, 0x10000, 0x1c4f6033 ) + ROM_LOAD( "el06.bin", 0x20000, 0x10000, 0xd24ba794 ) + ROM_LOAD( "el04.bin", 0x40000, 0x10000, 0xd80a49ce ) + ROM_LOAD( "el07.bin", 0x60000, 0x10000, 0x6d771fc3 ) + + ROM_REGION( 0x80000, REGION_GFX4 | REGIONFLAG_DISPOSE ) /* tiles 2 */ + ROM_LOAD( "el08.bin", 0x00000, 0x08000, 0xcb0dcf4c ) + ROM_CONTINUE( 0x40000, 0x08000 ) + ROM_LOAD( "el09.bin", 0x20000, 0x08000, 0x1fae5be7 ) + ROM_CONTINUE( 0x60000, 0x08000 ) +ROM_END + +ROM_START( cobracmj ) + ROM_REGION( 0x30000, REGION_CPU1 ) + ROM_LOAD( "eh-11.rom", 0x08000, 0x08000, 0x868637e1 ) + ROM_LOAD( "eh-12.rom", 0x10000, 0x10000, 0x7c878a83 ) + ROM_LOAD( "el13.bin", 0x20000, 0x10000, 0x04505acb ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64K for sound CPU */ ROM_LOAD( "eh-10.rom", 0x8000, 0x8000, 0x62ca5e89 ) ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "eh-14.rom", 0x00000, 0x08000, 0x47246177 ) + ROM_LOAD( "el14.bin", 0x00000, 0x08000, 0x47246177 ) ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* sprites */ ROM_LOAD( "eh-00.rom", 0x00000, 0x10000, 0xd96b6797 ) @@ -2414,22 +2515,22 @@ ROM_START( cobracom ) ROM_LOAD( "eh-03.rom", 0x60000, 0x10000, 0xd56790f8 ) ROM_REGION( 0x80000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* tiles 1 */ - ROM_LOAD( "eh-05.rom", 0x00000, 0x10000, 0x1c4f6033 ) - ROM_LOAD( "eh-06.rom", 0x20000, 0x10000, 0xd24ba794 ) - ROM_LOAD( "eh-04.rom", 0x40000, 0x10000, 0xd80a49ce ) - ROM_LOAD( "eh-07.rom", 0x60000, 0x10000, 0x6d771fc3 ) + ROM_LOAD( "el05.bin", 0x00000, 0x10000, 0x1c4f6033 ) + ROM_LOAD( "el06.bin", 0x20000, 0x10000, 0xd24ba794 ) + ROM_LOAD( "el04.bin", 0x40000, 0x10000, 0xd80a49ce ) + ROM_LOAD( "el07.bin", 0x60000, 0x10000, 0x6d771fc3 ) ROM_REGION( 0x80000, REGION_GFX4 | REGIONFLAG_DISPOSE ) /* tiles 2 */ - ROM_LOAD( "eh-08.rom", 0x00000, 0x08000, 0xcb0dcf4c ) - ROM_CONTINUE( 0x20000, 0x08000 ) - ROM_LOAD( "eh-09.rom", 0x40000, 0x08000, 0x1fae5be7 ) - ROM_CONTINUE( 0x60000, 0x08000 ) + ROM_LOAD( "el08.bin", 0x00000, 0x08000, 0xcb0dcf4c ) + ROM_CONTINUE( 0x40000, 0x08000 ) + ROM_LOAD( "el09.bin", 0x20000, 0x08000, 0x1fae5be7 ) + ROM_CONTINUE( 0x60000, 0x08000 ) ROM_END ROM_START( ghostb ) ROM_REGION( 0x50000, REGION_CPU1 ) - ROM_LOAD( "dz-01.rom", 0x08000, 0x08000, 0x7c5bb4b1 ) - ROM_LOAD( "dz-02.rom", 0x10000, 0x10000, 0x8e117541 ) + ROM_LOAD( "dz-01.rom", 0x08000, 0x08000, 0x7c5bb4b1 ) + ROM_LOAD( "dz-02.rom", 0x10000, 0x10000, 0x8e117541 ) ROM_LOAD( "dz-03.rom", 0x20000, 0x10000, 0x5606a8f4 ) ROM_LOAD( "dz-04.rom", 0x30000, 0x10000, 0xd09bad99 ) ROM_LOAD( "dz-05.rom", 0x40000, 0x10000, 0x0315f691 ) @@ -2452,8 +2553,8 @@ ROM_START( ghostb ) ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* tiles */ ROM_LOAD( "dz-07.rom", 0x00000, 0x10000, 0xe7455167 ) - ROM_LOAD( "dz-08.rom", 0x10000, 0x10000, 0x32f9ddfe ) - ROM_LOAD( "dz-09.rom", 0x20000, 0x10000, 0xbb6efc02 ) + ROM_LOAD( "dz-08.rom", 0x10000, 0x10000, 0x32f9ddfe ) + ROM_LOAD( "dz-09.rom", 0x20000, 0x10000, 0xbb6efc02 ) ROM_LOAD( "dz-10.rom", 0x30000, 0x10000, 0x6ef9963b ) ROM_REGION( 0x0800, REGION_PROMS ) @@ -2463,8 +2564,8 @@ ROM_END ROM_START( ghostb3 ) ROM_REGION( 0x50000, REGION_CPU1 ) - ROM_LOAD( "dz01-3b", 0x08000, 0x08000, 0xc8cc862a ) - ROM_LOAD( "dz-02.rom", 0x10000, 0x10000, 0x8e117541 ) + ROM_LOAD( "dz01-3b", 0x08000, 0x08000, 0xc8cc862a ) + ROM_LOAD( "dz-02.rom", 0x10000, 0x10000, 0x8e117541 ) ROM_LOAD( "dz-03.rom", 0x20000, 0x10000, 0x5606a8f4 ) ROM_LOAD( "dz04-1", 0x30000, 0x10000, 0x3c3eb09f ) ROM_LOAD( "dz05", 0x40000, 0x10000, 0xb4971d33 ) @@ -2487,8 +2588,8 @@ ROM_START( ghostb3 ) ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* tiles */ ROM_LOAD( "dz-07.rom", 0x00000, 0x10000, 0xe7455167 ) - ROM_LOAD( "dz-08.rom", 0x10000, 0x10000, 0x32f9ddfe ) - ROM_LOAD( "dz-09.rom", 0x20000, 0x10000, 0xbb6efc02 ) + ROM_LOAD( "dz-08.rom", 0x10000, 0x10000, 0x32f9ddfe ) + ROM_LOAD( "dz-09.rom", 0x20000, 0x10000, 0xbb6efc02 ) ROM_LOAD( "dz-10.rom", 0x30000, 0x10000, 0x6ef9963b ) ROM_REGION( 0x0800, REGION_PROMS ) @@ -2498,10 +2599,10 @@ ROM_END ROM_START( meikyuh ) ROM_REGION( 0x40000, REGION_CPU1 ) - ROM_LOAD( "dw-01.rom", 0x08000, 0x08000, 0x87610c39 ) - ROM_LOAD( "dw-02.rom", 0x10000, 0x10000, 0x40c9b0b8 ) - ROM_LOAD( "dz-03.rom", 0x20000, 0x10000, 0x5606a8f4 ) - ROM_LOAD( "dw-04.rom", 0x30000, 0x10000, 0x235c0c36 ) + ROM_LOAD( "dw-01.rom", 0x08000, 0x08000, 0x87610c39 ) + ROM_LOAD( "dw-02.rom", 0x10000, 0x10000, 0x40c9b0b8 ) + ROM_LOAD( "dz-03.rom", 0x20000, 0x10000, 0x5606a8f4 ) + ROM_LOAD( "dw-04.rom", 0x30000, 0x10000, 0x235c0c36 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64K for sound CPU */ ROM_LOAD( "dw-05.rom", 0x8000, 0x8000, 0xc28c4d82 ) @@ -2532,9 +2633,9 @@ ROM_END ROM_START( srdarwin ) ROM_REGION( 0x28000, REGION_CPU1 ) - ROM_LOAD( "dy_01.rom", 0x20000, 0x08000, 0x1eeee4ff ) + ROM_LOAD( "dy_01.rom", 0x20000, 0x08000, 0x1eeee4ff ) ROM_CONTINUE( 0x08000, 0x08000 ) - ROM_LOAD( "dy_00.rom", 0x10000, 0x10000, 0x2bf6b461 ) + ROM_LOAD( "dy_00.rom", 0x10000, 0x10000, 0x2bf6b461 ) ROM_REGION( 2*0x10000, REGION_CPU2 ) /* 64K for sound CPU + 64k for decrypted opcodes */ ROM_LOAD( "dy_04.rom", 0x8000, 0x8000, 0x2ae3591c ) @@ -2563,8 +2664,8 @@ ROM_END ROM_START( gondo ) ROM_REGION( 0x40000, REGION_CPU1 ) - ROM_LOAD( "dt-00.256", 0x08000, 0x08000, 0xa8cf9118 ) - ROM_LOAD( "dt-01.512", 0x10000, 0x10000, 0xc39bb877 ) + ROM_LOAD( "dt-00.256", 0x08000, 0x08000, 0xa8cf9118 ) + ROM_LOAD( "dt-01.512", 0x10000, 0x10000, 0xc39bb877 ) ROM_LOAD( "dt-02.512", 0x20000, 0x10000, 0xbb5e674b ) ROM_LOAD( "dt-03.512", 0x30000, 0x10000, 0x99c32b13 ) @@ -2601,8 +2702,8 @@ ROM_END ROM_START( makyosen ) ROM_REGION( 0x40000, REGION_CPU1 ) - ROM_LOAD( "ds00", 0x08000, 0x08000, 0x33bb16fe ) - ROM_LOAD( "dt-01.512", 0x10000, 0x10000, 0xc39bb877 ) + ROM_LOAD( "ds00", 0x08000, 0x08000, 0x33bb16fe ) + ROM_LOAD( "dt-01.512", 0x10000, 0x10000, 0xc39bb877 ) ROM_LOAD( "ds02", 0x20000, 0x10000, 0x925307a4 ) ROM_LOAD( "ds03", 0x30000, 0x10000, 0x9c0fcbf6 ) @@ -2639,8 +2740,8 @@ ROM_END ROM_START( oscar ) ROM_REGION( 0x20000, REGION_CPU1 ) - ROM_LOAD( "ed10", 0x08000, 0x08000, 0xf9b0d4d4 ) - ROM_LOAD( "ed09", 0x10000, 0x10000, 0xe2d4bba9 ) + ROM_LOAD( "ed10", 0x08000, 0x08000, 0xf9b0d4d4 ) + ROM_LOAD( "ed09", 0x10000, 0x10000, 0xe2d4bba9 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "ed11", 0x0000, 0x10000, 0x10e5d919 ) @@ -2666,8 +2767,8 @@ ROM_END ROM_START( oscarj ) ROM_REGION( 0x20000, REGION_CPU1 ) - ROM_LOAD( "du10", 0x08000, 0x08000, 0x120040d8 ) - ROM_LOAD( "ed09", 0x10000, 0x10000, 0xe2d4bba9 ) + ROM_LOAD( "du10", 0x08000, 0x08000, 0x120040d8 ) + ROM_LOAD( "ed09", 0x10000, 0x10000, 0xe2d4bba9 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "du11", 0x0000, 0x10000, 0xff45c440 ) @@ -2693,8 +2794,8 @@ ROM_END ROM_START( lastmiss ) ROM_REGION( 0x20000, REGION_CPU1 ) - ROM_LOAD( "dl03-6", 0x08000, 0x08000, 0x47751a5e ) /* Rev 6 roms */ - ROM_LOAD( "lm_dl04.rom", 0x10000, 0x10000, 0x7dea1552 ) + ROM_LOAD( "dl03-6", 0x08000, 0x08000, 0x47751a5e ) /* Rev 6 roms */ + ROM_LOAD( "lm_dl04.rom", 0x10000, 0x10000, 0x7dea1552 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "lm_dl02.rom", 0x0000, 0x10000, 0xec9b5daf ) @@ -2723,8 +2824,8 @@ ROM_END ROM_START( lastmss2 ) ROM_REGION( 0x20000, REGION_CPU1 ) - ROM_LOAD( "lm_dl03.rom", 0x08000, 0x08000, 0x357f5f6b ) /* Rev 5 roms */ - ROM_LOAD( "lm_dl04.rom", 0x10000, 0x10000, 0x7dea1552 ) + ROM_LOAD( "lm_dl03.rom", 0x08000, 0x08000, 0x357f5f6b ) /* Rev 5 roms */ + ROM_LOAD( "lm_dl04.rom", 0x10000, 0x10000, 0x7dea1552 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "lm_dl02.rom", 0x0000, 0x10000, 0xec9b5daf ) @@ -2753,11 +2854,11 @@ ROM_END ROM_START( shackled ) ROM_REGION( 0x48000, REGION_CPU1 ) - ROM_LOAD( "dk-02.rom", 0x08000, 0x08000, 0x87f8fa85 ) + ROM_LOAD( "dk-02.rom", 0x08000, 0x08000, 0x87f8fa85 ) ROM_LOAD( "dk-06.rom", 0x10000, 0x10000, 0x69ad62d1 ) ROM_LOAD( "dk-05.rom", 0x20000, 0x10000, 0x598dd128 ) ROM_LOAD( "dk-04.rom", 0x30000, 0x10000, 0x36d305d4 ) - ROM_LOAD( "dk-03.rom", 0x40000, 0x08000, 0x6fd90fd1 ) + ROM_LOAD( "dk-03.rom", 0x40000, 0x08000, 0x6fd90fd1 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "dk-01.rom", 0x00000, 0x10000, 0x71fe3bda ) @@ -2787,11 +2888,11 @@ ROM_END ROM_START( breywood ) ROM_REGION( 0x48000, REGION_CPU1 ) - ROM_LOAD( "7.bin", 0x08000, 0x08000, 0xc19856b9 ) - ROM_LOAD( "3.bin", 0x10000, 0x10000, 0x2860ea02 ) + ROM_LOAD( "7.bin", 0x08000, 0x08000, 0xc19856b9 ) + ROM_LOAD( "3.bin", 0x10000, 0x10000, 0x2860ea02 ) ROM_LOAD( "4.bin", 0x20000, 0x10000, 0x0fdd915e ) ROM_LOAD( "5.bin", 0x30000, 0x10000, 0x71036579 ) - ROM_LOAD( "6.bin", 0x40000, 0x08000, 0x308f4893 ) + ROM_LOAD( "6.bin", 0x40000, 0x08000, 0x308f4893 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ ROM_LOAD( "8.bin", 0x0000, 0x10000, 0x3d9fb623 ) @@ -2821,8 +2922,8 @@ ROM_END ROM_START( csilver ) ROM_REGION( 0x48000, REGION_CPU1 ) - ROM_LOAD( "a4", 0x08000, 0x08000, 0x02dd8cfc ) - ROM_LOAD( "a2", 0x10000, 0x10000, 0x570fb50c ) + ROM_LOAD( "a4", 0x08000, 0x08000, 0x02dd8cfc ) + ROM_LOAD( "a2", 0x10000, 0x10000, 0x570fb50c ) ROM_LOAD( "a3", 0x20000, 0x10000, 0x58625890 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* CPU 2, 1st 16k is empty */ @@ -2855,7 +2956,7 @@ ROM_END ROM_START( garyoret ) ROM_REGION( 0x58000, REGION_CPU1 ) - ROM_LOAD( "dv00", 0x08000, 0x08000, 0xcceaaf05 ) + ROM_LOAD( "dv00", 0x08000, 0x08000, 0xcceaaf05 ) ROM_LOAD( "dv01", 0x10000, 0x10000, 0xc33fc18a ) ROM_LOAD( "dv02", 0x20000, 0x10000, 0xf9e26ce7 ) ROM_LOAD( "dv03", 0x30000, 0x10000, 0x55d8d699 ) @@ -2938,19 +3039,19 @@ static void init_ghostb(void) /******************************************************************************/ -GAME( 1988, cobracom, 0, cobracom, cobracom, 0, ROT0, "Data East Corporation", "Cobra-Command (Japan)" ) -GAME( 1987, ghostb, 0, ghostb, ghostb, ghostb, ROT0, "Data East USA", "The Real Ghostbusters (US 2 Players)" ) -GAME( 1987, ghostb3, ghostb, ghostb, ghostb, ghostb, ROT0, "Data East USA", "The Real Ghostbusters (US 3 Players)" ) -GAME( 1987, meikyuh, ghostb, ghostb, ghostb, meikyuh, ROT0, "Data East Corporation", "Meikyuu Hunter G (Japan)" ) -GAME( 1987, srdarwin, 0, srdarwin, srdarwin, deco222, ROT270, "Data East Corporation", "Super Real Darwin (Japan)" ) -GAME( 1987, gondo, 0, gondo, gondo, 0, ROT270, "Data East USA", "Gondomania (US)" ) -GAME( 1987, makyosen, gondo, gondo, gondo, 0, ROT270, "Data East Corporation", "Makyou Senshi (Japan)" ) -GAME( 1988, oscar, 0, oscar, oscar, deco222, ROT0, "Data East USA", "Psycho-Nics Oscar (US)" ) -GAME( 1987, oscarj, oscar, oscar, oscar, deco222, ROT0, "Data East Corporation", "Psycho-Nics Oscar (Japan)" ) -GAME( 1986, lastmiss, 0, lastmiss, lastmiss, 0, ROT270, "Data East USA", "Last Mission (US revision 6)" ) -GAME( 1986, lastmss2, lastmiss, lastmiss, lastmiss, 0, ROT270, "Data East USA", "Last Mission (US revision 5)" ) -GAME( 1986, shackled, 0, shackled, shackled, 0, ROT0, "Data East USA", "Shackled (US)" ) -GAME( 1986, breywood, shackled, shackled, shackled, 0, ROT0, "Data East Corporation", "Breywood (Japan)" ) -GAME( 1987, csilver, 0, csilver, csilver, 0, ROT0, "Data East Corporation", "Captain Silver (Japan)" ) -GAME( 1987, garyoret, 0, garyoret, garyoret, 0, ROT0, "Data East Corporation", "Garyo Retsuden (Japan)" ) - +GAMEX( 1988, cobracom, 0, cobracom, cobracom, 0, ROT0, "Data East Corporation", "Cobra-Command (World revision 5)", GAME_NO_COCKTAIL ) +GAMEX( 1988, cobracmj, cobracom, cobracom, cobracom, 0, ROT0, "Data East Corporation", "Cobra-Command (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, ghostb, 0, ghostb, ghostb, ghostb, ROT0, "Data East USA", "The Real Ghostbusters (US 2 Players)", GAME_NO_COCKTAIL ) +GAMEX( 1987, ghostb3, ghostb, ghostb, ghostb, ghostb, ROT0, "Data East USA", "The Real Ghostbusters (US 3 Players)", GAME_NO_COCKTAIL ) +GAMEX( 1987, meikyuh, ghostb, ghostb, meikyuh, meikyuh, ROT0, "Data East Corporation", "Meikyuu Hunter G (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, srdarwin, 0, srdarwin, srdarwin, deco222, ROT270, "Data East Corporation", "Super Real Darwin (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, gondo, 0, gondo, gondo, 0, ROT270, "Data East USA", "Gondomania (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, makyosen, gondo, gondo, gondo, 0, ROT270, "Data East Corporation", "Makyou Senshi (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, oscar, 0, oscar, oscar, deco222, ROT0, "Data East USA", "Psycho-Nics Oscar (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, oscarj, oscar, oscar, oscar, deco222, ROT0, "Data East Corporation", "Psycho-Nics Oscar (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1986, lastmiss, 0, lastmiss, lastmiss, 0, ROT270, "Data East USA", "Last Mission (US revision 6)", GAME_NO_COCKTAIL ) +GAMEX( 1986, lastmss2, lastmiss, lastmiss, lastmiss, 0, ROT270, "Data East USA", "Last Mission (US revision 5)", GAME_NO_COCKTAIL ) +GAMEX( 1986, shackled, 0, shackled, shackled, 0, ROT0, "Data East USA", "Shackled (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, breywood, shackled, shackled, shackled, 0, ROT0, "Data East Corporation", "Breywood (Japan revision 2)", GAME_NO_COCKTAIL ) +GAMEX( 1987, csilver, 0, csilver, csilver, 0, ROT0, "Data East Corporation", "Captain Silver (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, garyoret, 0, garyoret, garyoret, 0, ROT0, "Data East Corporation", "Garyo Retsuden (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index c5c5a8c40..988ccca77 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -1668,7 +1668,7 @@ static void init_radarscp(void) -GAME( 1980, radarscp, 0, radarscp, dkong, radarscp, ROT90, "Nintendo", "Radar Scope" ) +GAMEX(1980, radarscp, 0, radarscp, dkong, radarscp, ROT90, "Nintendo", "Radar Scope", GAME_IMPERFECT_SOUND ) GAME( 1981, dkong, 0, dkong, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US)" ) GAME( 1981, dkongjp, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 1)" ) GAME( 1981, dkongjpo, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 2)" ) diff --git a/src/drivers/dominos.c b/src/drivers/dominos.c index 988d46290..b517e9c2c 100644 --- a/src/drivers/dominos.c +++ b/src/drivers/dominos.c @@ -198,4 +198,4 @@ ROM_END -GAME( 1977, dominos, 0, dominos, dominos, 0, ROT0, "Atari", "Dominos" ) +GAMEX( 1977, dominos, 0, dominos, dominos, 0, ROT0, "Atari", "Dominos", GAME_NO_SOUND ) diff --git a/src/drivers/dynduke.c b/src/drivers/dynduke.c index b611178e7..e39d6d896 100644 --- a/src/drivers/dynduke.c +++ b/src/drivers/dynduke.c @@ -17,7 +17,7 @@ There is a country code byte in the program to select between Seibu Kaihatsu/Fabtek/Taito licenses. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/drivers/espial.c b/src/drivers/espial.c index 1e91a080f..f8031affd 100644 --- a/src/drivers/espial.c +++ b/src/drivers/espial.c @@ -348,5 +348,5 @@ ROM_END -GAME( 1983, espial, 0, espial, espial, 0, ROT0, "[Orca] Thunderbolt", "Espial (US?)" ) -GAME( 1983, espiale, espial, espial, espial, 0, ROT0, "[Orca] Thunderbolt", "Espial (Europe)" ) +GAMEX( 1983, espial, 0, espial, espial, 0, ROT0, "[Orca] Thunderbolt", "Espial (US?)", GAME_NO_COCKTAIL ) +GAMEX( 1983, espiale, espial, espial, espial, 0, ROT0, "[Orca] Thunderbolt", "Espial (Europe)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/exctsccr.c b/src/drivers/exctsccr.c index c46437ea3..64ee40ed5 100644 --- a/src/drivers/exctsccr.c +++ b/src/drivers/exctsccr.c @@ -108,14 +108,14 @@ static struct MemoryWriteAddress sound_writemem[] = static struct IOWritePort sound_writeport[] = { - { 0x82, 0x82, AY8910_write_port_0_w }, - { 0x83, 0x83, AY8910_control_port_0_w }, - { 0x86, 0x86, AY8910_write_port_1_w }, - { 0x87, 0x87, AY8910_control_port_1_w }, - { 0x8a, 0x8a, AY8910_write_port_2_w }, - { 0x8b, 0x8b, AY8910_control_port_2_w }, - { 0x8e, 0x8e, AY8910_write_port_3_w }, - { 0x8f, 0x8f, AY8910_control_port_3_w }, + { 0x82, 0x82, AY8910_write_port_0_w }, + { 0x83, 0x83, AY8910_control_port_0_w }, + { 0x86, 0x86, AY8910_write_port_1_w }, + { 0x87, 0x87, AY8910_control_port_1_w }, + { 0x8a, 0x8a, AY8910_write_port_2_w }, + { 0x8b, 0x8b, AY8910_control_port_2_w }, + { 0x8e, 0x8e, AY8910_write_port_3_w }, + { 0x8f, 0x8f, AY8910_control_port_3_w }, { -1 } /* end of table */ }; @@ -209,17 +209,11 @@ INPUT_PORTS_START( exctsccr ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* DSW0 */ - /* The next two overlap */ - PORT_DIPNAME( 0x03, 0x03, "Coinage(Coin A)" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x03, 0x03, "Coinage(Coin B)" ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x03, "A 1C/1C B 3C/1C" ) + PORT_DIPSETTING( 0x01, "A 1C/2C B 1C/4C" ) + PORT_DIPSETTING( 0x00, "A 1C/3C B 1C/6C" ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -577,7 +571,7 @@ ROM_END -GAME( 1983, exctsccr, 0, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer" ) -GAME( 1983, exctscca, exctsccr, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer (alternate music)" ) -GAME( 1984, exctsccb, exctsccr, exctsccb, exctsccr, 0, ROT90, "bootleg", "Exciting Soccer (bootleg)" ) -GAMEX(1983, exctscc2, exctsccr, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer II", GAME_NOT_WORKING ) +GAMEX( 1983, exctsccr, 0, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer", GAME_NO_COCKTAIL ) +GAMEX( 1983, exctscca, exctsccr, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer (alternate music)", GAME_NO_COCKTAIL ) +GAMEX( 1984, exctsccb, exctsccr, exctsccb, exctsccr, 0, ROT90, "bootleg", "Exciting Soccer (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1983, exctscc2, exctsccr, exctsccr, exctsccr, 0, ROT90, "Alpha Denshi Co", "Exciting Soccer II", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/exedexes.c b/src/drivers/exedexes.c index 7b27222a3..d62e10b3f 100644 --- a/src/drivers/exedexes.c +++ b/src/drivers/exedexes.c @@ -405,5 +405,5 @@ ROM_END -GAME( 1985, exedexes, 0, exedexes, exedexes, 0, ROT270, "Capcom", "Exed Exes" ) -GAME( 1985, savgbees, exedexes, exedexes, exedexes, 0, ROT270, "Capcom (Memetron license)", "Savage Bees" ) +GAMEX( 1985, exedexes, 0, exedexes, exedexes, 0, ROT270, "Capcom", "Exed Exes", GAME_NO_COCKTAIL ) +GAMEX( 1985, savgbees, exedexes, exedexes, exedexes, 0, ROT270, "Capcom (Memetron license)", "Savage Bees", GAME_NO_COCKTAIL ) diff --git a/src/drivers/exerion.c b/src/drivers/exerion.c index a3372caae..23badca4f 100644 --- a/src/drivers/exerion.c +++ b/src/drivers/exerion.c @@ -500,6 +500,6 @@ static void init_exerionb(void) -GAMEX( 1983, exerion, 0, exerion, exerion, exerion, ROT90, "Jaleco", "Exerion", GAME_WRONG_COLORS ) -GAMEX( 1983, exeriont, exerion, exerion, exerion, exerion, ROT90, "Jaleco (Taito America license)", "Exerion (Taito)", GAME_WRONG_COLORS ) -GAMEX( 1983, exerionb, exerion, exerion, exerion, exerionb, ROT90, "Jaleco", "Exerion (bootleg)", GAME_WRONG_COLORS ) +GAMEX( 1983, exerion, 0, exerion, exerion, exerion, ROT90, "Jaleco", "Exerion", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1983, exeriont, exerion, exerion, exerion, exerion, ROT90, "Jaleco (Taito America license)", "Exerion (Taito)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1983, exerionb, exerion, exerion, exerion, exerionb, ROT90, "Jaleco", "Exerion (bootleg)", GAME_WRONG_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/exidy.c b/src/drivers/exidy.c index 8871ba816..76bc7c672 100644 --- a/src/drivers/exidy.c +++ b/src/drivers/exidy.c @@ -1421,12 +1421,12 @@ GAME( 1979, sidetrac, 0, targ, sidetrac, sidetrac, ROT0, "Exidy", "Side GAME( 1980, targ, 0, targ, targ, targ, ROT0, "Exidy", "Targ" ) GAME( 1980, spectar, 0, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 3)" ) GAME( 1980, spectar1, spectar, targ, spectar, spectar, ROT0, "Exidy", "Spectar (revision 1?)" ) -GAME( 1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)" ) -GAME( 1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)" ) -GAME( 1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)" ) -GAME( 1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)" ) -GAME( 1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)" ) -GAME( 1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)" ) -GAME( 1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II" ) -GAME( 1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat" ) -GAME( 1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "Fax" ) +GAMEX(1981, mtrap, 0, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 5)", GAME_IMPERFECT_SOUND ) +GAMEX(1981, mtrap3, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 3)", GAME_IMPERFECT_SOUND ) +GAMEX(1981, mtrap4, mtrap, mtrap, mtrap, mtrap, ROT0, "Exidy", "Mouse Trap (version 4)", GAME_IMPERFECT_SOUND ) +GAMEX(1981, venture, 0, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 1)", GAME_IMPERFECT_SOUND ) +GAMEX(1981, venture2, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 5 set 2)", GAME_IMPERFECT_SOUND ) +GAMEX(1981, venture4, venture, venture, venture, venture, ROT0, "Exidy", "Venture (version 4)", GAME_IMPERFECT_SOUND ) +GAMEX(1982, pepper2, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Pepper II", GAME_IMPERFECT_SOUND ) +GAMEX(1982, hardhat, 0, pepper2, pepper2, pepper2, ROT0, "Exidy", "Hard Hat", GAME_IMPERFECT_SOUND ) +GAMEX(1983, fax, 0, fax, fax, fax, ROT0, "Exidy", "Fax", GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/exprraid.c b/src/drivers/exprraid.c index 38488a392..160172669 100644 --- a/src/drivers/exprraid.c +++ b/src/drivers/exprraid.c @@ -551,6 +551,6 @@ static void init_wexpresb(void) } -GAME( 1986, exprraid, 0, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US)" ) -GAME( 1986, wexpress, exprraid, exprraid, exprraid, wexpress, ROT0, "Data East Corporation", "Western Express (World?)" ) -GAME( 1986, wexpresb, exprraid, exprraid, exprraid, wexpresb, ROT0, "bootleg", "Western Express (bootleg)" ) +GAMEX( 1986, exprraid, 0, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, wexpress, exprraid, exprraid, exprraid, wexpress, ROT0, "Data East Corporation", "Western Express (World?)", GAME_NO_COCKTAIL ) +GAMEX( 1986, wexpresb, exprraid, exprraid, exprraid, wexpresb, ROT0, "bootleg", "Western Express (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/finalizr.c b/src/drivers/finalizr.c index 270c2eccf..733c20d37 100644 --- a/src/drivers/finalizr.c +++ b/src/drivers/finalizr.c @@ -516,5 +516,5 @@ static void init_finalizr(void) } -GAMEX( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND ) -GAMEX( 1985, finalizb, finalizr, finalizr, finalizb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND ) +GAMEX( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1985, finalizb, finalizr, finalizr, finalizb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/flstory.c b/src/drivers/flstory.c index 38a560de6..3dea559cc 100644 --- a/src/drivers/flstory.c +++ b/src/drivers/flstory.c @@ -398,6 +398,33 @@ ROM_START( flstory ) ROM_LOAD( "vid-a45.09", 0x0c000, 0x4000, 0x8336be58 ) ROM_END +ROM_START( flstoryj ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the first CPU */ + ROM_LOAD( "cpu-a45.15", 0x00000, 0x4000, 0xf03fc969 ) + ROM_LOAD( "cpu-a45.16", 0x04000, 0x4000, 0x311aa82e ) + ROM_LOAD( "cpu-a45.17", 0x08000, 0x4000, 0xa2b5d17d ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the second CPU */ + ROM_LOAD( "a45_12.8", 0x0000, 0x2000, 0xd6f593fb ) + ROM_LOAD( "a45_13.9", 0x2000, 0x2000, 0x451f92f9 ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 2k for the microcontroller */ + ROM_LOAD( "p5sa54-.09", 0x0000, 0x0800, 0x0e8b8846 ) /* from the english version - might be wrong */ + + ROM_REGION( 0x10000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "vid-a45.06", 0x00000, 0x4000, 0xdc856a75 ) + ROM_LOAD( "vid-a45.20", 0x04000, 0x4000, 0x1b0edf34 ) + ROM_LOAD( "vid-a45.07", 0x08000, 0x4000, 0xaa4b0762 ) + ROM_LOAD( "vid-a45.21", 0x0c000, 0x4000, 0xfc382bd1 ) + + ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "vid-a45.18", 0x00000, 0x4000, 0x6f08f69e ) + ROM_LOAD( "vid-a45.08", 0x04000, 0x4000, 0xd0b028ca ) + ROM_LOAD( "vid-a45.19", 0x08000, 0x4000, 0x2b572dc9 ) + ROM_LOAD( "vid-a45.09", 0x0c000, 0x4000, 0x8336be58 ) +ROM_END + + static void init_flstory(void) { @@ -409,4 +436,5 @@ static void init_flstory(void) -GAMEX( 1985, flstory, 0, flstory, flstory, flstory, ROT0, "Taito", "The FairyLand Story", GAME_NOT_WORKING ) +GAMEX( 1985, flstory, 0, flstory, flstory, flstory, ROT0, "Taito", "The FairyLand Story", GAME_NOT_WORKING ) +GAMEX( 1985, flstoryj, flstory, flstory, flstory, flstory, ROT0, "Taito", "The FairyLand Story (Japan)", GAME_NOT_WORKING ) diff --git a/src/drivers/foodf.c b/src/drivers/foodf.c index 2b0cb345e..d05bf83c8 100644 --- a/src/drivers/foodf.c +++ b/src/drivers/foodf.c @@ -201,7 +201,7 @@ static struct POKEYinterface pokey_interface = { 3, /* 3 chips */ 600000, /* .6 Mhz */ - { 50, 50, 50 }, + { 33, 33, 33 }, /* The 8 pot handlers */ { 0, 0, 0 }, { 0, 0, 0 }, @@ -285,4 +285,4 @@ ROM_END -GAME( 1982, foodf, 0, foodf, foodf, 0, ROT0, "Atari", "Food Fight" ) +GAMEX( 1982, foodf, 0, foodf, foodf, 0, ROT0, "Atari", "Food Fight", GAME_NO_COCKTAIL ) diff --git a/src/drivers/funkybee.c b/src/drivers/funkybee.c index 4c7523e33..85c2d3999 100644 --- a/src/drivers/funkybee.c +++ b/src/drivers/funkybee.c @@ -325,7 +325,5 @@ ROM_END -GAME( 1982, funkybee, 0, funkybee, funkybee, 0, ROT90, "Orca Corporation", "Funky Bee" ) -GAME( 1983, skylancr, 0, funkybee, skylancr, 0, ROT90, "Orca (Esco Trading Co license)", "Sky Lancer" ) - - +GAMEX( 1982, funkybee, 0, funkybee, funkybee, 0, ROT90, "Orca Corporation", "Funky Bee", GAME_NO_COCKTAIL ) +GAMEX( 1983, skylancr, 0, funkybee, skylancr, 0, ROT90, "Orca (Esco Trading Co license)", "Sky Lancer", GAME_NO_COCKTAIL ) diff --git a/src/drivers/funkyjet.c b/src/drivers/funkyjet.c index 33546b855..ebeff9065 100644 --- a/src/drivers/funkyjet.c +++ b/src/drivers/funkyjet.c @@ -10,7 +10,7 @@ The game also uses a protection chip which isn't fully worked out yet. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -347,7 +347,7 @@ static struct MachineDriver machine_driver_funkyjet = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, 0, diff --git a/src/drivers/galaxian.c b/src/drivers/galaxian.c index da5d6bd5d..9e9c8a07b 100644 --- a/src/drivers/galaxian.c +++ b/src/drivers/galaxian.c @@ -2349,7 +2349,7 @@ ROM_START( redufo ) ROM_LOAD( "ru5a", 0x2000, 0x0800, 0xcb648ff3 ) ROM_LOAD( "ru6a", 0x2800, 0x0800, 0xe1a9f58e ) - ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "ruhja", 0x0000, 0x0800, 0x8a422b0d ) ROM_LOAD( "rukla", 0x0800, 0x0800, 0x1eb84cb1 ) diff --git a/src/drivers/gaplus.c b/src/drivers/gaplus.c index 682a5883e..d00bce02d 100644 --- a/src/drivers/gaplus.c +++ b/src/drivers/gaplus.c @@ -821,7 +821,7 @@ ROM_END -GAME( 1984, gaplus, 0, gaplus, gaplus, 0, ROT90, "Namco", "Gaplus (set 1)" ) -GAME( 1984, gaplusa, gaplus, gaplusa, gaplus, 0, ROT90, "Namco", "Gaplus (set 2)" ) -GAME( 1984, galaga3, gaplus, galaga3, galaga3, 0, ROT90, "Namco", "Galaga 3 (set 1)" ) -GAME( 1984, galaga3a, gaplus, galaga3, galaga3a, 0, ROT90, "Namco", "Galaga 3 (set 2)" ) +GAMEX( 1984, gaplus, 0, gaplus, gaplus, 0, ROT90, "Namco", "Gaplus (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1984, gaplusa, gaplus, gaplusa, gaplus, 0, ROT90, "Namco", "Gaplus (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1984, galaga3, gaplus, galaga3, galaga3, 0, ROT90, "Namco", "Galaga 3 (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1984, galaga3a, gaplus, galaga3, galaga3a, 0, ROT90, "Namco", "Galaga 3 (set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/gladiatr.c b/src/drivers/gladiatr.c index ea6a3c8a2..affcae6c0 100644 --- a/src/drivers/gladiatr.c +++ b/src/drivers/gladiatr.c @@ -717,5 +717,5 @@ ROM_END -GAME( 1986, gladiatr, 0, gladiatr, gladiatr, 0, ROT0, "Taito America Corporation", "Gladiator (US)" ) -GAME( 1986, ogonsiro, gladiatr, gladiatr, gladiatr, 0, ROT0, "Taito Corporation", "Ohgon no Siro (Japan)" ) +GAMEX( 1986, gladiatr, 0, gladiatr, gladiatr, 0, ROT0, "Taito America Corporation", "Gladiator (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, ogonsiro, gladiatr, gladiatr, gladiatr, 0, ROT0, "Taito Corporation", "Ohgon no Siro (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/gotya.c b/src/drivers/gotya.c new file mode 100644 index 000000000..3802740d8 --- /dev/null +++ b/src/drivers/gotya.c @@ -0,0 +1,199 @@ +/**************************************************************************** + + Got-Ya driver by Zsolt Vasvari + + +TODO: Sound + + Hitachi HD38880BP + HD38882PA06 + + I think HD38880 is a CPU/MCU, because the game just sends it a sound command (0-0x1a) + +****************************************************************************/ + +#include "driver.h" +#include "vidhrdw/generic.h" + + +extern unsigned char *gotya_scroll; +extern unsigned char *gotya_foregroundram; + +void gotya_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); +int gotya_vh_start(void); +void gotya_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +void gotya_video_control_w(int offset, int data); + + +static struct MemoryReadAddress readmem[] = +{ + { 0x0000, 0x3fff, MRA_ROM }, + { 0x5000, 0x5fff, MRA_RAM }, + { 0x6000, 0x6000, input_port_0_r }, + { 0x6001, 0x6001, input_port_1_r }, + { 0x6002, 0x6002, input_port_2_r }, + { 0xc000, 0xd3ff, MRA_RAM }, + { -1 } /* end of table */ +}; + +static struct MemoryWriteAddress writemem[] = +{ + { 0x0000, 0x3fff, MWA_ROM }, + { 0x5000, 0x5fff, MWA_RAM }, + { 0x6004, 0x6004, gotya_video_control_w }, + { 0x6005, 0x6005, soundlatch_w }, + { 0x6006, 0x6006, MWA_RAM, &gotya_scroll }, + { 0x6007, 0x6007, watchdog_reset_w }, + { 0xc000, 0xc7ff, videoram_w, &videoram, &videoram_size }, + { 0xc800, 0xcfff, colorram_w, &colorram }, + { 0xd000, 0xd3df, MWA_RAM, &gotya_foregroundram }, + { 0xd3e0, 0xd3ff, MWA_RAM, &spriteram }, + { -1 } /* end of table */ +}; + + +INPUT_PORTS_START( gotya ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 ) + PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1, "P1 Paper", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1, "P1 Scissors", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1, "P1 Rock", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) + PORT_DIPNAME( 0x10, 0x10, "Sound Test" ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2, "P2 Paper", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2, "P2 Scissors", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2, "P2 Rock", IP_KEY_DEFAULT, IP_JOY_DEFAULT ) + + PORT_START /* DSW1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00, "Easy" ) + PORT_DIPSETTING( 0x10, "Hard" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, "None" ) + PORT_DIPSETTING( 0x20, "15000" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x40, "5" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + +INPUT_PORTS_END + + +static struct GfxLayout charlayout = +{ + 8,8, /* 8*8 characters */ + 256, /* 256 characters */ + 2, /* 2 bits per pixel */ + { 0, 4 }, /* the bitplanes are packed in one byte */ + { 0, 1, 2, 3, 8*8+0, 8*8+1, 8*8+2, 8*8+3 }, + { 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 }, + 16*8 /* every char takes 16 consecutive bytes */ +}; + +static struct GfxLayout spritelayout = +{ + 16,16, /* 16*16 characters */ + 64, /* 64 characters */ + 2, /* 2 bits per pixel */ + { 0, 4 }, /* the bitplanes are packed in one byte */ + { 0, 1, 2, 3, 24*8+0, 24*8+1, 24*8+2, 24*8+3, + 16*8+0, 16*8+1, 16*8+2, 16*8+3, 8*8+0, 8*8+1, 8*8+2, 8*8+3 }, + { 39*8, 38*8, 37*8, 36*8, 35*8, 34*8, 33*8, 32*8, + 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 }, + 64*8 /* every char takes 64 consecutive bytes */ +}; + +static struct GfxDecodeInfo gfxdecodeinfo[] = +{ + { REGION_GFX1, 0, &charlayout, 0, 16 }, + { REGION_GFX2, 0, &spritelayout, 0, 16 }, + { -1 } /* end of array */ +}; + + +static struct MachineDriver machine_driver_gotya = +{ + /* basic machine hardware */ + { + { + CPU_Z80, + 18432000/6, /* 3.072 MHz ??? */ + readmem,writemem,0,0, + interrupt,1 + } + }, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 1, + 0, + + /* video hardware */ + 36*8, 32*8, { 0, 36*8-1, 2*8, 30*8-1 }, + gfxdecodeinfo, + 8, 16*4, + gotya_vh_convert_color_prom, + + VIDEO_TYPE_RASTER, + 0, + gotya_vh_start, + generic_vh_stop, + gotya_vh_screenrefresh, + + /* sound hardware */ + 0,0,0,0, +}; + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( gotya ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for main CPU */ + ROM_LOAD( "gb-06.bin", 0x0000, 0x1000, 0x7793985a ) + ROM_LOAD( "gb-05.bin", 0x1000, 0x1000, 0x683d188b ) + ROM_LOAD( "gb-04.bin", 0x2000, 0x1000, 0x15b72f09 ) + ROM_LOAD( "gb-03.bin", 0x3000, 0x1000, 0xf34d90ab ) /* this is the only ROM that passes the ROM test */ + + ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "gb-12.bin", 0x0000, 0x1000, 0x4993d735 ) + + ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "gb-11.bin", 0x0000, 0x1000, 0x5d5eca1b ) + + ROM_REGION( 0x0120, REGION_PROMS ) + ROM_LOAD( "prom.1a", 0x0000, 0x0020, 0x4864a5a0 ) /* color PROM */ + ROM_LOAD( "prom.4c", 0x0020, 0x0100, 0x4745b5f6 ) /* lookup table */ + + ROM_REGION( 0x1000, REGION_USER1 ) /* no idea what these are */ + ROM_LOAD( "gb-01.bin", 0x0000, 0x0800, 0xc31dba64 ) + ROM_LOAD( "gb-02.bin", 0x0800, 0x0800, 0x65a7e284 ) + + ROM_REGION( 0x4000, REGION_USER2 ) /* HD38880 code? */ + ROM_LOAD( "gb-10.bin", 0x0000, 0x1000, 0x8101915f ) + ROM_LOAD( "gb-09.bin", 0x1000, 0x1000, 0x619bba76 ) + ROM_LOAD( "gb-08.bin", 0x2000, 0x1000, 0x82f59528 ) + ROM_LOAD( "gb-07.bin", 0x3000, 0x1000, 0x92a9f8bf ) +ROM_END + + +GAMEX( 1981, gotya, 0, gotya, gotya, 0, ROT270, "Game-A-Tron", "Got-Ya (12/24/1981, prototype?)", GAME_NO_SOUND ) diff --git a/src/drivers/gunsmoke.c b/src/drivers/gunsmoke.c index ced936415..6525fcab7 100644 --- a/src/drivers/gunsmoke.c +++ b/src/drivers/gunsmoke.c @@ -490,7 +490,7 @@ ROM_END different: the levels are in a different order, and the "Demonstration" dip switch has no effect. */ -GAME( 1985, gunsmoke, 0, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (World)" ) -GAME( 1985, gunsmrom, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 1)" ) -GAME( 1986, gunsmoka, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (US set 2)" ) -GAME( 1985, gunsmokj, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (Japan)" ) +GAMEX( 1985, gunsmoke, 0, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (World)", GAME_NO_COCKTAIL ) +GAMEX( 1985, gunsmrom, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1986, gunsmoka, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (US set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1985, gunsmokj, gunsmoke, gunsmoke, gunsmoke, 0, ROT270, "Capcom", "Gun.Smoke (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/hcastle.c b/src/drivers/hcastle.c index ae3d8c379..fa1587b6d 100644 --- a/src/drivers/hcastle.c +++ b/src/drivers/hcastle.c @@ -1,9 +1,8 @@ /*************************************************************************** -Haunted Castle + Haunted Castle - -Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -99,9 +98,9 @@ static struct MemoryWriteAddress writemem[] = { 0x0600, 0x06ff, paletteram_xBBBBBGGGGGRRRRR_swap_w, &paletteram }, { 0x0700, 0x1fff, MWA_RAM }, { 0x2000, 0x2fff, hcastle_pf1_video_w, &hcastle_pf1_videoram }, - { 0x3000, 0x3fff, MWA_RAM, &spriteram }, + { 0x3000, 0x3fff, MWA_RAM, &spriteram, &spriteram_size }, { 0x4000, 0x4fff, hcastle_pf2_video_w, &hcastle_pf2_videoram }, - { 0x5000, 0x5fff, MWA_RAM, &spriteram_2 }, + { 0x5000, 0x5fff, MWA_RAM, &spriteram_2, &spriteram_2_size }, { 0x6000, 0xffff, MWA_ROM }, { -1 } /* end of table */ }; @@ -333,7 +332,7 @@ static struct MachineDriver machine_driver_hcastle = 256, 2*8*16*16, /* use PALETTE_COLOR_TRANSPARENT from the dynamic palette. */ hcastle_vh_convert_color_prom, - VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE, + VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_BUFFERS_SPRITERAM, 0, hcastle_vh_start, hcastle_vh_stop, @@ -442,6 +441,6 @@ ROM_END -GAME( 1988, hcastle, 0, hcastle, hcastle, 0, ROT0, "Konami", "Haunted Castle (set 1)" ) -GAME( 1988, hcastlea, hcastle, hcastle, hcastle, 0, ROT0, "Konami", "Haunted Castle (set 2)" ) -GAME( 1988, hcastlej, hcastle, hcastle, hcastle, 0, ROT0, "Konami", "Akuma-Jou Dracula (Japan)" ) +GAMEX( 1988, hcastle, 0, hcastle, hcastle, 0, ROT0, "Konami", "Haunted Castle (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1988, hcastlea, hcastle, hcastle, hcastle, 0, ROT0, "Konami", "Haunted Castle (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1988, hcastlej, hcastle, hcastle, hcastle, 0, ROT0, "Konami", "Akuma-Jou Dracula (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/irobot.c b/src/drivers/irobot.c index 059b923b5..62ab07ee3 100644 --- a/src/drivers/irobot.c +++ b/src/drivers/irobot.c @@ -368,4 +368,4 @@ ROM_END -GAME( 1983, irobot, 0, irobot, irobot, irobot, ROT0, "Atari", "I, Robot" ) +GAMEX( 1983, irobot, 0, irobot, irobot, irobot, ROT0, "Atari", "I, Robot", GAME_NO_COCKTAIL ) diff --git a/src/drivers/ironhors.c b/src/drivers/ironhors.c index a06eb78f3..21c4f723e 100644 --- a/src/drivers/ironhors.c +++ b/src/drivers/ironhors.c @@ -623,6 +623,6 @@ ROM_END -GAME( 1986, ironhors, 0, ironhors, ironhors, 0, ROT0, "Konami", "Iron Horse" ) -GAME( 1986, dairesya, ironhors, ironhors, dairesya, 0, ROT0, "[Konami] (Kawakusu license)", "Dai Ressya Goutou (Japan)" ) -GAMEX(1986, farwest, ironhors, farwest, ironhors, 0, ROT0, "bootleg?", "Far West", GAME_NOT_WORKING ) +GAMEX( 1986, ironhors, 0, ironhors, ironhors, 0, ROT0, "Konami", "Iron Horse", GAME_NO_COCKTAIL ) +GAMEX( 1986, dairesya, ironhors, ironhors, dairesya, 0, ROT0, "[Konami] (Kawakusu license)", "Dai Ressya Goutou (Japan)", GAME_NO_COCKTAIL ) +GAMEX(1986, farwest, ironhors, farwest, ironhors, 0, ROT0, "bootleg?", "Far West", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/jackal.c b/src/drivers/jackal.c index 0efca6086..c2df65973 100644 --- a/src/drivers/jackal.c +++ b/src/drivers/jackal.c @@ -620,7 +620,7 @@ ROM_END -GAMEX( 1986, jackal, 0, jackal, jackal, 0, ROT90, "Konami", "Jackal (World)", GAME_IMPERFECT_COLORS ) -GAMEX( 1986, topgunr, jackal, jackal, jackal, 0, ROT90, "Konami", "Top Gunner (US)", GAME_IMPERFECT_COLORS ) -GAMEX( 1986, jackalj, jackal, jackal, jackal, 0, ROT90, "Konami", "Tokushu Butai Jackal (Japan)", GAME_IMPERFECT_COLORS ) -GAMEX( 1987, topgunbl, jackal, topgunbl, jackal, 0, ROT90, "bootleg", "Top Gunner (bootleg)", GAME_IMPERFECT_COLORS ) +GAMEX( 1986, jackal, 0, jackal, jackal, 0, ROT90, "Konami", "Jackal (World)", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1986, topgunr, jackal, jackal, jackal, 0, ROT90, "Konami", "Top Gunner (US)", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1986, jackalj, jackal, jackal, jackal, 0, ROT90, "Konami", "Tokushu Butai Jackal (Japan)", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1987, topgunbl, jackal, topgunbl, jackal, 0, ROT90, "bootleg", "Top Gunner (bootleg)", GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/jailbrek.c b/src/drivers/jailbrek.c index 9f8cdf4d4..ba22771c3 100644 --- a/src/drivers/jailbrek.c +++ b/src/drivers/jailbrek.c @@ -312,4 +312,4 @@ static void init_jailbrek(void) } -GAME( 1986, jailbrek, 0, jailbrek, jailbrek, jailbrek, ROT0, "Konami", "Jail Break" ) +GAMEX( 1986, jailbrek, 0, jailbrek, jailbrek, jailbrek, ROT0, "Konami", "Jail Break", GAME_NO_COCKTAIL ) diff --git a/src/drivers/jedi.c b/src/drivers/jedi.c index b062805a7..e6e15fdc5 100644 --- a/src/drivers/jedi.c +++ b/src/drivers/jedi.c @@ -382,4 +382,4 @@ ROM_END -GAME( 1984, jedi, 0, jedi, jedi, 0, ROT0, "Atari", "Return of the Jedi" ) +GAMEX( 1984, jedi, 0, jedi, jedi, 0, ROT0, "Atari", "Return of the Jedi", GAME_NO_COCKTAIL ) diff --git a/src/drivers/kangaroo.c b/src/drivers/kangaroo.c index b99e84819..a69bdc35c 100644 --- a/src/drivers/kangaroo.c +++ b/src/drivers/kangaroo.c @@ -1,41 +1,24 @@ -/* Kangaroo driver +/*************************************************************************** + +Kangaroo (c) Atari Games / Sun Electronics Corp 1982 driver by Ville Laitinen +In test mode, to test sound press 1 and 2 player start simultaneously. +Punch + 1 player start moves to the crosshatch pattern. -Kangaroo (c) Atari Games / Sun Electronics Corp 1982 +To enter test mode in Funky Fish, keep the service coin pressed while +resetting - Changes: - 97/06/19 - mod to ensure it's really safe to load the scores. - - 97/06/17 - added the coin counter output so the error log will - not get cluttered with so much garbage about unknown locations. - - added music on/off to dip switch settings. - Thanks to S. Joe Dunkle for mentioning the game should - have music. btw. this is not really a dip switch on the PCB, - it's a pin on the edge connector and the damn manual doesn't - really tell what it does, so I hadn't ever tried it out... - - added high score saving/loading. Since I try to avoid disassembling - the code at all costs I'm not sure it's correct - seems to work tho' ;-) -V- - - 97/05/07 - changed to conform the new AUDIO_CPU code - - changed the audio command read to use the latched version. - - 97/04/xx - created, based on the Arabian driver, - The two games (arabian & kangaroo) are both by Sun Electronics - and run on very similar hardware. - Kangaroo PCB is constructed from two boards: - TVG-1-CPU-B , which houses program ROMS, two Z80 CPUs, - a GI-AY-8910, a custom microcontroller and the logic chips connecting these. - TVG-1-VIDEO-B is obviously the video board. On this one - you can find the graphics ROMS (tvg83 -tvg86), some logic - chips and 4 banks of 8 4116 RAM chips. - - */ -/* TODO */ -/* will have to clean up && correct the sound problems */ +TODO: +- There is a custom microcontroller on the original Kangaroo board which is + not emulated. This MIGHT cause some problems, but we don't know of any. -/*************************************************************************** +- Funky Fish graphics don't work correctly, I suppose there's some scrolling + effect missing and the radar often corrupts. Also note the wrong FUNKY on + the tile screen. + +*************************************************************************** Kangaroo memory map @@ -96,6 +79,7 @@ I/O ports: interrupts: (CPU#0) standard IM 1 interrupt mode (rst #38 every vblank) (CPU#1) same here + ***************************************************************************/ #include "driver.h" @@ -125,206 +109,264 @@ void kangaroo_color_mask_w(int offset,int data); static void kangaroo_init_machine(void) { - /* I think there is a bug in the startup checks of the game. At the very */ - /* beginning, during the RAM check, it goes one byte too far, and ends up */ - /* trying to write, and re-read, location dfff. To the best of my knowledge, */ - /* that is a ROM address, so the test fails and the code keeps jumping back */ - /* at 0000. */ - /* However, a NMI causes a successful reset. Maybe the hardware generates a */ - /* NMI short after power on, therefore masking the bug? The NMI is generated */ - /* by the MB8841 custom microcontroller, so this could be a way to disguise */ - /* the copy protection. */ - /* Anyway, what I do here is just immediately generate the NMI, so the game */ - /* properly starts. */ - cpu_cause_interrupt(0,Z80_NMI_INT); + /* I think there is a bug in the startup checks of the game. At the very */ + /* beginning, during the RAM check, it goes one byte too far, and ends up */ + /* trying to write, and re-read, location dfff. To the best of my knowledge, */ + /* that is a ROM address, so the test fails and the code keeps jumping back */ + /* at 0000. */ + /* However, a NMI causes a successful reset. Maybe the hardware generates a */ + /* NMI short after power on, therefore masking the bug? The NMI is generated */ + /* by the MB8841 custom microcontroller, so this could be a way to disguise */ + /* the copy protection. */ + /* Anyway, what I do here is just immediately generate the NMI, so the game */ + /* properly starts. */ + cpu_cause_interrupt(0,Z80_NMI_INT); } static void kangaroo_coin_counter_w(int offset, int data) { - coin_counter_w(0, data & 1); - coin_counter_w(1, data & 2); + coin_counter_w(0, data & 1); + coin_counter_w(1, data & 2); } static struct MemoryReadAddress readmem[] = { - { 0x0000, 0x5fff, MRA_ROM }, - { 0xc000, 0xdfff, MRA_BANK1 }, - { 0xe000, 0xe3ff, MRA_RAM }, - { 0xe400, 0xe400, input_port_3_r }, - { 0xec00, 0xec00, input_port_0_r }, - { 0xed00, 0xed00, input_port_1_r }, - { 0xee00, 0xee00, input_port_2_r }, - { 0xef00, 0xef00, kangaroo_sec_chip_r }, - { -1 } /* end of table */ + { 0x0000, 0x5fff, MRA_ROM }, + { 0xc000, 0xdfff, MRA_BANK1 }, + { 0xe000, 0xe3ff, MRA_RAM }, + { 0xe400, 0xe400, input_port_3_r }, + { 0xec00, 0xec00, input_port_0_r }, + { 0xed00, 0xed00, input_port_1_r }, + { 0xee00, 0xee00, input_port_2_r }, + { 0xef00, 0xef00, kangaroo_sec_chip_r }, + { -1 } /* end of table */ }; static struct MemoryWriteAddress writemem[] = { - { 0x0000, 0x5fff, MWA_ROM }, - { 0x8000, 0xbfff, kangaroo_videoram_w }, - { 0xc000, 0xdfff, MWA_ROM }, - { 0xe000, 0xe3ff, MWA_RAM }, - { 0xe800, 0xe807, kangaroo_blitter_w, &kangaroo_blitter }, - { 0xe808, 0xe808, kangaroo_bank_select_w, &kangaroo_bank_select }, - { 0xe809, 0xe809, kangaroo_video_control_w, &kangaroo_video_control }, - { 0xe80a, 0xe80a, kangaroo_color_mask_w }, - { 0xec00, 0xec00, soundlatch_w }, - { 0xed00, 0xed00, kangaroo_coin_counter_w }, - { 0xef00, 0xefff, kangaroo_sec_chip_w }, - { -1 } /* end of table */ + { 0x0000, 0x5fff, MWA_ROM }, + { 0x8000, 0xbfff, kangaroo_videoram_w }, + { 0xc000, 0xdfff, MWA_ROM }, + { 0xe000, 0xe3ff, MWA_RAM }, + { 0xe800, 0xe807, kangaroo_blitter_w, &kangaroo_blitter }, + { 0xe808, 0xe808, kangaroo_bank_select_w, &kangaroo_bank_select }, + { 0xe809, 0xe809, kangaroo_video_control_w, &kangaroo_video_control }, + { 0xe80a, 0xe80a, kangaroo_color_mask_w }, + { 0xec00, 0xec00, soundlatch_w }, + { 0xed00, 0xed00, kangaroo_coin_counter_w }, + { 0xef00, 0xefff, kangaroo_sec_chip_w }, + { -1 } /* end of table */ }; static struct MemoryReadAddress sh_readmem[] = { - { 0x0000, 0x0fff, MRA_ROM }, - { 0x4000, 0x43ff, MRA_RAM }, - { 0x6000, 0x6000, soundlatch_r }, - { -1 } /* end of table */ + { 0x0000, 0x0fff, MRA_ROM }, + { 0x4000, 0x43ff, MRA_RAM }, + { 0x6000, 0x6000, soundlatch_r }, + { -1 } /* end of table */ }; static struct MemoryWriteAddress sh_writemem[] = { - { 0x0000, 0x0fff, MWA_ROM }, - { 0x4000, 0x43ff, MWA_RAM }, - { -1 } /* end of table */ + { 0x0000, 0x0fff, MWA_ROM }, + { 0x4000, 0x43ff, MWA_RAM }, + { -1 } /* end of table */ }; static struct IOWritePort sh_writeport[] = { - { 0x7000, 0x7000, AY8910_write_port_0_w }, - { 0x8000, 0x8000, AY8910_control_port_0_w }, - { -1 } /* end of table */ + { 0x7000, 0x7000, AY8910_write_port_0_w }, + { 0x8000, 0x8000, AY8910_control_port_0_w }, + { -1 } /* end of table */ }; +INPUT_PORTS_START( fnkyfish ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "5" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) +INPUT_PORTS_END + INPUT_PORTS_START( kangaroo ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_DIPNAME( 0x20, 0x00, "Music" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) - - PORT_START /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "5" ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x00, "Easy" ) - PORT_DIPSETTING( 0x02, "Hard" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x08, "10000 30000" ) - PORT_DIPSETTING( 0x04, "10000" ) - PORT_DIPSETTING( 0x0c, "20000 40000" ) - PORT_DIPSETTING( 0x00, "None" ) - PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, "A 2/1 B 2/1" ) - PORT_DIPSETTING( 0x20, "A 2/1 B 1/3" ) - PORT_DIPSETTING( 0x00, "A 1/1 B 1/1" ) - PORT_DIPSETTING( 0x30, "A 1/1 B 1/2" ) - PORT_DIPSETTING( 0x40, "A 1/1 B 1/3" ) - PORT_DIPSETTING( 0x50, "A 1/1 B 1/4" ) - PORT_DIPSETTING( 0x60, "A 1/1 B 1/5" ) - PORT_DIPSETTING( 0x70, "A 1/1 B 1/6" ) - PORT_DIPSETTING( 0x80, "A 1/2 B 1/2" ) - PORT_DIPSETTING( 0x90, "A 1/2 B 1/4" ) - PORT_DIPSETTING( 0xa0, "A 1/2 B 1/5" ) - PORT_DIPSETTING( 0xe0, "A 1/2 B 1/6" ) - PORT_DIPSETTING( 0xb0, "A 1/2 B 1/10" ) - PORT_DIPSETTING( 0xc0, "A 1/2 B 1/11" ) - PORT_DIPSETTING( 0xd0, "A 1/2 B 1/12" ) - /* 0xe0 gives A 1/2 B 1/6 */ - PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_DIPNAME( 0x20, 0x00, "Music" ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* DSW0 */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "5" ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00, "Easy" ) + PORT_DIPSETTING( 0x02, "Hard" ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x08, "10000 30000" ) + PORT_DIPSETTING( 0x0c, "20000 40000" ) + PORT_DIPSETTING( 0x04, "10000" ) + PORT_DIPSETTING( 0x00, "None" ) + PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x20, "A 2C/1C B 1C/3C" ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x30, "A 1C/1C B 1C/2C" ) + PORT_DIPSETTING( 0x40, "A 1C/1C B 1C/3C" ) + PORT_DIPSETTING( 0x50, "A 1C/1C B 1C/4C" ) + PORT_DIPSETTING( 0x60, "A 1C/1C B 1C/5C" ) + PORT_DIPSETTING( 0x70, "A 1C/1C B 1C/6C" ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x90, "A 1C/2C B 1C/4C" ) + PORT_DIPSETTING( 0xa0, "A 1C/2C B 1C/5C" ) + PORT_DIPSETTING( 0xe0, "A 1C/2C B 1C/6C" ) + PORT_DIPSETTING( 0xb0, "A 1C/2C B 1C/10C" ) + PORT_DIPSETTING( 0xc0, "A 1C/2C B 1C/11C" ) + PORT_DIPSETTING( 0xd0, "A 1C/2C B 1C/12C" ) + /* 0xe0 gives A 1/2 B 1/6 */ + PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) ) INPUT_PORTS_END static struct AY8910interface ay8910_interface = { - 1, /* 1 chip */ - 10000000/8, /* 1.25 MHz */ - { 50 }, - { 0 }, - { 0 }, - { 0 }, - { 0 } + 1, /* 1 chip */ + 10000000/8, /* 1.25 MHz */ + { 50 }, + { 0 }, + { 0 }, + { 0 }, + { 0 } }; static struct MachineDriver machine_driver_kangaroo = { - /* basic machine hardware */ - { - { - CPU_Z80, - 10000000/4, /* 2.5 Mhz */ - readmem,writemem,0,0, - interrupt,1 - }, - { - CPU_Z80 | CPU_16BIT_PORT | CPU_AUDIO_CPU, - 10000000/4, /* 2.5 MHz */ - sh_readmem,sh_writemem,0,sh_writeport, - interrupt,1 - } - }, - 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ - kangaroo_init_machine, - - /* video hardware */ - 32*8, 32*8, { 0, 255, 8, 255-8 }, - 0, - 24,0, - kangaroo_vh_convert_color_prom, - - VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE|VIDEO_SUPPORTS_DIRTY, - 0, - kangaroo_vh_start, - kangaroo_vh_stop, - kangaroo_vh_screenrefresh, - - /* sound hardware */ - 0,0,0,0, - { - { - SOUND_AY8910, - &ay8910_interface - } - } + /* basic machine hardware */ + { + { + CPU_Z80, + 10000000/4, /* 2.5 Mhz */ + readmem,writemem,0,0, + interrupt,1 + }, + { + CPU_Z80 | CPU_16BIT_PORT | CPU_AUDIO_CPU, + 10000000/4, /* 2.5 MHz */ + sh_readmem,sh_writemem,0,sh_writeport, + interrupt,1 + } + }, + 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ + kangaroo_init_machine, + + /* video hardware */ + 32*8, 32*8, { 0, 255, 8, 255-8 }, + 0, + 24,0, + kangaroo_vh_convert_color_prom, + + VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE|VIDEO_SUPPORTS_DIRTY, + 0, + kangaroo_vh_start, + kangaroo_vh_stop, + kangaroo_vh_screenrefresh, + + /* sound hardware */ + 0,0,0,0, + { + { + SOUND_AY8910, + &ay8910_interface + } + } }; @@ -334,46 +376,85 @@ static struct MachineDriver machine_driver_kangaroo = ***************************************************************************/ +ROM_START( fnkyfish ) + ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ + ROM_LOAD( "tvg_64.0", 0x0000, 0x1000, 0xaf728803 ) + ROM_LOAD( "tvg_65.1", 0x1000, 0x1000, 0x71959e6b ) + ROM_LOAD( "tvg_66.2", 0x2000, 0x1000, 0x5ccf68d4 ) + ROM_LOAD( "tvg_67.3", 0x3000, 0x1000, 0x938ff36f ) + + ROM_LOAD( "tvg_69.v0", 0x10000, 0x1000, 0xcd532d0b ) /* graphics ROMs */ + ROM_LOAD( "tvg_71.v2", 0x11000, 0x1000, 0xa59c9713 ) + ROM_LOAD( "tvg_70.v1", 0x12000, 0x1000, 0xfd308ef1 ) + ROM_LOAD( "tvg_72.v3", 0x13000, 0x1000, 0x6ae9b584 ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ + ROM_LOAD( "tvg_68.8", 0x0000, 0x1000, 0xd36bb2be ) +ROM_END + ROM_START( kangaroo ) - ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ - ROM_LOAD( "tvg75.bin", 0x0000, 0x1000, 0x0d18c581 ) - ROM_LOAD( "tvg76.bin", 0x1000, 0x1000, 0x5978d37a ) - ROM_LOAD( "tvg77.bin", 0x2000, 0x1000, 0x522d1097 ) - ROM_LOAD( "tvg78.bin", 0x3000, 0x1000, 0x063da970 ) - ROM_LOAD( "tvg79.bin", 0x4000, 0x1000, 0x82a26c7d ) - ROM_LOAD( "tvg80.bin", 0x5000, 0x1000, 0x3dead542 ) - - ROM_LOAD( "tvg83.bin", 0x10000, 0x1000, 0xc0446ca6 ) /* graphics ROMs */ - ROM_LOAD( "tvg85.bin", 0x11000, 0x1000, 0x72c52695 ) - ROM_LOAD( "tvg84.bin", 0x12000, 0x1000, 0xe4cb26c2 ) - ROM_LOAD( "tvg86.bin", 0x13000, 0x1000, 0x9e6a599f ) - - ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ - ROM_LOAD( "tvg81.bin", 0x0000, 0x1000, 0xfb449bfd ) - - ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the MB8841 custom microcontroller (currently not emulated) */ - ROM_LOAD( "tvg82.bin", 0x0000, 0x0800, 0x57766f69 ) + ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ + ROM_LOAD( "tvg_75.0", 0x0000, 0x1000, 0x0d18c581 ) + ROM_LOAD( "tvg_76.1", 0x1000, 0x1000, 0x5978d37a ) + ROM_LOAD( "tvg_77.2", 0x2000, 0x1000, 0x522d1097 ) + ROM_LOAD( "tvg_78.3", 0x3000, 0x1000, 0x063da970 ) + ROM_LOAD( "tvg_79.4", 0x4000, 0x1000, 0x9e5cf8ca ) + ROM_LOAD( "tvg_80.5", 0x5000, 0x1000, 0x2fc18049 ) + + ROM_LOAD( "tvg_83.v0", 0x10000, 0x1000, 0xc0446ca6 ) /* graphics ROMs */ + ROM_LOAD( "tvg_85.v2", 0x11000, 0x1000, 0x72c52695 ) + ROM_LOAD( "tvg_84.v1", 0x12000, 0x1000, 0xe4cb26c2 ) + ROM_LOAD( "tvg_86.v3", 0x13000, 0x1000, 0x9e6a599f ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ + ROM_LOAD( "tvg_81.8", 0x0000, 0x1000, 0xfb449bfd ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the MB8841 custom microcontroller (currently not emulated) */ + ROM_LOAD( "tvg_82.12", 0x0000, 0x0800, 0x57766f69 ) +ROM_END + +ROM_START( kangaroa ) + ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ + ROM_LOAD( "tvg_75.0", 0x0000, 0x1000, 0x0d18c581 ) + ROM_LOAD( "tvg_76.1", 0x1000, 0x1000, 0x5978d37a ) + ROM_LOAD( "tvg_77.2", 0x2000, 0x1000, 0x522d1097 ) + ROM_LOAD( "tvg_78.3", 0x3000, 0x1000, 0x063da970 ) + ROM_LOAD( "tvg79.bin", 0x4000, 0x1000, 0x82a26c7d ) + ROM_LOAD( "tvg80.bin", 0x5000, 0x1000, 0x3dead542 ) + + ROM_LOAD( "tvg_83.v0", 0x10000, 0x1000, 0xc0446ca6 ) /* graphics ROMs */ + ROM_LOAD( "tvg_85.v2", 0x11000, 0x1000, 0x72c52695 ) + ROM_LOAD( "tvg_84.v1", 0x12000, 0x1000, 0xe4cb26c2 ) + ROM_LOAD( "tvg_86.v3", 0x13000, 0x1000, 0x9e6a599f ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ + ROM_LOAD( "tvg_81.8", 0x0000, 0x1000, 0xfb449bfd ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the MB8841 custom microcontroller (currently not emulated) */ + ROM_LOAD( "tvg_82.12", 0x0000, 0x0800, 0x57766f69 ) ROM_END ROM_START( kangarob ) - ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ - ROM_LOAD( "tvg75.bin", 0x0000, 0x1000, 0x0d18c581 ) - ROM_LOAD( "tvg76.bin", 0x1000, 0x1000, 0x5978d37a ) - ROM_LOAD( "tvg77.bin", 0x2000, 0x1000, 0x522d1097 ) - ROM_LOAD( "tvg78.bin", 0x3000, 0x1000, 0x063da970 ) - ROM_LOAD( "k5", 0x4000, 0x1000, 0x9e5cf8ca ) - ROM_LOAD( "k6", 0x5000, 0x1000, 0x7644504a ) - - ROM_LOAD( "tvg83.bin", 0x10000, 0x1000, 0xc0446ca6 ) /* graphics ROMs */ - ROM_LOAD( "tvg85.bin", 0x11000, 0x1000, 0x72c52695 ) - ROM_LOAD( "tvg84.bin", 0x12000, 0x1000, 0xe4cb26c2 ) - ROM_LOAD( "tvg86.bin", 0x13000, 0x1000, 0x9e6a599f ) - - ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ - ROM_LOAD( "tvg81.bin", 0x0000, 0x1000, 0xfb449bfd ) + ROM_REGION( 0x14000, REGION_CPU1 ) /* 64k for code + 16k for banked ROMs */ + ROM_LOAD( "tvg_75.0", 0x0000, 0x1000, 0x0d18c581 ) + ROM_LOAD( "tvg_76.1", 0x1000, 0x1000, 0x5978d37a ) + ROM_LOAD( "tvg_77.2", 0x2000, 0x1000, 0x522d1097 ) + ROM_LOAD( "tvg_78.3", 0x3000, 0x1000, 0x063da970 ) + ROM_LOAD( "tvg_79.4", 0x4000, 0x1000, 0x9e5cf8ca ) + ROM_LOAD( "k6", 0x5000, 0x1000, 0x7644504a ) + + ROM_LOAD( "tvg_83.v0", 0x10000, 0x1000, 0xc0446ca6 ) /* graphics ROMs */ + ROM_LOAD( "tvg_85.v2", 0x11000, 0x1000, 0x72c52695 ) + ROM_LOAD( "tvg_84.v1", 0x12000, 0x1000, 0xe4cb26c2 ) + ROM_LOAD( "tvg_86.v3", 0x13000, 0x1000, 0x9e6a599f ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* sound */ + ROM_LOAD( "tvg_81.8", 0x0000, 0x1000, 0xfb449bfd ) ROM_END -GAME( 1982, kangaroo, 0, kangaroo, kangaroo, 0, ROT270, "[Sun Electronics] (Atari license)", "Kangaroo" ) -GAME( 1982, kangarob, kangaroo, kangaroo, kangaroo, 0, ROT270, "bootleg", "Kangaroo (bootleg)" ) +GAMEX(1981, fnkyfish, 0, kangaroo, fnkyfish, 0, ROT90, "Sun Electronics", "Funky Fish", GAME_NOT_WORKING ) +GAME( 1982, kangaroo, 0, kangaroo, kangaroo, 0, ROT90, "Sun Electronics", "Kangaroo" ) +GAME( 1982, kangaroa, kangaroo, kangaroo, kangaroo, 0, ROT90, "[Sun Electronics] (Atari license)", "Kangaroo (Atari)" ) +GAME( 1982, kangarob, kangaroo, kangaroo, kangaroo, 0, ROT90, "bootleg", "Kangaroo (bootleg)" ) diff --git a/src/drivers/karnov.c b/src/drivers/karnov.c index a23ac4998..7764ed4a3 100644 --- a/src/drivers/karnov.c +++ b/src/drivers/karnov.c @@ -7,7 +7,7 @@ Chelnov (Japanese version) (c) 1987 Data East Corporation - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk NOTE! Karnov USA & Karnov Japan sets have different gameplay! @@ -942,8 +942,8 @@ static void init_chelnovj(void) /******************************************************************************/ -GAME( 1987, karnov, 0, karnov, karnov, karnov, ROT0, "Data East USA", "Karnov (US)" ) -GAME( 1987, karnovj, karnov, karnov, karnov, karnov, ROT0, "Data East Corporation", "Karnov (Japan)" ) -GAMEX(1987, wndrplnt, 0, wndrplnt, karnov, wndrplnt, ROT270, "Data East Corporation", "Wonder Planet (Japan)", GAME_NOT_WORKING ) -GAME( 1988, chelnov, 0, karnov, chelnov, chelnov, ROT0, "Data East USA", "Chelnov - Atomic Runner (US)" ) -GAME( 1988, chelnovj, chelnov, karnov, chelnov, chelnovj, ROT0, "Data East Corporation", "Chelnov - Atomic Runner (Japan)" ) +GAMEX( 1987, karnov, 0, karnov, karnov, karnov, ROT0, "Data East USA", "Karnov (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, karnovj, karnov, karnov, karnov, karnov, ROT0, "Data East Corporation", "Karnov (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, wndrplnt, 0, wndrplnt, karnov, wndrplnt, ROT270, "Data East Corporation", "Wonder Planet (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1988, chelnov, 0, karnov, chelnov, chelnov, ROT0, "Data East USA", "Chelnov - Atomic Runner (US)", GAME_NO_COCKTAIL ) +GAMEX( 1988, chelnovj, chelnov, karnov, chelnov, chelnovj, ROT0, "Data East Corporation", "Chelnov - Atomic Runner (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/kchamp.c b/src/drivers/kchamp.c index d5cdb632d..0b9eb1bde 100644 --- a/src/drivers/kchamp.c +++ b/src/drivers/kchamp.c @@ -795,7 +795,7 @@ static void init_kchampvs( void ) -GAME( 1984, kchamp, 0, kchamp, kchamp, 0, ROT90, "Data East USA", "Karate Champ (US)" ) -GAME( 1984, karatedo, kchamp, kchamp, kchamp, 0, ROT90, "Data East Corporation", "Karate Dou (Japan)" ) -GAME( 1984, kchampvs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East USA", "Karate Champ (US VS version)" ) -GAME( 1984, karatevs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East Corporation", "Taisen Karate Dou (Japan VS version)" ) +GAMEX( 1984, kchamp, 0, kchamp, kchamp, 0, ROT90, "Data East USA", "Karate Champ (US)", GAME_NO_COCKTAIL ) +GAMEX( 1984, karatedo, kchamp, kchamp, kchamp, 0, ROT90, "Data East Corporation", "Karate Dou (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1984, kchampvs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East USA", "Karate Champ (US VS version)", GAME_NO_COCKTAIL ) +GAMEX( 1984, karatevs, kchamp, kchampvs, kchampvs, kchampvs, ROT90, "Data East Corporation", "Taisen Karate Dou (Japan VS version)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/kyugo.c b/src/drivers/kyugo.c index b3e4d1094..fe19ead2f 100644 --- a/src/drivers/kyugo.c +++ b/src/drivers/kyugo.c @@ -475,7 +475,7 @@ static struct AY8910interface ay8910_interface = { 2, /* 2 chips */ 1500000, /* 1.5 MHz ? */ - { MIXER(50,MIXER_PAN_LEFT), MIXER(50,MIXER_PAN_RIGHT) }, /* ?? */ + { 30, 30 }, { input_port_0_r, 0 }, { input_port_1_r, 0 }, { 0, 0 }, @@ -522,7 +522,7 @@ static struct MachineDriver machine_driver_##name = \ kyugo_vh_screenrefresh, \ \ /* sound hardware */ \ - SOUND_SUPPORTS_STEREO,0,0,0, \ + 0,0,0,0, \ { \ { \ SOUND_AY8910, \ diff --git a/src/drivers/labyrunr.c b/src/drivers/labyrunr.c index 7a4f39407..0d83c2212 100644 --- a/src/drivers/labyrunr.c +++ b/src/drivers/labyrunr.c @@ -230,7 +230,7 @@ static struct GfxDecodeInfo gfxdecodeinfo[] = static struct YM2203interface ym2203_interface = { 2, /* 2 chips */ - 1500000, /* 24MHz/16?? */ + 3000000, /* 24MHz/8? */ { YM2203_VOL(80,40), YM2203_VOL(80,40) }, { input_port_0_r }, { input_port_1_r, input_port_2_r }, diff --git a/src/drivers/lasso.c b/src/drivers/lasso.c new file mode 100644 index 000000000..01bab79e4 --- /dev/null +++ b/src/drivers/lasso.c @@ -0,0 +1,299 @@ +/* Lasso +** (C)1982 SNK +** +** lasso can't be slung up/down (left/right works fine; probably corrupt code ROM) +** [I don't think so, there is another set that matches 100% this one - NS] +** sound isn't hooked up +** imperfect color +** background color, lasso color arbitrary +** priority of lasso bitmap plane relative to background/sprites unknown +** possible timing problems +** input port issues: see fire buttons on high score entry screen +*/ + +#include "driver.h" +#include "vidhrdw/generic.h" + +extern void lasso_vh_convert_color_prom( + unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom ); + +extern void lasso_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ); + +unsigned char *lasso_vram; /* 0x2000 bytes for a 256x256x1 bitmap */ + +static UINT8 *shareram; + +static int shareram_r( int offset ){ + return shareram[offset]; +} + +static void shareram_w( int offset, int value ){ + shareram[offset] = value; +} + +static struct AY8910interface ay8910_interface = +{ + 1, /* 1 chip? */ + 2000000, /* 2 MHz? */ + { 100 }, /* volume */ + { 0 }, + { 0 }, + { 0 }, + { 0 } +}; + +/* 17f0 on CPU1 maps to 07f0 on CPU2 */ + +static struct MemoryReadAddress readmem1[] = { + { 0x0000, 0x03ff, MRA_RAM }, // work ram + { 0x0400, 0x0bff, MRA_RAM }, // videoram + { 0x0c00, 0x0c7f, MRA_RAM }, // spriteram + { 0x1000, 0x17ff, MRA_RAM }, // shareram + { 0x1804, 0x1804, input_port_0_r }, + { 0x1805, 0x1805, input_port_1_r }, + { 0x1806, 0x1806, input_port_2_r }, + { 0x1807, 0x1807, input_port_3_r }, + { 0x8000, 0xffff, MRA_ROM }, + { -1 } +}; + +static struct MemoryWriteAddress writemem1[] = { + { 0x0000, 0x03ff, MWA_RAM }, + { 0x0400, 0x0bff, MWA_RAM, &videoram }, + { 0x0c00, 0x0c7f, MWA_RAM, &spriteram }, + { 0x1000, 0x17ff, MWA_RAM, &shareram }, + { 0x1800, 0x1800, soundlatch_w }, + { 0x1801, 0x1802, MWA_NOP }, + { 0x1806, 0x1806, MWA_NOP }, + { 0x8000, 0xffff, MWA_ROM }, + { -1 } +}; + +static struct MemoryReadAddress readmem2[] = { + { 0x0000, 0x07ff, shareram_r }, + { 0x2000, 0x3fff, MRA_RAM }, + { 0x8000, 0x8fff, MRA_ROM }, + { 0xf000, 0xffff, MRA_ROM }, + { -1 } +}; + +static struct MemoryWriteAddress writemem2[] = { + { 0x0000, 0x07ff, shareram_w }, + { 0x2000, 0x3fff, MWA_RAM, &lasso_vram }, + { 0x8000, 0x8fff, MWA_ROM }, + { 0xf000, 0xffff, MWA_ROM }, + { -1 } +}; + +static struct MemoryReadAddress readmem3[] = { + { 0x0000, 0x01ff, MRA_RAM }, + { 0x5000, 0x7fff, MRA_ROM }, + { 0xb004, 0xb004, soundlatch_r }, +// { 0xb005, 0xb005, MWA_NOP }, + { 0xf000, 0xffff, MRA_ROM }, + { -1 } +}; + +static struct MemoryWriteAddress writemem3[] = { + { 0x0000, 0x01ff, MWA_RAM }, + { 0x7000, 0x7fff, MWA_ROM }, +// { 0xb000, 0xb000, AY8910_control_port_0_w }, +// { 0xb001, 0xb001, AY8910_write_port_0_w }, + { 0xf000, 0xffff, MWA_ROM }, + { -1 } +}; + + + + +INPUT_PORTS_START( lasso ) + PORT_START /* 1804 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* lasso */ + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) /* shoot */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START /* 1805 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_COCKTAIL | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_COCKTAIL | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_COCKTAIL | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_COCKTAIL | IPF_4WAY ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START /* 1806 */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) +// PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) +// PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) +// PORT_DIPSETTING( 0x0a, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x30, "3" ) + PORT_DIPSETTING( 0x10, "4" ) + PORT_DIPSETTING( 0x20, "5" ) +// PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, "Show Instructions" ) + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) + + PORT_START /* 1807 */ + PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_LOW, IPT_SERVICE, 1 ) + PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) +INPUT_PORTS_END + + + +static struct GfxLayout tile_layout = { + 8,8, + 0x100, + 2, + { 0, 0x2000*8 }, + { 0,1,2,3,4,5,6,7 }, + { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, + 64 +}; + +static struct GfxLayout sprite_layout = { + 16,16, + 0x40, + 2, + { 0x4000+0, 0x4000+0x2000*8 }, + { + 0,1,2,3,4,5,6,7, + 64+0,64+1,64+2,64+3,64+4,64+5,64+6,64+7 + }, + { + 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, + 128+0*8,128+1*8,128+2*8,128+3*8,128+4*8,128+5*8,128+6*8,128+7*8 + }, + 256 +}; + +static struct GfxDecodeInfo gfxdecodeinfo[] = { + { REGION_GFX1, 0x0000, &tile_layout, 0, 0x10 }, + { REGION_GFX1, 0x0000, &sprite_layout, 0, 0x10 }, + { -1 } +}; + +int lasso_interrupt( void ){ + static int which; + which = 1-which; + if( which ){ + return nmi_interrupt(); + } + else { + return interrupt(); + } +} + +static struct MachineDriver machine_driver_lasso = { + { + { + CPU_M6502, + 4000000, + readmem1,writemem1,0,0, + lasso_interrupt,2, + }, + { + CPU_M6502, + 4000000, + readmem2,writemem2,0,0, + ignore_interrupt,1, + }, + { + CPU_M6502 | CPU_AUDIO_CPU, + 4000000, + readmem3,writemem3,0,0, + interrupt,1, + }, + }, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 500, /* CPU slices */ + 0, /* init machine */ + + /* video hardware */ + 32*8, 32*8, { 0, 255, 0, 255-16 }, + gfxdecodeinfo, + 0x41,0x41, + lasso_vh_convert_color_prom, + VIDEO_TYPE_RASTER, + 0, + 0, + 0, + lasso_screenrefresh, + + /* sound hardware */ + 0,0,0,0, + { + { + SOUND_AY8910, + &ay8910_interface + } + } +}; + +/* +USES THREE 6502 CPU'S + +CHIP # POSITION TYPE +----------------------- +WMA IC19 2732 DAUGHTER BD sound cpu +WMB IC18 " " sound data +WMC IC17 " " sound data + +WM5 IC45 " CONN BD lasso graphics coprocessor +82S123 IC69 " +82S123 IC70 " +WM4 IC22 2764 BOTTOM BD main cpu +WM3 IC21 " " main cpu + +WM2 IC66 " " graphics +WM1 IC65 " " graphics +*/ +ROM_START( lasso ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 6502 code (main cpu) */ + ROM_LOAD( "wm3", 0x8000, 0x2000, 0xf93addd6 ) + ROM_RELOAD( 0xc000, 0x2000) + ROM_LOAD( "wm4", 0xe000, 0x2000, 0x77719859 ) + ROM_RELOAD( 0xa000, 0x2000) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 6502 code (lasso animation) */ + ROM_LOAD( "wm5", 0xf000, 0x1000, 0x7dc3ff07 ) + ROM_RELOAD( 0x8000, 0x1000) + + ROM_REGION( 0x10000, REGION_CPU3 ) /* 6502 code (sound) */ + ROM_LOAD( "wmc", 0x5000, 0x1000, 0x8b4eb242 ) /* ? */ + ROM_LOAD( "wmb", 0x6000, 0x1000, 0x4658bcb9 ) /* ? */ + ROM_LOAD( "wma", 0x7000, 0x1000, 0x2e7de3e9 ) + ROM_RELOAD( 0xf000, 0x1000 ) + + ROM_REGION( 0x4000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "wm1", 0x0000, 0x2000, 0x7db77256 ) + ROM_LOAD( "wm2", 0x2000, 0x2000, 0x9e7d0b6f ) + + ROM_REGION( 0x40, REGION_PROMS ) + ROM_LOAD( "82s123.69", 0x00, 0x20, 0x1eabb04d ) + ROM_LOAD( "82s123.70", 0x20, 0x20, 0x09060f8c ) +ROM_END + + +GAMEX( 1982, lasso, 0, lasso, lasso, 0, ROT90, "SNK", "Lasso", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) diff --git a/src/drivers/lastduel.c b/src/drivers/lastduel.c index 044a14b55..bc286cb5d 100644 --- a/src/drivers/lastduel.c +++ b/src/drivers/lastduel.c @@ -9,7 +9,7 @@ Mad Gear (Japan set) has rom code MDJ and is not dumped yet, presumably other versions of Last Duel exist too. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk Trivia ;) The Mad Gear pcb has an unused pad on the board for an i8751 microcontroller. diff --git a/src/drivers/lazercmd.c b/src/drivers/lazercmd.c index 0e6f6958f..1ad59011f 100644 --- a/src/drivers/lazercmd.c +++ b/src/drivers/lazercmd.c @@ -481,32 +481,30 @@ static struct GfxDecodeInfo gfxdecodeinfo[] = /* some colors for the frontend */ static unsigned char palette[] = { +/* Red Green Blue */ 0x00,0x00,0x00, /* 0 black */ - 0xc0,0xc0,0xc0, /* 1 white */ - 0x20,0xc0,0x20, /* 2 jade green */ - 0x02,0x0c,0x02, /* 3 very dark green */ - 0xc0,0x90,0x20, /* 4 mustard yellow */ - 0x0c,0x09,0x02, /* 5 very dark yellow */ - 0xff,0xff,0xff, /* 6 white bright */ - 0x2a,0xff,0x2a, /* 7 bright jade */ - 0xff,0xc0,0x2a /* 8 bright yellow */ + 0xb0,0xb0,0xb0, /* 1 white */ + 0x20,0xb0,0x20, /* 2 jade green */ + 0x02,0x0b,0x02, /* 3 very dark green */ + 0xb0,0x80,0x20, /* 4 mustard yellow */ + 0x0b,0x08,0x02, /* 5 very dark yellow */ + 0x33,0xff,0x33, /* 6 bright jade */ + 0xff,0xcc,0x33, /* 7 bright yellow */ + 0xff,0xff,0xff, /* 8 bright white */ + 0x33,0xff,0x33, /* 9 bright jade */ + 0xff,0xcc,0x33, /* 10 bright yellow */ + 0xff,0xff,0xff /* 11 bright white */ }; -enum { BLACK,WHITE,JADE,DARK_GREEN,MUSTARD,DARK_YELLOW,BRIGHT_WHITE,BRIGHT_JADE,BRIGHT_MUSTARD }; +enum { BLACK,WHITE,JADE,DARK_GREEN,MUSTARD,DARK_YELLOW }; static unsigned short colortable[] = { - JADE, DARK_GREEN, /* 0 1 very dark green on jade green */ - MUSTARD, DARK_YELLOW, /* 2 3 very dark yellow on mustard yellow */ - BLACK, WHITE, /* 4 5 black on white */ - DARK_GREEN, JADE, /* 6 7 above inverted */ - DARK_YELLOW, MUSTARD, /* 8 9 " " */ - WHITE, BLACK, /* 10 11 " " */ - BRIGHT_MUSTARD, /* 12 marker bright mustard */ - BRIGHT_JADE, /* 13 marker bright jade */ - BRIGHT_WHITE, /* 14 marker bright white */ - BRIGHT_MUSTARD, /* 15 marker bright mustard */ - BRIGHT_JADE, /* 16 marker bright jade */ - BRIGHT_WHITE /* 17 marker bright white */ + JADE, DARK_GREEN, /* 0 very dark green on jade green */ + MUSTARD, DARK_YELLOW, /* 1 very dark yellow on mustard yellow */ + WHITE, BLACK, /* 2 black on white */ + DARK_GREEN, JADE, /* 3 above inverted */ + DARK_YELLOW, MUSTARD, /* 4 " " */ + BLACK, WHITE /* 5 " " */ }; static void init_palette(unsigned char *game_palette, unsigned short *game_colortable,const unsigned char *color_prom) { diff --git a/src/drivers/liberatr.c b/src/drivers/liberatr.c index 743623b59..7ff480de8 100644 --- a/src/drivers/liberatr.c +++ b/src/drivers/liberatr.c @@ -420,6 +420,6 @@ ROM_END -GAME( 1982, liberatr, 0, liberatr, liberatr, 0, ROT0, "Atari", "Liberator (set 1)" ) -GAMEX(1982, liberat2, liberatr, liberat2, liberatr, 0, ROT0, "Atari", "Liberator (set 2)", GAME_NOT_WORKING ) +GAMEX( 1982, liberatr, 0, liberatr, liberatr, 0, ROT0, "Atari", "Liberator (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, liberat2, liberatr, liberat2, liberatr, 0, ROT0, "Atari", "Liberator (set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/locomotn.c b/src/drivers/locomotn.c index 30cc810c4..dbe52892e 100644 --- a/src/drivers/locomotn.c +++ b/src/drivers/locomotn.c @@ -4,6 +4,12 @@ Loco-Motion memory map (preliminary) driver by Nicola Salmoria +TODO: +- PROM 7a controls the video shape. This is used to show the top 4 lines in + Jungler but not in Locomotion and Commando. The visible area for the latter + two should be adjusted, handling flip screen accordingly. + + CPU #1 0000-4fff ROM (empty space at 5000-5fff for diagnostic ROM) 8040-83ff video RAM (top 8 rows of screen) @@ -54,7 +60,7 @@ extern unsigned char *rallyx_scrollx,*rallyx_scrolly; void rallyx_videoram2_w(int offset,int data); void rallyx_colorram2_w(int offset,int data); void rallyx_flipscreen_w(int offset,int data); -void rallyx_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); +void locomotn_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); int rallyx_vh_start(void); void rallyx_vh_stop(void); void locomotn_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); @@ -68,9 +74,20 @@ extern struct AY8910interface timeplt_ay8910_interface; void timeplt_sh_irqtrigger_w(int offset,int data); +static void coin_1_w(int offset,int data) +{ + coin_counter_w(0,data & 1); +} +static void coin_2_w(int offset,int data) +{ + coin_counter_w(1,data & 1); +} + + + static struct MemoryReadAddress readmem[] = { - { 0x0000, 0x5fff, MRA_ROM }, + { 0x0000, 0x7fff, MRA_ROM }, { 0x8000, 0x8fff, MRA_RAM }, { 0x9800, 0x9fff, MRA_RAM }, { 0xa000, 0xa000, input_port_0_r }, /* IN0 */ @@ -82,7 +99,7 @@ static struct MemoryReadAddress readmem[] = static struct MemoryWriteAddress jungler_writemem[] = { - { 0x0000, 0x5fff, MWA_ROM }, + { 0x0000, 0x7fff, MWA_ROM }, { 0x8000, 0x83ff, videoram_w, &videoram, &videoram_size }, { 0x8400, 0x87ff, rallyx_videoram2_w, &rallyx_videoram2 }, { 0x8800, 0x8bff, colorram_w, &colorram }, @@ -96,9 +113,11 @@ static struct MemoryWriteAddress jungler_writemem[] = { 0xa170, 0xa170, MWA_NOP }, /* ????? */ { 0xa180, 0xa180, timeplt_sh_irqtrigger_w }, { 0xa181, 0xa181, interrupt_enable_w }, +// { 0xa182, 0xa182, MWA_NOP }, sound mute { 0xa183, 0xa183, rallyx_flipscreen_w }, - { 0xa184, 0xa185, osd_led_w }, - { 0xa186, 0xa186, MWA_NOP }, + { 0xa184, 0xa184, coin_1_w }, + { 0xa186, 0xa186, coin_2_w }, +// { 0xa187, 0xa187, MWA_NOP }, stars enable { 0x8014, 0x801f, MWA_RAM, &spriteram, &spriteram_size }, /* these are here just to initialize */ { 0x8814, 0x881f, MWA_RAM, &spriteram_2 }, /* the pointers. */ { 0x8034, 0x803f, MWA_RAM, &rallyx_radarx, &rallyx_radarram_size }, /* ditto */ @@ -108,7 +127,7 @@ static struct MemoryWriteAddress jungler_writemem[] = static struct MemoryWriteAddress writemem[] = { - { 0x0000, 0x5fff, MWA_ROM }, + { 0x0000, 0x7fff, MWA_ROM }, { 0x8000, 0x83ff, videoram_w, &videoram, &videoram_size }, { 0x8400, 0x87ff, rallyx_videoram2_w, &rallyx_videoram2 }, { 0x8800, 0x8bff, colorram_w, &colorram }, @@ -122,9 +141,11 @@ static struct MemoryWriteAddress writemem[] = { 0xa170, 0xa170, MWA_NOP }, /* ????? */ { 0xa180, 0xa180, timeplt_sh_irqtrigger_w }, { 0xa181, 0xa181, interrupt_enable_w }, +// { 0xa182, 0xa182, MWA_NOP }, sound mute { 0xa183, 0xa183, rallyx_flipscreen_w }, - { 0xa184, 0xa185, osd_led_w }, - { 0xa186, 0xa186, MWA_NOP }, + { 0xa184, 0xa184, coin_1_w }, + { 0xa186, 0xa186, coin_2_w }, +// { 0xa187, 0xa187, MWA_NOP }, stars enable { 0x8000, 0x801f, MWA_RAM, &spriteram, &spriteram_size }, /* these are here just to initialize */ { 0x8800, 0x881f, MWA_RAM, &spriteram_2 }, /* the pointers. */ { 0x8020, 0x803f, MWA_RAM, &rallyx_radarx, &rallyx_radarram_size }, /* ditto */ @@ -393,7 +414,7 @@ static struct MachineDriver machine_driver_##GAMENAME = \ { \ { \ CPU_Z80, \ - 3072000, /* 3.072 Mhz ? */ \ + 18432000/6, /* 3.072 MHz */ \ readmem,GAMENAME##_writemem,0,0, \ nmi_interrupt,1 \ }, \ @@ -412,7 +433,7 @@ static struct MachineDriver machine_driver_##GAMENAME = \ 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, \ gfxdecodeinfo, \ 32,64*4+4, \ - rallyx_vh_convert_color_prom, \ + locomotn_vh_convert_color_prom, \ \ VIDEO_TYPE_RASTER, \ 0, \ @@ -464,8 +485,8 @@ ROM_START( locomotn ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "8b.bpr", 0x0000, 0x0020, 0x75b05da0 ) /* palette */ ROM_LOAD( "9d.bpr", 0x0020, 0x0100, 0xaa6cf063 ) /* loookup table */ - ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* ?? */ - ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* video layout (not used) */ + ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END ROM_START( gutangtn ) @@ -489,8 +510,8 @@ ROM_START( gutangtn ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "8b.bpr", 0x0000, 0x0020, 0x75b05da0 ) /* palette */ ROM_LOAD( "9d.bpr", 0x0020, 0x0100, 0xaa6cf063 ) /* loookup table */ - ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* ?? */ - ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* video layout (not used) */ + ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END ROM_START( cottong ) @@ -514,8 +535,8 @@ ROM_START( cottong ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "2.bpr", 0x0000, 0x0020, 0x26f42e6f ) /* palette */ ROM_LOAD( "3.bpr", 0x0020, 0x0100, 0x4aecc0c8 ) /* loookup table */ - ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* ?? */ - ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "7a.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* video layout (not used) */ + ROM_LOAD( "10a.bpr", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END ROM_START( jungler ) @@ -539,8 +560,8 @@ ROM_START( jungler ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "18s030.8b", 0x0000, 0x0020, 0x55a7e6d1 ) /* palette */ ROM_LOAD( "tbp24s10.9d", 0x0020, 0x0100, 0xd223f7b8 ) /* loookup table */ - ROM_LOAD( "18s030.7a", 0x0120, 0x0020, 0x8f574815 ) /* ?? */ - ROM_LOAD( "6331-1.10a", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "18s030.7a", 0x0120, 0x0020, 0x8f574815 ) /* video layout (not used) */ + ROM_LOAD( "6331-1.10a", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END ROM_START( junglers ) @@ -564,8 +585,8 @@ ROM_START( junglers ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "18s030.8b", 0x0000, 0x0020, 0x55a7e6d1 ) /* palette */ ROM_LOAD( "tbp24s10.9d", 0x0020, 0x0100, 0xd223f7b8 ) /* loookup table */ - ROM_LOAD( "18s030.7a", 0x0120, 0x0020, 0x8f574815 ) /* ?? */ - ROM_LOAD( "6331-1.10a", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "18s030.7a", 0x0120, 0x0020, 0x8f574815 ) /* video layout (not used) */ + ROM_LOAD( "6331-1.10a", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END ROM_START( commsega ) @@ -589,8 +610,8 @@ ROM_START( commsega ) ROM_REGION( 0x0160, REGION_PROMS ) ROM_LOAD( "gg1.bpr", 0x0000, 0x0020, 0xf69e585a ) /* palette */ ROM_LOAD( "gg2.bpr", 0x0020, 0x0100, 0x0b756e30 ) /* loookup table */ - ROM_LOAD( "gg0.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* ?? */ - ROM_LOAD( "tt3.bpr", 0x0140, 0x0020, 0xb8861096 ) /* ?? */ + ROM_LOAD( "gg0.bpr", 0x0120, 0x0020, 0x48c8f094 ) /* video layout (not used) */ + ROM_LOAD( "tt3.bpr", 0x0140, 0x0020, 0xb8861096 ) /* video timing (not used) */ ROM_END diff --git a/src/drivers/lwings.c b/src/drivers/lwings.c index b2470ea00..bd5e58461 100644 --- a/src/drivers/lwings.c +++ b/src/drivers/lwings.c @@ -1277,5 +1277,5 @@ GAME( 1985, sctionza, sectionz, lwings, sectionz, 0, ROT0, "Capcom", "Sectio GAME( 1986, trojan, 0, trojan, trojanls, 0, ROT0, "Capcom", "Trojan (US)" ) GAME( 1986, trojanr, trojan, trojan, trojan, 0, ROT0, "Capcom (Romstar license)", "Trojan (Romstar)" ) GAME( 1986, trojanj, trojan, trojan, trojan, 0, ROT0, "Capcom", "Tatakai no Banka (Japan)" ) -GAMEX(1987, avengers, 0, avengers, avengers, 0, ROT270, "Capcom", "Avengers (set 1)", GAME_NOT_WORKING ) -GAMEX(1987, avenger2, avengers, avengers, avengers, 0, ROT270, "Capcom", "Avengers (set 2)", GAME_NOT_WORKING ) +GAMEX(1987, avengers, 0, avengers, avengers, 0, ROT270, "Capcom", "Avengers (set 1)", GAME_NOT_WORKING | GAME_WRONG_COLORS ) +GAMEX(1987, avenger2, avengers, avengers, avengers, 0, ROT270, "Capcom", "Avengers (set 2)", GAME_NOT_WORKING | GAME_WRONG_COLORS ) diff --git a/src/drivers/m107.c b/src/drivers/m107.c index 2419ffe23..ef5695d30 100644 --- a/src/drivers/m107.c +++ b/src/drivers/m107.c @@ -10,7 +10,7 @@ unused roms next to the sprite roms. Graphics glitches in both games too. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk *******************************************************************************/ diff --git a/src/drivers/m72.c b/src/drivers/m72.c index c7386f444..2a885e17c 100644 --- a/src/drivers/m72.c +++ b/src/drivers/m72.c @@ -1269,12 +1269,11 @@ INPUT_PORTS_START( loht ) PORT_DIPNAME( 0x04, 0x04, "Coin Mode" ) PORT_DIPSETTING( 0x04, "Mode 1" ) PORT_DIPSETTING( 0x00, "Mode 2" ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00, "Easy" ) + PORT_DIPSETTING( 0x18, "Normal" ) + PORT_DIPSETTING( 0x10, "Hard" ) + PORT_DIPSETTING( 0x08, "Very Hard" ) PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1538,13 +1537,14 @@ INPUT_PORTS_START( rtype2 ) PORT_DIPNAME( 0x04, 0x04, "Coin Mode" ) PORT_DIPSETTING( 0x04, "Mode 1" ) PORT_DIPSETTING( 0x00, "Mode 2" ) - PORT_DIPNAME( 0x28, 0x20, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, "Upright 1 Player" ) - PORT_DIPSETTING( 0x20, "Upright 2 Players" ) - PORT_DIPSETTING( 0x28, DEF_STR( Cocktail ) ) -PORT_DIPSETTING( 0x08, "Upright 2 Players" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPNAME( 0x18, 0x10, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x10, "Upright 1 Player" ) + PORT_DIPSETTING( 0x00, "Upright 2 Players" ) + PORT_DIPSETTING( 0x18, DEF_STR( Cocktail ) ) +// PORT_DIPSETTING( 0x08, "Upright 2 Players" ) + /* when the following one is On, 2 players start doesn't work?? */ + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) @@ -1904,7 +1904,7 @@ static struct YM2151interface ym2151_interface = static struct DACinterface dac_interface = { 1, /* 1 channel */ - { 50 } + { 40 } }; @@ -3009,23 +3009,23 @@ ROM_END -GAME( 1987, rtype, 0, rtype, rtype, 0, ROT0, "Irem", "R-Type (Japan)" ) -GAME( 1987, rtypeu, rtype, rtype, rtypeu, 0, ROT0, "Irem (Nintendo of America license)", "R-Type (US)" ) -GAME( 1987, rtypeb, rtype, rtype, rtypeu, 0, ROT0, "bootleg", "R-Type (bootleg)" ) -GAME( 1987, bchopper, 0, m72, bchopper, bchopper, ROT0, "Irem", "Battle Chopper" ) -GAME( 1987, mrheli, bchopper, m72, bchopper, mrheli, ROT0, "Irem", "Mr. HELI no Dai-Bouken" ) -GAME( 1988, nspirit, 0, m72, nspirit, nspirit, ROT0, "Irem", "Ninja Spirit" ) -GAME( 1988, nspiritj, nspirit, m72, nspirit, nspiritj, ROT0, "Irem", "Saigo no Nindou (Japan)" ) -GAME( 1988, imgfight, 0, m72, imgfight, imgfight, ROT270, "Irem", "Image Fight (Japan)" ) -GAME( 1989, loht, 0, m72, loht, loht, ROT0, "Irem", "Legend of Hero Tonma" ) -GAME( 1989, xmultipl, 0, xmultipl, xmultipl, xmultipl, ROT0, "Irem", "X Multiply (Japan)" ) -GAME( 1989, dbreed, 0, dbreed, dbreed, dbreed, ROT0, "Irem", "Dragon Breed" ) -GAME( 1989, rtype2, 0, rtype2, rtype2, 0, ROT0, "Irem", "R-Type II" ) -GAME( 1989, rtype2j, rtype2, rtype2, rtype2, 0, ROT0, "Irem", "R-Type II (Japan)" ) -GAMEX(1990, majtitle, 0, majtitle, rtype2, 0, ROT0, "Irem", "Major Title (Japan)", GAME_NOT_WORKING ) -GAME( 1990, hharry, 0, hharry, hharry, 0, ROT0, "Irem", "Hammerin' Harry (World)" ) -GAME( 1990, hharryu, hharry, hharryu, hharry, 0, ROT0, "Irem America", "Hammerin' Harry (US)" ) -GAME( 1990, dkgensan, hharry, hharryu, hharry, 0, ROT0, "Irem", "Daiku no Gensan (Japan)" ) -GAMEX(1991, kengo, 0, hharry, hharry, 0, ROT0, "Irem", "Ken-Go", GAME_NOT_WORKING ) -GAMEX(1991, gallop, 0, m72, gallop, gallop, ROT0, "Irem", "Gallop - Armed police Unit (Japan)", GAME_IMPERFECT_SOUND ) -GAME( ????, poundfor, 0, poundfor, poundfor, 0, ROT270, "?????", "Pound for Pound" ) +GAMEX( 1987, rtype, 0, rtype, rtype, 0, ROT0, "Irem", "R-Type (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, rtypeu, rtype, rtype, rtypeu, 0, ROT0, "Irem (Nintendo of America license)", "R-Type (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, rtypeb, rtype, rtype, rtypeu, 0, ROT0, "bootleg", "R-Type (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1987, bchopper, 0, m72, bchopper, bchopper, ROT0, "Irem", "Battle Chopper", GAME_NO_COCKTAIL ) +GAMEX( 1987, mrheli, bchopper, m72, bchopper, mrheli, ROT0, "Irem", "Mr. HELI no Dai-Bouken", GAME_NO_COCKTAIL ) +GAMEX( 1988, nspirit, 0, m72, nspirit, nspirit, ROT0, "Irem", "Ninja Spirit", GAME_NO_COCKTAIL ) +GAMEX( 1988, nspiritj, nspirit, m72, nspirit, nspiritj, ROT0, "Irem", "Saigo no Nindou (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, imgfight, 0, m72, imgfight, imgfight, ROT270, "Irem", "Image Fight (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1989, loht, 0, m72, loht, loht, ROT0, "Irem", "Legend of Hero Tonma", GAME_NO_COCKTAIL ) +GAMEX( 1989, xmultipl, 0, xmultipl, xmultipl, xmultipl, ROT0, "Irem", "X Multiply (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1989, dbreed, 0, dbreed, dbreed, dbreed, ROT0, "Irem", "Dragon Breed", GAME_NO_COCKTAIL ) +GAMEX( 1989, rtype2, 0, rtype2, rtype2, 0, ROT0, "Irem", "R-Type II", GAME_NO_COCKTAIL ) +GAMEX( 1989, rtype2j, rtype2, rtype2, rtype2, 0, ROT0, "Irem", "R-Type II (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1990, majtitle, 0, majtitle, rtype2, 0, ROT0, "Irem", "Major Title (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1990, hharry, 0, hharry, hharry, 0, ROT0, "Irem", "Hammerin' Harry (World)", GAME_NO_COCKTAIL ) +GAMEX( 1990, hharryu, hharry, hharryu, hharry, 0, ROT0, "Irem America", "Hammerin' Harry (US)", GAME_NO_COCKTAIL ) +GAMEX( 1990, dkgensan, hharry, hharryu, hharry, 0, ROT0, "Irem", "Daiku no Gensan (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1991, kengo, 0, hharry, hharry, 0, ROT0, "Irem", "Ken-Go", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1991, gallop, 0, m72, gallop, gallop, ROT0, "Irem", "Gallop - Armed police Unit (Japan)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( ????, poundfor, 0, poundfor, poundfor, 0, ROT270, "?????", "Pound for Pound", GAME_NO_COCKTAIL ) diff --git a/src/drivers/m92.c b/src/drivers/m92.c index 971810d1a..da8fcc0bf 100644 --- a/src/drivers/m92.c +++ b/src/drivers/m92.c @@ -67,7 +67,7 @@ Glitch list! Very picky about interrupts.. Doesn't work! - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk Thanks to Chris Hardy and Olli Bergmann too! @@ -500,15 +500,45 @@ INPUT_PORTS_START( hook ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, "Any Button Starts" ) + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_UNUSED /* Game manual only mentions 2 dips */ + PORT_START /* Dip switch bank 2 */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, "Number of Players" ) + PORT_DIPSETTING( 0x02, "2 Players" ) + PORT_DIPSETTING( 0x00, "4 Players" ) + PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) + PORT_DIPSETTING( 0x04, "Common Coins" ) + PORT_DIPSETTING( 0x00, "Separate Coins" ) + PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) + PORT_DIPSETTING( 0x08, "Mode 1" ) + PORT_DIPSETTING( 0x00, "Mode 2" ) +/* Coin Mode 1, todo Mode 2 */ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 3C_2C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 4C_3C ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x90, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x10, "2 Start/1 Continue" ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) INPUT_PORTS_END INPUT_PORTS_START( majtitl2 ) @@ -749,7 +779,37 @@ INPUT_PORTS_START( inthunt ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_UNUSED /* Game manual only mentions 2 dips */ + PORT_START /* Dip switch bank 2 */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, "Number of Players" ) + PORT_DIPSETTING( 0x02, "2 Players" ) + PORT_DIPSETTING( 0x00, "4 Players" ) + PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) + PORT_DIPSETTING( 0x04, "Common Coins" ) + PORT_DIPSETTING( 0x00, "Seperate Coins" ) + PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) + PORT_DIPSETTING( 0x08, "Mode 1" ) + PORT_DIPSETTING( 0x00, "Mode 2" ) +/* Coin Mode 1, todo Mode 2 */ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 3C_2C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 4C_3C ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x90, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x10, "2 Start/1 Continue" ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) INPUT_PORTS_END INPUT_PORTS_START( nbbatman ) @@ -1968,23 +2028,23 @@ static void init_psoldier(void) /***************************************************************************/ /* The 'nonraster' machine is for games that don't use the raster interrupt feature - slightly faster to emulate */ -GAMEX( 1991, bmaster, 0, nonraster, bmaster, m92, ROT0, "Irem", "Blade Master (World)", GAME_NO_SOUND ) -GAMEX( 1991, lethalth, 0, lethalth, lethalth, lethalth, ROT270, "Irem", "Lethal Thunder (World)", GAME_NO_SOUND ) -GAMEX( 1991, thndblst, lethalth, lethalth, lethalth, lethalth, ROT270, "Irem", "Thunder Blaster (Japan)", GAME_NO_SOUND ) -GAMEX( 1991, gunforce, 0, raster, gunforce, gunforce, ROT0, "Irem", "Gunforce - Battle Fire Engulfed Terror Island (World)", GAME_NO_SOUND ) -GAMEX( 1991, gunforcu, gunforce, raster, gunforce, gunforce, ROT0, "Irem America", "Gunforce - Battle Fire Engulfed Terror Island (US)", GAME_NO_SOUND ) -GAMEX( 1992, hook, 0, nonraster, hook, hook, ROT0, "Irem", "Hook (World)", GAME_NO_SOUND ) -GAMEX( 1992, hooku, hook, nonraster, hook, hook, ROT0, "Irem America", "Hook (US)", GAME_NO_SOUND ) -GAMEX( 1992, mysticri, 0, nonraster, mysticri, m92, ROT0, "Irem", "Mystic Riders (World)", GAME_NO_SOUND ) -GAMEX( 1992, gunhohki, mysticri, nonraster, mysticri, m92, ROT0, "Irem", "Gun Hohki (Japan)", GAME_NO_SOUND ) -GAMEX( 1992, uccops, 0, raster, uccops, uccops, ROT0_16BIT, "Irem", "Undercover Cops (World)", GAME_NO_SOUND ) -GAMEX( 1992, uccopsj, uccops, raster, uccops, uccops, ROT0_16BIT, "Irem", "Undercover Cops (Japan)", GAME_NO_SOUND ) -GAMEX( 1992, rtypeleo, 0, raster, rtypeleo, rtypeleo, ROT0_16BIT, "Irem", "R-Type Leo (Japan)", GAME_NO_SOUND ) -GAMEX( 1992, majtitl2, 0, raster, majtitl2, m92, ROT0, "Irem", "Major Title 2 (World)", GAME_NO_SOUND ) -GAMEX( 1992, skingame, majtitl2, raster, majtitl2, m92, ROT0, "Irem America", "The Irem Skins Game (US set 1)", GAME_NO_SOUND ) -GAMEX( 1992, skingam2, majtitl2, raster, majtitl2, m92, ROT0, "Irem America", "The Irem Skins Game (US set 2)", GAME_NO_SOUND ) -GAMEX( 1993, inthunt, 0, raster, inthunt, inthunt, ROT0_16BIT, "Irem", "In The Hunt (World)", GAME_NO_SOUND ) -GAMEX( 1993, kaiteids, inthunt, raster, inthunt, inthunt, ROT0_16BIT, "Irem", "Kaitei Daisensou (Japan)", GAME_NO_SOUND ) -GAMEX( 1993, nbbatman, 0, raster, nbbatman, m92, ROT0, "Irem America", "Ninja Baseball Batman (US)", GAME_NO_SOUND | GAME_NOT_WORKING ) -GAMEX( 1993, leaguemn, nbbatman, raster, nbbatman, m92, ROT0, "Irem", "Yakyuu Kakutou League-Man (Japan)", GAME_NO_SOUND | GAME_NOT_WORKING ) -GAMEX( 1993, psoldier, 0, psoldier, psoldier, psoldier, ROT0_16BIT, "Irem", "Perfect Soldiers (Japan)", GAME_NO_SOUND ) +GAMEX( 1991, bmaster, 0, nonraster, bmaster, m92, ROT0, "Irem", "Blade Master (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1991, lethalth, 0, lethalth, lethalth, lethalth, ROT270, "Irem", "Lethal Thunder (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1991, thndblst, lethalth, lethalth, lethalth, lethalth, ROT270, "Irem", "Thunder Blaster (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1991, gunforce, 0, raster, gunforce, gunforce, ROT0, "Irem", "Gunforce - Battle Fire Engulfed Terror Island (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1991, gunforcu, gunforce, raster, gunforce, gunforce, ROT0, "Irem America", "Gunforce - Battle Fire Engulfed Terror Island (US)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, hook, 0, nonraster, hook, hook, ROT0, "Irem", "Hook (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, hooku, hook, nonraster, hook, hook, ROT0, "Irem America", "Hook (US)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, mysticri, 0, nonraster, mysticri, m92, ROT0, "Irem", "Mystic Riders (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, gunhohki, mysticri, nonraster, mysticri, m92, ROT0, "Irem", "Gun Hohki (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, uccops, 0, raster, uccops, uccops, ROT0_16BIT, "Irem", "Undercover Cops (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, uccopsj, uccops, raster, uccops, uccops, ROT0_16BIT, "Irem", "Undercover Cops (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, rtypeleo, 0, raster, rtypeleo, rtypeleo, ROT0_16BIT, "Irem", "R-Type Leo (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, majtitl2, 0, raster, majtitl2, m92, ROT0, "Irem", "Major Title 2 (World)", GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NO_COCKTAIL ) +GAMEX( 1992, skingame, majtitl2, raster, majtitl2, m92, ROT0, "Irem America", "The Irem Skins Game (US set 1)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1992, skingam2, majtitl2, raster, majtitl2, m92, ROT0, "Irem America", "The Irem Skins Game (US set 2)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1993, inthunt, 0, raster, inthunt, inthunt, ROT0_16BIT, "Irem", "In The Hunt (World)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1993, kaiteids, inthunt, raster, inthunt, inthunt, ROT0_16BIT, "Irem", "Kaitei Daisensou (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1993, nbbatman, 0, raster, nbbatman, m92, ROT0, "Irem America", "Ninja Baseball Batman (US)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1993, leaguemn, nbbatman, raster, nbbatman, m92, ROT0, "Irem", "Yakyuu Kakutou League-Man (Japan)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1993, psoldier, 0, psoldier, psoldier, psoldier, ROT0_16BIT, "Irem", "Perfect Soldiers (Japan)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/madmotor.c b/src/drivers/madmotor.c index 766fbb8d2..fb825da09 100644 --- a/src/drivers/madmotor.c +++ b/src/drivers/madmotor.c @@ -8,7 +8,7 @@ "This game is developed by Mitchell, but they entrusted PCB design and some routines to Data East." - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/drivers/mainevt.c b/src/drivers/mainevt.c index 05daf2001..1bab411c4 100644 --- a/src/drivers/mainevt.c +++ b/src/drivers/mainevt.c @@ -3,7 +3,7 @@ The Main Event, (c) 1988 Konami Devastators, (c) 1988 Konami -Emulation by Bryan McPhail, mish@tendril.force9.net +Emulation by Bryan McPhail, mish@tendril.co.uk Notes: * Schematics show a palette/work RAM bank selector, but this doesn't seem diff --git a/src/drivers/marvins.c b/src/drivers/marvins.c index b99f474f9..0038a1d3a 100644 --- a/src/drivers/marvins.c +++ b/src/drivers/marvins.c @@ -865,5 +865,5 @@ static void init_vangrd2( void ) GAME( 1983, marvins, 0, marvins, marvins, marvins, ROT270, "SNK", "Marvin's Maze" ) -GAME( 1984, madcrash, 0, madcrash, madcrash, madcrash, ROT0, "SNK", "Mad Crasher" ) +GAMEX(1984, madcrash, 0, madcrash, madcrash, madcrash, ROT0, "SNK", "Mad Crasher", GAME_IMPERFECT_SOUND ) GAME( 1984, vangrd2, 0, madcrash, vangrd2, vangrd2, ROT270, "SNK", "Vanguard II" ) diff --git a/src/drivers/mcr2.c b/src/drivers/mcr2.c index 2317b9d06..0aaa501c0 100644 --- a/src/drivers/mcr2.c +++ b/src/drivers/mcr2.c @@ -871,4 +871,4 @@ GAME( 1982, kroozr, 0, mcr2, kroozr, kroozr, ROT0, "Bally Midway GAME( 1982, domino, 0, mcr2, domino, domino, ROT0, "Bally Midway", "Domino Man" ) GAME( 1982, wacko, 0, mcr2, wacko, wacko, ROT0, "Bally Midway", "Wacko" ) GAME( 1984, twotiger, 0, mcr2, twotiger, twotiger, ROT0, "Bally Midway", "Two Tigers" ) -GAME( 1983, journey, 0, journey, domino, journey, ROT90, "Bally Midway", "Journey" ) +GAMEX(1983, journey, 0, journey, domino, journey, ROT90, "Bally Midway", "Journey", GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/mcr68.c b/src/drivers/mcr68.c index 99222687b..ca7147c0a 100644 --- a/src/drivers/mcr68.c +++ b/src/drivers/mcr68.c @@ -11,7 +11,7 @@ * Tri-Sports * Pigskin 621AD - Emulation by Bryan McPhail, mish@tendril.force9.net and + Emulation by Bryan McPhail, mish@tendril.co.uk and Aaron Giles agiles@pobox.com **************************************************************************** diff --git a/src/drivers/megasys1.c b/src/drivers/megasys1.c index 7c1757a9b..21f30a301 100644 --- a/src/drivers/megasys1.c +++ b/src/drivers/megasys1.c @@ -698,7 +698,7 @@ static struct YM2151interface ym2151_interface_##_shortname_ = \ { \ 1, \ _fm_clock_, \ - { YM3012_VOL(50,MIXER_PAN_LEFT,50,MIXER_PAN_RIGHT) }, \ + { YM3012_VOL(80,MIXER_PAN_LEFT,80,MIXER_PAN_RIGHT) }, \ { 0 } \ }; \ \ @@ -707,7 +707,7 @@ static struct OKIM6295interface okim6295_interface_##_shortname_ = \ 2, \ {_oki1_clock_, _oki2_clock_},\ { REGION_SOUND1, REGION_SOUND2 }, \ - { 50, 50 } \ + { 30, 30 } \ }; \ \ static struct MachineDriver machine_driver_##_shortname_ = \ diff --git a/src/drivers/namcos1.c b/src/drivers/namcos1.c index d2a025907..e0ca92c2d 100644 --- a/src/drivers/namcos1.c +++ b/src/drivers/namcos1.c @@ -10,6 +10,15 @@ Updates by: Vernon C. Brooks +Notes: +- The berabohm buttons don't work too well. The real thing has a special + pressure sensitive button, with two switches. The harder you push the + button, the faster the two switches are closed one after another. + Due to MAME's limited input sample rate (once per frame) it is difficult + to measure the time between the two. + + + Namco System 1 hardware ======================= @@ -65,8 +74,8 @@ are programmed separately and may be 4,8,16,or 32 pixels. Sound: Namco custom 8 channel 16-bit stereo PSG for sound effects -Yamaha YM3012 8-bit DAC for voice -Yamaha YM2151 FM chip for background music +registor array based 2 channel 8-bit DAC for voice +Yamaha YM2151+YM3012 FM chip for background music Controls: @@ -77,37 +86,39 @@ service mode and are saved in EEPROM. Games: -Date Name Key Screen +Date Name Key Screen ----- ------------------------------------- ---- ------ - 4/87 Yokai Douchuuki / Shadowland NONE H - 6/87 Dragon Spirit (old version) 136 V -??/87 Dragon Spirit (new version) 136 V - 7/87 Blazer 144 V - 9/87 Quester A V -??/87 Quester (special edition) A V -11/87 Pac-Mania 151 V-FLIP -11/87 Pac-Mania (Japanese version) 151 V -12/87 Galaga '88 153 V-FLIP -12/87 Galaga '88 (Japanese version) 153 V - 3/88 World Stadium 154 H - 5/88 Beraboh Man B H - 7/88 Marchen Maze / Alice In Wonderland 152 H - 8/88 Bakutotsu Kijuutei / Baraduke 2 155 H -10/88 World Court 143 H -11/88 Splatter House 181 H -12/88 Face Off C H - 2/89 Rompers 182 V - 3/89 Blast Off 183 V - 7/89 World Stadium '89 184 H -12/89 Dangerous Seed 308 V - 7/90 World Stadium '90 310 H -10/90 Pistol Daimyo no Bouken 309 H-FLIP -11/90 Souko Ban Deluxe 311 H-FLIP -12/91 Tank Force 185 H-FLIP - -A - key chip on sub board with paddle control(s) -B - key chip on sub board with pressure sensitive controller -C - key chip on sub board with support for player 3 and 4 controls + 4/87 Yokai Douchuuki / Shadowland NONE H + 6/87 Dragon Spirit (old version) 136 V +??/87 Dragon Spirit (new version) 136 V + 7/87 Blazer 144 V + 9/87 Quester A V +??/87 Quester (special edition) A V +11/87 Pac-Mania 151 V-FLIP +11/87 Pac-Mania (Japanese version) 151 V +12/87 Galaga '88 153 V-FLIP +12/87 Galaga '88 (Japanese version) 153 V + 3/88 World Stadium 154 H + 5/88 Beraboh Man B H +??/88 Beraboh Man (standard NS1 hardware) NONE H + 7/88 Marchen Maze / Alice In Wonderland 152 H + 8/88 Bakutotsu Kijuutei / Baraduke 2 155 H +10/88 World Court 143 H +11/88 Splatter House 181 H +12/88 Face Off C H + 2/89 Rompers 182 V + 3/89 Blast Off 183 V + 7/89 World Stadium '89 184 H +12/89 Dangerous Seed 308 V + 7/90 World Stadium '90 310 H +10/90 Pistol Daimyo no Bouken 309 H-FLIP +11/90 Souko Ban Deluxe 311 H-FLIP +??/90 Puzzle Club (prototype) ? V +12/91 Tank Force 185 H-FLIP + +A - uses sub board with paddle control(s) +B - uses sub board with pressure sensitive controls +C - uses sub board with support for player 3 and 4 controls ***********************************************************************/ @@ -119,11 +130,11 @@ C - key chip on sub board with support for player 3 and 4 controls /* from vidhrdw */ extern void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); extern void namcos1_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); -extern int namcos1_vh_start( void ); -extern void namcos1_vh_stop( void ); +extern int namcos1_vh_start(void); +extern void namcos1_vh_stop(void); /* from machine */ -extern void namcos1_bankswitch_w( int offset, int data ); +extern void namcos1_bankswitch_w(int offset,int data); extern void namcos1_subcpu_bank(int offset,int data); extern int namcos1_0_banked_area0_r(int offset); @@ -142,22 +153,22 @@ extern int namcos1_1_banked_area4_r(int offset); extern int namcos1_1_banked_area5_r(int offset); extern int namcos1_1_banked_area6_r(int offset); extern int namcos1_1_banked_area7_r(int offset); -extern void namcos1_0_banked_area0_w( int offset, int data ); -extern void namcos1_0_banked_area1_w( int offset, int data ); -extern void namcos1_0_banked_area2_w( int offset, int data ); -extern void namcos1_0_banked_area3_w( int offset, int data ); -extern void namcos1_0_banked_area4_w( int offset, int data ); -extern void namcos1_0_banked_area5_w( int offset, int data ); -extern void namcos1_0_banked_area6_w( int offset, int data ); -extern void namcos1_1_banked_area0_w( int offset, int data ); -extern void namcos1_1_banked_area1_w( int offset, int data ); -extern void namcos1_1_banked_area2_w( int offset, int data ); -extern void namcos1_1_banked_area3_w( int offset, int data ); -extern void namcos1_1_banked_area4_w( int offset, int data ); -extern void namcos1_1_banked_area5_w( int offset, int data ); -extern void namcos1_1_banked_area6_w( int offset, int data ); -extern void namcos1_cpu_control_w( int offset, int data ); -extern void namcos1_sound_bankswitch_w( int offset, int data ); +extern void namcos1_0_banked_area0_w(int offset,int data); +extern void namcos1_0_banked_area1_w(int offset,int data); +extern void namcos1_0_banked_area2_w(int offset,int data); +extern void namcos1_0_banked_area3_w(int offset,int data); +extern void namcos1_0_banked_area4_w(int offset,int data); +extern void namcos1_0_banked_area5_w(int offset,int data); +extern void namcos1_0_banked_area6_w(int offset,int data); +extern void namcos1_1_banked_area0_w(int offset,int data); +extern void namcos1_1_banked_area1_w(int offset,int data); +extern void namcos1_1_banked_area2_w(int offset,int data); +extern void namcos1_1_banked_area3_w(int offset,int data); +extern void namcos1_1_banked_area4_w(int offset,int data); +extern void namcos1_1_banked_area5_w(int offset,int data); +extern void namcos1_1_banked_area6_w(int offset,int data); +extern void namcos1_cpu_control_w(int offset,int data); +extern void namcos1_sound_bankswitch_w(int offset,int data); extern void namcos1_mcu_bankswitch_w(int offset,int data); extern void namcos1_mcu_patch_w(int offset,int data); @@ -170,7 +181,7 @@ extern void init_quester( void ); extern void init_blazer( void ); extern void init_pacmania( void ); extern void init_galaga88( void ); -extern void init_wstadium( void ); +extern void init_ws( void ); extern void init_berabohm( void ); extern void init_alice( void ); extern void init_bakutotu( void ); @@ -184,6 +195,7 @@ extern void init_dangseed( void ); extern void init_ws90( void ); extern void init_pistoldm( void ); extern void init_soukobdx( void ); +extern void init_puzlclub( void ); extern void init_tankfrce( void ); @@ -213,7 +225,7 @@ static struct MemoryReadAddress main_readmem[] = { 0xa000, 0xbfff, namcos1_0_banked_area5_r }, { 0xc000, 0xdfff, namcos1_0_banked_area6_r }, { 0xe000, 0xffff, namcos1_0_banked_area7_r }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryWriteAddress main_writemem[] = @@ -228,10 +240,10 @@ static struct MemoryWriteAddress main_writemem[] = { 0xe000, 0xefff, namcos1_bankswitch_w }, { 0xf000, 0xf000, namcos1_cpu_control_w }, { 0xf200, 0xf200, MWA_NOP }, /* watchdog? */ -// { 0xf400, 0xf400, MWA_NOP }, /* unknown */ -// { 0xf600, 0xf600, MWA_NOP }, /* unknown */ +// { 0xf400, 0xf400, MWA_NOP }, /* unknown */ +// { 0xf600, 0xf600, MWA_NOP }, /* unknown */ { 0xfc00, 0xfc01, namcos1_subcpu_bank }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryReadAddress sub_readmem[] = @@ -244,7 +256,7 @@ static struct MemoryReadAddress sub_readmem[] = { 0xa000, 0xbfff, namcos1_1_banked_area5_r }, { 0xc000, 0xdfff, namcos1_1_banked_area6_r }, { 0xe000, 0xffff, namcos1_1_banked_area7_r }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryWriteAddress sub_writemem[] = @@ -259,38 +271,38 @@ static struct MemoryWriteAddress sub_writemem[] = { 0xc000, 0xdfff, namcos1_1_banked_area6_w }, { 0xf000, 0xf000, MWA_NOP }, /* IO Chip */ { 0xf200, 0xf200, MWA_NOP }, /* watchdog? */ -// { 0xf400, 0xf400, MWA_NOP }, /* unknown */ -// { 0xf600, 0xf600, MWA_NOP }, /* unknown */ - { -1 } /* end of table */ +// { 0xf400, 0xf400, MWA_NOP }, /* unknown */ +// { 0xf600, 0xf600, MWA_NOP }, /* unknown */ + { -1 } /* end of table */ }; static struct MemoryReadAddress sound_readmem[] = { - { 0x0000, 0x3fff, MRA_BANK1 }, /* Banked ROMs */ + { 0x0000, 0x3fff, MRA_BANK1 }, /* Banked ROMs */ { 0x4000, 0x4001, YM2151_status_port_0_r }, { 0x5000, 0x50ff, namcos1_wavedata_r }, /* PSG ( Shared ) */ - { 0x5100, 0x513f, namcos1_sound_r }, /* PSG ( Shared ) */ - { 0x5140, 0x54ff, MRA_RAM }, /* Sound RAM 1 - ( Shared ) */ - { 0x7000, 0x77ff, MRA_BANK2 }, /* Sound RAM 2 - ( Shared ) */ - { 0x8000, 0x9fff, MRA_RAM }, /* Sound RAM 3 */ + { 0x5100, 0x513f, namcos1_sound_r }, /* PSG ( Shared ) */ + { 0x5140, 0x54ff, MRA_RAM }, /* Sound RAM 1 - ( Shared ) */ + { 0x7000, 0x77ff, MRA_BANK2 }, /* Sound RAM 2 - ( Shared ) */ + { 0x8000, 0x9fff, MRA_RAM }, /* Sound RAM 3 */ { 0xc000, 0xffff, MRA_ROM }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryWriteAddress sound_writemem[] = { - { 0x0000, 0x3fff, MWA_ROM }, /* Banked ROMs */ + { 0x0000, 0x3fff, MWA_ROM }, /* Banked ROMs */ { 0x4000, 0x4000, YM2151_register_port_0_w }, { 0x4001, 0x4001, YM2151_data_port_0_w }, - { 0x5000, 0x50ff, namcos1_wavedata_w,&namco_wavedata }, /* PSG ( Shared ) */ - { 0x5100, 0x513f, namcos1_sound_w,&namco_soundregs }, /* PSG ( Shared ) */ - { 0x5140, 0x54ff, MWA_RAM }, /* Sound RAM 1 - ( Shared ) */ - { 0x7000, 0x77ff, MWA_BANK2 }, /* Sound RAM 2 - ( Shared ) */ - { 0x8000, 0x9fff, MWA_RAM }, /* Sound RAM 3 */ + { 0x5000, 0x50ff, namcos1_wavedata_w,&namco_wavedata }, /* PSG ( Shared ) */ + { 0x5100, 0x513f, namcos1_sound_w,&namco_soundregs }, /* PSG ( Shared ) */ + { 0x5140, 0x54ff, MWA_RAM }, /* Sound RAM 1 - ( Shared ) */ + { 0x7000, 0x77ff, MWA_BANK2 }, /* Sound RAM 2 - ( Shared ) */ + { 0x8000, 0x9fff, MWA_RAM }, /* Sound RAM 3 */ { 0xc000, 0xc001, namcos1_sound_bankswitch_w }, /* bank selector */ - { 0xd001, 0xd001, MWA_NOP }, /* watchdog? */ - { 0xe000, 0xe000, MWA_NOP }, /* IRQ clear ? */ - { -1 } /* end of table */ + { 0xd001, 0xd001, MWA_NOP }, /* watchdog? */ + { 0xe000, 0xe000, MWA_NOP }, /* IRQ clear ? */ + { -1 } /* end of table */ }; static int dsw_r(int offs) @@ -303,14 +315,42 @@ static int dsw_r(int offs) return 0xf0 | (ret & 0x0f); } +static void namcos1_coin_w(int offset,int data) +{ +// coin_lockout_global_w(0,~data & 1); +// coin_counter_w(0,data & 2); +// coin_counter_w(1,data & 4); +} + +static int dac0_value ,dac1_value, dac0_gain=0, dac1_gain=0; + +static void namcos1_update_DACs(void) +{ + DAC_signed_data_16_w(0,0x8000+(dac0_value * dac0_gain)+(dac1_value * dac1_gain)); +} + +static void namcos1_dac_gain_w(int offset,int data) +{ + int value; + /* DAC0 */ + value = (data&1)|((data>>1)&2); /* GAIN0,GAIN1 */ + dac0_gain = 0x0101 * (value+1) /4 /2; + /* DAC1 */ + value = (data>>3)&3; /* GAIN2,GAIN3 */ + dac1_gain = 0x0101 * (value+1) / 4 /2; + namcos1_update_DACs(); +} + static void namcos1_dac0_w(int offset,int data) { - DAC_data_w(0,data); + dac0_value = data-0x80; /* shift zero point */ + namcos1_update_DACs(); } static void namcos1_dac1_w(int offset,int data) { - DAC_data_w(1,data); + dac1_value = data-0x80; /* shift zero point */ + namcos1_update_DACs(); } static int num=0, strobe=0; @@ -392,7 +432,7 @@ static struct MemoryReadAddress mcu_readmem[] = { 0xc000, 0xc7ff, MRA_BANK3 }, { 0xc800, 0xcfff, MRA_RAM }, /* EEPROM */ { 0xf000, 0xffff, MRA_ROM }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryWriteAddress mcu_writemem[] = @@ -403,11 +443,11 @@ static struct MemoryWriteAddress mcu_writemem[] = { 0xc000, 0xc000, namcos1_mcu_patch_w }, { 0xc000, 0xc7ff, MWA_BANK3 }, { 0xc800, 0xcfff, MWA_RAM, &nvram, &nvram_size }, /* EEPROM */ - { 0xd000, 0xd000, namcos1_dac0_w }, /* DAC0 */ - { 0xd400, 0xd400, namcos1_dac1_w }, /* DAC1 */ + { 0xd000, 0xd000, namcos1_dac0_w }, + { 0xd400, 0xd400, namcos1_dac1_w }, { 0xd800, 0xd800, namcos1_mcu_bankswitch_w }, /* BANK selector */ { 0xf000, 0xf000, MWA_NOP }, /* IRQ clear ? */ - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryReadAddress quester_mcu_readmem[] = @@ -421,7 +461,7 @@ static struct MemoryReadAddress quester_mcu_readmem[] = { 0xc000, 0xc7ff, MRA_BANK3 }, { 0xc800, 0xcfff, MRA_RAM }, /* EEPROM */ { 0xf000, 0xffff, MRA_ROM }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct MemoryReadAddress faceoff_mcu_readmem[] = @@ -435,25 +475,27 @@ static struct MemoryReadAddress faceoff_mcu_readmem[] = { 0xc000, 0xc7ff, MRA_BANK3 }, { 0xc800, 0xcfff, MRA_RAM }, /* EEPROM */ { 0xf000, 0xffff, MRA_ROM }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct IOReadPort mcu_readport[] = { { HD63701_PORT1, HD63701_PORT1, input_port_3_r }, - { -1 } /* end of table */ + { -1 } /* end of table */ }; static struct IOWritePort mcu_writeport[] = { -// { HD63701_PORT2, HD63701_PORT2, namcos1_dac_gain_w }, - { -1 } /* end of table */ + { HD63701_PORT1, HD63701_PORT1, namcos1_coin_w }, + { HD63701_PORT2, HD63701_PORT2, namcos1_dac_gain_w }, + { -1 } /* end of table */ }; +/* Standard Namco System 1 input port definition */ INPUT_PORTS_START( ns1 ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) @@ -463,31 +505,70 @@ INPUT_PORTS_START( ns1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - PORT_START /* IN1 */ + PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - PORT_START /* DSW1 */ + PORT_START /* DSW1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x08, 0x00, "Auto Data Sampling" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, "Auto Data Sampling" ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x40, 0x40, "Freeze" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START /* IN2 */ + PORT_START /* IN2 : mcu PORT2 */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) //OUT:coin lockout + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) //OUT:coin counter1 + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) //OUT:coin counter2 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Service Button", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + +/* Dragon Spirit input port definition - dip switches are different */ +INPUT_PORTS_START( dspirit ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START /* DSW1 */ + PORT_DIPNAME( 0x7f, 0x7f, "Life" ) + PORT_DIPSETTING( 0x7f, "2" ) + PORT_DIPSETTING( 0x16, "3" ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + + PORT_START /* IN2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -498,36 +579,37 @@ INPUT_PORTS_START( ns1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END +/* Quester input port definition - paddle controls */ INPUT_PORTS_START( quester ) - PORT_START /* IN0 */ - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) /* paddle */ + PORT_START /* IN0 */ + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) /* paddle */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - PORT_START /* IN1 */ - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) /* paddle */ + PORT_START /* IN1 */ + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) /* paddle */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - PORT_START /* DSW1 */ + PORT_START /* DSW1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x08, 0x00, "Auto Data Sampling" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, "Auto Data Sampling" ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x40, 0x40, "Freeze" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START /* IN2 */ + PORT_START /* IN2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -537,37 +619,38 @@ INPUT_PORTS_START( quester ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* IN4 - fake input port for player 1 paddle */ + PORT_START /* IN4 - fake input port for player 1 paddle */ PORT_ANALOG( 0xff, 0x00, IPT_DIAL, 30, 15, 0, 0 ) - PORT_START /* IN5 - fake input port for player 2 paddle */ + PORT_START /* IN5 - fake input port for player 2 paddle */ PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_PLAYER2, 30, 15, 0, 0 ) INPUT_PORTS_END +/* Face Off input port definition - 4 player controls */ INPUT_PORTS_START( faceoff ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - PORT_START /* IN1 */ + PORT_START /* IN1 */ PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - PORT_START /* DSW1 */ + PORT_START /* DSW1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x08, 0x00, "Auto Data Sampling" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, "Auto Data Sampling" ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x40, 0x40, "Freeze" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START /* IN2 */ + PORT_START /* IN2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -577,7 +660,7 @@ INPUT_PORTS_START( faceoff ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* IN4 - fake input port for player 1 */ + PORT_START /* IN4 - fake input port for player 1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) @@ -585,66 +668,141 @@ INPUT_PORTS_START( faceoff ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* IN5 - fake input port for player 2 */ + PORT_START /* IN5 - fake input port for player 2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* IN6 - fake input port for player 3 */ + PORT_START /* IN6 - fake input port for player 3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER3 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* IN7 - fake input port for player 4 */ + PORT_START /* IN7 - fake input port for player 4 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER4 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER4 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER4 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER4 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END +/* Beraboh Man input port definition - controls are different */ +INPUT_PORTS_START( berabohm ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_COCKTAIL ) + PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) /* timing from the buttons interface */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START /* DSW1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x08, 0x08, "Auto Data Sampling" ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x40, 0x40, "Freeze" ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Service Button", KEYCODE_F1, IP_JOY_NONE ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + /* + buttons (pressure sensitive) + each button has two switches: the first is closed as soon as the button is + pressed, the second a little later, depending on how hard the button is + pressed. + bits 0-5 control strength (0x00 = max 0x3f = min) + bit 6 indicates the button is pressed + bit 7 is not actually read by the game but I use it to simulate the second + switch + */ + PORT_START + PORT_BIT( 0x3f, 0x00, IPT_SPECIAL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) + + PORT_START + PORT_BIT( 0x3f, 0x00, IPT_SPECIAL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + + PORT_START + PORT_BIT( 0x3f, 0x00, IPT_SPECIAL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 | IPF_COCKTAIL ) + + PORT_START + PORT_BIT( 0x3f, 0x00, IPT_SPECIAL ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL ) +INPUT_PORTS_END + static struct GfxLayout charlayout = { - 8,8, /* 8*8 characters */ - 16384, /* 16384 characters max */ - 1, /* 1 bit per pixel */ - { 0 }, /* bitplanes offset */ + 8,8, /* 8*8 characters */ + 16384, /* 16384 characters max */ + 1, /* 1 bit per pixel */ + { 0 }, /* bitplanes offset */ { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 consecutive bytes */ + 8*8 /* every char takes 8 consecutive bytes */ }; static struct GfxLayout tilelayout = { - 8,8, /* 8*8 characters */ - 16384, /* 16384 characters max */ - 8, /* 8 bits per pixel */ - { 0, 1, 2, 3, 4, 5, 6, 7 }, /* bitplanes offset */ + 8,8, /* 8*8 characters */ + 16384, /* 16384 characters max */ + 8, /* 8 bits per pixel */ + { 0, 1, 2, 3, 4, 5, 6, 7 }, /* bitplanes offset */ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 }, - 64*8 /* every char takes 64 consecutive bytes */ + 64*8 /* every char takes 64 consecutive bytes */ }; static struct GfxLayout spritelayout = { - 32,32, /* 32*32 sprites */ - 2048, /* 2048 sprites max */ - 4, /* 4 bits per pixel */ - { 0, 1, 2, 3 }, /* the bitplanes are packed */ + 32,32, /* 32*32 sprites */ + 2048, /* 2048 sprites max */ + 4, /* 4 bits per pixel */ + { 0, 1, 2, 3 }, /* the bitplanes are packed */ { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, 8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4, 256*4,257*4,258*4,259*4,260*4,261*4,262*4,263*4, 264*4,265*4,266*4,267*4,268*4,269*4,270*4,271*4}, - { 0*4*16, 1*4*16, 2*4*16, 3*4*16, 4*4*16, 5*4*16, 6*4*16, 7*4*16, + { 0*4*16, 1*4*16, 2*4*16, 3*4*16, 4*4*16, 5*4*16, 6*4*16, 7*4*16, 8*4*16, 9*4*16, 10*4*16, 11*4*16, 12*4*16, 13*4*16, 14*4*16, 15*4*16, 32*4*16,33*4*16, 34*4*16, 35*4*16, 36*4*16, 37*4*16, 38*4*16, 39*4*16, 40*4*16,41*4*16, 42*4*16, 43*4*16, 44*4*16, 45*4*16, 46*4*16, 47*4*16 }, @@ -653,9 +811,9 @@ static struct GfxLayout spritelayout = static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout, 0, 1 }, /* character mask */ - { REGION_GFX2, 0, &tilelayout, 128*16, 6 }, /* characters */ - { REGION_GFX3, 0, &spritelayout, 0, 128 }, /* sprites 32/16/8/4 dots */ + { REGION_GFX1, 0, &charlayout, 0, 1 }, /* character mask */ + { REGION_GFX2, 0, &tilelayout, 128*16, 6 }, /* characters */ + { REGION_GFX3, 0, &spritelayout, 0, 128 }, /* sprites 32/16/8/4 dots */ { -1 } /* end of array */ }; @@ -666,7 +824,7 @@ static void namcos1_sound_interrupt( int irq ) static struct YM2151interface ym2151_interface = { - 1, /* 1 chip */ + 1, /* 1 chip */ 3579580, /* 3.58 MHZ */ { YM3012_VOL(80,MIXER_PAN_LEFT,80,MIXER_PAN_RIGHT) }, { namcos1_sound_interrupt }, @@ -676,16 +834,21 @@ static struct YM2151interface ym2151_interface = static struct namco_interface namco_interface = { 23920/2, /* sample rate (approximate value) */ - 8, /* number of voices */ - 50, /* playback volume */ - -1, /* memory region */ - 1 /* stereo */ + 8, /* number of voices */ + 50, /* playback volume */ + -1, /* memory region */ + 1 /* stereo */ }; +/* + namcos1 has tow 8bit dac channel. But They are mixed before pre-amp. + And,they are connected with pre-amp through active LPF. + LFP info : Fco = 3.3KHz , g = -12dB/oct +*/ static struct DACinterface dac_interface = { - 2, /* 2 channels */ - { 50,50 } /* mixing level */ + 1, /* 2 channel , but they are mixed by the driver */ + { 100 } /* mixing level */ }; static struct MachineDriver machine_driver_ns1 = @@ -694,37 +857,37 @@ static struct MachineDriver machine_driver_ns1 = { { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ main_readmem,main_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sub_readmem,sub_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sound_readmem,sound_writemem,0,0, interrupt,1 }, { - CPU_HD63701, /* or compatible 6808 with extra instructions */ + CPU_HD63701, /* or compatible 6808 with extra instructions */ 49152000/8/4, mcu_readmem,mcu_writemem,mcu_readport,mcu_writeport, interrupt,1 } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, /* CPU slice timer is made by machine_init */ init_namcos1, /* video hardware */ 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, gfxdecodeinfo, - 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ + 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ 128*16+6*256+1, namcos1_vh_convert_color_prom, @@ -760,37 +923,37 @@ static struct MachineDriver machine_driver_quester = { { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ main_readmem,main_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sub_readmem,sub_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sound_readmem,sound_writemem,0,0, interrupt,1 }, { - CPU_HD63701, /* or compatible 6808 with extra instructions */ + CPU_HD63701, /* or compatible 6808 with extra instructions */ 49152000/8/4, quester_mcu_readmem,mcu_writemem,mcu_readport,mcu_writeport, interrupt,1 } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, /* CPU slice timer is made by machine_init */ init_namcos1, /* video hardware */ 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, gfxdecodeinfo, - 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ + 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ 128*16+6*256+1, namcos1_vh_convert_color_prom, @@ -826,37 +989,37 @@ static struct MachineDriver machine_driver_faceoff = { { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ main_readmem,main_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sub_readmem,sub_writemem,0,0, interrupt,1, }, { CPU_M6809, - 49152000/32, /* Not sure if divided by 32 or 24 */ + 49152000/32, /* Not sure if divided by 32 or 24 */ sound_readmem,sound_writemem,0,0, interrupt,1 }, { - CPU_HD63701, /* or compatible 6808 with extra instructions */ + CPU_HD63701, /* or compatible 6808 with extra instructions */ 49152000/8/4, faceoff_mcu_readmem,mcu_writemem,mcu_readport,mcu_writeport, interrupt,1 } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, /* CPU slice timer is made by machine_init */ init_namcos1, /* video hardware */ 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, gfxdecodeinfo, - 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ + 128*16+6*256+6*256+1, /* sprites, tiles, shadowed tiles, background */ 128*16+6*256+1, namcos1_vh_convert_color_prom, @@ -899,1187 +1062,1356 @@ static struct MachineDriver machine_driver_faceoff = /* Shadowland */ ROM_START( shadowld ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) - ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) + ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "yd3.p7", 0x00000, 0x10000, 0xf1c271a0 ) - ROM_LOAD_HS( "yd3.p6", 0x20000, 0x10000, 0x93d6811c ) - ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) - ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) - ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) - ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) - ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "yd3.p7", 0x00000, 0x10000, 0xf1c271a0 ) + ROM_LOAD_HS( "yd3.p6", 0x20000, 0x10000, 0x93d6811c ) + ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) + ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) + ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) + ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) + ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ /* 0x00000 - 0x08000 = RAM6 ( 4 * 8k ) */ /* 0x08000 - 0x0c000 = RAM1 ( 2 * 8k ) */ /* 0x0c000 - 0x14000 = RAM3 ( 4 * 8k ) */ - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) - ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) - ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) - ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) - ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) - ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) + ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) + ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) + ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) + ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) + ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) + ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) - ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) - ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) - ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) - ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) - ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) - ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) - ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) + ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) + ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) + ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) + ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) + ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) + ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) + ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) + ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) - ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) - ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) - ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) - ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) - ROM_LOAD_HS( "yd3.ob5", 0xa0000, 0x10000, 0x1e4aa460 ) + ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) + ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) + ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) + ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) + ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) + ROM_LOAD_HS( "yd3.ob5", 0xa0000, 0x10000, 0x1e4aa460 ) ROM_END /* Youkai Douchuuki (Shadowland Japan) */ ROM_START( youkaidk ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) - ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "yd2prg7b.bin", 0x00000, 0x10000, 0xa05bf3ae ) - ROM_LOAD_HS( "yd1-prg6.bin", 0x20000, 0x10000, 0x785a2772 ) - ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) - ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) - ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) - ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) - ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) - ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) - ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) - ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) - ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) - ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) + ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "yd2prg7b.bin", 0x00000, 0x10000, 0xa05bf3ae ) + ROM_LOAD_HS( "yd1-prg6.bin", 0x20000, 0x10000, 0x785a2772 ) + ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) + ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) + ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) + ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) + ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) + ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) + ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) + ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) + ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) + ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) + ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) - ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) - ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) - ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) - ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) - ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) - ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) - ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) + ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) + ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) + ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) + ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) + ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) + ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) + ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) + ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) - ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) - ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) - ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) - ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) + ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) + ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) + ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) + ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) + ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) ROM_END +/* Youkai Douchuuki (Shadowland Japan old version) */ ROM_START( yokaidko ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) - ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "yd2_p7.bin", 0x000000, 0x10000, 0x3d39098c ) /* 8 * 8k banks */ - ROM_LOAD_HS( "yd1-prg6.bin", 0x20000, 0x10000, 0x785a2772 ) - ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) - ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) - ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) - ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) - ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) - ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) - ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) - ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) - ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) - ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "yd1.sd0", 0x0c000, 0x10000, 0xa9cb51fb ) + ROM_LOAD( "yd1.sd1", 0x1c000, 0x10000, 0x65d1dc0d ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "yd2_p7.bin", 0x00000, 0x10000, 0x3d39098c ) + ROM_LOAD_HS( "yd1-prg6.bin", 0x20000, 0x10000, 0x785a2772 ) + ROM_LOAD_HS( "yd1.p5", 0x40000, 0x10000, 0x29a78bd6 ) + ROM_LOAD_HS( "yd1.p3", 0x80000, 0x10000, 0xa4f27c24 ) + ROM_LOAD_HS( "yd1.p2", 0xa0000, 0x10000, 0x62e5bbec ) + ROM_LOAD_HS( "yd1.p1", 0xc0000, 0x10000, 0xa8ea6bd3 ) + ROM_LOAD_HS( "yd1.p0", 0xe0000, 0x10000, 0x07e49883 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "yd1.v0", 0x10000, 0x10000, 0xcde1ee23 ) + ROM_LOAD_HS( "yd1.v1", 0x30000, 0x10000, 0xc61f462b ) + ROM_LOAD_HS( "yd1.v2", 0x50000, 0x10000, 0x821ad462 ) + ROM_LOAD_HS( "yd1.v3", 0x70000, 0x10000, 0x1e003489 ) + ROM_LOAD_HS( "yd1.v4", 0x90000, 0x10000, 0xa106e6f6 ) + ROM_LOAD_HS( "yd1.v5", 0xb0000, 0x10000, 0xde72f38f ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) + ROM_LOAD( "yd.ch8", 0x00000, 0x20000, 0x0c8e69d0 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) - ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) - ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) - ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) - ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) - ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) - ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) - ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) + ROM_LOAD( "yd.ch0", 0x00000, 0x20000, 0x717441dd ) + ROM_LOAD( "yd.ch1", 0x20000, 0x20000, 0xc1be6e35 ) + ROM_LOAD( "yd.ch2", 0x40000, 0x20000, 0x2df8d8cc ) + ROM_LOAD( "yd.ch3", 0x60000, 0x20000, 0xd4e15c9e ) + ROM_LOAD( "yd.ch4", 0x80000, 0x20000, 0xc0041e0d ) + ROM_LOAD( "yd.ch5", 0xa0000, 0x20000, 0x7b368461 ) + ROM_LOAD( "yd.ch6", 0xc0000, 0x20000, 0x3ac6a90e ) + ROM_LOAD( "yd.ch7", 0xe0000, 0x20000, 0x8d2cffa5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) - ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) - ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) - ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) - ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) + ROM_LOAD( "yd.ob0", 0x00000, 0x20000, 0xefb8efe3 ) + ROM_LOAD( "yd.ob1", 0x20000, 0x20000, 0xbf4ee682 ) + ROM_LOAD( "yd.ob2", 0x40000, 0x20000, 0xcb721682 ) + ROM_LOAD( "yd.ob3", 0x60000, 0x20000, 0x8a6c3d1c ) + ROM_LOAD( "yd.ob4", 0x80000, 0x20000, 0xef97bffb ) ROM_END /* Dragon Spirit */ ROM_START( dspirit ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "dssnd-0.bin", 0x0c000, 0x10000, 0x27100065 ) - ROM_LOAD( "dssnd-1.bin", 0x1c000, 0x10000, 0xb398645f ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "ds3-p7.bin", 0x00000, 0x10000, 0x820bedb2 ) - ROM_LOAD_HS( "ds3-p6.bin", 0x20000, 0x10000, 0xfcc01bd1 ) - ROM_LOAD_HS( "dsprg-5.bin", 0x40000, 0x10000, 0x9a3a1028 ) - ROM_LOAD_HS( "dsprg-4.bin", 0x60000, 0x10000, 0xf3307870 ) - ROM_LOAD_HS( "dsprg-3.bin", 0x80000, 0x10000, 0xc6e5954b ) - ROM_LOAD_HS( "dsprg-2.bin", 0xa0000, 0x10000, 0x3c9b0100 ) - ROM_LOAD_HS( "dsprg-1.bin", 0xc0000, 0x10000, 0xf7e3298a ) - ROM_LOAD_HS( "dsprg-0.bin", 0xe0000, 0x10000, 0xb22a2856 ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "dsvoi-0.bin", 0x10000, 0x10000, 0x313b3508 ) - ROM_LOAD( "dsvoi-1.bin", 0x30000, 0x20000, 0x54790d4e ) - ROM_LOAD( "dsvoi-2.bin", 0x50000, 0x20000, 0x05298534 ) - ROM_LOAD( "dsvoi-3.bin", 0x70000, 0x20000, 0x13e84c7e ) - ROM_LOAD( "dsvoi-4.bin", 0x90000, 0x20000, 0x34fbb8cd ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "dssnd-0.bin", 0x0c000, 0x10000, 0x27100065 ) + ROM_LOAD( "dssnd-1.bin", 0x1c000, 0x10000, 0xb398645f ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "ds3-p7.bin", 0x00000, 0x10000, 0x820bedb2 ) + ROM_LOAD_HS( "ds3-p6.bin", 0x20000, 0x10000, 0xfcc01bd1 ) + ROM_LOAD_HS( "dsprg-5.bin", 0x40000, 0x10000, 0x9a3a1028 ) + ROM_LOAD_HS( "dsprg-4.bin", 0x60000, 0x10000, 0xf3307870 ) + ROM_LOAD_HS( "dsprg-3.bin", 0x80000, 0x10000, 0xc6e5954b ) + ROM_LOAD_HS( "dsprg-2.bin", 0xa0000, 0x10000, 0x3c9b0100 ) + ROM_LOAD_HS( "dsprg-1.bin", 0xc0000, 0x10000, 0xf7e3298a ) + ROM_LOAD_HS( "dsprg-0.bin", 0xe0000, 0x10000, 0xb22a2856 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "dsvoi-0.bin", 0x10000, 0x10000, 0x313b3508 ) + ROM_LOAD( "dsvoi-1.bin", 0x30000, 0x20000, 0x54790d4e ) + ROM_LOAD( "dsvoi-2.bin", 0x50000, 0x20000, 0x05298534 ) + ROM_LOAD( "dsvoi-3.bin", 0x70000, 0x20000, 0x13e84c7e ) + ROM_LOAD( "dsvoi-4.bin", 0x90000, 0x20000, 0x34fbb8cd ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "dschr-8.bin", 0x00000, 0x20000, 0x946eb242 ) + ROM_LOAD( "dschr-8.bin", 0x00000, 0x20000, 0x946eb242 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "dschr-0.bin", 0x00000, 0x20000, 0x7bf28ac3 ) - ROM_LOAD( "dschr-1.bin", 0x20000, 0x20000, 0x03582fea ) - ROM_LOAD( "dschr-2.bin", 0x40000, 0x20000, 0x5e05f4f9 ) - ROM_LOAD( "dschr-3.bin", 0x60000, 0x20000, 0xdc540791 ) - ROM_LOAD( "dschr-4.bin", 0x80000, 0x20000, 0xffd1f35c ) - ROM_LOAD( "dschr-5.bin", 0xa0000, 0x20000, 0x8472e0a3 ) - ROM_LOAD( "dschr-6.bin", 0xc0000, 0x20000, 0xa799665a ) - ROM_LOAD( "dschr-7.bin", 0xe0000, 0x20000, 0xa51724af ) + ROM_LOAD( "dschr-0.bin", 0x00000, 0x20000, 0x7bf28ac3 ) + ROM_LOAD( "dschr-1.bin", 0x20000, 0x20000, 0x03582fea ) + ROM_LOAD( "dschr-2.bin", 0x40000, 0x20000, 0x5e05f4f9 ) + ROM_LOAD( "dschr-3.bin", 0x60000, 0x20000, 0xdc540791 ) + ROM_LOAD( "dschr-4.bin", 0x80000, 0x20000, 0xffd1f35c ) + ROM_LOAD( "dschr-5.bin", 0xa0000, 0x20000, 0x8472e0a3 ) + ROM_LOAD( "dschr-6.bin", 0xc0000, 0x20000, 0xa799665a ) + ROM_LOAD( "dschr-7.bin", 0xe0000, 0x20000, 0xa51724af ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "dsobj-0.bin", 0x00000, 0x20000, 0x03ec3076 ) - ROM_LOAD( "dsobj-1.bin", 0x20000, 0x20000, 0xe67a8fa4 ) - ROM_LOAD( "dsobj-2.bin", 0x40000, 0x20000, 0x061cd763 ) - ROM_LOAD( "dsobj-3.bin", 0x60000, 0x20000, 0x63225a09 ) - ROM_LOAD_HS( "dsobj-4.bin", 0x80000, 0x10000, 0xa6246fcb ) + ROM_LOAD( "dsobj-0.bin", 0x00000, 0x20000, 0x03ec3076 ) + ROM_LOAD( "dsobj-1.bin", 0x20000, 0x20000, 0xe67a8fa4 ) + ROM_LOAD( "dsobj-2.bin", 0x40000, 0x20000, 0x061cd763 ) + ROM_LOAD( "dsobj-3.bin", 0x60000, 0x20000, 0x63225a09 ) + ROM_LOAD_HS( "dsobj-4.bin", 0x80000, 0x10000, 0xa6246fcb ) ROM_END /* Dragon Spirit (old version) */ ROM_START( dspirito ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "dssnd-0.bin", 0x0c000, 0x10000, 0x27100065 ) - ROM_LOAD( "dssnd-1.bin", 0x1c000, 0x10000, 0xb398645f ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "dsprg-7.bin", 0x00000, 0x10000, 0xf4c0d75e ) - ROM_LOAD_HS( "dsprg-6.bin", 0x20000, 0x10000, 0xa82737b4 ) - ROM_LOAD_HS( "dsprg-5.bin", 0x40000, 0x10000, 0x9a3a1028 ) - ROM_LOAD_HS( "dsprg-4.bin", 0x60000, 0x10000, 0xf3307870 ) - ROM_LOAD_HS( "dsprg-3.bin", 0x80000, 0x10000, 0xc6e5954b ) - ROM_LOAD_HS( "dsprg-2.bin", 0xa0000, 0x10000, 0x3c9b0100 ) - ROM_LOAD_HS( "dsprg-1.bin", 0xc0000, 0x10000, 0xf7e3298a ) - ROM_LOAD_HS( "dsprg-0.bin", 0xe0000, 0x10000, 0xb22a2856 ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "dsvoi-0.bin", 0x10000, 0x10000, 0x313b3508 ) - ROM_LOAD( "dsvoi-1.bin", 0x30000, 0x20000, 0x54790d4e ) - ROM_LOAD( "dsvoi-2.bin", 0x50000, 0x20000, 0x05298534 ) - ROM_LOAD( "dsvoi-3.bin", 0x70000, 0x20000, 0x13e84c7e ) - ROM_LOAD( "dsvoi-4.bin", 0x90000, 0x20000, 0x34fbb8cd ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "dssnd-0.bin", 0x0c000, 0x10000, 0x27100065 ) + ROM_LOAD( "dssnd-1.bin", 0x1c000, 0x10000, 0xb398645f ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "dsprg-7.bin", 0x00000, 0x10000, 0xf4c0d75e ) + ROM_LOAD_HS( "dsprg-6.bin", 0x20000, 0x10000, 0xa82737b4 ) + ROM_LOAD_HS( "dsprg-5.bin", 0x40000, 0x10000, 0x9a3a1028 ) + ROM_LOAD_HS( "dsprg-4.bin", 0x60000, 0x10000, 0xf3307870 ) + ROM_LOAD_HS( "dsprg-3.bin", 0x80000, 0x10000, 0xc6e5954b ) + ROM_LOAD_HS( "dsprg-2.bin", 0xa0000, 0x10000, 0x3c9b0100 ) + ROM_LOAD_HS( "dsprg-1.bin", 0xc0000, 0x10000, 0xf7e3298a ) + ROM_LOAD_HS( "dsprg-0.bin", 0xe0000, 0x10000, 0xb22a2856 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "dsvoi-0.bin", 0x10000, 0x10000, 0x313b3508 ) + ROM_LOAD( "dsvoi-1.bin", 0x30000, 0x20000, 0x54790d4e ) + ROM_LOAD( "dsvoi-2.bin", 0x50000, 0x20000, 0x05298534 ) + ROM_LOAD( "dsvoi-3.bin", 0x70000, 0x20000, 0x13e84c7e ) + ROM_LOAD( "dsvoi-4.bin", 0x90000, 0x20000, 0x34fbb8cd ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "dschr-8.bin", 0x00000, 0x20000, 0x946eb242 ) + ROM_LOAD( "dschr-8.bin", 0x00000, 0x20000, 0x946eb242 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "dschr-0.bin", 0x00000, 0x20000, 0x7bf28ac3 ) - ROM_LOAD( "dschr-1.bin", 0x20000, 0x20000, 0x03582fea ) - ROM_LOAD( "dschr-2.bin", 0x40000, 0x20000, 0x5e05f4f9 ) - ROM_LOAD( "dschr-3.bin", 0x60000, 0x20000, 0xdc540791 ) - ROM_LOAD( "dschr-4.bin", 0x80000, 0x20000, 0xffd1f35c ) - ROM_LOAD( "dschr-5.bin", 0xa0000, 0x20000, 0x8472e0a3 ) - ROM_LOAD( "dschr-6.bin", 0xc0000, 0x20000, 0xa799665a ) - ROM_LOAD( "dschr-7.bin", 0xe0000, 0x20000, 0xa51724af ) + ROM_LOAD( "dschr-0.bin", 0x00000, 0x20000, 0x7bf28ac3 ) + ROM_LOAD( "dschr-1.bin", 0x20000, 0x20000, 0x03582fea ) + ROM_LOAD( "dschr-2.bin", 0x40000, 0x20000, 0x5e05f4f9 ) + ROM_LOAD( "dschr-3.bin", 0x60000, 0x20000, 0xdc540791 ) + ROM_LOAD( "dschr-4.bin", 0x80000, 0x20000, 0xffd1f35c ) + ROM_LOAD( "dschr-5.bin", 0xa0000, 0x20000, 0x8472e0a3 ) + ROM_LOAD( "dschr-6.bin", 0xc0000, 0x20000, 0xa799665a ) + ROM_LOAD( "dschr-7.bin", 0xe0000, 0x20000, 0xa51724af ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "dsobj-0.bin", 0x00000, 0x20000, 0x03ec3076 ) - ROM_LOAD( "dsobj-1.bin", 0x20000, 0x20000, 0xe67a8fa4 ) - ROM_LOAD( "dsobj-2.bin", 0x40000, 0x20000, 0x061cd763 ) - ROM_LOAD( "dsobj-3.bin", 0x60000, 0x20000, 0x63225a09 ) - ROM_LOAD_HS( "dsobj-4.bin", 0x80000, 0x10000, 0xa6246fcb ) + ROM_LOAD( "dsobj-0.bin", 0x00000, 0x20000, 0x03ec3076 ) + ROM_LOAD( "dsobj-1.bin", 0x20000, 0x20000, 0xe67a8fa4 ) + ROM_LOAD( "dsobj-2.bin", 0x40000, 0x20000, 0x061cd763 ) + ROM_LOAD( "dsobj-3.bin", 0x60000, 0x20000, 0x63225a09 ) + ROM_LOAD_HS( "dsobj-4.bin", 0x80000, 0x10000, 0xa6246fcb ) ROM_END /* Blazer */ ROM_START( blazer ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x1c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "bz1_snd0.bin", 0x0c000, 0x10000, 0x6c3a580b ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "bz1_prg7.bin", 0x00000, 0x10000, 0x2d4cbb95 ) - ROM_LOAD( "bz1_prg6.bin", 0x20000, 0x20000, 0x81c48fc0 ) - ROM_LOAD( "bz1_prg5.bin", 0x40000, 0x20000, 0x900da191 ) - ROM_LOAD( "bz1_prg4.bin", 0x60000, 0x20000, 0x65ef6f05 ) - ROM_LOAD_HS( "bz1_prg3.bin", 0x80000, 0x10000, 0x81b32a1a ) - ROM_LOAD_HS( "bz1_prg2.bin", 0xa0000, 0x10000, 0x5d700aed ) - ROM_LOAD_HS( "bz1_prg1.bin", 0xc0000, 0x10000, 0xc54bbbf4 ) - ROM_LOAD_HS( "bz1_prg0.bin", 0xe0000, 0x10000, 0xa7dd195b ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "bz1_voi0.bin", 0x10000, 0x10000, 0x3d09d32e ) - ROM_LOAD( "bz1_voi1.bin", 0x30000, 0x20000, 0x2043b141 ) - ROM_LOAD( "bz1_voi2.bin", 0x50000, 0x20000, 0x64143442 ) - ROM_LOAD( "bz1_voi3.bin", 0x70000, 0x20000, 0x26cfc510 ) - ROM_LOAD( "bz1_voi4.bin", 0x90000, 0x20000, 0xd206b1bd ) + ROM_REGION( 0x1c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "bz1_snd0.bin", 0x0c000, 0x10000, 0x6c3a580b ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "bz1_prg7.bin", 0x00000, 0x10000, 0x2d4cbb95 ) + ROM_LOAD( "bz1_prg6.bin", 0x20000, 0x20000, 0x81c48fc0 ) + ROM_LOAD( "bz1_prg5.bin", 0x40000, 0x20000, 0x900da191 ) + ROM_LOAD( "bz1_prg4.bin", 0x60000, 0x20000, 0x65ef6f05 ) + ROM_LOAD_HS( "bz1_prg3.bin", 0x80000, 0x10000, 0x81b32a1a ) + ROM_LOAD_HS( "bz1_prg2.bin", 0xa0000, 0x10000, 0x5d700aed ) + ROM_LOAD_HS( "bz1_prg1.bin", 0xc0000, 0x10000, 0xc54bbbf4 ) + ROM_LOAD_HS( "bz1_prg0.bin", 0xe0000, 0x10000, 0xa7dd195b ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0xb0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "bz1_voi0.bin", 0x10000, 0x10000, 0x3d09d32e ) + ROM_LOAD( "bz1_voi1.bin", 0x30000, 0x20000, 0x2043b141 ) + ROM_LOAD( "bz1_voi2.bin", 0x50000, 0x20000, 0x64143442 ) + ROM_LOAD( "bz1_voi3.bin", 0x70000, 0x20000, 0x26cfc510 ) + ROM_LOAD( "bz1_voi4.bin", 0x90000, 0x20000, 0xd206b1bd ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "bz1_chr8.bin", 0x00000, 0x20000, 0xdb28bfca ) + ROM_LOAD( "bz1_chr8.bin", 0x00000, 0x20000, 0xdb28bfca ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "bz1_chr0.bin", 0x00000, 0x20000, 0xd346ba61 ) - ROM_LOAD( "bz1_chr1.bin", 0x20000, 0x20000, 0xe45eb2ea ) - ROM_LOAD( "bz1_chr2.bin", 0x40000, 0x20000, 0x599079ee ) - ROM_LOAD( "bz1_chr3.bin", 0x60000, 0x20000, 0xd5182e36 ) - ROM_LOAD( "bz1_chr4.bin", 0x80000, 0x20000, 0xe788259e ) - ROM_LOAD( "bz1_chr5.bin", 0xa0000, 0x20000, 0x107e6814 ) - ROM_LOAD( "bz1_chr6.bin", 0xc0000, 0x20000, 0x0312e2ba ) - ROM_LOAD( "bz1_chr7.bin", 0xe0000, 0x20000, 0xd9d9a90f ) + ROM_LOAD( "bz1_chr0.bin", 0x00000, 0x20000, 0xd346ba61 ) + ROM_LOAD( "bz1_chr1.bin", 0x20000, 0x20000, 0xe45eb2ea ) + ROM_LOAD( "bz1_chr2.bin", 0x40000, 0x20000, 0x599079ee ) + ROM_LOAD( "bz1_chr3.bin", 0x60000, 0x20000, 0xd5182e36 ) + ROM_LOAD( "bz1_chr4.bin", 0x80000, 0x20000, 0xe788259e ) + ROM_LOAD( "bz1_chr5.bin", 0xa0000, 0x20000, 0x107e6814 ) + ROM_LOAD( "bz1_chr6.bin", 0xc0000, 0x20000, 0x0312e2ba ) + ROM_LOAD( "bz1_chr7.bin", 0xe0000, 0x20000, 0xd9d9a90f ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "bz1_obj0.bin", 0x00000, 0x20000, 0x22aee927 ) - ROM_LOAD( "bz1_obj1.bin", 0x20000, 0x20000, 0x7cb10112 ) - ROM_LOAD( "bz1_obj2.bin", 0x40000, 0x20000, 0x34b23bb7 ) - ROM_LOAD( "bz1_obj3.bin", 0x60000, 0x20000, 0x9bc1db71 ) + ROM_LOAD( "bz1_obj0.bin", 0x00000, 0x20000, 0x22aee927 ) + ROM_LOAD( "bz1_obj1.bin", 0x20000, 0x20000, 0x7cb10112 ) + ROM_LOAD( "bz1_obj2.bin", 0x40000, 0x20000, 0x34b23bb7 ) + ROM_LOAD( "bz1_obj3.bin", 0x60000, 0x20000, 0x9bc1db71 ) ROM_END /* Quester */ ROM_START( quester ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "qs1_s0.bin", 0x0c000, 0x10000, 0xc2ef3af9 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "qs1_s0.bin", 0x0c000, 0x10000, 0xc2ef3af9 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "qs1_p7b.bin", 0x00000, 0x10000, 0xf358a944 ) - ROM_LOAD( "qs1_p5.bin", 0x40000, 0x10000, 0xc8e11f30 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "qs1_p7b.bin", 0x00000, 0x10000, 0xf358a944 ) + ROM_LOAD( "qs1_p5.bin", 0x40000, 0x10000, 0xc8e11f30 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "qs1_v0.bin", 0x10000, 0x10000, 0x6a2f3038 ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "qs1_v0.bin", 0x10000, 0x10000, 0x6a2f3038 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "qs1_c8.bin", 0x00000, 0x10000, 0x06730d54 ) + ROM_LOAD( "qs1_c8.bin", 0x00000, 0x10000, 0x06730d54 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "qs1_c0.bin", 0x00000, 0x20000, 0xca69bd7a ) - ROM_LOAD( "qs1_c1.bin", 0x20000, 0x20000, 0xd660ba71 ) - ROM_LOAD( "qs1_c2.bin", 0x40000, 0x20000, 0x4686f656 ) + ROM_LOAD( "qs1_c0.bin", 0x00000, 0x20000, 0xca69bd7a ) + ROM_LOAD( "qs1_c1.bin", 0x20000, 0x20000, 0xd660ba71 ) + ROM_LOAD( "qs1_c2.bin", 0x40000, 0x20000, 0x4686f656 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "qs1_o0.bin", 0x00000, 0x10000, 0xe24f0bf1 ) - ROM_LOAD( "qs1_o1.bin", 0x20000, 0x10000, 0xe4aab0ca ) + ROM_LOAD( "qs1_o0.bin", 0x00000, 0x10000, 0xe24f0bf1 ) + ROM_LOAD( "qs1_o1.bin", 0x20000, 0x10000, 0xe4aab0ca ) ROM_END /* Pac-Mania */ ROM_START( pacmania ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "pm_snd0.bin", 0x0c000, 0x10000, 0xc10370fa ) - ROM_LOAD( "pm_snd1.bin", 0x1c000, 0x10000, 0xf761ed5a ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "pm_snd0.bin", 0x0c000, 0x10000, 0xc10370fa ) + ROM_LOAD( "pm_snd1.bin", 0x1c000, 0x10000, 0xf761ed5a ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "pm_prg7.bin", 0x00000, 0x10000, 0x462fa4fd ) - ROM_LOAD( "pm_prg6.bin", 0x20000, 0x20000, 0xfe94900c ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "pm_prg7.bin", 0x00000, 0x10000, 0x462fa4fd ) + ROM_LOAD( "pm_prg6.bin", 0x20000, 0x20000, 0xfe94900c ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "pm_voice.bin", 0x10000, 0x10000, 0x1ad5788f ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "pm_voice.bin", 0x10000, 0x10000, 0x1ad5788f ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "pm_chr8.bin", 0x00000, 0x10000, 0xf3afd65d ) + ROM_LOAD( "pm_chr8.bin", 0x00000, 0x10000, 0xf3afd65d ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "pm_chr0.bin", 0x00000, 0x20000, 0x7c57644c ) - ROM_LOAD( "pm_chr1.bin", 0x20000, 0x20000, 0x7eaa67ed ) - ROM_LOAD( "pm_chr2.bin", 0x40000, 0x20000, 0x27e739ac ) - ROM_LOAD( "pm_chr3.bin", 0x60000, 0x20000, 0x1dfda293 ) + ROM_LOAD( "pm_chr0.bin", 0x00000, 0x20000, 0x7c57644c ) + ROM_LOAD( "pm_chr1.bin", 0x20000, 0x20000, 0x7eaa67ed ) + ROM_LOAD( "pm_chr2.bin", 0x40000, 0x20000, 0x27e739ac ) + ROM_LOAD( "pm_chr3.bin", 0x60000, 0x20000, 0x1dfda293 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "pm_obj0.bin", 0x00000, 0x20000, 0xfda57e8b ) - ROM_LOAD( "pm_obj1.bin", 0x20000, 0x20000, 0x4c08affe ) + ROM_LOAD( "pm_obj0.bin", 0x00000, 0x20000, 0xfda57e8b ) + ROM_LOAD( "pm_obj1.bin", 0x20000, 0x20000, 0x4c08affe ) ROM_END /* Pac-Mania (Japan) diff o1,s0,s1,p7,v0 */ ROM_START( pacmanij ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "pm-s0.a10", 0x0c000, 0x10000, 0xd5ef5eee ) - ROM_LOAD( "pm-s1.b10", 0x1c000, 0x10000, 0x411bc134 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "pm-s0.a10", 0x0c000, 0x10000, 0xd5ef5eee ) + ROM_LOAD( "pm-s1.b10", 0x1c000, 0x10000, 0x411bc134 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "pm-p7.t10", 0x00000, 0x10000, 0x2aa99e2b ) - ROM_LOAD( "pm_prg6.bin", 0x20000, 0x20000, 0xfe94900c ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "pm-p7.t10", 0x00000, 0x10000, 0x2aa99e2b ) + ROM_LOAD( "pm_prg6.bin", 0x20000, 0x20000, 0xfe94900c ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "pm-v0.b5", 0x10000, 0x10000, 0xe2689f79 ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "pm-v0.b5", 0x10000, 0x10000, 0xe2689f79 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "pm_chr8.bin", 0x00000, 0x10000, 0xf3afd65d ) + ROM_LOAD( "pm_chr8.bin", 0x00000, 0x10000, 0xf3afd65d ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "pm_chr0.bin", 0x00000, 0x20000, 0x7c57644c ) - ROM_LOAD( "pm_chr1.bin", 0x20000, 0x20000, 0x7eaa67ed ) - ROM_LOAD( "pm_chr2.bin", 0x40000, 0x20000, 0x27e739ac ) - ROM_LOAD( "pm_chr3.bin", 0x60000, 0x20000, 0x1dfda293 ) + ROM_LOAD( "pm_chr0.bin", 0x00000, 0x20000, 0x7c57644c ) + ROM_LOAD( "pm_chr1.bin", 0x20000, 0x20000, 0x7eaa67ed ) + ROM_LOAD( "pm_chr2.bin", 0x40000, 0x20000, 0x27e739ac ) + ROM_LOAD( "pm_chr3.bin", 0x60000, 0x20000, 0x1dfda293 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "pm_obj0.bin", 0x00000, 0x20000, 0xfda57e8b ) - ROM_LOAD( "pm-01.b9", 0x20000, 0x20000, 0x27bdf440 ) + ROM_LOAD( "pm_obj0.bin", 0x00000, 0x20000, 0xfda57e8b ) + ROM_LOAD( "pm-01.b9", 0x20000, 0x20000, 0x27bdf440 ) ROM_END /* Galaga '88 */ ROM_START( galaga88 ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) - ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) + ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "g88_prg7.rom", 0x00000, 0x10000, 0xdf75b7fc ) - ROM_LOAD_HS( "g88_prg6.rom", 0x20000, 0x10000, 0x7e3471d3 ) - ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) - ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) - ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "g88_prg7.rom", 0x00000, 0x10000, 0xdf75b7fc ) + ROM_LOAD_HS( "g88_prg6.rom", 0x20000, 0x10000, 0x7e3471d3 ) + ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) + ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) + ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) - ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) - ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) - ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) - ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) - ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) + ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) + ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) + ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) + ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) + ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) + ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) - ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) - ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) - ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) + ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) + ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) + ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) + ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) - ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) - ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) - ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) - ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) - ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) + ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) + ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) + ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) + ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) + ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) + ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) ROM_END ROM_START( galag88b ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) - ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) + ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "g88_prg7.rom", 0x00000, 0x10000, 0xdf75b7fc ) - ROM_LOAD_HS( "prg6", 0x20000, 0x10000, 0x403d01c1 ) - ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) - ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) - ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "g88_prg7.rom", 0x00000, 0x10000, 0xdf75b7fc ) + ROM_LOAD_HS( "prg6", 0x20000, 0x10000, 0x403d01c1 ) + ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) + ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) + ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) - ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) - ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) - ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) - ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) - ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) + ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) + ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) + ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) + ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) + ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) + ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) - ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) - ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) - ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) + ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) + ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) + ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) + ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) - ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) - ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) - ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) - ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) - ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) + ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) + ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) + ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) + ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) + ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) + ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) ROM_END /* Galaga '88 (Japan) */ ROM_START( galag88j ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) - ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "g88_snd0.rom", 0x0c000, 0x10000, 0x164a3fdc ) + ROM_LOAD( "g88_snd1.rom", 0x1c000, 0x10000, 0x16a4b784 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "g88jprg7.rom", 0x00000, 0x10000, 0x7c10965d ) - ROM_LOAD_HS( "g88jprg6.rom", 0x20000, 0x10000, 0xe7203707 ) - ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) - ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) - ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "g88jprg7.rom", 0x00000, 0x10000, 0x7c10965d ) + ROM_LOAD_HS( "g88jprg6.rom", 0x20000, 0x10000, 0xe7203707 ) + ROM_LOAD_HS( "g88_prg5.rom", 0x40000, 0x10000, 0x4fbd3f6c ) + ROM_LOAD_HS( "g88_prg1.rom", 0xc0000, 0x10000, 0xe68cb351 ) + ROM_LOAD_HS( "g88_prg0.rom", 0xe0000, 0x10000, 0x0f0778ca ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) - ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) - ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) - ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) - ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) - ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) + ROM_REGION( 0xd0000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "g88_vce0.rom", 0x10000, 0x10000, 0x86921dd4 ) + ROM_LOAD_HS( "g88_vce1.rom", 0x30000, 0x10000, 0x9c300e16 ) + ROM_LOAD_HS( "g88_vce2.rom", 0x50000, 0x10000, 0x5316b4b0 ) + ROM_LOAD_HS( "g88_vce3.rom", 0x70000, 0x10000, 0xdc077af4 ) + ROM_LOAD_HS( "g88_vce4.rom", 0x90000, 0x10000, 0xac0279a7 ) + ROM_LOAD_HS( "g88_vce5.rom", 0xb0000, 0x10000, 0x014ddba1 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) + ROM_LOAD( "g88_chr8.rom", 0x00000, 0x20000, 0x3862ed0a ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) - ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) - ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) - ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) + ROM_LOAD( "g88_chr0.rom", 0x00000, 0x20000, 0x68559c78 ) + ROM_LOAD( "g88_chr1.rom", 0x20000, 0x20000, 0x3dc0f93f ) + ROM_LOAD( "g88_chr2.rom", 0x40000, 0x20000, 0xdbf26f1f ) + ROM_LOAD( "g88_chr3.rom", 0x60000, 0x20000, 0xf5d6cac5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) - ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) - ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) - ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) - ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) - ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) + ROM_LOAD( "g88_obj0.rom", 0x00000, 0x20000, 0xd7112e3f ) + ROM_LOAD( "g88_obj1.rom", 0x20000, 0x20000, 0x680db8e7 ) + ROM_LOAD( "g88_obj2.rom", 0x40000, 0x20000, 0x13c97512 ) + ROM_LOAD( "g88_obj3.rom", 0x60000, 0x20000, 0x3ed3941b ) + ROM_LOAD( "g88_obj4.rom", 0x80000, 0x20000, 0x370ff4ad ) + ROM_LOAD( "g88_obj5.rom", 0xa0000, 0x20000, 0xb0645169 ) +ROM_END + +/* World Stadium */ +ROM_START( ws ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "ws1-s0.bin", 0x0c000, 0x10000, 0x45a87810 ) + ROM_LOAD( "ws1-s1.bin", 0x1c000, 0x10000, 0x31bf74c1 ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "ws1-p7.bin", 0x00000, 0x10000, 0x28712eba ) + ROM_LOAD_HS( "ws1-p2.bin", 0xa0000, 0x10000, 0xbb09fa9b ) + ROM_LOAD_HS( "ws1-p1.bin", 0xc0000, 0x10000, 0xdfd72bed ) + ROM_LOAD_HS( "ws1-p0.bin", 0xe0000, 0x10000, 0xb0234298 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "ws1-v0.bin", 0x10000, 0x10000, 0xf6949199 ) + ROM_LOAD( "ws1-v1.bin", 0x30000, 0x20000, 0x210e2af9 ) + + ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ + ROM_LOAD( "ws1-c8.bin", 0x00000, 0x20000, 0xd1897b9b ) + + ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "ws1-c0.bin", 0x00000, 0x20000, 0x3e3e96b4 ) + ROM_LOAD( "ws1-c1.bin", 0x20000, 0x20000, 0x897dfbc1 ) + ROM_LOAD( "ws1-c2.bin", 0x40000, 0x20000, 0xe142527c ) + ROM_LOAD( "ws1-c3.bin", 0x60000, 0x20000, 0x907d4dc8 ) + ROM_LOAD( "ws1-c4.bin", 0x80000, 0x20000, 0xafb11e17 ) + ROM_LOAD( "ws1-c6.bin", 0xc0000, 0x20000, 0xa16a17c2 ) + + ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "ws1-o0.bin", 0x00000, 0x20000, 0x12dc83a6 ) + ROM_LOAD( "ws1-o1.bin", 0x20000, 0x20000, 0x68290a46 ) + ROM_LOAD( "ws1-o2.bin", 0x40000, 0x20000, 0xcd5ba55d ) + ROM_LOAD_HS( "ws1-o3.bin", 0x60000, 0x10000, 0xf2ed5309 ) ROM_END /* Beraboh Man */ ROM_START( berabohm ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "bm1-snd0.bin", 0x0c000, 0x10000, 0xd5d53cb1 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "bm1-snd0.bin", 0x0c000, 0x10000, 0xd5d53cb1 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "bm1prg7b.bin", 0x10000, 0x10000, 0xe0c36ddd ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD_HS( "bm1-prg6.bin", 0x20000, 0x10000, 0xa51b69a5 ) - ROM_LOAD( "bm1-prg4.bin", 0x60000, 0x20000, 0xf6cfcb8c ) - ROM_LOAD( "bm1-prg1.bin", 0xc0000, 0x20000, 0xb15f6407 ) - ROM_LOAD( "bm1-prg0.bin", 0xe0000, 0x20000, 0xb57ff8c1 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "bm1prg7b.bin", 0x10000, 0x10000, 0xe0c36ddd ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD_HS( "bm1-prg6.bin", 0x20000, 0x10000, 0xa51b69a5 ) + ROM_LOAD( "bm1-prg4.bin", 0x60000, 0x20000, 0xf6cfcb8c ) + ROM_LOAD( "bm1-prg1.bin", 0xc0000, 0x20000, 0xb15f6407 ) + ROM_LOAD( "bm1-prg0.bin", 0xe0000, 0x20000, 0xb57ff8c1 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x70000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "bm1-voi0.bin", 0x10000, 0x10000, 0x4e40d0ca ) - ROM_LOAD( "bm1-voi1.bin", 0x30000, 0x20000, 0xbe9ce0a8 ) - ROM_LOAD_HS( "bm1-voi2.bin", 0x50000, 0x10000, 0x41225d04 ) + ROM_REGION( 0x70000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "bm1-voi0.bin", 0x10000, 0x10000, 0x4e40d0ca ) + ROM_LOAD( "bm1-voi1.bin", 0x30000, 0x20000, 0xbe9ce0a8 ) + ROM_LOAD_HS( "bm1-voi2.bin", 0x50000, 0x10000, 0x41225d04 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "bm-chr8.bin", 0x00000, 0x20000, 0x92860e95 ) + ROM_LOAD( "bm-chr8.bin", 0x00000, 0x20000, 0x92860e95 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "bm-chr0.bin", 0x00000, 0x20000, 0xeda1d92e ) - ROM_LOAD( "bm-chr1.bin", 0x20000, 0x20000, 0x8ae1891e ) - ROM_LOAD( "bm-chr2.bin", 0x40000, 0x20000, 0x774cdf4e ) - ROM_LOAD( "bm-chr3.bin", 0x60000, 0x20000, 0x6d81e6c9 ) - ROM_LOAD( "bm-chr4.bin", 0x80000, 0x20000, 0xf4597683 ) - ROM_LOAD( "bm-chr5.bin", 0xa0000, 0x20000, 0x0e0abde0 ) - ROM_LOAD( "bm-chr6.bin", 0xc0000, 0x20000, 0x4a61f08c ) + ROM_LOAD( "bm-chr0.bin", 0x00000, 0x20000, 0xeda1d92e ) + ROM_LOAD( "bm-chr1.bin", 0x20000, 0x20000, 0x8ae1891e ) + ROM_LOAD( "bm-chr2.bin", 0x40000, 0x20000, 0x774cdf4e ) + ROM_LOAD( "bm-chr3.bin", 0x60000, 0x20000, 0x6d81e6c9 ) + ROM_LOAD( "bm-chr4.bin", 0x80000, 0x20000, 0xf4597683 ) + ROM_LOAD( "bm-chr5.bin", 0xa0000, 0x20000, 0x0e0abde0 ) + ROM_LOAD( "bm-chr6.bin", 0xc0000, 0x20000, 0x4a61f08c ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "bm-obj0.bin", 0x00000, 0x20000, 0x15724b94 ) - ROM_LOAD( "bm-obj1.bin", 0x20000, 0x20000, 0x5d21f962 ) - ROM_LOAD( "bm-obj2.bin", 0x40000, 0x20000, 0x5d48e924 ) - ROM_LOAD( "bm-obj3.bin", 0x60000, 0x20000, 0xcbe56b7f ) - ROM_LOAD( "bm-obj4.bin", 0x80000, 0x20000, 0x76dcc24c ) - ROM_LOAD( "bm-obj5.bin", 0xa0000, 0x20000, 0xfe70201d ) - ROM_LOAD( "bm-obj7.bin", 0xe0000, 0x20000, 0x377c81ed ) + ROM_LOAD( "bm-obj0.bin", 0x00000, 0x20000, 0x15724b94 ) + ROM_LOAD( "bm-obj1.bin", 0x20000, 0x20000, 0x5d21f962 ) + ROM_LOAD( "bm-obj2.bin", 0x40000, 0x20000, 0x5d48e924 ) + ROM_LOAD( "bm-obj3.bin", 0x60000, 0x20000, 0xcbe56b7f ) + ROM_LOAD( "bm-obj4.bin", 0x80000, 0x20000, 0x76dcc24c ) + ROM_LOAD( "bm-obj5.bin", 0xa0000, 0x20000, 0xfe70201d ) + ROM_LOAD( "bm-obj7.bin", 0xe0000, 0x20000, 0x377c81ed ) ROM_END /* Marchen Maze */ ROM_START( mmaze ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "mm.sd0", 0x0c000, 0x10000, 0x25d25e07 ) - ROM_LOAD( "mm1.sd1", 0x1c000, 0x10000, 0x4a3cc89e ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "mm.sd0", 0x0c000, 0x10000, 0x25d25e07 ) + ROM_LOAD( "mm.sd1", 0x1c000, 0x10000, 0x2c5849c8 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "mm1.p7", 0x00000, 0x10000, 0x085e58cc ) - ROM_LOAD_HS( "mm1.p6", 0x20000, 0x10000, 0xeaf530d8 ) - ROM_LOAD( "mm.p2", 0xa0000, 0x20000, 0x91bde09f ) - ROM_LOAD( "mm.p1", 0xc0000, 0x20000, 0x6ba14e41 ) - ROM_LOAD( "mm.p0", 0xe0000, 0x20000, 0xe169a911 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "mm1.p7", 0x00000, 0x10000, 0x085e58cc ) + ROM_LOAD_HS( "mm1.p6", 0x20000, 0x10000, 0xeaf530d8 ) + ROM_LOAD( "mm.p2", 0xa0000, 0x20000, 0x91bde09f ) + ROM_LOAD( "mm.p1", 0xc0000, 0x20000, 0x6ba14e41 ) + ROM_LOAD( "mm.p0", 0xe0000, 0x20000, 0xe169a911 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "mm.v0", 0x20000, 0x10000, 0xee974cff ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "mm.v1", 0x30000, 0x20000, 0xd09b5830 ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "mm.v0", 0x20000, 0x10000, 0xee974cff ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "mm.v1", 0x30000, 0x20000, 0xd09b5830 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "mm.ch8", 0x00000, 0x20000, 0xa3784dfe ) + ROM_LOAD( "mm.ch8", 0x00000, 0x20000, 0xa3784dfe ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "mm.ch0", 0x00000, 0x20000, 0x43ff2dfc ) - ROM_LOAD( "mm.ch1", 0x20000, 0x20000, 0xb9b4b72d ) - ROM_LOAD( "mm.ch2", 0x40000, 0x20000, 0xbee28425 ) - ROM_LOAD( "mm.ch3", 0x60000, 0x20000, 0xd9f41e5c ) - ROM_LOAD( "mm.ch4", 0x80000, 0x20000, 0x3484f4ae ) - ROM_LOAD( "mm.ch5", 0xa0000, 0x20000, 0xc863deba ) + ROM_LOAD( "mm.ch0", 0x00000, 0x20000, 0x43ff2dfc ) + ROM_LOAD( "mm.ch1", 0x20000, 0x20000, 0xb9b4b72d ) + ROM_LOAD( "mm.ch2", 0x40000, 0x20000, 0xbee28425 ) + ROM_LOAD( "mm.ch3", 0x60000, 0x20000, 0xd9f41e5c ) + ROM_LOAD( "mm.ch4", 0x80000, 0x20000, 0x3484f4ae ) + ROM_LOAD( "mm.ch5", 0xa0000, 0x20000, 0xc863deba ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "mm.ob0", 0x00000, 0x20000, 0xd4b7e698 ) - ROM_LOAD( "mm.ob1", 0x20000, 0x20000, 0x1ce49e04 ) - ROM_LOAD( "mm.ob2", 0x40000, 0x20000, 0x3d3d5de3 ) - ROM_LOAD( "mm.ob3", 0x60000, 0x20000, 0xdac57358 ) + ROM_LOAD( "mm.ob0", 0x00000, 0x20000, 0xd4b7e698 ) + ROM_LOAD( "mm.ob1", 0x20000, 0x20000, 0x1ce49e04 ) + ROM_LOAD( "mm.ob2", 0x40000, 0x20000, 0x3d3d5de3 ) + ROM_LOAD( "mm.ob3", 0x60000, 0x20000, 0xdac57358 ) ROM_END /* Bakutotsu Kijuutei */ ROM_START( bakutotu ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "bk1-snd0.bin", 0x0c000, 0x10000, 0xc35d7df6 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "bk1-snd0.bin", 0x0c000, 0x10000, 0xc35d7df6 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "bk1-prg7.bin", 0x10000, 0x10000, 0xfac1c1bf ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD( "bk1-prg6.bin", 0x20000, 0x20000, 0x57a3ce42 ) - ROM_LOAD_HS( "bk1-prg5.bin", 0x40000, 0x10000, 0xdceed7cb ) - ROM_LOAD_HS( "bk1-prg4.bin", 0x60000, 0x10000, 0x96446d48 ) - ROM_LOAD( "bk1-prg3.bin", 0x80000, 0x20000, 0xe608234f ) - ROM_LOAD_HS( "bk1-prg2.bin", 0xa0000, 0x10000, 0x7a686daa) - ROM_LOAD_HS( "bk1-prg1.bin", 0xc0000, 0x10000, 0xd389d6d4 ) - ROM_LOAD( "bk1-prg0.bin", 0xe0000, 0x20000, 0x4529c362 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "bk1-prg7.bin", 0x10000, 0x10000, 0xfac1c1bf ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD( "bk1-prg6.bin", 0x20000, 0x20000, 0x57a3ce42 ) + ROM_LOAD_HS( "bk1-prg5.bin", 0x40000, 0x10000, 0xdceed7cb ) + ROM_LOAD_HS( "bk1-prg4.bin", 0x60000, 0x10000, 0x96446d48 ) + ROM_LOAD( "bk1-prg3.bin", 0x80000, 0x20000, 0xe608234f ) + ROM_LOAD_HS( "bk1-prg2.bin", 0xa0000, 0x10000, 0x7a686daa ) + ROM_LOAD_HS( "bk1-prg1.bin", 0xc0000, 0x10000, 0xd389d6d4 ) + ROM_LOAD( "bk1-prg0.bin", 0xe0000, 0x20000, 0x4529c362 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "bk1-voi0.bin", 0x10000, 0x10000, 0x008e290e ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "bk1-voi0.bin", 0x10000, 0x10000, 0x008e290e ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "bk-chr8.bin", 0x00000, 0x20000, 0x6c8d4029 ) + ROM_LOAD( "bk-chr8.bin", 0x00000, 0x20000, 0x6c8d4029 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "bk-chr0.bin", 0x00000, 0x20000, 0x4e011058 ) - ROM_LOAD( "bk-chr1.bin", 0x20000, 0x20000, 0x496fcb9b ) - ROM_LOAD( "bk-chr2.bin", 0x40000, 0x20000, 0xdc812e28 ) - ROM_LOAD( "bk-chr3.bin", 0x60000, 0x20000, 0x2b6120f4 ) + ROM_LOAD( "bk-chr0.bin", 0x00000, 0x20000, 0x4e011058 ) + ROM_LOAD( "bk-chr1.bin", 0x20000, 0x20000, 0x496fcb9b ) + ROM_LOAD( "bk-chr2.bin", 0x40000, 0x20000, 0xdc812e28 ) + ROM_LOAD( "bk-chr3.bin", 0x60000, 0x20000, 0x2b6120f4 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "bk-obj0.bin", 0x00000, 0x20000, 0x88c627c1 ) + ROM_LOAD( "bk-obj0.bin", 0x00000, 0x20000, 0x88c627c1 ) /* obj1 */ /* obj2 */ - ROM_LOAD( "bk-obj3.bin", 0x60000, 0x20000, 0xf7d1909a ) - ROM_LOAD( "bk-obj4.bin", 0x80000, 0x20000, 0x27ed1441 ) - ROM_LOAD( "bk-obj5.bin", 0xa0000, 0x20000, 0x790560c0 ) - ROM_LOAD( "bk-obj6.bin", 0xc0000, 0x20000, 0x2cd4d2ea ) - ROM_LOAD( "bk-obj7.bin", 0xe0000, 0x20000, 0x809aa0e6 ) + ROM_LOAD( "bk-obj3.bin", 0x60000, 0x20000, 0xf7d1909a ) + ROM_LOAD( "bk-obj4.bin", 0x80000, 0x20000, 0x27ed1441 ) + ROM_LOAD( "bk-obj5.bin", 0xa0000, 0x20000, 0x790560c0 ) + ROM_LOAD( "bk-obj6.bin", 0xc0000, 0x20000, 0x2cd4d2ea ) + ROM_LOAD( "bk-obj7.bin", 0xe0000, 0x20000, 0x809aa0e6 ) ROM_END /* World Court */ ROM_START( wldcourt ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "wc1-snd0.bin", 0x0c000, 0x10000, 0x17a6505d ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "wc1-snd0.bin", 0x0c000, 0x10000, 0x17a6505d ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "wc1-prg7.bin", 0x00000, 0x10000, 0x8a7c6cac ) - ROM_LOAD_HS( "wc1-prg6.bin", 0x20000, 0x10000, 0xe9216b9e ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "wc1-prg7.bin", 0x00000, 0x10000, 0x8a7c6cac ) + ROM_LOAD_HS( "wc1-prg6.bin", 0x20000, 0x10000, 0xe9216b9e ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "wc1-voi0.bin", 0x10000, 0x10000, 0xb57919f7 ) - ROM_LOAD( "wc1-voi1.bin", 0x30000, 0x20000, 0x97974b4b ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "wc1-voi0.bin", 0x10000, 0x10000, 0xb57919f7 ) + ROM_LOAD( "wc1-voi1.bin", 0x30000, 0x20000, 0x97974b4b ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "wc1-chr8.bin", 0x00000, 0x20000, 0x23e1c399 ) + ROM_LOAD( "wc1-chr8.bin", 0x00000, 0x20000, 0x23e1c399 ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "wc1-chr0.bin", 0x00000, 0x20000, 0x9fb07b9b ) - ROM_LOAD( "wc1-chr1.bin", 0x20000, 0x20000, 0x01bfbf60 ) - ROM_LOAD( "wc1-chr2.bin", 0x40000, 0x20000, 0x7e8acf45 ) - ROM_LOAD( "wc1-chr3.bin", 0x60000, 0x20000, 0x924e9c81 ) + ROM_LOAD( "wc1-chr0.bin", 0x00000, 0x20000, 0x9fb07b9b ) + ROM_LOAD( "wc1-chr1.bin", 0x20000, 0x20000, 0x01bfbf60 ) + ROM_LOAD( "wc1-chr2.bin", 0x40000, 0x20000, 0x7e8acf45 ) + ROM_LOAD( "wc1-chr3.bin", 0x60000, 0x20000, 0x924e9c81 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "wc1-obj0.bin", 0x00000, 0x20000, 0x70d562f8 ) - ROM_LOAD( "wc1-obj1.bin", 0x20000, 0x20000, 0xba8b034a ) - ROM_LOAD( "wc1-obj2.bin", 0x40000, 0x20000, 0xc2bd5f0f ) - ROM_LOAD( "wc1-obj3.bin", 0x60000, 0x10000, 0x1aa2dbc8 ) + ROM_LOAD( "wc1-obj0.bin", 0x00000, 0x20000, 0x70d562f8 ) + ROM_LOAD( "wc1-obj1.bin", 0x20000, 0x20000, 0xba8b034a ) + ROM_LOAD( "wc1-obj2.bin", 0x40000, 0x20000, 0xc2bd5f0f ) + ROM_LOAD( "wc1-obj3.bin", 0x60000, 0x10000, 0x1aa2dbc8 ) ROM_END /* Splatter House */ ROM_START( splatter ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "sound0", 0x0c000, 0x10000, 0x90abd4ad ) - ROM_LOAD( "sound1", 0x1c000, 0x10000, 0x8ece9e0a ) - - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "prg7", 0x00000, 0x10000, 0x24c8cbd7 ) - ROM_LOAD_HS( "prg6", 0x20000, 0x10000, 0x97a3e664 ) - ROM_LOAD_HS( "prg5", 0x40000, 0x10000, 0x0187de9a ) - ROM_LOAD_HS( "prg4", 0x60000, 0x10000, 0x350dee5b ) - ROM_LOAD_HS( "prg3", 0x80000, 0x10000, 0x955ce93f ) - ROM_LOAD_HS( "prg2", 0xa0000, 0x10000, 0x434dbe7d ) - ROM_LOAD_HS( "prg1", 0xc0000, 0x10000, 0x7a3efe09 ) - ROM_LOAD_HS( "prg0", 0xe0000, 0x10000, 0x4e07e6d9 ) - - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - - ROM_REGION( 0x90000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "voice0", 0x20000, 0x10000, 0x2199cb66 ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "voice1", 0x30000, 0x20000, 0x9b6472af ) - ROM_LOAD( "voice2", 0x50000, 0x20000, 0x25ea75b6 ) - ROM_LOAD( "voice3", 0x70000, 0x20000, 0x5eebcdb4 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "sound0", 0x0c000, 0x10000, 0x90abd4ad ) + ROM_LOAD( "sound1", 0x1c000, 0x10000, 0x8ece9e0a ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "prg7", 0x00000, 0x10000, 0x24c8cbd7 ) + ROM_LOAD_HS( "prg6", 0x20000, 0x10000, 0x97a3e664 ) + ROM_LOAD_HS( "prg5", 0x40000, 0x10000, 0x0187de9a ) + ROM_LOAD_HS( "prg4", 0x60000, 0x10000, 0x350dee5b ) + ROM_LOAD_HS( "prg3", 0x80000, 0x10000, 0x955ce93f ) + ROM_LOAD_HS( "prg2", 0xa0000, 0x10000, 0x434dbe7d ) + ROM_LOAD_HS( "prg1", 0xc0000, 0x10000, 0x7a3efe09 ) + ROM_LOAD_HS( "prg0", 0xe0000, 0x10000, 0x4e07e6d9 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0x90000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "voice0", 0x20000, 0x10000, 0x2199cb66 ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "voice1", 0x30000, 0x20000, 0x9b6472af ) + ROM_LOAD( "voice2", 0x50000, 0x20000, 0x25ea75b6 ) + ROM_LOAD( "voice3", 0x70000, 0x20000, 0x5eebcdb4 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "chr8", 0x00000, 0x20000, 0x321f483b ) + ROM_LOAD( "chr8", 0x00000, 0x20000, 0x321f483b ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "chr0", 0x00000, 0x20000, 0x4dd2ef05 ) - ROM_LOAD( "chr1", 0x20000, 0x20000, 0x7a764999 ) - ROM_LOAD( "chr2", 0x40000, 0x20000, 0x6e6526ee ) - ROM_LOAD( "chr3", 0x60000, 0x20000, 0x8d05abdb ) - ROM_LOAD( "chr4", 0x80000, 0x20000, 0x1e1f8488 ) - ROM_LOAD( "chr5", 0xa0000, 0x20000, 0x684cf554 ) + ROM_LOAD( "chr0", 0x00000, 0x20000, 0x4dd2ef05 ) + ROM_LOAD( "chr1", 0x20000, 0x20000, 0x7a764999 ) + ROM_LOAD( "chr2", 0x40000, 0x20000, 0x6e6526ee ) + ROM_LOAD( "chr3", 0x60000, 0x20000, 0x8d05abdb ) + ROM_LOAD( "chr4", 0x80000, 0x20000, 0x1e1f8488 ) + ROM_LOAD( "chr5", 0xa0000, 0x20000, 0x684cf554 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "obj0", 0x00000, 0x20000, 0x1cedbbae ) - ROM_LOAD( "obj1", 0x20000, 0x20000, 0xe56e91ee ) - ROM_LOAD( "obj2", 0x40000, 0x20000, 0x3dfb0230 ) - ROM_LOAD( "obj3", 0x60000, 0x20000, 0xe4e5a581 ) - ROM_LOAD( "obj4", 0x80000, 0x20000, 0xb2422182 ) - ROM_LOAD( "obj5", 0xa0000, 0x20000, 0x24d0266f ) - ROM_LOAD( "obj6", 0xc0000, 0x20000, 0x80830b0e ) - ROM_LOAD( "obj7", 0xe0000, 0x20000, 0x08b1953a ) + ROM_LOAD( "obj0", 0x00000, 0x20000, 0x1cedbbae ) + ROM_LOAD( "obj1", 0x20000, 0x20000, 0xe56e91ee ) + ROM_LOAD( "obj2", 0x40000, 0x20000, 0x3dfb0230 ) + ROM_LOAD( "obj3", 0x60000, 0x20000, 0xe4e5a581 ) + ROM_LOAD( "obj4", 0x80000, 0x20000, 0xb2422182 ) + ROM_LOAD( "obj5", 0xa0000, 0x20000, 0x24d0266f ) + ROM_LOAD( "obj6", 0xc0000, 0x20000, 0x80830b0e ) + ROM_LOAD( "obj7", 0xe0000, 0x20000, 0x08b1953a ) ROM_END /* Face Off */ ROM_START( faceoff ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "fo1-s0.bin", 0x0c000, 0x10000, 0x9a00d97d ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "fo1-s0.bin", 0x0c000, 0x10000, 0x9a00d97d ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "fo1-p7.bin", 0x00000, 0x10000, 0x6791d221 ) - ROM_LOAD_HS( "fo1-p6.bin", 0x20000, 0x10000, 0xa48ee82b ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "fo1-p7.bin", 0x00000, 0x10000, 0x6791d221 ) + ROM_LOAD_HS( "fo1-p6.bin", 0x20000, 0x10000, 0xa48ee82b ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) /* mcu kernel code */ - ROM_LOAD_HS( "fo1-v0.bin", 0x10000, 0x10000, 0xe6edf63e ) - ROM_LOAD_HS( "fo1-v1.bin", 0x30000, 0x10000, 0x132a5d90 ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "fo1-v0.bin", 0x10000, 0x10000, 0xe6edf63e ) + ROM_LOAD_HS( "fo1-v1.bin", 0x30000, 0x10000, 0x132a5d90 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "fo1-c8.bin", 0x00000, 0x10000, 0xd397216c ) + ROM_LOAD( "fo1-c8.bin", 0x00000, 0x10000, 0xd397216c ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "fo1-c0.bin", 0x00000, 0x20000, 0x27884ac0 ) - ROM_LOAD( "fo1-c1.bin", 0x20000, 0x20000, 0x4d423499 ) - ROM_LOAD( "fo1-c2.bin", 0x40000, 0x20000, 0xd62d86f1 ) - ROM_LOAD( "fo1-c3.bin", 0x60000, 0x20000, 0xc2a08694 ) + ROM_LOAD( "fo1-c0.bin", 0x00000, 0x20000, 0x27884ac0 ) + ROM_LOAD( "fo1-c1.bin", 0x20000, 0x20000, 0x4d423499 ) + ROM_LOAD( "fo1-c2.bin", 0x40000, 0x20000, 0xd62d86f1 ) + ROM_LOAD( "fo1-c3.bin", 0x60000, 0x20000, 0xc2a08694 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "fo1-o0.bin", 0x00000, 0x20000, 0x41af669d ) - ROM_LOAD( "fo1-o1.bin", 0x20000, 0x20000, 0xad5fbaa7 ) - ROM_LOAD( "fo1-o2.bin", 0x40000, 0x20000, 0xc1f7eb52 ) - ROM_LOAD( "fo1-o3.bin", 0x60000, 0x20000, 0xaa95d2e0 ) - ROM_LOAD( "fo1-o4.bin", 0x80000, 0x20000, 0x985f04c7 ) + ROM_LOAD( "fo1-o0.bin", 0x00000, 0x20000, 0x41af669d ) + ROM_LOAD( "fo1-o1.bin", 0x20000, 0x20000, 0xad5fbaa7 ) + ROM_LOAD( "fo1-o2.bin", 0x40000, 0x20000, 0xc1f7eb52 ) + ROM_LOAD( "fo1-o3.bin", 0x60000, 0x20000, 0xaa95d2e0 ) + ROM_LOAD( "fo1-o4.bin", 0x80000, 0x20000, 0x985f04c7 ) ROM_END /* Rompers */ ROM_START( rompers ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "rp1-snd0.bin", 0x0c000, 0x10000, 0xc7c8d649 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "rp1-snd0.bin", 0x0c000, 0x10000, 0xc7c8d649 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "rp1-prg7.bin", 0x00000, 0x10000, 0x49d057e2 ) - ROM_LOAD_HS( "rp1-prg6.bin", 0x20000, 0x10000, 0x80821065 ) - ROM_LOAD_HS( "rp1-prg5.bin", 0x40000, 0x10000, 0x98bd4133) - ROM_LOAD_HS( "rp1-prg4.bin", 0x60000, 0x10000, 0x0918f06d ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "rp1-prg7.bin", 0x00000, 0x10000, 0x49d057e2 ) + ROM_LOAD_HS( "rp1-prg6.bin", 0x20000, 0x10000, 0x80821065 ) + ROM_LOAD_HS( "rp1-prg5.bin", 0x40000, 0x10000, 0x98bd4133 ) + ROM_LOAD_HS( "rp1-prg4.bin", 0x60000, 0x10000, 0x0918f06d ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "rp1-voi0.bin", 0x20000, 0x10000, 0x11caef7e ) - ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "rp1-voi0.bin", 0x20000, 0x10000, 0x11caef7e ) + ROM_CONTINUE( 0x10000, 0x10000 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "rp1-chr8.bin", 0x00000, 0x10000, 0x69cfe46a ) + ROM_LOAD( "rp1-chr8.bin", 0x00000, 0x10000, 0x69cfe46a ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "rp1-chr0.bin", 0x00000, 0x20000, 0x41b10ef3 ) - ROM_LOAD( "rp1-chr1.bin", 0x20000, 0x20000, 0xc18cd24e ) - ROM_LOAD( "rp1-chr2.bin", 0x40000, 0x20000, 0x6c9a3c79 ) - ROM_LOAD( "rp1-chr3.bin", 0x60000, 0x20000, 0x473aa788 ) + ROM_LOAD( "rp1-chr0.bin", 0x00000, 0x20000, 0x41b10ef3 ) + ROM_LOAD( "rp1-chr1.bin", 0x20000, 0x20000, 0xc18cd24e ) + ROM_LOAD( "rp1-chr2.bin", 0x40000, 0x20000, 0x6c9a3c79 ) + ROM_LOAD( "rp1-chr3.bin", 0x60000, 0x20000, 0x473aa788 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "rp1-obj0.bin", 0x00000, 0x20000, 0x1dcbf8bb ) - ROM_LOAD( "rp1-obj1.bin", 0x20000, 0x20000, 0xcb98e273 ) - ROM_LOAD( "rp1-obj2.bin", 0x40000, 0x20000, 0x6ebd191e ) - ROM_LOAD( "rp1-obj3.bin", 0x60000, 0x20000, 0x7c9828a1 ) - ROM_LOAD( "rp1-obj4.bin", 0x80000, 0x20000, 0x0348220b ) - ROM_LOAD( "rp1-obj5.bin", 0xa0000, 0x10000, 0x9e2ba243 ) - ROM_LOAD( "rp1-obj6.bin", 0xc0000, 0x10000, 0x6bf2aca6 ) + ROM_LOAD( "rp1-obj0.bin", 0x00000, 0x20000, 0x1dcbf8bb ) + ROM_LOAD( "rp1-obj1.bin", 0x20000, 0x20000, 0xcb98e273 ) + ROM_LOAD( "rp1-obj2.bin", 0x40000, 0x20000, 0x6ebd191e ) + ROM_LOAD( "rp1-obj3.bin", 0x60000, 0x20000, 0x7c9828a1 ) + ROM_LOAD( "rp1-obj4.bin", 0x80000, 0x20000, 0x0348220b ) + ROM_LOAD( "rp1-obj5.bin", 0xa0000, 0x10000, 0x9e2ba243 ) + ROM_LOAD( "rp1-obj6.bin", 0xc0000, 0x10000, 0x6bf2aca6 ) +ROM_END + +/* Rompers (old version) */ +ROM_START( romperso ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "rp1-snd0.bin", 0x0c000, 0x10000, 0xc7c8d649 ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "rp1-p7.bin", 0x00000, 0x10000, 0x8d49f28a ) + ROM_LOAD_HS( "rp1-p6.bin", 0x20000, 0x10000, 0xfc183345 ) + ROM_LOAD_HS( "rp1-prg5.bin", 0x40000, 0x10000, 0x98bd4133 ) + ROM_LOAD_HS( "rp1-prg4.bin", 0x60000, 0x10000, 0x0918f06d ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "rp1-voi0.bin", 0x20000, 0x10000, 0x11caef7e ) + ROM_CONTINUE( 0x10000, 0x10000 ) + + ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ + ROM_LOAD( "rp1-chr8.bin", 0x00000, 0x10000, 0x69cfe46a ) + + ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "rp1-chr0.bin", 0x00000, 0x20000, 0x41b10ef3 ) + ROM_LOAD( "rp1-chr1.bin", 0x20000, 0x20000, 0xc18cd24e ) + ROM_LOAD( "rp1-chr2.bin", 0x40000, 0x20000, 0x6c9a3c79 ) + ROM_LOAD( "rp1-chr3.bin", 0x60000, 0x20000, 0x473aa788 ) + + ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "rp1-obj0.bin", 0x00000, 0x20000, 0x1dcbf8bb ) + ROM_LOAD( "rp1-obj1.bin", 0x20000, 0x20000, 0xcb98e273 ) + ROM_LOAD( "rp1-obj2.bin", 0x40000, 0x20000, 0x6ebd191e ) + ROM_LOAD( "rp1-obj3.bin", 0x60000, 0x20000, 0x7c9828a1 ) + ROM_LOAD( "rp1-obj4.bin", 0x80000, 0x20000, 0x0348220b ) + ROM_LOAD( "rp1-obj5.bin", 0xa0000, 0x10000, 0x9e2ba243 ) + ROM_LOAD( "rp1-obj6.bin", 0xc0000, 0x10000, 0x6bf2aca6 ) ROM_END /* Blast Off */ ROM_START( blastoff ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "bo1-snd0.bin", 0x0c000, 0x10000, 0x2ecab76e ) + ROM_LOAD( "bo1-snd1.bin", 0x1c000, 0x10000, 0x048a6af1 ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "bo1prg7b.bin", 0x10000, 0x10000, 0xb630383c ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD( "bo1-prg6.bin", 0x20000, 0x20000, 0xd60da63e ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0x70000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "bo1-voi0.bin", 0x20000, 0x10000, 0x47065e18 ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "bo1-voi1.bin", 0x30000, 0x20000, 0x0308b18e ) + ROM_LOAD( "bo1-voi2.bin", 0x50000, 0x20000, 0x88cab230 ) + + ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ + ROM_LOAD( "bo1-chr8.bin", 0x00000, 0x20000, 0xe8b5f2d4 ) + + ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "bo1-chr0.bin", 0x00000, 0x20000, 0xbdc0afb5 ) + ROM_LOAD( "bo1-chr1.bin", 0x20000, 0x20000, 0x963d2639 ) + ROM_LOAD( "bo1-chr2.bin", 0x40000, 0x20000, 0xacdb6894 ) + ROM_LOAD( "bo1-chr3.bin", 0x60000, 0x20000, 0x214ec47f ) + ROM_LOAD( "bo1-chr4.bin", 0x80000, 0x20000, 0x08397583 ) + ROM_LOAD( "bo1-chr5.bin", 0xa0000, 0x20000, 0x20402429 ) + ROM_LOAD( "bo1-chr7.bin", 0xe0000, 0x20000, 0x4c5c4603 ) + + ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "bo1-obj0.bin", 0x00000, 0x20000, 0xb3308ae7 ) + ROM_LOAD( "bo1-obj1.bin", 0x20000, 0x20000, 0xc9c93c47 ) + ROM_LOAD( "bo1-obj2.bin", 0x40000, 0x20000, 0xeef77527 ) + ROM_LOAD( "bo1-obj3.bin", 0x60000, 0x20000, 0xe3d9ed58 ) + ROM_LOAD( "bo1-obj4.bin", 0x80000, 0x20000, 0xc2c1b9cb ) +ROM_END + +/* World Stadium '89 */ +ROM_START( ws89 ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "bo1-snd0.bin", 0x0c000, 0x10000, 0x2ecab76e ) - ROM_LOAD( "bo1-snd1.bin", 0x1c000, 0x10000, 0x048a6af1 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "w89-s0.bin", 0x0c000, 0x10000, 0x52b84d5a ) + ROM_LOAD( "ws1-s1.bin", 0x1c000, 0x10000, 0x31bf74c1 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "bo1prg7b.bin", 0x10000, 0x10000, 0xb630383c ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD( "bo1-prg6.bin", 0x20000, 0x20000, 0xd60da63e ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "w89-p7.bin", 0x00000, 0x10000, 0x611ed964 ) + ROM_LOAD_HS( "w89-p2.bin", 0xa0000, 0x10000, 0x522e5441 ) + ROM_LOAD_HS( "w89-p1.bin", 0xc0000, 0x10000, 0x7ad8768f ) + ROM_LOAD_HS( "ws1-p0.bin", 0xe0000, 0x10000, 0xb0234298 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x70000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "bo1-voi0.bin", 0x20000, 0x10000, 0x47065e18 ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "bo1-voi1.bin", 0x30000, 0x20000, 0x0308b18e ) - ROM_LOAD( "bo1-voi2.bin", 0x50000, 0x20000, 0x88cab230 ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "ws1-v0.bin", 0x10000, 0x10000, 0xf6949199 ) + ROM_LOAD( "ws1-v1.bin", 0x30000, 0x20000, 0x210e2af9 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "bo1-chr8.bin", 0x00000, 0x20000, 0xe8b5f2d4 ) + ROM_LOAD( "ws1-c8.bin", 0x00000, 0x20000, 0xd1897b9b ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "bo1-chr0.bin", 0x00000, 0x20000, 0xbdc0afb5 ) - ROM_LOAD( "bo1-chr1.bin", 0x20000, 0x20000, 0x963d2639 ) - ROM_LOAD( "bo1-chr2.bin", 0x40000, 0x20000, 0xacdb6894 ) - ROM_LOAD( "bo1-chr3.bin", 0x60000, 0x20000, 0x214ec47f ) - ROM_LOAD( "bo1-chr4.bin", 0x80000, 0x20000, 0x08397583 ) - ROM_LOAD( "bo1-chr5.bin", 0xa0000, 0x20000, 0x20402429 ) - ROM_LOAD( "bo1-chr7.bin", 0xe0000, 0x20000, 0x4c5c4603 ) + ROM_LOAD( "ws1-c0.bin", 0x00000, 0x20000, 0x3e3e96b4 ) + ROM_LOAD( "ws1-c1.bin", 0x20000, 0x20000, 0x897dfbc1 ) + ROM_LOAD( "ws1-c2.bin", 0x40000, 0x20000, 0xe142527c ) + ROM_LOAD( "ws1-c3.bin", 0x60000, 0x20000, 0x907d4dc8 ) + ROM_LOAD( "ws1-c4.bin", 0x80000, 0x20000, 0xafb11e17 ) + ROM_LOAD( "ws1-c6.bin", 0xc0000, 0x20000, 0xa16a17c2 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "bo1-obj0.bin", 0x00000, 0x20000, 0xb3308ae7 ) - ROM_LOAD( "bo1-obj1.bin", 0x20000, 0x20000, 0xc9c93c47 ) - ROM_LOAD( "bo1-obj2.bin", 0x40000, 0x20000, 0xeef77527 ) - ROM_LOAD( "bo1-obj3.bin", 0x60000, 0x20000, 0xe3d9ed58 ) - ROM_LOAD( "bo1-obj4.bin", 0x80000, 0x20000, 0xc2c1b9cb ) + ROM_LOAD( "ws1-o0.bin", 0x00000, 0x20000, 0x12dc83a6 ) + ROM_LOAD( "ws1-o1.bin", 0x20000, 0x20000, 0x68290a46 ) + ROM_LOAD( "ws1-o2.bin", 0x40000, 0x20000, 0xcd5ba55d ) + ROM_LOAD_HS( "w89-o3.bin", 0x60000, 0x10000, 0x8ee76105 ) ROM_END /* Dangerous Seed */ ROM_START( dangseed ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "dr1-snd0.bin", 0x0c000, 0x20000, 0xbcbbb21d ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "dr1-snd0.bin", 0x0c000, 0x20000, 0xbcbbb21d ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "dr1-prg7.bin", 0x10000, 0x10000, 0xd7d2f653 ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD_HS( "dr1-prg6.bin", 0x20000, 0x10000, 0xcc68262b ) - ROM_LOAD( "dr1-prg5.bin", 0x40000, 0x20000, 0x7986bbdd ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "dr1-prg7.bin", 0x10000, 0x10000, 0xd7d2f653 ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD_HS( "dr1-prg6.bin", 0x20000, 0x10000, 0xcc68262b ) + ROM_LOAD( "dr1-prg5.bin", 0x40000, 0x20000, 0x7986bbdd ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "dr1-voi0.bin", 0x20000, 0x10000, 0xde4fdc0e ) - ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "dr1-voi0.bin", 0x20000, 0x10000, 0xde4fdc0e ) + ROM_CONTINUE( 0x10000, 0x10000 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "dr1-chr8.bin", 0x00000, 0x20000, 0x0fbaa10e ) + ROM_LOAD( "dr1-chr8.bin", 0x00000, 0x20000, 0x0fbaa10e ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "dr1-chr0.bin", 0x00000, 0x20000, 0x419bacc7 ) - ROM_LOAD( "dr1-chr1.bin", 0x20000, 0x20000, 0x55ce77e1 ) - ROM_LOAD( "dr1-chr2.bin", 0x40000, 0x20000, 0x6f913419 ) - ROM_LOAD( "dr1-chr3.bin", 0x60000, 0x20000, 0xfe1f1a25 ) - ROM_LOAD( "dr1-chr4.bin", 0x80000, 0x20000, 0xc34471bc ) - ROM_LOAD( "dr1-chr5.bin", 0xa0000, 0x20000, 0x715c0720 ) - ROM_LOAD( "dr1-chr6.bin", 0xc0000, 0x20000, 0x5c1b71fa ) + ROM_LOAD( "dr1-chr0.bin", 0x00000, 0x20000, 0x419bacc7 ) + ROM_LOAD( "dr1-chr1.bin", 0x20000, 0x20000, 0x55ce77e1 ) + ROM_LOAD( "dr1-chr2.bin", 0x40000, 0x20000, 0x6f913419 ) + ROM_LOAD( "dr1-chr3.bin", 0x60000, 0x20000, 0xfe1f1a25 ) + ROM_LOAD( "dr1-chr4.bin", 0x80000, 0x20000, 0xc34471bc ) + ROM_LOAD( "dr1-chr5.bin", 0xa0000, 0x20000, 0x715c0720 ) + ROM_LOAD( "dr1-chr6.bin", 0xc0000, 0x20000, 0x5c1b71fa ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "dr1-obj0.bin", 0x00000, 0x20000, 0xabb95644 ) - ROM_LOAD( "dr1-obj1.bin", 0x20000, 0x20000, 0x24d6db51 ) - ROM_LOAD( "dr1-obj2.bin", 0x40000, 0x20000, 0x7e3a78c0 ) + ROM_LOAD( "dr1-obj0.bin", 0x00000, 0x20000, 0xabb95644 ) + ROM_LOAD( "dr1-obj1.bin", 0x20000, 0x20000, 0x24d6db51 ) + ROM_LOAD( "dr1-obj2.bin", 0x40000, 0x20000, 0x7e3a78c0 ) ROM_END /* World Stadium '90 */ ROM_START( ws90 ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "wssnd-0.bin", 0x0c000, 0x10000, 0x52b84d5a ) - ROM_LOAD( "wssnd-1.bin", 0x1c000, 0x10000, 0x31bf74c1 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "w89-s0.bin", 0x0c000, 0x10000, 0x52b84d5a ) + ROM_LOAD( "ws1-s1.bin", 0x1c000, 0x10000, 0x31bf74c1 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "wsprg-7.bin", 0x00000, 0x10000, 0x37ae1b25 ) - ROM_LOAD_HS( "wsprg-2.bin", 0xa0000, 0x10000, 0xb9e98e2f ) - ROM_LOAD_HS( "wsprg-1.bin", 0xc0000, 0x10000, 0x7ad8768f ) - ROM_LOAD_HS( "wsprg-0.bin", 0xe0000, 0x10000, 0xb0234298 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "w90-p7.bin", 0x00000, 0x10000, 0x37ae1b25 ) + ROM_LOAD_HS( "w90-p2.bin", 0xa0000, 0x10000, 0xb9e98e2f ) + ROM_LOAD_HS( "w89-p1.bin", 0xc0000, 0x10000, 0x7ad8768f ) + ROM_LOAD_HS( "ws1-p0.bin", 0xe0000, 0x10000, 0xb0234298 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "wsvoi-0.bin", 0x10000, 0x10000, 0xf6949199 ) - ROM_LOAD( "wsvoi-1.bin", 0x30000, 0x20000, 0x210e2af9 ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "ws1-v0.bin", 0x10000, 0x10000, 0xf6949199 ) + ROM_LOAD( "ws1-v1.bin", 0x30000, 0x20000, 0x210e2af9 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "wschr-8.bin", 0x00000, 0x20000, 0xd1897b9b ) + ROM_LOAD( "ws1-c8.bin", 0x00000, 0x20000, 0xd1897b9b ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "wschr-0.bin", 0x00000, 0x20000, 0x3e3e96b4 ) - ROM_LOAD( "wschr-1.bin", 0x20000, 0x20000, 0x897dfbc1 ) - ROM_LOAD( "wschr-2.bin", 0x40000, 0x20000, 0xe142527c ) - ROM_LOAD( "wschr-3.bin", 0x60000, 0x20000, 0x907d4dc8 ) - ROM_LOAD( "wschr-4.bin", 0x80000, 0x20000, 0xafb11e17 ) - ROM_LOAD( "wschr-6.bin", 0xc0000, 0x20000, 0xa16a17c2 ) + ROM_LOAD( "ws1-c0.bin", 0x00000, 0x20000, 0x3e3e96b4 ) + ROM_LOAD( "ws1-c1.bin", 0x20000, 0x20000, 0x897dfbc1 ) + ROM_LOAD( "ws1-c2.bin", 0x40000, 0x20000, 0xe142527c ) + ROM_LOAD( "ws1-c3.bin", 0x60000, 0x20000, 0x907d4dc8 ) + ROM_LOAD( "ws1-c4.bin", 0x80000, 0x20000, 0xafb11e17 ) + ROM_LOAD( "ws1-c6.bin", 0xc0000, 0x20000, 0xa16a17c2 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "wsobj-0.bin", 0x00000, 0x20000, 0x12dc83a6 ) - ROM_LOAD( "wsobj-1.bin", 0x20000, 0x20000, 0x68290a46 ) - ROM_LOAD( "wsobj-2.bin", 0x40000, 0x20000, 0xcd5ba55d ) - ROM_LOAD_HS( "wsobj-3.bin", 0x60000, 0x10000, 0x7d0b8961 ) + ROM_LOAD( "ws1-o0.bin", 0x00000, 0x20000, 0x12dc83a6 ) + ROM_LOAD( "ws1-o1.bin", 0x20000, 0x20000, 0x68290a46 ) + ROM_LOAD( "ws1-o2.bin", 0x40000, 0x20000, 0xcd5ba55d ) + ROM_LOAD_HS( "w90-o3.bin", 0x60000, 0x10000, 0x7d0b8961 ) ROM_END /* Pistol Daimyo no Bouken */ ROM_START( pistoldm ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "pd1-snd0.bin", 0x0c000, 0x20000, 0x026da54e ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "pd1-snd0.bin", 0x0c000, 0x20000, 0x026da54e ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "pd1prg7b.bin", 0x10000, 0x10000, 0x7189b797 ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD( "pd1-prg0.bin", 0xe0000, 0x20000, 0x9db9b89c ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "pd1prg7b.bin", 0x10000, 0x10000, 0x7189b797 ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD( "pd1-prg0.bin", 0xe0000, 0x20000, 0x9db9b89c ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "pd-voi0.bin", 0x20000, 0x10000, 0xad1b8128 ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "pd-voi1.bin", 0x30000, 0x20000, 0x2871c494 ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "pd-voi0.bin", 0x20000, 0x10000, 0xad1b8128 ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "pd-voi1.bin", 0x30000, 0x20000, 0x2871c494 ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "pd-chr8.bin", 0x00000, 0x20000, 0xa5f516db ) + ROM_LOAD( "pd-chr8.bin", 0x00000, 0x20000, 0xa5f516db ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "pd-chr0.bin", 0x00000, 0x20000, 0xadbbaf5c ) - ROM_LOAD( "pd-chr1.bin", 0x20000, 0x20000, 0xb4e4f554 ) - ROM_LOAD( "pd-chr2.bin", 0x40000, 0x20000, 0x84592540 ) - ROM_LOAD( "pd-chr3.bin", 0x60000, 0x20000, 0x450bdaa9 ) + ROM_LOAD( "pd-chr0.bin", 0x00000, 0x20000, 0xadbbaf5c ) + ROM_LOAD( "pd-chr1.bin", 0x20000, 0x20000, 0xb4e4f554 ) + ROM_LOAD( "pd-chr2.bin", 0x40000, 0x20000, 0x84592540 ) + ROM_LOAD( "pd-chr3.bin", 0x60000, 0x20000, 0x450bdaa9 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "pd-obj0.bin", 0x00000, 0x20000, 0x7269821d ) - ROM_LOAD( "pd-obj1.bin", 0x20000, 0x20000, 0x4f9738e5 ) - ROM_LOAD( "pd-obj2.bin", 0x40000, 0x20000, 0x33208776 ) - ROM_LOAD( "pd-obj3.bin", 0x60000, 0x20000, 0x0dbd54ef ) - ROM_LOAD( "pd-obj4.bin", 0x80000, 0x20000, 0x58e838e2 ) - ROM_LOAD( "pd-obj5.bin", 0xa0000, 0x20000, 0x414f9a9d ) - ROM_LOAD( "pd-obj6.bin", 0xc0000, 0x20000, 0x91b4e6e0 ) - ROM_LOAD( "pd-obj7.bin", 0xe0000, 0x20000, 0x00d4a8f0 ) + ROM_LOAD( "pd-obj0.bin", 0x00000, 0x20000, 0x7269821d ) + ROM_LOAD( "pd-obj1.bin", 0x20000, 0x20000, 0x4f9738e5 ) + ROM_LOAD( "pd-obj2.bin", 0x40000, 0x20000, 0x33208776 ) + ROM_LOAD( "pd-obj3.bin", 0x60000, 0x20000, 0x0dbd54ef ) + ROM_LOAD( "pd-obj4.bin", 0x80000, 0x20000, 0x58e838e2 ) + ROM_LOAD( "pd-obj5.bin", 0xa0000, 0x20000, 0x414f9a9d ) + ROM_LOAD( "pd-obj6.bin", 0xc0000, 0x20000, 0x91b4e6e0 ) + ROM_LOAD( "pd-obj7.bin", 0xe0000, 0x20000, 0x00d4a8f0 ) ROM_END /* Souko Ban Deluxe */ ROM_START( soukobdx ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ + + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "sb1-snd0.bin", 0x0c000, 0x10000, 0xbf46a106 ) + + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD_HS( "sb1-prg7.bin", 0x00000, 0x10000, 0xc3bd418a ) + ROM_LOAD( "sb1-prg1.bin", 0xc0000, 0x20000, 0x5d1fdd94 ) + ROM_LOAD( "sb1-prg0.bin", 0xe0000, 0x20000, 0x8af8cb73 ) + + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD_HS( "sb1-voi0.bin", 0x10000, 0x10000, 0x63d9cedf ) + + ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ + ROM_LOAD( "sb1-chr8.bin", 0x00000, 0x10000, 0x5692b297 ) + + ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ + ROM_LOAD( "sb1-chr0.bin", 0x00000, 0x20000, 0x267f1331 ) + ROM_LOAD( "sb1-chr1.bin", 0x20000, 0x20000, 0xe5ff61ad ) + ROM_LOAD( "sb1-chr2.bin", 0x40000, 0x20000, 0x099b746b ) + ROM_LOAD( "sb1-chr3.bin", 0x60000, 0x20000, 0x1551bb7c ) + + ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_LOAD( "sb1-obj0.bin", 0x00000, 0x10000, 0xed810da4 ) +ROM_END + +/* Puzzle Club */ +ROM_START( puzlclub ) + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "sb1-snd0.bin", 0x0c000, 0x10000, 0xbf46a106 ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "pc1_s0.bin", 0x0c000, 0x10000, 0x44737c02 ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD_HS( "sb1-prg7.bin", 0x00000, 0x10000, 0xc3bd418a ) - ROM_LOAD( "sb1-prg1.bin", 0xc0000, 0x20000, 0x5d1fdd94 ) - ROM_LOAD( "sb1-prg0.bin", 0xe0000, 0x20000, 0x8af8cb73 ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "pc1_p7.bin", 0x10000, 0x10000, 0xf0638260 ) + ROM_LOAD( "pc1_p1.bin", 0xc0000, 0x10000, 0xdfd9108a ) + ROM_LOAD( "pc1_p0.bin", 0xe0000, 0x10000, 0x2db477c8 ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD_HS( "sb1-voi0.bin", 0x10000, 0x10000, 0x63d9cedf ) + ROM_REGION( 0x30000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + /* no voices */ ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "sb1-chr8.bin", 0x00000, 0x10000, 0x5692b297 ) + ROM_LOAD( "pc1-c8.bin", 0x00000, 0x20000, 0x4e196bcd ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "sb1-chr0.bin", 0x00000, 0x20000, 0x267f1331 ) - ROM_LOAD( "sb1-chr1.bin", 0x20000, 0x20000, 0xe5ff61ad ) - ROM_LOAD( "sb1-chr2.bin", 0x40000, 0x20000, 0x099b746b ) - ROM_LOAD( "sb1-chr3.bin", 0x60000, 0x20000, 0x1551bb7c ) + ROM_LOAD( "pc1-c0.bin", 0x00000, 0x20000, 0xad7b134e ) + ROM_LOAD( "pc1-c1.bin", 0x20000, 0x20000, 0x10cb3207 ) + ROM_LOAD( "pc1-c2.bin", 0x40000, 0x20000, 0xd98d2c8f ) + ROM_LOAD( "pc1-c3.bin", 0x60000, 0x20000, 0x91a61d96 ) + ROM_LOAD( "pc1-c4.bin", 0x80000, 0x20000, 0xf1c95296 ) + ROM_LOAD( "pc1-c5.bin", 0xa0000, 0x20000, 0xbc443c27 ) + ROM_LOAD( "pc1-c6.bin", 0xc0000, 0x20000, 0xec0a3dc5 ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "sb1-obj0.bin", 0x00000, 0x10000, 0xed810da4 ) + /* no sprites */ ROM_END /* Tank Force */ ROM_START( tankfrce ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "tf1-snd0.bin", 0x0c000, 0x20000, 0x4d9cf7aa ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "tf1-snd0.bin", 0x0c000, 0x20000, 0x4d9cf7aa ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "tf1prg7.bin", 0x10000, 0x10000, 0x2ec28a87 ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD( "tf1-prg1.bin", 0xc0000, 0x20000, 0x4a8bb251 ) - ROM_LOAD( "tf1-prg0.bin", 0xe0000, 0x20000, 0x2ae4b9eb ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "tf1prg7.bin", 0x10000, 0x10000, 0x2ec28a87 ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD( "tf1-prg1.bin", 0xc0000, 0x20000, 0x4a8bb251 ) + ROM_LOAD( "tf1-prg0.bin", 0xe0000, 0x20000, 0x2ae4b9eb ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "tf1-voi0.bin", 0x20000, 0x10000, 0xf542676a ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "tf1-voi1.bin", 0x30000, 0x20000, 0x615d09cd ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "tf1-voi0.bin", 0x20000, 0x10000, 0xf542676a ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "tf1-voi1.bin", 0x30000, 0x20000, 0x615d09cd ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "tf1-chr8.bin", 0x00000, 0x20000, 0x7d53b31e ) + ROM_LOAD( "tf1-chr8.bin", 0x00000, 0x20000, 0x7d53b31e ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "tf1-chr0.bin", 0x00000, 0x20000, 0x9e91794e ) - ROM_LOAD( "tf1-chr1.bin", 0x20000, 0x20000, 0x76e1bc56 ) - ROM_LOAD( "tf1-chr2.bin", 0x40000, 0x20000, 0xfcb645d9 ) - ROM_LOAD( "tf1-chr3.bin", 0x60000, 0x20000, 0xa8dbf080 ) - ROM_LOAD( "tf1-chr4.bin", 0x80000, 0x20000, 0x51fedc8c ) - ROM_LOAD( "tf1-chr5.bin", 0xa0000, 0x20000, 0xe6c6609a ) + ROM_LOAD( "tf1-chr0.bin", 0x00000, 0x20000, 0x9e91794e ) + ROM_LOAD( "tf1-chr1.bin", 0x20000, 0x20000, 0x76e1bc56 ) + ROM_LOAD( "tf1-chr2.bin", 0x40000, 0x20000, 0xfcb645d9 ) + ROM_LOAD( "tf1-chr3.bin", 0x60000, 0x20000, 0xa8dbf080 ) + ROM_LOAD( "tf1-chr4.bin", 0x80000, 0x20000, 0x51fedc8c ) + ROM_LOAD( "tf1-chr5.bin", 0xa0000, 0x20000, 0xe6c6609a ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "tf1-obj0.bin", 0x00000, 0x20000, 0x4bedd51a ) - ROM_LOAD( "tf1-obj1.bin", 0x20000, 0x20000, 0xdf674d6d ) + ROM_LOAD( "tf1-obj0.bin", 0x00000, 0x20000, 0x4bedd51a ) + ROM_LOAD( "tf1-obj1.bin", 0x20000, 0x20000, 0xdf674d6d ) ROM_END /* Tank Force (Japan) */ ROM_START( tankfrcj ) - ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for the main cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sub cpu */ /* Nothing loaded here. Bankswitching makes sure this gets the necessary code */ - ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ - ROM_LOAD( "tf1-snd0.bin", 0x0c000, 0x20000, 0x4d9cf7aa ) + ROM_REGION( 0x2c000, REGION_CPU3 ) /* 176k for the sound cpu */ + ROM_LOAD( "tf1-snd0.bin", 0x0c000, 0x20000, 0x4d9cf7aa ) - ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ - ROM_LOAD( "tf1-prg7.bin", 0x10000, 0x10000, 0x9dfa0dd5 ) - ROM_CONTINUE( 0x00000, 0x10000 ) - ROM_LOAD( "tf1-prg1.bin", 0xc0000, 0x20000, 0x4a8bb251 ) - ROM_LOAD( "tf1-prg0.bin", 0xe0000, 0x20000, 0x2ae4b9eb ) + ROM_REGION( 0x100000, REGION_USER1 ) /* 1M for ROMs */ + ROM_LOAD( "tf1-prg7.bin", 0x10000, 0x10000, 0x9dfa0dd5 ) + ROM_CONTINUE( 0x00000, 0x10000 ) + ROM_LOAD( "tf1-prg1.bin", 0xc0000, 0x20000, 0x4a8bb251 ) + ROM_LOAD( "tf1-prg0.bin", 0xe0000, 0x20000, 0x2ae4b9eb ) - ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ + ROM_REGION( 0x14000, REGION_USER2 ) /* 80k for RAM */ - ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ - ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) - ROM_LOAD( "tf1-voi0.bin", 0x20000, 0x10000, 0xf542676a ) - ROM_CONTINUE( 0x10000, 0x10000 ) - ROM_LOAD( "tf1-voi1.bin", 0x30000, 0x20000, 0x615d09cd ) + ROM_REGION( 0x50000, REGION_CPU4 ) /* the MCU & voice */ + ROM_LOAD( "ns1-mcu.bin", 0x0f000, 0x01000, 0xffb5c0bd ) + ROM_LOAD( "tf1-voi0.bin", 0x20000, 0x10000, 0xf542676a ) + ROM_CONTINUE( 0x10000, 0x10000 ) + ROM_LOAD( "tf1-voi1.bin", 0x30000, 0x20000, 0x615d09cd ) ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* character mask */ - ROM_LOAD( "tf1-chr8.bin", 0x00000, 0x20000, 0x7d53b31e ) + ROM_LOAD( "tf1-chr8.bin", 0x00000, 0x20000, 0x7d53b31e ) ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* characters */ - ROM_LOAD( "tf1-chr0.bin", 0x00000, 0x20000, 0x9e91794e ) - ROM_LOAD( "tf1-chr1.bin", 0x20000, 0x20000, 0x76e1bc56 ) - ROM_LOAD( "tf1-chr2.bin", 0x40000, 0x20000, 0xfcb645d9 ) - ROM_LOAD( "tf1-chr3.bin", 0x60000, 0x20000, 0xa8dbf080 ) - ROM_LOAD( "tf1-chr4.bin", 0x80000, 0x20000, 0x51fedc8c ) - ROM_LOAD( "tf1-chr5.bin", 0xa0000, 0x20000, 0xe6c6609a ) + ROM_LOAD( "tf1-chr0.bin", 0x00000, 0x20000, 0x9e91794e ) + ROM_LOAD( "tf1-chr1.bin", 0x20000, 0x20000, 0x76e1bc56 ) + ROM_LOAD( "tf1-chr2.bin", 0x40000, 0x20000, 0xfcb645d9 ) + ROM_LOAD( "tf1-chr3.bin", 0x60000, 0x20000, 0xa8dbf080 ) + ROM_LOAD( "tf1-chr4.bin", 0x80000, 0x20000, 0x51fedc8c ) + ROM_LOAD( "tf1-chr5.bin", 0xa0000, 0x20000, 0xe6c6609a ) ROM_REGION( 0x100000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* sprites */ - ROM_LOAD( "tf1-obj0.bin", 0x00000, 0x20000, 0x4bedd51a ) - ROM_LOAD( "tf1-obj1.bin", 0x20000, 0x20000, 0xdf674d6d ) + ROM_LOAD( "tf1-obj0.bin", 0x00000, 0x20000, 0x4bedd51a ) + ROM_LOAD( "tf1-obj1.bin", 0x20000, 0x20000, 0xdf674d6d ) ROM_END +// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME GAME( 1987, shadowld, 0, ns1, ns1, shadowld, ROT0_16BIT, "Namco", "Shadow Land" ) GAME( 1987, youkaidk, shadowld, ns1, ns1, shadowld, ROT0_16BIT, "Namco", "Yokai Douchuuki (Japan new version)" ) GAME( 1987, yokaidko, shadowld, ns1, ns1, shadowld, ROT0_16BIT, "Namco", "Yokai Douchuuki (Japan old version)" ) -GAME( 1987, dspirit, 0, ns1, ns1, dspirit, ROT270, "Namco", "Dragon Spirit (new version)" ) -GAME( 1987, dspirito, dspirit, ns1, ns1, dspirit, ROT270, "Namco", "Dragon Spirit (old version)" ) +GAME( 1987, dspirit, 0, ns1, dspirit, dspirit, ROT270, "Namco", "Dragon Spirit (new version)" ) +GAME( 1987, dspirito, dspirit, ns1, dspirit, dspirit, ROT270, "Namco", "Dragon Spirit (old version)" ) GAME( 1987, blazer, 0, ns1, ns1, blazer, ROT270, "Namco", "Blazer (Japan)" ) GAME( 1987, quester, 0, quester, quester, quester, ROT270, "Namco", "Quester (Japan)" ) GAME( 1987, pacmania, 0, ns1, ns1, pacmania, ROT90_16BIT, "Namco", "Pac-Mania" ) @@ -2087,8 +2419,8 @@ GAME( 1987, pacmanij, pacmania, ns1, ns1, pacmania, ROT270_16BIT, "Namco GAME( 1987, galaga88, 0, ns1, ns1, galaga88, ROT90_16BIT, "Namco", "Galaga '88 (set 1)" ) GAME( 1987, galag88b, galaga88, ns1, ns1, galaga88, ROT90_16BIT, "Namco", "Galaga '88 (set 2)" ) GAME( 1987, galag88j, galaga88, ns1, ns1, galaga88, ROT270_16BIT, "Namco", "Galaga '88 (Japan)" ) -//GAME( 1988, wstadium, 0, ns1, ns1, wstadium, ROT0, "Namco", "World Stadium" ) -GAMEX(1988, berabohm, 0, ns1, ns1, berabohm, ROT0, "Namco", "Beraboh Man", GAME_NOT_WORKING ) +GAME( 1988, ws, 0, ns1, ns1, ws, ROT0, "Namco", "World Stadium (Japan)" ) +GAME( 1988, berabohm, 0, ns1, berabohm,berabohm, ROT0_16BIT, "Namco", "Beraboh Man (Japan)" ) //GAME( 1988, alice, 0, ns1, ns1, alice, ROT0_16BIT, "Namco", "Alice In Wonderland" ) GAME( 1988, mmaze, 0, ns1, ns1, alice, ROT0_16BIT, "Namco", "Marchen Maze (Japan)" ) GAMEX(1988, bakutotu, 0, ns1, ns1, bakutotu, ROT0, "Namco", "Bakutotsu Kijuutei", GAME_NOT_WORKING ) @@ -2096,11 +2428,13 @@ GAME( 1988, wldcourt, 0, ns1, ns1, wldcourt, ROT0, "Namco GAME( 1988, splatter, 0, ns1, ns1, splatter, ROT0_16BIT, "Namco", "Splatter House (Japan)" ) GAME( 1988, faceoff, 0, faceoff, faceoff, faceoff, ROT0, "Namco", "Face Off (Japan)" ) GAME( 1989, rompers, 0, ns1, ns1, rompers, ROT270_16BIT, "Namco", "Rompers (Japan)" ) +GAME( 1989, romperso, rompers, ns1, ns1, rompers, ROT270_16BIT, "Namco", "Rompers (Japan old version)" ) GAME( 1989, blastoff, 0, ns1, ns1, blastoff, ROT270, "Namco", "Blast Off (Japan)" ) -//GAME( 1989, ws89, 0, ns1, ns1, ws89, ROT0, "Namco", "World Stadium 89" ) +GAME( 1989, ws89, ws, ns1, ns1, ws89, ROT0, "Namco", "World Stadium '89 (Japan)" ) GAME( 1989, dangseed, 0, ns1, ns1, dangseed, ROT270_16BIT, "Namco", "Dangerous Seed (Japan)" ) -GAME( 1990, ws90, 0, ns1, ns1, ws90, ROT0, "Namco", "World Stadium 90 (Japan)" ) +GAME( 1990, ws90, ws, ns1, ns1, ws90, ROT0, "Namco", "World Stadium '90 (Japan)" ) GAME( 1990, pistoldm, 0, ns1, ns1, pistoldm, ROT180, "Namco", "Pistol Daimyo no Bouken (Japan)" ) GAME( 1990, soukobdx, 0, ns1, ns1, soukobdx, ROT180_16BIT, "Namco", "Souko Ban Deluxe (Japan)" ) +GAME( 1990, puzlclub, 0, ns1, ns1, puzlclub, ROT270, "Namco", "Puzzle Club (Japan prototype)" ) GAME( 1991, tankfrce, 0, ns1, ns1, tankfrce, ROT180, "Namco", "Tank Force (US)" ) GAME( 1991, tankfrcj, tankfrce, ns1, ns1, tankfrce, ROT180, "Namco", "Tank Force (Japan)" ) diff --git a/src/drivers/namcos2.c b/src/drivers/namcos2.c index a70757af7..955427e82 100644 --- a/src/drivers/namcos2.c +++ b/src/drivers/namcos2.c @@ -14,18 +14,19 @@ The system is extremely powerful and flexible. A standard CPU board is coupled with a number of different graphics boards to produce a system. + CPU Board details ================= CPU BOARD - Master/Slave CPU, Sound CPU, I/O CPU, Serial I/F CPU - Text/Scrolling layer generation and video pixel generator. - Sound Generation. + Text/Scrolling layer generation and video pixel generator. + Sound Generation. -CPU1 - Master CPU (68K) -CPU2 - Slave CPU (68K) -CPU3 - Sound/IO engine (6809) -CPU4 - IO Microcontroller (63705) Dips/input ports -CPU5 - Serial I/F Controller (??? - Not emulated) +CPU1 - Master CPU (68K) +CPU2 - Slave CPU (68K) +CPU3 - Sound/IO engine (6809) +CPU4 - IO Microcontroller (63705) Dips/input ports +CPU5 - Serial I/F Controller (??? - Not emulated) The 4 CPU's are all connected via a central 2KByte dual port SRAM. The two 68000s are on one side and the 6809/63705 are on the other side. @@ -36,9 +37,9 @@ logic sits. So far only 1 CPU board variant has been identified, unlike the GFX board... -All sound circuitry is containe don the CPU board, it consists of: - YM2151 - C140 (24 Channel Stereo PCM Sample player) +All sound circuitry is contained on the CPU board, it consists of: + YM2151 + C140 (24 Channel Stereo PCM Sample player) The CPU board also contains the frame timing and video image generation circuitry along with text/scroll planes and the palette generator. The system @@ -57,9 +58,9 @@ plane also has its own priority level. The video image generator receives a pixel stream from the graphics board which contains: - PEN NUMBER - COLOUR BANK - PIXEL PRIORITY + PEN NUMBER + COLOUR BANK + PIXEL PRIORITY This stream is then combined with the stream from the text plane pixel generator with the highest priority pixel being displayed on screen. @@ -73,20 +74,22 @@ unique capabilities and separate memory map definition. The PCB outputs a pixel stream to the main PCB board via one of the system connectors. - Standard Namco System 2 - 1 x Rotate/Zoom tile plane (256x256 tiles) - 128 Sprites (128 Sprites displayable, but 16 banks of 128 sprites) + Standard Namco System 2 + 1 x Rotate/Zoom tile plane (256x256 tiles) + 128 Sprites (128 Sprites displayable, but 16 banks of 128 sprites) - Metal Hawk - 2 x Rotate/Zoom tile planes (256x256 tiles) - ??? Sprites + Metal Hawk + 2 x Rotate/Zoom tile planes (256x256 tiles) + ??? Sprites - Steel Gunner 2 - Capabilities unknown at this time + Steel Gunner 2 + Capabilities unknown at this time - Final Lap (1/2/3) - Not sure at this time if it has a different board but it is accessing - some locations not seen before (i.e $a00000 for the key chip) + Final Lap (1/2/3) + The Racing games definately have a different GFX board to the standard + one. The sprite tile layout is differnet and the GFX board has a + separate roadway generator chip. The tiles for the roadway are all held + in RAM on on the GFX board. @@ -99,239 +102,238 @@ decoding pal from the Cosmo Gang board. ############################################################# -# # -# MASTER 68000 PRIVATE MEMORY AREA (MAIN PCB) # -# # +# # +# MASTER 68000 PRIVATE MEMORY AREA (MAIN PCB) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# -Program ROM 000000-03FFFF R D00-D15 - -Program RAM 100000-10FFFF R/W D00-D15 - -EEPROM 180000-183FFF R/W D00-D07 - -Interrupt Controller C148 1C0000-1FFFFF R/W D00-D02 - ???????? 1C0XXX - ???????? 1C2XXX - ???????? 1C4XXX - Master/Slave IRQ level 1C6XXX D00-D02 - EXIRQ level 1C8XXX D00-D02 - POSIRQ level 1CAXXX D00-D02 - SCIRQ level 1CCXXX D00-D02 - VBLANK IRQ level 1CEXXX D00-D02 - ???????? 1D0XXX - Acknowlegde Master/Slave IRQ 1D6XXX - Acknowledge EXIRQ 1D8XXX - Acknowledge POSIRQ 1DAXXX - Acknowledge SCIRQ 1DCXXX - Acknowledge VLANK IRQ 1DEXXX - EEPROM Ready status 1E0XXX R D01 - Sound CPU Reset control 1E2XXX W D01 - Slave 68000 & IO CPU Reset 1E4XXX W D01 - Watchdog reset kicker 1E6XXX W +Program ROM 000000-03FFFF R D00-D15 + +Program RAM 100000-10FFFF R/W D00-D15 + +EEPROM 180000-183FFF R/W D00-D07 + +Interrupt Controller C148 1C0000-1FFFFF R/W D00-D02 + ???????? 1C0XXX + ???????? 1C2XXX + ???????? 1C4XXX + Master/Slave IRQ level 1C6XXX D00-D02 + EXIRQ level 1C8XXX D00-D02 + POSIRQ level 1CAXXX D00-D02 + SCIRQ level 1CCXXX D00-D02 + VBLANK IRQ level 1CEXXX D00-D02 + ???????? 1D0XXX + Acknowlegde Master/Slave IRQ 1D6XXX + Acknowledge EXIRQ 1D8XXX + Acknowledge POSIRQ 1DAXXX + Acknowledge SCIRQ 1DCXXX + Acknowledge VBLANK IRQ 1DEXXX + EEPROM Ready status 1E0XXX R D01 + Sound CPU Reset control 1E2XXX W D01 + Slave 68000 & IO CPU Reset 1E4XXX W D01 + Watchdog reset kicker 1E6XXX W ############################################################# -# # -# SLAVE 68000 PRIVATE MEMORY AREA (MAIN PCB) # -# # +# # +# SLAVE 68000 PRIVATE MEMORY AREA (MAIN PCB) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# -Program ROM 000000-03FFFF R D00-D15 - -Program RAM 100000-10FFFF R/W D00-D15 +Program ROM 000000-03FFFF R D00-D15 -EEPROM 180000-183FFF R/W D00-D07 +Program RAM 100000-10FFFF R/W D00-D15 -Interrupt Controller C148 1C0000-1FFFFF R/W D00-D02 - ???????? 1C0XXX - ???????? 1C2XXX - ???????? 1C4XXX - Master/Slave IRQ level 1C6XXX D00-D02 - EXIRQ level 1C8XXX D00-D02 - POSIRQ level 1CAXXX D00-D02 - SCIRQ level 1CCXXX D00-D02 - VBLANK IRQ level 1CEXXX D00-D02 - ???????? 1D0XXX - Acknowlegde Master/Slave IRQ 1D6XXX - Acknowledge EXIRQ 1D8XXX - Acknowledge POSIRQ 1DAXXX - Acknowledge SCIRQ 1DCXXX - Acknowledge VLANK IRQ 1DEXXX - Watchdog reset kicker 1E6XXX W +Interrupt Controller C148 1C0000-1FFFFF R/W D00-D02 + ???????? 1C0XXX + ???????? 1C2XXX + ???????? 1C4XXX + Master/Slave IRQ level 1C6XXX D00-D02 + EXIRQ level 1C8XXX D00-D02 + POSIRQ level 1CAXXX D00-D02 + SCIRQ level 1CCXXX D00-D02 + VBLANK IRQ level 1CEXXX D00-D02 + ???????? 1D0XXX + Acknowlegde Master/Slave IRQ 1D6XXX + Acknowledge EXIRQ 1D8XXX + Acknowledge POSIRQ 1DAXXX + Acknowledge SCIRQ 1DCXXX + Acknowledge VBLANK IRQ 1DEXXX + Watchdog reset kicker 1E6XXX W ############################################################# -# # -# SHARED 68000 MEMORY AREA (MAIN PCB) # -# # +# # +# SHARED 68000 MEMORY AREA (MAIN PCB) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# -Data ROMS 0-1 200000-2FFFFF R D00-D15 +Data ROMS 0-1 200000-2FFFFF R D00-D15 -Data ROMS 2-3 300000-3FFFFF R D00-D15 +Data ROMS 2-3 300000-3FFFFF R D00-D15 -Screen memory for text planes 400000-41FFFF R/W D00-D15 +Screen memory for text planes 400000-41FFFF R/W D00-D15 -Screen control registers 420000-43FFFF R/W D00-D15 +Screen control registers 420000-43FFFF R/W D00-D15 - Scroll plane 0 - X offset 42XX02 W D00-D11 - Scroll plane 0 - X flip 42XX02 W D15 + Scroll plane 0 - X offset 42XX02 W D00-D11 + Scroll plane 0 - X flip 42XX02 W D15 - ?????? 42XX04 W D14-D15 + ?????? 42XX04 W D14-D15 - Scroll plane 0 - Y offset 42XX06 W D00-D11 - Scroll plane 0 - Y flip 42XX06 W D15 + Scroll plane 0 - Y offset 42XX06 W D00-D11 + Scroll plane 0 - Y flip 42XX06 W D15 - ?????? 42XX08 W D14-D15 + ?????? 42XX08 W D14-D15 - Scroll plane 1 - X offset 42XX0A W D00-D11 - Scroll plane 1 - X flip 42XX0A W D15 + Scroll plane 1 - X offset 42XX0A W D00-D11 + Scroll plane 1 - X flip 42XX0A W D15 - ?????? 42XX0C W D14-D15 + ?????? 42XX0C W D14-D15 - Scroll plane 1 - Y offset 42XX0E W D00-D11 - Scroll plane 1 - Y flip 42XX0E W D15 + Scroll plane 1 - Y offset 42XX0E W D00-D11 + Scroll plane 1 - Y flip 42XX0E W D15 - ?????? 42XX10 W D14-D15 + ?????? 42XX10 W D14-D15 - Scroll plane 2 - X offset 42XX12 W D00-D11 - Scroll plane 2 - X flip 42XX12 W D15 + Scroll plane 2 - X offset 42XX12 W D00-D11 + Scroll plane 2 - X flip 42XX12 W D15 - ?????? 42XX14 W D14-D15 + ?????? 42XX14 W D14-D15 - Scroll plane 2 - Y offset 42XX16 W D00-D11 - Scroll plane 2 - Y flip 42XX16 W D15 + Scroll plane 2 - Y offset 42XX16 W D00-D11 + Scroll plane 2 - Y flip 42XX16 W D15 - ?????? 42XX18 W D14-D15 + ?????? 42XX18 W D14-D15 - Scroll plane 3 - X offset 42XX1A W D00-D11 - Scroll plane 3 - X flip 42XX1A W D15 + Scroll plane 3 - X offset 42XX1A W D00-D11 + Scroll plane 3 - X flip 42XX1A W D15 - ?????? 42XX1C W D14-D15 + ?????? 42XX1C W D14-D15 - Scroll plane 3 - Y offset 42XX1E W D00-D11 - Scroll plane 3 - Y flip 42XX1E W D15 + Scroll plane 3 - Y offset 42XX1E W D00-D11 + Scroll plane 3 - Y flip 42XX1E W D15 - Scroll plane 0 priority 42XX20 W D00-D02 - Scroll plane 1 priority 42XX22 W D00-D02 - Scroll plane 2 priority 42XX24 W D00-D02 - Scroll plane 3 priority 42XX26 W D00-D02 - Text plane 0 priority 42XX28 W D00-D02 - Text plane 1 priority 42XX2A W D00-D02 + Scroll plane 0 priority 42XX20 W D00-D02 + Scroll plane 1 priority 42XX22 W D00-D02 + Scroll plane 2 priority 42XX24 W D00-D02 + Scroll plane 3 priority 42XX26 W D00-D02 + Text plane 0 priority 42XX28 W D00-D02 + Text plane 1 priority 42XX2A W D00-D02 - Scroll plane 0 colour 42XX30 W D00-D03 - Scroll plane 1 colour 42XX32 W D00-D03 - Scroll plane 2 colour 42XX34 W D00-D03 - Scroll plane 3 colour 42XX36 W D00-D03 - Text plane 0 colour 42XX38 W D00-D03 - Text plane 1 colour 42XX3A W D00-D03 + Scroll plane 0 colour 42XX30 W D00-D03 + Scroll plane 1 colour 42XX32 W D00-D03 + Scroll plane 2 colour 42XX34 W D00-D03 + Scroll plane 3 colour 42XX36 W D00-D03 + Text plane 0 colour 42XX38 W D00-D03 + Text plane 1 colour 42XX3A W D00-D03 -Screen palette control/data 440000-45FFFF R/W D00-D16 - RED ROZ/Sprite pens 8x256 440000-440FFF - GREEN 441000-441FFF - BLUE 442000-442FFF - Control registers 443000-44300F R/W D00-D16 - RED ROZ/Sprite pens 8x256 444000-444FFF - GREEN 445000-445FFF - BLUE 446000-446FFF - 447000-447FFF - RED Text plane pens 8x256 448000-448FFF - GREEN 449000-449FFF - BLUE 44A000-44AFFF - 44B000-44BFFF - RED Unused pens 8x256 44C000-44CFFF - GREEN 44D000-44DFFF - BLUE 44E000-44EFFF +Screen palette control/data 440000-45FFFF R/W D00-D15 + RED ROZ/Sprite pens 8x256 440000-440FFF + GREEN 441000-441FFF + BLUE 442000-442FFF + Control registers 443000-44300F R/W D00-D15 + RED ROZ/Sprite pens 8x256 444000-444FFF + GREEN 445000-445FFF + BLUE 446000-446FFF + 447000-447FFF + RED Text plane pens 8x256 448000-448FFF + GREEN 449000-449FFF + BLUE 44A000-44AFFF + 44B000-44BFFF + RED Unused pens 8x256 44C000-44CFFF + GREEN 44D000-44DFFF + BLUE 44E000-44EFFF -Dual port memory 460000-47FFFF R/W D00-D07 +Dual port memory 460000-47FFFF R/W D00-D07 -Serial comms processor 480000-49FFFF +Serial comms processor 480000-49FFFF -Serial comms processor - Data 4A0000-4BFFFF +Serial comms processor - Data 4A0000-4BFFFF -Mystery ram (Only used by F-Lap) 880000-88FFFF R/W D00-D15 ############################################################# -# # -# SHARED 68000 MEMORY AREA (GFX PCB) # -# (STANDARD NAMCO SYSTEM 2 BOARD) # -# # +# # +# SHARED 68000 MEMORY AREA (GFX PCB) # +# (STANDARD NAMCO SYSTEM 2 BOARD) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# Sprite RAM - 16 banks x 128 spr. C00000-C03FFF R/W D00-D15 -Sprite bank select C40000 W D00-D03 -Rotate colour bank select W D08-D11 -Rotate priority level W D12-D14 +Sprite bank select C40000 W D00-D03 +Rotate colour bank select W D08-D11 +Rotate priority level W D12-D14 -Rotate/Zoom RAM (ROZ) C80000-CBFFFF R/W D00-D15 +Rotate/Zoom RAM (ROZ) C80000-CBFFFF R/W D00-D15 -Rotate/Zoom - Down dy (8:8) CC0000 R/W D00-D15 -Rotate/Zoom - Right dy (8.8) CC0002 R/W D00-D15 -Rotate/Zoom - Down dx (8.8) CC0004 R/W D00-D15 -Rotate/Zoom - Right dx (8.8) CC0006 R/W D00-D15 -Rotate/Zoom - Start Ypos (12.4) CC0008 R/W D00-D15 -Rotate/Zoom - Start Xpos (12.4) CC000A R/W D00-D15 -Rotate/Zoom control CC000E R/W D00-D15 +Rotate/Zoom - Down dy (8:8) CC0000 R/W D00-D15 +Rotate/Zoom - Right dy (8.8) CC0002 R/W D00-D15 +Rotate/Zoom - Down dx (8.8) CC0004 R/W D00-D15 +Rotate/Zoom - Right dx (8.8) CC0006 R/W D00-D15 +Rotate/Zoom - Start Ypos (12.4) CC0008 R/W D00-D15 +Rotate/Zoom - Start Xpos (12.4) CC000A R/W D00-D15 +Rotate/Zoom control CC000E R/W D00-D15 -Key generator/Security device D00000-D0000F R/W D00-D15 +Key generator/Security device D00000-D0000F R/W D00-D15 ############################################################# -# # -# SHARED 68000 MEMORY AREA (GFX PCB) # -# (METAL HAWK PCB - DUAL ROZ PLANES) # -# # +# # +# SHARED 68000 MEMORY AREA (GFX PCB) # +# (METAL HAWK PCB - DUAL ROZ PLANES) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# Sprite RAM - 16 banks x 128 spr. C00000-C03FFF R/W D00-D15 -Rotate/Zoom RAM (ROZ1) C40000-C47FFF R/W D00-D15 +Rotate/Zoom RAM (ROZ1) C40000-C47FFF R/W D00-D15 -Rotate/Zoom RAM (ROZ2) C48000-C4FFFF R/W D00-D15 +Rotate/Zoom RAM (ROZ2) C48000-C4FFFF R/W D00-D15 -Rotate/Zoom1 - Down dy (8:8) D00000 R/W D00-D15 -Rotate/Zoom1 - Right dy (8.8) D00002 R/W D00-D15 -Rotate/Zoom1 - Down dx (8.8) D00004 R/W D00-D15 -Rotate/Zoom1 - Right dx (8.8) D00006 R/W D00-D15 -Rotate/Zoom1 - Start Ypos (12.4) DC0008 R/W D00-D15 -Rotate/Zoom1 - Start Xpos (12.4) D0000A R/W D00-D15 -Rotate/Zoom1 - control D0000E R/W D00-D15 +Rotate/Zoom1 - Down dy (8:8) D00000 R/W D00-D15 +Rotate/Zoom1 - Right dy (8.8) D00002 R/W D00-D15 +Rotate/Zoom1 - Down dx (8.8) D00004 R/W D00-D15 +Rotate/Zoom1 - Right dx (8.8) D00006 R/W D00-D15 +Rotate/Zoom1 - Start Ypos (12.4) D00008 R/W D00-D15 +Rotate/Zoom1 - Start Xpos (12.4) D0000A R/W D00-D15 +Rotate/Zoom1 - control D0000E R/W D00-D15 -Rotate/Zoom2 - Down dy (8:8) D00010 R/W D00-D15 -Rotate/Zoom2 - Right dy (8.8) D00012 R/W D00-D15 -Rotate/Zoom2 - Down dx (8.8) D00014 R/W D00-D15 -Rotate/Zoom2 - Right dx (8.8) D00016 R/W D00-D15 -Rotate/Zoom2 - Start Ypos (12.4) DC0018 R/W D00-D15 -Rotate/Zoom2 - Start Xpos (12.4) D0001A R/W D00-D15 -Rotate/Zoom2 - control D0001E R/W D00-D15 +Rotate/Zoom2 - Down dy (8:8) D00010 R/W D00-D15 +Rotate/Zoom2 - Right dy (8.8) D00012 R/W D00-D15 +Rotate/Zoom2 - Down dx (8.8) D00014 R/W D00-D15 +Rotate/Zoom2 - Right dx (8.8) D00016 R/W D00-D15 +Rotate/Zoom2 - Start Ypos (12.4) D00018 R/W D00-D15 +Rotate/Zoom2 - Start Xpos (12.4) D0001A R/W D00-D15 +Rotate/Zoom2 - control D0001E R/W D00-D15 + +Sprite bank select ? E00000 W D00-D15 ############################################################# -# # -# SHARED 68000 MEMORY AREA (GFX PCB) # -# (FINAL LAP PCB) # -# # +# # +# SHARED 68000 MEMORY AREA (GFX PCB) # +# (FINAL LAP PCB) # +# # ############################################################# -# Function Address R/W DATA # +# Function Address R/W DATA # ############################################################# Sprite RAM - ?? banks x ??? spr. 800000-80FFFF R/W D00-D15 -Sprite bank select ? 840000 W D00-D15 -Road RAM for tile layout 880000-88FFFF R/W D00-D15 -Road RAM for tiles gfx data 890000-897FFF R/W D00-D15 -Road Generator controls 89F000-89FFFF R/W D00-D15 -Key generator/Security device A00000-A0000F R/W D00-D15 +Sprite bank select ? 840000 W D00-D15 +Road RAM for tile layout 880000-88FFFF R/W D00-D15 +Road RAM for tiles gfx data 890000-897FFF R/W D00-D15 +Road Generator controls 89F000-89FFFF R/W D00-D15 +Key generator/Security device A00000-A0000F R/W D00-D15 @@ -352,19 +354,19 @@ Reset output Watchdog -C148pin Master CPU Slave CPU +C148pin Master CPU Slave CPU ------------------------------------- -YBNK VBLANK VBLANK -IRQ4 SCIRQ SCIRQ (Serial comms IC Interrupt) -IRQ3 POSIRQ POSIRQ (Comes from C116, pixel generator, Position interrup ?? line based ??) -IRQ2 EXIRQ EXIRQ (Goes to video board but does not appear to be connected) -IRQ1 SCPUIRQ MCPUIRQ (Master/Slave interrupts) +YBNK VBLANK VBLANK +IRQ4 SCIRQ SCIRQ (Serial comms IC Interrupt) +IRQ3 POSIRQ POSIRQ (Comes from C116, pixel generator, Position interrup ?? line based ??) +IRQ2 EXIRQ EXIRQ (Goes to video board but does not appear to be connected) +IRQ1 SCPUIRQ MCPUIRQ (Master/Slave interrupts) -OP0 SSRES (Sound CPU reset - 6809 only) +OP0 SSRES (Sound CPU reset - 6809 only) OP1 OP2 -IP0 EEPROM BUSY +IP0 EEPROM BUSY IP1 IP2 @@ -382,12 +384,12 @@ This chip is based on the graphics board. $d00000 $d00002 -$d00004 Write 13 x $0000, read back $00bd from $d00002 (burnf) -$d00006 Write $b929, read $014a (cosmog) -$d00008 Write $13ec, read $013f (rthun2) -$d0000a Write $f00f, read $f00f (phelios) -$d0000c Write $8fc8, read $00b2 (rthun2) -$d0000e Write $31ad, read $00bd (burnf) +$d00004 Write 13 x $0000, read back $00bd from $d00002 (burnf) +$d00006 Write $b929, read $014a (cosmog) +$d00008 Write $13ec, read $013f (rthun2) +$d0000a Write $f00f, read $f00f (phelios) +$d0000c Write $8fc8, read $00b2 (rthun2) +$d0000e Write $31ad, read $00bd (burnf) Palette @@ -397,14 +399,14 @@ Palette Ram test does: -$440000-$442fff Object ??? -$444000-$446fff Char ??? -$448000-$44afff Roz ??? +$440000-$442fff Object ??? +$444000-$446fff Char ??? +$448000-$44afff Roz ??? $44c000-$44efff -$448000-$4487ff Red?? -$448800-$448fff Green?? -$449000-$4497ff Blue?? +$448000-$4487ff Red?? +$448800-$448fff Green?? +$449000-$4497ff Blue?? @@ -437,514 +439,627 @@ are done at $a00000 as opposed to $d00000 on a standard board. Similar /*************************************************************/ -/* SHARED 68000 CPU Memory declarations */ +/* SHARED 68000 CPU Memory declarations */ /*************************************************************/ -// ROM0 = $200000-$2fffff -// ROM1 = $300000-$3fffff -// SCR = $400000-$41ffff -// SCRDT = $420000-$43ffff -// PALET = $440000-$45ffff -// DPCS = $460000-$47ffff -// SCOM = $480000-$49ffff -// SCOMDT = $4a0000-$4bffff +// ROM0 = $200000-$2fffff +// ROM1 = $300000-$3fffff +// SCR = $400000-$41ffff +// SCRDT = $420000-$43ffff +// PALET = $440000-$45ffff +// DPCS = $460000-$47ffff +// SCOM = $480000-$49ffff +// SCOMDT = $4a0000-$4bffff // 0xc00000 ONWARDS are unverified memory locations on the video board #define NAMCOS2_68K_DEFAULT_CPU_BOARD_READ \ - { 0x200000, 0x3fffff, namcos2_68k_data_rom_r },\ - { 0x400000, 0x41ffff, namcos2_68k_vram_r },\ - { 0x420000, 0x43ffff, namcos2_68k_vram_ctrl_r }, \ - { 0x440000, 0x45ffff, namcos2_68k_video_palette_r }, \ - { 0x460000, 0x47ffff, namcos2_68k_dpram_word_r }, \ - { 0x480000, 0x49ffff, namcos2_68k_serial_comms_ram_r }, \ - { 0x4a0000, 0x4bffff, namcos2_68k_serial_comms_ctrl_r }, + { 0x200000, 0x3fffff, namcos2_68k_data_rom_r },\ + { 0x400000, 0x41ffff, namcos2_68k_vram_r },\ + { 0x420000, 0x43ffff, namcos2_68k_vram_ctrl_r }, \ + { 0x440000, 0x45ffff, namcos2_68k_video_palette_r }, \ + { 0x460000, 0x47ffff, namcos2_68k_dpram_word_r }, \ + { 0x480000, 0x49ffff, namcos2_68k_serial_comms_ram_r }, \ + { 0x4a0000, 0x4bffff, namcos2_68k_serial_comms_ctrl_r }, #define NAMCOS2_68K_DEFAULT_GFX_BOARD_READ \ -/* { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_r }, CANNOT READ BACK - DEBUG ONLY */ \ -/* { 0xc40000, 0xc47fff, namcos2_68k_sprite_bank_r }, CANNOT READ BACK - DEBUG ONLY */ \ - { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_r }, \ - { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_r }, \ - { 0xd00000, 0xd0000f, namcos2_68k_key_r }, +/* { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_r }, CANNOT READ BACK - DEBUG ONLY */ \ +/* { 0xc40000, 0xc4ffff, namcos2_68k_sprite_bank_r }, CANNOT READ BACK - DEBUG ONLY */ \ + { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_r }, \ + { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_r }, \ + { 0xd00000, 0xd0000f, namcos2_68k_key_r }, #define NAMCOS2_68K_FINALLAP_GFX_BOARD_READ \ - { 0x800000, 0x80ffff, namcos2_68k_sprite_ram_r }, /* CANNOT READ BACK - DEBUG ONLY */ \ - { 0x840000, 0x84ffff, namcos2_68k_sprite_bank_r }, /* CANNOT READ BACK - DEBUG ONLY */ \ - { 0x880000, 0x89ffff, namcos2_68k_roadtile_ram_r }, \ - { 0x890000, 0x897fff, namcos2_68k_roadgfx_ram_r }, \ - { 0x89f000, 0x89ffff, namcos2_68k_road_ctrl_r }, + { 0x800000, 0x80ffff, namcos2_68k_sprite_ram_r }, /* CANNOT READ BACK - DEBUG ONLY */ \ + { 0x840000, 0x84ffff, namcos2_68k_sprite_bank_r }, /* CANNOT READ BACK - DEBUG ONLY */ \ + { 0x880000, 0x89ffff, namcos2_68k_roadtile_ram_r }, \ + { 0x890000, 0x897fff, namcos2_68k_roadgfx_ram_r }, \ + { 0x89f000, 0x89ffff, namcos2_68k_road_ctrl_r }, + +#define NAMCOS2_68K_METLHAWK_GFX_BOARD_READ \ +/* { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_r }, CANNOT READ BACK - DEBUG ONLY */ \ + { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_r }, \ + { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_r }, \ + { 0xc40000, 0xc47fff, MRA_RAM }, /* ROZ 1 RAM */ \ + { 0xc48000, 0xc4ffff, MRA_RAM }, /* ROZ 2 RAM */ \ + { 0xd00000, 0xd0000f, MRA_RAM }, /* ROZ 1 CTL */ \ + { 0xd00010, 0xd0001f, MRA_RAM }, /* ROZ 2 CTL */ \ +/* { 0xe00000, 0xe0ffff, namcos2_68k_sprite_bank_r }, CANNOT READ BACK - DEBUG ONLY */ #define NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE \ - { 0x400000, 0x41ffff, namcos2_68k_vram_w, &videoram, &namcos2_68k_vram_size },\ - { 0x420000, 0x43ffff, namcos2_68k_vram_ctrl_w }, \ - { 0x440000, 0x45ffff, namcos2_68k_video_palette_w, &namcos2_68k_palette_ram, &namcos2_68k_palette_size }, \ - { 0x460000, 0x47ffff, namcos2_68k_dpram_word_w }, \ - { 0x480000, 0x49ffff, namcos2_68k_serial_comms_ram_w }, \ - { 0x4a0000, 0x4bffff, namcos2_68k_serial_comms_ctrl_w }, + { 0x400000, 0x41ffff, namcos2_68k_vram_w, &videoram, &namcos2_68k_vram_size },\ + { 0x420000, 0x43ffff, namcos2_68k_vram_ctrl_w }, \ + { 0x440000, 0x45ffff, namcos2_68k_video_palette_w, &namcos2_68k_palette_ram, &namcos2_68k_palette_size }, \ + { 0x460000, 0x47ffff, namcos2_68k_dpram_word_w }, \ + { 0x480000, 0x49ffff, namcos2_68k_serial_comms_ram_w }, \ + { 0x4a0000, 0x4bffff, namcos2_68k_serial_comms_ctrl_w }, #define NAMCOS2_68K_DEFAULT_GFX_BOARD_WRITE \ - { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_w }, \ - { 0xc40000, 0xc7ffff, namcos2_68k_sprite_bank_w }, \ - { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_w, &namcos2_68k_roz_ram, &namcos2_68k_roz_ram_size }, \ - { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_w }, \ - { 0xd00000, 0xd0000f, namcos2_68k_key_w }, + { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_w }, \ + { 0xc40000, 0xc4ffff, namcos2_68k_sprite_bank_w }, \ + { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_w, &namcos2_68k_roz_ram, &namcos2_68k_roz_ram_size }, \ + { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_w }, \ + { 0xd00000, 0xd0000f, namcos2_68k_key_w }, #define NAMCOS2_68K_FINALLAP_GFX_BOARD_WRITE \ - { 0x800000, 0x80ffff, namcos2_68k_sprite_ram_w }, \ - { 0x840000, 0x84ffff, namcos2_68k_sprite_bank_w }, \ - { 0x880000, 0x89ffff, namcos2_68k_roadtile_ram_w, &namcos2_68k_roadtile_ram, &namcos2_68k_roadtile_ram_size }, \ - { 0x890000, 0x897fff, namcos2_68k_roadgfx_ram_w, &namcos2_68k_roadgfx_ram, &namcos2_68k_roadgfx_ram_size }, \ - { 0x89f000, 0x89ffff, namcos2_68k_road_ctrl_w }, + { 0x800000, 0x80ffff, namcos2_68k_sprite_ram_w }, \ + { 0x840000, 0x84ffff, namcos2_68k_sprite_bank_w }, \ + { 0x880000, 0x89ffff, namcos2_68k_roadtile_ram_w, &namcos2_68k_roadtile_ram, &namcos2_68k_roadtile_ram_size }, \ + { 0x890000, 0x897fff, namcos2_68k_roadgfx_ram_w, &namcos2_68k_roadgfx_ram, &namcos2_68k_roadgfx_ram_size }, \ + { 0x89f000, 0x89ffff, namcos2_68k_road_ctrl_w }, + +#define NAMCOS2_68K_METLHAWK_GFX_BOARD_WRITE \ + { 0xc00000, 0xc03fff, namcos2_68k_sprite_ram_w }, \ + { 0xc80000, 0xcbffff, namcos2_68k_roz_ram_w, &namcos2_68k_roz_ram, &namcos2_68k_roz_ram_size }, \ + { 0xcc0000, 0xcc000f, namcos2_68k_roz_ctrl_w }, \ + { 0xc40000, 0xc47fff, MWA_RAM }, /* ROZ 1 RAM */ \ + { 0xc48000, 0xc4ffff, MWA_RAM }, /* ROZ 2 RAM */ \ + { 0xd00000, 0xd0000f, MWA_RAM }, /* ROZ 1 CTL */ \ + { 0xd00010, 0xd0001f, MWA_RAM }, /* ROZ 2 CTL */ \ + { 0xe00000, 0xe0ffff, namcos2_68k_sprite_bank_w }, /*************************************************************/ -/* MASTER 68000 CPU Memory declarations */ +/* MASTER 68000 CPU Memory declarations */ /*************************************************************/ static struct MemoryReadAddress readmem_master_default[] = { - { 0x000000, 0x03ffff, MRA_ROM }, - { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_R }, - { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_R }, - { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_r }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_READ - NAMCOS2_68K_DEFAULT_GFX_BOARD_READ - { -1 } + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_R }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_DEFAULT_GFX_BOARD_READ + { -1 } }; static struct MemoryWriteAddress writemem_master_default[] = { - { 0x000000, 0x03ffff, MWA_ROM }, - { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_W }, - { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_W }, - { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_w }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE - NAMCOS2_68K_DEFAULT_GFX_BOARD_WRITE - { -1 } + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_W }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_DEFAULT_GFX_BOARD_WRITE + { -1 } }; static struct MemoryReadAddress readmem_master_finallap[] = { - { 0x000000, 0x03ffff, MRA_ROM }, - { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_R }, - { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_R }, - { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_r }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_READ - NAMCOS2_68K_FINALLAP_GFX_BOARD_READ - { -1 } + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_R }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_FINALLAP_GFX_BOARD_READ + { -1 } }; static struct MemoryWriteAddress writemem_master_finallap[] = { - { 0x000000, 0x03ffff, MWA_ROM }, - { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_W }, - { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_W }, - { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_w }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE - NAMCOS2_68K_FINALLAP_GFX_BOARD_WRITE - { -1 } + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_W }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_FINALLAP_GFX_BOARD_WRITE + { -1 } +}; + +static struct MemoryReadAddress readmem_master_metlhawk[] = { + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_R }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_METLHAWK_GFX_BOARD_READ + { -1 } +}; + +static struct MemoryWriteAddress writemem_master_metlhawk[] = { + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x10ffff, NAMCOS2_68K_MASTER_RAM_W }, + { 0x180000, 0x183fff, NAMCOS2_68K_EEPROM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_master_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_METLHAWK_GFX_BOARD_WRITE + { -1 } }; /*************************************************************/ -/* SLAVE 68000 CPU Memory declarations */ +/* SLAVE 68000 CPU Memory declarations */ /*************************************************************/ static struct MemoryReadAddress readmem_slave_default[] = { - { 0x000000, 0x03ffff, MRA_ROM }, - { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_R }, - { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_r }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_READ - NAMCOS2_68K_DEFAULT_GFX_BOARD_READ - { -1 } + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_DEFAULT_GFX_BOARD_READ + { -1 } }; static struct MemoryWriteAddress writemem_slave_default[] ={ - { 0x000000, 0x03ffff, MWA_ROM }, - { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_W }, - { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_w }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE - NAMCOS2_68K_DEFAULT_GFX_BOARD_WRITE - { -1 } + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_DEFAULT_GFX_BOARD_WRITE + { -1 } }; static struct MemoryReadAddress readmem_slave_finallap[] = { - { 0x000000, 0x03ffff, MRA_ROM }, - { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_R }, - { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_r }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_READ - NAMCOS2_68K_FINALLAP_GFX_BOARD_READ - { -1 } + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_FINALLAP_GFX_BOARD_READ + { -1 } }; static struct MemoryWriteAddress writemem_slave_finallap[] ={ - { 0x000000, 0x03ffff, MWA_ROM }, - { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_W }, - { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_w }, - NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE - NAMCOS2_68K_FINALLAP_GFX_BOARD_WRITE - { -1 } + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_FINALLAP_GFX_BOARD_WRITE + { -1 } +}; + +static struct MemoryReadAddress readmem_slave_metlhawk[] = { + { 0x000000, 0x03ffff, MRA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_R }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_r }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_READ + NAMCOS2_68K_METLHAWK_GFX_BOARD_READ + { -1 } +}; + +static struct MemoryWriteAddress writemem_slave_metlhawk[] ={ + { 0x000000, 0x03ffff, MWA_ROM }, + { 0x100000, 0x13ffff, NAMCOS2_68K_SLAVE_RAM_W }, + { 0x1c0000, 0x1fffff, namcos2_68k_slave_C148_w }, + NAMCOS2_68K_DEFAULT_CPU_BOARD_WRITE + NAMCOS2_68K_METLHAWK_GFX_BOARD_WRITE + { -1 } }; /*************************************************************/ -/* 6809 SOUND CPU Memory declarations */ +/* 6809 SOUND CPU Memory declarations */ /*************************************************************/ static struct MemoryReadAddress readmem_sound[] ={ - { 0x0000, 0x3fff, BANKED_SOUND_ROM_R }, /* banked */ - { 0x4000, 0x4001, YM2151_status_port_0_r }, - { 0x5000, 0x6fff, C140_r }, - { 0x7000, 0x7fff, namcos2_dpram_byte_r }, /* 991112.CAB ($5800-5fff=image of $5000-$57ff) */ - { 0x8000, 0x9fff, MRA_RAM }, - { 0xd000, 0xffff, MRA_ROM }, - { -1 } + { 0x0000, 0x3fff, BANKED_SOUND_ROM_R }, /* banked */ + { 0x4000, 0x4001, YM2151_status_port_0_r }, + { 0x5000, 0x6fff, C140_r }, + { 0x7000, 0x7fff, namcos2_dpram_byte_r }, /* 991112.CAB ($5800-5fff=image of $5000-$57ff) */ + { 0x8000, 0x9fff, MRA_RAM }, + { 0xd000, 0xffff, MRA_ROM }, + { -1 } }; static struct MemoryWriteAddress writemem_sound[] = { - { 0x0000, 0x3fff, MWA_ROM }, - { 0x4000, 0x4000, YM2151_register_port_0_w }, - { 0x4001, 0x4001, YM2151_data_port_0_w }, - { 0x5000, 0x6fff, C140_w }, - { 0x7000, 0x7fff, namcos2_dpram_byte_w }, /* 991112.CAB ($5800-5fff=image of $5000-$57ff) */ - { 0x8000, 0x9fff, MWA_RAM }, - { 0xa000, 0xbfff, MWA_NOP }, /* Amplifier enable on 1st write */ - { 0xc000, 0xc001, namcos2_sound_bankselect_w }, - { 0xd001, 0xd001, MWA_NOP }, /* Watchdog */ - { 0xc000, 0xffff, MWA_ROM }, - { -1 } /* end of table */ + { 0x0000, 0x3fff, MWA_ROM }, + { 0x4000, 0x4000, YM2151_register_port_0_w }, + { 0x4001, 0x4001, YM2151_data_port_0_w }, + { 0x5000, 0x6fff, C140_w }, + { 0x7000, 0x7fff, namcos2_dpram_byte_w }, /* 991112.CAB ($5800-5fff=image of $5000-$57ff) */ + { 0x8000, 0x9fff, MWA_RAM }, + { 0xa000, 0xbfff, MWA_NOP }, /* Amplifier enable on 1st write */ + { 0xc000, 0xc001, namcos2_sound_bankselect_w }, + { 0xd001, 0xd001, MWA_NOP }, /* Watchdog */ + { 0xc000, 0xffff, MWA_ROM }, + { -1 } /* end of table */ }; /*************************************************************/ -/* 68705 IO CPU Memory declarations */ +/* 68705 IO CPU Memory declarations */ /*************************************************************/ static struct MemoryReadAddress readmem_mcu[] ={ - /* input ports and dips are mapped here */ - - { 0x0000, 0x0000, MRA_NOP }, // Keep logging quiet - { 0x0001, 0x0001, input_port_0_r }, - { 0x0002, 0x0002, input_port_1_r }, - { 0x0003, 0x0003, namcos2_mcu_port_d_r }, - { 0x0007, 0x0007, input_port_10_r }, - { 0x0010, 0x0010, namcos2_mcu_analog_ctrl_r }, - { 0x0011, 0x0011, namcos2_mcu_analog_port_r }, - { 0x0008, 0x003f, MRA_RAM }, // Fill in register to stop logging - { 0x0040, 0x01bf, MRA_RAM }, - { 0x01c0, 0x1fff, MRA_ROM }, - { 0x2000, 0x2fff, input_port_11_r }, - { 0x3000, 0x3000, input_port_12_r }, - { 0x3001, 0x3001, input_port_13_r }, - { 0x3002, 0x3002, input_port_14_r }, - { 0x3003, 0x3003, input_port_15_r }, - { 0x5000, 0x57ff, namcos2_dpram_byte_r }, - { 0x6000, 0x6fff, MRA_NOP }, /* watchdog */ - { 0x8000, 0xffff, MRA_ROM }, - { -1 } + /* input ports and dips are mapped here */ + + { 0x0000, 0x0000, MRA_NOP }, // Keep logging quiet + { 0x0001, 0x0001, input_port_0_r }, + { 0x0002, 0x0002, input_port_1_r }, + { 0x0003, 0x0003, namcos2_mcu_port_d_r }, + { 0x0007, 0x0007, input_port_10_r }, + { 0x0010, 0x0010, namcos2_mcu_analog_ctrl_r }, + { 0x0011, 0x0011, namcos2_mcu_analog_port_r }, + { 0x0008, 0x003f, MRA_RAM }, // Fill in register to stop logging + { 0x0040, 0x01bf, MRA_RAM }, + { 0x01c0, 0x1fff, MRA_ROM }, + { 0x2000, 0x2000, input_port_11_r }, + { 0x3000, 0x3000, input_port_12_r }, + { 0x3001, 0x3001, input_port_13_r }, + { 0x3002, 0x3002, input_port_14_r }, + { 0x3003, 0x3003, input_port_15_r }, + { 0x5000, 0x57ff, namcos2_dpram_byte_r }, + { 0x6000, 0x6fff, MRA_NOP }, /* watchdog */ + { 0x8000, 0xffff, MRA_ROM }, + { -1 } }; static struct MemoryWriteAddress writemem_mcu[] ={ - { 0x0003, 0x0003, namcos2_mcu_port_d_w }, - { 0x0010, 0x0010, namcos2_mcu_analog_ctrl_w }, - { 0x0011, 0x0011, namcos2_mcu_analog_port_w }, - { 0x0000, 0x003f, MWA_RAM }, // Fill in register to stop logging - { 0x0040, 0x01bf, MWA_RAM }, - { 0x01c0, 0x1fff, MWA_ROM }, - { 0x5000, 0x57ff, namcos2_dpram_byte_w }, - { 0x8000, 0xffff, MWA_ROM }, - { -1 } + { 0x0003, 0x0003, namcos2_mcu_port_d_w }, + { 0x0010, 0x0010, namcos2_mcu_analog_ctrl_w }, + { 0x0011, 0x0011, namcos2_mcu_analog_port_w }, + { 0x0000, 0x003f, MWA_RAM }, // Fill in register to stop logging + { 0x0040, 0x01bf, MWA_RAM }, + { 0x01c0, 0x1fff, MWA_ROM }, + { 0x5000, 0x57ff, namcos2_dpram_byte_w }, + { 0x8000, 0xffff, MWA_ROM }, + { -1 } }; /*************************************************************/ -/* */ -/* NAMCO SYSTEM 2 PORT MACROS */ -/* */ -/* Below are the port defintion macros that should be used */ -/* as the basis for definig a port set for a Namco System2 */ -/* game. */ -/* */ +/* */ +/* NAMCO SYSTEM 2 PORT MACROS */ +/* */ +/* Below are the port defintion macros that should be used */ +/* as the basis for definig a port set for a Namco System2 */ +/* game. */ +/* */ /*************************************************************/ #define NAMCOS2_MCU_PORT_B_DEFAULT \ - PORT_START /* 63B05Z0 - PORT B */ \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) \ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) \ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + PORT_START /* 63B05Z0 - PORT B */ \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 ) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 ) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) #define NAMCOS2_MCU_PORT_C_DEFAULT \ - PORT_START /* 63B05Z0 - PORT C & SCI */ \ - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) \ - PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) \ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_START /* 63B05Z0 - PORT C & SCI */ \ + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) \ + PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_SERVICE, "Service Button", KEYCODE_F1, IP_JOY_NONE ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) #define NAMCOS2_MCU_ANALOG_PORT_DEFAULT \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 5 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 6 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 7 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 5 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 6 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 7 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) #define NAMCOS2_MCU_PORT_H_DEFAULT \ - PORT_START /* 63B05Z0 - PORT H */ \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 ) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) \ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) \ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_START /* 63B05Z0 - PORT H */ \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 ) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) #define NAMCOS2_MCU_DIPSW_DEFAULT \ - PORT_START /* 63B05Z0 - $2000 DIP SW */ \ - PORT_DIPNAME( 0x01, 0x01, "Video Display") \ - PORT_DIPSETTING( 0x01, "Normal" ) \ - PORT_DIPSETTING( 0x00, "Frozen" ) \ - PORT_DIPNAME( 0x02, 0x02, "$2000-1") \ - PORT_DIPSETTING( 0x02, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_DIPNAME( 0x04, 0x04, "$2000-2") \ - PORT_DIPSETTING( 0x04, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_DIPNAME( 0x08, 0x08, "$2000-3") \ - PORT_DIPSETTING( 0x08, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_DIPNAME( 0x10, 0x10, "$2000-4") \ - PORT_DIPSETTING( 0x10, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_DIPNAME( 0x20, 0x20, "$2000-5") \ - PORT_DIPSETTING( 0x20, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_DIPNAME( 0x40, 0x40, "$2000-6") \ - PORT_DIPSETTING( 0x40, "H" ) \ - PORT_DIPSETTING( 0x00, "L" ) \ - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + PORT_START /* 63B05Z0 - $2000 DIP SW */ \ + PORT_DIPNAME( 0x01, 0x01, "Video Display") \ + PORT_DIPSETTING( 0x01, "Normal" ) \ + PORT_DIPSETTING( 0x00, "Frozen" ) \ + PORT_DIPNAME( 0x02, 0x02, "$2000-1") \ + PORT_DIPSETTING( 0x02, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_DIPNAME( 0x04, 0x04, "$2000-2") \ + PORT_DIPSETTING( 0x04, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_DIPNAME( 0x08, 0x08, "$2000-3") \ + PORT_DIPSETTING( 0x08, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_DIPNAME( 0x10, 0x10, "$2000-4") \ + PORT_DIPSETTING( 0x10, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_DIPNAME( 0x20, 0x20, "$2000-5") \ + PORT_DIPSETTING( 0x20, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_DIPNAME( 0x40, 0x40, "$2000-6") \ + PORT_DIPSETTING( 0x40, "H" ) \ + PORT_DIPSETTING( 0x00, "L" ) \ + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) #define NAMCOS2_MCU_DIAL_DEFAULT \ - PORT_START /* 63B05Z0 - $3000 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ -/* PORT_ANALOG( 0xff, 0x00, IPT_DIAL, 20, 10, 0, 0 ) */ \ - PORT_START /* 63B05Z0 - $3001 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - $3002 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ - PORT_START /* 63B05Z0 - $3003 */ \ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - -/*************************************************************/ -/* */ -/* NAMCO SYSTEM 2 PORT DEFINITIONS */ -/* */ -/* There is a standard port definition defined that will */ -/* work for most games, if you wish to produce a special */ -/* definition for a particular game then see the assault */ -/* and dirtfox definitions for examples of how to construct */ -/* a special port definition */ -/* */ -/* The default definitions includes only the following list */ -/* of connections : */ -/* 2 Joysticks, 6 buttons, 1 Service, 1 Advance */ -/* 2 start */ -/* */ -/* Note that the analog ports are treated as signed numbers */ -/* 0V on the input results in -128 and AVCC gives 127 */ -/* So you need to set the port values to default to the mid */ -/* point 0x7f as the analog port handler will then treat */ -/* that as the zero point. 0x7f is not the mid-point but the */ -/* experience with dirtfox shows the game likes to see -1 on */ -/* on the port as the rest value. */ -/* */ + PORT_START /* 63B05Z0 - $3000 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ +/* PORT_ANALOG( 0xff, 0x00, IPT_DIAL, 20, 10, 0, 0 ) */ \ + PORT_START /* 63B05Z0 - $3001 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - $3002 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_START /* 63B05Z0 - $3003 */ \ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + +/*************************************************************/ +/* */ +/* NAMCO SYSTEM 2 PORT DEFINITIONS */ +/* */ +/* There is a standard port definition defined that will */ +/* work for most games, if you wish to produce a special */ +/* definition for a particular game then see the assault */ +/* and dirtfox definitions for examples of how to construct */ +/* a special port definition */ +/* */ +/* The default definitions includes only the following list */ +/* of connections : */ +/* 2 Joysticks, 6 Buttons, 1 Service, 1 Advance */ +/* 2 Start */ +/* */ /*************************************************************/ INPUT_PORTS_START( default ) - NAMCOS2_MCU_PORT_B_DEFAULT - NAMCOS2_MCU_PORT_C_DEFAULT - NAMCOS2_MCU_ANALOG_PORT_DEFAULT - NAMCOS2_MCU_PORT_H_DEFAULT - NAMCOS2_MCU_DIPSW_DEFAULT - NAMCOS2_MCU_DIAL_DEFAULT + NAMCOS2_MCU_PORT_B_DEFAULT + NAMCOS2_MCU_PORT_C_DEFAULT + NAMCOS2_MCU_ANALOG_PORT_DEFAULT + NAMCOS2_MCU_PORT_H_DEFAULT + NAMCOS2_MCU_DIPSW_DEFAULT + NAMCOS2_MCU_DIAL_DEFAULT INPUT_PORTS_END INPUT_PORTS_START( assault ) - PORT_START /* 63B05Z0 - PORT B */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_PLAYER2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_PLAYER2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - NAMCOS2_MCU_PORT_C_DEFAULT - NAMCOS2_MCU_ANALOG_PORT_DEFAULT - - PORT_START /* 63B05Z0 - PORT H */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_PLAYER2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_PLAYER2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) - - NAMCOS2_MCU_DIPSW_DEFAULT - - PORT_START /* 63B05Z0 - $3000 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_PLAYER2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_PLAYER2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) - PORT_START /* 63B05Z0 - $3001 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - $3002 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - $3003 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - PORT B */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + NAMCOS2_MCU_PORT_C_DEFAULT + NAMCOS2_MCU_ANALOG_PORT_DEFAULT + + PORT_START /* 63B05Z0 - PORT H */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_PLAYER2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) + + NAMCOS2_MCU_DIPSW_DEFAULT + + PORT_START /* 63B05Z0 - $3000 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) + PORT_START /* 63B05Z0 - $3001 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - $3002 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - $3003 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END INPUT_PORTS_START( driving ) - NAMCOS2_MCU_PORT_B_DEFAULT - NAMCOS2_MCU_PORT_C_DEFAULT - - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START /* Steering Wheel */ - PORT_ANALOG( 0xff, 0x7f, IPT_DIAL|IPF_CENTER|IPF_PLAYER1, 35, 20, 0x00, 0xff ) - PORT_START /* Brake pedal */ - PORT_ANALOG( 0xff, 0x7f, IPT_PEDAL|IPF_PLAYER2, 100, 30, 0x80, 0xff ) - PORT_START /* Accelerator pedal */ - PORT_ANALOG( 0xff, 0x7f, IPT_PEDAL|IPF_PLAYER1, 100, 15, 0x80, 0xff ) - - NAMCOS2_MCU_PORT_H_DEFAULT - NAMCOS2_MCU_DIPSW_DEFAULT - NAMCOS2_MCU_DIAL_DEFAULT + NAMCOS2_MCU_PORT_B_DEFAULT + NAMCOS2_MCU_PORT_C_DEFAULT + + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* Steering Wheel */ + PORT_ANALOG( 0xff, 0x7f, IPT_DIAL|IPF_CENTER|IPF_PLAYER1, 70, 50, 0x00, 0xff ) + PORT_START /* Brake pedal */ + PORT_ANALOG( 0xff, 0xff, IPT_PEDAL|IPF_PLAYER2, 100, 30, 0x00, 0x7f ) + PORT_START /* Accelerator pedal */ + PORT_ANALOG( 0xff, 0xff, IPT_PEDAL|IPF_PLAYER1, 100, 15, 0x00, 0x7f ) + + NAMCOS2_MCU_PORT_H_DEFAULT + NAMCOS2_MCU_DIPSW_DEFAULT + NAMCOS2_MCU_DIAL_DEFAULT +INPUT_PORTS_END + +INPUT_PORTS_START( dirtfox ) + PORT_START /* 63B05Z0 - PORT B */ \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) /* Gear shift up */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) /* Gear shift down */ + + NAMCOS2_MCU_PORT_C_DEFAULT + + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* Steering Wheel */ + PORT_ANALOG( 0xff, 0x7f, IPT_DIAL|IPF_CENTER|IPF_PLAYER1, 70, 50, 0x00, 0xff ) + PORT_START /* Brake pedal */ + PORT_ANALOG( 0xff, 0xff, IPT_PEDAL|IPF_PLAYER2, 100, 30, 0x00, 0x7f ) + PORT_START /* Accelerator pedal */ + PORT_ANALOG( 0xff, 0xff, IPT_PEDAL|IPF_PLAYER1, 100, 15, 0x00, 0x7f ) + + PORT_START /* 63B05Z0 - PORT H */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + NAMCOS2_MCU_DIPSW_DEFAULT + NAMCOS2_MCU_DIAL_DEFAULT +INPUT_PORTS_END + +INPUT_PORTS_START( metlhawk ) + PORT_START /* 63B05Z0 - PORT B */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + NAMCOS2_MCU_PORT_C_DEFAULT + + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START /* Joystick Y */ + PORT_ANALOG( 0xff, 0x7f, IPT_AD_STICK_Y|IPF_CENTER, 100, 10, 0x40, 0xbe ) + PORT_START /* Joystick X */ + PORT_ANALOG( 0xff, 0x7f, IPT_AD_STICK_X|IPF_CENTER, 100, 10, 0x40, 0xbe ) + PORT_START /* Lever */ + PORT_ANALOG( 0xff, 0x7f, IPT_AD_STICK_Y|IPF_CENTER|IPF_REVERSE|IPF_PLAYER2, 100, 10, 0x40, 0xbe ) + + PORT_START /* 63B05Z0 - PORT H */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + + NAMCOS2_MCU_DIPSW_DEFAULT + NAMCOS2_MCU_DIAL_DEFAULT INPUT_PORTS_END /*************************************************************/ -/* Namco System II - Graphics Declarations */ +/* Namco System II - Graphics Declarations */ /*************************************************************/ static struct GfxLayout obj_layout = { - 32,32, - 0x800, /* number of sprites */ - 8, /* bits per pixel */ - { /* plane offsets */ - (0x400000*3),(0x400000*3)+4,(0x400000*2),(0x400000*2)+4, - (0x400000*1),(0x400000*1)+4,(0x400000*0),(0x400000*0)+4 - }, - { /* x offsets */ - 0*8,0*8+1,0*8+2,0*8+3, - 1*8,1*8+1,1*8+2,1*8+3, - 2*8,2*8+1,2*8+2,2*8+3, - 3*8,3*8+1,3*8+2,3*8+3, - - 4*8,4*8+1,4*8+2,4*8+3, - 5*8,5*8+1,5*8+2,5*8+3, - 6*8,6*8+1,6*8+2,6*8+3, - 7*8,7*8+1,7*8+2,7*8+3, - }, - { /* y offsets */ - 0*128,0*128+64,1*128,1*128+64, - 2*128,2*128+64,3*128,3*128+64, - 4*128,4*128+64,5*128,5*128+64, - 6*128,6*128+64,7*128,7*128+64, - - 8*128,8*128+64,9*128,9*128+64, - 10*128,10*128+64,11*128,11*128+64, - 12*128,12*128+64,13*128,13*128+64, - 14*128,14*128+64,15*128,15*128+64 - }, - 0x800 /* sprite offset */ + 32,32, + 0x800, /* number of sprites */ + 8, /* bits per pixel */ + { /* plane offsets */ + (0x400000*3),(0x400000*3)+4,(0x400000*2),(0x400000*2)+4, + (0x400000*1),(0x400000*1)+4,(0x400000*0),(0x400000*0)+4 + }, + { /* x offsets */ + 0*8,0*8+1,0*8+2,0*8+3, + 1*8,1*8+1,1*8+2,1*8+3, + 2*8,2*8+1,2*8+2,2*8+3, + 3*8,3*8+1,3*8+2,3*8+3, + + 4*8,4*8+1,4*8+2,4*8+3, + 5*8,5*8+1,5*8+2,5*8+3, + 6*8,6*8+1,6*8+2,6*8+3, + 7*8,7*8+1,7*8+2,7*8+3, + }, + { /* y offsets */ + 0*128,0*128+64,1*128,1*128+64, + 2*128,2*128+64,3*128,3*128+64, + 4*128,4*128+64,5*128,5*128+64, + 6*128,6*128+64,7*128,7*128+64, + + 8*128,8*128+64,9*128,9*128+64, + 10*128,10*128+64,11*128,11*128+64, + 12*128,12*128+64,13*128,13*128+64, + 14*128,14*128+64,15*128,15*128+64 + }, + 0x800 /* sprite offset */ }; static struct GfxLayout chr_layout = { - 8,8, - 0x10000, - 8, - { 0,1,2,3,4,5,6,7 }, - { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, - { 0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64 }, - 8*64 + 8,8, + 0x10000, + 8, + { 0,1,2,3,4,5,6,7 }, + { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, + { 0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64 }, + 8*64 }; static struct GfxLayout roz_layout = { - 8,8, - 0x10000, - 8, - { 0,1,2,3,4,5,6,7 }, - { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, - { 0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64 }, - 8*64 + 8,8, + 0x10000, + 8, + { 0,1,2,3,4,5,6,7 }, + { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, + { 0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64 }, + 8*64 }; /* static struct GfxLayout mask_layout = { - 8,8, - 0x10000, - 1, - { 0 }, - { 0, 1, 2, 3, 4, 5, 6, 7 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 + 8,8, + 0x10000, + 1, + { 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, + 8*8 }; */ static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1 , 0x000000, &obj_layout , 0x0000, 0x10 }, - { REGION_GFX1 , 0x200000, &obj_layout , 0x0000, 0x10 }, - { REGION_GFX2 , 0x000000, &chr_layout , 0x1000, 0x08 }, - { REGION_GFX3 , 0x000000, &roz_layout , 0x0000, 0x10 }, -/* { REGION_GFX4 , 0x000000, &mask_layout , 0x0000, 0x01 }, */ - { -1 } + { REGION_GFX1 , 0x000000, &obj_layout , 0x0000, 0x10 }, + { REGION_GFX1 , 0x200000, &obj_layout , 0x0000, 0x10 }, + { REGION_GFX2 , 0x000000, &chr_layout , 0x1000, 0x08 }, + { REGION_GFX3 , 0x000000, &roz_layout , 0x0000, 0x10 }, +/* { REGION_GFX4 , 0x000000, &mask_layout , 0x0000, 0x01 }, */ + { -1 } }; static struct YM2151interface ym2151_interface = { - 1, /* 1 chip */ - 3579580, /* 3.58 MHZ ? */ - { YM3012_VOL(50,MIXER_PAN_LEFT,50,MIXER_PAN_RIGHT) }, - { NULL } /* YM2151 IRQ line is NOT connected on the PCB */ + 1, /* 1 chip */ + 3579580, /* 3.58 MHZ ? */ + { YM3012_VOL(50,MIXER_PAN_LEFT,50,MIXER_PAN_RIGHT) }, + { NULL } /* YM2151 IRQ line is NOT connected on the PCB */ }; static struct C140interface C140_interface = { - 8000000/374, - REGION_SOUND1, - 50 + 8000000/374, + REGION_SOUND1, + 50 }; @@ -953,7 +1068,7 @@ static struct C140interface C140_interface = Master clock = 49.152Mhz -68000 Measured at 84ns = 12.4Mhz BUT 49.152MHz/4 = 12.288MHz = 81ns +68000 Measured at 84ns = 12.4Mhz BUT 49.152MHz/4 = 12.288MHz = 81ns 6809 Measured at 343ns = 2.915 MHz BUT 49.152MHz/16 = 3.072MHz = 325ns 63B05 Measured at 120ns = 8.333 MHz BUT 49.152MHz/6 = 8.192MHz = 122ns @@ -963,8 +1078,8 @@ internal divider. Soooo; -680000 = 12288000 -6809 = 3072000 +680000 = 12288000 +6809 = 3072000 63B05Z0 = 2048000 The interrupts to CPU4 has been measured at 60Hz (16.5mS period) on a @@ -974,2305 +1089,2487 @@ via software as INT1 *******************************************/ /*************************************************************/ -/* */ -/* NAMCO SYSTEM 2 MACHINE DEFINTIONS */ -/* */ -/* Below are the machine definitions for the various Namco */ -/* System 2 board configurations, this mechanism is also */ -/* used to provide 8/16bpp drivers for different games */ -/* */ +/* */ +/* NAMCO SYSTEM 2 MACHINE DEFINTIONS */ +/* */ +/* Below are the machine definitions for the various Namco */ +/* System 2 board configurations, this mechanism is also */ +/* used to provide 8/16bpp drivers for different games */ +/* */ /*************************************************************/ static struct MachineDriver machine_driver_default = { - { - { - CPU_M68000, - 12288000, - readmem_master_default,writemem_master_default,0,0, - namcos2_68k_master_vblank,1, - 0,0 - }, - { - CPU_M68000, - 12288000, - readmem_slave_default,writemem_slave_default,0,0, - namcos2_68k_slave_vblank,1, - 0,0 - }, - { - CPU_M6809, // Sound handling - 3072000, - readmem_sound,writemem_sound,0,0, - interrupt,2, - namcos2_sound_interrupt,120 - }, - { - CPU_HD63705, // I/O handling - 2048000, - readmem_mcu,writemem_mcu,0,0, - namcos2_mcu_interrupt,1, - 0,0 - } - }, - 60, - DEFAULT_REAL_60HZ_VBLANK_DURATION, - 100, /* 100 CPU slices per frame */ - namcos2_init_machine, - - /* video hardware */ - 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, - gfxdecodeinfo, - 8192,8192, - namcos2_vh_convert_color_prom, /* Convert colour prom */ - VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE, - - 0, /* Video initialisation */ - namcos2_vh_start, /* Video start */ - namcos2_vh_stop, /* Video stop */ - namcos2_vh_update_default, /* Video update */ - - /* sound hardware */ - SOUND_SUPPORTS_STEREO,0,0,0, - /* Sound struct here */ - { - { - SOUND_C140, - &C140_interface - }, - { - SOUND_YM2151, - &ym2151_interface - } - }, - - /* NV RAM Support */ - namcos2_nvram_handler + { + { + CPU_M68000, + 12288000, + readmem_master_default,writemem_master_default,0,0, + namcos2_68k_master_vblank,1, + 0,0 + }, + { + CPU_M68000, + 12288000, + readmem_slave_default,writemem_slave_default,0,0, + namcos2_68k_slave_vblank,1, + 0,0 + }, + { + CPU_M6809, // Sound handling + 3072000, + readmem_sound,writemem_sound,0,0, + interrupt,2, + namcos2_sound_interrupt,120 + }, + { + CPU_HD63705, // I/O handling + 2048000, + readmem_mcu,writemem_mcu,0,0, + namcos2_mcu_interrupt,1, + 0,0 + } + }, + 60, + DEFAULT_REAL_60HZ_VBLANK_DURATION, + 100, /* 100 CPU slices per frame */ + namcos2_init_machine, + + /* video hardware */ + 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, + gfxdecodeinfo, + 8192,8192, + namcos2_vh_convert_color_prom, /* Convert colour prom */ + VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE, + + 0, /* Video initialisation */ + namcos2_vh_start, /* Video start */ + namcos2_vh_stop, /* Video stop */ + namcos2_vh_update_default, /* Video update */ + + /* sound hardware */ + SOUND_SUPPORTS_STEREO,0,0,0, + /* Sound struct here */ + { + { + SOUND_C140, + &C140_interface + }, + { + SOUND_YM2151, + &ym2151_interface + } + }, + + /* NV RAM Support */ + namcos2_nvram_handler }; static struct MachineDriver machine_driver_driving = { - { - { - CPU_M68000, - 12288000, - readmem_master_finallap,writemem_master_finallap,0,0, - namcos2_68k_master_vblank,1, - 0,0 - }, - { - CPU_M68000, - 12288000, - readmem_slave_finallap,writemem_slave_finallap,0,0, - namcos2_68k_slave_vblank,1, - 0,0 - }, - { - CPU_M6809, // Sound handling - 3072000, - readmem_sound,writemem_sound,0,0, - interrupt,2, - namcos2_sound_interrupt,120 - }, - { - CPU_HD63705, // I/O handling - 2048000, - readmem_mcu,writemem_mcu,0,0, - namcos2_mcu_interrupt,1, - 0,0 - } - }, - 60, - DEFAULT_REAL_60HZ_VBLANK_DURATION, - 100, /* 100 CPU slices per frame */ - namcos2_init_machine, - - /* video hardware */ - 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, - gfxdecodeinfo, - 8192,8192, - namcos2_vh_convert_color_prom, /* Convert colour prom */ - VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE, - - 0, /* Video initialisation */ - namcos2_vh_start, /* Video start */ - namcos2_vh_stop, /* Video stop */ - namcos2_vh_update_finallap, /* Video update */ - - /* sound hardware */ - SOUND_SUPPORTS_STEREO,0,0,0, - /* Sound struct here */ - { - { - SOUND_C140, - &C140_interface - }, - { - SOUND_YM2151, - &ym2151_interface - } - }, - - /* NV RAM Support */ - namcos2_nvram_handler + { + { + CPU_M68000, + 12288000, + readmem_master_finallap,writemem_master_finallap,0,0, + namcos2_68k_master_vblank,1, + 0,0 + }, + { + CPU_M68000, + 12288000, + readmem_slave_finallap,writemem_slave_finallap,0,0, + namcos2_68k_slave_vblank,1, + 0,0 + }, + { + CPU_M6809, // Sound handling + 3072000, + readmem_sound,writemem_sound,0,0, + interrupt,2, + namcos2_sound_interrupt,120 + }, + { + CPU_HD63705, // I/O handling + 2048000, + readmem_mcu,writemem_mcu,0,0, + namcos2_mcu_interrupt,1, + 0,0 + } + }, + 60, + DEFAULT_REAL_60HZ_VBLANK_DURATION, + 100, /* 100 CPU slices per frame */ + namcos2_init_machine, + + /* video hardware */ + 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, + gfxdecodeinfo, + 8192,8192, + namcos2_vh_convert_color_prom, /* Convert colour prom */ + VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE, + + 0, /* Video initialisation */ + namcos2_vh_start, /* Video start */ + namcos2_vh_stop, /* Video stop */ + namcos2_vh_update_finallap, /* Video update */ + + /* sound hardware */ + SOUND_SUPPORTS_STEREO,0,0,0, + /* Sound struct here */ + { + { + SOUND_C140, + &C140_interface + }, + { + SOUND_YM2151, + &ym2151_interface + } + }, + + /* NV RAM Support */ + namcos2_nvram_handler +}; + + +static struct MachineDriver machine_driver_metlhawk = +{ + { + { + CPU_M68000, + 12288000, + readmem_master_metlhawk,writemem_master_metlhawk,0,0, + namcos2_68k_master_vblank,1, + 0,0 + }, + { + CPU_M68000, + 12288000, + readmem_slave_metlhawk,writemem_slave_metlhawk,0,0, + namcos2_68k_slave_vblank,1, + 0,0 + }, + { + CPU_M6809, // Sound handling + 3072000, + readmem_sound,writemem_sound,0,0, + interrupt,2, + namcos2_sound_interrupt,120 + }, + { + CPU_HD63705, // I/O handling + 2048000, + readmem_mcu,writemem_mcu,0,0, + namcos2_mcu_interrupt,1, + 0,0 + } + }, + 60, + DEFAULT_REAL_60HZ_VBLANK_DURATION, + 100, /* 100 CPU slices per frame */ + namcos2_init_machine, + + /* video hardware */ + 36*8, 28*8, { 0*8, 36*8-1, 0*8, 28*8-1 }, + gfxdecodeinfo, + 8192,8192, + namcos2_vh_convert_color_prom, /* Convert colour prom */ + VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE, + + 0, /* Video initialisation */ + namcos2_vh_start, /* Video start */ + namcos2_vh_stop, /* Video stop */ + namcos2_vh_update_default, /* Video update */ + + /* sound hardware */ + SOUND_SUPPORTS_STEREO,0,0,0, + /* Sound struct here */ + { + { + SOUND_C140, + &C140_interface + }, + { + SOUND_YM2151, + &ym2151_interface + } + }, + + /* NV RAM Support */ + namcos2_nvram_handler }; /*************************************************************/ -/* Namco System II - ROM Declarations */ +/* Namco System II - ROM Declarations */ /*************************************************************/ /*************************************************************/ -/* IF YOU ARE ADDING A NEW DRIVER PLEASE MAKE SURE YOU DO */ +/* IF YOU ARE ADDING A NEW DRIVER PLEASE MAKE SURE YOU DO */ /* NOT CHANGE THE SIZES OF THE MEMORY REGIONS, AS THESE ARE */ -/* ALWAYS SET TO THE CORRECT SYSTEM SIZE AS OPPOSED TO THE */ -/* SIZE OF THE INDIVIDUAL ROMS. */ +/* ALWAYS SET TO THE CORRECT SYSTEM SIZE AS OPPOSED TO THE */ +/* SIZE OF THE INDIVIDUAL ROMS. */ /*************************************************************/ /*************************************************************/ -/* YOU MUST MAKE SURE ANY ROM DECLARATIONS FOR GRAPHICS */ -/* DATA ROMS ARE REPEATED TO COMPLETELY FILL THE ALLOCATED */ +/* YOU MUST MAKE SURE ANY ROM DECLARATIONS FOR GRAPHICS */ +/* DATA ROMS ARE REPEATED TO COMPLETELY FILL THE ALLOCATED */ /* SPACE. EACH ROM IS EXPECTED TO BE 512K SO 128K ROMS MUST */ -/* BE REPEATED 4 TIMES AND 256K 2 TIMES. */ -/* */ -/* */ -/* ****** USE THE MACROS BELOW ****** */ -/* */ -/* */ +/* BE REPEATED 4 TIMES AND 256K 2 TIMES. */ +/* */ +/* */ +/* ****** USE THE MACROS BELOW ****** */ +/* */ +/* */ /*************************************************************/ #define NAMCOS2_GFXROM_LOAD_128K(romname,start,chksum)\ - ROM_LOAD( romname , (start + 0x000000), 0x020000, chksum )\ - ROM_RELOAD( (start + 0x020000), 0x020000 )\ - ROM_RELOAD( (start + 0x040000), 0x020000 )\ - ROM_RELOAD( (start + 0x060000), 0x020000 ) + ROM_LOAD( romname , (start + 0x000000), 0x020000, chksum )\ + ROM_RELOAD( (start + 0x020000), 0x020000 )\ + ROM_RELOAD( (start + 0x040000), 0x020000 )\ + ROM_RELOAD( (start + 0x060000), 0x020000 ) #define NAMCOS2_GFXROM_LOAD_256K(romname,start,chksum)\ - ROM_LOAD( romname , (start + 0x000000), 0x040000, chksum )\ - ROM_RELOAD( (start + 0x040000), 0x040000 ) + ROM_LOAD( romname , (start + 0x000000), 0x040000, chksum )\ + ROM_RELOAD( (start + 0x040000), 0x040000 ) #define NAMCOS2_GFXROM_LOAD_512K(romname,start,chksum)\ - ROM_LOAD( romname , (start + 0x000000), 0x080000, chksum ) + ROM_LOAD( romname , (start + 0x000000), 0x080000, chksum ) #define NAMCOS2_DATA_LOAD_E_128K(romname,start,chksum)\ - ROM_LOAD_EVEN(romname , (start + 0x000000), 0x020000, chksum )\ - ROM_RELOAD_EVEN( (start + 0x040000), 0x020000 )\ - ROM_RELOAD_EVEN( (start + 0x080000), 0x020000 )\ - ROM_RELOAD_EVEN( (start + 0x0c0000), 0x020000 ) + ROM_LOAD_EVEN(romname , (start + 0x000000), 0x020000, chksum )\ + ROM_RELOAD_EVEN( (start + 0x040000), 0x020000 )\ + ROM_RELOAD_EVEN( (start + 0x080000), 0x020000 )\ + ROM_RELOAD_EVEN( (start + 0x0c0000), 0x020000 ) #define NAMCOS2_DATA_LOAD_O_128K(romname,start,chksum)\ - ROM_LOAD_ODD( romname , (start + 0x000000), 0x020000, chksum )\ - ROM_RELOAD_ODD( (start + 0x040000), 0x020000 )\ - ROM_RELOAD_ODD( (start + 0x080000), 0x020000 )\ - ROM_RELOAD_ODD( (start + 0x0c0000), 0x020000 ) + ROM_LOAD_ODD( romname , (start + 0x000000), 0x020000, chksum )\ + ROM_RELOAD_ODD( (start + 0x040000), 0x020000 )\ + ROM_RELOAD_ODD( (start + 0x080000), 0x020000 )\ + ROM_RELOAD_ODD( (start + 0x0c0000), 0x020000 ) #define NAMCOS2_DATA_LOAD_E_256K(romname,start,chksum)\ - ROM_LOAD_EVEN(romname , (start + 0x000000), 0x040000, chksum )\ - ROM_RELOAD_EVEN( (start + 0x080000), 0x040000 ) + ROM_LOAD_EVEN(romname , (start + 0x000000), 0x040000, chksum )\ + ROM_RELOAD_EVEN( (start + 0x080000), 0x040000 ) #define NAMCOS2_DATA_LOAD_O_256K(romname,start,chksum)\ - ROM_LOAD_ODD( romname , (start + 0x000000), 0x040000, chksum )\ - ROM_RELOAD_ODD( (start + 0x080000), 0x040000 ) + ROM_LOAD_ODD( romname , (start + 0x000000), 0x040000, chksum )\ + ROM_RELOAD_ODD( (start + 0x080000), 0x040000 ) #define NAMCOS2_DATA_LOAD_E_512K(romname,start,chksum)\ - ROM_LOAD_EVEN(romname , (start + 0x000000), 0x080000, chksum ) + ROM_LOAD_EVEN(romname , (start + 0x000000), 0x080000, chksum ) #define NAMCOS2_DATA_LOAD_O_512K(romname,start,chksum)\ - ROM_LOAD_ODD( romname , (start + 0x000000), 0x080000, chksum ) + ROM_LOAD_ODD( romname , (start + 0x000000), 0x080000, chksum ) /*************************************************************/ -/* ASSAULT (NAMCO) */ +/* ASSAULT (NAMCO) */ /*************************************************************/ ROM_START( assault ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "at2mp0b.bin", 0x000000, 0x010000, 0x801f71c5 ) - ROM_LOAD_ODD( "at2mp1b.bin", 0x000000, 0x010000, 0x72312d4f ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) - ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) - NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) - NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) - NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) - NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) - NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) - NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "at2mp0b.bin", 0x000000, 0x010000, 0x801f71c5 ) + ROM_LOAD_ODD( "at2mp1b.bin", 0x000000, 0x010000, 0x72312d4f ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) + ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) + NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) + NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) + NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) + NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) + NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) + NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) ROM_END /*************************************************************/ -/* ASSAULT (JAPAN) */ +/* ASSAULT (JAPAN) */ /*************************************************************/ ROM_START( assaultj ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "at1_mp0.bin", 0x000000, 0x010000, 0x2d3e5c8c ) - ROM_LOAD_ODD( "at1_mp1.bin", 0x000000, 0x010000, 0x851cec3a ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) - ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) - NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) - NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) - NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) - NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) - NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) - NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "at1_mp0.bin", 0x000000, 0x010000, 0x2d3e5c8c ) + ROM_LOAD_ODD( "at1_mp1.bin", 0x000000, 0x010000, 0x851cec3a ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) + ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) + NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) + NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) + NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) + NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) + NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) + NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) ROM_END /*************************************************************/ -/* ASSAULT PLUS (NAMCO) */ +/* ASSAULT PLUS (NAMCO) */ /*************************************************************/ ROM_START( assaultp ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x010000, 0x97519f9f ) - ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x010000, 0xc7f437c7 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) - ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) - NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) - NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) - NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) - NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) - NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) - NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) - NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) - NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) - NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x010000, 0x97519f9f ) + ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x010000, 0xc7f437c7 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "at1sp0.bin", 0x000000, 0x010000, 0x0de2a0da ) + ROM_LOAD_ODD( "at1sp1.bin", 0x000000, 0x010000, 0x02d15fbe ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "at1snd0.bin", 0x00c000, 0x004000, 0x1d1ffe12 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, 0x22240076 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj1.bin", 0x080000, 0x2284a8e8 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj2.bin", 0x100000, 0x51425476 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj3.bin", 0x180000, 0x791f42ce ) + NAMCOS2_GFXROM_LOAD_128K( "atobj4.bin", 0x200000, 0x4782e1b0 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj5.bin", 0x280000, 0xf5d158cf ) + NAMCOS2_GFXROM_LOAD_128K( "atobj6.bin", 0x300000, 0x12f6a569 ) + NAMCOS2_GFXROM_LOAD_128K( "atobj7.bin", 0x380000, 0x06a929f2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atchr0.bin", 0x000000, 0x6f8e968a ) + NAMCOS2_GFXROM_LOAD_128K( "atchr1.bin", 0x080000, 0x88cf7cbe ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "atroz0.bin", 0x000000, 0x8c247a97 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz1.bin", 0x080000, 0xe44c475b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz2.bin", 0x100000, 0x770f377f ) + NAMCOS2_GFXROM_LOAD_128K( "atroz3.bin", 0x180000, 0x01d93d0b ) + NAMCOS2_GFXROM_LOAD_128K( "atroz4.bin", 0x200000, 0xf96feab5 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz5.bin", 0x280000, 0xda2f0d9e ) + NAMCOS2_GFXROM_LOAD_128K( "atroz6.bin", 0x300000, 0x9089e477 ) + NAMCOS2_GFXROM_LOAD_128K( "atroz7.bin", 0x380000, 0x62b2783a ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "atshape.bin", 0x000000, 0xdfcad82b ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "at1dat0.bin", 0x000000, 0x844890f4 ) + NAMCOS2_DATA_LOAD_O_128K( "at1dat1.bin", 0x000000, 0x21715313 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "atvoi1.bin", 0x000000, 0x080000, 0xd36a649e ) ROM_END /*************************************************************/ -/* BURNING FORCE */ +/* BURNING FORCE */ /*************************************************************/ ROM_START( burnforc ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "bumpr0c.bin", 0x000000, 0x020000, 0xcc5864c6 ) - ROM_LOAD_ODD( "bumpr1c.bin", 0x000000, 0x020000, 0x3e6b4b1b ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "bu1spr0.bin", 0x000000, 0x010000, 0x17022a21 ) - ROM_LOAD_ODD( "bu1spr1.bin", 0x000000, 0x010000, 0x5255f8a5 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "busnd0.bin", 0x00c000, 0x004000, 0xfabb1150 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "buobj0.bin", 0x000000, 0x24c919a1 ) - NAMCOS2_GFXROM_LOAD_512K( "buobj1.bin", 0x080000, 0x5bcb519b ) - NAMCOS2_GFXROM_LOAD_512K( "buobj2.bin", 0x100000, 0x509dd5d0 ) - NAMCOS2_GFXROM_LOAD_512K( "buobj3.bin", 0x180000, 0x270a161e ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "buchr0.bin", 0x000000, 0xc2109f73 ) - NAMCOS2_GFXROM_LOAD_128K( "buchr1.bin", 0x080000, 0x67d6aa67 ) - NAMCOS2_GFXROM_LOAD_128K( "buchr2.bin", 0x100000, 0x52846eff ) - NAMCOS2_GFXROM_LOAD_128K( "buchr3.bin", 0x180000, 0xd1326d7f ) - NAMCOS2_GFXROM_LOAD_128K( "buchr4.bin", 0x200000, 0x81a66286 ) - NAMCOS2_GFXROM_LOAD_128K( "buchr5.bin", 0x280000, 0x629aa67f ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "buroz0.bin", 0x000000, 0x65fefc83 ) - NAMCOS2_GFXROM_LOAD_128K( "buroz1.bin", 0x080000, 0x979580c2 ) - NAMCOS2_GFXROM_LOAD_128K( "buroz2.bin", 0x100000, 0x548b6ad8 ) - NAMCOS2_GFXROM_LOAD_128K( "buroz3.bin", 0x180000, 0xa633cea0 ) - NAMCOS2_GFXROM_LOAD_128K( "buroz4.bin", 0x200000, 0x1b1f56a6 ) - NAMCOS2_GFXROM_LOAD_128K( "buroz5.bin", 0x280000, 0x4b864b0e ) - NAMCOS2_GFXROM_LOAD_128K( "buroz6.bin", 0x300000, 0x38bd25ba ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "bushape.bin", 0x000000,0x80a6b722 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "bu1dat0.bin", 0x000000, 0xe0a9d92f ) - NAMCOS2_DATA_LOAD_O_128K( "bu1dat1.bin", 0x000000, 0x5fe54b73 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "buvoi1.bin", 0x000000, 0x080000, 0x99d8a239 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "bumpr0c.bin", 0x000000, 0x020000, 0xcc5864c6 ) + ROM_LOAD_ODD( "bumpr1c.bin", 0x000000, 0x020000, 0x3e6b4b1b ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "bu1spr0.bin", 0x000000, 0x010000, 0x17022a21 ) + ROM_LOAD_ODD( "bu1spr1.bin", 0x000000, 0x010000, 0x5255f8a5 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "busnd0.bin", 0x00c000, 0x004000, 0xfabb1150 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "buobj0.bin", 0x000000, 0x24c919a1 ) + NAMCOS2_GFXROM_LOAD_512K( "buobj1.bin", 0x080000, 0x5bcb519b ) + NAMCOS2_GFXROM_LOAD_512K( "buobj2.bin", 0x100000, 0x509dd5d0 ) + NAMCOS2_GFXROM_LOAD_512K( "buobj3.bin", 0x180000, 0x270a161e ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "buchr0.bin", 0x000000, 0xc2109f73 ) + NAMCOS2_GFXROM_LOAD_128K( "buchr1.bin", 0x080000, 0x67d6aa67 ) + NAMCOS2_GFXROM_LOAD_128K( "buchr2.bin", 0x100000, 0x52846eff ) + NAMCOS2_GFXROM_LOAD_128K( "buchr3.bin", 0x180000, 0xd1326d7f ) + NAMCOS2_GFXROM_LOAD_128K( "buchr4.bin", 0x200000, 0x81a66286 ) + NAMCOS2_GFXROM_LOAD_128K( "buchr5.bin", 0x280000, 0x629aa67f ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "buroz0.bin", 0x000000, 0x65fefc83 ) + NAMCOS2_GFXROM_LOAD_128K( "buroz1.bin", 0x080000, 0x979580c2 ) + NAMCOS2_GFXROM_LOAD_128K( "buroz2.bin", 0x100000, 0x548b6ad8 ) + NAMCOS2_GFXROM_LOAD_128K( "buroz3.bin", 0x180000, 0xa633cea0 ) + NAMCOS2_GFXROM_LOAD_128K( "buroz4.bin", 0x200000, 0x1b1f56a6 ) + NAMCOS2_GFXROM_LOAD_128K( "buroz5.bin", 0x280000, 0x4b864b0e ) + NAMCOS2_GFXROM_LOAD_128K( "buroz6.bin", 0x300000, 0x38bd25ba ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "bushape.bin", 0x000000,0x80a6b722 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "bu1dat0.bin", 0x000000, 0xe0a9d92f ) + NAMCOS2_DATA_LOAD_O_128K( "bu1dat1.bin", 0x000000, 0x5fe54b73 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "buvoi1.bin", 0x000000, 0x080000, 0x99d8a239 ) ROM_END /*************************************************************/ -/* COSMO GANG THE VIDEO (USA) */ +/* COSMO GANG THE VIDEO (USA) */ /*************************************************************/ ROM_START( cosmogng ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "co2_mp0", 0x000000, 0x020000, 0x2632c209 ) - ROM_LOAD_ODD( "co2_mp1", 0x000000, 0x020000, 0x65840104 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "co1spr0.bin", 0x000000, 0x020000, 0xbba2c28f ) - ROM_LOAD_ODD( "co1spr1.bin", 0x000000, 0x020000, 0xc029b459 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "co2_s0", 0x00c000, 0x004000, 0x4ca59338 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "co1obj0.bin", 0x000000, 0x5df8ce0c ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj1.bin", 0x080000, 0x3d152497 ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj2.bin", 0x100000, 0x4e50b6ee ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj3.bin", 0x180000, 0x7beed669 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xee375b3e ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x0149de65 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr2.bin", 0x100000, 0x93d565a0 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr3.bin", 0x180000, 0x4d971364 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1roz0.bin", 0x000000, 0x2bea6951 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "co1sha0.bin", 0x000000, 0x063a70cc ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "co1dat0.bin", 0x000000, 0xb53da2ae ) - NAMCOS2_DATA_LOAD_O_128K( "co1dat1.bin", 0x000000, 0xd21ad10b ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "co2_v1", 0x000000, 0x080000, 0x5a301349 ) - ROM_LOAD( "co2_v2", 0x080000, 0x080000, 0xa27cb45a ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "co2_mp0", 0x000000, 0x020000, 0x2632c209 ) + ROM_LOAD_ODD( "co2_mp1", 0x000000, 0x020000, 0x65840104 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "co1spr0.bin", 0x000000, 0x020000, 0xbba2c28f ) + ROM_LOAD_ODD( "co1spr1.bin", 0x000000, 0x020000, 0xc029b459 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "co2_s0", 0x00c000, 0x004000, 0x4ca59338 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "co1obj0.bin", 0x000000, 0x5df8ce0c ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj1.bin", 0x080000, 0x3d152497 ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj2.bin", 0x100000, 0x4e50b6ee ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj3.bin", 0x180000, 0x7beed669 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xee375b3e ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x0149de65 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr2.bin", 0x100000, 0x93d565a0 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr3.bin", 0x180000, 0x4d971364 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1roz0.bin", 0x000000, 0x2bea6951 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "co1sha0.bin", 0x000000, 0x063a70cc ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "co1dat0.bin", 0x000000, 0xb53da2ae ) + NAMCOS2_DATA_LOAD_O_128K( "co1dat1.bin", 0x000000, 0xd21ad10b ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "co2_v1", 0x000000, 0x080000, 0x5a301349 ) + ROM_LOAD( "co2_v2", 0x080000, 0x080000, 0xa27cb45a ) ROM_END /*************************************************************/ -/* COSMO GANG THE VIDEO (JAPAN) */ +/* COSMO GANG THE VIDEO (JAPAN) */ /*************************************************************/ ROM_START( cosmognj ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "co1mpr0.bin", 0x000000, 0x020000, 0xd1b4c8db ) - ROM_LOAD_ODD( "co1mpr1.bin", 0x000000, 0x020000, 0x2f391906 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "co1spr0.bin", 0x000000, 0x020000, 0xbba2c28f ) - ROM_LOAD_ODD( "co1spr1.bin", 0x000000, 0x020000, 0xc029b459 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "co1snd0.bin", 0x00c000, 0x004000, 0x6bfa619f ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "co1obj0.bin", 0x000000, 0x5df8ce0c ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj1.bin", 0x080000, 0x3d152497 ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj2.bin", 0x100000, 0x4e50b6ee ) - NAMCOS2_GFXROM_LOAD_512K( "co1obj3.bin", 0x180000, 0x7beed669 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xee375b3e ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x0149de65 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr2.bin", 0x100000, 0x93d565a0 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr3.bin", 0x180000, 0x4d971364 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1roz0.bin", 0x000000, 0x2bea6951 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "co1sha0.bin", 0x000000, 0x063a70cc ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "co1dat0.bin", 0x000000, 0xb53da2ae ) - NAMCOS2_DATA_LOAD_O_128K( "co1dat1.bin", 0x000000, 0xd21ad10b ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "co1voi1.bin", 0x000000, 0x080000, 0xb5ba8f15 ) - ROM_LOAD( "co1voi2.bin", 0x080000, 0x080000, 0xb566b105 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "co1mpr0.bin", 0x000000, 0x020000, 0xd1b4c8db ) + ROM_LOAD_ODD( "co1mpr1.bin", 0x000000, 0x020000, 0x2f391906 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "co1spr0.bin", 0x000000, 0x020000, 0xbba2c28f ) + ROM_LOAD_ODD( "co1spr1.bin", 0x000000, 0x020000, 0xc029b459 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "co1snd0.bin", 0x00c000, 0x004000, 0x6bfa619f ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "co1obj0.bin", 0x000000, 0x5df8ce0c ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj1.bin", 0x080000, 0x3d152497 ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj2.bin", 0x100000, 0x4e50b6ee ) + NAMCOS2_GFXROM_LOAD_512K( "co1obj3.bin", 0x180000, 0x7beed669 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xee375b3e ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x0149de65 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr2.bin", 0x100000, 0x93d565a0 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr3.bin", 0x180000, 0x4d971364 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1roz0.bin", 0x000000, 0x2bea6951 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "co1sha0.bin", 0x000000, 0x063a70cc ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "co1dat0.bin", 0x000000, 0xb53da2ae ) + NAMCOS2_DATA_LOAD_O_128K( "co1dat1.bin", 0x000000, 0xd21ad10b ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "co1voi1.bin", 0x000000, 0x080000, 0xb5ba8f15 ) + ROM_LOAD( "co1voi2.bin", 0x080000, 0x080000, 0xb566b105 ) ROM_END /*************************************************************/ -/* DIRT FOX (JAPAN) */ +/* DIRT FOX (JAPAN) */ /*************************************************************/ ROM_START( dirtfoxj ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "df1_mpr0.bin", 0x000000, 0x020000, 0x8386c820 ) - ROM_LOAD_ODD( "df1_mpr1.bin", 0x000000, 0x020000, 0x51085728 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "df1_spr0.bin", 0x000000, 0x020000, 0xd4906585 ) - ROM_LOAD_ODD( "df1_spr1.bin", 0x000000, 0x020000, 0x7d76cf57 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "df1_snd0.bin", 0x00c000, 0x004000, 0x66b4f3ab ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "df1_obj0.bin", 0x000000, 0xb6bd1a68 ) - NAMCOS2_GFXROM_LOAD_512K( "df1_obj1.bin", 0x080000, 0x05421dc1 ) - NAMCOS2_GFXROM_LOAD_512K( "df1_obj2.bin", 0x100000, 0x9390633e ) - NAMCOS2_GFXROM_LOAD_512K( "df1_obj3.bin", 0x180000, 0xc8447b33 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "df1_chr0.bin", 0x000000, 0x4b10e4ed ) - NAMCOS2_GFXROM_LOAD_128K( "df1_chr1.bin", 0x080000, 0x8f63f3d6 ) - NAMCOS2_GFXROM_LOAD_128K( "df1_chr2.bin", 0x100000, 0x5a1b852a ) - NAMCOS2_GFXROM_LOAD_128K( "df1_chr3.bin", 0x180000, 0x28570676 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_256K( "df1_roz0.bin", 0x000000, 0xa6129f94 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz1.bin", 0x080000, 0xc8e7ce73 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz2.bin", 0x100000, 0xc598e923 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz3.bin", 0x180000, 0x5a38b062 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz4.bin", 0x200000, 0xe196d2e8 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz5.bin", 0x280000, 0x1f8a1a3c ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz6.bin", 0x300000, 0x7f3a1ed9 ) - NAMCOS2_GFXROM_LOAD_256K( "df1_roz7.bin", 0x380000, 0xdd546ae8 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "df1_sha.bin", 0x000000, 0x9a7c9a9b ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_256K( "df1_dat0.bin", 0x000000, 0xf5851c85 ) - NAMCOS2_DATA_LOAD_O_256K( "df1_dat1.bin", 0x000000, 0x1a31e46b ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "df1_voi1.bin", 0x000000, 0x080000, 0x15053904 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "df1_mpr0.bin", 0x000000, 0x020000, 0x8386c820 ) + ROM_LOAD_ODD( "df1_mpr1.bin", 0x000000, 0x020000, 0x51085728 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "df1_spr0.bin", 0x000000, 0x020000, 0xd4906585 ) + ROM_LOAD_ODD( "df1_spr1.bin", 0x000000, 0x020000, 0x7d76cf57 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "df1_snd0.bin", 0x00c000, 0x004000, 0x66b4f3ab ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "df1_obj0.bin", 0x000000, 0xb6bd1a68 ) + NAMCOS2_GFXROM_LOAD_512K( "df1_obj1.bin", 0x080000, 0x05421dc1 ) + NAMCOS2_GFXROM_LOAD_512K( "df1_obj2.bin", 0x100000, 0x9390633e ) + NAMCOS2_GFXROM_LOAD_512K( "df1_obj3.bin", 0x180000, 0xc8447b33 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "df1_chr0.bin", 0x000000, 0x4b10e4ed ) + NAMCOS2_GFXROM_LOAD_128K( "df1_chr1.bin", 0x080000, 0x8f63f3d6 ) + NAMCOS2_GFXROM_LOAD_128K( "df1_chr2.bin", 0x100000, 0x5a1b852a ) + NAMCOS2_GFXROM_LOAD_128K( "df1_chr3.bin", 0x180000, 0x28570676 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "df1_roz0.bin", 0x000000, 0xa6129f94 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz1.bin", 0x080000, 0xc8e7ce73 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz2.bin", 0x100000, 0xc598e923 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz3.bin", 0x180000, 0x5a38b062 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz4.bin", 0x200000, 0xe196d2e8 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz5.bin", 0x280000, 0x1f8a1a3c ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz6.bin", 0x300000, 0x7f3a1ed9 ) + NAMCOS2_GFXROM_LOAD_256K( "df1_roz7.bin", 0x380000, 0xdd546ae8 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "df1_sha.bin", 0x000000, 0x9a7c9a9b ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_256K( "df1_dat0.bin", 0x000000, 0xf5851c85 ) + NAMCOS2_DATA_LOAD_O_256K( "df1_dat1.bin", 0x000000, 0x1a31e46b ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "df1_voi1.bin", 0x000000, 0x080000, 0x15053904 ) ROM_END /*************************************************************/ -/* DRAGON SABER */ +/* DRAGON SABER */ /*************************************************************/ ROM_START( dsaber ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x020000, 0x45309ddc ) - ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x020000, 0xcbfc4cba ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x013faf80 ) - ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0xc36242bb ) - - ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0xaf5b1ff8 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0xc4ca6f3f ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xf08c6648 ) - NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x34e0810d ) - NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0xbccdabf3 ) - NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0x2a60a4b8 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xc6058df6 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x67aaab36 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x32aab758 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0x698e7a3e ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x3e53331f ) - NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0xd5427f11 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xdadf6a57 ) - ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x81078e01 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x020000, 0x45309ddc ) + ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x020000, 0xcbfc4cba ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x013faf80 ) + ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0xc36242bb ) + + ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0xaf5b1ff8 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0xc4ca6f3f ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xf08c6648 ) + NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x34e0810d ) + NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0xbccdabf3 ) + NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0x2a60a4b8 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xc6058df6 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x67aaab36 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x32aab758 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0x698e7a3e ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x3e53331f ) + NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0xd5427f11 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xdadf6a57 ) + ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x81078e01 ) ROM_END /*************************************************************/ -/* DRAGON SABER (JAPAN) */ +/* DRAGON SABER (JAPAN) */ /*************************************************************/ ROM_START( dsaberj ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "do1mpr0b.bin", 0x000000, 0x020000, 0x2898e791 ) - ROM_LOAD_ODD( "do1mpr1b.bin", 0x000000, 0x020000, 0x5fa9778e ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x013faf80 ) - ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0xc36242bb ) - - ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0xaf5b1ff8 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0xc4ca6f3f ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xf08c6648 ) - NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x34e0810d ) - NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0xbccdabf3 ) - NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0x2a60a4b8 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xc6058df6 ) - NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x67aaab36 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x32aab758 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0x698e7a3e ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x3e53331f ) - NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0xd5427f11 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xdadf6a57 ) - ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x81078e01 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "do1mpr0b.bin", 0x000000, 0x020000, 0x2898e791 ) + ROM_LOAD_ODD( "do1mpr1b.bin", 0x000000, 0x020000, 0x5fa9778e ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x013faf80 ) + ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0xc36242bb ) + + ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0xaf5b1ff8 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0xc4ca6f3f ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xf08c6648 ) + NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x34e0810d ) + NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0xbccdabf3 ) + NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0x2a60a4b8 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "co1chr0.bin", 0x000000, 0xc6058df6 ) + NAMCOS2_GFXROM_LOAD_512K( "co1chr1.bin", 0x080000, 0x67aaab36 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x32aab758 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0x698e7a3e ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x3e53331f ) + NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0xd5427f11 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xdadf6a57 ) + ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x81078e01 ) ROM_END /*************************************************************/ -/* FINAL LAP (REV E) */ +/* FINAL LAP (REV E) */ /*************************************************************/ ROM_START( finallap ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fl2mp0e", 0x000000, 0x010000, 0xed805674 ) - ROM_LOAD_ODD( "fl2mp1e", 0x000000, 0x010000, 0x4c1d523b ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) - ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fl1-s0b", 0x00c000, 0x004000, 0xf5d76989 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) - - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - /* No DAT files present in ZIP archive - Must be wrong */ - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) - ROM_RELOAD( 0x020000, 0x020000 ) - ROM_RELOAD( 0x040000, 0x020000 ) - ROM_RELOAD( 0x060000, 0x020000 ) - ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fl2mp0e", 0x000000, 0x010000, 0xed805674 ) + ROM_LOAD_ODD( "fl2mp1e", 0x000000, 0x010000, 0x4c1d523b ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) + ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fl1-s0b", 0x00c000, 0x004000, 0xf5d76989 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) + + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + /* No DAT files present in ZIP archive - Must be wrong */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) + ROM_RELOAD( 0x020000, 0x020000 ) + ROM_RELOAD( 0x040000, 0x020000 ) + ROM_RELOAD( 0x060000, 0x020000 ) + ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END /*************************************************************/ -/* FINAL LAP (revision D) */ +/* FINAL LAP (revision D) */ /*************************************************************/ ROM_START( finalapd ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fl2-mp0d", 0x000000, 0x010000, 0x3576d3aa ) - ROM_LOAD_ODD( "fl2-mp1d", 0x000000, 0x010000, 0x22d3906d ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) - ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fl1-s0b", 0x00c000, 0x004000, 0xf5d76989 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - /* No DAT files present in ZIP archive - Must be wrong */ - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) - ROM_RELOAD( 0x020000, 0x020000 ) - ROM_RELOAD( 0x040000, 0x020000 ) - ROM_RELOAD( 0x060000, 0x020000 ) - ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fl2-mp0d", 0x000000, 0x010000, 0x3576d3aa ) + ROM_LOAD_ODD( "fl2-mp1d", 0x000000, 0x010000, 0x22d3906d ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) + ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fl1-s0b", 0x00c000, 0x004000, 0xf5d76989 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + /* No DAT files present in ZIP archive - Must be wrong */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) + ROM_RELOAD( 0x020000, 0x020000 ) + ROM_RELOAD( 0x040000, 0x020000 ) + ROM_RELOAD( 0x060000, 0x020000 ) + ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END /*************************************************************/ -/* FINAL LAP (revision C) */ +/* FINAL LAP (revision C) */ /*************************************************************/ ROM_START( finalapc ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fl2-mp0c", 0x000000, 0x010000, 0xf667f2c9 ) - ROM_LOAD_ODD( "fl2-mp1c", 0x000000, 0x010000, 0xb8615d33 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) - ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fl1-s0", 0x00c000, 0x004000, 0x1f8ff494 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - /* No DAT files present in ZIP archive - Must be wrong */ - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) - ROM_RELOAD( 0x020000, 0x020000 ) - ROM_RELOAD( 0x040000, 0x020000 ) - ROM_RELOAD( 0x060000, 0x020000 ) - ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fl2-mp0c", 0x000000, 0x010000, 0xf667f2c9 ) + ROM_LOAD_ODD( "fl2-mp1c", 0x000000, 0x010000, 0xb8615d33 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) + ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fl1-s0", 0x00c000, 0x004000, 0x1f8ff494 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + /* No DAT files present in ZIP archive - Must be wrong */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) + ROM_RELOAD( 0x020000, 0x020000 ) + ROM_RELOAD( 0x040000, 0x020000 ) + ROM_RELOAD( 0x060000, 0x020000 ) + ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END /*************************************************************/ -/* FINAL LAP (Rev C - Japan) */ +/* FINAL LAP (Rev C - Japan) */ /*************************************************************/ ROM_START( finlapjc ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fl1_mp0c.bin", 0x000000, 0x010000, 0x63cd7304 ) - ROM_LOAD_ODD( "fl1_mp1c.bin", 0x000000, 0x010000, 0xcc9c5fb6 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) - ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fl1_s0b", 0x00c000, 0x004000, 0xf5d76989 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) - - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - /* No DAT files present in ZIP archive - Must be wrong */ - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) - ROM_RELOAD( 0x020000, 0x020000 ) - ROM_RELOAD( 0x040000, 0x020000 ) - ROM_RELOAD( 0x060000, 0x020000 ) - ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fl1_mp0c.bin", 0x000000, 0x010000, 0x63cd7304 ) + ROM_LOAD_ODD( "fl1_mp1c.bin", 0x000000, 0x010000, 0xcc9c5fb6 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) + ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fl1_s0b", 0x00c000, 0x004000, 0xf5d76989 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) + + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c4", 0x200000, 0x83c77a50 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2-c6", 0x300000, 0x239bd9a0 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fl2-sha", 0x000000, 0x5fda0b6d ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + /* No DAT files present in ZIP archive - Must be wrong */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) + ROM_RELOAD( 0x020000, 0x020000 ) + ROM_RELOAD( 0x040000, 0x020000 ) + ROM_RELOAD( 0x060000, 0x020000 ) + ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END /*************************************************************/ -/* FINAL LAP (REV B - JAPAN) */ +/* FINAL LAP (REV B - JAPAN) */ /*************************************************************/ ROM_START( finlapjb ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fl1_mp0b.bin", 0x000000, 0x010000, 0x870a482a ) - ROM_LOAD_ODD( "fl1_mp1b.bin", 0x000000, 0x010000, 0xaf52c991 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) - ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fl1_s0.bin", 0x00c000, 0x004000, 0x1f8ff494 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) - - NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) - NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) - NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2_c4.bin", 0x200000, 0xcdc1de2e ) - NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) - NAMCOS2_GFXROM_LOAD_128K( "fl2_c6.bin", 0x300000, 0x8e78a3c3 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fl1_sha.bin", 0x000000, 0xb7e1c7a3 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - /* No DAT files present in ZIP archive - Must be wrong */ - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) - ROM_RELOAD( 0x020000, 0x020000 ) - ROM_RELOAD( 0x040000, 0x020000 ) - ROM_RELOAD( 0x060000, 0x020000 ) - ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fl1_mp0b.bin", 0x000000, 0x010000, 0x870a482a ) + ROM_LOAD_ODD( "fl1_mp1b.bin", 0x000000, 0x010000, 0xaf52c991 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fl1-sp0", 0x000000, 0x010000, 0x2c5ff15d ) + ROM_LOAD_ODD( "fl1-sp1", 0x000000, 0x010000, 0xea9d1a2e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fl1_s0.bin", 0x00c000, 0x004000, 0x1f8ff494 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x000000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x080000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x100000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x180000, 0xdba830a2 ) + + NAMCOS2_GFXROM_LOAD_512K( "obj-0b", 0x200000, 0xc6986523 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-1b", 0x280000, 0x6af7d284 ) + NAMCOS2_GFXROM_LOAD_512K( "obj-2b", 0x300000, 0xde45ca8d ) + NAMCOS2_GFXROM_LOAD_512K( "obj-3b", 0x380000, 0xdba830a2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fl1-c0", 0x000000, 0xcd9d2966 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c1", 0x080000, 0xb0efec87 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c2", 0x100000, 0x263b8e31 ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c3", 0x180000, 0xc2c56743 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2_c4.bin", 0x200000, 0xcdc1de2e ) + NAMCOS2_GFXROM_LOAD_128K( "fl1-c5", 0x280000, 0xab89da77 ) + NAMCOS2_GFXROM_LOAD_128K( "fl2_c6.bin", 0x300000, 0x8e78a3c3 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fl1_sha.bin", 0x000000, 0xb7e1c7a3 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + /* No DAT files present in ZIP archive - Must be wrong */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fl1-v1", 0x000000, 0x020000, 0x86b21996 ) + ROM_RELOAD( 0x020000, 0x020000 ) + ROM_RELOAD( 0x040000, 0x020000 ) + ROM_RELOAD( 0x060000, 0x020000 ) + ROM_LOAD( "fl1-v2", 0x080000, 0x020000, 0x6a164647 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END /*************************************************************/ -/* FINAL LAP 2 */ +/* FINAL LAP 2 */ /*************************************************************/ ROM_START( finalap2 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fls2mp0b", 0x000000, 0x020000, 0x97b48aae ) - ROM_LOAD_ODD( "fls2mp1b", 0x000000, 0x020000, 0xc9f3e0e7 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fls2sp0b", 0x000000, 0x020000, 0x8bf15d9c ) - ROM_LOAD_ODD( "fls2sp1b", 0x000000, 0x020000, 0xc1a31086 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "flss0", 0x00c000, 0x004000, 0xc07cc10a ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "fl3obj0", 0x000000, 0xeab19ec6 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj2", 0x080000, 0x2a3b7ded ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj4", 0x100000, 0x84aa500c ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj6", 0x180000, 0x33118e63 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj1", 0x200000, 0x4ef37a51 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj3", 0x280000, 0xb86dc7cd ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj5", 0x300000, 0x6a53e603 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj7", 0x380000, 0xb52a85e2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fls2chr0", 0x000000, 0xb3541a31 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr1", 0x080000, 0xb92fb6f9 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr2", 0x100000, 0x2e386ec8 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr3", 0x180000, 0x970255d3 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr4", 0x200000, 0x1328d87d ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr5", 0x280000, 0x67f535fd ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr6", 0x300000, 0x6aded8ce ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr7", 0x380000, 0x742bae28 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fls2sha", 0x000000, 0x95a63037 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_256K( "fls2dat0", 0x000000, 0xf1af432c ) - NAMCOS2_DATA_LOAD_O_256K( "fls2dat1", 0x000000, 0x8719533e ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "flsvoi1", 0x000000, 0x080000, 0x590be52f ) - ROM_LOAD( "flsvoi2", 0x080000, 0x080000, 0x204b3c27 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fls2mp0b", 0x000000, 0x020000, 0x97b48aae ) + ROM_LOAD_ODD( "fls2mp1b", 0x000000, 0x020000, 0xc9f3e0e7 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fls2sp0b", 0x000000, 0x020000, 0x8bf15d9c ) + ROM_LOAD_ODD( "fls2sp1b", 0x000000, 0x020000, 0xc1a31086 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "flss0", 0x00c000, 0x004000, 0xc07cc10a ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "fl3obj0", 0x000000, 0xeab19ec6 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj2", 0x080000, 0x2a3b7ded ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj4", 0x100000, 0x84aa500c ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj6", 0x180000, 0x33118e63 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj1", 0x200000, 0x4ef37a51 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj3", 0x280000, 0xb86dc7cd ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj5", 0x300000, 0x6a53e603 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj7", 0x380000, 0xb52a85e2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fls2chr0", 0x000000, 0xb3541a31 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr1", 0x080000, 0xb92fb6f9 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr2", 0x100000, 0x2e386ec8 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr3", 0x180000, 0x970255d3 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr4", 0x200000, 0x1328d87d ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr5", 0x280000, 0x67f535fd ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr6", 0x300000, 0x6aded8ce ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr7", 0x380000, 0x742bae28 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fls2sha", 0x000000, 0x95a63037 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_256K( "fls2dat0", 0x000000, 0xf1af432c ) + NAMCOS2_DATA_LOAD_O_256K( "fls2dat1", 0x000000, 0x8719533e ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "flsvoi1", 0x000000, 0x080000, 0x590be52f ) + ROM_LOAD( "flsvoi2", 0x080000, 0x080000, 0x204b3c27 ) ROM_END /*************************************************************/ -/* FINAL LAP 2 (Japan) */ +/* FINAL LAP 2 (Japan) */ /*************************************************************/ ROM_START( finalp2j ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fls1_mp0.bin", 0x000000, 0x020000, 0x05ea8090 ) - ROM_LOAD_ODD( "fls1_mp1.bin", 0x000000, 0x020000, 0xfb189f50 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fls2sp0b", 0x000000, 0x020000, 0x8bf15d9c ) - ROM_LOAD_ODD( "fls2sp1b", 0x000000, 0x020000, 0xc1a31086 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "flss0", 0x00c000, 0x004000, 0xc07cc10a ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "fl3obj0", 0x000000, 0xeab19ec6 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj2", 0x080000, 0x2a3b7ded ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj4", 0x100000, 0x84aa500c ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj6", 0x180000, 0x33118e63 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj1", 0x200000, 0x4ef37a51 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj3", 0x280000, 0xb86dc7cd ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj5", 0x300000, 0x6a53e603 ) - NAMCOS2_GFXROM_LOAD_512K( "fl3obj7", 0x380000, 0xb52a85e2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fls2chr0", 0x000000, 0xb3541a31 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr1", 0x080000, 0xb92fb6f9 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr2", 0x100000, 0x2e386ec8 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr3", 0x180000, 0x970255d3 ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr4", 0x200000, 0x1328d87d ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr5", 0x280000, 0x67f535fd ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr6", 0x300000, 0x6aded8ce ) - NAMCOS2_GFXROM_LOAD_128K( "fls2chr7", 0x380000, 0x742bae28 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fls2sha", 0x000000, 0x95a63037 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_256K( "fls2dat0", 0x000000, 0xf1af432c ) - NAMCOS2_DATA_LOAD_O_256K( "fls2dat1", 0x000000, 0x8719533e ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "flsvoi1", 0x000000, 0x080000, 0x590be52f ) - ROM_LOAD( "flsvoi2", 0x080000, 0x080000, 0x204b3c27 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fls1_mp0.bin", 0x000000, 0x020000, 0x05ea8090 ) + ROM_LOAD_ODD( "fls1_mp1.bin", 0x000000, 0x020000, 0xfb189f50 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fls2sp0b", 0x000000, 0x020000, 0x8bf15d9c ) + ROM_LOAD_ODD( "fls2sp1b", 0x000000, 0x020000, 0xc1a31086 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "flss0", 0x00c000, 0x004000, 0xc07cc10a ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "fl3obj0", 0x000000, 0xeab19ec6 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj2", 0x080000, 0x2a3b7ded ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj4", 0x100000, 0x84aa500c ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj6", 0x180000, 0x33118e63 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj1", 0x200000, 0x4ef37a51 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj3", 0x280000, 0xb86dc7cd ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj5", 0x300000, 0x6a53e603 ) + NAMCOS2_GFXROM_LOAD_512K( "fl3obj7", 0x380000, 0xb52a85e2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fls2chr0", 0x000000, 0xb3541a31 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr1", 0x080000, 0xb92fb6f9 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr2", 0x100000, 0x2e386ec8 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr3", 0x180000, 0x970255d3 ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr4", 0x200000, 0x1328d87d ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr5", 0x280000, 0x67f535fd ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr6", 0x300000, 0x6aded8ce ) + NAMCOS2_GFXROM_LOAD_128K( "fls2chr7", 0x380000, 0x742bae28 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fls2sha", 0x000000, 0x95a63037 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_256K( "fls2dat0", 0x000000, 0xf1af432c ) + NAMCOS2_DATA_LOAD_O_256K( "fls2dat1", 0x000000, 0x8719533e ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "flsvoi1", 0x000000, 0x080000, 0x590be52f ) + ROM_LOAD( "flsvoi2", 0x080000, 0x080000, 0x204b3c27 ) ROM_END /*************************************************************/ -/* FINAL LAP 3 */ +/* FINAL LAP 3 */ /*************************************************************/ ROM_START( finalap3 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fltmp0", 0x000000, 0x020000, 0x2f2a997a ) - ROM_LOAD_ODD( "fltmp1", 0x000000, 0x020000, 0xb505ca0b ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "flt1sp0", 0x000000, 0x020000, 0xe804ced1 ) - ROM_LOAD_ODD( "flt1sp1", 0x000000, 0x020000, 0x3a2b24ee ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "flt1snd0", 0x00c000, 0x004000, 0x60b72aed ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "fltobj0", 0x000000, 0xeab19ec6 ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj2", 0x080000, 0x2a3b7ded ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj4", 0x100000, 0x84aa500c ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj6", 0x180000, 0x33118e63 ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj1", 0x200000, 0x4ef37a51 ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj3", 0x280000, 0xb86dc7cd ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj5", 0x300000, 0x6a53e603 ) - NAMCOS2_GFXROM_LOAD_512K( "fltobj7", 0x380000, 0xb52a85e2 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fltchr0", 0x000000, 0x93d58fbb ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr1", 0x080000, 0xabbc411b ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr2", 0x100000, 0x7de05a4a ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr3", 0x180000, 0xac4e9b8a ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr4", 0x200000, 0x55c3434d ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr5", 0x280000, 0xfbaa5c89 ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr6", 0x300000, 0xe90279ce ) - NAMCOS2_GFXROM_LOAD_128K( "fltchr7", 0x380000, 0xb9c1ea47 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fltsha", 0x000000, 0x089dc194 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "flt1d0", 0x000000, 0x80004966 ) - NAMCOS2_DATA_LOAD_O_128K( "flt1d1", 0x000000, 0xa2e93e8c ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fltvoi1", 0x000000, 0x080000, 0x4fc7c0ba ) - ROM_LOAD( "fltvoi2", 0x080000, 0x080000, 0x409c62df ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fltmp0", 0x000000, 0x020000, 0x2f2a997a ) + ROM_LOAD_ODD( "fltmp1", 0x000000, 0x020000, 0xb505ca0b ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "flt1sp0", 0x000000, 0x020000, 0xe804ced1 ) + ROM_LOAD_ODD( "flt1sp1", 0x000000, 0x020000, 0x3a2b24ee ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "flt1snd0", 0x00c000, 0x004000, 0x60b72aed ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "fltobj0", 0x000000, 0xeab19ec6 ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj2", 0x080000, 0x2a3b7ded ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj4", 0x100000, 0x84aa500c ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj6", 0x180000, 0x33118e63 ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj1", 0x200000, 0x4ef37a51 ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj3", 0x280000, 0xb86dc7cd ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj5", 0x300000, 0x6a53e603 ) + NAMCOS2_GFXROM_LOAD_512K( "fltobj7", 0x380000, 0xb52a85e2 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fltchr0", 0x000000, 0x93d58fbb ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr1", 0x080000, 0xabbc411b ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr2", 0x100000, 0x7de05a4a ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr3", 0x180000, 0xac4e9b8a ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr4", 0x200000, 0x55c3434d ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr5", 0x280000, 0xfbaa5c89 ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr6", 0x300000, 0xe90279ce ) + NAMCOS2_GFXROM_LOAD_128K( "fltchr7", 0x380000, 0xb9c1ea47 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fltsha", 0x000000, 0x089dc194 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "flt1d0", 0x000000, 0x80004966 ) + NAMCOS2_DATA_LOAD_O_128K( "flt1d1", 0x000000, 0xa2e93e8c ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fltvoi1", 0x000000, 0x080000, 0x4fc7c0ba ) + ROM_LOAD( "fltvoi2", 0x080000, 0x080000, 0x409c62df ) ROM_END /*************************************************************/ -/* FINEST HOUR */ +/* FINEST HOUR */ /*************************************************************/ ROM_START( finehour ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fh1_mp0.bin", 0x000000, 0x020000, 0x355d9119 ) - ROM_LOAD_ODD( "fh1_mp1.bin", 0x000000, 0x020000, 0x647eb621 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fh1_sp0.bin", 0x000000, 0x020000, 0xaa6289e9 ) - ROM_LOAD_ODD( "fh1_sp1.bin", 0x000000, 0x020000, 0x8532d5c7 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fh1_sd0.bin", 0x00c000, 0x004000, 0x059a9cfd ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "fh1_ob0.bin", 0x000000, 0xb1fd86f1 ) - NAMCOS2_GFXROM_LOAD_512K( "fh1_ob1.bin", 0x080000, 0x519c44ce ) - NAMCOS2_GFXROM_LOAD_512K( "fh1_ob2.bin", 0x100000, 0x9c5de4fa ) - NAMCOS2_GFXROM_LOAD_512K( "fh1_ob3.bin", 0x180000, 0x54d4edce ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch0.bin", 0x000000, 0x516900d1 ) - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch1.bin", 0x080000, 0x964d06bd ) - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch2.bin", 0x100000, 0xfbb9449e ) - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch3.bin", 0x180000, 0xc18eda8a ) - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch4.bin", 0x200000, 0x80dd188a ) - NAMCOS2_GFXROM_LOAD_256K( "fh1_ch5.bin", 0x280000, 0x40969876 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz0.bin", 0x000000, 0x6c96c5c1 ) - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz1.bin", 0x080000, 0x44699eb9 ) - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz2.bin", 0x100000, 0x5ec14abf ) - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz3.bin", 0x180000, 0x9f5a91b2 ) - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz4.bin", 0x200000, 0x0b4379e6 ) - NAMCOS2_GFXROM_LOAD_128K( "fh1_rz5.bin", 0x280000, 0xe034e560 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_256K( "fh1_sha.bin", 0x000000, 0x15875eb0 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "fh1_dt0.bin", 0x000000, 0x2441c26f ) - NAMCOS2_DATA_LOAD_O_128K( "fh1_dt1.bin", 0x000000, 0x48154deb ) - NAMCOS2_DATA_LOAD_E_128K( "fh1_dt2.bin", 0x100000, 0x12453ba4 ) - NAMCOS2_DATA_LOAD_O_128K( "fh1_dt3.bin", 0x100000, 0x50bab9da ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fh1_vo1.bin", 0x000000, 0x080000, 0x07560fc7 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fh1_mp0.bin", 0x000000, 0x020000, 0x355d9119 ) + ROM_LOAD_ODD( "fh1_mp1.bin", 0x000000, 0x020000, 0x647eb621 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fh1_sp0.bin", 0x000000, 0x020000, 0xaa6289e9 ) + ROM_LOAD_ODD( "fh1_sp1.bin", 0x000000, 0x020000, 0x8532d5c7 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fh1_sd0.bin", 0x00c000, 0x004000, 0x059a9cfd ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "fh1_ob0.bin", 0x000000, 0xb1fd86f1 ) + NAMCOS2_GFXROM_LOAD_512K( "fh1_ob1.bin", 0x080000, 0x519c44ce ) + NAMCOS2_GFXROM_LOAD_512K( "fh1_ob2.bin", 0x100000, 0x9c5de4fa ) + NAMCOS2_GFXROM_LOAD_512K( "fh1_ob3.bin", 0x180000, 0x54d4edce ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch0.bin", 0x000000, 0x516900d1 ) + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch1.bin", 0x080000, 0x964d06bd ) + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch2.bin", 0x100000, 0xfbb9449e ) + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch3.bin", 0x180000, 0xc18eda8a ) + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch4.bin", 0x200000, 0x80dd188a ) + NAMCOS2_GFXROM_LOAD_256K( "fh1_ch5.bin", 0x280000, 0x40969876 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz0.bin", 0x000000, 0x6c96c5c1 ) + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz1.bin", 0x080000, 0x44699eb9 ) + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz2.bin", 0x100000, 0x5ec14abf ) + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz3.bin", 0x180000, 0x9f5a91b2 ) + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz4.bin", 0x200000, 0x0b4379e6 ) + NAMCOS2_GFXROM_LOAD_128K( "fh1_rz5.bin", 0x280000, 0xe034e560 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_256K( "fh1_sha.bin", 0x000000, 0x15875eb0 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "fh1_dt0.bin", 0x000000, 0x2441c26f ) + NAMCOS2_DATA_LOAD_O_128K( "fh1_dt1.bin", 0x000000, 0x48154deb ) + NAMCOS2_DATA_LOAD_E_128K( "fh1_dt2.bin", 0x100000, 0x12453ba4 ) + NAMCOS2_DATA_LOAD_O_128K( "fh1_dt3.bin", 0x100000, 0x50bab9da ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fh1_vo1.bin", 0x000000, 0x080000, 0x07560fc7 ) ROM_END /*************************************************************/ -/* FOUR TRAX */ +/* FOUR TRAX */ /*************************************************************/ ROM_START( fourtrax ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "fx2mp0", 0x000000, 0x020000, 0xf147cd6b ) - ROM_LOAD_ODD( "fx2mp1", 0x000000, 0x020000, 0x8af4a309 ) -// ROM_LOAD_ODD( "fx2mp1", 0x000000, 0x020000, 0xd1138c85 ) BAD ROM ? - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "fx2sp0", 0x000000, 0x020000, 0x48548e78 ) - ROM_LOAD_ODD( "fx2sp1", 0x000000, 0x020000, 0xd2861383 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "fx1sd0", 0x00c000, 0x004000, 0xacccc934 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - ROM_LOAD( "fxobj0", 0x000000, 0x040000, 0x1aa60ffa ) - ROM_LOAD( "fxobj2", 0x040000, 0x040000, 0x243affc7 ) - ROM_LOAD( "fxobj4", 0x080000, 0x040000, 0x30add52a ) - ROM_LOAD( "fxobj6", 0x0c0000, 0x040000, 0xa2d5ce4a ) - ROM_LOAD( "fxobj8", 0x100000, 0x040000, 0xb165acab ) - ROM_LOAD( "fxobj10", 0x140000, 0x040000, 0x7a01e86f ) - ROM_LOAD( "fxobj12", 0x180000, 0x040000, 0xf5e23b78 ) - ROM_LOAD( "fxobj14", 0x1c0000, 0x040000, 0xc1658c77 ) - ROM_LOAD( "fxobj1", 0x200000, 0x040000, 0x7509bc09 ) - ROM_LOAD( "fxobj3", 0x240000, 0x040000, 0xb7e5d17d ) - ROM_LOAD( "fxobj5", 0x280000, 0x040000, 0xe3cd2776 ) - ROM_LOAD( "fxobj7", 0x2c0000, 0x040000, 0x4d91c929 ) - ROM_LOAD( "fxobj9", 0x300000, 0x040000, 0x90f0735b ) - ROM_LOAD( "fxobj11", 0x340000, 0x040000, 0x514b3fe5 ) - ROM_LOAD( "fxobj13", 0x380000, 0x040000, 0x04a25007 ) - ROM_LOAD( "fxobj15", 0x3c0000, 0x040000, 0x2bc909b3 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "fxchr0", 0x000000, 0x6658c1c3 ) - NAMCOS2_GFXROM_LOAD_128K( "fxchr1", 0x080000, 0x3a888943 ) - NAMCOS2_GFXROM_LOAD_128K( "fxch2", 0x100000, 0xfdf1e86b ) -// NAMCOS2_GFXROM_LOAD_128K( "fxchr2a", 0x100000, 0xa5d1ab10 ) BAD ROM - NAMCOS2_GFXROM_LOAD_128K( "fxchr3", 0x180000, 0x47fa7e61 ) - NAMCOS2_GFXROM_LOAD_128K( "fxchr4", 0x200000, 0xc720c5f5 ) - NAMCOS2_GFXROM_LOAD_128K( "fxchr5", 0x280000, 0x9eacdbc8 ) - NAMCOS2_GFXROM_LOAD_128K( "fxchr6", 0x300000, 0xc3dba42e ) - NAMCOS2_GFXROM_LOAD_128K( "fxchr7", 0x380000, 0xc009f3ae ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files in zip, not sure if they are missing ? */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "fxsha", 0x000000, 0xf7aa4af7 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_256K( "fxdat0", 0x000000, 0x63abf69b ) - NAMCOS2_DATA_LOAD_O_256K( "fxdat1", 0x000000, 0x725bed14 ) - NAMCOS2_DATA_LOAD_E_256K( "fxdat2", 0x100000, 0x71e4a5a0 ) - NAMCOS2_DATA_LOAD_O_256K( "fxdat3", 0x100000, 0x605725f7 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "fxvoi1", 0x000000, 0x080000, 0x6173364f ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "fx2mp0", 0x000000, 0x020000, 0xf147cd6b ) + ROM_LOAD_ODD( "fx2mp1", 0x000000, 0x020000, 0x8af4a309 ) +// ROM_LOAD_ODD( "fx2mp1", 0x000000, 0x020000, 0xd1138c85 ) BAD ROM ? + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "fx2sp0", 0x000000, 0x020000, 0x48548e78 ) + ROM_LOAD_ODD( "fx2sp1", 0x000000, 0x020000, 0xd2861383 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "fx1sd0", 0x00c000, 0x004000, 0xacccc934 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + ROM_LOAD( "fxobj0", 0x000000, 0x040000, 0x1aa60ffa ) + ROM_LOAD( "fxobj2", 0x040000, 0x040000, 0x243affc7 ) + ROM_LOAD( "fxobj4", 0x080000, 0x040000, 0x30add52a ) + ROM_LOAD( "fxobj6", 0x0c0000, 0x040000, 0xa2d5ce4a ) + ROM_LOAD( "fxobj8", 0x100000, 0x040000, 0xb165acab ) + ROM_LOAD( "fxobj10", 0x140000, 0x040000, 0x7a01e86f ) + ROM_LOAD( "fxobj12", 0x180000, 0x040000, 0xf5e23b78 ) + ROM_LOAD( "fxobj14", 0x1c0000, 0x040000, 0xc1658c77 ) + ROM_LOAD( "fxobj1", 0x200000, 0x040000, 0x7509bc09 ) + ROM_LOAD( "fxobj3", 0x240000, 0x040000, 0xb7e5d17d ) + ROM_LOAD( "fxobj5", 0x280000, 0x040000, 0xe3cd2776 ) + ROM_LOAD( "fxobj7", 0x2c0000, 0x040000, 0x4d91c929 ) + ROM_LOAD( "fxobj9", 0x300000, 0x040000, 0x90f0735b ) + ROM_LOAD( "fxobj11", 0x340000, 0x040000, 0x514b3fe5 ) + ROM_LOAD( "fxobj13", 0x380000, 0x040000, 0x04a25007 ) + ROM_LOAD( "fxobj15", 0x3c0000, 0x040000, 0x2bc909b3 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "fxchr0", 0x000000, 0x6658c1c3 ) + NAMCOS2_GFXROM_LOAD_128K( "fxchr1", 0x080000, 0x3a888943 ) + NAMCOS2_GFXROM_LOAD_128K( "fxch2", 0x100000, 0xfdf1e86b ) +// NAMCOS2_GFXROM_LOAD_128K( "fxchr2a", 0x100000, 0xa5d1ab10 ) BAD ROM + NAMCOS2_GFXROM_LOAD_128K( "fxchr3", 0x180000, 0x47fa7e61 ) + NAMCOS2_GFXROM_LOAD_128K( "fxchr4", 0x200000, 0xc720c5f5 ) + NAMCOS2_GFXROM_LOAD_128K( "fxchr5", 0x280000, 0x9eacdbc8 ) + NAMCOS2_GFXROM_LOAD_128K( "fxchr6", 0x300000, 0xc3dba42e ) + NAMCOS2_GFXROM_LOAD_128K( "fxchr7", 0x380000, 0xc009f3ae ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files in zip, not sure if they are missing ? */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "fxsha", 0x000000, 0xf7aa4af7 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_256K( "fxdat0", 0x000000, 0x63abf69b ) + NAMCOS2_DATA_LOAD_O_256K( "fxdat1", 0x000000, 0x725bed14 ) + NAMCOS2_DATA_LOAD_E_256K( "fxdat2", 0x100000, 0x71e4a5a0 ) + NAMCOS2_DATA_LOAD_O_256K( "fxdat3", 0x100000, 0x605725f7 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "fxvoi1", 0x000000, 0x080000, 0x6173364f ) ROM_END /*************************************************************/ -/* MARVEL LAND (USA) */ +/* MARVEL LAND (USA) */ /*************************************************************/ ROM_START( marvland ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mv2_mpr0", 0x000000, 0x020000, 0xd8b14fee ) - ROM_LOAD_ODD( "mv2_mpr1", 0x000000, 0x020000, 0x29ff2738 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "mv2_spr0", 0x000000, 0x010000, 0xaa418f29 ) - ROM_LOAD_ODD( "mv2_spr1", 0x000000, 0x010000, 0xdbd94def ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "mv2_snd0", 0x0c000, 0x04000, 0xa5b99162 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, 0x73a29361 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj1.bin", 0x080000, 0xabbe4a99 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj2.bin", 0x100000, 0x753659e0 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj3.bin", 0x180000, 0xd1ce7339 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr0.bin", 0x000000, 0x1c7e8b4f ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr1.bin", 0x080000, 0x01e4cafd ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr2.bin", 0x100000, 0x198fcc6f ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr3.bin", 0x180000, 0xed6f22a5 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz0.bin", 0x000000, 0x7381a5a9 ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz1.bin", 0x080000, 0xe899482e ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz2.bin", 0x100000, 0xde141290 ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz3.bin", 0x180000, 0xe310324d ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz4.bin", 0x200000, 0x48ddc5a9 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-sha.bin", 0x000000, 0xa47db5d3 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "mv2_dat0", 0x000000, 0x62e6318b ) - NAMCOS2_DATA_LOAD_O_128K( "mv2_dat1", 0x000000, 0x8a6902ca ) - NAMCOS2_DATA_LOAD_E_128K( "mv2_dat2", 0x100000, 0xf5c6408c ) - NAMCOS2_DATA_LOAD_O_128K( "mv2_dat3", 0x100000, 0x6df76955 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "mv2_voi1", 0x000000, 0x040000, 0xb0732d0d ) - ROM_RELOAD( 0x040000, 0x040000 ) - ROM_LOAD( "mv2_voi2", 0x080000, 0x040000, 0xd72d7aaa ) - ROM_RELOAD( 0x0c0000, 0x040000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mv2_mpr0", 0x000000, 0x020000, 0xd8b14fee ) + ROM_LOAD_ODD( "mv2_mpr1", 0x000000, 0x020000, 0x29ff2738 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "mv2_spr0", 0x000000, 0x010000, 0xaa418f29 ) + ROM_LOAD_ODD( "mv2_spr1", 0x000000, 0x010000, 0xdbd94def ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "mv2_snd0", 0x0c000, 0x04000, 0xa5b99162 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, 0x73a29361 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj1.bin", 0x080000, 0xabbe4a99 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj2.bin", 0x100000, 0x753659e0 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj3.bin", 0x180000, 0xd1ce7339 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr0.bin", 0x000000, 0x1c7e8b4f ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr1.bin", 0x080000, 0x01e4cafd ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr2.bin", 0x100000, 0x198fcc6f ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr3.bin", 0x180000, 0xed6f22a5 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz0.bin", 0x000000, 0x7381a5a9 ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz1.bin", 0x080000, 0xe899482e ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz2.bin", 0x100000, 0xde141290 ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz3.bin", 0x180000, 0xe310324d ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz4.bin", 0x200000, 0x48ddc5a9 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-sha.bin", 0x000000, 0xa47db5d3 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "mv2_dat0", 0x000000, 0x62e6318b ) + NAMCOS2_DATA_LOAD_O_128K( "mv2_dat1", 0x000000, 0x8a6902ca ) + NAMCOS2_DATA_LOAD_E_128K( "mv2_dat2", 0x100000, 0xf5c6408c ) + NAMCOS2_DATA_LOAD_O_128K( "mv2_dat3", 0x100000, 0x6df76955 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "mv1-voi1.bin", 0x000000, 0x080000, 0xde5cac09 ) ROM_END /*************************************************************/ -/* MARVEL LAND (JAPAN) */ +/* MARVEL LAND (JAPAN) */ /*************************************************************/ ROM_START( marvlanj ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mv1-mpr0.bin", 0x000000, 0x010000, 0x8369120f ) - ROM_LOAD_ODD( "mv1-mpr1.bin", 0x000000, 0x010000, 0x6d5442cc ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "mv1-spr0.bin", 0x000000, 0x010000, 0xc3909925 ) - ROM_LOAD_ODD( "mv1-spr1.bin", 0x000000, 0x010000, 0x1c5599f5 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "mv1-snd0.bin", 0x0c000, 0x04000, 0x51b8ccd7 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, 0x73a29361 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj1.bin", 0x080000, 0xabbe4a99 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj2.bin", 0x100000, 0x753659e0 ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-obj3.bin", 0x180000, 0xd1ce7339 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr0.bin", 0x000000, 0x1c7e8b4f ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr1.bin", 0x080000, 0x01e4cafd ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr2.bin", 0x100000, 0x198fcc6f ) - NAMCOS2_GFXROM_LOAD_256K( "mv1-chr3.bin", 0x180000, 0xed6f22a5 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz0.bin", 0x000000, 0x7381a5a9 ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz1.bin", 0x080000, 0xe899482e ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz2.bin", 0x100000, 0xde141290 ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz3.bin", 0x180000, 0xe310324d ) - NAMCOS2_GFXROM_LOAD_128K( "mv1-roz4.bin", 0x200000, 0x48ddc5a9 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_256K( "mv1-sha.bin", 0x000000, 0xa47db5d3 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "mv1-dat0.bin", 0x000000, 0xe15f412e ) - NAMCOS2_DATA_LOAD_O_128K( "mv1-dat1.bin", 0x000000, 0x73e1545a ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "mv1-voi1.bin", 0x000000, 0x080000, 0xde5cac09 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mv1-mpr0.bin", 0x000000, 0x010000, 0x8369120f ) + ROM_LOAD_ODD( "mv1-mpr1.bin", 0x000000, 0x010000, 0x6d5442cc ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "mv1-spr0.bin", 0x000000, 0x010000, 0xc3909925 ) + ROM_LOAD_ODD( "mv1-spr1.bin", 0x000000, 0x010000, 0x1c5599f5 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "mv1-snd0.bin", 0x0c000, 0x04000, 0x51b8ccd7 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, 0x73a29361 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj1.bin", 0x080000, 0xabbe4a99 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj2.bin", 0x100000, 0x753659e0 ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-obj3.bin", 0x180000, 0xd1ce7339 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr0.bin", 0x000000, 0x1c7e8b4f ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr1.bin", 0x080000, 0x01e4cafd ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr2.bin", 0x100000, 0x198fcc6f ) + NAMCOS2_GFXROM_LOAD_256K( "mv1-chr3.bin", 0x180000, 0xed6f22a5 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz0.bin", 0x000000, 0x7381a5a9 ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz1.bin", 0x080000, 0xe899482e ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz2.bin", 0x100000, 0xde141290 ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz3.bin", 0x180000, 0xe310324d ) + NAMCOS2_GFXROM_LOAD_128K( "mv1-roz4.bin", 0x200000, 0x48ddc5a9 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_256K( "mv1-sha.bin", 0x000000, 0xa47db5d3 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "mv1-dat0.bin", 0x000000, 0xe15f412e ) + NAMCOS2_DATA_LOAD_O_128K( "mv1-dat1.bin", 0x000000, 0x73e1545a ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "mv1-voi1.bin", 0x000000, 0x080000, 0xde5cac09 ) ROM_END /*************************************************************/ -/* METAL HAWK */ +/* METAL HAWK */ /*************************************************************/ ROM_START( metlhawk ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mh2mp0c.11d", 0x000000, 0x020000, 0xcd7dae6e ) - ROM_LOAD_ODD( "mh2mp1c.13d", 0x000000, 0x020000, 0xe52199fd ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "mh1sp0f.11k", 0x000000, 0x010000, 0x2c141fea ) - ROM_LOAD_ODD( "mh1sp1f.13k", 0x000000, 0x010000, 0x8ccf98e0 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "mh1s0.7j", 0x0c000, 0x04000, 0x79e054cf ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_256K( "mhobj-0.5d", 0x000000, 0x52ae6620 ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-1.5b", 0x080000, 0x2c2a1291 ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-2.6d", 0x100000, 0x6221b927 ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-3.6b", 0x180000, 0xfd09f2f1 ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-4.5c", 0x200000, 0xe3590e1a ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-5.5a", 0x280000, 0xb85c0d07 ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-6.6c", 0x300000, 0x90c4523d ) - NAMCOS2_GFXROM_LOAD_256K( "mhobj-7.6a", 0x380000, 0xf00edb39 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "mhchr-0.11n", 0x000000, 0xe2da1b14 ) - NAMCOS2_GFXROM_LOAD_128K( "mhchr-1.11p", 0x080000, 0x023c78f9 ) - NAMCOS2_GFXROM_LOAD_128K( "mhchr-2.11r", 0x100000, 0xece47e91 ) - NAMCOS2_GFXROM_LOAD_128K( "mh1c3.11s", 0x180000, 0x9303aa7f ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-0.2d", 0x000000, 0x30ade98f ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-1.2c", 0x080000, 0xa7fff42a ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-2.2b", 0x100000, 0x6abec820 ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-3.2a", 0x180000, 0xd53cec6d ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-4.3d", 0x200000, 0x922213e2 ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-5.3c", 0x280000, 0x78418a54 ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-6.3b", 0x300000, 0x6c74977e ) - NAMCOS2_GFXROM_LOAD_256K( "mhr0z-7.3a", 0x380000, 0x68a19cbd ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "mh1sha.7n", 0x000000, 0x6ac22294 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "mh1d0.13s", 0x000000, 0x8b178ac7 ) - NAMCOS2_DATA_LOAD_O_128K( "mh1d1.13p", 0x000000, 0x10684fd6 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "mhvoi-1.bin", 0x000000, 0x080000, 0x2723d137 ) - ROM_LOAD( "mhvoi-2.bin", 0x080000, 0x080000, 0xdbc92d91 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mh2mp0c.11d", 0x000000, 0x020000, 0xcd7dae6e ) + ROM_LOAD_ODD( "mh2mp1c.13d", 0x000000, 0x020000, 0xe52199fd ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "mh1sp0f.11k", 0x000000, 0x010000, 0x2c141fea ) + ROM_LOAD_ODD( "mh1sp1f.13k", 0x000000, 0x010000, 0x8ccf98e0 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "mh1s0.7j", 0x0c000, 0x04000, 0x79e054cf ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_256K( "mhobj-0.5d", 0x000000, 0x52ae6620 ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-1.5b", 0x080000, 0x2c2a1291 ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-2.6d", 0x100000, 0x6221b927 ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-3.6b", 0x180000, 0xfd09f2f1 ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-4.5c", 0x200000, 0xe3590e1a ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-5.5a", 0x280000, 0xb85c0d07 ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-6.6c", 0x300000, 0x90c4523d ) + NAMCOS2_GFXROM_LOAD_256K( "mhobj-7.6a", 0x380000, 0xf00edb39 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "mhchr-0.11n", 0x000000, 0xe2da1b14 ) + NAMCOS2_GFXROM_LOAD_128K( "mhchr-1.11p", 0x080000, 0x023c78f9 ) + NAMCOS2_GFXROM_LOAD_128K( "mhchr-2.11r", 0x100000, 0xece47e91 ) + NAMCOS2_GFXROM_LOAD_128K( "mh1c3.11s", 0x180000, 0x9303aa7f ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-0.2d", 0x000000, 0x30ade98f ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-1.2c", 0x080000, 0xa7fff42a ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-2.2b", 0x100000, 0x6abec820 ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-3.2a", 0x180000, 0xd53cec6d ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-4.3d", 0x200000, 0x922213e2 ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-5.3c", 0x280000, 0x78418a54 ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-6.3b", 0x300000, 0x6c74977e ) + NAMCOS2_GFXROM_LOAD_256K( "mhr0z-7.3a", 0x380000, 0x68a19cbd ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "mh1sha.7n", 0x000000, 0x6ac22294 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "mh1d0.13s", 0x000000, 0x8b178ac7 ) + NAMCOS2_DATA_LOAD_O_128K( "mh1d1.13p", 0x000000, 0x10684fd6 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "mhvoi-1.bin", 0x000000, 0x080000, 0x2723d137 ) + ROM_LOAD( "mhvoi-2.bin", 0x080000, 0x080000, 0xdbc92d91 ) ROM_END /*************************************************************/ -/* MIRAI NINJA */ +/* MIRAI NINJA */ /*************************************************************/ ROM_START( mirninja ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mn_mpr0e.bin", 0x000000, 0x010000, 0xfa75f977 ) - ROM_LOAD_ODD( "mn_mpr1e.bin", 0x000000, 0x010000, 0x58ddd464 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "mn1_spr0.bin", 0x000000, 0x010000, 0x3f1a17be ) - ROM_LOAD_ODD( "mn1_spr1.bin", 0x000000, 0x010000, 0x2bc66f60 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "mn_snd0.bin", 0x0c000, 0x04000, 0x6aa1ae84 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_128K( "mn_obj0.bin", 0x000000, 0x6bd1e290 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj1.bin", 0x080000, 0x5e8503be ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj2.bin", 0x100000, 0xa96d9b45 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj3.bin", 0x180000, 0x0086ef8b ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj4.bin", 0x200000, 0xb3f48755 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj5.bin", 0x280000, 0xc21e995b ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj6.bin", 0x300000, 0xa052c582 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_obj7.bin", 0x380000, 0x1854c6f5 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "mn_chr0.bin", 0x000000, 0x4f66df26 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr1.bin", 0x080000, 0xf5de5ea7 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr2.bin", 0x100000, 0x9ff61924 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr3.bin", 0x180000, 0xba208bf5 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr4.bin", 0x200000, 0x0ef00aff ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr5.bin", 0x280000, 0x4cd9d377 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr6.bin", 0x300000, 0x114aca76 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_chr7.bin", 0x380000, 0x2d5705d3 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "mn_roz0.bin", 0x000000, 0x677a4f25 ) - NAMCOS2_GFXROM_LOAD_128K( "mn_roz1.bin", 0x080000, 0xf00ae572 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "mn_sha.bin", 0x000000, 0xc28af90f ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "mn1_dat0.bin", 0x000000, 0x104bcca8 ) - NAMCOS2_DATA_LOAD_O_128K( "mn1_dat1.bin", 0x000000, 0xd2a918fb ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "mn_voi1.bin", 0x000000, 0x080000, 0x2ca3573c ) - ROM_LOAD( "mn_voi2.bin", 0x080000, 0x080000, 0x466c3b47 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mn_mpr0e.bin", 0x000000, 0x010000, 0xfa75f977 ) + ROM_LOAD_ODD( "mn_mpr1e.bin", 0x000000, 0x010000, 0x58ddd464 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "mn1_spr0.bin", 0x000000, 0x010000, 0x3f1a17be ) + ROM_LOAD_ODD( "mn1_spr1.bin", 0x000000, 0x010000, 0x2bc66f60 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "mn_snd0.bin", 0x0c000, 0x04000, 0x6aa1ae84 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, 0xe9f2922a ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_128K( "mn_obj0.bin", 0x000000, 0x6bd1e290 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj1.bin", 0x080000, 0x5e8503be ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj2.bin", 0x100000, 0xa96d9b45 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj3.bin", 0x180000, 0x0086ef8b ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj4.bin", 0x200000, 0xb3f48755 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj5.bin", 0x280000, 0xc21e995b ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj6.bin", 0x300000, 0xa052c582 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_obj7.bin", 0x380000, 0x1854c6f5 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "mn_chr0.bin", 0x000000, 0x4f66df26 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr1.bin", 0x080000, 0xf5de5ea7 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr2.bin", 0x100000, 0x9ff61924 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr3.bin", 0x180000, 0xba208bf5 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr4.bin", 0x200000, 0x0ef00aff ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr5.bin", 0x280000, 0x4cd9d377 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr6.bin", 0x300000, 0x114aca76 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_chr7.bin", 0x380000, 0x2d5705d3 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "mn_roz0.bin", 0x000000, 0x677a4f25 ) + NAMCOS2_GFXROM_LOAD_128K( "mn_roz1.bin", 0x080000, 0xf00ae572 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "mn_sha.bin", 0x000000, 0xc28af90f ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "mn1_dat0.bin", 0x000000, 0x104bcca8 ) + NAMCOS2_DATA_LOAD_O_128K( "mn1_dat1.bin", 0x000000, 0xd2a918fb ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "mn_voi1.bin", 0x000000, 0x080000, 0x2ca3573c ) + ROM_LOAD( "mn_voi2.bin", 0x080000, 0x080000, 0x466c3b47 ) ROM_END /*************************************************************/ -/* ORDYNE */ +/* ORDYNE */ /*************************************************************/ ROM_START( ordyne ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "or1_mp0.bin", 0x000000, 0x020000, 0xf5929ed3 ) - ROM_LOAD_ODD ( "or1_mp1.bin", 0x000000, 0x020000, 0xc1c8c1e2 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "or1_sp0.bin", 0x000000, 0x010000, 0x01ef6638 ) - ROM_LOAD_ODD ( "or1_sp1.bin", 0x000000, 0x010000, 0xb632adc3 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "or1_sd0.bin", 0x00c000, 0x004000, 0xc41e5d22 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_128K( "or1_ob0.bin", 0x000000, 0x67b2b9e4 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob1.bin", 0x080000, 0x8a54fa5e ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob2.bin", 0x100000, 0xa2c1cca0 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob3.bin", 0x180000, 0xe0ad292c ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob4.bin", 0x200000, 0x7aefba59 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob5.bin", 0x280000, 0xe4025be9 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob6.bin", 0x300000, 0xe284c30c ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ob7.bin", 0x380000, 0x262b7112 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "or1_ch0.bin", 0x000000, 0xe7c47934 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ch1.bin", 0x080000, 0x874b332d ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ch3.bin", 0x180000, 0x5471a834 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ch5.bin", 0x280000, 0xa7d3a296 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ch6.bin", 0x300000, 0x3adc09c8 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_ch7.bin", 0x380000, 0xf050a152 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "or1_rz0.bin", 0x000000, 0xc88a9e6b ) - NAMCOS2_GFXROM_LOAD_128K( "or1_rz1.bin", 0x080000, 0xc20cc749 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_rz2.bin", 0x100000, 0x148c9866 ) - NAMCOS2_GFXROM_LOAD_128K( "or1_rz3.bin", 0x180000, 0x4e727b7e ) - NAMCOS2_GFXROM_LOAD_128K( "or1_rz4.bin", 0x200000, 0x17b04396 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "or1_sha.bin", 0x000000, 0x7aec9dee ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "or1_dt0.bin", 0x000000, 0xde214f7a ) - NAMCOS2_DATA_LOAD_O_128K( "or1_dt1.bin", 0x000000, 0x25e3e6c8 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "or1_vo1.bin", 0x000000, 0x080000, 0x369e0bca ) - ROM_LOAD( "or1_vo2.bin", 0x080000, 0x080000, 0x9f4cd7b5 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "or1_mp0.bin", 0x000000, 0x020000, 0xf5929ed3 ) + ROM_LOAD_ODD ( "or1_mp1.bin", 0x000000, 0x020000, 0xc1c8c1e2 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "or1_sp0.bin", 0x000000, 0x010000, 0x01ef6638 ) + ROM_LOAD_ODD ( "or1_sp1.bin", 0x000000, 0x010000, 0xb632adc3 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "or1_sd0.bin", 0x00c000, 0x004000, 0xc41e5d22 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_128K( "or1_ob0.bin", 0x000000, 0x67b2b9e4 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob1.bin", 0x080000, 0x8a54fa5e ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob2.bin", 0x100000, 0xa2c1cca0 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob3.bin", 0x180000, 0xe0ad292c ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob4.bin", 0x200000, 0x7aefba59 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob5.bin", 0x280000, 0xe4025be9 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob6.bin", 0x300000, 0xe284c30c ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ob7.bin", 0x380000, 0x262b7112 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "or1_ch0.bin", 0x000000, 0xe7c47934 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ch1.bin", 0x080000, 0x874b332d ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ch3.bin", 0x180000, 0x5471a834 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ch5.bin", 0x280000, 0xa7d3a296 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ch6.bin", 0x300000, 0x3adc09c8 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_ch7.bin", 0x380000, 0xf050a152 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "or1_rz0.bin", 0x000000, 0xc88a9e6b ) + NAMCOS2_GFXROM_LOAD_128K( "or1_rz1.bin", 0x080000, 0xc20cc749 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_rz2.bin", 0x100000, 0x148c9866 ) + NAMCOS2_GFXROM_LOAD_128K( "or1_rz3.bin", 0x180000, 0x4e727b7e ) + NAMCOS2_GFXROM_LOAD_128K( "or1_rz4.bin", 0x200000, 0x17b04396 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "or1_sha.bin", 0x000000, 0x7aec9dee ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "or1_dt0.bin", 0x000000, 0xde214f7a ) + NAMCOS2_DATA_LOAD_O_128K( "or1_dt1.bin", 0x000000, 0x25e3e6c8 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "or1_vo1.bin", 0x000000, 0x080000, 0x369e0bca ) + ROM_LOAD( "or1_vo2.bin", 0x080000, 0x080000, 0x9f4cd7b5 ) ROM_END /*************************************************************/ -/* PHELIOS */ +/* PHELIOS */ /*************************************************************/ ROM_START( phelios ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "ps1mpr0.bin", 0x000000, 0x020000, 0xbfbe96c6 ) - ROM_LOAD_ODD ( "ps1mpr1.bin", 0x000000, 0x020000, 0xf5c0f883 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "ps1spr0.bin", 0x000000, 0x010000, 0xe9c6987e ) - ROM_LOAD_ODD ( "ps1spr1.bin", 0x000000, 0x010000, 0x02b074fb ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "ps1snd1.bin", 0x00c000, 0x004000, 0xda694838 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_256K( "psobj0.bin", 0x000000, 0xf323db2b ) - NAMCOS2_GFXROM_LOAD_256K( "psobj1.bin", 0x080000, 0xfaf7c2f5 ) - NAMCOS2_GFXROM_LOAD_256K( "psobj2.bin", 0x100000, 0x828178ba ) - NAMCOS2_GFXROM_LOAD_256K( "psobj3.bin", 0x180000, 0xe84771c8 ) - NAMCOS2_GFXROM_LOAD_256K( "psobj4.bin", 0x200000, 0x81ea86c6 ) - NAMCOS2_GFXROM_LOAD_256K( "psobj5.bin", 0x280000, 0xaaebd51a ) - NAMCOS2_GFXROM_LOAD_256K( "psobj6.bin", 0x300000, 0x032ea497 ) - NAMCOS2_GFXROM_LOAD_256K( "psobj7.bin", 0x380000, 0xf6183b36 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "pschr0.bin", 0x000000, 0x668b6670 ) - NAMCOS2_GFXROM_LOAD_128K( "pschr1.bin", 0x080000, 0x80c30742 ) - NAMCOS2_GFXROM_LOAD_128K( "pschr2.bin", 0x100000, 0xf4e11bf7 ) - NAMCOS2_GFXROM_LOAD_128K( "pschr3.bin", 0x180000, 0x97a93dc5 ) - NAMCOS2_GFXROM_LOAD_128K( "pschr4.bin", 0x200000, 0x81d965bf ) - NAMCOS2_GFXROM_LOAD_128K( "pschr5.bin", 0x280000, 0x8ca72d35 ) - NAMCOS2_GFXROM_LOAD_128K( "pschr6.bin", 0x300000, 0xda3543a9 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "psroz0.bin", 0x000000, 0x68043d7e ) - NAMCOS2_GFXROM_LOAD_128K( "psroz1.bin", 0x080000, 0x029802b4 ) - NAMCOS2_GFXROM_LOAD_128K( "psroz2.bin", 0x100000, 0xbf0b76dc ) - NAMCOS2_GFXROM_LOAD_128K( "psroz3.bin", 0x180000, 0x9c821455 ) - NAMCOS2_GFXROM_LOAD_128K( "psroz4.bin", 0x200000, 0x63a39b7a ) - NAMCOS2_GFXROM_LOAD_128K( "psroz5.bin", 0x280000, 0xfc5a99d0 ) - NAMCOS2_GFXROM_LOAD_128K( "psroz6.bin", 0x300000, 0xa2a17587 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "ps1-sha.bin", 0x000000, 0x58e26fcf ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "ps1dat0.bin", 0x000000, 0xee4194b0 ) - NAMCOS2_DATA_LOAD_O_128K( "ps1dat1.bin", 0x000000, 0x5b22d714 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "psvoi-1.bin", 0x000000, 0x080000, 0xf67376ed ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "ps1mpr0.bin", 0x000000, 0x020000, 0xbfbe96c6 ) + ROM_LOAD_ODD ( "ps1mpr1.bin", 0x000000, 0x020000, 0xf5c0f883 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "ps1spr0.bin", 0x000000, 0x010000, 0xe9c6987e ) + ROM_LOAD_ODD ( "ps1spr1.bin", 0x000000, 0x010000, 0x02b074fb ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "ps1snd1.bin", 0x00c000, 0x004000, 0xda694838 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_256K( "psobj0.bin", 0x000000, 0xf323db2b ) + NAMCOS2_GFXROM_LOAD_256K( "psobj1.bin", 0x080000, 0xfaf7c2f5 ) + NAMCOS2_GFXROM_LOAD_256K( "psobj2.bin", 0x100000, 0x828178ba ) + NAMCOS2_GFXROM_LOAD_256K( "psobj3.bin", 0x180000, 0xe84771c8 ) + NAMCOS2_GFXROM_LOAD_256K( "psobj4.bin", 0x200000, 0x81ea86c6 ) + NAMCOS2_GFXROM_LOAD_256K( "psobj5.bin", 0x280000, 0xaaebd51a ) + NAMCOS2_GFXROM_LOAD_256K( "psobj6.bin", 0x300000, 0x032ea497 ) + NAMCOS2_GFXROM_LOAD_256K( "psobj7.bin", 0x380000, 0xf6183b36 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "pschr0.bin", 0x000000, 0x668b6670 ) + NAMCOS2_GFXROM_LOAD_128K( "pschr1.bin", 0x080000, 0x80c30742 ) + NAMCOS2_GFXROM_LOAD_128K( "pschr2.bin", 0x100000, 0xf4e11bf7 ) + NAMCOS2_GFXROM_LOAD_128K( "pschr3.bin", 0x180000, 0x97a93dc5 ) + NAMCOS2_GFXROM_LOAD_128K( "pschr4.bin", 0x200000, 0x81d965bf ) + NAMCOS2_GFXROM_LOAD_128K( "pschr5.bin", 0x280000, 0x8ca72d35 ) + NAMCOS2_GFXROM_LOAD_128K( "pschr6.bin", 0x300000, 0xda3543a9 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "psroz0.bin", 0x000000, 0x68043d7e ) + NAMCOS2_GFXROM_LOAD_128K( "psroz1.bin", 0x080000, 0x029802b4 ) + NAMCOS2_GFXROM_LOAD_128K( "psroz2.bin", 0x100000, 0xbf0b76dc ) + NAMCOS2_GFXROM_LOAD_128K( "psroz3.bin", 0x180000, 0x9c821455 ) + NAMCOS2_GFXROM_LOAD_128K( "psroz4.bin", 0x200000, 0x63a39b7a ) + NAMCOS2_GFXROM_LOAD_128K( "psroz5.bin", 0x280000, 0xfc5a99d0 ) + NAMCOS2_GFXROM_LOAD_128K( "psroz6.bin", 0x300000, 0xa2a17587 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "ps1-sha.bin", 0x000000, 0x58e26fcf ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "ps1dat0.bin", 0x000000, 0xee4194b0 ) + NAMCOS2_DATA_LOAD_O_128K( "ps1dat1.bin", 0x000000, 0x5b22d714 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "psvoi-1.bin", 0x000000, 0x080000, 0xf67376ed ) ROM_END /*************************************************************/ -/* ROLLING THUNDER 2 */ +/* ROLLING THUNDER 2 */ /*************************************************************/ ROM_START( rthun2 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x020000, 0xe09a3549 ) - ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x020000, 0x09573bff ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x54c22ac5 ) - ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0x060eb393 ) - - ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0x55b7562a ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0x00445a4f ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xe5cb82c1 ) - NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x19ebe9fd ) - NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0x455c4a2f ) - NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0xfdcae8a9 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "chr0.bin", 0x000000, 0x6f0e9a68 ) - NAMCOS2_GFXROM_LOAD_512K( "chr1.bin", 0x080000, 0x15e44adc ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x482d0554 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0xcf58fbbe ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x0baf44ee ) - NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0x58a8daac ) - NAMCOS2_DATA_LOAD_E_128K( "data2.bin", 0x100000, 0x8e850a2a ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xe42027cd ) - ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x0c4c2b66 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mpr0.bin", 0x000000, 0x020000, 0xe09a3549 ) + ROM_LOAD_ODD( "mpr1.bin", 0x000000, 0x020000, 0x09573bff ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "spr0.bin", 0x000000, 0x010000, 0x54c22ac5 ) + ROM_LOAD_ODD( "spr1.bin", 0x000000, 0x010000, 0x060eb393 ) + + ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0x55b7562a ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0x00445a4f ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xe5cb82c1 ) + NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x19ebe9fd ) + NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0x455c4a2f ) + NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0xfdcae8a9 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "chr0.bin", 0x000000, 0x6f0e9a68 ) + NAMCOS2_GFXROM_LOAD_512K( "chr1.bin", 0x080000, 0x15e44adc ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x482d0554 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0xcf58fbbe ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x0baf44ee ) + NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0x58a8daac ) + NAMCOS2_DATA_LOAD_E_128K( "data2.bin", 0x100000, 0x8e850a2a ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xe42027cd ) + ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x0c4c2b66 ) ROM_END /*************************************************************/ -/* ROLLING THUNDER 2 (Japan) */ +/* ROLLING THUNDER 2 (Japan) */ /*************************************************************/ ROM_START( rthun2j ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "mpr0j.bin", 0x000000, 0x020000, 0x2563b9ee ) - ROM_LOAD_ODD( "mpr1j.bin", 0x000000, 0x020000, 0x14c4c564 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "spr0j.bin", 0x000000, 0x010000, 0xf8ef5150 ) - ROM_LOAD_ODD( "spr1j.bin", 0x000000, 0x010000, 0x52ed3a48 ) - - ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0x55b7562a ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0x00445a4f ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xe5cb82c1 ) - NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x19ebe9fd ) - NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0x455c4a2f ) - NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0xfdcae8a9 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "chr0.bin", 0x000000, 0x6f0e9a68 ) - NAMCOS2_GFXROM_LOAD_512K( "chr1.bin", 0x080000, 0x15e44adc ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x482d0554 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0xcf58fbbe ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x0baf44ee ) - NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0x58a8daac ) - NAMCOS2_DATA_LOAD_E_128K( "data2.bin", 0x100000, 0x8e850a2a ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xe42027cd ) - ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x0c4c2b66 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "mpr0j.bin", 0x000000, 0x020000, 0x2563b9ee ) + ROM_LOAD_ODD( "mpr1j.bin", 0x000000, 0x020000, 0x14c4c564 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "spr0j.bin", 0x000000, 0x010000, 0xf8ef5150 ) + ROM_LOAD_ODD( "spr1j.bin", 0x000000, 0x010000, 0x52ed3a48 ) + + ROM_REGION( 0x050000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "snd0.bin", 0x00c000, 0x004000, 0x55b7562a ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + ROM_LOAD( "snd1.bin", 0x030000, 0x020000, 0x00445a4f ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "obj0.bin", 0x000000, 0xe5cb82c1 ) + NAMCOS2_GFXROM_LOAD_512K( "obj1.bin", 0x080000, 0x19ebe9fd ) + NAMCOS2_GFXROM_LOAD_512K( "obj2.bin", 0x100000, 0x455c4a2f ) + NAMCOS2_GFXROM_LOAD_512K( "obj3.bin", 0x180000, 0xfdcae8a9 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "chr0.bin", 0x000000, 0x6f0e9a68 ) + NAMCOS2_GFXROM_LOAD_512K( "chr1.bin", 0x080000, 0x15e44adc ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "roz0.bin", 0x000000, 0x482d0554 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "shape.bin", 0x000000, 0xcf58fbbe ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "data0.bin", 0x000000, 0x0baf44ee ) + NAMCOS2_DATA_LOAD_O_128K( "data1.bin", 0x000000, 0x58a8daac ) + NAMCOS2_DATA_LOAD_E_128K( "data2.bin", 0x100000, 0x8e850a2a ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "voi1.bin", 0x000000, 0x080000, 0xe42027cd ) + ROM_LOAD( "voi2.bin", 0x080000, 0x080000, 0x0c4c2b66 ) ROM_END /*************************************************************/ -/* STEEL GUNNER 2 */ +/* STEEL GUNNER 2 */ /*************************************************************/ ROM_START( sgunner2) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "sns_mpr0.bin", 0x000000, 0x020000, 0xe7216ad7 ) - ROM_LOAD_ODD( "sns_mpr1.bin", 0x000000, 0x020000, 0x6caef2ee ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "sns_spr0.bin", 0x000000, 0x010000, 0xe5e40ed0 ) - ROM_LOAD_ODD( "sns_spr1.bin", 0x000000, 0x010000, 0x3a85a5e9 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "sns_snd0.bin", 0x00c000, 0x004000, 0xf079cd32 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "sns_obj0.bin", 0x000000, 0xc762445c ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj1.bin", 0x080000, 0xe9e379d8 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj2.bin", 0x100000, 0x0d076f6c ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj3.bin", 0x180000, 0x0fb01e8b ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj4.bin", 0x200000, 0x0b1be894 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj5.bin", 0x280000, 0x416b14e1 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj6.bin", 0x300000, 0xc2e94ed2 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_obj7.bin", 0x380000, 0xfc1f26af ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "sns_chr0.bin", 0x000000, 0xcdc42b61 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_chr1.bin", 0x080000, 0x42d4cbb7 ) - NAMCOS2_GFXROM_LOAD_512K( "sns_chr2.bin", 0x100000, 0x7dbaa14e ) - NAMCOS2_GFXROM_LOAD_512K( "sns_chr3.bin", 0x180000, 0xb562ff72 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* NO ROZ ROMS PRESENT IN ZIP */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "sns_sha0.bin", 0x000000, 0x5687e8c0 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "sns_dat0.bin", 0x000000, 0x48295d93 ) - NAMCOS2_DATA_LOAD_O_128K( "sns_dat1.bin", 0x000000, 0xb44cc656 ) - NAMCOS2_DATA_LOAD_E_128K( "sns_dat2.bin", 0x100000, 0xca2ae645 ) - NAMCOS2_DATA_LOAD_O_128K( "sns_dat3.bin", 0x100000, 0x203bb018 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "sns_voi1.bin", 0x000000, 0x080000, 0x219c97f7 ) - ROM_LOAD( "sns_voi2.bin", 0x080000, 0x080000, 0x562ec86b ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "sns_mpr0.bin", 0x000000, 0x020000, 0xe7216ad7 ) + ROM_LOAD_ODD( "sns_mpr1.bin", 0x000000, 0x020000, 0x6caef2ee ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "sns_spr0.bin", 0x000000, 0x010000, 0xe5e40ed0 ) + ROM_LOAD_ODD( "sns_spr1.bin", 0x000000, 0x010000, 0x3a85a5e9 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "sns_snd0.bin", 0x00c000, 0x004000, 0xf079cd32 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "sns_obj0.bin", 0x000000, 0xc762445c ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj1.bin", 0x080000, 0xe9e379d8 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj2.bin", 0x100000, 0x0d076f6c ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj3.bin", 0x180000, 0x0fb01e8b ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj4.bin", 0x200000, 0x0b1be894 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj5.bin", 0x280000, 0x416b14e1 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj6.bin", 0x300000, 0xc2e94ed2 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_obj7.bin", 0x380000, 0xfc1f26af ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "sns_chr0.bin", 0x000000, 0xcdc42b61 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_chr1.bin", 0x080000, 0x42d4cbb7 ) + NAMCOS2_GFXROM_LOAD_512K( "sns_chr2.bin", 0x100000, 0x7dbaa14e ) + NAMCOS2_GFXROM_LOAD_512K( "sns_chr3.bin", 0x180000, 0xb562ff72 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* NO ROZ ROMS PRESENT IN ZIP */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "sns_sha0.bin", 0x000000, 0x5687e8c0 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "sns_dat0.bin", 0x000000, 0x48295d93 ) + NAMCOS2_DATA_LOAD_O_128K( "sns_dat1.bin", 0x000000, 0xb44cc656 ) + NAMCOS2_DATA_LOAD_E_128K( "sns_dat2.bin", 0x100000, 0xca2ae645 ) + NAMCOS2_DATA_LOAD_O_128K( "sns_dat3.bin", 0x100000, 0x203bb018 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "sns_voi1.bin", 0x000000, 0x080000, 0x219c97f7 ) + ROM_LOAD( "sns_voi2.bin", 0x080000, 0x080000, 0x562ec86b ) ROM_END /*************************************************************/ -/* SUPER WORLD STADIUM 92 */ +/* SUPER WORLD STADIUM 92 */ /*************************************************************/ ROM_START( sws92 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "sss1mpr0.bin", 0x000000, 0x020000, 0xdbea0210 ) - ROM_LOAD_ODD( "sss1mpr1.bin", 0x000000, 0x020000, 0xb5e6469a ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "sst1spr0.bin", 0x000000, 0x020000, 0x9777ee2f ) - ROM_LOAD_ODD( "sst1spr1.bin", 0x000000, 0x020000, 0x27a35c69 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "sst1snd0.bin", 0x00c000, 0x004000, 0x8fc45114 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c68.bin", 0x008000, 0x008000, 0xca64550a ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "sss_obj0.bin", 0x000000, 0x375e8f1f ) - NAMCOS2_GFXROM_LOAD_512K( "sss_obj1.bin", 0x080000, 0x675c1014 ) - NAMCOS2_GFXROM_LOAD_512K( "sss_obj2.bin", 0x100000, 0xbdc55f1c ) - NAMCOS2_GFXROM_LOAD_512K( "sss_obj3.bin", 0x180000, 0xe32ac432 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "sss_chr0.bin", 0x000000, 0x1d2876f2 ) - NAMCOS2_GFXROM_LOAD_512K( "sss_chr6.bin", 0x300000, 0x354f0ed2 ) - NAMCOS2_GFXROM_LOAD_512K( "sss_chr7.bin", 0x380000, 0x4032f4c1 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "ss_roz0.bin", 0x000000, 0x40ce9a58 ) - NAMCOS2_GFXROM_LOAD_512K( "ss_roz1.bin", 0x080000, 0xc98902ff ) - NAMCOS2_GFXROM_LOAD_512K( "sss_roz2.bin", 0x100000, 0xc9855c10 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "sss_sha0.bin", 0x000000, 0xb71a731a ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_256K( "sss1dat0.bin", 0x000000, 0xdb3e6aec ) - NAMCOS2_DATA_LOAD_O_256K( "sss1dat1.bin", 0x000000, 0x463b5ba8 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "ss_voi1.bin", 0x000000, 0x080000, 0x503e51b7 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "sss1mpr0.bin", 0x000000, 0x020000, 0xdbea0210 ) + ROM_LOAD_ODD( "sss1mpr1.bin", 0x000000, 0x020000, 0xb5e6469a ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "sst1spr0.bin", 0x000000, 0x020000, 0x9777ee2f ) + ROM_LOAD_ODD( "sst1spr1.bin", 0x000000, 0x020000, 0x27a35c69 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "sst1snd0.bin", 0x00c000, 0x004000, 0x8fc45114 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c68.bin", 0x008000, 0x008000, 0xca64550a ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "sss_obj0.bin", 0x000000, 0x375e8f1f ) + NAMCOS2_GFXROM_LOAD_512K( "sss_obj1.bin", 0x080000, 0x675c1014 ) + NAMCOS2_GFXROM_LOAD_512K( "sss_obj2.bin", 0x100000, 0xbdc55f1c ) + NAMCOS2_GFXROM_LOAD_512K( "sss_obj3.bin", 0x180000, 0xe32ac432 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "sss_chr0.bin", 0x000000, 0x1d2876f2 ) + NAMCOS2_GFXROM_LOAD_512K( "sss_chr6.bin", 0x300000, 0x354f0ed2 ) + NAMCOS2_GFXROM_LOAD_512K( "sss_chr7.bin", 0x380000, 0x4032f4c1 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "ss_roz0.bin", 0x000000, 0x40ce9a58 ) + NAMCOS2_GFXROM_LOAD_512K( "ss_roz1.bin", 0x080000, 0xc98902ff ) + NAMCOS2_GFXROM_LOAD_512K( "sss_roz2.bin", 0x100000, 0xc9855c10 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "sss_sha0.bin", 0x000000, 0xb71a731a ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_256K( "sss1dat0.bin", 0x000000, 0xdb3e6aec ) + NAMCOS2_DATA_LOAD_O_256K( "sss1dat1.bin", 0x000000, 0x463b5ba8 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "ss_voi1.bin", 0x000000, 0x080000, 0x503e51b7 ) ROM_END /*************************************************************/ -/* SUPER WORLD STADIUM 93 */ +/* SUPER WORLD STADIUM 93 */ /*************************************************************/ ROM_START( sws93 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "sst1mpr0.bin", 0x000000, 0x020000, 0xbd2679bc ) - ROM_LOAD_ODD( "sst1mpr1.bin", 0x000000, 0x020000, 0x9132e220 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "sst1spr0.bin", 0x000000, 0x020000, 0x9777ee2f ) - ROM_LOAD_ODD( "sst1spr1.bin", 0x000000, 0x020000, 0x27a35c69 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "sst1snd0.bin", 0x00c000, 0x004000, 0x8fc45114 ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "sst_obj0.bin", 0x000000, 0x4089dfd7 ) - NAMCOS2_GFXROM_LOAD_512K( "sst_obj1.bin", 0x080000, 0xcfbc25c7 ) - NAMCOS2_GFXROM_LOAD_512K( "sst_obj2.bin", 0x100000, 0x61ed3558 ) - NAMCOS2_GFXROM_LOAD_512K( "sst_obj3.bin", 0x180000, 0x0e3bc05d ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "sst_chr0.bin", 0x000000, 0x3397850d ) - NAMCOS2_GFXROM_LOAD_512K( "sss_chr6.bin", 0x300000, 0x354f0ed2 ) - NAMCOS2_GFXROM_LOAD_512K( "sst_chr7.bin", 0x380000, 0xe0abb763 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "ss_roz0.bin", 0x000000, 0x40ce9a58 ) - NAMCOS2_GFXROM_LOAD_512K( "ss_roz1.bin", 0x080000, 0xc98902ff ) - NAMCOS2_GFXROM_LOAD_512K( "sss_roz2.bin", 0x100000, 0xc9855c10 ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "sst_sha0.bin", 0x000000, 0x4f64d4bd ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_512K( "sst1dat0.bin", 0x000000, 0xb99c9656 ) - NAMCOS2_DATA_LOAD_O_512K( "sst1dat1.bin", 0x000000, 0x60cf6281 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "ss_voi1.bin", 0x000000, 0x080000, 0x503e51b7 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "sst1mpr0.bin", 0x000000, 0x020000, 0xbd2679bc ) + ROM_LOAD_ODD( "sst1mpr1.bin", 0x000000, 0x020000, 0x9132e220 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "sst1spr0.bin", 0x000000, 0x020000, 0x9777ee2f ) + ROM_LOAD_ODD( "sst1spr1.bin", 0x000000, 0x020000, 0x27a35c69 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "sst1snd0.bin", 0x00c000, 0x004000, 0x8fc45114 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "sst_obj0.bin", 0x000000, 0x4089dfd7 ) + NAMCOS2_GFXROM_LOAD_512K( "sst_obj1.bin", 0x080000, 0xcfbc25c7 ) + NAMCOS2_GFXROM_LOAD_512K( "sst_obj2.bin", 0x100000, 0x61ed3558 ) + NAMCOS2_GFXROM_LOAD_512K( "sst_obj3.bin", 0x180000, 0x0e3bc05d ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "sst_chr0.bin", 0x000000, 0x3397850d ) + NAMCOS2_GFXROM_LOAD_512K( "sss_chr6.bin", 0x300000, 0x354f0ed2 ) + NAMCOS2_GFXROM_LOAD_512K( "sst_chr7.bin", 0x380000, 0xe0abb763 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "ss_roz0.bin", 0x000000, 0x40ce9a58 ) + NAMCOS2_GFXROM_LOAD_512K( "ss_roz1.bin", 0x080000, 0xc98902ff ) + NAMCOS2_GFXROM_LOAD_512K( "sss_roz2.bin", 0x100000, 0xc9855c10 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "sst_sha0.bin", 0x000000, 0x4f64d4bd ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_512K( "sst1dat0.bin", 0x000000, 0xb99c9656 ) + NAMCOS2_DATA_LOAD_O_512K( "sst1dat1.bin", 0x000000, 0x60cf6281 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "ss_voi1.bin", 0x000000, 0x080000, 0x503e51b7 ) ROM_END /*************************************************************/ -/* SUZUKA 8 HOURS */ +/* SUZUKA 8 HOURS */ /*************************************************************/ ROM_START( suzuka8h ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "eh1-mp0b.bin", 0x000000, 0x020000, 0x2850f469 ) - ROM_LOAD_ODD( "eh1-mpr1.bin", 0x000000, 0x020000, 0xbe83eb2c ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "eh1-sp0.bin", 0x000000, 0x020000, 0x4a8c4709 ) - ROM_LOAD_ODD( "eh1-sp1.bin", 0x000000, 0x020000, 0x2256b14e ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "eh1-snd0.bin", 0x00c000, 0x004000, 0x36748d3c ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj0.bin", 0x000000, 0x864b6816 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj2.bin", 0x080000, 0x966d3f19 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj4.bin", 0x100000, 0xcde13867 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj6.bin", 0x180000, 0x6019fc8c ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj1.bin", 0x200000, 0xd4921c35 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj3.bin", 0x280000, 0x7d253cbe ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj5.bin", 0x300000, 0x9f210546 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-obj7.bin", 0x380000, 0x0bd966b8 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "eh1-chr0.bin", 0x000000, 0xbc90ebef ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-chr1.bin", 0x080000, 0x61395018 ) - NAMCOS2_GFXROM_LOAD_512K( "eh1-chr2.bin", 0x100000, 0x8150f644 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "eh1-shrp.bin", 0x000000, 0x39585cf9 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "eh1-d0.bin", 0x000000, 0xb3c4243b ) - NAMCOS2_DATA_LOAD_O_128K( "eh1-d1.bin", 0x000000, 0xc946e79c ) - NAMCOS2_DATA_LOAD_O_128K( "eh1-d3.bin", 0x100000, 0x8425a9c7 ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "eh1-voi1.bin", 0x000000, 0x080000, 0x71e534d3 ) - ROM_LOAD( "eh1-voi2.bin", 0x080000, 0x080000, 0x3e20df8e ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "eh1-mp0b.bin", 0x000000, 0x020000, 0x2850f469 ) + ROM_LOAD_ODD( "eh1-mpr1.bin", 0x000000, 0x020000, 0xbe83eb2c ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "eh1-sp0.bin", 0x000000, 0x020000, 0x4a8c4709 ) + ROM_LOAD_ODD( "eh1-sp1.bin", 0x000000, 0x020000, 0x2256b14e ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "eh1-snd0.bin", 0x00c000, 0x004000, 0x36748d3c ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BADCRC(0xa5b2a4ff)) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj0.bin", 0x000000, 0x864b6816 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj2.bin", 0x080000, 0x966d3f19 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj4.bin", 0x100000, 0xcde13867 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj6.bin", 0x180000, 0x6019fc8c ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj1.bin", 0x200000, 0xd4921c35 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj3.bin", 0x280000, 0x7d253cbe ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj5.bin", 0x300000, 0x9f210546 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-obj7.bin", 0x380000, 0x0bd966b8 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "eh1-chr0.bin", 0x000000, 0xbc90ebef ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-chr1.bin", 0x080000, 0x61395018 ) + NAMCOS2_GFXROM_LOAD_512K( "eh1-chr2.bin", 0x100000, 0x8150f644 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "eh1-shrp.bin", 0x000000, 0x39585cf9 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "eh1-d0.bin", 0x000000, 0xb3c4243b ) + NAMCOS2_DATA_LOAD_O_128K( "eh1-d1.bin", 0x000000, 0xc946e79c ) + NAMCOS2_DATA_LOAD_O_128K( "eh1-d3.bin", 0x100000, 0x8425a9c7 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "eh1-voi1.bin", 0x000000, 0x080000, 0x71e534d3 ) + ROM_LOAD( "eh1-voi2.bin", 0x080000, 0x080000, 0x3e20df8e ) ROM_END /*************************************************************/ -/* SUZUKA 8 HOURS 2 */ +/* SUZUKA 8 HOURS 2 */ /*************************************************************/ ROM_START( suzuk8h2 ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "ehs2mp0b.bin", 0x000000, 0x020000, 0xade97f90 ) - ROM_LOAD_ODD( "ehs2mp1b.bin", 0x000000, 0x020000, 0x19744a66 ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "ehs1sp0.bin", 0x000000, 0x020000, 0x9ca967bc ) - ROM_LOAD_ODD( "ehs1sp1.bin", 0x000000, 0x020000, 0xf25bfaaa ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "ehs1snd0.bin", 0x00c000, 0x004000, 0xfc95993b ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj0.bin", 0x000000, 0xa0acf307 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj2.bin", 0x080000, 0x83b45afe ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj4.bin", 0x100000, 0x4e503ca5 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj6.bin", 0x180000, 0xf5fc8b23 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj1.bin", 0x200000, 0xca780b44 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj3.bin", 0x280000, 0x360c03a8 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj5.bin", 0x300000, 0x5405f2d9 ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1obj7.bin", 0x380000, 0xda6bf51b ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_512K( "ehs1chr0.bin", 0x000000, 0x844efe0d ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1chr1.bin", 0x080000, 0xe8480a6d ) - NAMCOS2_GFXROM_LOAD_512K( "ehs1chr2.bin", 0x100000, 0xace2d871 ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - /* No ROZ files present in ZIP archive */ - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_512K( "ehs1shap.bin", 0x000000, 0x0f0e2dbf ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_512K( "ehs1dat0.bin", 0x000000, 0x12a202fb ) - NAMCOS2_DATA_LOAD_O_512K( "ehs1dat1.bin", 0x000000, 0x91790905 ) - NAMCOS2_DATA_LOAD_E_512K( "ehs1dat2.bin", 0x000000, 0x087da1f3 ) - NAMCOS2_DATA_LOAD_O_512K( "ehs1dat3.bin", 0x100000, 0x85aecb3f ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "ehs1voi1.bin", 0x000000, 0x080000, 0xbf94eb42 ) - ROM_LOAD( "ehs1voi2.bin", 0x080000, 0x080000, 0x0e427604 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "ehs2mp0b.bin", 0x000000, 0x020000, 0xade97f90 ) + ROM_LOAD_ODD( "ehs2mp1b.bin", 0x000000, 0x020000, 0x19744a66 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "ehs1sp0.bin", 0x000000, 0x020000, 0x9ca967bc ) + ROM_LOAD_ODD( "ehs1sp1.bin", 0x000000, 0x020000, 0xf25bfaaa ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "ehs1snd0.bin", 0x00c000, 0x004000, 0xfc95993b ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj0.bin", 0x000000, 0xa0acf307 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj2.bin", 0x080000, 0x83b45afe ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj4.bin", 0x100000, 0x4e503ca5 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj6.bin", 0x180000, 0xf5fc8b23 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj1.bin", 0x200000, 0xca780b44 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj3.bin", 0x280000, 0x360c03a8 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj5.bin", 0x300000, 0x5405f2d9 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1obj7.bin", 0x380000, 0xda6bf51b ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr0.bin", 0x000000, 0x844efe0d ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr1.bin", 0x080000, 0xe8480a6d ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr2.bin", 0x100000, 0xace2d871 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr3.bin", 0x180000, 0xc1680818 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr4.bin", 0x200000, 0x82e8c1d5 ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr5.bin", 0x280000, 0x9448537c ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr6.bin", 0x300000, 0x2d1c01ad ) + NAMCOS2_GFXROM_LOAD_512K( "ehs1chr7.bin", 0x380000, 0x18dd8676 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + /* No ROZ files present in ZIP archive */ + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_512K( "ehs1shap.bin", 0x000000, 0x0f0e2dbf ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_512K( "ehs1dat0.bin", 0x000000, 0x12a202fb ) + NAMCOS2_DATA_LOAD_O_512K( "ehs1dat1.bin", 0x000000, 0x91790905 ) + NAMCOS2_DATA_LOAD_E_512K( "ehs1dat2.bin", 0x100000, 0x087da1f3 ) + NAMCOS2_DATA_LOAD_O_512K( "ehs1dat3.bin", 0x100000, 0x85aecb3f ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "ehs1voi1.bin", 0x000000, 0x080000, 0xbf94eb42 ) + ROM_LOAD( "ehs1voi2.bin", 0x080000, 0x080000, 0x0e427604 ) ROM_END /*************************************************************/ -/* LEGEND OF THE VALKYRIE */ +/* LEGEND OF THE VALKYRIE */ /*************************************************************/ ROM_START( valkyrie ) - ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ - ROM_LOAD_EVEN( "wd1mpr0.bin", 0x000000, 0x020000, 0x94111a2e ) - ROM_LOAD_ODD( "wd1mpr1.bin", 0x000000, 0x020000, 0x57b5051c ) - - ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ - ROM_LOAD_EVEN( "wd1spr0.bin", 0x000000, 0x010000, 0xb2398321 ) - ROM_LOAD_ODD( "wd1spr1.bin", 0x000000, 0x010000, 0x38dba897 ) - - ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ - ROM_LOAD( "wd1snd0.bin", 0x00c000, 0x004000, 0xd0fbf58b ) - ROM_CONTINUE( 0x010000, 0x01c000 ) - ROM_RELOAD( 0x010000, 0x020000 ) - - ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) - - ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ - NAMCOS2_GFXROM_LOAD_256K( "wdobj0.bin", 0x000000, 0xe8089451 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj1.bin", 0x080000, 0x7ca65666 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj2.bin", 0x100000, 0x7c159407 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj3.bin", 0x180000, 0x649f8760 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj4.bin", 0x200000, 0x7ca39ae7 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj5.bin", 0x280000, 0x9ead2444 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj6.bin", 0x300000, 0x9fa2ea21 ) - NAMCOS2_GFXROM_LOAD_256K( "wdobj7.bin", 0x380000, 0x66e07a36 ) - - ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "wdchr0.bin", 0x000000, 0xdebb0116 ) - NAMCOS2_GFXROM_LOAD_128K( "wdchr1.bin", 0x080000, 0x8a1431e8 ) - NAMCOS2_GFXROM_LOAD_128K( "wdchr2.bin", 0x100000, 0x62f75f69 ) - NAMCOS2_GFXROM_LOAD_128K( "wdchr3.bin", 0x180000, 0xcc43bbe7 ) - NAMCOS2_GFXROM_LOAD_128K( "wdchr4.bin", 0x200000, 0x2f73d05e ) - NAMCOS2_GFXROM_LOAD_128K( "wdchr5.bin", 0x280000, 0xb632b2ec ) - - ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ - NAMCOS2_GFXROM_LOAD_128K( "wdroz0.bin", 0x000000, 0xf776bf66 ) - NAMCOS2_GFXROM_LOAD_128K( "wdroz1.bin", 0x080000, 0xc1a345c3 ) - NAMCOS2_GFXROM_LOAD_128K( "wdroz2.bin", 0x100000, 0x28ffb44a ) - NAMCOS2_GFXROM_LOAD_128K( "wdroz3.bin", 0x180000, 0x7e77b46d ) - - ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ - NAMCOS2_GFXROM_LOAD_128K( "wdshape.bin", 0x000000, 0x3b5e0249 ) - - ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ - NAMCOS2_DATA_LOAD_E_128K( "wd1dat0.bin", 0x000000, 0xea209f48 ) - NAMCOS2_DATA_LOAD_O_128K( "wd1dat1.bin", 0x000000, 0x04b48ada ) - - ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ - ROM_LOAD( "wd1voi1.bin", 0x000000, 0x040000, 0xf1ace193 ) - ROM_RELOAD( 0x040000, 0x040000 ) - ROM_LOAD( "wd1voi2.bin", 0x080000, 0x020000, 0xe95c5cf3 ) - ROM_RELOAD( 0x0a0000, 0x020000 ) - ROM_RELOAD( 0x0c0000, 0x020000 ) - ROM_RELOAD( 0x0e0000, 0x020000 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "wd1mpr0.bin", 0x000000, 0x020000, 0x94111a2e ) + ROM_LOAD_ODD( "wd1mpr1.bin", 0x000000, 0x020000, 0x57b5051c ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "wd1spr0.bin", 0x000000, 0x010000, 0xb2398321 ) + ROM_LOAD_ODD( "wd1spr1.bin", 0x000000, 0x010000, 0x38dba897 ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "wd1snd0.bin", 0x00c000, 0x004000, 0xd0fbf58b ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_256K( "wdobj0.bin", 0x000000, 0xe8089451 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj1.bin", 0x080000, 0x7ca65666 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj2.bin", 0x100000, 0x7c159407 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj3.bin", 0x180000, 0x649f8760 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj4.bin", 0x200000, 0x7ca39ae7 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj5.bin", 0x280000, 0x9ead2444 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj6.bin", 0x300000, 0x9fa2ea21 ) + NAMCOS2_GFXROM_LOAD_256K( "wdobj7.bin", 0x380000, 0x66e07a36 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "wdchr0.bin", 0x000000, 0xdebb0116 ) + NAMCOS2_GFXROM_LOAD_128K( "wdchr1.bin", 0x080000, 0x8a1431e8 ) + NAMCOS2_GFXROM_LOAD_128K( "wdchr2.bin", 0x100000, 0x62f75f69 ) + NAMCOS2_GFXROM_LOAD_128K( "wdchr3.bin", 0x180000, 0xcc43bbe7 ) + NAMCOS2_GFXROM_LOAD_128K( "wdchr4.bin", 0x200000, 0x2f73d05e ) + NAMCOS2_GFXROM_LOAD_128K( "wdchr5.bin", 0x280000, 0xb632b2ec ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "wdroz0.bin", 0x000000, 0xf776bf66 ) + NAMCOS2_GFXROM_LOAD_128K( "wdroz1.bin", 0x080000, 0xc1a345c3 ) + NAMCOS2_GFXROM_LOAD_128K( "wdroz2.bin", 0x100000, 0x28ffb44a ) + NAMCOS2_GFXROM_LOAD_128K( "wdroz3.bin", 0x180000, 0x7e77b46d ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "wdshape.bin", 0x000000, 0x3b5e0249 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "wd1dat0.bin", 0x000000, 0xea209f48 ) + NAMCOS2_DATA_LOAD_O_128K( "wd1dat1.bin", 0x000000, 0x04b48ada ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "wd1voi1.bin", 0x000000, 0x040000, 0xf1ace193 ) + ROM_RELOAD( 0x040000, 0x040000 ) + ROM_LOAD( "wd1voi2.bin", 0x080000, 0x020000, 0xe95c5cf3 ) + ROM_RELOAD( 0x0a0000, 0x020000 ) + ROM_RELOAD( 0x0c0000, 0x020000 ) + ROM_RELOAD( 0x0e0000, 0x020000 ) ROM_END +/*************************************************************/ +/* KYUUKAI DOUCHUUKI */ +/*************************************************************/ +ROM_START( kyukaidk ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "ky1_mp0b.bin", 0x000000, 0x010000, 0xd1c992c8 ) + ROM_LOAD_ODD( "ky1_mp1b.bin", 0x000000, 0x010000, 0x723553af ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "ky1_sp0.bin", 0x000000, 0x010000, 0x4b4d2385 ) + ROM_LOAD_ODD( "ky1_sp1.bin", 0x000000, 0x010000, 0xbd3368cd ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "ky1_s0.bin", 0x00c000, 0x004000, 0x27aea3e9 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "ky1_o0.bin", 0x000000, 0xebec5132 ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o1.bin", 0x080000, 0xfde7e5ae ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o2.bin", 0x100000, 0x2a181698 ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o3.bin", 0x180000, 0x71fcd3a6 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "ky1_c0.bin", 0x000000, 0x7bd69a2d ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c1.bin", 0x080000, 0x66a623fe ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c2.bin", 0x100000, 0xe84b3dfd ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c3.bin", 0x180000, 0x69e67c86 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "ky1_r0.bin", 0x000000, 0x9213e8c4 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r1.bin", 0x080000, 0x97d1a641 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r2.bin", 0x100000, 0x39b58792 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r3.bin", 0x180000, 0x90c60d92 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "ky1_sha.bin", 0x000000, 0x380a20d7 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "ky1_d0.bin", 0x000000, 0xc9cf399d ) + NAMCOS2_DATA_LOAD_O_128K( "ky1_d1.bin", 0x000000, 0x6d4f21b9 ) + NAMCOS2_DATA_LOAD_E_128K( "ky1_d2.bin", 0x100000, 0xeb6d19c8 ) + NAMCOS2_DATA_LOAD_O_128K( "ky1_d3.bin", 0x100000, 0x95674701 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "ky1_v1.bin", 0x000000, 0x080000, 0x5ff81aec ) +ROM_END /*************************************************************/ -/* Set gametype so that the protection code knows how to */ -/* emulate the correct responses */ -/* */ -/* 0x4e71 == 68000 NOP */ -/* 0x4e75 == 68000 RTS */ -/* */ +/* KYUUKAI DOUCHUUKI (OLD) */ +/*************************************************************/ +ROM_START( kyukaido ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Master CPU */ + ROM_LOAD_EVEN( "ky1_mp0.bin", 0x000000, 0x010000, 0x01978a19 ) + ROM_LOAD_ODD( "ky1_mp1.bin", 0x000000, 0x010000, 0xb40717a7 ) + + ROM_REGION( 0x040000, REGION_CPU2 ) /* Slave CPU */ + ROM_LOAD_EVEN( "ky1_sp0.bin", 0x000000, 0x010000, 0x4b4d2385 ) + ROM_LOAD_ODD( "ky1_sp1.bin", 0x000000, 0x010000, 0xbd3368cd ) + + ROM_REGION( 0x030000, REGION_CPU3 ) /* Sound CPU (Banked) */ + ROM_LOAD( "ky1_s0.bin", 0x00c000, 0x004000, 0x27aea3e9 ) + ROM_CONTINUE( 0x010000, 0x01c000 ) + ROM_RELOAD( 0x010000, 0x020000 ) + + ROM_REGION( 0x010000, REGION_CPU4 ) /* I/O MCU */ + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, 0xa342a97e ) + ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, 0xa5b2a4ff ) + + ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Sprites */ + NAMCOS2_GFXROM_LOAD_512K( "ky1_o0.bin", 0x000000, 0xebec5132 ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o1.bin", 0x080000, 0xfde7e5ae ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o2.bin", 0x100000, 0x2a181698 ) + NAMCOS2_GFXROM_LOAD_512K( "ky1_o3.bin", 0x180000, 0x71fcd3a6 ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Tiles */ + NAMCOS2_GFXROM_LOAD_128K( "ky1_c0.bin", 0x000000, 0x7bd69a2d ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c1.bin", 0x080000, 0x66a623fe ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c2.bin", 0x100000, 0xe84b3dfd ) + NAMCOS2_GFXROM_LOAD_128K( "ky1_c3.bin", 0x180000, 0x69e67c86 ) + + ROM_REGION( 0x400000, REGION_GFX3 ) /* ROZ Tiles */ + NAMCOS2_GFXROM_LOAD_256K( "ky1_r0.bin", 0x000000, 0x9213e8c4 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r1.bin", 0x080000, 0x97d1a641 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r2.bin", 0x100000, 0x39b58792 ) + NAMCOS2_GFXROM_LOAD_256K( "ky1_r3.bin", 0x180000, 0x90c60d92 ) + + ROM_REGION( 0x080000, REGION_GFX4 ) /* Mask shape */ + NAMCOS2_GFXROM_LOAD_128K( "ky1_sha.bin", 0x000000, 0x380a20d7 ) + + ROM_REGION( 0x200000, REGION_USER1 ) /* Shared data roms */ + NAMCOS2_DATA_LOAD_E_128K( "ky1_d0.bin", 0x000000, 0xc9cf399d ) + NAMCOS2_DATA_LOAD_O_128K( "ky1_d1.bin", 0x000000, 0x6d4f21b9 ) + NAMCOS2_DATA_LOAD_E_128K( "ky1_d2.bin", 0x100000, 0xeb6d19c8 ) + NAMCOS2_DATA_LOAD_O_128K( "ky1_d3.bin", 0x100000, 0x95674701 ) + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* Sound voices */ + ROM_LOAD( "ky1_v1.bin", 0x000000, 0x080000, 0x5ff81aec ) +ROM_END + + +/*************************************************************/ +/* Set gametype so that the protection code knows how to */ +/* emulate the correct responses */ +/* */ +/* 0x4e71 == 68000 NOP */ +/* 0x4e75 == 68000 RTS */ +/* */ /*************************************************************/ void init_assault(void) { - namcos2_gametype=NAMCOS2_ASSAULT; + namcos2_gametype=NAMCOS2_ASSAULT; } void init_assaultj(void) { - namcos2_gametype=NAMCOS2_ASSAULT_JP; + namcos2_gametype=NAMCOS2_ASSAULT_JP; } void init_assaultp(void) { - namcos2_gametype=NAMCOS2_ASSAULT_PLUS; + namcos2_gametype=NAMCOS2_ASSAULT_PLUS; } void init_burnforc(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_BURNING_FORCE; - WRITE_WORD( &RAM[0x001e18], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x003a9c], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_BURNING_FORCE; + WRITE_WORD( &RAM[0x001e18], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x003a9c], 0x4e75 ); // Patch $d00000 checks } void init_cosmogng(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_COSMO_GANG; - WRITE_WORD( &RAM[0x0034d2], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_COSMO_GANG; + WRITE_WORD( &RAM[0x0034d2], 0x4e75 ); // Patch $d00000 checks } void init_dsaber(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_DRAGON_SABER; - WRITE_WORD( &RAM[0x001172], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00119c], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x002160], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_DRAGON_SABER; + WRITE_WORD( &RAM[0x001172], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00119c], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x002160], 0x4e75 ); // Patch $d00000 checks } void init_dsaberj(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_DRAGON_SABER_JP; - WRITE_WORD( &RAM[0x001172], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0011a4], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x002160], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_DRAGON_SABER_JP; + WRITE_WORD( &RAM[0x001172], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0011a4], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x002160], 0x4e75 ); // Patch $d00000 checks } void init_dirtfoxj(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_DIRT_FOX_JP; - WRITE_WORD( &RAM[0x008876], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_DIRT_FOX_JP; + WRITE_WORD( &RAM[0x008876], 0x4e75 ); // Patch $d00000 checks + + /* HACK TO MAKE STEERING WORK */ + WRITE_WORD( &RAM[0x00cd0a], 0x007f ); } void init_finallap(void) { - namcos2_gametype=NAMCOS2_FINAL_LAP; + namcos2_gametype=NAMCOS2_FINAL_LAP; } void init_finalap2(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_FINAL_LAP_2; - WRITE_WORD( &RAM[0x004028], 0x4e71 ); // Patch some protection checks - WRITE_WORD( &RAM[0x00402a], 0x4e71 ); - WRITE_WORD( &RAM[0x00403e], 0x4e71 ); - WRITE_WORD( &RAM[0x004040], 0x4e71 ); + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_FINAL_LAP_2; + WRITE_WORD( &RAM[0x004028], 0x4e71 ); // Patch some protection checks + WRITE_WORD( &RAM[0x00402a], 0x4e71 ); + WRITE_WORD( &RAM[0x00403e], 0x4e71 ); + WRITE_WORD( &RAM[0x004040], 0x4e71 ); } void init_finalp2j(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_FINAL_LAP_2; - WRITE_WORD( &RAM[0x003de2], 0x4e71 ); // Patch some protection checks - WRITE_WORD( &RAM[0x003de4], 0x4e71 ); - WRITE_WORD( &RAM[0x003df8], 0x4e71 ); - WRITE_WORD( &RAM[0x003dfa], 0x4e71 ); - WRITE_WORD( &RAM[0x004028], 0x4e71 ); - WRITE_WORD( &RAM[0x00402a], 0x4e71 ); - WRITE_WORD( &RAM[0x00403e], 0x4e71 ); - WRITE_WORD( &RAM[0x004040], 0x4e71 ); + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_FINAL_LAP_2; + WRITE_WORD( &RAM[0x003de2], 0x4e71 ); // Patch some protection checks + WRITE_WORD( &RAM[0x003de4], 0x4e71 ); + WRITE_WORD( &RAM[0x003df8], 0x4e71 ); + WRITE_WORD( &RAM[0x003dfa], 0x4e71 ); + WRITE_WORD( &RAM[0x004028], 0x4e71 ); + WRITE_WORD( &RAM[0x00402a], 0x4e71 ); + WRITE_WORD( &RAM[0x00403e], 0x4e71 ); + WRITE_WORD( &RAM[0x004040], 0x4e71 ); } void init_finalap3(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_FINAL_LAP_3; - WRITE_WORD( &RAM[0x003f36], 0x4e71 ); // Patch some nasty protection - WRITE_WORD( &RAM[0x003f38], 0x4e71 ); // this stuff runs in the IRQ - WRITE_WORD( &RAM[0x003f4c], 0x4e71 ); - WRITE_WORD( &RAM[0x003f4e], 0x4e71 ); - WRITE_WORD( &RAM[0x003f66], 0x4e71 ); - WRITE_WORD( &RAM[0x003f68], 0x4e71 ); - WRITE_WORD( &RAM[0x003f7c], 0x4e71 ); - WRITE_WORD( &RAM[0x003f7e], 0x4e71 ); + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_FINAL_LAP_3; + WRITE_WORD( &RAM[0x003f36], 0x4e71 ); // Patch some nasty protection + WRITE_WORD( &RAM[0x003f38], 0x4e71 ); // this stuff runs in the IRQ + WRITE_WORD( &RAM[0x003f4c], 0x4e71 ); + WRITE_WORD( &RAM[0x003f4e], 0x4e71 ); + WRITE_WORD( &RAM[0x003f66], 0x4e71 ); + WRITE_WORD( &RAM[0x003f68], 0x4e71 ); + WRITE_WORD( &RAM[0x003f7c], 0x4e71 ); + WRITE_WORD( &RAM[0x003f7e], 0x4e71 ); } void init_finehour(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_FINEST_HOUR; - WRITE_WORD( &RAM[0x001892], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x003ac0], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00467c], 0x4e71 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_FINEST_HOUR; + WRITE_WORD( &RAM[0x001892], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x003ac0], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00467c], 0x4e71 ); // Patch $d00000 checks } void init_fourtrax(void) { - namcos2_gametype=NAMCOS2_FOUR_TRAX; + namcos2_gametype=NAMCOS2_FOUR_TRAX; +} + +void init_kyukaidk(void) +{ + namcos2_gametype=NAMCOS2_KYUUKAI_DOUCHUUKI; } void init_marvlanj(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_MARVEL_LAND; - WRITE_WORD( &RAM[0x000f24], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001fb2], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0048b6], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0048d2], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_MARVEL_LAND; + WRITE_WORD( &RAM[0x000f24], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001fb2], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0048b6], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0048d2], 0x4e75 ); // Patch $d00000 checks } void init_marvland(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_MARVEL_LAND; - WRITE_WORD( &RAM[0x00101e], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00223a], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x004cf4], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x004d10], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_MARVEL_LAND; + WRITE_WORD( &RAM[0x00101e], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00223a], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x004cf4], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x004d10], 0x4e75 ); // Patch $d00000 checks } void init_metlhawk(void) { - namcos2_gametype=NAMCOS2_METAL_HAWK; + namcos2_gametype=NAMCOS2_METAL_HAWK; } void init_mirninja(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_MIRAI_NINJA; - WRITE_WORD( &RAM[0x00052a], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x01de68], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_MIRAI_NINJA; + WRITE_WORD( &RAM[0x00052a], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x01de68], 0x4e75 ); // Patch $d00000 checks } void init_ordyne(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_ORDYNE; - WRITE_WORD( &RAM[0x0025a4], 0x4e75 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0025c2], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_ORDYNE; + WRITE_WORD( &RAM[0x0025a4], 0x4e75 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0025c2], 0x4e75 ); // Patch $d00000 checks } void init_phelios(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_PHELIOS; - WRITE_WORD( &RAM[0x0011ea], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0011ec], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0011f6], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0011f8], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00120a], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00120c], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001216], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001218], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001222], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001224], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x00122e], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x001230], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x02607a], 0x4e75 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_PHELIOS; + WRITE_WORD( &RAM[0x0011ea], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0011ec], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0011f6], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0011f8], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00120a], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00120c], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001216], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001218], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001222], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001224], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x00122e], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x001230], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x02607a], 0x4e75 ); // Patch $d00000 checks } void init_rthun2(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_ROLLING_THUNDER_2; - WRITE_WORD( &RAM[0x0042b0], 0x4e71 ); // Patch $d00000 checks - - WRITE_WORD( &RAM[0x004260], 0x33fc ); // Protection patch, replace - WRITE_WORD( &RAM[0x004262], 0x0000 ); // - WRITE_WORD( &RAM[0x004264], 0x0010 ); // move.w $d00004,$100002 - WRITE_WORD( &RAM[0x004266], 0x0002 ); // with - WRITE_WORD( &RAM[0x004268], 0x4e71 ); // move.w #$0001,$100002 + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_ROLLING_THUNDER_2; + WRITE_WORD( &RAM[0x0042b0], 0x4e71 ); // Patch $d00000 checks + + WRITE_WORD( &RAM[0x004260], 0x33fc ); // Protection patch, replace + WRITE_WORD( &RAM[0x004262], 0x0000 ); // + WRITE_WORD( &RAM[0x004264], 0x0010 ); // move.w $d00004,$100002 + WRITE_WORD( &RAM[0x004266], 0x0002 ); // with + WRITE_WORD( &RAM[0x004268], 0x4e71 ); // move.w #$0001,$100002 } void init_rthun2j(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_ROLLING_THUNDER_2; - WRITE_WORD( &RAM[0x0040d2], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0149cc], 0x4e75 ); // Patch $d00000 checks - - WRITE_WORD( &RAM[0x004082], 0x33fc ); // Protection patch, replace - WRITE_WORD( &RAM[0x004084], 0x0000 ); // - WRITE_WORD( &RAM[0x004086], 0x0010 ); // move.w $d00004,$100002 - WRITE_WORD( &RAM[0x004088], 0x0002 ); // with - WRITE_WORD( &RAM[0x00408a], 0x4e71 ); // move.w #$0001,$100002 + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_ROLLING_THUNDER_2; + WRITE_WORD( &RAM[0x0040d2], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0149cc], 0x4e75 ); // Patch $d00000 checks + + WRITE_WORD( &RAM[0x004082], 0x33fc ); // Protection patch, replace + WRITE_WORD( &RAM[0x004084], 0x0000 ); // + WRITE_WORD( &RAM[0x004086], 0x0010 ); // move.w $d00004,$100002 + WRITE_WORD( &RAM[0x004088], 0x0002 ); // with + WRITE_WORD( &RAM[0x00408a], 0x4e71 ); // move.w #$0001,$100002 } void init_sgunner2(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_STEEL_GUNNER_2; - WRITE_WORD( &RAM[0x001162], 0x4e71 ); // Patch $a00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_STEEL_GUNNER_2; + WRITE_WORD( &RAM[0x001162], 0x4e71 ); // Patch $a00000 checks } void init_sws92(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_SUPER_WSTADIUM_92; - WRITE_WORD( &RAM[0x0011fc], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0011fe], 0x4e71 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_SUPER_WSTADIUM_92; + WRITE_WORD( &RAM[0x0011fc], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0011fe], 0x4e71 ); // Patch $d00000 checks } void init_sws93(void) { - unsigned char *RAM=memory_region(REGION_CPU1 ); - namcos2_gametype=NAMCOS2_SUPER_WSTADIUM_93; - WRITE_WORD( &RAM[0x0013ae], 0x4e71 ); // Patch $d00000 checks - WRITE_WORD( &RAM[0x0013b0], 0x4e71 ); // Patch $d00000 checks + unsigned char *RAM=memory_region(REGION_CPU1 ); + namcos2_gametype=NAMCOS2_SUPER_WSTADIUM_93; + WRITE_WORD( &RAM[0x0013ae], 0x4e71 ); // Patch $d00000 checks + WRITE_WORD( &RAM[0x0013b0], 0x4e71 ); // Patch $d00000 checks } void init_suzuka8h(void) { - namcos2_gametype=NAMCOS2_SUZUKA_8_HOURS; + namcos2_gametype=NAMCOS2_SUZUKA_8_HOURS; } void init_suzuk8h2(void) { - unsigned char *RAM=memory_region(REGION_CPU1); - namcos2_gametype=NAMCOS2_SUZUKA_8_HOURS; - WRITE_WORD( &RAM[0x003ec8], 0x4e71 ); // Patch some protection checks - WRITE_WORD( &RAM[0x003ede], 0x4e71 ); - WRITE_WORD( &RAM[0x003ee0], 0x4e71 ); - WRITE_WORD( &RAM[0x003eee], 0x4e71 ); + unsigned char *RAM=memory_region(REGION_CPU1); + namcos2_gametype=NAMCOS2_SUZUKA_8_HOURS_2; + WRITE_WORD( &RAM[0x003ec8], 0x4e71 ); // Patch some protection checks + WRITE_WORD( &RAM[0x003ede], 0x4e71 ); + WRITE_WORD( &RAM[0x003ee0], 0x4e71 ); + WRITE_WORD( &RAM[0x003eee], 0x4e71 ); } void init_valkyrie(void) { - namcos2_gametype=NAMCOS2_VALKYRIE; + namcos2_gametype=NAMCOS2_VALKYRIE; } /* Missing ROM sets/games */ @@ -3280,50 +3577,50 @@ void init_valkyrie(void) /* Bubble Trouble */ /* Super World Stadium */ /* Steel Gunner */ -/* Super World Stadium */ -/* Kyuukai Douchuuki */ /* Golly Ghost */ /* Lucky & Wild */ /* Based on the dumped BIOS versions it looks like Namco changed the BIOS rom */ -/* from sys2c65b to sys2c65c sometime between 1988 and 1990 as mirai ninja */ -/* and metal hawk have the B version and dragon saber has the C version */ +/* from sys2c65b to sys2c65c sometime between 1988 and 1990 as mirai ninja */ +/* and metal hawk have the B version and dragon saber has the C version */ /* In order of appearance...... */ -// YEAR, NAME , PARENT , MACHINE, INPUT , INIT , MONITOR , COMPANY, FULLNAME, FLAGS -GAMEX(1987, finallap, 0, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev E)", GAME_NOT_WORKING) -GAMEX(1987, finalapd, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev D)", GAME_NOT_WORKING) -GAMEX(1987, finalapc, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev C)", GAME_NOT_WORKING) -GAMEX(1987, finlapjc, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Japan - Rev C)", GAME_NOT_WORKING) -GAMEX(1987, finlapjb, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Japan - Rev B)", GAME_NOT_WORKING) -GAME( 1988, assault, 0, default, assault, assault , ROT90_16BIT, "Namco", "Assault" ) -GAME( 1988, assaultj, assault, default, assault, assaultj, ROT90_16BIT, "Namco", "Assault (Japan)" ) -GAME( 1988, assaultp, assault, default, assault, assaultp, ROT90_16BIT, "Namco", "Assault Plus (Japan)" ) -GAMEX(1988, metlhawk, 0, default, default, metlhawk, ROT90_16BIT, "Namco", "Metal Hawk (Japan)", GAME_NOT_WORKING) -GAME( 1988, mirninja, 0, default, default, mirninja, ROT0_16BIT, "Namco", "Mirai Ninja (Japan)" ) -GAME( 1988, ordyne, 0, default, default, ordyne , ROT180_16BIT, "Namco", "Ordyne (Japan)" ) -GAME( 1988, phelios, 0, default, default, phelios , ROT90_16BIT, "Namco", "Phelios (Japan)" ) -GAME( 1989, burnforc, 0, default, default, burnforc, ROT0_16BIT, "Namco", "Burning Force (Japan)" ) -GAME( 1989, dirtfoxj, 0, default, driving, dirtfoxj, ROT90_16BIT, "Namco", "Dirt Fox (Japan)" ) -GAME( 1989, finehour, 0, default, default, finehour, ROT0_16BIT, "Namco", "Finest Hour (Japan)" ) -GAMEX(1989, fourtrax, 0, driving, driving, fourtrax, ROT0, "Namco", "Four Trax", GAME_NOT_WORKING) -GAME( 1989, marvland, 0, default, default, marvland, ROT0, "Namco", "Marvel Land (US)" ) -GAME( 1989, marvlanj, marvland, default, default, marvlanj, ROT0, "Namco", "Marvel Land (Japan)" ) -GAME( 1989, valkyrie, 0, default, default, valkyrie, ROT90, "Namco", "Legend of the Valkyrie (Japan)" ) -GAME( 1990, dsaber, 0, default, default, dsaber , ROT90, "Namco", "Dragon Saber" ) -GAME( 1990, dsaberj, dsaber, default, default, dsaberj , ROT90, "Namco", "Dragon Saber (Japan)" ) -GAME( 1990, rthun2, 0, default, default, rthun2 , ROT0_16BIT, "Namco", "Rolling Thunder 2" ) -GAME( 1990, rthun2j, rthun2, default, default, rthun2j , ROT0_16BIT, "Namco", "Rolling Thunder 2 (Japan)" ) -GAMEX(1990, finalap2, 0, driving, driving, finalap2, ROT0, "Namco", "Final Lap 2", GAME_NOT_WORKING ) -GAMEX(1990, finalp2j, finalap2, driving, driving, finalp2j, ROT0, "Namco", "Final Lap 2 (Japan)", GAME_NOT_WORKING ) -GAMEX(1991, sgunner2, 0, driving, default, sgunner2, ROT0, "Namco", "Steel Gunner 2 (Japan)", GAME_NOT_WORKING ) -GAME( 1991, cosmogng, 0, default, default, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (US)" ) -GAME( 1991, cosmognj, cosmogng, default, default, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (Japan)" ) -GAMEX(1992, finalap3, 0, driving, driving, finalap3, ROT0, "Namco", "Final Lap 3 (Japan)", GAME_NOT_WORKING ) -GAMEX(1992, suzuka8h, 0, driving, driving, suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (Japan)", GAME_NOT_WORKING ) -GAME( 1992, sws92, 0, default, default, sws92 , ROT0_16BIT, "Namco", "Super World Stadium '92 (Japan)" ) -GAMEX(1993, suzuk8h2, 0, driving, driving, suzuk8h2, ROT0, "Namco", "Suzuka 8 Hours (Japan)", GAME_NOT_WORKING ) -GAME( 1993, sws93, sws92, default, default, sws93 , ROT0_16BIT, "Namco", "Super World Stadium '93 (Japan)" ) +// YEAR, NAME, PARENT , MACHINE, INPUT , INIT, MONITOR , COMPANY, FULLNAME, FLAGS +GAMEX(1987, finallap, 0, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev E)", GAME_NOT_WORKING) +GAMEX(1987, finalapd, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev D)", GAME_NOT_WORKING) +GAMEX(1987, finalapc, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Rev C)", GAME_NOT_WORKING) +GAMEX(1987, finlapjc, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Japan - Rev C)", GAME_NOT_WORKING) +GAMEX(1987, finlapjb, finallap, driving, driving, finallap, ROT0, "Namco", "Final Lap (Japan - Rev B)", GAME_NOT_WORKING) +GAME( 1988, assault, 0, default, assault, assault , ROT90_16BIT, "Namco", "Assault" ) +GAME( 1988, assaultj, assault, default, assault, assaultj, ROT90_16BIT, "Namco", "Assault (Japan)" ) +GAME( 1988, assaultp, assault, default, assault, assaultp, ROT90_16BIT, "Namco", "Assault Plus (Japan)" ) +GAMEX(1988, metlhawk, 0, metlhawk, metlhawk, metlhawk, ROT90_16BIT, "Namco", "Metal Hawk (Japan)", GAME_NOT_WORKING) +GAME( 1988, mirninja, 0, default, default, mirninja, ROT0_16BIT, "Namco", "Mirai Ninja (Japan)" ) +GAME( 1988, ordyne, 0, default, default, ordyne, ROT180_16BIT, "Namco", "Ordyne (Japan)" ) +GAME( 1988, phelios, 0, default, default, phelios , ROT90_16BIT, "Namco", "Phelios (Japan)" ) +GAME( 1989, burnforc, 0, default, default, burnforc, ROT0_16BIT, "Namco", "Burning Force (Japan)" ) +GAME( 1989, dirtfoxj, 0, default, dirtfox, dirtfoxj, ROT90_16BIT, "Namco", "Dirt Fox (Japan)" ) +GAME( 1989, finehour, 0, default, default, finehour, ROT0_16BIT, "Namco", "Finest Hour (Japan)" ) +GAMEX(1989, fourtrax, 0, driving, driving, fourtrax, ROT0, "Namco", "Four Trax", GAME_NOT_WORKING) +GAME( 1989, marvland, 0, default, default, marvland, ROT0, "Namco", "Marvel Land (US)" ) +GAME( 1989, marvlanj, marvland, default, default, marvlanj, ROT0, "Namco", "Marvel Land (Japan)" ) +GAME( 1989, valkyrie, 0, default, default, valkyrie, ROT90, "Namco", "Legend of the Valkyrie (Japan)" ) +GAME( 1990, kyukaidk, 0, default, default, kyukaidk, ROT0_16BIT, "Namco", "Kyuukai Douchuuki (Japan new version)" ) +GAME( 1990, kyukaido, kyukaidk, default, default, kyukaidk, ROT0_16BIT, "Namco", "Kyuukai Douchuuki (Japan old version)" ) +GAME( 1990, dsaber, 0, default, default, dsaber, ROT90, "Namco", "Dragon Saber" ) +GAME( 1990, dsaberj, dsaber, default, default, dsaberj, ROT90, "Namco", "Dragon Saber (Japan)" ) +GAME( 1990, rthun2, 0, default, default, rthun2, ROT0_16BIT, "Namco", "Rolling Thunder 2" ) +GAME( 1990, rthun2j, rthun2, default, default, rthun2j, ROT0_16BIT, "Namco", "Rolling Thunder 2 (Japan)" ) +GAMEX(1990, finalap2, 0, driving, driving, finalap2, ROT0, "Namco", "Final Lap 2", GAME_NOT_WORKING ) +GAMEX(1990, finalp2j, finalap2, driving, driving, finalp2j, ROT0, "Namco", "Final Lap 2 (Japan)", GAME_NOT_WORKING ) +GAMEX(1991, sgunner2, 0, driving, default, sgunner2, ROT0, "Namco", "Steel Gunner 2 (Japan)", GAME_NOT_WORKING ) +GAME( 1991, cosmogng, 0, default, default, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (US)" ) +GAME( 1991, cosmognj, cosmogng, default, default, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (Japan)" ) +GAMEX(1992, finalap3, 0, driving, driving, finalap3, ROT0, "Namco", "Final Lap 3 (Japan)", GAME_NOT_WORKING ) +GAMEX(1992, suzuka8h, 0, driving, driving, suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (Japan)", GAME_NOT_WORKING ) +GAME( 1992, sws92, 0, default, default, sws92, ROT0_16BIT, "Namco", "Super World Stadium '92 (Japan)" ) +GAMEX(1993, suzuk8h2, 0, driving, driving, suzuk8h2, ROT0, "Namco", "Suzuka 8 Hours 2 (Japan)", GAME_NOT_WORKING ) +GAME( 1993, sws93, sws92, default, default, sws93, ROT0_16BIT, "Namco", "Super World Stadium '93 (Japan)" ) diff --git a/src/drivers/naughtyb.c b/src/drivers/naughtyb.c index 3cd021b48..68c15752a 100644 --- a/src/drivers/naughtyb.c +++ b/src/drivers/naughtyb.c @@ -123,7 +123,7 @@ void naughtyb_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); void pleiads_sound_control_a_w(int offset, int data); void pleiads_sound_control_b_w(int offset, int data); int pleiads_sh_start(const struct MachineSound *msound); - +void pleiads_sh_stop(void); void pleiads_sh_update(void); static struct MemoryReadAddress readmem[] = @@ -248,10 +248,20 @@ static struct GfxDecodeInfo gfxdecodeinfo[] = static struct CustomSound_interface custom_interface = { pleiads_sh_start, - 0, + pleiads_sh_stop, pleiads_sh_update }; +static struct TMS36XXinterface tms3617_interface = +{ + 2, + { 50, 50 }, /* mixing levels */ + { TMS3617, TMS3617 }, /* TMS36xx subtypes */ /* WRONG it's a single 3615 */ + { 247, 247 }, /* base clocks (one octave below A) */ + /* and decay times of the six harmonic voices */ + { {0.5,0.5,0.5,0.5,0.5,0.5 }, {0.5,0.5,0.5,0.5,0.5,0.5} } +}; + static struct MachineDriver machine_driver_naughtyb = @@ -288,8 +298,12 @@ static struct MachineDriver machine_driver_naughtyb = { SOUND_CUSTOM, &custom_interface - } - } + }, + { + SOUND_TMS36XX, + &tms3617_interface + } + } }; /* Exactly the same but for the writemem handler */ @@ -327,6 +341,10 @@ static struct MachineDriver machine_driver_popflame = { SOUND_CUSTOM, &custom_interface + }, + { + SOUND_TMS36XX, + &tms3617_interface } } }; @@ -465,8 +483,8 @@ ROM_END -GAME( 1982, naughtyb, 0, naughtyb, naughtyb, 0, ROT90, "Jaleco", "Naughty Boy" ) -GAME( 1982, naughtya, naughtyb, naughtyb, naughtyb, 0, ROT90, "bootleg", "Naughty Boy (bootleg)" ) -GAME( 1982, naughtyc, naughtyb, naughtyb, naughtyb, 0, ROT90, "Jaleco (Cinematronics license)", "Naughty Boy (Cinematronics)" ) -GAME( 1982, popflame, 0, popflame, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (set 1)" ) -GAME( 1982, popflama, popflame, popflame, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (set 2)" ) +GAMEX( 1982, naughtyb, 0, naughtyb, naughtyb, 0, ROT90, "Jaleco", "Naughty Boy", GAME_NO_COCKTAIL ) +GAMEX( 1982, naughtya, naughtyb, naughtyb, naughtyb, 0, ROT90, "bootleg", "Naughty Boy (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1982, naughtyc, naughtyb, naughtyb, naughtyb, 0, ROT90, "Jaleco (Cinematronics license)", "Naughty Boy (Cinematronics)", GAME_NO_COCKTAIL ) +GAMEX( 1982, popflame, 0, popflame, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, popflama, popflame, popflame, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/neogeo.c b/src/drivers/neogeo.c index aa5cb4214..1e3d9aa73 100644 --- a/src/drivers/neogeo.c +++ b/src/drivers/neogeo.c @@ -4335,6 +4335,34 @@ ROM_START( kof99 ) ROM_LOAD_GFX_ODD ( "kof99_c8.rom", 0x3000000, 0x800000, 0x00000000 ) /* Plane 2,3 */ ROM_END +ROM_START( garou ) + ROM_REGION( 0x500000, REGION_CPU1 ) + ROM_LOAD_WIDE_SWAP( "motw_p1.rom", 0x000000, 0x100000, 0x00000000 ) + ROM_LOAD_WIDE_SWAP( "motw_p2.rom", 0x100000, 0x400000, 0x00000000 ) + + NEO_SFIX_128K( "motw_s1.rom", 0x00000000 ) + + NEO_BIOS_SOUND_256K( "motw_m1.rom", 0x00000000 ) + + ROM_REGION( 0x1000000, REGION_SOUND1 | REGIONFLAG_SOUNDONLY ) + ROM_LOAD( "motw_v1.rom", 0x000000, 0x400000, 0x00000000 ) + ROM_LOAD( "motw_v2.rom", 0x400000, 0x400000, 0x00000000 ) + ROM_LOAD( "motw_v3.rom", 0x800000, 0x400000, 0x00000000 ) + ROM_LOAD( "motw_v4.rom", 0xc00000, 0x400000, 0x00000000 ) + + NO_DELTAT_REGION + + ROM_REGION( 0x4000000, REGION_GFX2 ) + ROM_LOAD_GFX_EVEN( "motw_c1.rom", 0x0000000, 0x800000, 0x00000000 ) /* Plane 0,1 */ + ROM_LOAD_GFX_ODD ( "motw_c2.rom", 0x0000000, 0x800000, 0x00000000 ) /* Plane 2,3 */ + ROM_LOAD_GFX_EVEN( "motw_c3.rom", 0x1000000, 0x800000, 0x00000000 ) /* Plane 0,1 */ + ROM_LOAD_GFX_ODD ( "motw_c4.rom", 0x1000000, 0x800000, 0x00000000 ) /* Plane 2,3 */ + ROM_LOAD_GFX_EVEN( "motw_c5.rom", 0x2000000, 0x800000, 0x00000000 ) /* Plane 0,1 */ + ROM_LOAD_GFX_ODD ( "motw_c6.rom", 0x2000000, 0x800000, 0x00000000 ) /* Plane 2,3 */ + ROM_LOAD_GFX_EVEN( "motw_c7.rom", 0x3000000, 0x800000, 0x00000000 ) /* Plane 0,1 */ + ROM_LOAD_GFX_ODD ( "motw_c8.rom", 0x3000000, 0x800000, 0x00000000 ) /* Plane 2,3 */ +ROM_END + /******************************************************************************/ /* dummy entry for the dummy bios driver */ @@ -4454,7 +4482,7 @@ GAME( 1993, sengoku2, neogeo, raster, neogeo, neogeo, ROT0_16BIT, "SNK", "Sen GAME( 1992, bstars2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Baseball Stars 2" ) GAME( 1992, quizdai2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Quiz Meintantei Neo Geo - Quiz Daisousa Sen Part 2" ) GAME( 1993, 3countb, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "3 Count Bout / Fire Suplex" ) -GAME( 1992, aof, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Art of Fighting / Ryuuko no Ken" ) +GAME( 1992, aof, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "Art of Fighting / Ryuuko no Ken" ) GAME( 1993, samsho, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "Samurai Shodown / Samurai Spirits" ) GAME( 1994, tophuntr, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "Top Hunter - Roddy & Cathy" ) GAME( 1992, fatfury2, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury 2 / Garou Densetsu 2 - arata-naru tatakai" ) @@ -4486,6 +4514,7 @@ GAME( 1998, lastbld2, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "The GAME( 1998, neocup98, neogeo, raster, neogeo, neogeo, ROT0_16BIT, "SNK", "Neo-Geo Cup '98 - The Road to the Victory" ) GAME( 1999, mslugx, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "Metal Slug X - Super Vehicle-001" ) GAME( 1999, kof99, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "The King of Fighters '99 - Millennium Battle" ) +GAME( 1999, garou, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "SNK", "Garou - Mark of the Wolves" ) /* Alpha Denshi Co / ADK (changed name in 1993) */ GAME( 1990, maglord, neogeo, neogeo, neogeo, neogeo, ROT0, "Alpha Denshi Co", "Magician Lord (set 1)" ) @@ -4507,7 +4536,7 @@ GAME( 1996, twinspri, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "ADK", /* Aicom */ GAME( 1994, janshin, neogeo, neogeo, neogeo, neogeo, ROT0, "Aicom", "Jyanshin Densetsu - Quest of Jongmaster" ) -GAME( 1995, pulstar, neogeo, neogeo, neogeo, neogeo, ROT0, "Aicom", "Pulstar" ) +GAME( 1995, pulstar, neogeo, neogeo, neogeo, neogeo, ROT0_16BIT, "Aicom", "Pulstar" ) /* Data East Corporation */ GAME( 1993, spinmast, neogeo, raster, neogeo, neogeo, ROT0_16BIT, "Data East Corporation", "Spinmaster / Miracle Adventure" ) diff --git a/src/drivers/nitedrvr.c b/src/drivers/nitedrvr.c index 15c97461c..f8233bfa7 100644 --- a/src/drivers/nitedrvr.c +++ b/src/drivers/nitedrvr.c @@ -222,4 +222,4 @@ ROM_END -GAME( 1976, nitedrvr, 0, nitedrv, nitedrvr, 0, ROT0, "Atari", "Night Driver" ) +GAMEX( 1976, nitedrvr, 0, nitedrv, nitedrvr, 0, ROT0, "Atari", "Night Driver", GAME_NO_SOUND ) diff --git a/src/drivers/pacland.c b/src/drivers/pacland.c index 02337d0a7..c2b06383a 100644 --- a/src/drivers/pacland.c +++ b/src/drivers/pacland.c @@ -504,7 +504,7 @@ ROM_END -GAME( 1984, pacland, 0, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 1)" ) -GAME( 1984, pacland2, pacland, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 2)" ) -GAME( 1984, pacland3, pacland, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 3)" ) -GAME( 1984, paclandm, pacland, pacland, pacland, 0, ROT0, "[Namco] (Bally Midway license)", "Pac-Land (Midway)" ) +GAMEX( 1984, pacland, 0, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1984, pacland2, pacland, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1984, pacland3, pacland, pacland, pacland, 0, ROT0, "Namco", "Pac-Land (set 3)", GAME_NO_COCKTAIL ) +GAMEX( 1984, paclandm, pacland, pacland, pacland, 0, ROT0, "[Namco] (Bally Midway license)", "Pac-Land (Midway)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/pacman.c b/src/drivers/pacman.c index 80dcfc014..a63444394 100644 --- a/src/drivers/pacman.c +++ b/src/drivers/pacman.c @@ -113,6 +113,12 @@ Reads: $01C8, $01D2, $0260, $030E, $040E, $0416, $046E, $0474, $2AAE, $2BF4, $2E0A, $39D5, $39DA, $3AE2, $3AEA, $3EE0, $3EE9, $3F07, $3F0D + + +Notes: + +- The mystery items in Ali Baba don't work correctly because of protection + ***************************************************************************/ #include "driver.h" @@ -151,6 +157,26 @@ static void alibaba_sound_w(int offset, int data) } +static int alibaba_mystery_1_r(int offset) +{ + // The return value determines what the mystery item is. Each bit corresponds + // to a question mark + + return rand() & 0x0f; +} + +static int alibaba_mystery_2_r(int offset) +{ + static int mystery = 0; + + // The single bit return value determines when the mystery is lit up. + // This is certainly wrong + + mystery++; + return (mystery >> 10) & 1; +} + + static void pacman_coin_lockout_global_w(int offset, int data) { coin_lockout_global_w(offset, ~data & 0x01); @@ -203,7 +229,8 @@ static struct MemoryReadAddress alibaba_readmem[] = { 0x5000, 0x503f, input_port_0_r }, /* IN0 */ { 0x5040, 0x507f, input_port_1_r }, /* IN1 */ { 0x5080, 0x50bf, input_port_2_r }, /* DSW1 */ - { 0x50c0, 0x50ff, input_port_3_r }, /* DSW2 */ + { 0x50c0, 0x50c0, alibaba_mystery_1_r }, + { 0x50c1, 0x50c1, alibaba_mystery_2_r }, { 0x8000, 0x8fff, MRA_ROM }, { 0x9000, 0x93ff, MRA_RAM }, { 0xa000, 0xa7ff, MRA_ROM }, @@ -658,6 +685,54 @@ INPUT_PORTS_START( eyes ) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END +INPUT_PORTS_START( mrtnt ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY ) + PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) + + PORT_START /* DSW 1 */ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x0c, "2" ) + PORT_DIPSETTING( 0x08, "3" ) + PORT_DIPSETTING( 0x04, "4" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x30, "75000" ) + PORT_DIPSETTING( 0x20, "100000" ) + PORT_DIPSETTING( 0x10, "125000" ) + PORT_DIPSETTING( 0x00, "150000" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START /* DSW 2 */ + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + INPUT_PORTS_START( lizwiz ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) @@ -969,17 +1044,15 @@ INPUT_PORTS_START( alibaba ) PORT_DIPSETTING(0x10, DEF_STR( Off ) ) PORT_DIPSETTING(0x00, DEF_STR( On ) ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) @@ -1008,9 +1081,6 @@ INPUT_PORTS_START( alibaba ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START /* DSW 2 */ - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -1855,8 +1925,8 @@ ROM_START( mrtnt ) ROM_LOAD( "tnt.6", 0x0000, 0x1000, 0x97634d8b ) ROM_REGION( 0x0120, REGION_PROMS ) - ROM_LOAD( "mrtnt08.bin", 0x0000, 0x0020, 0x00000000 ) /* wrong! from Pac-Man */ - ROM_LOAD( "mrtnt04.bin", 0x0020, 0x0100, 0x00000000 ) /* wrong! from Pac-Man */ + ROM_LOAD( "mrtnt08.bin", 0x0000, 0x0020, 0x00000000 ) + ROM_LOAD( "mrtnt04.bin", 0x0020, 0x0100, 0x00000000 ) ROM_REGION( 0x0200, REGION_SOUND1 ) /* sound PROMs */ ROM_LOAD( "82s126.1m", 0x0000, 0x0100, 0xa9cc86bf ) @@ -2227,7 +2297,7 @@ GAME( 1982, ponpoko, 0, pacman, ponpoko, ponpoko, ROT0, "Sigma Ent GAME( 1982, ponpokov, ponpoko, pacman, ponpoko, ponpoko, ROT0, "Sigma Ent. Inc. (Venture Line license)", "Ponpoko (Venture Line)" ) GAME( 1982, eyes, 0, pacman, eyes, eyes, ROT90, "Digitrex Techstar (Rock-ola license)", "Eyes (Digitrex Techstar)" ) GAME( 1982, eyes2, eyes, pacman, eyes, eyes, ROT90, "Techstar Inc. (Rock-ola license)", "Eyes (Techstar Inc.)" ) -GAME( 1983, mrtnt, 0, pacman, eyes, eyes, ROT90, "Telko", "Mr. TNT" ) +GAME( 1983, mrtnt, 0, pacman, mrtnt, eyes, ROT90, "Telko", "Mr. TNT" ) GAME( 1985, lizwiz, 0, pacman, lizwiz, 0, ROT90, "Techstar (Sunn license)", "Lizard Wizard" ) GAME( 1983, theglob, 0, theglob, theglob, 0, ROT90, "Epos Corporation", "The Glob" ) GAME( 1984, beastf, theglob, theglob, theglob, 0, ROT90, "Epos Corporation", "Beastie Feastie" ) diff --git a/src/drivers/pandoras.c b/src/drivers/pandoras.c index 64bd483ed..2fca01cd3 100644 --- a/src/drivers/pandoras.c +++ b/src/drivers/pandoras.c @@ -523,4 +523,4 @@ ROM_END -GAME( 1984, pandoras, 0, pandoras, pandoras, 0, ROT270, "Konami/Interlogic", "Pandora's Palace" ) +GAMEX( 1984, pandoras, 0, pandoras, pandoras, 0, ROT270, "Konami/Interlogic", "Pandora's Palace", GAME_NO_COCKTAIL ) diff --git a/src/drivers/parodius.c b/src/drivers/parodius.c index c58b252e2..4de9f6326 100644 --- a/src/drivers/parodius.c +++ b/src/drivers/parodius.c @@ -311,7 +311,7 @@ static struct YM2151interface ym2151_interface = { 1, /* 1 chip */ 3579545, /* 3.579545 MHz */ - { YM3012_VOL(50,MIXER_PAN_LEFT,50,MIXER_PAN_RIGHT) }, + { YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }, { 0 }, }; @@ -319,7 +319,7 @@ static struct K053260_interface k053260_interface = { 3579545, REGION_SOUND1, /* memory region */ - { MIXER(75,MIXER_PAN_LEFT), MIXER(75,MIXER_PAN_RIGHT) }, + { MIXER(70,MIXER_PAN_LEFT), MIXER(70,MIXER_PAN_RIGHT) }, // sound_nmi_callback }; diff --git a/src/drivers/pcktgal.c b/src/drivers/pcktgal.c index 695abed2a..529804cad 100644 --- a/src/drivers/pcktgal.c +++ b/src/drivers/pcktgal.c @@ -8,7 +8,7 @@ Pocket Gal (Bootleg) is often called 'Sexy Billiards' - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/drivers/phoenix.c b/src/drivers/phoenix.c index 32c4dbc7d..1d420fab8 100644 --- a/src/drivers/phoenix.c +++ b/src/drivers/phoenix.c @@ -42,7 +42,7 @@ read-only: * bit 3 :\ bonus * bit 2 :/ 00 = 3000 01 = 4000 10 = 5000 11 = 6000 * bit 1 :\ number of lives - * bit 0 :/ 00 = 3 01 = 4 10 = 5 11 = 6 + * bit 0 :/ 00 = 3 01 = 4 10 = 5 11 = 6 ***************************************************************************/ @@ -62,11 +62,13 @@ void phoenix_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); void phoenix_sound_control_a_w(int offset, int data); void phoenix_sound_control_b_w(int offset, int data); int phoenix_sh_start(const struct MachineSound *msound); +void phoenix_sh_stop(void); void phoenix_sh_update(void); void pleiads_sound_control_a_w(int offset, int data); void pleiads_sound_control_b_w(int offset, int data); int pleiads_sh_start(const struct MachineSound *msound); +void pleiads_sh_stop(void); void pleiads_sh_update(void); @@ -74,8 +76,8 @@ static struct MemoryReadAddress readmem[] = { { 0x0000, 0x3fff, MRA_ROM }, { 0x4000, 0x4fff, phoenix_paged_ram_r }, /* 2 pages selected by Bit 0 of videoregister */ - { 0x7000, 0x73ff, phoenix_input_port_0_r }, /* IN0 */ - { 0x7800, 0x7bff, input_port_1_r }, /* DSW */ + { 0x7000, 0x73ff, phoenix_input_port_0_r }, /* IN0 */ + { 0x7800, 0x7bff, input_port_1_r }, /* DSW */ { -1 } /* end of table */ }; @@ -85,12 +87,12 @@ static struct MemoryReadAddress readmem[] = static struct MemoryWriteAddress GAMENAME##_writemem[] = \ { \ { 0x0000, 0x3fff, MWA_ROM }, \ - { 0x4000, 0x4fff, phoenix_paged_ram_w }, /* 2 pages selected by Bit 0 of the video register */ \ - { 0x5000, 0x53ff, phoenix_videoreg_w }, \ - { 0x5800, 0x5bff, phoenix_scroll_w }, /* the game sometimes writes at mirror addresses */ \ + { 0x4000, 0x4fff, phoenix_paged_ram_w }, /* 2 pages selected by Bit 0 of the video register */ \ + { 0x5000, 0x53ff, phoenix_videoreg_w }, \ + { 0x5800, 0x5bff, phoenix_scroll_w }, /* the game sometimes writes at mirror addresses */ \ { 0x6000, 0x63ff, GAMENAME##_sound_control_a_w }, \ { 0x6800, 0x6bff, GAMENAME##_sound_control_b_w }, \ - { -1 } /* end of table */ \ + { -1 } /* end of table */ \ }; WRITEMEM(phoenix) @@ -99,7 +101,7 @@ WRITEMEM(pleiads) INPUT_PORTS_START( phoenix ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -109,31 +111,31 @@ INPUT_PORTS_START( phoenix ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* DSW0 */ + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPSETTING( 0x04, "4000" ) - PORT_DIPSETTING( 0x08, "5000" ) - PORT_DIPSETTING( 0x0c, "6000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPSETTING( 0x04, "4000" ) + PORT_DIPSETTING( 0x08, "5000" ) + PORT_DIPSETTING( 0x0c, "6000" ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END INPUT_PORTS_START( phoenixa ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -143,33 +145,33 @@ INPUT_PORTS_START( phoenixa ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* DSW0 */ + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPSETTING( 0x04, "4000" ) - PORT_DIPSETTING( 0x08, "5000" ) - PORT_DIPSETTING( 0x0c, "6000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPSETTING( 0x04, "4000" ) + PORT_DIPSETTING( 0x08, "5000" ) + PORT_DIPSETTING( 0x0c, "6000" ) /* Coinage is backwards from phoenix (Amstar) */ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END INPUT_PORTS_START( phoenixt ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -179,31 +181,31 @@ INPUT_PORTS_START( phoenixt ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* DSW0 */ + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPSETTING( 0x04, "4000" ) - PORT_DIPSETTING( 0x08, "5000" ) - PORT_DIPSETTING( 0x0c, "6000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPSETTING( 0x04, "4000" ) + PORT_DIPSETTING( 0x08, "5000" ) + PORT_DIPSETTING( 0x0c, "6000" ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END INPUT_PORTS_START( phoenix3 ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -212,32 +214,32 @@ INPUT_PORTS_START( phoenix3 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* DSW0 */ + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPSETTING( 0x04, "4000" ) - PORT_DIPSETTING( 0x08, "5000" ) - PORT_DIPSETTING( 0x0c, "6000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPSETTING( 0x04, "4000" ) + PORT_DIPSETTING( 0x08, "5000" ) + PORT_DIPSETTING( 0x0c, "6000" ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END INPUT_PORTS_START( pleiads ) - PORT_START /* IN0 */ + PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -246,26 +248,26 @@ INPUT_PORTS_START( pleiads ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* DSW0 */ + PORT_START /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPSETTING( 0x04, "4000" ) - PORT_DIPSETTING( 0x08, "5000" ) - PORT_DIPSETTING( 0x0c, "6000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPSETTING( 0x04, "4000" ) + PORT_DIPSETTING( 0x08, "5000" ) + PORT_DIPSETTING( 0x0c, "6000" ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END @@ -275,38 +277,59 @@ static struct GfxLayout charlayout = 8,8, /* 8*8 characters */ 256, /* 256 characters */ 2, /* 2 bits per pixel */ - { 256*8*8, 0 }, /* the two bitplanes are separated */ - { 7, 6, 5, 4, 3, 2, 1, 0 }, /* pretty straightforward layout */ + { 256*8*8, 0 }, /* the two bitplanes are separated */ + { 7, 6, 5, 4, 3, 2, 1, 0 }, /* pretty straightforward layout */ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 consecutive bytes */ + 8*8 /* every char takes 8 consecutive bytes */ }; static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout, 0, 16 }, + { REGION_GFX1, 0, &charlayout, 0, 16 }, { REGION_GFX2, 0, &charlayout, 16*4, 16 }, { -1 } /* end of array */ }; +static struct TMS36XXinterface phoenix_tms36xx_interface = +{ + 1, + { 75 }, /* mixing levels */ + { TMS3615 }, /* TMS36xx subtype(s) */ /* WRONG it's not a 3615 */ + { 372 }, /* base frequency */ + { {0.50,0.12,0,1.05,0.27,0} }, /* decay times of voices */ + { 0.21 }, /* tune speed (time between beats) */ +}; + static struct CustomSound_interface phoenix_custom_interface = { phoenix_sh_start, - 0, + phoenix_sh_stop, phoenix_sh_update }; +static struct TMS36XXinterface pleiads_tms36xx_interface = +{ + 2, + { 75, 75 }, /* mixing levels (the chips are triggered alternatingly) */ + { TMS3617, TMS3617 }, /* TMS36xx subtype(s) */ /* WRONG it's a single 3617 */ + { 247, 247 }, /* base frequencies (one octave below A) */ + /* decay times of the voices */ + { {0.5, 0.5, 0.5, 0.5, 0.5, 0.5}, + {0.5, 0.5, 0.5, 0.5, 0.5, 0.5} } +}; + static struct CustomSound_interface pleiads_custom_interface = { pleiads_sh_start, - 0, + pleiads_sh_stop, pleiads_sh_update }; #define MACHINE_DRIVER(GAMENAME) \ \ -static struct MachineDriver machine_driver_##GAMENAME = \ +static struct MachineDriver machine_driver_##GAMENAME = \ { \ /* basic machine hardware */ \ { \ @@ -336,6 +359,10 @@ static struct MachineDriver machine_driver_##GAMENAME = \ /* sound hardware */ \ 0,0,0,0, \ { \ + { \ + SOUND_TMS36XX, \ + &GAMENAME##_tms36xx_interface \ + }, \ { \ SOUND_CUSTOM, \ &GAMENAME##_custom_interface \ @@ -375,8 +402,8 @@ ROM_START( phoenix ) ROM_LOAD( "ic40", 0x0800, 0x0800, 0x0be2ba91 ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ - ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ + ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ + ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ ROM_END ROM_START( phoenixa ) @@ -399,8 +426,8 @@ ROM_START( phoenixa ) ROM_LOAD( "phoenixc.40", 0x0800, 0x0800, 0x4178aa4f ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ - ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ + ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ + ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ ROM_END ROM_START( phoenixt ) @@ -423,8 +450,8 @@ ROM_START( phoenixt ) ROM_LOAD( "ic40", 0x0800, 0x0800, 0x0be2ba91 ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ - ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ + ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ + ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ ROM_END ROM_START( phoenix3 ) @@ -447,8 +474,8 @@ ROM_START( phoenix3 ) ROM_LOAD( "ic40", 0x0800, 0x0800, 0x0be2ba91 ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ - ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ + ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ + ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ ROM_END ROM_START( phoenixc ) @@ -471,8 +498,8 @@ ROM_START( phoenixc ) ROM_LOAD( "phoenixc.40", 0x0800, 0x0800, 0x4178aa4f ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ - ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ + ROM_LOAD( "ic40_b.bin", 0x0000, 0x0100, 0x79350b25 ) /* palette low bits */ + ROM_LOAD( "ic41_a.bin", 0x0100, 0x0100, 0xe176b768 ) /* palette high bits */ ROM_END ROM_START( pleiads ) @@ -495,8 +522,8 @@ ROM_START( pleiads ) ROM_LOAD( "ic40.bin", 0x0800, 0x0800, 0xa841d511 ) /* IC 26 on real board */ ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ - ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ + ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ + ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ ROM_END ROM_START( pleiadbl ) @@ -519,8 +546,8 @@ ROM_START( pleiadbl ) ROM_LOAD( "ic40.bin", 0x0800, 0x0800, 0xa841d511 ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ - ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ + ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ + ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ ROM_END ROM_START( pleiadce ) @@ -543,17 +570,18 @@ ROM_START( pleiadce ) ROM_LOAD( "ic40.bin", 0x0800, 0x0800, 0xa841d511 ) ROM_REGION( 0x0200, REGION_PROMS ) - ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ - ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ + ROM_LOAD( "7611-5.26", 0x0000, 0x0100, 0x7a1bcb1e ) /* palette low bits */ + ROM_LOAD( "7611-5.33", 0x0100, 0x0100, 0xe38eeb83 ) /* palette high bits */ ROM_END -GAME( 1980, phoenix, 0, phoenix, phoenix, 0, ROT90, "Amstar", "Phoenix (Amstar)" ) -GAME( 1980, phoenixa, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri)" ) -GAME( 1980, phoenixt, phoenix, phoenix, phoenixt, 0, ROT90, "Taito", "Phoenix (Taito)" ) -GAME( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", "Phoenix (T.P.N.)" ) -GAME( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)" ) -GAME( 1981, pleiads, 0, pleiads, pleiads, 0, ROT90, "Tehkan", "Pleiads (Tehkan)" ) -GAME( 1981, pleiadbl, pleiads, pleiads, pleiads, 0, ROT90, "bootleg", "Pleiads (bootleg)" ) -GAME( 1981, pleiadce, pleiads, pleiads, pleiads, 0, ROT90, "Tehkan (Centuri license)", "Pleiads (Centuri)" ) +GAMEX( 1980, phoenix, 0, phoenix, phoenix, 0, ROT90, "Amstar", "Phoenix (Amstar)", GAME_NO_COCKTAIL ) +GAMEX( 1980, phoenixa, phoenix, phoenix, phoenixa, 0, ROT90, "Amstar (Centuri license)", "Phoenix (Centuri)", GAME_NO_COCKTAIL ) +GAMEX( 1980, phoenixt, phoenix, phoenix, phoenixt, 0, ROT90, "Taito", "Phoenix (Taito)", GAME_NO_COCKTAIL ) +GAMEX( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", "Phoenix (T.P.N.)", GAME_NO_COCKTAIL ) +GAMEX( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)", GAME_NO_COCKTAIL ) +GAMEX( 1981, pleiads, 0, pleiads, pleiads, 0, ROT90, "Tehkan", "Pleiads (Tehkan)", GAME_NO_COCKTAIL ) +GAMEX( 1981, pleiadbl, pleiads, pleiads, pleiads, 0, ROT90, "bootleg", "Pleiads (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1981, pleiadce, pleiads, pleiads, pleiads, 0, ROT90, "Tehkan (Centuri license)", "Pleiads (Centuri)", GAME_NO_COCKTAIL ) + diff --git a/src/drivers/phozon.c b/src/drivers/phozon.c index 7942a8ffc..f24c443dd 100644 --- a/src/drivers/phozon.c +++ b/src/drivers/phozon.c @@ -351,4 +351,4 @@ ROM_END -GAME( 1983, phozon, 0, phozon, phozon, 0, ROT90, "Namco", "Phozon" ) +GAMEX( 1983, phozon, 0, phozon, phozon, 0, ROT90, "Namco", "Phozon", GAME_NO_COCKTAIL ) diff --git a/src/drivers/popeye.c b/src/drivers/popeye.c index 16c4d25a5..fd3958bbc 100644 --- a/src/drivers/popeye.c +++ b/src/drivers/popeye.c @@ -381,6 +381,6 @@ ROM_END /* The encryption is based on a custom ALU and seems to be dynamically evolving */ /* (like Jr. PacMan). I think it decodes 16 bits at a time, bits 0-2 are (or can be) */ /* an opcode for the ALU and the others contain the data. */ -GAMEX(1982?, popeye, 0, popeyebl, popeye, 0, ROT0, "Nintendo", "Popeye (set 1)", GAME_NOT_WORKING ) -GAMEX(1982?, popeye2, popeye, popeyebl, popeye, 0, ROT0, "Nintendo", "Popeye (set 2)", GAME_NOT_WORKING ) -GAME( 1982?, popeyebl, popeye, popeyebl, popeye, 0, ROT0, "bootleg", "Popeye (bootleg)" ) +GAMEX( 1982?, popeye, 0, popeyebl, popeye, 0, ROT0, "Nintendo", "Popeye (set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1982?, popeye2, popeye, popeyebl, popeye, 0, ROT0, "Nintendo", "Popeye (set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1982?, popeyebl, popeye, popeyebl, popeye, 0, ROT0, "bootleg", "Popeye (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/prehisle.c b/src/drivers/prehisle.c index 54f7ab46a..fff68b9f0 100644 --- a/src/drivers/prehisle.c +++ b/src/drivers/prehisle.c @@ -4,7 +4,7 @@ Prehistoric Isle in 1930 (USA) (c) 1989 SNK Genshi-Tou 1930's (Japan) (c) 1989 SNK - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -441,6 +441,6 @@ static void init_gensitou(void) /******************************************************************************/ -GAME( 1989, prehisle, 0, prehisle, prehisle, prehisle, ROT0, "SNK", "Prehistoric Isle in 1930 (World)" ) -GAME( 1989, prehislu, prehisle, prehisle, prehisle, prehislu, ROT0, "SNK of America", "Prehistoric Isle in 1930 (US)" ) -GAME( 1989, gensitou, prehisle, prehisle, prehisle, gensitou, ROT0, "SNK", "Genshi-Tou 1930's" ) +GAMEX( 1989, prehisle, 0, prehisle, prehisle, prehisle, ROT0, "SNK", "Prehistoric Isle in 1930 (World)", GAME_NO_COCKTAIL ) +GAMEX( 1989, prehislu, prehisle, prehisle, prehisle, prehislu, ROT0, "SNK of America", "Prehistoric Isle in 1930 (US)", GAME_NO_COCKTAIL ) +GAMEX( 1989, gensitou, prehisle, prehisle, prehisle, gensitou, ROT0, "SNK", "Genshi-Tou 1930's", GAME_NO_COCKTAIL ) diff --git a/src/drivers/psychic5.c b/src/drivers/psychic5.c index 4897bc5de..ede36231f 100644 --- a/src/drivers/psychic5.c +++ b/src/drivers/psychic5.c @@ -538,7 +538,7 @@ static struct YM2203interface ym2203_interface = { 2, /* 2 chips */ 6000000/4, /* 1.5 MHz */ - { YM2203_VOL(25,15), YM2203_VOL(25,15) }, + { YM2203_VOL(50,15), YM2203_VOL(50,15) }, { 0 }, { 0 }, { 0 }, @@ -563,7 +563,7 @@ static struct MachineDriver machine_driver_psychic5 = ignore_interrupt,0 /* IRQs are generated by the YM2203 */ } }, - 53, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 53.8, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ /* frames per second hand tuned to match game and music speed */ 10, /* Allow time for 2nd cpu to interleave*/ psychic5_init_machine, @@ -618,4 +618,4 @@ ROM_END -GAME( 1987, psychic5, 0, psychic5, psychic5, 0, ROT270, "Jaleco", "Psychic 5" ) +GAMEX( 1987, psychic5, 0, psychic5, psychic5, 0, ROT270, "Jaleco", "Psychic 5", GAME_NO_COCKTAIL ) diff --git a/src/drivers/punchout.c b/src/drivers/punchout.c index 8c01b52e6..c6f75e8d7 100644 --- a/src/drivers/punchout.c +++ b/src/drivers/punchout.c @@ -3,6 +3,10 @@ Punch Out memory map (preliminary) Arm Wrestling runs on about the same hardware, but the video board is different. +TODO: +- The money bag is misplaced in armwrest bonus rounds. + + driver by Nicola Salmoria @@ -771,6 +775,7 @@ static struct NESinterface nes_interface = /* filename for speech sample files */ static const char *punchout_sample_names[] = { + "*punchout", "00.wav","01.wav","02.wav","03.wav","04.wav","05.wav","06.wav","07.wav", "08.wav","09.wav","0a.wav","0b.wav","0c.wav","0d.wav","0e.wav","0f.wav", "10.wav","11.wav","12.wav","13.wav","14.wav","15.wav","16.wav","17.wav", diff --git a/src/drivers/qix.c b/src/drivers/qix.c index 428a2f158..ffda5e4c5 100644 --- a/src/drivers/qix.c +++ b/src/drivers/qix.c @@ -1096,15 +1096,15 @@ ROM_END -GAME( 1981, qix, 0, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 1)" ) -GAME( 1981, qixa, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 2)" ) -GAME( 1981, qixb, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 3)" ) -GAME( 1981, qix2, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix II (Tournament)" ) -GAME( 1981, sdungeon, 0, mcu, sdungeon, 0, ROT270, "Taito America Corporation", "Space Dungeon" ) -GAME( 1982, elecyoyo, 0, mcu, elecyoyo, 0, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 1)" ) -GAME( 1982, elecyoy2, elecyoyo, mcu, elecyoyo, 0, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 2)" ) -GAME( 1982, kram, 0, mcu, kram, 0, ROT0, "Taito America Corporation", "Kram (set 1)" ) -GAME( 1982, kram2, kram, mcu, kram, 0, ROT0, "Taito America Corporation", "Kram (set 2)" ) -GAME( 1982, zookeep, 0, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 1)" ) -GAME( 1982, zookeep2, zookeep, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 2)" ) -GAME( 1982, zookeep3, zookeep, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 3)" ) +GAMEX( 1981, qix, 0, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1981, qixa, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1981, qixb, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix (set 3)", GAME_NO_COCKTAIL ) +GAMEX( 1981, qix2, qix, qix, qix, 0, ROT270, "Taito America Corporation", "Qix II (Tournament)", GAME_NO_COCKTAIL ) +GAMEX( 1981, sdungeon, 0, mcu, sdungeon, 0, ROT270, "Taito America Corporation", "Space Dungeon", GAME_NO_COCKTAIL ) +GAMEX( 1982, elecyoyo, 0, mcu, elecyoyo, 0, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, elecyoy2, elecyoyo, mcu, elecyoyo, 0, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1982, kram, 0, mcu, kram, 0, ROT0, "Taito America Corporation", "Kram (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, kram2, kram, mcu, kram, 0, ROT0, "Taito America Corporation", "Kram (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1982, zookeep, 0, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, zookeep2, zookeep, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1982, zookeep3, zookeep, zookeep, zookeep, 0, ROT0, "Taito America Corporation", "Zoo Keeper (set 3)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/quantum.c b/src/drivers/quantum.c index 18bfbad7b..e087730be 100644 --- a/src/drivers/quantum.c +++ b/src/drivers/quantum.c @@ -248,7 +248,7 @@ ROM_END -GAME( 1982, quantum, 0, quantum, quantum, 0, ROT0, "Atari", "Quantum (rev 2)" ) -GAME( 1982, quantum1, quantum, quantum, quantum, 0, ROT0, "Atari", "Quantum (rev 1)" ) -GAME( 1982, quantump, quantum, quantum, quantum, 0, ROT0, "Atari", "Quantum (prototype)" ) +GAMEX( 1982, quantum, 0, quantum, quantum, 0, ROT0, "Atari", "Quantum (rev 2)", GAME_WRONG_COLORS ) +GAMEX( 1982, quantum1, quantum, quantum, quantum, 0, ROT0, "Atari", "Quantum (rev 1)", GAME_WRONG_COLORS ) +GAMEX( 1982, quantump, quantum, quantum, quantum, 0, ROT0, "Atari", "Quantum (prototype)", GAME_WRONG_COLORS ) diff --git a/src/drivers/qwakprot.c b/src/drivers/qwakprot.c index 510e0a8f0..b8ce2baa0 100644 --- a/src/drivers/qwakprot.c +++ b/src/drivers/qwakprot.c @@ -268,4 +268,4 @@ ROM_END -GAME( 1982, qwakprot, 0, qwakprot, qwakprot, 0, ROT270, "Atari", "Qwak (prototype)" ) +GAMEX( 1982, qwakprot, 0, qwakprot, qwakprot, 0, ROT270, "Atari", "Qwak (prototype)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/rainbow.c b/src/drivers/rainbow.c index 248cc5ccf..5c9d782a4 100644 --- a/src/drivers/rainbow.c +++ b/src/drivers/rainbow.c @@ -599,6 +599,6 @@ static void init_jumping(void) -GAME( 1987, rainbow, 0, rainbow, rainbow, 0, ROT0, "Taito Corporation", "Rainbow Islands" ) -GAMEX(1988, rainbowe, rainbow, rainbow, rainbow, 0, ROT0, "Taito Corporation", "Rainbow Islands (Extra)", GAME_NOT_WORKING ) -GAMEX(1989, jumping, rainbow, jumping, jumping, jumping, ROT0, "bootleg", "Jumping", GAME_NO_SOUND ) +GAMEX( 1987, rainbow, 0, rainbow, rainbow, 0, ROT0, "Taito Corporation", "Rainbow Islands", GAME_NO_COCKTAIL ) +GAMEX( 1988, rainbowe, rainbow, rainbow, rainbow, 0, ROT0, "Taito Corporation", "Rainbow Islands (Extra)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, jumping, rainbow, jumping, jumping, jumping, ROT0, "bootleg", "Jumping", GAME_NO_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/rastan.c b/src/drivers/rastan.c index 3bf632ec0..f9c73eda4 100644 --- a/src/drivers/rastan.c +++ b/src/drivers/rastan.c @@ -570,8 +570,8 @@ ROM_END -GAME( 1987, rastan, 0, rastan, rastan, 0, ROT0, "Taito Corporation Japan", "Rastan (World)" ) +GAMEX( 1987, rastan, 0, rastan, rastan, 0, ROT0, "Taito Corporation Japan", "Rastan (World)", GAME_NO_COCKTAIL ) /* IDENTICAL to rastan, only differennce is copyright notice and Coin B coinage */ -GAME( 1987, rastanu, rastan, rastan, rastsaga, 0, ROT0, "Taito America Corporation", "Rastan (US set 1)" ) -GAME( 1987, rastanu2, rastan, rastan, rastsaga, 0, ROT0, "Taito America Corporation", "Rastan (US set 2)" ) -GAME( 1987, rastsaga, rastan, rastan, rastsaga, 0, ROT0, "Taito Corporation", "Rastan Saga (Japan)" ) +GAMEX( 1987, rastanu, rastan, rastan, rastsaga, 0, ROT0, "Taito America Corporation", "Rastan (US set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1987, rastanu2, rastan, rastan, rastsaga, 0, ROT0, "Taito America Corporation", "Rastan (US set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1987, rastsaga, rastan, rastan, rastsaga, 0, ROT0, "Taito Corporation", "Rastan Saga (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/redalert.c b/src/drivers/redalert.c index 9150595dc..52a09d2b1 100644 --- a/src/drivers/redalert.c +++ b/src/drivers/redalert.c @@ -366,4 +366,4 @@ ROM_END -GAMEX( 1981, redalert, 0, redalert, redalert, 0, ROT270, "GDI + Irem", "Red Alert", GAME_WRONG_COLORS ) +GAMEX( 1981, redalert, 0, redalert, redalert, 0, ROT270, "GDI + Irem", "Red Alert", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND) diff --git a/src/drivers/renegade.c b/src/drivers/renegade.c index 3333a448d..6e43e3ad2 100644 --- a/src/drivers/renegade.c +++ b/src/drivers/renegade.c @@ -813,6 +813,6 @@ ROM_END -GAME( 1986, renegade, 0, renegade, renegade, renegade, ROT0, "Technos (Taito America license)", "Renegade (US)" ) -GAME( 1986, kuniokun, renegade, renegade, renegade, kuniokun, ROT0, "Technos", "Nekketsu Kouha Kunio-kun (Japan)" ) -GAME( 1986, kuniokub, renegade, renegade, renegade, 0, ROT0, "bootleg", "Nekketsu Kouha Kunio-kun (Japan bootleg)" ) +GAMEX( 1986, renegade, 0, renegade, renegade, renegade, ROT0, "Technos (Taito America license)", "Renegade (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, kuniokun, renegade, renegade, renegade, kuniokun, ROT0, "Technos", "Nekketsu Kouha Kunio-kun (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1986, kuniokub, renegade, renegade, renegade, 0, ROT0, "bootleg", "Nekketsu Kouha Kunio-kun (Japan bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/rockola.c b/src/drivers/rockola.c index 738105643..234fcbd23 100644 --- a/src/drivers/rockola.c +++ b/src/drivers/rockola.c @@ -1079,8 +1079,8 @@ ROM_START( fantasyj ) ROM_LOAD( "fs11ic51.bin", 0x1000, 0x1000, 0x9dfff71c ) ROM_REGION( 0x0040, REGION_PROMS ) - ROM_LOAD( "fantasy.ic7", 0x0000, 0x0020, 0x361a5e99 ) /* foreground colors */ - ROM_LOAD( "fantasy.ic6", 0x0020, 0x0020, 0x33d974f7 ) /* background colors */ + ROM_LOAD( "prom-8.bpr", 0x0000, 0x0020, 0x1aa9285a ) /* foreground colors */ + ROM_LOAD( "prom-7.bpr", 0x0020, 0x0020, 0x7a6f7dc3 ) /* background colors */ ROM_REGION( 0x1800, REGION_SOUND1 ) /* sound ROMs */ ROM_LOAD( "fs_b_51.bin", 0x0000, 0x0800, 0x48094ec5 ) diff --git a/src/drivers/segar.c b/src/drivers/segar.c index 18989bfa2..7349c6ae0 100644 --- a/src/drivers/segar.c +++ b/src/drivers/segar.c @@ -19,8 +19,6 @@ Thanks also go to Paul Tonizzo, Clay Cowgill, John Bowes, and Kevin Klopp for all the helpful information, samples, and schematics! TODO: -- redo TMS3617 to use streams (and fix frequencies) -- abstract TMS3617 into a true sound handler (not SOUND_CUSTOM) - locate Pig Newton cocktail mode? - verify Pig Newton and Sindbad Mystery DIPs - attempt Pig Newton, 005 sound @@ -63,12 +61,6 @@ extern const char *s005_sample_names[]; extern const char *monsterb_sample_names[]; extern const char *spaceod_sample_names[]; -/* sndhrdw/monsterb.c */ -int TMS3617_sh_start(const struct MachineSound *msound); -void TMS3617_sh_stop(void); -void TMS3617_sh_update(void); - - /* machine/segar.c */ extern void sega_security(int chip); @@ -1273,11 +1265,13 @@ static struct DACinterface monsterb_dac_interface = { 100 } }; -static struct CustomSound_interface monsterb_custom_interface = +static struct TMS36XXinterface monsterb_tms3617_interface = { - TMS3617_sh_start, - TMS3617_sh_stop, - TMS3617_sh_update + 1, + { 50 }, /* mixing levels */ + { TMS3617 }, /* TMS36xx subtype(s) */ + { 247 }, /* base clock (one octave below A) */ + { {0.75,0.75,0.75,0.75,0.75,0.75} } /* decay times of voices */ }; static struct MachineDriver machine_driver_monsterb = @@ -1317,8 +1311,8 @@ static struct MachineDriver machine_driver_monsterb = 0,0,0,0, { { - SOUND_CUSTOM, - &monsterb_custom_interface + SOUND_TMS36XX, + &monsterb_tms3617_interface }, { SOUND_SAMPLES, diff --git a/src/drivers/seicross.c b/src/drivers/seicross.c index 6bee6e19e..dac077fbf 100644 --- a/src/drivers/seicross.c +++ b/src/drivers/seicross.c @@ -626,7 +626,7 @@ static void init_friskyt(void) -GAME( 1981, friskyt, 0, nvram, friskyt, friskyt, ROT0, "Nichibutsu", "Frisky Tom" ) -GAME( 1982, radrad, 0, no_nvram, radrad, friskyt, ROT0, "Nichibutsu USA", "Radical Radial" ) -GAME( 1984, seicross, 0, no_nvram, seicross, friskyt, ROT90, "Nichibutsu + Alice", "Seicross" ) -GAME( 1984, sectrzon, seicross, no_nvram, seicross, friskyt, ROT90, "Nichibutsu + Alice", "Sector Zone" ) +GAMEX( 1981, friskyt, 0, nvram, friskyt, friskyt, ROT0, "Nichibutsu", "Frisky Tom", GAME_NO_COCKTAIL ) +GAMEX( 1982, radrad, 0, no_nvram, radrad, friskyt, ROT0, "Nichibutsu USA", "Radical Radial", GAME_NO_COCKTAIL ) +GAMEX( 1984, seicross, 0, no_nvram, seicross, friskyt, ROT90, "Nichibutsu + Alice", "Seicross", GAME_NO_COCKTAIL ) +GAMEX( 1984, sectrzon, seicross, no_nvram, seicross, friskyt, ROT90, "Nichibutsu + Alice", "Sector Zone", GAME_NO_COCKTAIL ) diff --git a/src/drivers/senjyo.c b/src/drivers/senjyo.c index 019b9eac2..d66b68998 100644 --- a/src/drivers/senjyo.c +++ b/src/drivers/senjyo.c @@ -4,6 +4,10 @@ Senjyo / Star Force / Baluba-louk driver by Mirko Buffoni +TODO: +- wrong background colors in baluba, intermissions after round 13 + + This board was obviously born to run Senjyo. Four scrolling layers, gradient background, sprite/background priorities, and even a small bitmap for the radar. Star Force uses only a small subset of the features. @@ -368,7 +372,7 @@ INPUT_PORTS_START( starforc ) PORT_DIPSETTING( 0x05, "100000" ) PORT_DIPSETTING( 0x06, "200000" ) PORT_DIPSETTING( 0x07, "None" ) - PORT_DIPNAME( 0x38, 0x10, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x38, 0x00, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x00, "Easiest" ) PORT_DIPSETTING( 0x08, "Easy" ) PORT_DIPSETTING( 0x10, "Normal" ) @@ -821,4 +825,4 @@ GAME( 1983, senjyo, 0, senjyo, senjyo, senjyo, ROT90, "Tehkan", "Se GAME( 1984, starforc, 0, senjyo, starforc, starforc, ROT90, "Tehkan", "Star Force" ) GAME( 1984, starfore, starforc, senjyo, starforc, starfore, ROT90, "Tehkan", "Star Force (encrypted)" ) GAME( 1985, megaforc, starforc, senjyo, starforc, starforc, ROT90, "Tehkan (Video Ware license)", "Mega Force" ) -GAME( 1986, baluba, 0, senjyo, baluba, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu" ) +GAMEX(1986, baluba, 0, senjyo, baluba, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu", GAME_IMPERFECT_COLORS ) diff --git a/src/drivers/shootout.c b/src/drivers/shootout.c index ba241a250..5ce5ee94c 100644 --- a/src/drivers/shootout.c +++ b/src/drivers/shootout.c @@ -1,17 +1,31 @@ -/* -Shoot Out - (c) 1985 Data East +/******************************************************************************* -Preliminary driver by: -Ernesto Corvi (ernesto@imagina.com) -Phil Stroffolino + Shoot Out (USA) (c) 1985 Data East USA DE-0219 + Shoot Out (Japan) (c) 1985 Data East USA DE-0203 + Shoot Out (Korean bootleg) (c) 1985 Data East USA DE-0203 bootleg -TODO: -- Verify Controls and Dipswitches mapped correctly ( eg: No sound on attract mode, even when its on ). -- Add cocktail support. -*/ + Shoot Out (Japan) is an interesting board, it runs on an earlier PCB design + than the USA version, has no sound CPU, uses half as many sprites and + unusually for a Deco Japanese game it is credited to 'Data East USA'. + Perhaps the USA arm of Deco designed this game rather than the Japanese + arm? -extern void btime_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); + Shoot Out (Japan) uses the YM2203 ports for CPU bankswitching so it does + not work with sound turned off. + + Shoot Out (Korean bootleg) is based on the earlier DE-0203 board but + strangely features the same encryption as used on the DE-0219 board. It + also has some edited graphics. + + Driver by: + Ernesto Corvi (ernesto@imagina.com) + Phil Stroffolino + Shoot Out (Japan) and fixes added by Bryan McPhail (mish@tendril.co.uk) + + Todo: + - Add cocktail support. +*******************************************************************************/ #include "driver.h" #include "vidhrdw/generic.h" @@ -20,35 +34,43 @@ extern void btime_vh_convert_color_prom(unsigned char *palette, unsigned short * /* externals: from vidhrdw */ extern int shootout_vh_start( void ); extern void shootout_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +extern void shootouj_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); unsigned char *shootout_textram; +extern void btime_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); +/*******************************************************************************/ -static void shootout_bankswitch_w( int offset, int v ) { +static void shootout_bankswitch_w( int offset, int v ) +{ int bankaddress; unsigned char *RAM; + v=v&0xf; RAM = memory_region(REGION_CPU1); bankaddress = 0x10000 + ( 0x4000 * v ); cpu_setbank(1,&RAM[bankaddress]); } -static void sound_cpu_command_w( int offset, int v ) { +static void sound_cpu_command_w( int offset, int v ) +{ soundlatch_w( offset, v ); cpu_cause_interrupt( 1, M6502_INT_NMI ); } /* stub for reading input ports as active low (makes building ports much easier) */ -static int low_input_r( int offset ) { +static int low_input_r( int offset ) +{ return ~readinputport( offset ); } +/*******************************************************************************/ + static struct MemoryReadAddress readmem[] = { { 0x0000, 0x0fff, MRA_RAM }, { 0x1000, 0x1003, low_input_r }, - { 0x1004, 0x1fff, MRA_RAM }, { 0x2000, 0x27ff, MRA_RAM }, /* foreground */ { 0x2800, 0x2bff, videoram_r }, /* background videoram */ { 0x2c00, 0x2fff, colorram_r }, /* background colorram */ @@ -59,12 +81,11 @@ static struct MemoryReadAddress readmem[] = static struct MemoryWriteAddress writemem[] = { - { 0x0000, 0x01ef, MWA_RAM }, - { 0x01f0, 0x01ff, MWA_RAM }, - { 0x0200, 0x0fff, MWA_RAM }, -// { 0x1000, 0x1002, MWA_RAM }, /* these do get written to - see error log */ + { 0x0000, 0x0fff, MWA_RAM }, + { 0x1000, 0x1000, shootout_bankswitch_w }, + { 0x1001, 0x1001, MWA_NOP }, /* Todo: Flipscreen */ + { 0x1002, 0x1002, coin_counter_w }, { 0x1003, 0x1003, sound_cpu_command_w }, - { 0x1000, 0x1000, shootout_bankswitch_w }, /* not entirely sure about this */ { 0x1004, 0x17ff, MWA_RAM }, { 0x1800, 0x19ff, MWA_RAM, &spriteram, &spriteram_size }, { 0x2000, 0x27ff, MWA_RAM, &shootout_textram }, @@ -74,6 +95,36 @@ static struct MemoryWriteAddress writemem[] = { -1 } /* end of table */ }; +static struct MemoryReadAddress readmem_alt[] = +{ + { 0x0000, 0x0fff, MRA_RAM }, + { 0x1000, 0x1003, low_input_r }, + { 0x2000, 0x21ff, MRA_RAM }, + { 0x2800, 0x2800, YM2203_status_port_0_r }, + { 0x3000, 0x37ff, MRA_RAM }, /* foreground */ + { 0x3800, 0x3bff, videoram_r }, /* background videoram */ + { 0x3c00, 0x3fff, colorram_r }, /* background colorram */ + { 0x4000, 0x7fff, MRA_BANK1 }, + { 0x8000, 0xffff, MRA_ROM }, + { -1 } /* end of table */ +}; + +static struct MemoryWriteAddress writemem_alt[] = +{ + { 0x0000, 0x0fff, MWA_RAM }, + { 0x1800, 0x1800, coin_counter_w }, + { 0x2000, 0x21ff, MWA_RAM, &spriteram, &spriteram_size }, + { 0x2800, 0x2800, YM2203_control_port_0_w }, + { 0x2801, 0x2801, YM2203_write_port_0_w }, + { 0x3000, 0x37ff, MWA_RAM, &shootout_textram }, + { 0x3800, 0x3bff, videoram_w, &videoram, &videoram_size }, + { 0x3c00, 0x3fff, colorram_w, &colorram }, + { 0x4000, 0xffff, MWA_ROM }, + { -1 } /* end of table */ +}; + +/*******************************************************************************/ + static struct MemoryReadAddress sound_readmem[] = { { 0x0000, 0x07ff, MRA_RAM }, @@ -93,6 +144,8 @@ static struct MemoryWriteAddress sound_writemem[] = { -1 } /* end of table */ }; +/*******************************************************************************/ + INPUT_PORTS_START( shootout ) PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) @@ -198,15 +251,38 @@ static struct GfxDecodeInfo gfxdecodeinfo[] = { -1 } /* end of array */ }; +static void shootout_snd_irq(int linestate) +{ + cpu_set_irq_line(1,0,linestate); +} + +static void shootout_snd2_irq(int linestate) +{ + cpu_set_irq_line(0,0,linestate); +} + static struct YM2203interface ym2203_interface = { 1, /* 1 chip */ - 1500000, /* 1.5 MHz ??? */ - { YM2203_VOL(25,25) }, + 1500000, /* 1.5 MHz */ + { YM2203_VOL(50,50) }, + { 0 }, { 0 }, { 0 }, { 0 }, - { 0 } + { shootout_snd_irq }, +}; + +static struct YM2203interface ym2203_interface2 = +{ + 1, /* 1 chip */ + 1500000, /* 1.5 MHz */ + { YM2203_VOL(50,50) }, + { 0 }, + { 0 }, + { shootout_bankswitch_w }, + { 0 }, /* Todo: Port B write is flipscreen */ + { shootout_snd2_irq }, }; static int shootout_interrupt(void) @@ -221,7 +297,7 @@ static int shootout_interrupt(void) } else coin = 0; - return ignore_interrupt(); + return 0; } static struct MachineDriver machine_driver_shootout = @@ -236,9 +312,9 @@ static struct MachineDriver machine_driver_shootout = }, { CPU_M6502 | CPU_AUDIO_CPU, - 2000000, /* 2 Mhz? */ + 1500000, sound_readmem,sound_writemem,0,0, - interrupt,8 /* this is a guess, but sounds just about right */ + ignore_interrupt,0 /* this is a guess, but sounds just about right */ } }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -267,6 +343,42 @@ static struct MachineDriver machine_driver_shootout = } }; +static struct MachineDriver machine_driver_shootouj = +{ + /* basic machine hardware */ + { + { + CPU_M6502, + 2000000, /* 2 Mhz? */ + readmem_alt,writemem_alt,0,0, + shootout_interrupt,1 /* nmi's are triggered at coin up */ + } + }, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ + 0, + + /* video hardware */ + 32*8, 32*8, { 0*8, 32*8-1, 1*8, 31*8-1 }, + gfxdecodeinfo, + 256,256, + btime_vh_convert_color_prom, + + VIDEO_TYPE_RASTER, + 0, + shootout_vh_start, + generic_vh_stop, + shootouj_vh_screenrefresh, + + /* sound hardware */ + 0,0,0,0, + { + { + SOUND_YM2203, + &ym2203_interface2 + } + } +}; ROM_START( shootout ) @@ -301,7 +413,55 @@ ROM_START( shootout ) ROM_LOAD( "gb09.k6", 0x0100, 0x0100, 0xaa090565 ) /* unknown */ ROM_END +ROM_START( shootouj ) + ROM_REGION( 0x20000, REGION_CPU1 ) /* 2 * 128k for code */ + ROM_LOAD( "cg02.bin", 0x08000, 0x8000, 0x8fc5d632 ) + ROM_LOAD( "cg00.bin", 0x10000, 0x8000, 0xef6ced1e ) + ROM_LOAD( "cg01.bin", 0x18000, 0x4000, 0x74cf11ca ) + + ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "cu11.h19", 0x00000, 0x4000, 0xeff00460 ) /* foreground characters */ + + ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "cg03.bin", 0x00000, 0x8000, 0x5252ec19 ) /* sprites */ + ROM_LOAD( "cg04.bin", 0x10000, 0x8000, 0xdb06cfe9 ) + ROM_LOAD( "cg05.bin", 0x20000, 0x8000, 0xd634d6b8 ) + + ROM_REGION( 0x08000, REGION_GFX3 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "cu10.h17", 0x00000, 0x2000, 0x3854c877 ) /* background tiles */ + ROM_CONTINUE( 0x04000, 0x2000 ) + ROM_CONTINUE( 0x02000, 0x2000 ) + ROM_CONTINUE( 0x06000, 0x2000 ) + + ROM_REGION( 0x0200, REGION_PROMS ) + ROM_LOAD( "gb08.k10", 0x0000, 0x0100, 0x509c65b6 ) + ROM_LOAD( "gb09.k6", 0x0100, 0x0100, 0xaa090565 ) /* unknown */ +ROM_END + +ROM_START( shootoub ) + ROM_REGION( 2 * 0x20000, REGION_CPU1 ) /* 128k for code */ + ROM_LOAD( "shootout.006", 0x08000, 0x8000, 0x2c054888 ) + ROM_LOAD( "shootout.008", 0x10000, 0x8000, 0x9651b656 ) + ROM_LOAD( "cg01.bin", 0x18000, 0x4000, 0x74cf11ca ) + + ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "cu11.h19", 0x00000, 0x4000, 0xeff00460 ) /* foreground characters */ + + ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "shootout.005", 0x00000, 0x8000, 0xe6357ba3 ) /* sprites */ + ROM_LOAD( "shootout.004", 0x10000, 0x8000, 0x7f422c93 ) + ROM_LOAD( "shootout.003", 0x20000, 0x8000, 0xeea94535 ) + + ROM_REGION( 0x08000, REGION_GFX3 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "cu10.h17", 0x00000, 0x2000, 0x3854c877 ) /* background tiles */ + ROM_CONTINUE( 0x04000, 0x2000 ) + ROM_CONTINUE( 0x02000, 0x2000 ) + ROM_CONTINUE( 0x06000, 0x2000 ) + ROM_REGION( 0x0200, REGION_PROMS ) + ROM_LOAD( "gb08.k10", 0x0000, 0x0100, 0x509c65b6 ) + ROM_LOAD( "gb09.k6", 0x0100, 0x0100, 0xaa090565 ) /* unknown */ +ROM_END static void init_shootout(void) { @@ -309,13 +469,12 @@ static void init_shootout(void) int diff = memory_region_length(REGION_CPU1) / 2; int A; - memory_set_opcode_base(0,rom+diff); for (A = 0;A < diff;A++) rom[A+diff] = (rom[A] & 0x9f) | ((rom[A] & 0x40) >> 1) | ((rom[A] & 0x20) << 1); } - - -GAME( 1985, shootout, 0, shootout, shootout, shootout, ROT0, "Data East USA", "Shoot Out (US)" ) +GAMEX( 1985, shootout, 0, shootout, shootout, shootout, ROT0, "Data East USA", "Shoot Out (US)", GAME_NO_COCKTAIL ) +GAMEX( 1985, shootouj, shootout, shootouj, shootout, 0, ROT0, "Data East USA", "Shoot Out (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1985, shootoub, shootout, shootouj, shootout, shootout, ROT0, "bootleg", "Shoot Out (Korean Bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/sidearms.c b/src/drivers/sidearms.c index 1ed46c429..8b309ff4b 100644 --- a/src/drivers/sidearms.c +++ b/src/drivers/sidearms.c @@ -5,6 +5,7 @@ Driver provided by Paul Leaman +TODO: There is an additional ROM which seems to contain code for a third Z80, however the board only has two. The ROM is related to the missing star background. At one point, the code jumps to A000, outside of the ROM @@ -804,8 +805,8 @@ ROM_END -GAME( 1986, sidearms, 0, sidearms, sidearms, 0, ROT0, "Capcom", "Side Arms - Hyper Dyne (World)" ) -GAME( 1988, sidearmr, sidearms, sidearms, sidearms, 0, ROT0, "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US)" ) -GAME( 1986, sidearjp, sidearms, sidearms, sidearms, 0, ROT0, "Capcom", "Side Arms - Hyper Dyne (Japan)" ) -GAME( 1988, turtship, 0, turtship, turtship, 0, ROT0, "Philko", "Turtle Ship" ) -GAME( 1989, dyger, 0, turtship, dyger, 0, ROT270, "Philko", "Dyger" ) +GAMEX( 1986, sidearms, 0, sidearms, sidearms, 0, ROT0, "Capcom", "Side Arms - Hyper Dyne (World)", GAME_NO_COCKTAIL ) +GAMEX( 1988, sidearmr, sidearms, sidearms, sidearms, 0, ROT0, "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, sidearjp, sidearms, sidearms, sidearms, 0, ROT0, "Capcom", "Side Arms - Hyper Dyne (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, turtship, 0, turtship, turtship, 0, ROT0, "Philko", "Turtle Ship", GAME_NO_COCKTAIL ) +GAMEX( 1989, dyger, 0, turtship, dyger, 0, ROT270, "Philko", "Dyger", GAME_NO_COCKTAIL ) diff --git a/src/drivers/sidepckt.c b/src/drivers/sidepckt.c index efc597f6a..55515eede 100644 --- a/src/drivers/sidepckt.c +++ b/src/drivers/sidepckt.c @@ -342,7 +342,7 @@ static struct MachineDriver machine_driver_sidepckt = 256, 256, sidepckt_vh_convert_color_prom, - VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER,// | VIDEO_SUPPORTS_DIRTY, tilemaps don't support dirty 0, sidepckt_vh_start, generic_vh_stop, @@ -390,7 +390,7 @@ static struct MachineDriver machine_driver_sidepctj = 256, 256, sidepckt_vh_convert_color_prom, - VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY, + VIDEO_TYPE_RASTER,// | VIDEO_SUPPORTS_DIRTY, tilemaps don't support dirty 0, sidepckt_vh_start, generic_vh_stop, diff --git a/src/drivers/skydiver.c b/src/drivers/skydiver.c index 3520d61e3..b621db040 100644 --- a/src/drivers/skydiver.c +++ b/src/drivers/skydiver.c @@ -387,4 +387,4 @@ ROM_END -GAME( 1978, skydiver, 0, skydiver, skydiver, 0, ROT0, "Atari", "Sky Diver" ) +GAMEX( 1978, skydiver, 0, skydiver, skydiver, 0, ROT0, "Atari", "Sky Diver", GAME_NO_SOUND ) diff --git a/src/drivers/skykid.c b/src/drivers/skykid.c index a90dd0405..982703969 100644 --- a/src/drivers/skykid.c +++ b/src/drivers/skykid.c @@ -606,5 +606,5 @@ ROM_END -GAME( 1985, skykid, 0, skykid, skykid, 0, ROT0, "Namco", "Sky Kid" ) -GAME( 1984, drgnbstr, 0, drgnbstr, drgnbstr, 0, ROT0, "Namco", "Dragon Buster" ) +GAMEX( 1985, skykid, 0, skykid, skykid, 0, ROT0, "Namco", "Sky Kid", GAME_NO_COCKTAIL ) +GAMEX( 1984, drgnbstr, 0, drgnbstr, drgnbstr, 0, ROT0, "Namco", "Dragon Buster", GAME_NO_COCKTAIL ) diff --git a/src/drivers/slapfght.c b/src/drivers/slapfght.c index 10f97eeb2..4c497aece 100644 --- a/src/drivers/slapfght.c +++ b/src/drivers/slapfght.c @@ -338,14 +338,14 @@ static struct MemoryWriteAddress sound_writemem[] = INPUT_PORTS_START( tigerh ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) @@ -358,21 +358,6 @@ INPUT_PORTS_START( tigerh ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START /* DSW1 */ - PORT_DIPNAME( 0x80, 0x80, "Player Speed" ) - PORT_DIPSETTING( 0x80, "Normal" ) - PORT_DIPSETTING( 0x00, "Fast" ) - PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) @@ -382,42 +367,57 @@ INPUT_PORTS_START( tigerh ) PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, "Player Speed" ) + PORT_DIPSETTING( 0x80, "Normal" ) + PORT_DIPSETTING( 0x00, "Fast" ) PORT_START /* DSW2 */ - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x10, "20000 80000" ) - PORT_DIPSETTING( 0x00, "50000 120000" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0c, "Easy" ) - PORT_DIPSETTING( 0x08, "Medium" ) - PORT_DIPSETTING( 0x04, "Hard" ) - PORT_DIPSETTING( 0x00, "Hardest" ) PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0c, "Easy" ) + PORT_DIPSETTING( 0x08, "Medium" ) + PORT_DIPSETTING( 0x04, "Hard" ) + PORT_DIPSETTING( 0x00, "Hardest" ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x10, "20000 80000" ) + PORT_DIPSETTING( 0x00, "50000 120000" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END INPUT_PORTS_START( slapfigh ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) @@ -430,64 +430,64 @@ INPUT_PORTS_START( slapfigh ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START /* DSW1 */ - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BITX( 0x20, 0x20, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Screen Test", KEYCODE_F1, IP_JOY_NONE ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_BITX( 0x20, 0x20, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Screen Test", KEYCODE_F1, IP_JOY_NONE ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) PORT_START /* DSW2 */ - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x40, "Easy" ) - PORT_DIPSETTING( 0xc0, "Medium" ) - PORT_DIPSETTING( 0x80, "Hard" ) - PORT_DIPSETTING( 0x00, "Hardest" ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x30, "30000 100000" ) - PORT_DIPSETTING( 0x10, "50000 200000" ) - PORT_DIPSETTING( 0x20, "50000" ) - PORT_DIPSETTING( 0x00, "100000" ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BITX( 0x02, 0x02, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x08, "1" ) PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x0c, "3" ) PORT_DIPSETTING( 0x04, "5" ) - PORT_BITX( 0x02, 0x02, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x30, "30000 100000" ) + PORT_DIPSETTING( 0x10, "50000 200000" ) + PORT_DIPSETTING( 0x20, "50000" ) + PORT_DIPSETTING( 0x00, "100000" ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x40, "Easy" ) + PORT_DIPSETTING( 0xc0, "Medium" ) + PORT_DIPSETTING( 0x80, "Hard" ) + PORT_DIPSETTING( 0x00, "Hardest" ) INPUT_PORTS_END INPUT_PORTS_START( getstar ) PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL ) PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) @@ -500,21 +500,6 @@ INPUT_PORTS_START( getstar ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START /* DSW1 */ - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) @@ -524,30 +509,45 @@ INPUT_PORTS_START( getstar ) PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - - PORT_START /* DSW2 */ - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", KEYCODE_F2, IP_JOY_NONE ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x10, "30000 100000" ) - PORT_DIPSETTING( 0x00, "50000 150000" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0c, "Easy" ) - PORT_DIPSETTING( 0x08, "Medium" ) - PORT_DIPSETTING( 0x04, "Hard" ) - PORT_DIPSETTING( 0x00, "Hardest" ) + + PORT_START /* DSW2 */ PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x01, "4" ) PORT_DIPSETTING( 0x00, "5" ) PORT_BITX( 0, 0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0c, "Easy" ) + PORT_DIPSETTING( 0x08, "Medium" ) + PORT_DIPSETTING( 0x04, "Hard" ) + PORT_DIPSETTING( 0x00, "Hardest" ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x10, "30000 100000" ) + PORT_DIPSETTING( 0x00, "50000 150000" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -792,125 +792,161 @@ ROM_START( tigerh ) ROM_LOAD( "2.4", 0x08000, 0x4000, 0x4843f15c ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f ) + ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, 0xd105260f ) - /* The 68705 ROM is missing! */ + ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the 68705 (missing!) */ + ROM_LOAD( "a47_14.mcu", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ - ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e ) + ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ + ROM_LOAD( "a47_04.bin", 0x02000, 0x2000, 0xcd59628e ) ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "9.4", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ - ROM_LOAD( "8.4", 0x04000, 0x4000, 0xe539af2b ) - ROM_LOAD( "7.4", 0x08000, 0x4000, 0x02fdd429 ) - ROM_LOAD( "6.4", 0x0c000, 0x4000, 0x11fbcc8c ) + ROM_LOAD( "a47_09.bin", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ + ROM_LOAD( "a47_08.bin", 0x04000, 0x4000, 0xe539af2b ) + ROM_LOAD( "a47_07.bin", 0x08000, 0x4000, 0x02fdd429 ) + ROM_LOAD( "a47_06.bin", 0x0c000, 0x4000, 0x11fbcc8c ) ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "13.4", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ - ROM_LOAD( "12.4", 0x04000, 0x4000, 0xc064ecdb ) - ROM_LOAD( "11.4", 0x08000, 0x4000, 0x744fae9b ) - ROM_LOAD( "10.4", 0x0c000, 0x4000, 0xe1cf844e ) + ROM_LOAD( "a47_13.bin", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ + ROM_LOAD( "a47_12.bin", 0x04000, 0x4000, 0xc064ecdb ) + ROM_LOAD( "a47_11.bin", 0x08000, 0x4000, 0x744fae9b ) + ROM_LOAD( "a47_10.bin", 0x0c000, 0x4000, 0xe1cf844e ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) - ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) - ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) + ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) + ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) + ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) ROM_END ROM_START( tigerh2 ) ROM_REGION( 0x10000, REGION_CPU1 ) ROM_LOAD( "b0.5", 0x00000, 0x4000, 0x6ae7e13c ) - ROM_LOAD( "a-1.5", 0x04000, 0x4000, 0x65df2152 ) - ROM_LOAD( "a-2.5", 0x08000, 0x4000, 0x633d324b ) + ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, 0x65df2152 ) + ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, 0x633d324b ) + + ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ + ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, 0xd105260f ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the 68705 (missing!) */ + ROM_LOAD( "a47_14.mcu", 0x0000, 0x0800, 0x00000000 ) + + ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ + ROM_LOAD( "a47_04.bin", 0x02000, 0x2000, 0xcd59628e ) + + ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "a47_09.bin", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ + ROM_LOAD( "a47_08.bin", 0x04000, 0x4000, 0xe539af2b ) + ROM_LOAD( "a47_07.bin", 0x08000, 0x4000, 0x02fdd429 ) + ROM_LOAD( "a47_06.bin", 0x0c000, 0x4000, 0x11fbcc8c ) + + ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "a47_13.bin", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ + ROM_LOAD( "a47_12.bin", 0x04000, 0x4000, 0xc064ecdb ) + ROM_LOAD( "a47_11.bin", 0x08000, 0x4000, 0x744fae9b ) + ROM_LOAD( "a47_10.bin", 0x0c000, 0x4000, 0xe1cf844e ) + + ROM_REGION( 0x0300, REGION_PROMS ) + ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) + ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) + ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) +ROM_END + +ROM_START( tigerhj ) + ROM_REGION( 0x10000, REGION_CPU1 ) + ROM_LOAD( "a47_00.bin", 0x00000, 0x4000, 0xcbdbe3cc ) + ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, 0x65df2152 ) + ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, 0x633d324b ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f ) + ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, 0xd105260f ) - /* Is there a 68705 ROM missing? */ + ROM_REGION( 0x0800, REGION_CPU3 ) /* 8k for the 68705 (missing!) */ + ROM_LOAD( "a47_14.mcu", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ - ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e ) + ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ + ROM_LOAD( "a47_04.bin", 0x02000, 0x2000, 0xcd59628e ) ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "9.4", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ - ROM_LOAD( "8.4", 0x04000, 0x4000, 0xe539af2b ) - ROM_LOAD( "7.4", 0x08000, 0x4000, 0x02fdd429 ) - ROM_LOAD( "6.4", 0x0c000, 0x4000, 0x11fbcc8c ) + ROM_LOAD( "a47_09.bin", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ + ROM_LOAD( "a47_08.bin", 0x04000, 0x4000, 0xe539af2b ) + ROM_LOAD( "a47_07.bin", 0x08000, 0x4000, 0x02fdd429 ) + ROM_LOAD( "a47_06.bin", 0x0c000, 0x4000, 0x11fbcc8c ) ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "13.4", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ - ROM_LOAD( "12.4", 0x04000, 0x4000, 0xc064ecdb ) - ROM_LOAD( "11.4", 0x08000, 0x4000, 0x744fae9b ) - ROM_LOAD( "10.4", 0x0c000, 0x4000, 0xe1cf844e ) + ROM_LOAD( "a47_13.bin", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ + ROM_LOAD( "a47_12.bin", 0x04000, 0x4000, 0xc064ecdb ) + ROM_LOAD( "a47_11.bin", 0x08000, 0x4000, 0x744fae9b ) + ROM_LOAD( "a47_10.bin", 0x0c000, 0x4000, 0xe1cf844e ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) - ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) - ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) + ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) + ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) + ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) ROM_END ROM_START( tigerhb1 ) ROM_REGION( 0x10000, REGION_CPU1 ) ROM_LOAD( "14", 0x00000, 0x4000, 0xca59dd73 ) ROM_LOAD( "13", 0x04000, 0x4000, 0x38bd54db ) - ROM_LOAD( "a-2.5", 0x08000, 0x4000, 0x633d324b ) + ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, 0x633d324b ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f ) + ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, 0xd105260f ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ - ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e ) + ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ + ROM_LOAD( "a47_04.bin", 0x02000, 0x2000, 0xcd59628e ) ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "9.4", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ - ROM_LOAD( "8.4", 0x04000, 0x4000, 0xe539af2b ) - ROM_LOAD( "7.4", 0x08000, 0x4000, 0x02fdd429 ) - ROM_LOAD( "6.4", 0x0c000, 0x4000, 0x11fbcc8c ) + ROM_LOAD( "a47_09.bin", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ + ROM_LOAD( "a47_08.bin", 0x04000, 0x4000, 0xe539af2b ) + ROM_LOAD( "a47_07.bin", 0x08000, 0x4000, 0x02fdd429 ) + ROM_LOAD( "a47_06.bin", 0x0c000, 0x4000, 0x11fbcc8c ) ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "13.4", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ - ROM_LOAD( "12.4", 0x04000, 0x4000, 0xc064ecdb ) - ROM_LOAD( "11.4", 0x08000, 0x4000, 0x744fae9b ) - ROM_LOAD( "10.4", 0x0c000, 0x4000, 0xe1cf844e ) + ROM_LOAD( "a47_13.bin", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ + ROM_LOAD( "a47_12.bin", 0x04000, 0x4000, 0xc064ecdb ) + ROM_LOAD( "a47_11.bin", 0x08000, 0x4000, 0x744fae9b ) + ROM_LOAD( "a47_10.bin", 0x0c000, 0x4000, 0xe1cf844e ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) - ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) - ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) + ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) + ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) + ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) ROM_END ROM_START( tigerhb2 ) ROM_REGION( 0x10000, REGION_CPU1 ) ROM_LOAD( "rom00_09.bin", 0x00000, 0x4000, 0xef738c68 ) - ROM_LOAD( "a-1.5", 0x04000, 0x4000, 0x65df2152 ) + ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, 0x65df2152 ) ROM_LOAD( "rom02_07.bin", 0x08000, 0x4000, 0x36e250b9 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f ) + ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, 0xd105260f ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ - ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e ) + ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */ + ROM_LOAD( "a47_04.bin", 0x02000, 0x2000, 0xcd59628e ) ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "9.4", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ - ROM_LOAD( "8.4", 0x04000, 0x4000, 0xe539af2b ) - ROM_LOAD( "7.4", 0x08000, 0x4000, 0x02fdd429 ) - ROM_LOAD( "6.4", 0x0c000, 0x4000, 0x11fbcc8c ) + ROM_LOAD( "a47_09.bin", 0x00000, 0x4000, 0x31fae8a8 ) /* Tiles */ + ROM_LOAD( "a47_08.bin", 0x04000, 0x4000, 0xe539af2b ) + ROM_LOAD( "a47_07.bin", 0x08000, 0x4000, 0x02fdd429 ) + ROM_LOAD( "a47_06.bin", 0x0c000, 0x4000, 0x11fbcc8c ) ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "13.4", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ - ROM_LOAD( "12.4", 0x04000, 0x4000, 0xc064ecdb ) - ROM_LOAD( "11.4", 0x08000, 0x4000, 0x744fae9b ) - ROM_LOAD( "10.4", 0x0c000, 0x4000, 0xe1cf844e ) + ROM_LOAD( "a47_13.bin", 0x00000, 0x4000, 0x739a7e7e ) /* Sprites */ + ROM_LOAD( "a47_12.bin", 0x04000, 0x4000, 0xc064ecdb ) + ROM_LOAD( "a47_11.bin", 0x08000, 0x4000, 0x744fae9b ) + ROM_LOAD( "a47_10.bin", 0x0c000, 0x4000, 0xe1cf844e ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) - ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) - ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) + ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d ) + ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 ) + ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 ) ROM_END ROM_START( slapfigh ) @@ -919,7 +955,10 @@ ROM_START( slapfigh ) ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */ ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 2k for the microcontroller */ + ROM_LOAD( "68705.bin", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, 0x2ac7b943 ) /* Chars */ @@ -938,9 +977,9 @@ ROM_START( slapfigh ) ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, 0x587113ae ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) - ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) - ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) + ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) + ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) + ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) ROM_END ROM_START( slapbtjp ) @@ -949,7 +988,7 @@ ROM_START( slapbtjp ) ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */ ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, 0x2ac7b943 ) /* Chars */ @@ -968,9 +1007,9 @@ ROM_START( slapbtjp ) ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, 0x587113ae ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) - ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) - ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) + ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) + ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) + ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) ROM_END ROM_START( slapbtuk ) @@ -980,7 +1019,7 @@ ROM_START( slapbtuk ) ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */ ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, 0x2ac7b943 ) /* Chars */ @@ -999,9 +1038,9 @@ ROM_START( slapbtuk ) ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, 0x587113ae ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) - ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) - ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) + ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) + ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) + ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) ROM_END ROM_START( alcon ) @@ -1010,7 +1049,10 @@ ROM_START( alcon ) ROM_LOAD( "01", 0x10000, 0x8000, 0x18bb2f12 ) /* banked at 8000 */ ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */ - ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a ) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 2k for the microcontroller */ + ROM_LOAD( "68705.bin", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "04", 0x00000, 0x2000, 0x31003483 ) /* Chars */ @@ -1029,117 +1071,121 @@ ROM_START( alcon ) ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, 0x587113ae ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) - ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) - ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) + ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 ) + ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 ) + ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf ) ROM_END ROM_START( getstar ) ROM_REGION( 0x18000, REGION_CPU1 ) /* Region 0 - main cpu code */ - ROM_LOAD( "rom0", 0x00000, 0x4000, 0x6a8bdc6c ) - ROM_LOAD( "rom1", 0x04000, 0x4000, 0xebe8db3c ) - ROM_LOAD( "rom2", 0x10000, 0x8000, 0x343e8415 ) + ROM_LOAD( "rom0", 0x00000, 0x4000, 0x6a8bdc6c ) + ROM_LOAD( "rom1", 0x04000, 0x4000, 0xebe8db3c ) + ROM_LOAD( "rom2", 0x10000, 0x8000, 0x343e8415 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* Region 3 - sound cpu code */ - ROM_LOAD( "a68-03", 0x0000, 0x2000, 0x18daa44c) + ROM_LOAD( "a68-03", 0x0000, 0x2000, 0x18daa44c) ROM_REGION( 0x0800, REGION_CPU3 ) /* 2k for the microcontroller */ - ROM_LOAD( "68705.bin", 0x0000, 0x0800, 0x00000000 ) + ROM_LOAD( "68705.bin", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_05-1", 0x00000, 0x2000, 0x06f60107 ) /* Chars */ - ROM_LOAD( "a68_04-1", 0x02000, 0x2000, 0x1fc8f277 ) + ROM_LOAD( "a68_05-1", 0x00000, 0x2000, 0x06f60107 ) /* Chars */ + ROM_LOAD( "a68_04-1", 0x02000, 0x2000, 0x1fc8f277 ) ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ - ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) - ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) - ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) + ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ + ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) + ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) + ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ - ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) - ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) - ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) + ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ + ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) + ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) + ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) - ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) - ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) + ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) + ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) + ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) ROM_END ROM_START( getstarj ) ROM_REGION( 0x18000, REGION_CPU1 ) /* Region 0 - main cpu code */ - ROM_LOAD( "a68_00.bin", 0x00000, 0x4000, 0xad1a0143 ) - ROM_LOAD( "a68_01.bin", 0x04000, 0x4000, 0x3426eb7c ) - ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, 0x3567da17 ) + ROM_LOAD( "a68_00.bin", 0x00000, 0x4000, 0xad1a0143 ) + ROM_LOAD( "a68_01.bin", 0x04000, 0x4000, 0x3426eb7c ) + ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, 0x3567da17 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* Region 3 - sound cpu code */ - ROM_LOAD( "a68-03", 0x0000, 0x2000, 0x18daa44c) + ROM_LOAD( "a68-03", 0x00000, 0x2000, 0x18daa44c) + + ROM_REGION( 0x0800, REGION_CPU3 ) /* 2k for the microcontroller */ + ROM_LOAD( "68705.bin", 0x0000, 0x0800, 0x00000000 ) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, 0xe3d409e7 ) /* Chars */ - ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, 0x6e5ac9d4 ) + ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, 0xe3d409e7 ) /* Chars */ + ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, 0x6e5ac9d4 ) ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ - ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) - ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) - ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) + ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ + ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) + ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) + ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ - ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) - ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) - ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) + ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ + ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) + ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) + ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) - ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) - ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) + ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) + ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) + ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) ROM_END ROM_START( getstarb ) ROM_REGION( 0x18000, REGION_CPU1 ) /* Region 0 - main cpu code */ - ROM_LOAD( "gs_14.rom", 0x00000, 0x4000, 0x1a57a920 ) - ROM_LOAD( "gs_13.rom", 0x04000, 0x4000, 0x805f8e77 ) - ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, 0x3567da17 ) + ROM_LOAD( "gs_14.rom", 0x00000, 0x4000, 0x1a57a920 ) + ROM_LOAD( "gs_13.rom", 0x04000, 0x4000, 0x805f8e77 ) + ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, 0x3567da17 ) ROM_REGION( 0x10000, REGION_CPU2 ) /* Region 3 - sound cpu code */ - ROM_LOAD( "a68-03", 0x0000, 0x2000, 0x18daa44c) + ROM_LOAD( "a68-03", 0x0000, 0x2000, 0x18daa44c) ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, 0xe3d409e7 ) /* Chars */ - ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, 0x6e5ac9d4 ) + ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, 0xe3d409e7 ) /* Chars */ + ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, 0x6e5ac9d4 ) ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ - ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) - ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) - ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) + ROM_LOAD( "a68_09", 0x00000, 0x8000, 0xa293cc2e ) /* Tiles */ + ROM_LOAD( "a68_08", 0x08000, 0x8000, 0x37662375 ) + ROM_LOAD( "a68_07", 0x10000, 0x8000, 0xcf1a964c ) + ROM_LOAD( "a68_06", 0x18000, 0x8000, 0x05f9eb9a ) ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ - ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) - ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) - ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) + ROM_LOAD( "a68-13", 0x00000, 0x8000, 0x643fb282 ) /* Sprites */ + ROM_LOAD( "a68-12", 0x08000, 0x8000, 0x11f74e32 ) + ROM_LOAD( "a68-11", 0x10000, 0x8000, 0xf24158cf ) + ROM_LOAD( "a68-10", 0x18000, 0x8000, 0x83161ed0 ) ROM_REGION( 0x0300, REGION_PROMS ) - ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) - ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) - ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) + ROM_LOAD( "rom21", 0x0000, 0x0100, 0xd6360b4d ) + ROM_LOAD( "rom20", 0x0100, 0x0100, 0x4ca01887 ) + ROM_LOAD( "rom19", 0x0200, 0x0100, 0x513224f0 ) ROM_END -GAMEX(1985, tigerh, 0, tigerh, tigerh, 0, ROT270, "Taito", "Tiger Heli (set 1)", GAME_NOT_WORKING ) -GAMEX(1985, tigerh2, tigerh, tigerh, tigerh, 0, ROT270, "Taito", "Tiger Heli (set 2)", GAME_NOT_WORKING ) -GAME( 1985, tigerhb1, tigerh, tigerh, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg 1)" ) -GAME( 1985, tigerhb2, tigerh, tigerh, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg 2)" ) -GAMEX(1986, slapfigh, 0, slapfigh, slapfigh, 0, ROT270, "Taito", "Slap Fight", GAME_NOT_WORKING ) -GAME( 1986, slapbtjp, slapfigh, slapfigh, slapfigh, 0, ROT270, "bootleg", "Slap Fight (Japan bootleg)" ) -GAME( 1986, slapbtuk, slapfigh, slapbtuk, slapfigh, 0, ROT270, "bootleg", "Slap Fight (English bootleg)" ) -GAMEX(1986, alcon, slapfigh, slapfigh, slapfigh, 0, ROT270, "", "Alcon", GAME_NOT_WORKING ) -GAMEX(1986, getstar, 0, slapfigh, getstar, 0, ROT0, "Taito", "Guardian", GAME_NOT_WORKING ) -GAMEX(1986, getstarj, getstar, slapfigh, getstar, 0, ROT0, "Taito", "Get Star (Japan)", GAME_NOT_WORKING ) -GAME( 1986, getstarb, getstar, slapfigh, getstar, 0, ROT0, "bootleg", "Get Star (bootleg)" ) +GAMEX( 1985, tigerh, 0, tigerh, tigerh, 0, ROT270, "Taito", "Tiger Heli (set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1985, tigerh2, tigerh, tigerh, tigerh, 0, ROT270, "Taito", "Tiger Heli (set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1985, tigerhj, tigerh, tigerh, tigerh, 0, ROT270, "Taito", "Tiger Heli (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1985, tigerhb1, tigerh, tigerh, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg 1)", GAME_NO_COCKTAIL ) +GAMEX( 1985, tigerhb2, tigerh, tigerh, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg 2)", GAME_NO_COCKTAIL ) +GAMEX( 1986, slapfigh, 0, slapfigh, slapfigh, 0, ROT270, "Taito", "Slap Fight", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1986, slapbtjp, slapfigh, slapfigh, slapfigh, 0, ROT270, "bootleg", "Slap Fight (Japan bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1986, slapbtuk, slapfigh, slapbtuk, slapfigh, 0, ROT270, "bootleg", "Slap Fight (English bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1986, alcon, slapfigh, slapfigh, slapfigh, 0, ROT270, "", "Alcon", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1986, getstar, 0, slapfigh, getstar, 0, ROT0, "Taito", "Guardian", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1986, getstarj, getstar, slapfigh, getstar, 0, ROT0, "Taito", "Get Star (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1986, getstarb, getstar, slapfigh, getstar, 0, ROT0, "bootleg", "Get Star (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/smashtv.c b/src/drivers/smashtv.c index 08b7badf9..8285e5336 100644 --- a/src/drivers/smashtv.c +++ b/src/drivers/smashtv.c @@ -2353,10 +2353,80 @@ ROM_START( nbajam ) ROM_LOAD ( "nbau13.bin", 0x080000, 0x80000, 0xb6fe24bd ) ROM_END +ROM_START( nbajamr2 ) + ROM_REGION( 0x100000, REGION_CPU1 ) /* 34010 code */ + ROM_LOAD_ODD ( "jam2uj12.bin", 0x00000, 0x80000, 0x0fe80b36 ) /* even */ + ROM_LOAD_EVEN( "jam2ug12.bin", 0x00000, 0x80000, 0x5d106315 ) /* odd */ + + ROM_REGION( 0x50000, REGION_CPU2 ) /* sound CPU */ + ROM_LOAD ( "nbau3.bin", 0x010000, 0x20000, 0x3a3ea480 ) + ROM_RELOAD ( 0x030000, 0x20000 ) + + ROM_REGION( 0xc00000, REGION_GFX1 ) /* graphics */ + ROM_LOAD ( "nbaug14.bin", 0x000000, 0x80000, 0x04bb9f64 ) /* even */ + ROM_LOAD ( "nbaug16.bin", 0x080000, 0x80000, 0x8591c572 ) /* even */ + ROM_LOAD ( "nbaug17.bin", 0x100000, 0x80000, 0x6f921886 ) /* even */ + ROM_LOAD ( "nbaug18.bin", 0x180000, 0x80000, 0x5162d3d6 ) /* even */ + + ROM_LOAD ( "nbauj14.bin", 0x300000, 0x80000, 0xb34b7af3 ) /* odd */ + ROM_LOAD ( "nbauj16.bin", 0x380000, 0x80000, 0xd2e554f1 ) /* odd */ + ROM_LOAD ( "nbauj17.bin", 0x400000, 0x80000, 0xb2e14981 ) /* odd */ + ROM_LOAD ( "nbauj18.bin", 0x480000, 0x80000, 0xfdee0037 ) /* odd */ + + ROM_LOAD ( "nbaug19.bin", 0x600000, 0x80000, 0xa8f22fbb ) /* even */ + ROM_LOAD ( "nbaug20.bin", 0x680000, 0x80000, 0x44fd6221 ) /* even */ + ROM_LOAD ( "nbaug22.bin", 0x700000, 0x80000, 0xab05ed89 ) /* even */ + ROM_LOAD ( "nbaug23.bin", 0x780000, 0x80000, 0x7b934c7a ) /* even */ + + ROM_LOAD ( "nbauj19.bin", 0x900000, 0x80000, 0x8130a8a2 ) /* odd */ + ROM_LOAD ( "nbauj20.bin", 0x980000, 0x80000, 0xf9cebbb6 ) /* odd */ + ROM_LOAD ( "nbauj22.bin", 0xa00000, 0x80000, 0x59a95878 ) /* odd */ + ROM_LOAD ( "nbauj23.bin", 0xa80000, 0x80000, 0x427d2eee ) /* odd */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* ADPCM sample */ + ROM_LOAD ( "nbau12.bin", 0x000000, 0x80000, 0xb94847f1 ) + ROM_LOAD ( "nbau13.bin", 0x080000, 0x80000, 0xb6fe24bd ) +ROM_END + +ROM_START( nbajamte ) + ROM_REGION( 0x100000, REGION_CPU1 ) /* 34010 code */ + ROM_LOAD_ODD ( "te-uj12.bin", 0x00000, 0x80000, 0xd7c21bc4 ) /* even */ + ROM_LOAD_EVEN( "te-ug12.bin", 0x00000, 0x80000, 0x7ad49229 ) /* odd */ + + ROM_REGION( 0x50000, REGION_CPU2 ) /* sound CPU */ + ROM_LOAD ( "te-u3.bin", 0x010000, 0x20000, 0xd4551195 ) + ROM_RELOAD ( 0x030000, 0x20000 ) + + ROM_REGION( 0xc00000, REGION_GFX1 ) /* graphics */ + ROM_LOAD ( "nbaug14.bin", 0x000000, 0x80000, 0x04bb9f64 ) /* even same as nbajam */ + ROM_LOAD ( "te-ug16.bin", 0x080000, 0x80000, 0xc7ce74d0 ) /* even */ + ROM_LOAD ( "te-ug17.bin", 0x100000, 0x80000, 0x9401be62 ) /* even */ + ROM_LOAD ( "te-ug18.bin", 0x180000, 0x80000, 0x6fd08f57 ) /* even */ + + ROM_LOAD ( "nbauj14.bin", 0x300000, 0x80000, 0xb34b7af3 ) /* odd same as nbajam */ + ROM_LOAD ( "te-uj16.bin", 0x380000, 0x80000, 0x905ad88b ) /* odd */ + ROM_LOAD ( "te-uj17.bin", 0x400000, 0x80000, 0x44cf3151 ) /* odd */ + ROM_LOAD ( "te-uj18.bin", 0x480000, 0x80000, 0x4eb73c26 ) /* odd */ + + ROM_LOAD ( "nbaug19.bin", 0x600000, 0x80000, 0xa8f22fbb ) /* even same as nbajam */ + ROM_LOAD ( "te-ug20.bin", 0x680000, 0x80000, 0x8a48728c ) /* even */ + ROM_LOAD ( "te-ug22.bin", 0x700000, 0x80000, 0x3b05133b ) /* even */ + ROM_LOAD ( "te-ug23.bin", 0x780000, 0x80000, 0x854f73bc ) /* even */ + + ROM_LOAD ( "nbauj19.bin", 0x900000, 0x80000, 0x8130a8a2 ) /* odd same as nbajam */ + ROM_LOAD ( "te-uj20.bin", 0x980000, 0x80000, 0xbf263d61 ) /* odd */ + ROM_LOAD ( "te-uj22.bin", 0xa00000, 0x80000, 0x39791051 ) /* odd */ + ROM_LOAD ( "te-uj23.bin", 0xa80000, 0x80000, 0xf8c30998 ) /* odd */ + + ROM_REGION( 0x100000, REGION_SOUND1 ) /* ADPCM sample */ + ROM_LOAD ( "te-u12.bin", 0x000000, 0x80000, 0x4fac97bc ) + ROM_LOAD ( "te-u13.bin", 0x080000, 0x80000, 0x6f27b202 ) +ROM_END + GAME( 1988, narc, 0, narc, narc, narc, ROT0_16BIT, "Williams", "Narc (rev 7.00)" ) -GAME( 1988, narc3, narc, narc, narc, narc, ROT0_16BIT, "Williams", "Narc (rev 3.00)" ) +GAMEX(1988, narc3, narc, narc, narc, narc, ROT0_16BIT, "Williams", "Narc (rev 3.00)", GAME_NOT_WORKING ) GAME( 1990, smashtv, 0, smashtv, smashtv, smashtv, ROT0_16BIT, "Williams", "Smash T.V. (rev 8.00)" ) GAME( 1990, smashtv6, smashtv, smashtv, smashtv, smashtv, ROT0_16BIT, "Williams", "Smash T.V. (rev 6.00)" ) GAME( 1990, smashtv5, smashtv, smashtv, smashtv, smashtv, ROT0_16BIT, "Williams", "Smash T.V. (rev 5.00)" ) @@ -2379,3 +2449,5 @@ GAMEX(1993, mk2, 0, mk2, mk2, mk2, ROT0_16BIT, "Midway", GAMEX(1993, mk2r32, mk2, mk2, mk2, mk2, ROT0_16BIT, "Midway", "Mortal Kombat II (rev L3.2 (European))", GAME_NOT_WORKING ) GAMEX(1993, mk2r14, mk2, mk2, mk2, mk2r14, ROT0_16BIT, "Midway", "Mortal Kombat II (rev L1.4)", GAME_NOT_WORKING ) GAMEX(1993, nbajam, 0, nbajam, nbajam, nbajam, ROT0_16BIT, "Midway", "NBA Jam (rev 3.01 04/07/93)", GAME_NOT_WORKING ) +GAMEX(1993, nbajamr2, nbajam, nbajam, nbajam, nbajam, ROT0_16BIT, "Midway", "NBA Jam (rev 2.00 02/10/93)", GAME_NOT_WORKING ) +GAMEX(1994, nbajamte, nbajam, nbajam, nbajam, nbajam, ROT0_16BIT, "Midway", "NBA Jam TE (rev 4.0 03/23/94)", GAME_NOT_WORKING ) diff --git a/src/drivers/snk.c b/src/drivers/snk.c index fc6699dda..e16aa0d92 100644 --- a/src/drivers/snk.c +++ b/src/drivers/snk.c @@ -3455,27 +3455,27 @@ static void init_psychos( void ){ } /* rom parent machine inp init */ -GAME( 1985, tnk3, 0, tnk3, tnk3, tnk3, ROT270, "SNK", "TNK III (US?)" ) -GAME( 1985, tnk3j, tnk3, tnk3, tnk3, tnk3, ROT270, "SNK", "Tank (Japan)" ) -GAME( 1986, athena, 0, athena, athena, athena, ROT0_16BIT, "SNK", "Athena" ) -GAME( 1988, fitegolf, 0, athena, fitegolf, fitegolf, ROT0, "SNK", "Fighting Golf" ) -GAME( 1986, ikari, 0, ikari, ikari, ikari, ROT270, "SNK", "Ikari Warriors (US)" ) -GAME( 1986, ikarijp, ikari, ikari, ikarijp, ikarijp, ROT270, "SNK", "Ikari Warriors (Japan)" ) -GAME( 1986, ikarijpb, ikari, ikari, ikarijp, ikarijpb, ROT270, "bootleg", "Ikari Warriors (Japan bootleg)" ) -GAME( 1986, victroad, 0, victroad, victroad, victroad, ROT270, "SNK", "Victory Road" ) -GAME( 1986, dogosoke, victroad, victroad, victroad, dogosoke, ROT270, "SNK", "Dogou Souken" ) -GAME( 1987, gwar, 0, gwar, gwar, gwar, ROT270, "SNK", "Guerrilla War (US)" ) -GAME( 1987, gwarj, gwar, gwar, gwar, gwar, ROT270, "SNK", "Guevara (Japan)" ) -GAMEX(1987, gwara, gwar, gwar, gwar, gwara, ROT270, "SNK", "Guerrilla War (Version 1)", GAME_NOT_WORKING ) -GAME( 1987, gwarb, gwar, gwar, gwar, gwar, ROT270, "bootleg", "Guerrilla War (bootleg)" ) -GAME( 1987, bermudat, 0, bermudat, bermudat, bermudat, ROT270_16BIT, "SNK", "Bermuda Triangle (US)" ) -GAME( 1987, bermudaj, bermudat, bermudat, bermudat, bermudat, ROT270_16BIT, "SNK", "Bermuda Triangle (Japan)" ) -GAME( 1987, bermudaa, bermudat, bermudat, bermudat, worldwar, ROT270_16BIT, "SNK", "Bermuda Triangle (US early version)" ) -GAME( 1987, worldwar, bermudat, bermudat, bermudat, worldwar, ROT270_16BIT, "SNK", "World Wars (Japan)" ) -GAMEX(1987, psychos, 0, psychos, psychos, psychos, ROT0_16BIT, "SNK", "Psycho Soldier (US)", GAME_IMPERFECT_SOUND ) -GAMEX(1987, psychosj, psychos, psychos, psychos, psychos, ROT0_16BIT, "SNK", "Psycho Soldier (Japan)", GAME_IMPERFECT_SOUND ) -GAMEX(1988, chopper, 0, chopper1, legofair, chopper, ROT270_16BIT, "SNK", "Chopper I", GAME_IMPERFECT_SOUND ) -GAMEX(1988, legofair, chopper, chopper1, legofair, chopper, ROT270_16BIT, "SNK", "Koukuu Kihei Monogatari - The Legend of Air Cavalry", GAME_IMPERFECT_SOUND ) -GAME( 1987, tdfever, 0, tdfever, tdfever, tdfever, ROT270, "SNK", "TouchDown Fever" ) -GAME( 1987, tdfeverj, tdfever, tdfever, tdfever, tdfever, ROT270, "SNK", "TouchDown Fever (Japan)" ) -GAME( 1988, ftsoccer, 0, ftsoccer, ftsoccer, ftsoccer, ROT0_16BIT, "SNK", "Fighting Soccer" ) +GAMEX( 1985, tnk3, 0, tnk3, tnk3, tnk3, ROT270, "SNK", "TNK III (US?)", GAME_NO_COCKTAIL ) +GAMEX( 1985, tnk3j, tnk3, tnk3, tnk3, tnk3, ROT270, "SNK", "Tank (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1986, athena, 0, athena, athena, athena, ROT0_16BIT, "SNK", "Athena", GAME_NO_COCKTAIL ) +GAMEX( 1988, fitegolf, 0, athena, fitegolf, fitegolf, ROT0, "SNK", "Fighting Golf", GAME_NO_COCKTAIL ) +GAMEX( 1986, ikari, 0, ikari, ikari, ikari, ROT270, "SNK", "Ikari Warriors (US)", GAME_NO_COCKTAIL ) +GAMEX( 1986, ikarijp, ikari, ikari, ikarijp, ikarijp, ROT270, "SNK", "Ikari Warriors (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1986, ikarijpb, ikari, ikari, ikarijp, ikarijpb, ROT270, "bootleg", "Ikari Warriors (Japan bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1986, victroad, 0, victroad, victroad, victroad, ROT270, "SNK", "Victory Road", GAME_NO_COCKTAIL ) +GAMEX( 1986, dogosoke, victroad, victroad, victroad, dogosoke, ROT270, "SNK", "Dogou Souken", GAME_NO_COCKTAIL ) +GAMEX( 1987, gwar, 0, gwar, gwar, gwar, ROT270, "SNK", "Guerrilla War (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, gwarj, gwar, gwar, gwar, gwar, ROT270, "SNK", "Guevara (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, gwara, gwar, gwar, gwar, gwara, ROT270, "SNK", "Guerrilla War (Version 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1987, gwarb, gwar, gwar, gwar, gwar, ROT270, "bootleg", "Guerrilla War (bootleg)", GAME_NO_COCKTAIL ) +GAMEX( 1987, bermudat, 0, bermudat, bermudat, bermudat, ROT270_16BIT, "SNK", "Bermuda Triangle (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, bermudaj, bermudat, bermudat, bermudat, bermudat, ROT270_16BIT, "SNK", "Bermuda Triangle (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, bermudaa, bermudat, bermudat, bermudat, worldwar, ROT270_16BIT, "SNK", "Bermuda Triangle (US early version)", GAME_NO_COCKTAIL ) +GAMEX( 1987, worldwar, bermudat, bermudat, bermudat, worldwar, ROT270_16BIT, "SNK", "World Wars (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, psychos, 0, psychos, psychos, psychos, ROT0_16BIT, "SNK", "Psycho Soldier (US)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1987, psychosj, psychos, psychos, psychos, psychos, ROT0_16BIT, "SNK", "Psycho Soldier (Japan)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1988, chopper, 0, chopper1, legofair, chopper, ROT270_16BIT, "SNK", "Chopper I", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1988, legofair, chopper, chopper1, legofair, chopper, ROT270_16BIT, "SNK", "Koukuu Kihei Monogatari - The Legend of Air Cavalry", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1987, tdfever, 0, tdfever, tdfever, tdfever, ROT270, "SNK", "TouchDown Fever", GAME_NO_COCKTAIL ) +GAMEX( 1987, tdfeverj, tdfever, tdfever, tdfever, tdfever, ROT270, "SNK", "TouchDown Fever (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, ftsoccer, 0, ftsoccer, ftsoccer, ftsoccer, ROT0_16BIT, "SNK", "Fighting Soccer", GAME_NO_COCKTAIL ) diff --git a/src/drivers/snk68.c b/src/drivers/snk68.c index 41143f779..8f68bba5e 100644 --- a/src/drivers/snk68.c +++ b/src/drivers/snk68.c @@ -11,7 +11,7 @@ For some strange reason version 2 of Street Smart runs on Pow hardware! - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk To Do: @@ -149,8 +149,7 @@ static struct MemoryReadAddress searchar_readmem[] = { { 0x000000, 0x03ffff, MRA_ROM }, { 0x040000, 0x043fff, MRA_BANK1 }, - { 0x080000, 0x080003, protcontrols_r }, /* Player 1 & 2 */ - { 0x080004, 0x080005, input_port_2_r }, /* Coins */ + { 0x080000, 0x080005, protcontrols_r }, /* Player 1 & 2 */ { 0x0c0000, 0x0c0001, rotary_1_r }, /* Player 1 rotary */ { 0x0c8000, 0x0c8001, rotary_2_r }, /* Player 2 rotary */ { 0x0d0000, 0x0d0001, rotary_lsb_r }, /* Extra rotary bits */ @@ -245,8 +244,8 @@ INPUT_PORTS_START( pow ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) /* Service button */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -324,8 +323,8 @@ INPUT_PORTS_START( powj ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) /* Service button */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -402,8 +401,8 @@ INPUT_PORTS_START( searchar ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START /* coin */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -486,8 +485,8 @@ INPUT_PORTS_START( streetsm ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START /* coin */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -571,8 +570,8 @@ INPUT_PORTS_START( streetsj ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START /* coin */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -642,7 +641,7 @@ INPUT_PORTS_START( ikari3 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_START /* Player 2 controls */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) @@ -652,11 +651,11 @@ INPUT_PORTS_START( ikari3 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START /* coin */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -1263,11 +1262,11 @@ static void init_searchar(void) /******************************************************************************/ -GAME( 1988, pow, 0, pow, pow, 0, ROT0, "SNK", "P.O.W. - Prisoners of War (US)" ) -GAME( 1988, powj, pow, pow, powj, 0, ROT0, "SNK", "Datsugoku - Prisoners of War (Japan)" ) -GAME( 1989, searchar, 0, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (World)" ) -GAME( 1989, sercharu, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (US)" ) -GAME( 1989, streetsm, 0, streetsm, streetsm, 0, ROT0, "SNK", "Street Smart (US version 2)" ) -GAME( 1989, streets1, streetsm, searchar, streetsm, 0, ROT0, "SNK", "Street Smart (US version 1)" ) -GAME( 1989, streetsj, streetsm, searchar, streetsj, 0, ROT0, "SNK", "Street Smart (Japan version 1)" ) -GAME( 1989, ikari3, 0, ikari3, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue" ) +GAMEX( 1988, pow, 0, pow, pow, 0, ROT0, "SNK", "P.O.W. - Prisoners of War (US)", GAME_NO_COCKTAIL ) +GAMEX( 1988, powj, pow, pow, powj, 0, ROT0, "SNK", "Datsugoku - Prisoners of War (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1989, searchar, 0, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (World)", GAME_NO_COCKTAIL ) +GAMEX( 1989, sercharu, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (US)", GAME_NO_COCKTAIL ) +GAMEX( 1989, streetsm, 0, streetsm, streetsm, 0, ROT0, "SNK", "Street Smart (US version 2)", GAME_NO_COCKTAIL ) +GAMEX( 1989, streets1, streetsm, searchar, streetsm, 0, ROT0, "SNK", "Street Smart (US version 1)", GAME_NO_COCKTAIL ) +GAMEX( 1989, streetsj, streetsm, searchar, streetsj, 0, ROT0, "SNK", "Street Smart (Japan version 1)", GAME_NO_COCKTAIL ) +GAMEX( 1989, ikari3, 0, ikari3, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue", GAME_NO_COCKTAIL ) diff --git a/src/drivers/spacefb.c b/src/drivers/spacefb.c index 32cdf0b5b..68ce155da 100644 --- a/src/drivers/spacefb.c +++ b/src/drivers/spacefb.c @@ -526,8 +526,8 @@ ROM_START( spacedem ) ROM_END -GAMEX( 1980, spacefb, 0, spacefb, spacefb, 0, ROT90, "Nintendo", "Space Firebird (Nintendo)", GAME_IMPERFECT_COLORS ) -GAMEX( 1980, spacefbg, spacefb, spacefb, spacefb, 0, ROT90, "Gremlin", "Space Firebird (Gremlin)", GAME_IMPERFECT_COLORS ) -GAMEX( 1980, spacebrd, spacefb, spacefb, spacefb, 0, ROT90, "bootleg", "Space Bird (bootleg)", GAME_IMPERFECT_COLORS ) -GAMEX( 1980, spacefbb, spacefb, spacefb, spacefb, 0, ROT90, "bootleg", "Space Firebird (bootleg)", GAME_IMPERFECT_COLORS ) -GAMEX( 1980, spacedem, spacefb, spacefb, spacedem, 0, ROT90, "Nintendo / Fortrek", "Space Demon", GAME_IMPERFECT_COLORS ) +GAMEX( 1980, spacefb, 0, spacefb, spacefb, 0, ROT90, "Nintendo", "Space Firebird (Nintendo)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) +GAMEX( 1980, spacefbg, spacefb, spacefb, spacefb, 0, ROT90, "Gremlin", "Space Firebird (Gremlin)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) +GAMEX( 1980, spacebrd, spacefb, spacefb, spacefb, 0, ROT90, "bootleg", "Space Bird (bootleg)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) +GAMEX( 1980, spacefbb, spacefb, spacefb, spacefb, 0, ROT90, "bootleg", "Space Firebird (bootleg)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) +GAMEX( 1980, spacedem, spacefb, spacefb, spacedem, 0, ROT90, "Nintendo / Fortrek", "Space Demon", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) diff --git a/src/drivers/spiders.c b/src/drivers/spiders.c index 6b66c11ec..b217fa35c 100644 --- a/src/drivers/spiders.c +++ b/src/drivers/spiders.c @@ -424,5 +424,5 @@ ROM_END /* this is a newer version with just one bug fix */ -GAMEX( 1981, spiders, 0, spiders, spiders, 0, ROT270, "Sigma Ent. Inc.", "Spiders (set 1)", GAME_NO_SOUND ) -GAMEX( 1981, spiders2, spiders, spiders, spiders, 0, ROT270, "Sigma Ent. Inc.", "Spiders (set 2)", GAME_NO_SOUND ) +GAMEX( 1981, spiders, 0, spiders, spiders, 0, ROT270, "Sigma Ent. Inc.", "Spiders (set 1)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1981, spiders2, spiders, spiders, spiders, 0, ROT270, "Sigma Ent. Inc.", "Spiders (set 2)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/sprint2.c b/src/drivers/sprint2.c index d75f962b7..135ef32d8 100644 --- a/src/drivers/sprint2.c +++ b/src/drivers/sprint2.c @@ -337,10 +337,7 @@ static struct MachineDriver machine_driver_sprint2 = sprint2_vh_screenrefresh, /* sound hardware */ - 0, - 0, - 0, - 0 + 0,0,0,0 }; static struct MachineDriver machine_driver_sprint1 = @@ -371,10 +368,7 @@ static struct MachineDriver machine_driver_sprint1 = sprint1_vh_screenrefresh, /* sound hardware */ - 0, - 0, - 0, - 0 + 0,0,0,0 }; @@ -426,5 +420,5 @@ ROM_END -GAME( 1978, sprint1, 0, sprint1, sprint1, 0, ROT0, "Atari", "Sprint 1" ) -GAME( 1976, sprint2, sprint1, sprint2, sprint2, 0, ROT0, "Atari", "Sprint 2" ) +GAMEX( 1978, sprint1, 0, sprint1, sprint1, 0, ROT0, "Atari", "Sprint 1", GAME_NO_SOUND ) +GAMEX( 1976, sprint2, sprint1, sprint2, sprint2, 0, ROT0, "Atari", "Sprint 2", GAME_NO_SOUND ) diff --git a/src/drivers/srumbler.c b/src/drivers/srumbler.c index 9b7c93485..6277a0084 100644 --- a/src/drivers/srumbler.c +++ b/src/drivers/srumbler.c @@ -6,41 +6,55 @@ M6809 for game, Z80 and YM-2203 for sound. -Notes: -- Transparency is not really right. -- There are three unknown PROMs. They might be related to transparency. - ***************************************************************************/ #include "driver.h" #include "vidhrdw/generic.h" #include "cpu/m6809/m6809.h" -extern unsigned char *srumbler_backgroundram; -extern int srumbler_backgroundram_size; -extern unsigned char *srumbler_scrollx; -extern unsigned char *srumbler_scrolly; +extern unsigned char *srumbler_backgroundram,*srumbler_foregroundram; -void srumbler_bankswitch_w(int offset,int data); void srumbler_background_w(int offset,int data); +void srumbler_foreground_w(int offset,int data); +void srumbler_scroll_w(int offset,int data); void srumbler_4009_w(int offset,int data); -int srumbler_interrupt(void); - int srumbler_vh_start(void); -void srumbler_vh_stop(void); void srumbler_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); -void srumbler_bankswitch_w(int offset,int data) +static void srumbler_bankswitch_w(int offset,int data) { - unsigned char *RAM = memory_region(REGION_CPU1); + /* + banking is controlled by two PROMs. 0000-4fff is mapped to the same + address (RAM and I/O) for all banks, so we don't handle it here. + e000-ffff is all mapped to the same ROMs, however we do handle it + here anyway. + Note that 5000-8fff can be either ROM or RAM, so we should handle + that as well to be 100% accurate. + */ + int i; + unsigned char *ROM = memory_region(REGION_USER1); + unsigned char *prom1 = memory_region(REGION_PROMS) + (data & 0xf0); + unsigned char *prom2 = memory_region(REGION_PROMS) + 0x100 + ((data & 0x0f) << 4); + + for (i = 0x05;i < 0x10;i++) + { + int bank = ((prom1[i] & 0x03) << 4) | (prom2[i] & 0x0f); + /* bit 2 of prom1 selects ROM or RAM - not supported */ - cpu_setbank (1, &RAM[0x10000+(data&0x0f)*0x9000]); + cpu_setbank(i+1,&ROM[bank*0x1000]); + } } -int srumbler_interrupt(void) +static void srumbler_init_machine(void) +{ + /* initialize banked ROM pointers */ + srumbler_bankswitch_w(0,0); +} + +static int srumbler_interrupt(void) { if (cpu_getiloops()==0) { @@ -62,8 +76,17 @@ static struct MemoryReadAddress readmem[] = { 0x400a, 0x400a, input_port_2_r }, { 0x400b, 0x400b, input_port_3_r }, { 0x400c, 0x400c, input_port_4_r }, - { 0x5000, 0xdfff, MRA_BANK1}, /* Banked ROM */ - { 0xe000, 0xffff, MRA_ROM }, /* ROM */ + { 0x5000, 0x5fff, MRA_BANK6 }, /* Banked ROM */ + { 0x6000, 0x6fff, MRA_BANK7 }, /* Banked ROM */ + { 0x7000, 0x7fff, MRA_BANK8 }, /* Banked ROM */ + { 0x8000, 0x8fff, MRA_BANK9 }, /* Banked ROM */ + { 0x9000, 0x9fff, MRA_BANK10 }, /* Banked ROM */ + { 0xa000, 0xafff, MRA_BANK11 }, /* Banked ROM */ + { 0xb000, 0xbfff, MRA_BANK12 }, /* Banked ROM */ + { 0xc000, 0xcfff, MRA_BANK13 }, /* Banked ROM */ + { 0xd000, 0xdfff, MRA_BANK14 }, /* Banked ROM */ + { 0xe000, 0xefff, MRA_BANK15 }, /* Banked ROM */ + { 0xf000, 0xffff, MRA_BANK16 }, /* Banked ROM */ { -1 } /* end of table */ }; @@ -81,15 +104,14 @@ static struct MemoryWriteAddress writemem[] = { { 0x0000, 0x1dff, MWA_RAM }, { 0x1e00, 0x1fff, MWA_RAM, &spriteram, &spriteram_size }, - { 0x2000, 0x3fff, srumbler_background_w, &srumbler_backgroundram, &srumbler_backgroundram_size }, - { 0x4008, 0x4008, srumbler_bankswitch_w}, - { 0x4009, 0x4009, srumbler_4009_w}, - { 0x400a, 0x400b, MWA_RAM, &srumbler_scrollx}, - { 0x400c, 0x400d, MWA_RAM, &srumbler_scrolly}, - { 0x400e, 0x400e, soundlatch_w}, - { 0x5000, 0x5fff, videoram_w, &videoram, &videoram_size }, + { 0x2000, 0x3fff, srumbler_background_w, &srumbler_backgroundram }, + { 0x4008, 0x4008, srumbler_bankswitch_w }, + { 0x4009, 0x4009, srumbler_4009_w }, + { 0x400a, 0x400d, srumbler_scroll_w }, + { 0x400e, 0x400e, soundlatch_w }, + { 0x5000, 0x5fff, srumbler_foreground_w, &srumbler_foregroundram }, { 0x6000, 0x6fff, MWA_RAM }, /* Video RAM 2 ??? (not used) */ - { 0x7100, 0x73ff, paletteram_RRRRGGGGBBBBxxxx_swap_w, &paletteram }, + { 0x7000, 0x73ff, paletteram_RRRRGGGGBBBBxxxx_swap_w, &paletteram }, { 0x7400, 0xffff, MWA_ROM }, { -1 } /* end of table */ }; @@ -235,9 +257,9 @@ static struct GfxLayout spritelayout = static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0, &charlayout, 320, 16 }, /* colors 320 - 383 */ - { REGION_GFX2, 0, &tilelayout, 0, 8 }, /* colors 0 - 127 */ - { REGION_GFX3, 0, &spritelayout, 128, 8 }, /* colors 128 - 255 */ + { REGION_GFX1, 0, &charlayout, 448, 16 }, /* colors 448 - 511 */ + { REGION_GFX2, 0, &tilelayout, 128, 8 }, /* colors 128 - 255 */ + { REGION_GFX3, 0, &spritelayout, 256, 8 }, /* colors 256 - 383 */ { -1 } /* end of array */ }; @@ -246,7 +268,7 @@ static struct YM2203interface ym2203_interface = { 2, /* 2 chips */ 4000000, /* 4.0 MHz (? hand tuned to match the real board) */ - { YM2203_VOL(25,25), YM2203_VOL(25,25) }, + { YM2203_VOL(60,20), YM2203_VOL(60,20) }, { 0 }, { 0 }, { 0 }, @@ -275,19 +297,19 @@ static struct MachineDriver machine_driver_srumbler = 60, 2500, /* frames per second, vblank duration */ /* hand tuned to get rid of sprite lag */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ - 0, + srumbler_init_machine, /* video hardware */ 64*8, 32*8, { 10*8, (64-10)*8-1, 1*8, 31*8-1 }, gfxdecodeinfo, - 384, 384, + 512, 512, 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_AFTER_VBLANK, 0, srumbler_vh_start, - srumbler_vh_stop, + 0, srumbler_vh_screenrefresh, /* sound hardware */ @@ -309,7 +331,7 @@ static struct MachineDriver machine_driver_srumbler = ***************************************************************************/ ROM_START( srumbler ) - ROM_REGION( 0x10000+0x9000*16, REGION_CPU1 ) /* 64k for code + banked ROM images */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ /* empty, will be filled later */ ROM_REGION( 0x40000, REGION_USER1 ) /* Paged ROMs */ @@ -348,14 +370,14 @@ ROM_START( srumbler ) ROM_LOAD( "15j_sr26.bin", 0x30000, 0x8000, 0xd4f1732f ) ROM_LOAD( "14j_sr25.bin", 0x38000, 0x8000, 0xd2a4ea4f ) - ROM_REGION( 0x0300, REGION_PROMS ) /* Proms (not used for now.. Transparency???) */ - ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) - ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) - ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) + ROM_REGION( 0x0300, REGION_PROMS ) + ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) /* ROM banking */ + ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) /* ROM banking */ + ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) /* priority (not used) */ ROM_END ROM_START( srumblr2 ) - ROM_REGION( 0x10000+0x9000*16, REGION_CPU1 ) /* 64k for code + banked ROM images */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ /* empty, will be filled later */ ROM_REGION( 0x40000, REGION_USER1 ) /* Paged ROMs */ @@ -394,14 +416,14 @@ ROM_START( srumblr2 ) ROM_LOAD( "15j_sr26.bin", 0x30000, 0x8000, 0xd4f1732f ) ROM_LOAD( "14j_sr25.bin", 0x38000, 0x8000, 0xd2a4ea4f ) - ROM_REGION( 0x0300, REGION_PROMS ) /* Proms (not used for now.. Transparency???) */ - ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) - ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) - ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) + ROM_REGION( 0x0300, REGION_PROMS ) + ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) /* ROM banking */ + ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) /* ROM banking */ + ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) /* priority (not used) */ ROM_END ROM_START( rushcrsh ) - ROM_REGION( 0x10000+0x9000*16, REGION_CPU1 ) /* 64k for code + banked ROM images */ + ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */ /* empty, will be filled later */ ROM_REGION( 0x40000, REGION_USER1 ) /* Paged ROMs */ @@ -440,128 +462,14 @@ ROM_START( rushcrsh ) ROM_LOAD( "15j_sr26.bin", 0x30000, 0x8000, 0xd4f1732f ) ROM_LOAD( "14j_sr25.bin", 0x38000, 0x8000, 0xd2a4ea4f ) - ROM_REGION( 0x0300, REGION_PROMS ) /* Proms (not used for now.. Transparency???) */ - ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) - ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) - ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) + ROM_REGION( 0x0300, REGION_PROMS ) + ROM_LOAD( "63s141.12a", 0x0000, 0x0100, 0x8421786f ) /* ROM banking */ + ROM_LOAD( "63s141.13a", 0x0100, 0x0100, 0x6048583f ) /* ROM banking */ + ROM_LOAD( "63s141.8j", 0x0200, 0x0100, 0x1a89a7ff ) /* priority (not used) */ ROM_END -/* - - SPEED-RUMBLER Paging system. - =========================== - - This is quite complex. - - The area from 0xe000-0xffff is resident all the time. The area from - 0x5000-0xdfff is paged in and out. - - The following map is derived from the ROM test routine. The routine - tests the ROM chips in the following order. - - 1=RC4 - 2=RC3 - 3=RC2 - 4=RC1 - 5=RC9 - 6=RC8 - 7=RC7 - 8=RC6 - - The numbers on the bars on the paging map refer to the ROM test - order. This is also the order that the ROM chips are loaded into MAME. - - For example, page 0 consists of rom-test numbers 2 and 8. - This means it uses elements from RC3 and RC6. - - All locations under the arrows correspond to the ROM test and should be - correct (since the ROMs pass their tests). It may be necessary to - swap two blocks of the same size and number. - - Any locations not under the arrows are not covered by the ROM test. I - believe that these come from either page 0 or 5. Some of these, I know - are correct, some may not be. -*/ - -static int page_table[16][9]= -{ -// Arcade machine ROM location -// 0x5000 0x6000 0x7000 0x8000 0x9000 0xa000 0xb000 0xc000 0xd000 - -// <======= 2=====> <============ 8 ==============> <==2==> <=======2======> - {0x08000,0x09000,0x3c000,0x3d000,0x3e000,0x3f000,0x0b000,0x0e000,0x0f000}, // 00 -// <============ 7 ==============> - {0x08000,0x09000,0x30000,0x31000,0x32000,0x33000,0x0b000,0x0e000,0x0f000}, // 01 -// <============ 7 ==============> - {0x08000,0x09000,0x34000,0x35000,0x36000,0x37000,0x0b000,0x0e000,0x0f000}, // 02 -// <============ 8 ==============> - {0x08000,0x09000,0x38000,0x39000,0x3a000,0x3b000,0x0b000,0x0e000,0x0f000}, // 03 -// <==2==> <==3==> - {0x08000,0x09000,0x3c000,0x3d000,0x0a000,0x16000,0x0b000,0x0e000,0x0f000}, // 04 -// <=============== 1 ============> <============ 1 ==============> <==3==> - {0x00000,0x01000,0x02000,0x03000,0x04000,0x05000,0x06000,0x07000,0x17000}, // 05 -// <===== 3 =====> - {0x00000,0x01000,0x02000,0x03000,0x10000,0x11000,0x06000,0x07000,0x17000}, // 06 -// <============== 3 ============> - {0x00000,0x01000,0x02000,0x03000,0x12000,0x13000,0x14000,0x15000,0x17000}, // 07 -// <================================ 4 ==========================> - {0x18000,0x19000,0x1a000,0x1b000,0x1c000,0x1d000,0x1e000,0x1f000,0x17000}, // 08 -// <============== 5 ============> - {0x00000,0x01000,0x02000,0x03000,0x20000,0x21000,0x22000,0x23000,0x17000}, // 09 -// <============== 5 ============> - {0x00000,0x01000,0x02000,0x03000,0x24000,0x25000,0x26000,0x27000,0x17000}, // 0a -// <============== 6 ============> - {0x00000,0x01000,0x02000,0x03000,0x28000,0x29000,0x2a000,0x2b000,0x17000}, // 0b -// <============== 6 ============> - {0x00000,0x01000,0x02000,0x03000,0x2c000,0x2d000,0x2e000,0x2f000,0x17000}, // 0c - - /* Empty pages, kept to simplify the paging formula in the machine driver */ - {0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff}, // 0d - {0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff}, // 0e - {0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff} // 0f -}; - - - -static void init_srumbler(void) -{ - /* - Use the paging map to copy the ROM blocks into a more usable format. - The machine driver uses blocks of 0x9000 bytes long. - */ - - int j, i; - unsigned char *RAM = memory_region(REGION_CPU1); - unsigned char *pROM = memory_region(REGION_USER1); - - /* Resident ROM area e000-ffff */ - memcpy(&RAM[0xe000], pROM+0x0c000, 0x2000); - - /* Region 5000-dfff contains paged ROMS */ - for (j=0; j<16; j++) /* 16 Pages */ - { - for (i=0; i<9; i++) /* 9 * 0x1000 blocks */ - { - int nADDR=page_table[j][i]; - unsigned char *p=&RAM[0x10000+0x09000*j+i*0x1000]; - - if (nADDR == 0xfffff) - { - /* Fill unassigned regions with an illegal M6809 opcode (1) */ - memset(p, 1, 0x1000); - } - else - { - memcpy(p, pROM+nADDR, 0x01000); - } - } - } -} - - - -GAME( 1986, srumbler, 0, srumbler, srumbler, srumbler, ROT270, "Capcom", "The Speed Rumbler (set 1)" ) -GAME( 1986, srumblr2, srumbler, srumbler, srumbler, srumbler, ROT270, "Capcom", "The Speed Rumbler (set 2)" ) -GAME( 1986, rushcrsh, srumbler, srumbler, srumbler, srumbler, ROT270, "Capcom", "Rush & Crash (Japan)" ) +GAME( 1986, srumbler, 0, srumbler, srumbler, 0, ROT270, "Capcom", "The Speed Rumbler (set 1)" ) +GAME( 1986, srumblr2, srumbler, srumbler, srumbler, 0, ROT270, "Capcom", "The Speed Rumbler (set 2)" ) +GAME( 1986, rushcrsh, srumbler, srumbler, srumbler, 0, ROT270, "Capcom", "Rush & Crash (Japan)" ) diff --git a/src/drivers/ssi.c b/src/drivers/ssi.c index a14479ca2..6612ba9c1 100644 --- a/src/drivers/ssi.c +++ b/src/drivers/ssi.c @@ -414,5 +414,5 @@ ROM_END -GAME( 1990, ssi, 0, ssi, ssi, 0, ROT270, "Taito Corporation Japan", "Super Space Invaders '91 (World)" ) -GAME( 1990, majest12, ssi, ssi, majest12, 0, ROT270, "Taito Corporation", "Majestic Twelve - The Space Invaders Part IV (Japan)" ) +GAMEX( 1990, ssi, 0, ssi, ssi, 0, ROT270, "Taito Corporation Japan", "Super Space Invaders '91 (World)", GAME_NO_COCKTAIL ) +GAMEX( 1990, majest12, ssi, ssi, majest12, 0, ROT270, "Taito Corporation", "Majestic Twelve - The Space Invaders Part IV (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/ssozumo.c b/src/drivers/ssozumo.c index 378080c8c..4aafc6196 100644 --- a/src/drivers/ssozumo.c +++ b/src/drivers/ssozumo.c @@ -359,4 +359,4 @@ ROM_END -GAME( 1984, ssozumo, 0, ssozumo, ssozumo, 0, ROT270, "Technos", "Syusse Oozumou (Japan)" ) +GAMEX( 1984, ssozumo, 0, ssozumo, ssozumo, 0, ROT270, "Technos", "Syusse Oozumou (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/stactics.c b/src/drivers/stactics.c index 40bf57089..9a9432617 100644 --- a/src/drivers/stactics.c +++ b/src/drivers/stactics.c @@ -291,10 +291,7 @@ static struct MachineDriver machine_driver_stactics = stactics_vh_screenrefresh, /* sound hardware */ - 0, - 0, /* Start audio */ - 0, /* Stop audio */ - 0 /* Update audio */ + 0,0,0,0 }; @@ -327,5 +324,5 @@ ROM_END -GAME( 1981, stactics, 0, stactics, stactics, 0, ROT0, "Sega", "Space Tactics" ) +GAMEX( 1981, stactics, 0, stactics, stactics, 0, ROT0, "Sega", "Space Tactics", GAME_NO_SOUND ) diff --git a/src/drivers/stadhero.c b/src/drivers/stadhero.c index 37319b729..ec0d4e0c1 100644 --- a/src/drivers/stadhero.c +++ b/src/drivers/stadhero.c @@ -2,7 +2,7 @@ Stadium Hero (Japan) (c) 1988 Data East Corporation - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -323,7 +323,7 @@ static struct MachineDriver machine_driver_stadhero = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, diff --git a/src/drivers/starfire.c b/src/drivers/starfire.c index d8c3723ec..fc04e035e 100644 --- a/src/drivers/starfire.c +++ b/src/drivers/starfire.c @@ -243,10 +243,7 @@ static struct MachineDriver machine_driver_starfire = starfire_vh_screenrefresh, /* sound hardware */ - 0, - 0, - 0, - 0 + 0,0,0,0 }; static struct MachineDriver machine_driver_fireone = @@ -321,5 +318,5 @@ ROM_START( fireone ) ROM_END -GAME( 1979, starfire, 0, starfire, starfire, 0, ROT0, "Exidy", "Star Fire" ) -GAME( 1979, fireone, 0, fireone, fireone, 0, ROT0, "Exidy", "Fire One" ) +GAMEX( 1979, starfire, 0, starfire, starfire, 0, ROT0, "Exidy", "Star Fire", GAME_NOT_WORKING | GAME_NO_SOUND ) +GAMEX( 1979, fireone, 0, fireone, fireone, 0, ROT0, "Exidy", "Fire One", GAME_NOT_WORKING | GAME_NO_SOUND ) diff --git a/src/drivers/subs.c b/src/drivers/subs.c index 234bf688d..dd02d41c2 100644 --- a/src/drivers/subs.c +++ b/src/drivers/subs.c @@ -242,4 +242,4 @@ static void init_subs(void) } -GAME( 1977, subs, 0, subs, subs, subs, ROT0, "Atari", "Subs" ) +GAMEX( 1977, subs, 0, subs, subs, subs, ROT0, "Atari", "Subs", GAME_NO_SOUND ) diff --git a/src/drivers/supbtime.c b/src/drivers/supbtime.c index d7e2397bd..0ddab9233 100644 --- a/src/drivers/supbtime.c +++ b/src/drivers/supbtime.c @@ -12,7 +12,7 @@ down hardware (it doesn't write any good sound data btw, mostly zeros). Same hardware as Tumblepop, the two drivers can be joined at a later date. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -309,7 +309,7 @@ static struct MachineDriver machine_driver_supbtime = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, 0, @@ -377,4 +377,4 @@ static void init_supbtime(void) /******************************************************************************/ -GAME( 1990, supbtime, 0, supbtime, supbtime, supbtime, ROT0, "Data East Corporation", "Super Burger Time (Japan)" ) +GAMEX( 1990, supbtime, 0, supbtime, supbtime, supbtime, ROT0, "Data East Corporation", "Super Burger Time (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/superman.c b/src/drivers/superman.c index eb50bd853..726c12596 100644 --- a/src/drivers/superman.c +++ b/src/drivers/superman.c @@ -373,5 +373,4 @@ ROM_END -GAME( 1988, superman, 0, superman, superman, 0, ROT0, "Taito Corporation", "Superman" ) - +GAMEX( 1988, superman, 0, superman, superman, 0, ROT0, "Taito Corporation", "Superman", GAME_NO_COCKTAIL ) diff --git a/src/drivers/superpac.c b/src/drivers/superpac.c index b9b976614..4fa6ad0ca 100644 --- a/src/drivers/superpac.c +++ b/src/drivers/superpac.c @@ -562,7 +562,7 @@ ROM_END -GAME( 1982, superpac, 0, superpac, superpac, 0, ROT90, "Namco", "Super Pac-Man" ) -GAME( 1982, superpcm, superpac, superpac, superpac, 0, ROT90, "[Namco] (Bally Midway license)", "Super Pac-Man (Midway)" ) -GAME( 1983, pacnpal, 0, pacnpal, pacnpal, 0, ROT90, "Namco", "Pac & Pal" ) -GAME( 1983, pacnchmp, pacnpal, pacnpal, pacnpal, 0, ROT90, "Namco", "Pac-Man & Chomp Chomp" ) +GAMEX( 1982, superpac, 0, superpac, superpac, 0, ROT90, "Namco", "Super Pac-Man", GAME_NO_COCKTAIL ) +GAMEX( 1982, superpcm, superpac, superpac, superpac, 0, ROT90, "[Namco] (Bally Midway license)", "Super Pac-Man (Midway)", GAME_NO_COCKTAIL ) +GAMEX( 1983, pacnpal, 0, pacnpal, pacnpal, 0, ROT90, "Namco", "Pac & Pal", GAME_NO_COCKTAIL ) +GAMEX( 1983, pacnchmp, pacnpal, pacnpal, pacnpal, 0, ROT90, "Namco", "Pac-Man & Chomp Chomp", GAME_NO_COCKTAIL ) diff --git a/src/drivers/superqix.c b/src/drivers/superqix.c index 334b48d8e..6f5957aa4 100644 --- a/src/drivers/superqix.c +++ b/src/drivers/superqix.c @@ -303,5 +303,5 @@ ROM_END -GAMEX(1987, superqix, 0, superqix, superqix, 0, ROT90, "Taito", "Super Qix", GAME_NOT_WORKING ) -GAME( 1987, sqixbl, superqix, superqix, superqix, 0, ROT90, "bootleg", "Super Qix (bootleg)" ) +GAMEX( 1987, superqix, 0, superqix, superqix, 0, ROT90, "Taito", "Super Qix", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1987, sqixbl, superqix, superqix, superqix, 0, ROT90, "bootleg", "Super Qix (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/system1.c b/src/drivers/system1.c index 672081bdd..8cbac2de7 100644 --- a/src/drivers/system1.c +++ b/src/drivers/system1.c @@ -3322,52 +3322,52 @@ static void init_bootleg(void) -GAME( 1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)" ) -GAME( 1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)" ) -GAME( 1983, regulus, 0, system1, regulus, regulus, ROT270, "Sega", "Regulus" ) -GAME( 1983, regulusu, regulus, system1, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)" ) -GAME( 1983, upndown, 0, system1, upndown, 0, ROT270, "Sega", "Up'n Down" ) -GAME( 1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking" ) -GAME( 1984, mrvikinj, mrviking, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (Japan)" ) -GAME( 1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT" ) -GAME( 1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (set 1)" ) -GAME( 1984, flicky2, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (set 2)" ) -GAME( 1984, bullfgtj, 0, system1, bullfgtj, bullfgtj, ROT0, "Sega / Coreland", "The Tougyuu (Japan)" ) /* Bull Fight */ -GAME( 1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II" ) -GAME( 1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)" ) -GAME( 1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja" ) -GAME( 1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)" ) -GAME( 1985, nprinces, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess" ) -GAME( 1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (not encrypted)" ) -GAME( 1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (bootleg?)" ) -GAME( 1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (US)" ) -GAME( 1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (Japan)" ) -GAME( 1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues" ) -GAME( 1985, hvymetal, 0, hvymetal, hvymetal, hvymetal, ROT0, "Sega", "Heavy Metal" ) -GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US)" ) -GAME( 1985, myheroj, myhero, system1, myhero, myheroj, ROT0, "Coreland / Sega", "Seishun Scandal (Japan)" ) -GAME( 1985, myherok, myhero, system1, myhero, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)" ) -GAMEX(1985, shtngmst, 0, chplft, chplft, 0, ROT0, "Sega", "Shooting Master", GAME_NOT_WORKING ) /* 8751 protection */ -GAMEX(1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter", GAME_NOT_WORKING ) /* 8751 protection */ -GAME( 1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (alternate)" ) -GAME( 1985, chplftbl, chplft, chplft, chplft, 0, ROT0, "bootleg", "Choplifter (bootleg)" ) -GAME( 1985, 4dwarrio, 0, system1, 4dwarrio, fdwarrio, ROT0, "Coreland / Sega", "4-D Warriors" ) -GAME( 1986, brain, 0, brain, brain, 0, ROT0, "Coreland / Sega", "Brain" ) -GAME( 1986, wboy, 0, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 1)" ) -GAME( 1986, wboy2, wboy, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 2)" ) -GAMEX(????, wboy3, wboy, system1, wboy, wboy3, ROT0, "", "Wonder Boy (set 3)", GAME_NOT_WORKING ) -GAME( 1986, wboy4, wboy, system1, wboy, wboy4, ROT0, "Sega (Escape license)", "Wonder Boy (set 4)" ) -GAME( 1986, wboyu, wboy, system1, wboyu, 0, ROT0, "Sega (Escape license)", "Wonder Boy (not encrypted)" ) -GAME( 1986, wboy4u, wboy, system1, wboy, 0, ROT0, "Sega (Escape license)", "Wonder Boy (set 4 not encrypted)" ) -GAME( 1986, wbdeluxe, wboy, system1, wbdeluxe, 0, ROT0, "Sega (Escape license)", "Wonder Boy Deluxe" ) -GAMEX(1986, gardia, 0, brain, wboy, gardia, ROT270, "Sega / Coreland", "Gardia", GAME_NOT_WORKING ) -GAMEX(1986, gardiab, gardia, brain, wboy, gardia, ROT270, "bootleg", "Gardia (bootleg)", GAME_NOT_WORKING ) -GAMEX(1987, blockgal, 0, system1, blockgal, 0, ROT90, "Sega / Vic Tokai", "Block Gal", GAME_NOT_WORKING ) -GAMEX(1987, blckgalb, blockgal, system1, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NOT_WORKING ) -GAME( 1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier" ) -GAME( 1987, wbml, 0, wbml, wbml, bootleg, ROT0, "bootleg", "Wonder Boy in Monster Land" ) -GAMEX(1987, wbmlj, wbml, wbml, wbml, 0, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan set 1)", GAME_NOT_WORKING ) -GAMEX(1987, wbmlj2, wbml, wbml, wbml, 0, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan set 2)", GAME_NOT_WORKING ) -GAME( 1987, wbmlju, wbml, wbml, wbml, bootleg, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan not encrypted)" ) -GAMEX(1987, dakkochn, 0, chplft, chplft, 0, ROT0, "Sega", "DakkoChan Jansoh", GAME_NOT_WORKING ) -GAMEX(1988, ufosensi, 0, chplft, chplft, 0, ROT0, "Sega", "Ufo Senshi Yohko Chan", GAME_NOT_WORKING ) +GAMEX(1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)", GAME_NO_COCKTAIL ) +GAMEX(1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)", GAME_NO_COCKTAIL ) +GAMEX(1983, regulus, 0, system1, regulus, regulus, ROT270, "Sega", "Regulus", GAME_NO_COCKTAIL ) +GAMEX(1983, regulusu, regulus, system1, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1983, upndown, 0, system1, upndown, 0, ROT270, "Sega", "Up'n Down", GAME_NO_COCKTAIL ) +GAMEX(1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking", GAME_NO_COCKTAIL ) +GAMEX(1984, mrvikinj, mrviking, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (Japan)", GAME_NO_COCKTAIL ) +GAMEX(1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT", GAME_NO_COCKTAIL ) +GAMEX(1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (set 1)", GAME_NO_COCKTAIL ) +GAMEX(1984, flicky2, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (set 2)", GAME_NO_COCKTAIL ) +GAMEX(1984, bullfgtj, 0, system1, bullfgtj, bullfgtj, ROT0, "Sega / Coreland", "The Tougyuu (Japan)", GAME_NO_COCKTAIL ) /* Bull Fight */ +GAMEX(1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II", GAME_NO_COCKTAIL ) +GAMEX(1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja", GAME_NO_COCKTAIL ) +GAMEX(1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1985, nprinces, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess", GAME_NO_COCKTAIL ) +GAMEX(1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (bootleg?)", GAME_NO_COCKTAIL ) +GAMEX(1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (US)", GAME_NO_COCKTAIL ) +GAMEX(1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (Japan)", GAME_NO_COCKTAIL ) +GAMEX(1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues", GAME_NO_COCKTAIL ) +GAMEX(1985, hvymetal, 0, hvymetal, hvymetal, hvymetal, ROT0, "Sega", "Heavy Metal", GAME_NO_COCKTAIL ) +GAMEX(1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US)", GAME_NO_COCKTAIL ) +GAMEX(1985, myheroj, myhero, system1, myhero, myheroj, ROT0, "Coreland / Sega", "Seishun Scandal (Japan)", GAME_NO_COCKTAIL ) +GAMEX(1985, myherok, myhero, system1, myhero, myherok, ROT0, "Coreland / Sega", "My Hero (Korea)", GAME_NO_COCKTAIL ) +GAMEX(1985, shtngmst, 0, chplft, chplft, 0, ROT0, "Sega", "Shooting Master", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) /* 8751 protection */ +GAMEX(1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) /* 8751 protection */ +GAMEX(1985, chplftb, chplft, chplft, chplft, 0, ROT0, "Sega", "Choplifter (alternate)", GAME_NO_COCKTAIL ) +GAMEX(1985, chplftbl, chplft, chplft, chplft, 0, ROT0, "bootleg", "Choplifter (bootleg)", GAME_NO_COCKTAIL ) +GAMEX(1985, 4dwarrio, 0, system1, 4dwarrio, fdwarrio, ROT0, "Coreland / Sega", "4-D Warriors", GAME_NO_COCKTAIL ) +GAMEX(1986, brain, 0, brain, brain, 0, ROT0, "Coreland / Sega", "Brain", GAME_NO_COCKTAIL ) +GAMEX(1986, wboy, 0, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 1)", GAME_NO_COCKTAIL ) +GAMEX(1986, wboy2, wboy, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 2)", GAME_NO_COCKTAIL ) +GAMEX(????, wboy3, wboy, system1, wboy, wboy3, ROT0, "", "Wonder Boy (set 3)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1986, wboy4, wboy, system1, wboy, wboy4, ROT0, "Sega (Escape license)", "Wonder Boy (set 4)", GAME_NO_COCKTAIL ) +GAMEX(1986, wboyu, wboy, system1, wboyu, 0, ROT0, "Sega (Escape license)", "Wonder Boy (not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1986, wboy4u, wboy, system1, wboy, 0, ROT0, "Sega (Escape license)", "Wonder Boy (set 4 not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1986, wbdeluxe, wboy, system1, wbdeluxe, 0, ROT0, "Sega (Escape license)", "Wonder Boy Deluxe", GAME_NO_COCKTAIL ) +GAMEX(1986, gardia, 0, brain, wboy, gardia, ROT270, "Sega / Coreland", "Gardia", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1986, gardiab, gardia, brain, wboy, gardia, ROT270, "bootleg", "Gardia (bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1987, blockgal, 0, system1, blockgal, 0, ROT90, "Sega / Vic Tokai", "Block Gal", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1987, blckgalb, blockgal, system1, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", GAME_NO_COCKTAIL ) +GAMEX(1987, wbml, 0, wbml, wbml, bootleg, ROT0, "bootleg", "Wonder Boy in Monster Land", GAME_NO_COCKTAIL ) +GAMEX(1987, wbmlj, wbml, wbml, wbml, 0, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1987, wbmlj2, wbml, wbml, wbml, 0, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1987, wbmlju, wbml, wbml, wbml, bootleg, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan not encrypted)", GAME_NO_COCKTAIL ) +GAMEX(1987, dakkochn, 0, chplft, chplft, 0, ROT0, "Sega", "DakkoChan Jansoh", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX(1988, ufosensi, 0, chplft, chplft, 0, ROT0, "Sega", "Ufo Senshi Yohko Chan", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) diff --git a/src/drivers/system16.c b/src/drivers/system16.c index 34d827535..be1939039 100644 --- a/src/drivers/system16.c +++ b/src/drivers/system16.c @@ -6317,7 +6317,7 @@ ROM_START( sdi ) ROM_LOAD( "b10.rom", 0x10000, 0x10000, 0x8f7129a2 ) ROM_LOAD( "b11.rom", 0x20000, 0x10000, 0x4409411f ) - ROM_REGION( 0x060000*2, REGION_GFX2 | REGIONFLAG_DISPOSE ) /* sprites */ + ROM_REGION( 0x060000*2, REGION_GFX2 ) /* sprites */ ROM_LOAD( "b1.rom", 0x000000, 0x010000, 0x30e2c50a ) ROM_LOAD( "b5.rom", 0x010000, 0x010000, 0x794e3e8b ) ROM_LOAD( "b2.rom", 0x020000, 0x010000, 0x6a8b3fd0 ) diff --git a/src/drivers/taitof2.c b/src/drivers/taitof2.c index 163f8d772..4ea71e93e 100644 --- a/src/drivers/taitof2.c +++ b/src/drivers/taitof2.c @@ -80,7 +80,7 @@ F2 Motherboard ( Big ) K1100432A, J1100183A Feb.1990 Quiz Torimonochou (C41, K1100554A) *Apr.1990 Cameltry (C38, M4300167A, K1100556A) Jul.1990 Quiz H.Q. (C53, K1100594A) -*Aug.1990 Thunder Fox (C28, M4300181A, K1100580A) +*Aug.1990 Thunder Fox (C28, M4300181A, K1100580A) (exists in F1 version too) *Sep.1990 Liquid Kids/Mizubaku Daibouken (C49, K1100593A) *Nov.1990 MJ-12/Super Space Invaders (C64, M4300195A, K1100616A, J1100248A) Jan.1991 Gun Frontier (C71, M4300199A, K1100625A, K1100629A(overseas)) @@ -464,12 +464,12 @@ INPUT_PORTS_START( liquidk ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* DSW A */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Flip Screen?" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) @@ -625,9 +625,9 @@ INPUT_PORTS_START( growl ) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Flip Screen?" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) @@ -699,7 +699,9 @@ INPUT_PORTS_END INPUT_PORTS_START( megab ) PORT_START /* DSW A */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Unused? */ + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x01, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -707,10 +709,7 @@ INPUT_PORTS_START( megab ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START /* DSW B */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) @@ -723,10 +722,7 @@ INPUT_PORTS_START( megab ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START /* DSW c */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) @@ -739,10 +735,7 @@ INPUT_PORTS_START( megab ) PORT_DIPSETTING( 0x0a, "Bonus 2??" ) PORT_DIPSETTING( 0x08, "Bonus 3??" ) PORT_DIPSETTING( 0x00, "Bonus 4??" ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START /* DSW D */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) @@ -755,10 +748,7 @@ INPUT_PORTS_START( megab ) PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x08, "3" ) PORT_DIPSETTING( 0x0c, "4" ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 ) @@ -1160,7 +1150,7 @@ ROM_START( liquidku ) ROM_LOAD_EVEN( "lq09.bin", 0x00000, 0x20000, 0x6ae09eb9 ) ROM_LOAD_ODD ( "lq11.bin", 0x00000, 0x20000, 0x42d2be6e ) ROM_LOAD_EVEN( "lq10.bin", 0x40000, 0x20000, 0x50bef2e0 ) - ROM_LOAD_ODD ( "lqu12.bin", 0x40000, 0x20000, 0xbc118a43 ) + ROM_LOAD_ODD ( "lq14.bin", 0x40000, 0x20000, 0xbc118a43 ) ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE) /* temporary space for graphics (disposed after conversion) */ ROM_LOAD( "lk_scr.bin", 0x000000, 0x080000, 0xc3364f9b ) @@ -1229,7 +1219,7 @@ ROM_START( growlu ) ROM_LOAD_EVEN( "growl_10.rom", 0x00000, 0x40000, 0xca81a20b ) ROM_LOAD_ODD ( "growl_08.rom", 0x00000, 0x40000, 0xaa35dd9e ) ROM_LOAD_EVEN( "growl_11.rom", 0x80000, 0x40000, 0xee3bd6d5 ) - ROM_LOAD_ODD ( "c74-14.rom", 0x80000, 0x40000, 0xc1c57e51 ) + ROM_LOAD_ODD ( "c74-13.rom", 0x80000, 0x40000, 0xc1c57e51 ) ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE) /* temporary space for graphics (disposed after conversion) */ ROM_LOAD( "growl_01.rom", 0x000000, 0x100000, 0x3434ce80 ) /* characters */ @@ -1276,11 +1266,11 @@ ROM_END -GAME( 1988, finalb, 0, finalb, finalb, 0, ROT0, "Taito", "Final Blow" ) -GAME( 1989, megab, 0, megab, megab, 0, ROT0, "Taito", "Mega Blade" ) -GAME( 1990, liquidk, 0, liquidk, liquidk, 0, ROT180, "Taito Corporation Japan", "Liquid Kids (World)" ) -GAME( 1990, liquidku, liquidk, liquidk, liquidk, 0, ROT180, "Taito America Corporation", "Liquid Kids (US)" ) -GAME( 1990, mizubaku, liquidk, liquidk, liquidk, 0, ROT180, "Taito Corporation", "Mizubaku Daibouken (Japan)" ) -GAME( 1990, growl, 0, growl, growl, 0, ROT0, "Taito Corporation Japan", "Growl (World)" ) -GAME( 1990, growlu, growl, growl, growl, 0, ROT0, "Taito America Corporation", "Growl (US)" ) -GAME( 1990, runark, growl, growl, growl, 0, ROT0, "Taito Corporation", "Runark (Japan)" ) +GAMEX( 1988, finalb, 0, finalb, finalb, 0, ROT0, "Taito", "Final Blow", GAME_NO_COCKTAIL ) +GAMEX( 1989, megab, 0, megab, megab, 0, ROT0, "Taito", "Mega Blade", GAME_NO_COCKTAIL ) +GAMEX( 1990, liquidk, 0, liquidk, liquidk, 0, ROT180, "Taito Corporation Japan", "Liquid Kids (World)", GAME_NO_COCKTAIL ) +GAMEX( 1990, liquidku, liquidk, liquidk, liquidk, 0, ROT180, "Taito America Corporation", "Liquid Kids (US)", GAME_NO_COCKTAIL ) +GAMEX( 1990, mizubaku, liquidk, liquidk, liquidk, 0, ROT180, "Taito Corporation", "Mizubaku Daibouken (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1990, growl, 0, growl, growl, 0, ROT0, "Taito Corporation Japan", "Growl (World)", GAME_NO_COCKTAIL ) +GAMEX( 1990, growlu, growl, growl, growl, 0, ROT0, "Taito America Corporation", "Growl (US)", GAME_NO_COCKTAIL ) +GAMEX( 1990, runark, growl, growl, growl, 0, ROT0, "Taito Corporation", "Runark (Japan)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/taitol.c b/src/drivers/taitol.c index c0af45525..f1accd8af 100644 --- a/src/drivers/taitol.c +++ b/src/drivers/taitol.c @@ -864,7 +864,7 @@ static struct MemoryWriteAddress champwr_3_writemem[] = { -INPUT_PORTS_START( puzznic ) /* Plotting ports too */ +INPUT_PORTS_START( puzznic ) PORT_START PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -943,9 +943,77 @@ INPUT_PORTS_START( puzznic ) /* Plotting ports too */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - INPUT_PORTS_END +INPUT_PORTS_START( plotting ) + PORT_START + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) + + PORT_START + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) + + PORT_START + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) +INPUT_PORTS_END INPUT_PORTS_START( palamed ) PORT_START @@ -997,7 +1065,7 @@ INPUT_PORTS_START( palamed ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) // Service + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN1, 1 ) PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN2, 1 ) @@ -1027,7 +1095,6 @@ INPUT_PORTS_START( palamed ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END - INPUT_PORTS_START( horshoes ) PORT_START PORT_DIPNAME( 0x01, 0x01, "Bit 0" ) @@ -1275,7 +1342,7 @@ INPUT_PORTS_START( fhawk ) PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) // Service + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN1, 4 ) PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_LOW, IPT_COIN2, 4 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1284,7 +1351,6 @@ INPUT_PORTS_START( fhawk ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) INPUT_PORTS_END - INPUT_PORTS_START( raimais ) PORT_START PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) @@ -1355,7 +1421,7 @@ INPUT_PORTS_START( raimais ) PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) // Service + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_HIGH, IPT_COIN1, 1 ) PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_HIGH, IPT_COIN2, 1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1714,7 +1780,7 @@ ROM_END ROM_START( champwru ) ROM_REGION( 0xf0000, REGION_CPU1 ) - ROM_LOAD( "c01-13u.rom", 0x00000, 0x20000, 0x09f345b3 ) + ROM_LOAD( "c01-12.rom", 0x00000, 0x20000, 0x09f345b3 ) ROM_RELOAD( 0x10000, 0x20000 ) ROM_LOAD( "c01-04.rom", 0x30000, 0x20000, 0x358bd076 ) ROM_LOAD( "c01-05.rom", 0x50000, 0x20000, 0x22efad4a ) @@ -1845,7 +1911,7 @@ GAMEX(1989, champwr, 0, champwr, champwr, 0, ROT0, "Taito Corp GAMEX(1989, champwru, champwr, champwr, champwr, 0, ROT0, "Taito America Corporation", "Champion Wrestler (US)", GAME_NO_SOUND ) GAMEX(1989, champwrj, champwr, champwr, champwr, 0, ROT0, "Taito Corporation", "Champion Wrestler (Japan)", GAME_NO_SOUND ) GAME( 1989, puzznic, 0, puzznic, puzznic, 0, ROT0, "Taito Corporation", "Puzznic (Japan)" ) -GAME( 1989, plotting, 0, plotting, puzznic, plotting, ROT0, "Taito Corporation Japan", "Plotting (World)" ) +GAME( 1989, plotting, 0, plotting, plotting, plotting, ROT0, "Taito Corporation Japan", "Plotting (World)" ) GAME( 1990, palamed, 0, palamed, palamed, 0, ROT0, "Taito Corporation", "Palamedes (Japan)" ) GAMEX(1990, horshoes, 0, horshoes, horshoes, 0, ROT270, "Taito America Corporation", "American Horseshoes (US)", GAME_NOT_WORKING ) GAME( 1993, cachat, 0, cachat, palamed, 0, ROT0, "Taito Corporation", "Cachat (Japan)" ) diff --git a/src/drivers/tecmo.c b/src/drivers/tecmo.c index 4891e8511..6d0fdd164 100644 --- a/src/drivers/tecmo.c +++ b/src/drivers/tecmo.c @@ -1031,9 +1031,9 @@ ROM_END -GAME( 1986, rygar, 0, rygar, rygar, 0, ROT0, "Tecmo", "Rygar (US set 1)" ) -GAME( 1986, rygar2, rygar, rygar, rygar, 0, ROT0, "Tecmo", "Rygar (US set 2)" ) -GAME( 1986, rygarj, rygar, rygar, rygar, 0, ROT0, "Tecmo", "Argus no Senshi (Japan)" ) -GAME( 1987, gemini, 0, gemini, gemini, 0, ROT90, "Tecmo", "Gemini Wing" ) -GAME( 1988, silkworm, 0, silkworm, silkworm, 0, ROT0, "Tecmo", "Silkworm (set 1)" ) -GAME( 1988, silkwrm2, silkworm, silkworm, silkworm, 0, ROT0, "Tecmo", "Silkworm (set 2)" ) +GAMEX( 1986, rygar, 0, rygar, rygar, 0, ROT0, "Tecmo", "Rygar (US set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1986, rygar2, rygar, rygar, rygar, 0, ROT0, "Tecmo", "Rygar (US set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1986, rygarj, rygar, rygar, rygar, 0, ROT0, "Tecmo", "Argus no Senshi (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1987, gemini, 0, gemini, gemini, 0, ROT90, "Tecmo", "Gemini Wing", GAME_NO_COCKTAIL ) +GAMEX( 1988, silkworm, 0, silkworm, silkworm, 0, ROT0, "Tecmo", "Silkworm (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1988, silkwrm2, silkworm, silkworm, silkworm, 0, ROT0, "Tecmo", "Silkworm (set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/tempest.c b/src/drivers/tempest.c index ad8eb1fae..75c7d58c4 100644 --- a/src/drivers/tempest.c +++ b/src/drivers/tempest.c @@ -261,32 +261,32 @@ INPUT_PORTS_START( tempest ) PORT_START /* IN1/DSW0 */ /* This is the Tempest spinner input. It only uses 4 bits. */ - PORT_ANALOG( 0x0f, 0x00, IPT_DIAL | IPF_REVERSE, 25, 20, 0, 0) + PORT_ANALOG( 0x0f, 0x00, IPT_DIAL, 25, 20, 0, 0) /* The next one is reponsible for cocktail mode. * According to the documentation, this is not a switch, although * it may have been planned to put it on the Math Box PCB, D/E2 ) */ - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* IN2 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x01, "Easy" ) - PORT_DIPSETTING( 0x00, "Medium1" ) - PORT_DIPSETTING( 0x03, "Medium2" ) - PORT_DIPSETTING( 0x02, "Hard" ) - PORT_DIPNAME( 0x04, 0x00, "Rating" ) - PORT_DIPSETTING( 0x00, "1, 3, 5, 7, 9" ) - PORT_DIPSETTING( 0x04, "tied to high score" ) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x02, "Easy" ) + PORT_DIPSETTING( 0x03, "Medium1" ) + PORT_DIPSETTING( 0x00, "Medium2" ) + PORT_DIPSETTING( 0x01, "Hard" ) + PORT_DIPNAME( 0x04, 0x04, "Rating" ) + PORT_DIPSETTING( 0x04, "1, 3, 5, 7, 9" ) + PORT_DIPSETTING( 0x00, "tied to high score" ) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START /* DSW1 - (N13 on analog vector generator PCB */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) @@ -338,23 +338,25 @@ INPUT_PORTS_START( tempest ) INPUT_PORTS_END +int input_port_1_bit_r(int offs) { return (readinputport(1) & (1 << offs)) ? 0 : 228; } +int input_port_2_bit_r(int offs) { return (readinputport(2) & (1 << offs)) ? 0 : 228; } static struct POKEYinterface pokey_interface = { 2, /* 2 chips */ - 1500000, /* 1.5 MHz??? */ + 12096000/8, /* 1.512 MHz */ { 50, 50 }, /* The 8 pot handlers */ - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, + { input_port_1_bit_r, input_port_2_bit_r }, /* The allpot handler */ - { input_port_1_r, input_port_2_r }, + { 0, 0 }, }; @@ -365,7 +367,7 @@ static struct MachineDriver machine_driver_tempest = { { CPU_M6502, - 1500000, /* 1.5 Mhz */ + 12096000/8, /* 1.512 MHz */ readmem,writemem,0,0, interrupt,4 /* 4.1ms */ } diff --git a/src/drivers/tigeroad.c b/src/drivers/tigeroad.c index 5d1f26318..9cc162454 100644 --- a/src/drivers/tigeroad.c +++ b/src/drivers/tigeroad.c @@ -852,9 +852,9 @@ void init_f1dream(void) -GAME( 1987, tigeroad, 0, tigeroad, tigeroad, tigeroad, ROT0, "Capcom (Romstar license)", "Tiger Road (US)" ) -GAME( 1987, toramich, tigeroad, toramich, toramich, tigeroad, ROT0, "Capcom", "Tora eno Michi (Japan)" ) +GAMEX( 1987, tigeroad, 0, tigeroad, tigeroad, tigeroad, ROT0, "Capcom (Romstar license)", "Tiger Road (US)", GAME_NO_COCKTAIL ) +GAMEX( 1987, toramich, tigeroad, toramich, toramich, tigeroad, ROT0, "Capcom", "Tora eno Michi (Japan)", GAME_NO_COCKTAIL ) /* F1 Dream has an Intel 8751 microcontroller for protection */ -GAME( 1988, f1dream, 0, tigeroad, f1dream, f1dream, ROT0, "Capcom (Romstar license)", "F-1 Dream" ) -GAME( 1988, f1dreamb, f1dream, tigeroad, f1dream, tigeroad, ROT0, "bootleg", "F-1 Dream (bootleg)" ) +GAMEX( 1988, f1dream, 0, tigeroad, f1dream, f1dream, ROT0, "Capcom (Romstar license)", "F-1 Dream", GAME_NO_COCKTAIL ) +GAMEX( 1988, f1dreamb, f1dream, tigeroad, f1dream, tigeroad, ROT0, "bootleg", "F-1 Dream (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/tmnt.c b/src/drivers/tmnt.c index 416339cba..26af0a459 100644 --- a/src/drivers/tmnt.c +++ b/src/drivers/tmnt.c @@ -2038,6 +2038,67 @@ INPUT_PORTS_START( ssriders ) PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) INPUT_PORTS_END +INPUT_PORTS_START( tmnt2a ) + PORT_START /* IN0 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_START /* IN1 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START /* COIN */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) + + PORT_START /* EEPROM and service */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* EEPROM data */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status? - always 1 */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: NVBLK */ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ + PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) + + PORT_START /* IN2 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) + + PORT_START /* IN3 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER4 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER4 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) +INPUT_PORTS_END + INPUT_PORTS_START( thndrx2 ) PORT_START PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER1 ) @@ -2082,7 +2143,7 @@ static struct YM2151interface ym2151_interface = { 1, /* 1 chip */ 3579545, /* 3.579545 MHz */ - { YM3012_VOL(70,MIXER_PAN_LEFT,70,MIXER_PAN_RIGHT) }, + { YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }, { 0 } }; @@ -2127,7 +2188,7 @@ static struct K053260_interface k053260_interface_nmi = { 3579545, REGION_SOUND1, /* memory region */ - { MIXER(50,MIXER_PAN_LEFT), MIXER(50,MIXER_PAN_RIGHT) }, + { MIXER(70,MIXER_PAN_LEFT), MIXER(70,MIXER_PAN_RIGHT) }, // sound_nmi_callback, }; @@ -2135,7 +2196,7 @@ static struct K053260_interface k053260_interface = { 3579545, REGION_SOUND1, /* memory region */ - { MIXER(50,MIXER_PAN_LEFT), MIXER(50,MIXER_PAN_RIGHT) }, + { MIXER(70,MIXER_PAN_LEFT), MIXER(70,MIXER_PAN_RIGHT) }, 0 }; @@ -3518,7 +3579,7 @@ GAMEX(1991, glfgreat, 0, glfgreat, glfgreat, glfgreat, ROT0, "Konami", " GAMEX(1991, tmnt2, 0, tmnt2, ssridr4p, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players US)", GAME_IMPERFECT_COLORS ) GAMEX(1991, tmnt22p, tmnt2, tmnt2, ssriders, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (2 Players US)", GAME_IMPERFECT_COLORS ) -GAMEX(1991, tmnt2a, tmnt2, tmnt2, ssridr4p, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players Asia)", GAME_IMPERFECT_COLORS ) +GAMEX(1991, tmnt2a, tmnt2, tmnt2, tmnt2a, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players Asia)", GAME_IMPERFECT_COLORS ) GAME( 1991, ssriders, 0, ssriders, ssridr4p, gfx, ROT0, "Konami", "Sunset Riders (World 4 Players ver. EAC)" ) GAME( 1991, ssrdrebd, ssriders, ssriders, ssriders, gfx, ROT0, "Konami", "Sunset Riders (World 2 Players ver. EBD)" ) diff --git a/src/drivers/toaplan2.c b/src/drivers/toaplan2.c index dcdc8d2d2..2cb2be2dc 100644 --- a/src/drivers/toaplan2.c +++ b/src/drivers/toaplan2.c @@ -1,10 +1,33 @@ /***************************************************************************** - Some ToaPlan games from 1991 -1994 - See end of file for Toaplan game numbers. - Driver by : Quench - - To Do / Unknowns + ToaPlan game hardware from 1991-1994 + ------------------------------------ + Driver by: Quench + + +Supported games: + + ROM set Toaplan + name board No Game name + -------------------------------------------------- + tekipaki TP-020 Teki Paki + ghox TP-021 Ghox + dogyuun TP-022 Dogyuun + kbash TP-023 Knuckle Bash + tatsujn2 TP-024 Truxton 2 / Tatsujin 2 + pipibibs TP-025 Pipi & Bibis + whoopee TP-025 Whoopee + pipibibi bootleg Pipi & Bibis + fixeight TP-026 FixEight + vfive TP-027 V-Five + batsugun TP-030 Batsugun + snowbro2 ?????? Snow Bros. 2 - With New Elves + + Notes: + See Input Port definition header below, for instructions + on how to enter pause/slow motion modes. + + To Do / Unknowns: - Whoopee/Teki Paki sometimes tests bit 5 of the territory port just after testing for vblank. Why ? - Whoppee is currently using the sound CPU ROM (Z80) from a differnt @@ -15,55 +38,71 @@ --- Game status --- Teki Paki Working, but no sound. Missing sound MCU dump -Ghox Sprites are missing. Probably due to MCU dump missing. -Dogyuun Working? but bad GFX. Requires support for two video controllers -Knuckle Bash Working, but no sound. MCU dump exists, but it needs investigation +Ghox Sprites are missing. Probably due to missing sound MCU dump. +Dogyuun Working, but no sound. MCU type unknown - its a Z?80 of some sort. +Knuckle Bash Working, but no sound. MCU dump exists, its a Z?80 of some sort. Tatsujin 2 Not Working. Pipi & Bibis Working. Whoopee Working. Missing sound MCU dump. Using bootleg sound CPU dump for now Pipi & Bibis (bootleg ?) Not working. 68K CPU ROMs are encoded ? -FixEight Not working. Sound MCU (type unknown) dump is missing. -Snow Bros. 2 Working - - +FixEight Not working. MCU type unknown - its a Z?80 of some sort. +VFive Working, but no sound. MCU type unknown - its a Z?80 of some sort. +Batsugun Working, no sound, wrong GFX priorities. MCU type unknown - its a Z?80 of some sort. +Snow Bros. 2 Working. *****************************************************************************/ + #include "driver.h" #include "vidhrdw/generic.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#define HD64X180 0 - /**************** Machine stuff ******************/ +#define HD64x180 0 /* Define if CPU support is available */ +#define Zx80 0 + #define CPU_2_NONE 0x00 #define CPU_2_Z80 0x5a -#define CPU_2_HD647180 0xa5 -#define CPU_2_UNKNOWN 0xff +#define CPU_2_HD647180 0xa5 +#define CPU_2_Zx80 0xff static unsigned char *toaplan2_shared_ram; +static unsigned char *Zx80_shared_ram; + static int mcu_data = 0; int toaplan2_sub_cpu = 0; +static INT8 old_p1_paddle_h; +static INT8 old_p1_paddle_v; +static INT8 old_p2_paddle_h; +static INT8 old_p2_paddle_v; -/**************** Video stuff ******************/ -int toaplan2_scrollregs_r(int offset); -void toaplan2_scrollregs_w(int offset, int data); -void toaplan2_offsetregs_w(int offset, int data); -void toaplan2_layers_offset_w(int offset, int data); -void toaplan2_voffs_w(int offset, int data); -int toaplan2_videoram_r(int offset); -void toaplan2_videoram_w(int offset, int data); - -void toaplan2_scroll_reg_select_w(int offset, int data); -void toaplan2_scroll_reg_data_w(int offset, int data); - -int toaplan2_vh_start(void); -void toaplan2_vh_stop(void); -void toaplan2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +/**************** Video stuff ******************/ +int toaplan2_0_videoram_r(int offset); +int toaplan2_1_videoram_r(int offset); +void toaplan2_0_videoram_w(int offset, int data); +void toaplan2_1_videoram_w(int offset, int data); + +void toaplan2_0_voffs_w(int offset, int data); +void toaplan2_1_voffs_w(int offset, int data); + +void toaplan2_0_scroll_reg_select_w(int offset, int data); +void toaplan2_1_scroll_reg_select_w(int offset, int data); +void toaplan2_0_scroll_reg_data_w(int offset, int data); +void toaplan2_1_scroll_reg_data_w(int offset, int data); + +void toaplan2_0_eof_callback(void); +void toaplan2_1_eof_callback(void); +int toaplan2_0_vh_start(void); +int toaplan2_1_vh_start(void); +void toaplan2_0_vh_stop(void); +void toaplan2_1_vh_stop(void); +void toaplan2_0_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +void toaplan2_1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +void batsugun_1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); static int video_status = 0; @@ -71,13 +110,17 @@ static int video_status = 0; static void init_toaplan2(void) { + old_p1_paddle_h = 0; + old_p1_paddle_v = 0; + old_p2_paddle_h = 0; + old_p2_paddle_v = 0; toaplan2_sub_cpu = CPU_2_HD647180; mcu_data = 0; } static void init_toaplan3(void) { - toaplan2_sub_cpu = CPU_2_UNKNOWN; + toaplan2_sub_cpu = CPU_2_Zx80; mcu_data = 0; } @@ -134,16 +177,16 @@ static void toaplan2_shared_w(int offset, int data) toaplan2_shared_ram[offset>>1] = data; } -static void toaplan2_sub_cpu_w(int offset, int data) +static void toaplan2_hd647180_cpu_w(int offset, int data) { - /* Command sent to secondary CPU. Support for HD647180 will be required - when a ROM dump becomes available for this hardware */ + /* Command sent to secondary CPU. Support for HD647180 will be + required when a ROM dump becomes available for this hardware */ if (toaplan2_sub_cpu == CPU_2_Z80) /* Whoopee */ { toaplan2_shared_ram[0] = data; } - else + else /* Teki Paki */ { mcu_data = data; if (errorlog) fprintf(errorlog,"PC:%08x Writing command (%04x) to secondary CPU shared port\n",cpu_getpreviouspc(),mcu_data); @@ -173,15 +216,50 @@ static int video_status_r(int offset) return video_status; } -static int kbash_sub_cpu_r(int offset) + +static int ghox_p1_h_analog_r(int offset) { -/* Knuckle Bash's 68000 reads HD64x180 cpu status via an I/O port. - If a value of 2 is read, then HD64x180 cpu is busy. - HD64x180 cpu must report 0xff when no longer busy, to signify that it - has passed POST. -*/ - mcu_data=0xff; - return mcu_data; + INT8 value, new_value; + new_value = input_port_7_r(0); + if (new_value == old_p1_paddle_h) return 0; + value = new_value - old_p1_paddle_h; + old_p1_paddle_h = new_value; + return value; +} +static int ghox_p1_v_analog_r(int offset) +{ + INT8 new_value; + new_value = input_port_9_r(0); /* fake vertical movement */ + if (new_value == old_p1_paddle_v) return input_port_1_r(0); + if (new_value > old_p1_paddle_v) + { + old_p1_paddle_v = new_value; + return (input_port_1_r(0) | 2); + } + old_p1_paddle_v = new_value; + return (input_port_1_r(0) | 1); +} +static int ghox_p2_h_analog_r(int offset) +{ + INT8 value, new_value; + new_value = input_port_8_r(0); + if (new_value == old_p2_paddle_h) return 0; + value = new_value - old_p2_paddle_h; + old_p2_paddle_h = new_value; + return value; +} +static int ghox_p2_v_analog_r(int offset) +{ + INT8 new_value; + new_value = input_port_10_r(0); /* fake vertical movement */ + if (new_value == old_p2_paddle_v) return input_port_2_r(0); + if (new_value > old_p2_paddle_v) + { + old_p2_paddle_v = new_value; + return (input_port_2_r(0) | 2); + } + old_p2_paddle_v = new_value; + return (input_port_2_r(0) | 1); } static int ghox_mcu_r(int offset) @@ -204,6 +282,27 @@ static void ghox_mcu_w(int offset, int data) } WRITE_WORD (&toaplan2_shared_ram[0x56],0x4e); /* Return a RTS instruction */ WRITE_WORD (&toaplan2_shared_ram[0x58],0x75); + + if (data == 0xd3) + { + WRITE_WORD (&toaplan2_shared_ram[0x56],0x3a); // move.w d1,d5 + WRITE_WORD (&toaplan2_shared_ram[0x58],0x01); + WRITE_WORD (&toaplan2_shared_ram[0x5a],0x08); // bclr.b #0,d5 + WRITE_WORD (&toaplan2_shared_ram[0x5c],0x85); + WRITE_WORD (&toaplan2_shared_ram[0x5e],0x00); + WRITE_WORD (&toaplan2_shared_ram[0x60],0x00); + WRITE_WORD (&toaplan2_shared_ram[0x62],0xcb); // muls.w #3,d5 + WRITE_WORD (&toaplan2_shared_ram[0x64],0xfc); + WRITE_WORD (&toaplan2_shared_ram[0x66],0x00); + WRITE_WORD (&toaplan2_shared_ram[0x68],0x03); + WRITE_WORD (&toaplan2_shared_ram[0x6a],0x90); // sub.w d5,d0 + WRITE_WORD (&toaplan2_shared_ram[0x6c],0x45); + WRITE_WORD (&toaplan2_shared_ram[0x6e],0xe5); // lsl.b #2,d1 + WRITE_WORD (&toaplan2_shared_ram[0x70],0x09); + WRITE_WORD (&toaplan2_shared_ram[0x72],0x4e); // rts + WRITE_WORD (&toaplan2_shared_ram[0x74],0x75); + } + } static int ghox_shared_ram_r(int offset) @@ -232,44 +331,34 @@ static void ghox_shared_ram_w(int offset, int data) } -static int shared_ram_r(int offset) +static int kbash_sub_cpu_r(int offset) { -/* Other games using a HD647180 cpu, have shared memory between the 68000 - and the HD647180 cpu. The 68000 reads the status of the HD647180 - via a location of the shared memory. - Be careful not to return HD647180 cpu POST codes when 68000 is - performing a RAM test on the shared memory. +/* Knuckle Bash's 68000 reads secondary CPU status via an I/O port. + If a value of 2 is read, then secondary CPU is busy. + Secondary CPU must report 0xff when no longer busy, to signify that it + has passed POST. */ - int data; - - if (offset == 0x1000) - { - if (mcu_data == 0x800000aa) mcu_data = 0xff; /* dogyuun */ - if (mcu_data == 0x00) mcu_data = 0x800000aa; /* dogyuun */ + mcu_data=0xff; + return mcu_data; +} - if (mcu_data == 0x8000ffaa) mcu_data = 0xffff; /* fixeight */ - if (mcu_data == 0xffaa) mcu_data = 0x8000ffaa; /* fixeight */ - if (mcu_data == 0xff00) mcu_data = 0xffaa; /* fixeight */ +static void kbash_sub_cpu_w(int offset, int data) +{ + if (errorlog) fprintf(errorlog,"PC:%08x writing %04x to Zx80 secondary CPU status port %02x\n",cpu_getpreviouspc(),mcu_data,offset/2); +} - if (errorlog) fprintf(errorlog,"PC:%08x reading %08x from HD647180 cpu shared ram status port\n",cpu_getpreviouspc(),mcu_data); - data = mcu_data & 0x0000ffff; - } - else - { - data = READ_WORD (&toaplan2_shared_ram[offset]); - } +static int shared_ram_r(int offset) +{ +/* Other games using a Zx80 based secondary CPU, have shared memory between + the 68000 and the Zx80 CPU. The 68000 reads the status of the Zx80 + via a location of the shared memory. +*/ + int data = READ_WORD (&toaplan2_shared_ram[offset]); return data; } static void shared_ram_w(int offset, int data) { - - if (offset == 0x1000) - { - mcu_data = data; - if (errorlog) fprintf(errorlog,"PC:%08x Writing command (%04x) to secondary CPU shared port\n",cpu_getpreviouspc(),mcu_data); - } - if (offset == 0x9e8) { WRITE_WORD (&toaplan2_shared_ram[offset + 2],data); @@ -282,6 +371,39 @@ static void shared_ram_w(int offset, int data) } WRITE_WORD (&toaplan2_shared_ram[offset],data); } +static int Zx80_status_port_r(int offset) +{ +/*** Status port includes Zx80 CPU POST codes. ************ + *** This is actually a part of the 68000/Zx80 Shared RAM */ + + int data; + + if (mcu_data == 0x800000aa) mcu_data = 0xff; /* dogyuun */ + if (mcu_data == 0x00) mcu_data = 0x800000aa; /* dogyuun */ + + if (mcu_data == 0x8000ffaa) mcu_data = 0xffff; /* fixeight */ + if (mcu_data == 0xffaa) mcu_data = 0x8000ffaa; /* fixeight */ + if (mcu_data == 0xff00) mcu_data = 0xffaa; /* fixeight */ + + if (errorlog) fprintf(errorlog,"PC:%08x reading %08x from Zx80 secondary CPU command/status port\n",cpu_getpreviouspc(),mcu_data); + data = mcu_data & 0x0000ffff; + return data; +} +static void Zx80_command_port_w(int offset, int data) +{ + mcu_data = data; + if (errorlog) fprintf(errorlog,"PC:%08x Writing command (%04x) to Zx80 secondary CPU command/status port\n",cpu_getpreviouspc(),mcu_data); +} + +int Zx80_sharedram_r(int offset) +{ + return Zx80_shared_ram[offset / 2]; +} + +void Zx80_sharedram_w(int offset,int data) +{ + Zx80_shared_ram[offset / 2] = data; +} @@ -291,7 +413,7 @@ static struct MemoryReadAddress tekipaki_readmem[] = { 0x020000, 0x03ffff, MRA_ROM }, /* extra for Whoopee */ { 0x080000, 0x082fff, MRA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_word_r }, - { 0x140004, 0x140007, toaplan2_videoram_r }, + { 0x140004, 0x140007, toaplan2_0_videoram_r }, { 0x14000c, 0x14000d, input_port_0_r }, /* VBlank */ { 0x180000, 0x180001, input_port_4_r }, /* Dip Switch A */ { 0x180010, 0x180011, input_port_5_r }, /* Dip Switch B */ @@ -308,28 +430,32 @@ static struct MemoryWriteAddress tekipaki_writemem[] = { 0x020000, 0x03ffff, MWA_ROM }, /* extra for Whoopee */ { 0x080000, 0x082fff, MWA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, - { 0x140000, 0x140001, toaplan2_voffs_w }, - { 0x140004, 0x140007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x140008, 0x140009, toaplan2_scroll_reg_select_w }, - { 0x14000c, 0x14000d, toaplan2_scroll_reg_data_w }, + { 0x140000, 0x140001, toaplan2_0_voffs_w }, + { 0x140004, 0x140007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x140008, 0x140009, toaplan2_0_scroll_reg_select_w }, + { 0x14000c, 0x14000d, toaplan2_0_scroll_reg_data_w }, { 0x180040, 0x180041, toaplan2_coin_w }, /* Coin count/lock */ - { 0x180070, 0x180071, toaplan2_sub_cpu_w }, + { 0x180070, 0x180071, toaplan2_hd647180_cpu_w }, { -1 } }; static struct MemoryReadAddress ghox_readmem[] = { { 0x000000, 0x03ffff, MRA_ROM }, + { 0x040000, 0x040001, ghox_p2_h_analog_r }, /* Paddle 2 */ { 0x080000, 0x083fff, MRA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_word_r }, - { 0x140004, 0x140007, toaplan2_videoram_r }, + { 0x100000, 0x100001, ghox_p1_h_analog_r }, /* Paddle 1 */ + { 0x140004, 0x140007, toaplan2_0_videoram_r }, { 0x14000c, 0x14000d, input_port_0_r }, /* VBlank */ { 0x180000, 0x180001, ghox_mcu_r }, /* really part of shared RAM */ { 0x180006, 0x180007, input_port_4_r }, /* Dip Switch A */ { 0x180008, 0x180009, input_port_5_r }, /* Dip Switch B */ { 0x180010, 0x180011, input_port_3_r }, /* Coin/System inputs */ - { 0x18000c, 0x18000d, input_port_1_r }, /* Player 1 controls */ - { 0x18000e, 0x18000f, input_port_2_r }, /* Player 2 controls */ +// { 0x18000c, 0x18000d, input_port_1_r }, /* Player 1 controls (real) */ +// { 0x18000e, 0x18000f, input_port_2_r }, /* Player 2 controls (real) */ + { 0x18000c, 0x18000d, ghox_p1_v_analog_r }, /* Player 1 controls */ + { 0x18000e, 0x18000f, ghox_p2_v_analog_r }, /* Player 2 controls */ { 0x180500, 0x180fff, ghox_shared_ram_r }, { 0x18100c, 0x18100d, input_port_6_r }, /* Territory Jumper block */ { -1 } @@ -340,10 +466,10 @@ static struct MemoryWriteAddress ghox_writemem[] = { 0x000000, 0x03ffff, MWA_ROM }, { 0x080000, 0x083fff, MWA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, - { 0x140000, 0x140001, toaplan2_voffs_w }, - { 0x140004, 0x140007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x140008, 0x140009, toaplan2_scroll_reg_select_w }, - { 0x14000c, 0x14000d, toaplan2_scroll_reg_data_w }, + { 0x140000, 0x140001, toaplan2_0_voffs_w }, + { 0x140004, 0x140007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x140008, 0x140009, toaplan2_0_scroll_reg_select_w }, + { 0x14000c, 0x14000d, toaplan2_0_scroll_reg_data_w }, { 0x180000, 0x180001, ghox_mcu_w }, /* really part of shared RAM */ { 0x180500, 0x180fff, ghox_shared_ram_w, &toaplan2_shared_ram }, { 0x181000, 0x181001, toaplan2_coin_w }, @@ -357,12 +483,22 @@ static struct MemoryReadAddress dogyuun_readmem[] = { 0x200010, 0x200011, input_port_1_r }, /* Player 1 controls */ { 0x200014, 0x200015, input_port_2_r }, /* Player 2 controls */ { 0x200018, 0x200019, input_port_3_r }, /* Coin/System inputs */ - { 0x21e000, 0x21ffff, shared_ram_r }, /* 21f000 */ - { 0x300004, 0x300007, toaplan2_videoram_r }, /* tile layers */ +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_r }, /* $21f000 status port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_r }, + { 0x21f000, 0x21f001, Zx80_status_port_r }, /* Zx80 status port */ + { 0x21f004, 0x21f005, input_port_4_r }, /* Dip Switch A */ + { 0x21f006, 0x21f007, input_port_5_r }, /* Dip Switch B */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + /***** The following in 0x30000x are for video controller 1 ******/ + { 0x300004, 0x300007, toaplan2_0_videoram_r }, /* tile layers */ { 0x30000c, 0x30000d, input_port_0_r }, /* VBlank */ { 0x400000, 0x400fff, paletteram_word_r }, - /***** The following in 0x50000x are for video controller 2 ??? ******/ - { 0x500004, 0x500007, toaplan2_videoram_r }, /* tile layers 2 */ + /***** The following in 0x50000x are for video controller 2 ******/ + { 0x500004, 0x500007, toaplan2_1_videoram_r }, /* tile layers 2 */ { 0x700000, 0x700001, video_status_r }, /* test bit 8 */ { -1 } }; @@ -373,17 +509,25 @@ static struct MemoryWriteAddress dogyuun_writemem[] = { 0x100000, 0x103fff, MWA_BANK1 }, { 0x200008, 0x200009, OKIM6295_data_0_w }, { 0x20001c, 0x20001d, toaplan2_coin_w }, - { 0x21e000, 0x21ffff, shared_ram_w, &toaplan2_shared_ram }, - { 0x300000, 0x300001, toaplan2_voffs_w }, /* VideoRAM selector/offset */ - { 0x300004, 0x300007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x300008, 0x300009, toaplan2_scroll_reg_select_w }, - { 0x30000c, 0x30000d, toaplan2_scroll_reg_data_w }, +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_w, &toaplan2_shared_ram }, /* $21F000 */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_w, &toaplan2_shared_ram }, + { 0x21f000, 0x21f001, Zx80_command_port_w }, /* Zx80 command port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + /***** The following in 0x30000x are for video controller 1 ******/ + { 0x300000, 0x300001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x300004, 0x300007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x300008, 0x300009, toaplan2_0_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_0_scroll_reg_data_w }, { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, - /***** The following in 0x50000x are for video controller 2 ??? ******/ - { 0x500000, 0x500001, toaplan2_voffs_w }, /* VideoRAM selector/offset */ - { 0x500004, 0x500007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x500008, 0x500009, toaplan2_scroll_reg_select_w }, - { 0x50000c, 0x50000d, toaplan2_scroll_reg_data_w }, + /***** The following in 0x50000x are for video controller 2 ******/ + { 0x500000, 0x500001, toaplan2_1_voffs_w }, /* VideoRAM selector/offset */ + { 0x500004, 0x500007, toaplan2_1_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x500008, 0x500009, toaplan2_1_scroll_reg_select_w }, + { 0x50000c, 0x50000d, toaplan2_1_scroll_reg_data_w }, { -1 } }; @@ -398,7 +542,7 @@ static struct MemoryReadAddress kbash_readmem[] = { 0x208010, 0x208011, input_port_1_r }, /* Player 1 controls */ { 0x208014, 0x208015, input_port_2_r }, /* Player 2 controls */ { 0x208018, 0x208019, input_port_3_r }, /* Coin/System inputs */ - { 0x300004, 0x300007, toaplan2_videoram_r }, /* tile layers */ + { 0x300004, 0x300007, toaplan2_0_videoram_r }, /* tile layers */ { 0x30000c, 0x30000d, input_port_0_r }, /* VBlank */ { 0x400000, 0x400fff, paletteram_word_r }, { 0x700000, 0x700001, video_status_r }, /* test bit 8 */ @@ -409,15 +553,13 @@ static struct MemoryWriteAddress kbash_writemem[] = { { 0x000000, 0x07ffff, MWA_ROM }, { 0x100000, 0x103fff, MWA_BANK1 }, -#if 0 - { 0x200000, 0x200001, kbash_sub_cpu_w }, /* sound number to play */ - { 0x200002, 0x200003, kbash_sub_cpu_w2 }, /* ??? */ -#endif + { 0x200000, 0x200003, kbash_sub_cpu_w }, /* sound number to play */ +// { 0x200002, 0x200003, kbash_sub_cpu_w2 }, /* ??? */ { 0x20801c, 0x20801d, toaplan2_coin_w }, - { 0x300000, 0x300001, toaplan2_voffs_w }, - { 0x300004, 0x300007, toaplan2_videoram_w }, - { 0x300008, 0x300009, toaplan2_scroll_reg_select_w }, - { 0x30000c, 0x30000d, toaplan2_scroll_reg_data_w }, + { 0x300000, 0x300001, toaplan2_0_voffs_w }, + { 0x300004, 0x300007, toaplan2_0_videoram_w }, + { 0x300008, 0x300009, toaplan2_0_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_0_scroll_reg_data_w }, { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, { -1 } }; @@ -426,7 +568,7 @@ static struct MemoryReadAddress tatsujn2_readmem[] = { { 0x000000, 0x07ffff, MRA_ROM }, { 0x100000, 0x10ffff, MRA_BANK1 }, - { 0x200004, 0x200007, toaplan2_videoram_r }, + { 0x200004, 0x200007, toaplan2_0_videoram_r }, { 0x20000c, 0x20000d, input_port_0_r }, { 0x300000, 0x300fff, paletteram_word_r }, { 0x400000, 0x403fff, MRA_BANK2 }, @@ -436,7 +578,7 @@ static struct MemoryReadAddress tatsujn2_readmem[] = { 0x700004, 0x700005, input_port_5_r }, /* Dip Switch B */ { 0x700006, 0x700007, input_port_6_r }, /* Territory Jumper block */ { 0x700008, 0x700009, input_port_3_r }, /* Coin/System inputs */ - { 0x70000a, 0x70000b, input_port_0_r }, /* ??? whats this ? */ + { 0x70000a, 0x70000b, input_port_0_r }, /* ??? whats this ? */ { 0x700016, 0x700017, YM2151_status_port_0_r }, { -1 } }; @@ -445,10 +587,10 @@ static struct MemoryWriteAddress tatsujn2_writemem[] = { { 0x000000, 0x07ffff, MWA_ROM }, { 0x100000, 0x10ffff, MWA_BANK1 }, - { 0x200000, 0x200001, toaplan2_voffs_w }, /* VideoRAM selector/offset */ - { 0x200004, 0x200007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x200008, 0x200009, toaplan2_scroll_reg_select_w }, - { 0x20000c, 0x20000d, toaplan2_scroll_reg_data_w }, + { 0x200000, 0x200001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x200004, 0x200007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x200008, 0x200009, toaplan2_0_scroll_reg_select_w }, + { 0x20000c, 0x20000d, toaplan2_0_scroll_reg_data_w }, { 0x300000, 0x300fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, { 0x400000, 0x403fff, MWA_BANK2 }, { 0x500000, 0x50ffff, MWA_BANK3 }, @@ -464,7 +606,7 @@ static struct MemoryReadAddress pipibibs_readmem[] = { 0x000000, 0x03ffff, MRA_ROM }, { 0x080000, 0x082fff, MRA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_word_r }, - { 0x140004, 0x140007, toaplan2_videoram_r }, + { 0x140004, 0x140007, toaplan2_0_videoram_r }, { 0x14000c, 0x14000d, input_port_0_r }, /* VBlank */ { 0x190000, 0x190fff, toaplan2_shared_r }, { 0x19c020, 0x19c021, input_port_4_r }, /* Dip Switch A */ @@ -481,10 +623,10 @@ static struct MemoryWriteAddress pipibibs_writemem[] = { 0x000000, 0x03ffff, MWA_ROM }, { 0x080000, 0x082fff, MWA_BANK1 }, { 0x0c0000, 0x0c0fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, - { 0x140000, 0x140001, toaplan2_voffs_w }, - { 0x140004, 0x140007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x140008, 0x140009, toaplan2_scroll_reg_select_w }, - { 0x14000c, 0x14000d, toaplan2_scroll_reg_data_w }, + { 0x140000, 0x140001, toaplan2_0_voffs_w }, + { 0x140004, 0x140007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x140008, 0x140009, toaplan2_0_scroll_reg_select_w }, + { 0x14000c, 0x14000d, toaplan2_0_scroll_reg_data_w }, { 0x190000, 0x190fff, toaplan2_shared_w, &toaplan2_shared_ram }, { 0x19c01c, 0x19c01d, toaplan2_coin_w }, /* Coin count/lock */ { -1 } @@ -492,19 +634,29 @@ static struct MemoryWriteAddress pipibibs_writemem[] = static struct MemoryReadAddress fixeight_readmem[] = { - { 0x000000, 0x0fffff, MRA_ROM }, + { 0x000000, 0x07ffff, MRA_ROM }, { 0x100000, 0x103fff, MRA_BANK1 }, - { 0x200000, 0x200001, input_port_4_r }, /* Dip Switch A */ - { 0x200004, 0x200005, input_port_5_r }, /* Dip Switch B */ - { 0x200010, 0x200011, input_port_3_r }, /* Coin/System inputs */ + { 0x200008, 0x200009, input_port_4_r }, /* Dip Switch A */ + { 0x20000c, 0x20000d, input_port_5_r }, /* Dip Switch B */ + { 0x200010, 0x200011, input_port_1_r }, /* Player 1 controls */ + { 0x200014, 0x200015, input_port_2_r }, /* Player 2 controls */ + { 0x200018, 0x200019, input_port_3_r }, /* Coin/System inputs */ { 0x280000, 0x28dfff, MRA_BANK2 }, /* part of shared ram ? */ - { 0x28e000, 0x28ffff, shared_ram_r }, - { 0x300004, 0x300007, toaplan2_videoram_r }, +#if Zx80 + { 0x28e000, 0x28fbff, shared_ram_r }, /* $21f000 status port */ + { 0x28fc00, 0x28ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x28e000, 0x28efff, shared_ram_r }, + { 0x28f000, 0x28f001, Zx80_status_port_r }, /* Zx80 status port */ + { 0x28f002, 0x28fbff, MRA_BANK3 }, /* part of shared ram ? */ + { 0x28fc00, 0x28ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + { 0x300004, 0x300007, toaplan2_0_videoram_r }, { 0x30000c, 0x30000d, input_port_0_r }, { 0x400000, 0x400fff, paletteram_word_r }, { 0x500000, 0x501fff, MRA_BANK4 }, - { 0x502000, 0x6021ff, MRA_BANK5 }, - { 0x503000, 0x6031ff, MRA_BANK6 }, + { 0x502000, 0x5021ff, MRA_BANK5 }, + { 0x503000, 0x5031ff, MRA_BANK6 }, { 0x600000, 0x60ffff, MRA_BANK7 }, { 0x800000, 0x800001, video_status_r }, { -1 } @@ -512,28 +664,139 @@ static struct MemoryReadAddress fixeight_readmem[] = static struct MemoryWriteAddress fixeight_writemem[] = { - { 0x000000, 0x0fffff, MWA_ROM }, + { 0x000000, 0x07ffff, MWA_ROM }, { 0x100000, 0x103fff, MWA_BANK1 }, { 0x20001c, 0x20001d, toaplan2_coin_w }, /* Coin count/lock */ { 0x280000, 0x28dfff, MWA_BANK2 }, /* part of shared ram ? */ - { 0x28e000, 0x28ffff, shared_ram_w, &toaplan2_shared_ram }, - { 0x300000, 0x300001, toaplan2_voffs_w }, /* VideoRAM selector/offset */ - { 0x300004, 0x300007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x300008, 0x300009, toaplan2_scroll_reg_select_w }, - { 0x30000c, 0x30000d, toaplan2_scroll_reg_data_w }, +#if Zx80 + { 0x28e000, 0x28fbff, shared_ram_w, &toaplan2_shared_ram }, /* $21F000 */ + { 0x28fc00, 0x28ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x28e000, 0x28efff, shared_ram_w, &toaplan2_shared_ram }, + { 0x28f000, 0x28f001, Zx80_command_port_w }, /* Zx80 command port */ + { 0x28f002, 0x28fbff, MWA_BANK3 }, /* part of shared ram ? */ + { 0x28fc00, 0x28ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + { 0x300000, 0x300001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x300004, 0x300007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x300008, 0x300009, toaplan2_0_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_0_scroll_reg_data_w }, { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, { 0x500000, 0x501fff, MWA_BANK4 }, - { 0x502000, 0x6021ff, MWA_BANK5 }, - { 0x503000, 0x6031ff, MWA_BANK6 }, + { 0x502000, 0x5021ff, MWA_BANK5 }, + { 0x503000, 0x5031ff, MWA_BANK6 }, { 0x600000, 0x60ffff, MWA_BANK7 }, { -1 } }; +static struct MemoryReadAddress vfive_readmem[] = +{ + { 0x000000, 0x07ffff, MRA_ROM }, + { 0x100000, 0x103fff, MRA_BANK1 }, +// { 0x200000, 0x20ffff, MRA_ROM }, /* ROM is here ??? */ + { 0x200010, 0x200011, input_port_1_r }, /* Player 1 controls */ + { 0x200014, 0x200015, input_port_2_r }, /* Player 2 controls */ + { 0x200018, 0x200019, input_port_3_r }, /* Coin/System inputs */ +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_r }, /* $21f000 status port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_r }, + { 0x21f000, 0x21f001, Zx80_status_port_r }, /* Zx80 status port */ + { 0x21f004, 0x21f005, input_port_4_r }, /* Dip Switch A */ + { 0x21f006, 0x21f007, input_port_5_r }, /* Dip Switch B */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + { 0x300004, 0x300007, toaplan2_0_videoram_r }, + { 0x30000c, 0x30000d, input_port_0_r }, + { 0x400000, 0x400fff, paletteram_word_r }, + { 0x700000, 0x700001, video_status_r }, + { -1 } +}; + +static struct MemoryWriteAddress vfive_writemem[] = +{ + { 0x000000, 0x07ffff, MWA_ROM }, + { 0x100000, 0x103fff, MWA_BANK1 }, +// { 0x200000, 0x20ffff, MWA_ROM }, /* ROM is here ??? */ + { 0x20001c, 0x20001d, toaplan2_coin_w }, /* Coin count/lock */ +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_w, &toaplan2_shared_ram }, /* $21F000 */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_w, &toaplan2_shared_ram }, + { 0x21f000, 0x21f001, Zx80_command_port_w }, /* Zx80 command port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + { 0x300000, 0x300001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x300004, 0x300007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x300008, 0x300009, toaplan2_0_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_0_scroll_reg_data_w }, + { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, + { -1 } +}; + +static struct MemoryReadAddress batsugun_readmem[] = +{ + { 0x000000, 0x07ffff, MRA_ROM }, + { 0x100000, 0x10ffff, MRA_BANK1 }, + { 0x200010, 0x200011, input_port_1_r }, /* Player 1 controls */ + { 0x200014, 0x200015, input_port_2_r }, /* Player 2 controls */ + { 0x200018, 0x200019, input_port_3_r }, /* Coin/System inputs */ + { 0x210000, 0x21bbff, MRA_BANK2 }, +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_r }, /* $21f000 status port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_r }, + { 0x21f000, 0x21f001, Zx80_status_port_r }, /* Zx80 status port */ + { 0x21f004, 0x21f005, input_port_4_r }, /* Dip Switch A */ + { 0x21f006, 0x21f007, input_port_5_r }, /* Dip Switch B */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_r }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + /***** The following in 0x30000x are for video controller 2 ******/ + { 0x300004, 0x300007, toaplan2_1_videoram_r }, /* tile layers */ + { 0x30000c, 0x30000d, input_port_0_r }, /* VBlank */ + { 0x400000, 0x400fff, paletteram_word_r }, + /***** The following in 0x50000x are for video controller 1 ******/ + { 0x500004, 0x500007, toaplan2_0_videoram_r }, /* tile layers 2 */ + { 0x700000, 0x700001, video_status_r }, /* test bit 8 */ + { -1 } +}; + +static struct MemoryWriteAddress batsugun_writemem[] = +{ + { 0x000000, 0x07ffff, MWA_ROM }, + { 0x100000, 0x10ffff, MWA_BANK1 }, + { 0x20001c, 0x20001d, toaplan2_coin_w }, /* Coin count/lock */ + { 0x210000, 0x21bbff, MWA_BANK2 }, +#if Zx80 + { 0x21e000, 0x21fbff, shared_ram_w, &toaplan2_shared_ram }, /* $21F000 */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#else + { 0x21e000, 0x21efff, shared_ram_w, &toaplan2_shared_ram }, + { 0x21f000, 0x21f001, Zx80_command_port_w }, /* Zx80 command port */ + { 0x21fc00, 0x21ffff, Zx80_sharedram_w, &Zx80_shared_ram }, /* 16-bit on 68000 side, 8-bit on Zx80 side */ +#endif + /***** The following in 0x30000x are for video controller 2 ******/ + { 0x300000, 0x300001, toaplan2_1_voffs_w }, /* VideoRAM selector/offset */ + { 0x300004, 0x300007, toaplan2_1_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x300008, 0x300009, toaplan2_1_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_1_scroll_reg_data_w }, + { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, + /***** The following in 0x50000x are for video controller 1 ******/ + { 0x500000, 0x500001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x500004, 0x500007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x500008, 0x500009, toaplan2_0_scroll_reg_select_w }, + { 0x50000c, 0x50000d, toaplan2_0_scroll_reg_data_w }, + { -1 } +}; + static struct MemoryReadAddress snowbro2_readmem[] = { { 0x000000, 0x07ffff, MRA_ROM }, { 0x100000, 0x10ffff, MRA_BANK1 }, - { 0x300004, 0x300007, toaplan2_videoram_r }, /* tile layers */ + { 0x300004, 0x300007, toaplan2_0_videoram_r }, /* tile layers */ { 0x30000c, 0x30000d, input_port_0_r }, /* VBlank */ { 0x400000, 0x400fff, paletteram_word_r }, { 0x500002, 0x500003, YM2151_status_port_0_r }, @@ -553,10 +816,10 @@ static struct MemoryWriteAddress snowbro2_writemem[] = { { 0x000000, 0x07ffff, MWA_ROM }, { 0x100000, 0x10ffff, MWA_BANK1 }, - { 0x300000, 0x300001, toaplan2_voffs_w }, /* VideoRAM selector/offset */ - { 0x300004, 0x300007, toaplan2_videoram_w }, /* Tile/Sprite VideoRAM */ - { 0x300008, 0x300009, toaplan2_scroll_reg_select_w }, - { 0x30000c, 0x30000d, toaplan2_scroll_reg_data_w }, + { 0x300000, 0x300001, toaplan2_0_voffs_w }, /* VideoRAM selector/offset */ + { 0x300004, 0x300007, toaplan2_0_videoram_w }, /* Tile/Sprite VideoRAM */ + { 0x300008, 0x300009, toaplan2_0_scroll_reg_select_w }, + { 0x30000c, 0x30000d, toaplan2_0_scroll_reg_data_w }, { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram }, { 0x500000, 0x500001, YM2151_register_port_0_w }, { 0x500002, 0x500003, YM2151_data_port_0_w }, @@ -584,15 +847,16 @@ static struct MemoryWriteAddress sound_writemem[] = { -1 } /* end of table */ }; -#if HD64X180 -static struct MemoryReadAddress hd641180_readmem[] = + +#if HD64x180 +static struct MemoryReadAddress hd647180_readmem[] = { { 0x0000, 0x7fff, MRA_ROM }, { 0xfe00, 0xffff, MRA_RAM }, /* Internal 512 bytes of RAM */ { -1 } /* end of table */ }; -static struct MemoryWriteAddress hd641180_writemem[] = +static struct MemoryWriteAddress hd647180_writemem[] = { { 0x0000, 0x7fff, MWA_ROM }, { 0xfe00, 0xffff, MWA_RAM }, /* Internal 512 bytes of RAM */ @@ -600,8 +864,31 @@ static struct MemoryWriteAddress hd641180_writemem[] = }; #endif + +#if Zx80 +static struct MemoryReadAddress Zx80_readmem[] = +{ + { 0x0000, 0x7fff, MRA_RAM }, + { -1 } /* end of table */ +}; + +static struct MemoryWriteAddress Zx80_writemem[] = +{ + { 0x0000, 0x07fff, MWA_RAM, &Zx80_sharedram }, + { -1 } /* end of table */ +}; +#endif + + + /***************************************************************************** Input Port definitions + Service input of the TOAPLAN2_SYSTEM_INPUTS is used as a Pause type input. + If you press then release the following buttons, the following occurs: + Service & P2 start : The game will pause. + Service & P1 start : The game will continue. + Service & P1 start & P2 start : The game will play in slow motion. + *****************************************************************************/ #define TOAPLAN2_PLAYER_INPUT( player, button3 ) \ @@ -612,14 +899,14 @@ static struct MemoryWriteAddress hd641180_writemem[] = PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | player ) \ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 | player) \ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 | player) \ - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, button3 ) \ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, button3 ) \ PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) #define TOAPLAN2_SYSTEM_INPUTS \ PORT_START \ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN3 ) \ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_TILT ) \ - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \ + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_SERVICE1 )\ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 ) \ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 ) \ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) \ @@ -634,7 +921,7 @@ static struct MemoryWriteAddress hd641180_writemem[] = PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) \ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ PORT_DIPSETTING( 0x02, DEF_STR( On ) ) \ - PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) /* Service Mode */ \ + PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) /* Service Mode */ \ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) \ PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) \ PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ @@ -745,9 +1032,9 @@ INPUT_PORTS_START( ghox ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPNAME( 0x40, 0x00, "Game Mode" ) - PORT_DIPSETTING( 0x00, "Normal" ) - PORT_DIPSETTING( 0x40, "Debug" ) + PORT_BITX( 0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -770,6 +1057,76 @@ INPUT_PORTS_START( ghox ) PORT_DIPSETTING( 0x0c, "USA (Taito Corporation Japan)" ) PORT_DIPSETTING( 0x0e, "Japan (Taito Corporation)" ) PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* (7) Paddle 1 (left-right) read at $100000 */ + PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_PLAYER1, 25, 15, 0, 0xff ) + + PORT_START /* (8) Paddle 2 (left-right) read at $040000 */ + PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_PLAYER2, 25, 15, 0, 0xff ) + + PORT_START /* (9) Paddle 1 (fake up-down) */ + PORT_ANALOG( 0xff, 0x00, IPT_DIAL_V | IPF_PLAYER1, 15, 0, 0, 0xff ) + + PORT_START /* (10) Paddle 2 (fake up-down) */ + PORT_ANALOG( 0xff, 0x00, IPT_DIAL_V | IPF_PLAYER2, 15, 0, 0, 0xff ) +INPUT_PORTS_END + +INPUT_PORTS_START( dogyuun ) + PORT_START /* (0) VBlank */ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER1, IPT_BUTTON3 | IPF_PLAYER1 ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER2, IPT_BUTTON3 | IPF_PLAYER2 ) + + TOAPLAN2_SYSTEM_INPUTS + + PORT_START /* (4) DSWA */ + PORT_DIPNAME( 0x0001, 0x0000, "Play Mode" ) + PORT_DIPSETTING( 0x0000, "Coin Play" ) + PORT_DIPSETTING( 0x0001, DEF_STR( Free_Play) ) + PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ + PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0030, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* (5) DSWB */ + PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0001, "Easy" ) + PORT_DIPSETTING( 0x0000, "Medium" ) + PORT_DIPSETTING( 0x0002, "Hard" ) + PORT_DIPSETTING( 0x0003, "Hardest" ) + PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x0000, "200K" ) + PORT_DIPSETTING( 0x0004, "200K, 400K, 600K" ) + PORT_DIPSETTING( 0x0008, "400K" ) + PORT_DIPSETTING( 0x000c, "None" ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x0030, "1" ) + PORT_DIPSETTING( 0x0020, "2" ) + PORT_DIPSETTING( 0x0000, "3" ) + PORT_DIPSETTING( 0x0010, "5" ) + PORT_BITX( 0x0040, 0x0000, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, "Allow Continue" ) + PORT_DIPSETTING( 0x0080, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) INPUT_PORTS_END INPUT_PORTS_START( kbash ) @@ -790,7 +1147,7 @@ INPUT_PORTS_START( kbash ) PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ + PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -806,7 +1163,7 @@ INPUT_PORTS_START( kbash ) PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_6C ) ) PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Non-European territories coin setup - PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x0030, DEF_STR( 2C_3C ) ) @@ -840,12 +1197,7 @@ INPUT_PORTS_START( kbash ) PORT_DIPNAME( 0x0080, 0x0000, "Allow Continue" ) PORT_DIPSETTING( 0x0080, DEF_STR( No ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0000, "0" ) - PORT_DIPSETTING( 0x0100, "1" ) - PORT_DIPSETTING( 0x0200, "2" ) - PORT_DIPSETTING( 0x0300, "3" ) - PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START /* (6) Territory Jumper block */ PORT_DIPNAME( 0x000f, 0x000a, "Territory" ) @@ -890,9 +1242,9 @@ INPUT_PORTS_START( pipibibs ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPNAME( 0x40, 0x00, "Game Mode" ) - PORT_DIPSETTING( 0x00, "Normal" ) - PORT_DIPSETTING( 0x40, "Debug" ) + PORT_BITX( 0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -971,9 +1323,9 @@ INPUT_PORTS_START( whoopee ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPNAME( 0x40, 0x00, "Game Mode" ) - PORT_DIPSETTING( 0x00, "Normal" ) - PORT_DIPSETTING( 0x40, "Debug" ) + PORT_BITX( 0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -991,6 +1343,122 @@ INPUT_PORTS_START( whoopee ) PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* bit 0x10 sound ready */ INPUT_PORTS_END +INPUT_PORTS_START( vfive ) + PORT_START /* (0) VBlank */ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER2, IPT_UNKNOWN ) + + TOAPLAN2_SYSTEM_INPUTS + + PORT_START /* (4) DSWA */ + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ + PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0030, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* (5) DSWB */ + PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0001, "Easy" ) + PORT_DIPSETTING( 0x0000, "Medium" ) + PORT_DIPSETTING( 0x0002, "Hard" ) + PORT_DIPSETTING( 0x0003, "Hardest" ) + PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x0000, "300K, and 800K" ) + PORT_DIPSETTING( 0x0004, "300K, then every 800K" ) + PORT_DIPSETTING( 0x0008, "200K" ) + PORT_DIPSETTING( 0x000c, "None" ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x0030, "1" ) + PORT_DIPSETTING( 0x0020, "2" ) + PORT_DIPSETTING( 0x0000, "3" ) + PORT_DIPSETTING( 0x0010, "5" ) + PORT_BITX( 0x0040, 0x0000, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, "Allow Continue" ) + PORT_DIPSETTING( 0x0080, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) +INPUT_PORTS_END + +INPUT_PORTS_START( batsugun ) + PORT_START /* (0) VBlank */ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN ) + + TOAPLAN2_PLAYER_INPUT( IPF_PLAYER2, IPT_UNKNOWN ) + + TOAPLAN2_SYSTEM_INPUTS + + PORT_START /* (4) DSWA */ + PORT_DIPNAME( 0x0001, 0x0000, "Continue Mode" ) + PORT_DIPSETTING( 0x0000, "Normal" ) + PORT_DIPSETTING( 0x0001, "Discount" ) + PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ + PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0030, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START /* (5) DSWB */ + PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0001, "Easy" ) + PORT_DIPSETTING( 0x0000, "Medium" ) + PORT_DIPSETTING( 0x0002, "Hard" ) + PORT_DIPSETTING( 0x0003, "Hardest" ) + PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x0000, "1 Million" ) + PORT_DIPSETTING( 0x0004, "500K, then every 600K" ) + PORT_DIPSETTING( 0x0008, "1.5 Million" ) + PORT_DIPSETTING( 0x000c, "None" ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x0030, "1" ) + PORT_DIPSETTING( 0x0020, "2" ) + PORT_DIPSETTING( 0x0000, "3" ) + PORT_DIPSETTING( 0x0010, "5" ) + PORT_BITX( 0x0040, 0x0000, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, "Allow Continue" ) + PORT_DIPSETTING( 0x0080, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) +INPUT_PORTS_END + INPUT_PORTS_START( snowbro2 ) PORT_START /* (0) VBlank */ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK ) @@ -1013,7 +1481,7 @@ INPUT_PORTS_START( snowbro2 ) PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ + PORT_SERVICE( 0x0004, IP_ACTIVE_HIGH ) /* Service Mode */ PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -1029,7 +1497,7 @@ INPUT_PORTS_START( snowbro2 ) PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_6C ) ) PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Non-European territories coin setups - PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) + PORT_DIPNAME( 0x0030, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x0030, DEF_STR( 2C_3C ) ) @@ -1083,87 +1551,47 @@ INPUT_PORTS_END - -#define TILELAYOUT(NUM) static struct GfxLayout tilelayout_##NUM = \ -{ \ - 16,16, /* 16x16 */ \ - NUM, /* Number of tiles */ \ - 4, /* 4 bits per pixel */ \ - { 8*NUM*64+8, 8*NUM*64, 8, 0 }, \ - { 0, 1, 2, 3, 4, 5, 6, 7, \ - 8*16+0, 8*16+1, 8*16+2, 8*16+3, 8*16+4, 8*16+5, 8*16+6, 8*16+7 }, \ - { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, \ - 16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 }, \ - 8*4*16 \ -} - -TILELAYOUT(8192); -TILELAYOUT(16384); -TILELAYOUT(24576); -TILELAYOUT(32768); -TILELAYOUT(49152); -TILELAYOUT(65536); - - -#define SPRITELAYOUT(NUM) static struct GfxLayout spritelayout_##NUM = \ -{ \ - 8,8, /* 8x8 */ \ - NUM, /* Number of 8x8 sprites */ \ - 4, /* 4 bits per pixel */ \ - { 8*NUM*16+8, 8*NUM*16, 8, 0 }, \ - { 0, 1, 2, 3, 4, 5, 6, 7 }, \ - { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, \ - 8*16 \ -} - -SPRITELAYOUT(32768); -SPRITELAYOUT(65536); -SPRITELAYOUT(98304); -SPRITELAYOUT(131072); -SPRITELAYOUT(196608); -SPRITELAYOUT(262144); - -static struct GfxDecodeInfo rom_1mb_gfxdecodeinfo[] = +static struct GfxLayout tilelayout = { - { REGION_GFX1, 0, &tilelayout_8192, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_32768, 0, 64 }, - { -1 } /* end of array */ + 16,16, /* 16x16 */ + RGN_FRAC(1,2), /* Number of tiles */ + 4, /* 4 bits per pixel */ + { RGN_FRAC(1,2)+8, RGN_FRAC(1,2), 8, 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7, + 8*16+0, 8*16+1, 8*16+2, 8*16+3, 8*16+4, 8*16+5, 8*16+6, 8*16+7 }, + { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, + 16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 }, + 8*4*16 }; -static struct GfxDecodeInfo rom_2mb_gfxdecodeinfo[] = +static struct GfxLayout spritelayout = { - { REGION_GFX1, 0, &tilelayout_16384, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_65536, 0, 64 }, - { -1 } /* end of array */ + 8,8, /* 8x8 */ + RGN_FRAC(1,2), /* Number of 8x8 sprites */ + 4, /* 4 bits per pixel */ + { RGN_FRAC(1,2)+8, RGN_FRAC(1,2), 8, 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, + 8*16 }; -static struct GfxDecodeInfo rom_3mb_gfxdecodeinfo[] = -{ - { REGION_GFX1, 0, &tilelayout_24576, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_98304, 0, 64 }, - { -1 } /* end of array */ -}; -static struct GfxDecodeInfo rom_4mb_gfxdecodeinfo[] = +static struct GfxDecodeInfo gfxdecodeinfo[] = { - { REGION_GFX1, 0, &tilelayout_32768, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_131072, 0, 64 }, + { REGION_GFX1, 0, &tilelayout, 0, 128 }, + { REGION_GFX1, 0, &spritelayout, 0, 64 }, { -1 } /* end of array */ }; -static struct GfxDecodeInfo rom_6mb_gfxdecodeinfo[] = +static struct GfxDecodeInfo gfxdecodeinfo_2[] = { - { REGION_GFX1, 0, &tilelayout_49152, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_196608, 0, 64 }, + { REGION_GFX1, 0, &tilelayout, 0, 128 }, + { REGION_GFX1, 0, &spritelayout, 0, 64 }, + { REGION_GFX2, 0, &tilelayout, 0, 128 }, + { REGION_GFX2, 0, &spritelayout, 0, 64 }, { -1 } /* end of array */ }; -static struct GfxDecodeInfo rom_8mb_gfxdecodeinfo[] = -{ - { REGION_GFX1, 0, &tilelayout_65536, 0, 128 }, - { REGION_GFX1, 0, &spritelayout_262144, 0, 64 }, - { -1 } /* end of array */ -}; static void irqhandler(int linestate) @@ -1205,7 +1633,7 @@ static struct MachineDriver machine_driver_tekipaki = tekipaki_readmem,tekipaki_writemem,0,0, toaplan2_interrupt,1 }, -#if HD64X180 +#if HD64x180 { CPU_Z80, /* HD647180 CPU actually */ 27000000/8, /* 3.37Mh ??? */ @@ -1216,19 +1644,19 @@ static struct MachineDriver machine_driver_tekipaki = }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan2, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_1mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ 0,0,0,0, @@ -1250,7 +1678,7 @@ static struct MachineDriver machine_driver_ghox = ghox_readmem,ghox_writemem,0,0, toaplan2_interrupt,1 }, -#if HD64X180 +#if HD64x180 { CPU_Z80, /* HD647180 CPU actually */ 27000000/8, /* 3.37Mh ??? */ @@ -1261,19 +1689,19 @@ static struct MachineDriver machine_driver_ghox = }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan2, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_1mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1295,22 +1723,30 @@ static struct MachineDriver machine_driver_dogyuun = dogyuun_readmem,dogyuun_writemem,0,0, toaplan2_interrupt,1 }, +#if Zx80 + { + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ + 3500000, + Zx80_readmem,Zx80_writemem,0,0, + ignore_interrupt,0 + } +#endif }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan3, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_6mb_gfxdecodeinfo, + gfxdecodeinfo_2, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_1_eof_callback, + toaplan2_1_vh_start, + toaplan2_1_vh_stop, + toaplan2_1_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1336,30 +1772,30 @@ static struct MachineDriver machine_driver_kbash = kbash_readmem,kbash_writemem,0,0, toaplan2_interrupt,1 }, -#if HD64X180 +#if Zx80 { - CPU_Z80, /* HD64x180 CPU actually */ + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ 3500000, - hd641180_readmem,hd641180_writemem,0,0, + Zx80_readmem,Zx80_writemem,0,0, ignore_interrupt,0 } #endif }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan2, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_8mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1385,22 +1821,30 @@ static struct MachineDriver machine_driver_tatsujn2 = tatsujn2_readmem,tatsujn2_writemem,0,0, toaplan2_interrupt,1 }, +#if Zx80 + { + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ + 3500000, + Zx80_readmem,Zx80_writemem,0,0, + ignore_interrupt,0 + } +#endif }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan3, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_2mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1435,19 +1879,19 @@ static struct MachineDriver machine_driver_pipibibs = }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 10, - 0, + init_pipibibs, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_2mb_gfxdecodeinfo, + gfxdecodeinfo, (128*16), (128*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ 0,0,0,0, @@ -1478,19 +1922,19 @@ static struct MachineDriver machine_driver_whoopee = }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 10, - 0, + init_pipibibs, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_2mb_gfxdecodeinfo, + gfxdecodeinfo, (128*16), (128*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ 0,0,0,0, @@ -1508,26 +1952,124 @@ static struct MachineDriver machine_driver_fixeight = { { CPU_M68000, - 16000000, + 16000000, /* Board has 16Mhz and 27Mhz Oscillators */ fixeight_readmem,fixeight_writemem,0,0, toaplan2_interrupt,1 }, +#if Zx80 + { + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ + 3500000, + Zx80_readmem,Zx80_writemem,0,0, + ignore_interrupt,0 + } +#endif }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, + init_toaplan3, + + /* video hardware */ + 32*16, 32*16, { 0, 319, 0, 239 }, + gfxdecodeinfo, + (64*16)+(64*16), (64*16)+(64*16), 0, + VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, + + /* sound hardware */ + SOUND_SUPPORTS_STEREO,0,0,0, + { + { + SOUND_YM2151, + &ym2151_interface + } + } +}; + +static struct MachineDriver machine_driver_vfive = +{ + /* basic machine hardware */ + { + { + CPU_M68000, + 10000000, /* Board has 20Mhz and 27Mhz Oscillators */ + vfive_readmem,vfive_writemem,0,0, + toaplan2_interrupt,1 + }, +#if Zx80 + { + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ + 3500000, + Zx80_readmem,Zx80_writemem,0,0, + ignore_interrupt,0 + } +#endif + }, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, + init_toaplan3, + /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_4mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, + + /* sound hardware */ + SOUND_SUPPORTS_STEREO,0,0,0, + { + { + SOUND_YM2151, + &ym2151_interface + } + } +}; + +static struct MachineDriver machine_driver_batsugun = +{ + /* basic machine hardware */ + { + { + CPU_M68000, + 16000000, /* ??? */ + batsugun_readmem,batsugun_writemem,0,0, + toaplan2_interrupt,1 + }, +#if Zx80 + { + CPU_Z80, /* Z?80 type Toaplan marked CPU ??? */ + 3500000, + Zx80_readmem,Zx80_writemem,0,0, + ignore_interrupt,0 + } +#endif + }, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 1, + init_toaplan3, + + /* video hardware */ + 32*16, 32*16, { 0, 319, 0, 239 }, + gfxdecodeinfo_2, + (64*16)+(64*16), (64*16)+(64*16), 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + + VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ + toaplan2_1_eof_callback, + toaplan2_1_vh_start, + toaplan2_1_vh_stop, + batsugun_1_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1552,19 +2094,19 @@ static struct MachineDriver machine_driver_snowbro2 = }, 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, - 0, + init_toaplan2, /* video hardware */ 32*16, 32*16, { 0, 319, 0, 239 }, - rom_3mb_gfxdecodeinfo, + gfxdecodeinfo, (64*16)+(64*16), (64*16)+(64*16), 0, VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK, /* Sprites are buffered too */ - 0, - toaplan2_vh_start, - toaplan2_vh_stop, - toaplan2_vh_screenrefresh, + toaplan2_0_eof_callback, + toaplan2_0_vh_start, + toaplan2_0_vh_stop, + toaplan2_0_vh_screenrefresh, /* sound hardware */ SOUND_SUPPORTS_STEREO,0,0,0, @@ -1588,91 +2130,108 @@ static struct MachineDriver machine_driver_snowbro2 = ***************************************************************************/ ROM_START( tekipaki ) - ROM_REGION( 0x20000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_EVEN( "tp020-1.bin", 0x00000, 0x10000, 0xd8420bd5 ) - ROM_LOAD_ODD ( "tp020-2.bin", 0x00000, 0x10000, 0x7222de8e ) + ROM_REGION( 0x020000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_EVEN( "tp020-1.bin", 0x000000, 0x010000, 0xd8420bd5 ) + ROM_LOAD_ODD ( "tp020-2.bin", 0x000000, 0x010000, 0x7222de8e ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound 647180 code */ +#if HD64x180 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound 647180 code */ /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */ - ROM_LOAD( "hd647180.020", 0x00000, 0x08000, 0x00000000 ) + ROM_LOAD( "hd647180.020", 0x00000, 0x08000, 0x00000000 ) +#endif ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "tp020-4.bin", 0x000000, 0x80000, 0x3ebbe41e ) - ROM_LOAD( "tp020-3.bin", 0x080000, 0x80000, 0x2d5e2201 ) + ROM_LOAD( "tp020-4.bin", 0x000000, 0x080000, 0x3ebbe41e ) + ROM_LOAD( "tp020-3.bin", 0x080000, 0x080000, 0x2d5e2201 ) ROM_END ROM_START( ghox ) - ROM_REGION( 0x40000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_EVEN( "tp021-01.u10", 0x00000, 0x20000, 0x9e56ac67 ) - ROM_LOAD_ODD ( "tp021-02.u11", 0x00000, 0x20000, 0x15cac60f ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_EVEN( "tp021-01.u10", 0x000000, 0x020000, 0x9e56ac67 ) + ROM_LOAD_ODD ( "tp021-02.u11", 0x000000, 0x020000, 0x15cac60f ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound 647180 code */ +#if HD64x180 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound 647180 code */ /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */ - ROM_LOAD( "hd647180.021", 0x00000, 0x08000, 0x00000000 ) + ROM_LOAD( "hd647180.021", 0x00000, 0x08000, 0x00000000 ) +#endif ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "tp021-03.u36", 0x000000, 0x80000, 0xa15d8e9d ) - ROM_LOAD( "tp021-04.u37", 0x080000, 0x80000, 0x26ed1c9a ) + ROM_LOAD( "tp021-03.u36", 0x000000, 0x080000, 0xa15d8e9d ) + ROM_LOAD( "tp021-04.u37", 0x080000, 0x080000, 0x26ed1c9a ) ROM_END ROM_START( dogyuun ) ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_WIDE( "tp022_1.r16", 0x00000, 0x80000, 0x72f18907 ) + ROM_LOAD_WIDE( "tp022_1.r16", 0x000000, 0x080000, 0x72f18907 ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound CPU code */ - /* sound CPU is a Toaplan marked chip ??? */ - ROM_LOAD( "tp022.mcu", 0x00000, 0x08000, 0x00000000 ) +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Secondary CPU code */ + /* Secondary CPU is a Toaplan marked chip ??? */ +// ROM_LOAD( "tp022.mcu", 0x00000, 0x08000, 0x00000000 ) +#endif + + ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD_GFX_SWAP( "tp022_3.r16", 0x000000, 0x100000, 0x191b595f ) + ROM_LOAD_GFX_SWAP( "tp022_4.r16", 0x100000, 0x100000, 0xd58d29ca ) - ROM_REGION( 0x600000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD_GFX_SWAP( "tp022_3.r16", 0x000000, 0x100000, 0x191b595f ) - ROM_LOAD_GFX_SWAP( "tp022_5.r16", 0x100000, 0x200000, 0xd4c1db45 ) - ROM_LOAD_GFX_SWAP( "tp022_4.r16", 0x300000, 0x100000, 0xd58d29ca ) - ROM_LOAD_GFX_SWAP( "tp022_6.r16", 0x400000, 0x200000, 0xd48dc74f ) + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD_GFX_SWAP( "tp022_5.r16", 0x000000, 0x200000, 0xd4c1db45 ) + ROM_LOAD_GFX_SWAP( "tp022_6.r16", 0x200000, 0x200000, 0xd48dc74f ) - ROM_REGION( 0x40000, REGION_USER1 ) /* what is this */ - ROM_LOAD( "tp022_2.rom", 0x000000, 0x40000, 0x043271b3 ) + ROM_REGION( 0x40000, REGION_SOUND1 ) /* ADPCM Samples */ + ROM_LOAD( "tp022_2.rom", 0x00000, 0x40000, 0x043271b3 ) ROM_END ROM_START( kbash ) ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_WIDE_SWAP( "kbash01.bin", 0x00000, 0x80000, 0x2965f81d ) - - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound HD64x180 code */ - ROM_LOAD( "kbash02.bin", 0x000000, 0x8000, 0x4cd882a1 ) + ROM_LOAD_WIDE_SWAP( "kbash01.bin", 0x000000, 0x080000, 0x2965f81d ) + + /* Secondary CPU is a Toaplan marked chip, (TS-004-Dash TOA PLAN) */ + /* Its a Z?80 of some sort - 94 pin chip. */ +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z?80 code */ +#else + ROM_REGION( 0x8000, REGION_USER1 ) +#endif + ROM_LOAD( "kbash02.bin", 0x00200, 0x07e00, 0x4cd882a1 ) + ROM_CONTINUE( 0x00000, 0x00200 ) ROM_REGION( 0x800000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "kbash03.bin", 0x000000, 0x200000, 0x32ad508b ) - ROM_LOAD( "kbash05.bin", 0x200000, 0x200000, 0xb84c90eb ) - ROM_LOAD( "kbash04.bin", 0x400000, 0x200000, 0xe493c077 ) - ROM_LOAD( "kbash06.bin", 0x600000, 0x200000, 0x9084b50a ) + ROM_LOAD( "kbash03.bin", 0x000000, 0x200000, 0x32ad508b ) + ROM_LOAD( "kbash05.bin", 0x200000, 0x200000, 0xb84c90eb ) + ROM_LOAD( "kbash04.bin", 0x400000, 0x200000, 0xe493c077 ) + ROM_LOAD( "kbash06.bin", 0x600000, 0x200000, 0x9084b50a ) - ROM_REGION( 0x40000, REGION_USER1 ) /* what is this */ - ROM_LOAD( "kbash07.bin", 0x000000, 0x40000, 0x3732318f ) + ROM_REGION( 0x40000, REGION_SOUND1 ) /* ADPCM Samples */ + ROM_LOAD( "kbash07.bin", 0x00000, 0x40000, 0x3732318f ) ROM_END ROM_START( tatsujn2 ) ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_WIDE( "tsj2rom1.bin", 0x00000, 0x80000, 0xf5cfe6ee ) + ROM_LOAD_WIDE( "tsj2rom1.bin", 0x000000, 0x080000, 0xf5cfe6ee ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound CPU code */ - /* sound CPU is a Toaplan marked chip ??? */ -// ROM_LOAD( "tp024.mcu", 0x00000, 0x08000, 0x00000000 ) +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Secondary CPU code */ + /* Secondary CPU is a Toaplan marked chip ??? */ +// ROM_LOAD( "tp024.mcu", 0x00000, 0x08000, 0x00000000 ) +#endif ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "tsj2rom4.bin", 0x000000, 0x100000, 0x805c449e ) ROM_LOAD( "tsj2rom3.bin", 0x100000, 0x100000, 0x47587164 ) - ROM_REGION( 0x80000, REGION_USER1 ) /* what is this */ + ROM_REGION( 0x80000, REGION_SOUND1 ) /* ADPCM Samples */ ROM_LOAD( "tsj2rom2.bin", 0x00000, 0x80000, 0xf2f6cae4 ) ROM_END ROM_START( pipibibs ) - ROM_REGION( 0x40000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_EVEN( "tp025-1.bin", 0x00000, 0x20000, 0xb2ea8659 ) - ROM_LOAD_ODD ( "tp025-2.bin", 0x00000, 0x20000, 0xdc53b939 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_EVEN( "tp025-1.bin", 0x000000, 0x020000, 0xb2ea8659 ) + ROM_LOAD_ODD ( "tp025-2.bin", 0x000000, 0x020000, 0xdc53b939 ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ - ROM_LOAD( "tp025-5.bin", 0x0000, 0x8000, 0xbf8ffde5 ) + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ + ROM_LOAD( "tp025-5.bin", 0x0000, 0x8000, 0xbf8ffde5 ) ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "tp025-4.bin", 0x000000, 0x100000, 0xab97f744 ) @@ -1680,14 +2239,14 @@ ROM_START( pipibibs ) ROM_END ROM_START( whoopee ) - ROM_REGION( 0x40000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_EVEN( "whoopee.1", 0x00000, 0x20000, 0x28882e7e ) - ROM_LOAD_ODD ( "whoopee.2", 0x00000, 0x20000, 0x6796f133 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_EVEN( "whoopee.1", 0x000000, 0x020000, 0x28882e7e ) + ROM_LOAD_ODD ( "whoopee.2", 0x000000, 0x020000, 0x6796f133 ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */ /* use the Z80 version from the bootleg Pipi & Bibis set for now */ - ROM_LOAD( "hd647180.025", 0x0000, 0x04000, BADCRC( 0x7670d612 ) ) + ROM_LOAD( "hd647180.025", 0x00000, 0x08000, BADCRC( 0x101c0358 ) ) ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) ROM_LOAD( "tp025-4.bin", 0x000000, 0x100000, 0xab97f744 ) @@ -1695,74 +2254,116 @@ ROM_START( whoopee ) ROM_END ROM_START( pipibibi ) - ROM_REGION( 0x40000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_EVEN( "ppbb05.bin", 0x00000, 0x20000, 0x3d51133c ) - ROM_LOAD_ODD ( "ppbb06.bin", 0x00000, 0x20000, 0x14c92515 ) + ROM_REGION( 0x040000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_EVEN( "ppbb05.bin", 0x000000, 0x020000, 0x3d51133c ) + ROM_LOAD_ODD ( "ppbb06.bin", 0x000000, 0x020000, 0x14c92515 ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ - ROM_LOAD( "ppbb08.bin", 0x0000, 0x04000, 0x7670d612 ) + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound Z80 code */ + ROM_LOAD( "ppbb08.bin", 0x0000, 0x8000, 0x101c0358 ) ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD_GFX_EVEN( "ppbb02.bin", 0x100000, 0x080000, 0x8bfcdf87 ) - ROM_LOAD_GFX_ODD ( "ppbb01.bin", 0x100000, 0x080000, 0x0fcae44b ) ROM_LOAD_GFX_EVEN( "ppbb03.bin", 0x000000, 0x080000, 0xabdd2b8b ) ROM_LOAD_GFX_ODD ( "ppbb04.bin", 0x000000, 0x080000, 0x70faa734 ) + ROM_LOAD_GFX_EVEN( "ppbb02.bin", 0x100000, 0x080000, 0x8bfcdf87 ) + ROM_LOAD_GFX_ODD ( "ppbb01.bin", 0x100000, 0x080000, 0x0fcae44b ) - ROM_REGION( 0x08000, REGION_USER1 ) /* what is this */ - ROM_LOAD( "ppbb07.bin", 0x0000, 0x08000, 0x456dd16e ) + ROM_REGION( 0x8000, REGION_USER1 ) /* ???? */ + ROM_LOAD( "ppbb07.bin", 0x0000, 0x8000, 0x456dd16e ) ROM_END ROM_START( fixeight ) ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_WIDE_SWAP( "tp026.01", 0x00000, 0x80000, 0xf7b1746a ) + ROM_LOAD_WIDE_SWAP( "tp-026-1", 0x000000, 0x080000, 0xf7b1746a ) - ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound CPU code */ - /* sound CPU is a Toaplan marked chip, (TS-001-Turbo TOA PLAN) */ - ROM_LOAD( "tp026.mcu", 0x00000, 0x08000, 0x00000000 ) +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Secondary CPU code */ + /* Secondary CPU is a Toaplan marked chip, (TS-001-Turbo TOA PLAN) */ + /* Its a Z?80 of some sort - 94 pin chip. */ +// ROM_LOAD( "tp-026.mcu", 0x0000, 0x8000, 0x00000000 ) +#endif ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "tp026.03", 0x000000, 0x200000, 0xe5578d98 ) - ROM_LOAD( "tp026.04", 0x200000, 0x200000, 0xb760cb53 ) + ROM_LOAD( "tp-026-3", 0x000000, 0x200000, 0xe5578d98 ) + ROM_LOAD( "tp-026-4", 0x200000, 0x200000, 0xb760cb53 ) + + ROM_REGION( 0x40000, REGION_SOUND1 ) /* ADPCM Samples */ + ROM_LOAD( "tp-026-2", 0x00000, 0x40000, 0x85063f1f ) + + ROM_REGION( 0x80, REGION_USER1 ) + /* Serial EEPROM (93C45) connected to Secondary CPU */ + ROM_LOAD( "93c45.u21", 0x00, 0x80, 0x40d75df0 ) +ROM_END + +ROM_START( vfive ) + ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_WIDE( "tp027_01.bin", 0x000000, 0x080000, 0x98dd1919 ) + +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound CPU code */ + /* Secondary CPU is a Toaplan marked chip, (TS-007-Spy TOA PLAN) */ + /* Its a Z?80 of some sort - 94 pin chip. */ +// ROM_LOAD( "tp027.mcu", 0x8000, 0x8000, 0x00000000 ) +#endif + + ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "tp027_02.bin", 0x000000, 0x100000, 0x877b45e8 ) + ROM_LOAD( "tp027_03.bin", 0x100000, 0x100000, 0xb1fc6362 ) +ROM_END + +ROM_START( batsugun ) + ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ + ROM_LOAD_WIDE( "tp030_1.bin", 0x000000, 0x080000, 0xe0cd772b ) + +#if Zx80 + ROM_REGION( 0x10000, REGION_CPU2 ) /* Sound CPU code */ + /* Secondary CPU is a Toaplan marked chip */ + /* Its a Z?80 of some sort - 94 pin chip. */ +// ROM_LOAD( "tp030.mcu", 0x8000, 0x8000, 0x00000000 ) +#endif + + ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "tp030_5.bin", 0x000000, 0x100000, 0xbcf5ba05 ) + ROM_LOAD( "tp030_6.bin", 0x100000, 0x100000, 0x0666fecd ) + + ROM_REGION( 0x400000, REGION_GFX2 | REGIONFLAG_DISPOSE ) + ROM_LOAD( "tp030_3.bin", 0x000000, 0x200000, 0x082e6bb7 ) + ROM_LOAD( "tp030_4.bin", 0x200000, 0x200000, 0x11ee9128 ) - ROM_REGION( 0x80000, REGION_USER1 ) /* what is this */ - ROM_LOAD( "tp026.02", 0x00000, 0x80000, 0x76fab9f4 ) + ROM_REGION( 0x40000, REGION_SOUND1 ) /* ADPCM Samples */ + ROM_LOAD( "tp030_2.bin", 0x00000, 0x40000, 0x276146f5 ) ROM_END ROM_START( snowbro2 ) ROM_REGION( 0x080000, REGION_CPU1 ) /* Main 68K code */ - ROM_LOAD_WIDE_SWAP( "pro-4", 0x00000, 0x80000, 0x4c7ee341 ) + ROM_LOAD_WIDE_SWAP( "pro-4", 0x000000, 0x080000, 0x4c7ee341 ) ROM_REGION( 0x300000, REGION_GFX1 | REGIONFLAG_DISPOSE ) - ROM_LOAD( "rom2-l", 0x000000, 0x100000, 0xe9d366a9 ) - ROM_LOAD( "rom2-h", 0x100000, 0x080000, 0x9aab7a62 ) - ROM_LOAD( "rom3-l", 0x180000, 0x100000, 0xeb06e332 ) - ROM_LOAD( "rom3-h", 0x280000, 0x080000, 0xdf4a952a ) + ROM_LOAD( "rom2-l", 0x000000, 0x100000, 0xe9d366a9 ) + ROM_LOAD( "rom2-h", 0x100000, 0x080000, 0x9aab7a62 ) + ROM_LOAD( "rom3-l", 0x180000, 0x100000, 0xeb06e332 ) + ROM_LOAD( "rom3-h", 0x280000, 0x080000, 0xdf4a952a ) - ROM_REGION( 0x80000, REGION_USER1 ) /* what is this */ - ROM_LOAD( "rom4", 0x000000, 0x80000, 0x638f341e ) + ROM_REGION( 0x80000, REGION_SOUND1 ) /* ADPCM Samples */ + ROM_LOAD( "rom4", 0x00000, 0x80000, 0x638f341e ) ROM_END -/* -Toaplan board game numbers: -Teki Paki TP-020 -Ghox TP-021 -Dogyuun TP-022 -Knuckle Bash TP-023 -Tatsujin 2 TP-024 -Pipi & Bibis TP-025 -FixEight TP-026 -Snow Bros. 2 TP-??? -*/ -GAMEX( 1991, tekipaki, 0, tekipaki, tekipaki, toaplan2, ROT0, "Toaplan", "Teki Paki", GAME_NO_SOUND ) -GAMEX( 1991, ghox, 0, ghox, ghox, toaplan2, ROT270, "Toaplan", "Ghox", GAME_NOT_WORKING ) -GAMEX( 1992, dogyuun, 0, dogyuun, tekipaki, toaplan3, ROT270, "Toaplan", "Dogyuun", GAME_NOT_WORKING ) -GAMEX( 1993, kbash, 0, kbash, kbash, toaplan2, ROT0_16BIT, "Toaplan", "Knuckle Bash", GAME_NO_SOUND ) -GAMEX( 1992, tatsujn2, 0, tatsujn2, tekipaki, toaplan3, ROT270, "Toaplan", "Truxton II / Tatsujin II (Japan)", GAME_NOT_WORKING ) -GAME ( 1991, pipibibs, 0, pipibibs, pipibibs, pipibibs, ROT0, "Toaplan", "Pipi & Bibis / Whoopee (Japan)" ) -GAMEX( 1991, pipibibi, pipibibs, pipibibs, pipibibs, pipibibs, ROT0, "bootleg ?", "Pipi & Bibis / Whoopee (Japan) [bootleg ?]", GAME_NOT_WORKING ) - /* Whoopee machine to be changed to Teki Paki when hd647180 is dumped */ -GAME ( 1991, whoopee, pipibibs, whoopee, whoopee, pipibibs, ROT0, "Toaplan", "Whoopee (Japan) / Pipi & Bibis (World)" ) -GAMEX( 1992, fixeight, 0, fixeight, tekipaki, toaplan3, ROT270, "Toaplan", "FixEight", GAME_NOT_WORKING ) -GAME ( 1994, snowbro2, 0, snowbro2, snowbro2, snowbro2, ROT0_16BIT, "[Toaplan] Hanafram", "Snow Bros. 2 - With New Elves" ) +/* The following is in order of Toaplan Board/game numbers */ +/* See list at top of file */ +/* Whoopee machine to be changed to Teki Paki when (if) HD647180 is dumped */ + +/* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME FLAGS ) */ +GAMEX( 1991, tekipaki, 0, tekipaki, tekipaki, toaplan2, ROT0, "Toaplan", "Teki Paki", GAME_NO_SOUND ) +GAMEX( 1991, ghox, 0, ghox, ghox, toaplan2, ROT270, "Toaplan", "Ghox", GAME_NO_SOUND ) +GAMEX( 1991, dogyuun, 0, dogyuun, dogyuun, toaplan3, ROT270, "Toaplan", "Dogyuun", GAME_NO_SOUND ) +GAMEX( 1993, kbash, 0, kbash, kbash, toaplan2, ROT0_16BIT, "Toaplan", "Knuckle Bash", GAME_NO_SOUND ) +GAMEX( 1992, tatsujn2, 0, tatsujn2, vfive, toaplan3, ROT270, "Toaplan", "Truxton II / Tatsujin II (Japan)", GAME_NOT_WORKING ) +GAME ( 1991, pipibibs, 0, pipibibs, pipibibs, pipibibs, ROT0, "Toaplan", "Pipi & Bibis / Whoopee (Japan)" ) +GAMEX( 1991, pipibibi, pipibibs, pipibibs, pipibibs, pipibibs, ROT0, "bootleg?", "Pipi & Bibis / Whoopee (Japan) [bootleg ?]", GAME_NOT_WORKING ) +GAME ( 1991, whoopee, pipibibs, whoopee, whoopee, pipibibs, ROT0, "Toaplan", "Whoopee (Japan) / Pipi & Bibis (World)" ) +GAMEX( 1992, fixeight, 0, fixeight, vfive, toaplan3, ROT270, "Toaplan", "FixEight", GAME_NOT_WORKING ) +GAMEX( 1993, vfive, 0, vfive, vfive, toaplan3, ROT270, "Toaplan", "V-Five", GAME_NO_SOUND ) +GAMEX( 1993, batsugun, 0, batsugun, batsugun, toaplan3, ROT270_16BIT, "Toaplan", "Batsugun", GAME_NO_SOUND ) +GAME ( 1994, snowbro2, 0, snowbro2, snowbro2, snowbro2, ROT0_16BIT, "[Toaplan] Hanafram", "Snow Bros. 2 - With New Elves" ) + diff --git a/src/drivers/toki.c b/src/drivers/toki.c index b80025b78..45fbeb10a 100644 --- a/src/drivers/toki.c +++ b/src/drivers/toki.c @@ -683,8 +683,8 @@ void init_tokib(void) -GAMEX(1989, toki, 0, toki, toki, 0, ROT0, "Tad", "Toki (set 1)", GAME_NOT_WORKING ) -GAMEX(1989, toki2, toki, toki, toki, 0, ROT0, "Tad", "Toki (set 2)", GAME_NOT_WORKING ) -GAMEX(1989, toki3, toki, toki, toki, 0, ROT0, "Tad", "Toki (set 3)", GAME_NOT_WORKING ) -GAMEX(1989, tokiu, toki, toki, toki, 0, ROT0, "Tad (Fabtek license)", "Toki (US)", GAME_NOT_WORKING ) -GAME( 1989, tokib, toki, tokib, toki, tokib, ROT0, "bootleg", "Toki (bootleg)" ) +GAMEX( 1989, toki, 0, toki, toki, 0, ROT0, "Tad", "Toki (set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, toki2, toki, toki, toki, 0, ROT0, "Tad", "Toki (set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, toki3, toki, toki, toki, 0, ROT0, "Tad", "Toki (set 3)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, tokiu, toki, toki, toki, 0, ROT0, "Tad (Fabtek license)", "Toki (US)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) +GAMEX( 1989, tokib, toki, tokib, toki, tokib, ROT0, "bootleg", "Toki (bootleg)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/tp84.c b/src/drivers/tp84.c index 9f786d9ca..0bbba14b9 100644 --- a/src/drivers/tp84.c +++ b/src/drivers/tp84.c @@ -496,5 +496,5 @@ ROM_END -GAME( 1984, tp84, 0, tp84, tp84, 0, ROT90, "Konami", "Time Pilot '84 (set 1)" ) -GAME( 1984, tp84a, tp84, tp84, tp84, 0, ROT90, "Konami", "Time Pilot '84 (set 2)" ) +GAMEX( 1984, tp84, 0, tp84, tp84, 0, ROT90, "Konami", "Time Pilot '84 (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1984, tp84a, tp84, tp84, tp84, 0, ROT90, "Konami", "Time Pilot '84 (set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/tumblep.c b/src/drivers/tumblep.c index d958ee5c7..5910e47f3 100644 --- a/src/drivers/tumblep.c +++ b/src/drivers/tumblep.c @@ -8,7 +8,7 @@ Bootleg sound is not quite correct yet (Nothing on bootleg 2). - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -358,7 +358,7 @@ static struct MachineDriver machine_driver_tumblepop = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, 0, @@ -400,7 +400,7 @@ static struct MachineDriver machine_driver_tumblepb = m68_level6_irq,1 }, }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 58, 529, 1, 0, diff --git a/src/drivers/turbo.c b/src/drivers/turbo.c index 04a8f9bac..7e6156fbb 100644 --- a/src/drivers/turbo.c +++ b/src/drivers/turbo.c @@ -706,6 +706,6 @@ static void init_decode_turbo(void) * Game drivers *********************************************************************/ -GAME( 1981, turbo, 0, turbo, turbo, turbo, ROT270, "Sega", "Turbo" ) -GAME( 1981, turboa, turbo, turbo, turbo, decode_turbo, ROT270, "Sega", "Turbo (encrypted set 1)" ) -GAME( 1981, turbob, turbo, turbo, turbo, decode_turbo, ROT270, "Sega", "Turbo (encrypted set 2)" ) +GAMEX( 1981, turbo, 0, turbo, turbo, turbo, ROT270, "Sega", "Turbo", GAME_NO_COCKTAIL ) +GAMEX( 1981, turboa, turbo, turbo, turbo, decode_turbo, ROT270, "Sega", "Turbo (encrypted set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1981, turbob, turbo, turbo, turbo, decode_turbo, ROT270, "Sega", "Turbo (encrypted set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/twin16.c b/src/drivers/twin16.c index d23fee21f..f4e3e1975 100644 --- a/src/drivers/twin16.c +++ b/src/drivers/twin16.c @@ -1071,7 +1071,7 @@ static struct YM2151interface ym2151_interface = { 1, /* 1 chip */ 7159160/2, /* 3.58 MHZ ? */ - { YM3012_VOL(80,MIXER_PAN_LEFT,80,MIXER_PAN_RIGHT) }, + { YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }, { 0 } }; @@ -1085,7 +1085,7 @@ static struct K007232_interface k007232_interface = { 1, /* number of chips */ { REGION_SOUND1, REGION_SOUND1 }, /* memory regions */ - { K007232_VOL(35,MIXER_PAN_CENTER,35,MIXER_PAN_CENTER) }, /* volume */ + { K007232_VOL(20,MIXER_PAN_CENTER,20,MIXER_PAN_CENTER) }, /* volume */ { volume_callback } /* external port callback */ }; @@ -1093,7 +1093,7 @@ static struct UPD7759_interface upd7759_interface = { 1, /* number of chips */ UPD7759_STANDARD_CLOCK, - { 30 }, /* volume */ + { 20 }, /* volume */ { REGION_SOUND2 }, /* memory region */ UPD7759_STANDALONE_MODE, /* chip mode */ {0} diff --git a/src/drivers/ultraman.c b/src/drivers/ultraman.c index ba2ee111b..f7089bf82 100644 --- a/src/drivers/ultraman.c +++ b/src/drivers/ultraman.c @@ -226,7 +226,6 @@ INPUT_PORTS_START( ultraman ) PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 5C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) @@ -239,6 +238,7 @@ INPUT_PORTS_START( ultraman ) PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) @@ -271,18 +271,17 @@ INPUT_PORTS_START( ultraman ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x10, "Easy" ) + PORT_DIPSETTING( 0x30, "Normal" ) + PORT_DIPSETTING( 0x20, "Difficult" ) + PORT_DIPSETTING( 0x00, "Very Difficult" ) + PORT_DIPNAME( 0x40, 0x40, "Upright Controls" ) + PORT_DIPSETTING( 0x40, "Single" ) + PORT_DIPSETTING( 0x00, "Dual" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) INPUT_PORTS_END @@ -290,8 +289,8 @@ INPUT_PORTS_END static struct YM2151interface ym2151_interface = { 1, - 24000000/8, /* 3 MHz? */ - { YM3012_VOL(50,MIXER_PAN_LEFT,50,MIXER_PAN_RIGHT) }, + 24000000/6, /* 4 MHz (tempo verified against real board) */ + { YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) }, { 0 }, }; @@ -317,7 +316,7 @@ static struct MachineDriver machine_driver_ultraman = }, { CPU_Z80, - 24000000/8, /* 3 MHz? */ + 24000000/6, /* 4 MHz? */ ultraman_readmem_sound, ultraman_writemem_sound,0,ultraman_writeport_sound, ignore_interrupt,1 /* NMI triggered by the m68000 */ } diff --git a/src/drivers/vaportra.c b/src/drivers/vaportra.c index 42d4f23da..36ec8645b 100644 --- a/src/drivers/vaportra.c +++ b/src/drivers/vaportra.c @@ -5,7 +5,7 @@ A 'World' version of Vapor Trail also exists but isn't yet dumped. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ @@ -350,7 +350,7 @@ static struct MachineDriver machine_driver_vaportra = ignore_interrupt,0 } }, - 58, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 58, 529, /* frames per second, vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ 0, diff --git a/src/drivers/vastar.c b/src/drivers/vastar.c index f88394b79..0d05339e0 100644 --- a/src/drivers/vastar.c +++ b/src/drivers/vastar.c @@ -453,5 +453,5 @@ ROM_END -GAME( 1983, vastar, 0, vastar, vastar, 0, ROT90, "Sesame Japan", "Vastar (set 1)" ) -GAME( 1983, vastar2, vastar, vastar, vastar, 0, ROT90, "Sesame Japan", "Vastar (set 2)" ) +GAMEX( 1983, vastar, 0, vastar, vastar, 0, ROT90, "Sesame Japan", "Vastar (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1983, vastar2, vastar, vastar, vastar, 0, ROT90, "Sesame Japan", "Vastar (set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/vigilant.c b/src/drivers/vigilant.c index 0583aae96..874d13c82 100644 --- a/src/drivers/vigilant.c +++ b/src/drivers/vigilant.c @@ -655,7 +655,7 @@ ROM_END -GAME( 1988, vigilant, 0, vigilant, vigilant, 0, ROT0, "Irem", "Vigilante (World)" ) -GAME( 1988, vigilntu, vigilant, vigilant, vigilant, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US)" ) -GAME( 1988, vigilntj, vigilant, vigilant, vigilant, 0, ROT0, "Irem", "Vigilante (Japan)" ) -GAME( 1988, kikcubic, 0, kikcubic, kikcubic, 0, ROT0, "Irem", "Meikyu Jima (Japan)" ) /* English title is Kickle Cubicle */ +GAMEX( 1988, vigilant, 0, vigilant, vigilant, 0, ROT0, "Irem", "Vigilante (World)", GAME_NO_COCKTAIL ) +GAMEX( 1988, vigilntu, vigilant, vigilant, vigilant, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US)", GAME_NO_COCKTAIL ) +GAMEX( 1988, vigilntj, vigilant, vigilant, vigilant, 0, ROT0, "Irem", "Vigilante (Japan)", GAME_NO_COCKTAIL ) +GAMEX( 1988, kikcubic, 0, kikcubic, kikcubic, 0, ROT0, "Irem", "Meikyu Jima (Japan)", GAME_NO_COCKTAIL ) /* English title is Kickle Cubicle */ diff --git a/src/drivers/vulgus.c b/src/drivers/vulgus.c index f61a7b841..90ece820e 100644 --- a/src/drivers/vulgus.c +++ b/src/drivers/vulgus.c @@ -436,6 +436,6 @@ ROM_END -GAME( 1984, vulgus, 0, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (set 1)" ) -GAME( 1984, vulgus2, vulgus, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (set 2)" ) -GAME( 1984, vulgusj, vulgus, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (Japan?)" ) +GAMEX( 1984, vulgus, 0, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1984, vulgus2, vulgus, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1984, vulgusj, vulgus, vulgus, vulgus, 0, ROT270, "Capcom", "Vulgus (Japan?)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/warpwarp.c b/src/drivers/warpwarp.c index bd049241f..fb6adc1af 100644 --- a/src/drivers/warpwarp.c +++ b/src/drivers/warpwarp.c @@ -451,8 +451,8 @@ ROM_END -GAME( 1979, bombbee, 0, bombbee, bombbee, 0, ROT90, "Namco", "Bomb Bee" ) -GAME( 1979, cutieq, 0, bombbee, cutieq, 0, ROT90, "Namco", "Cutie Q" ) -GAME( 1981, warpwarp, 0, warpwarp, warpwarp, 0, ROT90, "Namco", "Warp & Warp" ) -GAME( 1981, warpwarr, warpwarp, warpwarp, warpwarr, 0, ROT90, "[Namco] (Rock-ola license)", "Warp Warp (Rock-ola set 1)" ) -GAME( 1981, warpwar2, warpwarp, warpwarp, warpwarr, 0, ROT90, "[Namco] (Rock-ola license)", "Warp Warp (Rock-ola set 2)" ) +GAMEX( 1979, bombbee, 0, bombbee, bombbee, 0, ROT90, "Namco", "Bomb Bee", GAME_NO_COCKTAIL ) +GAMEX( 1979, cutieq, 0, bombbee, cutieq, 0, ROT90, "Namco", "Cutie Q", GAME_NO_COCKTAIL ) +GAMEX( 1981, warpwarp, 0, warpwarp, warpwarp, 0, ROT90, "Namco", "Warp & Warp", GAME_NO_COCKTAIL ) +GAMEX( 1981, warpwarr, warpwarp, warpwarp, warpwarr, 0, ROT90, "[Namco] (Rock-ola license)", "Warp Warp (Rock-ola set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1981, warpwar2, warpwarp, warpwarp, warpwarr, 0, ROT90, "[Namco] (Rock-ola license)", "Warp Warp (Rock-ola set 2)", GAME_NO_COCKTAIL ) diff --git a/src/drivers/wc90.c b/src/drivers/wc90.c index 270d90b6b..2d01b131e 100644 --- a/src/drivers/wc90.c +++ b/src/drivers/wc90.c @@ -451,4 +451,4 @@ ROM_START( wc90 ) ROM_END -GAMEX( 1989, wc90, 0, wc90, wc90, 0, ROT0, "Tecmo", "World Cup 90", GAME_IMPERFECT_SOUND ) +GAMEX( 1989, wc90, 0, wc90, wc90, 0, ROT0, "Tecmo", "World Cup 90", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/wc90b.c b/src/drivers/wc90b.c index 28278d835..622d383c8 100644 --- a/src/drivers/wc90b.c +++ b/src/drivers/wc90b.c @@ -477,4 +477,4 @@ void init_wc90b(void) } -GAME( 1989, wc90b, wc90, wc90b, wc90b, wc90b, ROT0, "bootleg", "Euro League" ) +GAMEX( 1989, wc90b, wc90, wc90b, wc90b, wc90b, ROT0, "bootleg", "Euro League", GAME_NO_COCKTAIL ) diff --git a/src/drivers/williams.c b/src/drivers/williams.c index fc3360671..0c051f507 100644 --- a/src/drivers/williams.c +++ b/src/drivers/williams.c @@ -2542,5 +2542,5 @@ GAME( 1983, blaster, 0, blaster, blaster, blaster, ROT0, "Williams" GAME( 1983, mysticm, 0, williams2,mysticm, mysticm, ROT0, "Williams", "Mystic Marathon" ) GAME( 1984, tshoot, 0, williams2,tshoot, tshoot, ROT0, "Williams", "Turkey Shoot" ) -GAME( 1984, inferno, 0, williams2,inferno, inferno, ROT0, "Williams", "Inferno" ) +GAMEX(1984, inferno, 0, williams2,inferno, inferno, ROT0, "Williams", "Inferno", GAME_IMPERFECT_SOUND ) GAME( 1986, joust2, 0, joust2, joust2, joust2, ROT270, "Williams", "Joust 2 - Survival of the Fittest (set 1)" ) diff --git a/src/drivers/wiz.c b/src/drivers/wiz.c index f7491950d..7fd070607 100644 --- a/src/drivers/wiz.c +++ b/src/drivers/wiz.c @@ -69,6 +69,10 @@ I/O write: - Verify/Fix colors - Sprite banking in Wiz. I have a hack in wiz_vh_screenrefresh +- background noise in scion (but not scionc). Note that the sound program is + almost identical, except for three patches affecting noise period, noise + channel C enable and channel C volume. So it looks just like a bug in the + original (weird), or some strange form of protection. ***************************************************************************/ diff --git a/src/drivers/wow.c b/src/drivers/wow.c index 9558bb75b..7d9def1d3 100644 --- a/src/drivers/wow.c +++ b/src/drivers/wow.c @@ -1328,11 +1328,10 @@ ROM_END -GAME( 1980, wow, 0, wow, wow, 0, ROT0, "Midway", "Wizard of Wor" ) -GAME( 1981, robby, 0, robby, robby, 0, ROT0, "Bally Midway", "Robby Roto" ) -GAME( 1981, gorf, 0, gorf, gorf, 0, ROT270, "Midway", "Gorf" ) -GAME( 1981, gorfpgm1, gorf, gorf, gorf, 0, ROT270, "Midway", "Gorf (Program 1)" ) -GAME( 1980, spacezap, 0, spacezap, spacezap, 0, ROT0, "Midway", "Space Zap" ) -GAME( 1978, seawolf2, 0, seawolf, seawolf2, 0, ROT0, "Midway", "Sea Wolf II" ) -GAMEX(1980, ebases, 0, ebases, ebases, 0, ROT0, "Midway", "Extra Bases", GAME_WRONG_COLORS ) - +GAMEX( 1980, wow, 0, wow, wow, 0, ROT0, "Midway", "Wizard of Wor", GAME_IMPERFECT_COLORS ) +GAMEX( 1981, robby, 0, robby, robby, 0, ROT0, "Bally Midway", "Robby Roto", GAME_IMPERFECT_COLORS ) +GAMEX( 1981, gorf, 0, gorf, gorf, 0, ROT270, "Midway", "Gorf", GAME_IMPERFECT_COLORS ) +GAMEX( 1981, gorfpgm1, gorf, gorf, gorf, 0, ROT270, "Midway", "Gorf (Program 1)", GAME_IMPERFECT_COLORS ) +GAMEX( 1980, spacezap, 0, spacezap, spacezap, 0, ROT0, "Midway", "Space Zap", GAME_IMPERFECT_COLORS ) +GAMEX( 1978, seawolf2, 0, seawolf, seawolf2, 0, ROT0, "Midway", "Sea Wolf II", GAME_IMPERFECT_COLORS ) +GAMEX( 1980, ebases, 0, ebases, ebases, 0, ROT0, "Midway", "Extra Bases", GAME_WRONG_COLORS ) diff --git a/src/drivers/z80bw.c b/src/drivers/z80bw.c index 3d93ff4de..d14da387e 100644 --- a/src/drivers/z80bw.c +++ b/src/drivers/z80bw.c @@ -37,15 +37,20 @@ I/O ports: int astinvad_interrupt(void); -void z80bw_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); -void astinvad_videoram_w(int offset,int data); -void spaceint_videoram_w (int offset,int data); -void astinvad_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); -void spaceint_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); +int invaders_vh_start(void); +void invaders_vh_stop(void); + +void astinvad_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); +void invaders_videoram_w(int offset,int data); +void invaders_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); + void astinvad_sh_port_4_w(int offset,int data); void astinvad_sh_port_5_w(int offset,int data); void astinvad_sh_update(void); +void init_astinvad(void); +void init_spaceint(void); + extern struct Samplesinterface astinvad_samples_interface; @@ -60,7 +65,7 @@ static struct MemoryWriteAddress astinvad_writemem[] = { { 0x0000, 0x1bff, MWA_ROM }, { 0x1c00, 0x23ff, MWA_RAM }, - { 0x2400, 0x3fff, astinvad_videoram_w, &videoram, &videoram_size }, + { 0x2400, 0x3fff, invaders_videoram_w, &videoram, &videoram_size }, { -1 } /* end of table */ }; @@ -144,13 +149,13 @@ static struct MachineDriver machine_driver_astinvad = /* LT */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ 8, 0, - z80bw_init_palette, + astinvad_vh_convert_color_prom, VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, - 0, - 0, - astinvad_vh_screenrefresh, + invaders_vh_start, + invaders_vh_stop, + invaders_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, @@ -199,7 +204,7 @@ static struct MemoryWriteAddress spaceint_writemem[] = { 0x0000, 0x17ff, MWA_ROM }, { 0x2000, 0x23ff, MWA_RAM }, { 0x4000, 0x40ff, MWA_RAM }, - { 0x4100, 0x5fff, spaceint_videoram_w, &videoram, &videoram_size }, + { 0x4100, 0x5fff, invaders_videoram_w, &videoram, &videoram_size }, { -1 } /* end of table */ }; @@ -289,13 +294,13 @@ static struct MachineDriver machine_driver_spaceint = /* 20-12-1998 LT */ 32*8, 32*8, { 0*8, 32*8-1, 0*8, 32*8-1 }, 0, /* no gfxdecodeinfo - bitmapped display */ 8, 0, - z80bw_init_palette, + astinvad_vh_convert_color_prom, VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE, 0, - 0, - 0, - spaceint_vh_screenrefresh, + invaders_vh_start, + invaders_vh_stop, + invaders_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, @@ -352,6 +357,6 @@ ROM_END -GAME( 1980, astinvad, 0, astinvad, astinvad, 0, ROT270, "Stern", "Astro Invader" ) -GAME( 1979, kamikaze, astinvad, astinvad, astinvad, 0, ROT270, "Leijac Corporation", "Kamikaze" ) -GAMEX(1980, spaceint, 0, spaceint, spaceint, 0, ROT0, "Shoei", "Space Intruder", GAME_WRONG_COLORS | GAME_NO_SOUND ) +GAME( 1980, astinvad, 0, astinvad, astinvad, astinvad, ROT270, "Stern", "Astro Invader" ) +GAME( 1979, kamikaze, astinvad, astinvad, astinvad, astinvad, ROT270, "Leijac Corporation", "Kamikaze" ) +GAMEX(1980, spaceint, 0, spaceint, spaceint, spaceint, ROT0, "Shoei", "Space Intruder", GAME_WRONG_COLORS | GAME_NO_SOUND ) diff --git a/src/drivers/zaccaria.c b/src/drivers/zaccaria.c index f3e1de82c..13ae1ed43 100644 --- a/src/drivers/zaccaria.c +++ b/src/drivers/zaccaria.c @@ -668,7 +668,7 @@ ROM_END -GAMEX( 1983, monymony, 0, zaccaria, monymony, 0, ROT90, "Zaccaria", "Money Money", GAME_NO_SOUND ) -GAMEX( 1984, jackrabt, 0, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (set 1)", GAME_NO_SOUND ) -GAMEX( 1984, jackrab2, jackrabt, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (set 2)", GAME_NO_SOUND ) -GAMEX( 1984, jackrabs, jackrabt, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (special)", GAME_NO_SOUND ) +GAMEX( 1983, monymony, 0, zaccaria, monymony, 0, ROT90, "Zaccaria", "Money Money", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1984, jackrabt, 0, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (set 1)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1984, jackrab2, jackrabt, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (set 2)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) +GAMEX( 1984, jackrabs, jackrabt, zaccaria, jackrabt, 0, ROT90, "Zaccaria", "Jack Rabbit (special)", GAME_NO_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/zaxxon.c b/src/drivers/zaxxon.c index c486fc279..4bf231b48 100644 --- a/src/drivers/zaxxon.c +++ b/src/drivers/zaxxon.c @@ -1041,9 +1041,9 @@ static void init_razmataz(void) } -GAME( 1982, zaxxon, 0, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 1)" ) -GAME( 1982, zaxxon2, zaxxon, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 2)" ) -GAME( 1982, zaxxonb, zaxxon, zaxxon, zaxxon, zaxxonb, ROT90, "bootleg", "Jackson" ) -GAME( 1982, szaxxon, 0, zaxxon, zaxxon, szaxxon, ROT90, "Sega", "Super Zaxxon" ) -GAME( 1984, futspy, 0, futspy, futspy, futspy, ROT270, "Sega", "Future Spy" ) -GAME( 1983, razmataz, 0, razmataz, razmataz, razmataz, ROT270, "Sega", "Razzmatazz" ) +GAMEX( 1982, zaxxon, 0, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 1)", GAME_NO_COCKTAIL ) +GAMEX( 1982, zaxxon2, zaxxon, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 2)", GAME_NO_COCKTAIL ) +GAMEX( 1982, zaxxonb, zaxxon, zaxxon, zaxxon, zaxxonb, ROT90, "bootleg", "Jackson", GAME_NO_COCKTAIL ) +GAMEX( 1982, szaxxon, 0, zaxxon, zaxxon, szaxxon, ROT90, "Sega", "Super Zaxxon", GAME_NO_COCKTAIL ) +GAMEX( 1984, futspy, 0, futspy, futspy, futspy, ROT270, "Sega", "Future Spy", GAME_NO_COCKTAIL ) +GAMEX( 1983, razmataz, 0, razmataz, razmataz, razmataz, ROT270, "Sega", "Razzmatazz", GAME_NO_SOUND | GAME_NO_COCKTAIL ) diff --git a/src/drivers/zn.c b/src/drivers/zn.c index c58e195b0..90f73f973 100644 --- a/src/drivers/zn.c +++ b/src/drivers/zn.c @@ -3,22 +3,23 @@ Capcom System ZN1/ZN2 ===================== - Playstation Hardware with Q sound. + Playstation Hardware with Q sound. - Driver by smf. Currently only qsound is emulated, based on the cps1/cps2 driver. + Driver by smf. Currently only qsound is emulated. Notes: - This works differently to the cps1/cps2 qsound. Instead of shared memory it uses an i/o - port. To tell the z80 to read from this port you need to trigger an nmi. It seems you have - to trigger two nmi's for the music to start playing. Although there are two reads to the i/o - port it doesn't seem to make a difference what you pass as the second value ( at the - moment both reads will return the same value ). The i/o port used for zn1 is always - 0xf100 and everything seems to work fine. On zn2 it changes bits 8-12 of the i/o port - every time you stop triggering nmi's long enough for it to start playing. If you trigger more - or less nmi's it starts reading & writing to memory addresses that aren't currently - mapped. These are probably symptoms of it not working properly as tgmj only ever - plays one sample and sfex2/sfex2p seems to have music missing. + This driver is based on information from the cps1/cps2 qsound driver, + Miguel Angel Horna & Amuse. It works differently to the cps1/cps2 qsound, + instead of shared memory two bytes are transferred using an i/o port. + The 1/240th of a second timer either creates an nmi to tell the z80 there + is data waiting or otherwise an irq. + + The I/O port used on zn1 always appears to be 0xf100. The zn2 games always + set the bottom eight bits to zero, but the top eight bits are cycled + 0x00 - 0x1f for each access. This is probably to help synchronise the + command queue. This is not currently emulated as it only uses 8 bit i/o port + addressing. ***************************************************************************/ @@ -28,25 +29,18 @@ static int qcode; static int qcode_last; +static int queue_data; +static int queue_len; -static void zn_qsound_w( int offset, int data ) -{ - soundlatch_w( offset, data & 0xff ); - cpu_cause_interrupt( 1, Z80_NMI_INT ); - cpu_cause_interrupt( 1, Z80_NMI_INT ); -} - -static void zn_init_machine( void ) +void qsound_queue_w( int offset, int data ) { - /* stop CPU1 as it's not really a z80. */ - timer_suspendcpu( 0, 1, SUSPEND_REASON_DISABLE ); - qcode = 0; - qcode_last = -1; + queue_data = data; + queue_len = 2; } static int zn_vh_start( void ) { - return 0; + return 0; } static void zn_vh_stop( void ) @@ -57,31 +51,38 @@ static void zn_vh_screenrefresh( struct osd_bitmap *bitmap, int full_refresh ) { int refresh = full_refresh; - if( keyboard_pressed_memory( KEYCODE_UP ) ) - { - qcode++; - } - - if( keyboard_pressed_memory( KEYCODE_DOWN ) ) - { - qcode--; - } - - qcode &= 0xff; - if( qcode != qcode_last ) + if( queue_len == 0 ) { - zn_qsound_w( 0, qcode ); - - qcode_last = qcode; - refresh = 1; + if( keyboard_pressed_memory( KEYCODE_UP ) ) + { + qcode=( qcode & 0xff00 ) | ( ( qcode + 0x0001 ) & 0xff ); + } + if( keyboard_pressed_memory( KEYCODE_DOWN ) ) + { + qcode=( qcode & 0xff00 ) | ( ( qcode - 0x0001 ) & 0xff ); + } + if( keyboard_pressed_memory( KEYCODE_RIGHT ) ) + { + qcode=( ( qcode + 0x0100 ) & 0xff00 ) | ( qcode & 0xff ); + } + if( keyboard_pressed_memory( KEYCODE_LEFT ) ) + { + qcode=( ( qcode - 0x0100 ) & 0xff00 ) | ( qcode & 0xff ); + } + if( qcode != qcode_last ) + { + qsound_queue_w( 0, qcode ); + qcode_last = qcode; + refresh = 1; + } } if( refresh ) { struct DisplayText dt[ 3 ]; - char *instructions = "UP/DN=QCODE"; + char *instructions = "SELECT WITH RIGHT&LEFT/UP&DN"; char text1[ 256 ]; - sprintf( text1, "QSOUND CODE=%02x", qcode ); + sprintf( text1, "QSOUND CODE=%02x/%02x", qcode >> 8, qcode & 0xff ); dt[ 0 ].text = text1; dt[ 0 ].color = DT_COLOR_RED; dt[ 0 ].x = ( Machine->uiwidth - Machine->uifontwidth * strlen( text1 ) ) / 2; @@ -105,22 +106,8 @@ static struct QSound_interface qsound_interface = static void qsound_banksw_w( int offset, int data ) { - /* - Z80 bank register for music note data. It's odd that it isn't encrypted - though. - */ unsigned char *RAM = memory_region( REGION_CPU2 ); - int bankaddress = 0x10000 + ( ( data & 0x0f ) * 0x4000 ); - if( bankaddress + 0x4000 > memory_region_length( REGION_CPU2 ) ) - { - /* how would this really wrap ? */ - if( errorlog ) - { - fprintf( errorlog, "WARNING: Q sound bank overflow (%02x)\n", data ); - } - bankaddress = 0x10000; - } - cpu_setbank( 1, &RAM[ bankaddress ] ); + cpu_setbank( 1, &RAM[ 0x10000 + ( ( data & 0x0f ) * 0x4000 ) ] ); } static struct MemoryReadAddress qsound_readmem[] = @@ -165,6 +152,34 @@ static struct MemoryWriteAddress zn_writemem[] = { -1 } /* end of table */ }; +int zn_interrupt( void ) +{ + if( queue_len == 2 ) + { + soundlatch_w( 0, queue_data >> 8 ); + queue_len--; + return nmi_interrupt(); + } + else if( queue_len == 1 ) + { + soundlatch_w( 0, queue_data & 0xff ); + queue_len--; + return nmi_interrupt(); + } + return interrupt(); +} + +static void zn_init_machine( void ) +{ + /* stop CPU1 as it's not really a z80. */ + timer_suspendcpu( 0, 1, SUSPEND_REASON_DISABLE ); + + qcode = 0x0400; + qcode_last = -1; + queue_len = 0; + qsound_banksw_w( 0, 0 ); +} + static struct MachineDriver machine_driver_zn = { /* basic machine hardware */ @@ -179,7 +194,7 @@ static struct MachineDriver machine_driver_zn = CPU_Z80 | CPU_AUDIO_CPU, 8000000, /* 8mhz ?? */ qsound_readmem, qsound_writemem, qsound_readport, 0, - interrupt, 4 /* 4 interrupts per frame ?? */ + zn_interrupt, 4 /* 4 interrupts per frame ?? */ } }, 60, 0, @@ -252,7 +267,6 @@ INPUT_PORTS_START( zn ) INPUT_PORTS_END #define CODE_SIZE ( 0x3080000 ) -#define QSOUND_SIZE ( 0x50000 ) ROM_START( rvschool ) ROM_REGION( CODE_SIZE, REGION_CPU1 ) /* MIPS R3000 */ @@ -267,7 +281,7 @@ ROM_START( rvschool ) ROM_LOAD( "jst-12m", 0x1c80000, 0x400000, 0x43bd2ddd ) ROM_LOAD( "jst-13m", 0x2080000, 0x400000, 0x6b443235 ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "jst-02", 0x00000, 0x08000, 0x7809e2c3 ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "jst-03", 0x28000, 0x20000, 0x860ff24d ) @@ -289,7 +303,7 @@ ROM_START( jgakuen ) ROM_LOAD( "jst-12m", 0x1c80000, 0x400000, 0x43bd2ddd ) ROM_LOAD( "jst-13m", 0x2080000, 0x400000, 0x6b443235 ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "jst-02", 0x00000, 0x08000, 0x7809e2c3 ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "jst-03", 0x28000, 0x20000, 0x860ff24d ) @@ -308,7 +322,7 @@ ROM_START( sfex ) ROM_LOAD( "sfe-09m", 0x1080000, 0x400000, 0x62c424cc ) ROM_LOAD( "sfe-10m", 0x1480000, 0x400000, 0x83791a8b ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "sfe-02", 0x00000, 0x08000, 0x1908475c ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "sfe-03", 0x28000, 0x20000, 0x95c1e2e0 ) @@ -327,7 +341,7 @@ ROM_START( sfexj ) ROM_LOAD( "sfe-09m", 0x1080000, 0x400000, 0x62c424cc ) ROM_LOAD( "sfe-10m", 0x1480000, 0x400000, 0x83791a8b ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "sfe-02", 0x00000, 0x08000, 0x1908475c ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "sfe-03", 0x28000, 0x20000, 0x95c1e2e0 ) @@ -346,7 +360,7 @@ ROM_START( sfexp ) ROM_LOAD( "sfp-09", 0x1080000, 0x400000, 0x15f8b71e ) ROM_LOAD( "sfp-10", 0x1480000, 0x400000, 0xc1ecf652 ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "sfe-02", 0x00000, 0x08000, 0x1908475c ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "sfe-03", 0x28000, 0x20000, 0x95c1e2e0 ) @@ -365,7 +379,7 @@ ROM_START( sfexpj ) ROM_LOAD( "sfp-09", 0x1080000, 0x400000, 0x15f8b71e ) ROM_LOAD( "sfp-10", 0x1480000, 0x400000, 0xc1ecf652 ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "sfe-02", 0x00000, 0x08000, 0x1908475c ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "sfe-03", 0x28000, 0x20000, 0x95c1e2e0 ) @@ -383,7 +397,7 @@ ROM_START( sfex2 ) ROM_LOAD( "ex2-08m", 0x1880000, 0x800000, 0x3194132e ) ROM_LOAD( "ex2-09m", 0x2080000, 0x400000, 0x075ae585 ) - ROM_REGION( 0x28000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "ex2-02", 0x00000, 0x08000, 0x9489875e ) ROM_CONTINUE( 0x10000, 0x18000 ) @@ -401,7 +415,7 @@ ROM_START( sfex2p ) ROM_LOAD( "sf2p-09", 0x2080000, 0x800000, 0x344aa227 ) ROM_LOAD( "sf2p-10", 0x2880000, 0x800000, 0x2eef5931 ) - ROM_REGION( 0x48000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "sf2p-02", 0x00000, 0x08000, 0x3705de5e ) ROM_CONTINUE( 0x10000, 0x18000 ) ROM_LOAD( "sf2p-03", 0x28000, 0x20000, 0x6ae828f6 ) @@ -416,7 +430,7 @@ ROM_START( tgmj ) ROM_LOAD( "ate-05", 0x0080000, 0x400000, 0x50977f5a ) ROM_LOAD( "ate-06", 0x0480000, 0x400000, 0x05973f16 ) - ROM_REGION( 0x28000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "ate-02", 0x00000, 0x08000, 0xf4f6e82f ) ROM_CONTINUE( 0x10000, 0x18000 ) @@ -432,7 +446,7 @@ ROM_START( ts2j ) ROM_LOAD( "ts2-08m", 0x0880000, 0x400000, 0xb1f7f115 ) ROM_LOAD( "ts2-10", 0x0C80000, 0x200000, 0xad90679a ) - ROM_REGION( 0x28000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ + ROM_REGION( 0x50000, REGION_CPU2 ) /* 64k for the audio CPU (+banks) */ ROM_LOAD( "ts2-02", 0x00000, 0x08000, 0x2f45c461 ) ROM_CONTINUE( 0x10000, 0x18000 ) @@ -441,7 +455,6 @@ ROM_START( ts2j ) ROM_END - GAME( 1995, ts2j, 0, zn, zn, 0, ROT0, "Capcom/Takara", "Battle Arena Toshinden 2 (JAPAN 951124)" ) GAME( 1996, sfex, 0, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter EX (ASIA 961219)" ) GAME( 1996, sfexj, sfex, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter EX (JAPAN 961130)" ) @@ -450,5 +463,5 @@ GAME( 1997, sfexpj, sfexp, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter GAME( 1997, rvschool, 0, zn, zn, 0, ROT0, "Capcom", "Rival Schools (ASIA 971117)" ) GAME( 1997, jgakuen, rvschool, zn, zn, 0, ROT0, "Capcom", "Justice Gakuen (JAPAN 971117)" ) GAME( 1998, sfex2, 0, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter EX 2 (JAPAN 980312)" ) -GAME( 1999, sfex2p, sfex2, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter EX 2 Plus (JAPAN 990611)" ) GAME( 1998, tgmj, 0, zn, zn, 0, ROT0, "Capcom/Akira", "Tetris The Grand Master (JAPAN 980710)" ) +GAME( 1999, sfex2p, sfex2, zn, zn, 0, ROT0, "Capcom/Arika", "Street Fighter EX 2 Plus (JAPAN 990611)" ) diff --git a/src/drivers/zodiack.c b/src/drivers/zodiack.c index c0253a2bd..53c0a9c6e 100644 --- a/src/drivers/zodiack.c +++ b/src/drivers/zodiack.c @@ -209,13 +209,13 @@ INPUT_PORTS_START( dogfight ) PORT_BITX( 0x10, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) /* bonus */ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, "20k, 50k, then every 50k" ) + PORT_DIPSETTING( 0x20, "40k, 70k, then every 70k" ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x40, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x80, 0x00, "Freeze Screen" ) + PORT_DIPNAME( 0x80, 0x00, "Freeze" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) @@ -565,5 +565,5 @@ ROM_END GAMEX(1983, zodiack, 0, zodiack, zodiac, 0, ROT270, "Orca (Esco Trading Co, Inc)", "Zodiack", GAME_IMPERFECT_COLORS ) /* bullet color needs to be verified */ GAMEX(1983, dogfight, 0, zodiack, dogfight, 0, ROT270, "[Orca] Thunderbolt", "Dog Fight", GAME_IMPERFECT_COLORS ) /* bullet color needs to be verified */ -GAME( 1982, moguchan, 0, zodiack, moguchan, 0, ROT270, "Orca (Eastern Commerce Inc. license) (bootleg?)", /* this is in the ROM at $0b5c */ "Moguchan" ) +GAMEX(1982, moguchan, 0, zodiack, moguchan, 0, ROT270, "Orca (Eastern Commerce Inc. license) (bootleg?)", /* this is in the ROM at $0b5c */ "Moguchan", GAME_WRONG_COLORS ) GAME( 1981, percuss, 0, percuss, percuss, 0, ROT270, "Orca", "The Percussor" ) diff --git a/src/inptport.c b/src/inptport.c index c004ca697..cfe80cdf0 100644 --- a/src/inptport.c +++ b/src/inptport.c @@ -248,6 +248,14 @@ struct ipd inputport_defaults[] = { (IPT_PADDLE | IPF_PLAYER3)+IPT_EXTENSION, "Paddle 3", SEQ_DEF_3(KEYCODE_L, CODE_OR, JOYCODE_3_RIGHT) }, { IPT_PADDLE | IPF_PLAYER4, "Paddle 4", SEQ_DEF_1(JOYCODE_4_LEFT) }, { (IPT_PADDLE | IPF_PLAYER4)+IPT_EXTENSION, "Paddle 4", SEQ_DEF_1(JOYCODE_4_RIGHT) }, + { IPT_PADDLE_V | IPF_PLAYER1, "Paddle V", SEQ_DEF_3(KEYCODE_UP, CODE_OR, JOYCODE_1_UP) }, + { (IPT_PADDLE_V | IPF_PLAYER1)+IPT_EXTENSION, "Paddle V", SEQ_DEF_3(KEYCODE_DOWN, CODE_OR, JOYCODE_1_DOWN) }, + { IPT_PADDLE_V | IPF_PLAYER2, "Paddle V 2", SEQ_DEF_3(KEYCODE_R, CODE_OR, JOYCODE_2_UP) }, + { (IPT_PADDLE_V | IPF_PLAYER2)+IPT_EXTENSION, "Paddle V 2", SEQ_DEF_3(KEYCODE_F, CODE_OR, JOYCODE_2_DOWN) }, + { IPT_PADDLE_V | IPF_PLAYER3, "Paddle V 3", SEQ_DEF_3(KEYCODE_I, CODE_OR, JOYCODE_3_UP) }, + { (IPT_PADDLE_V | IPF_PLAYER3)+IPT_EXTENSION, "Paddle V 3", SEQ_DEF_3(KEYCODE_K, CODE_OR, JOYCODE_3_DOWN) }, + { IPT_PADDLE_V | IPF_PLAYER4, "Paddle V 4", SEQ_DEF_1(JOYCODE_4_UP) }, + { (IPT_PADDLE_V | IPF_PLAYER4)+IPT_EXTENSION, "Paddle V 4", SEQ_DEF_1(JOYCODE_4_DOWN) }, { IPT_DIAL | IPF_PLAYER1, "Dial", SEQ_DEF_3(KEYCODE_LEFT, CODE_OR, JOYCODE_1_LEFT) }, { (IPT_DIAL | IPF_PLAYER1)+IPT_EXTENSION, "Dial", SEQ_DEF_3(KEYCODE_RIGHT, CODE_OR, JOYCODE_1_RIGHT) }, { IPT_DIAL | IPF_PLAYER2, "Dial 2", SEQ_DEF_3(KEYCODE_D, CODE_OR, JOYCODE_2_LEFT) }, @@ -256,6 +264,14 @@ struct ipd inputport_defaults[] = { (IPT_DIAL | IPF_PLAYER3)+IPT_EXTENSION, "Dial 3", SEQ_DEF_3(KEYCODE_L, CODE_OR, JOYCODE_3_RIGHT) }, { IPT_DIAL | IPF_PLAYER4, "Dial 4", SEQ_DEF_1(JOYCODE_4_LEFT) }, { (IPT_DIAL | IPF_PLAYER4)+IPT_EXTENSION, "Dial 4", SEQ_DEF_1(JOYCODE_4_RIGHT) }, + { IPT_DIAL_V | IPF_PLAYER1, "Dial V", SEQ_DEF_3(KEYCODE_UP, CODE_OR, JOYCODE_1_UP) }, + { (IPT_DIAL_V | IPF_PLAYER1)+IPT_EXTENSION, "Dial V", SEQ_DEF_3(KEYCODE_DOWN, CODE_OR, JOYCODE_1_DOWN) }, + { IPT_DIAL_V | IPF_PLAYER2, "Dial V 2", SEQ_DEF_3(KEYCODE_R, CODE_OR, JOYCODE_2_UP) }, + { (IPT_DIAL_V | IPF_PLAYER2)+IPT_EXTENSION, "Dial V 2", SEQ_DEF_3(KEYCODE_F, CODE_OR, JOYCODE_2_DOWN) }, + { IPT_DIAL_V | IPF_PLAYER3, "Dial V 3", SEQ_DEF_3(KEYCODE_I, CODE_OR, JOYCODE_3_UP) }, + { (IPT_DIAL_V | IPF_PLAYER3)+IPT_EXTENSION, "Dial V 3", SEQ_DEF_3(KEYCODE_K, CODE_OR, JOYCODE_3_DOWN) }, + { IPT_DIAL_V | IPF_PLAYER4, "Dial V 4", SEQ_DEF_1(JOYCODE_4_UP) }, + { (IPT_DIAL_V | IPF_PLAYER4)+IPT_EXTENSION, "Dial V 4", SEQ_DEF_1(JOYCODE_4_DOWN) }, { IPT_TRACKBALL_X | IPF_PLAYER1, "Track X", SEQ_DEF_3(KEYCODE_LEFT, CODE_OR, JOYCODE_1_LEFT) }, { (IPT_TRACKBALL_X | IPF_PLAYER1)+IPT_EXTENSION, "Track X", SEQ_DEF_3(KEYCODE_RIGHT, CODE_OR, JOYCODE_1_RIGHT) }, diff --git a/src/inptport.h b/src/inptport.h index e003f97ea..de877d6ab 100644 --- a/src/inptport.h +++ b/src/inptport.h @@ -98,6 +98,7 @@ enum { IPT_END=1,IPT_PORT, }; #define IPT_UNUSED IPF_UNUSED +#define IPT_SPECIAL IPT_UNUSED /* special meaning handled by custom functions */ #define IPF_MASK 0xffffff00 #define IPF_UNUSED 0x80000000 /* The bit is not used by this game, but is used */ diff --git a/src/machine/8080bw.c b/src/machine/8080bw.c index 71baaa774..ab2944d5c 100644 --- a/src/machine/8080bw.c +++ b/src/machine/8080bw.c @@ -13,20 +13,11 @@ static int shift_data1,shift_data2,shift_amount; -int invaders_shift_data_r(int offset) -{ - return ((((shift_data1 << 8) | shift_data2) << shift_amount) >> 8) & 0xff; -} - - - void invaders_shift_amount_w(int offset,int data) { shift_amount = data; } - - void invaders_shift_data_w(int offset,int data) { shift_data2 = shift_data1; @@ -34,47 +25,46 @@ void invaders_shift_data_w(int offset,int data) } +#define SHIFT (((((shift_data1 << 8) | shift_data2) << (shift_amount & 0x07)) >> 8) & 0xff) -int invaders_interrupt(void) + +int invaders_shift_data_r(int offset) { - static int count; + return SHIFT; +} +int invaders_shift_data_rev_r(int offset) +{ + int ret = SHIFT; - count++; + ret = ((ret & 0x01) << 7) + | ((ret & 0x02) << 5) + | ((ret & 0x04) << 3) + | ((ret & 0x08) << 1) + | ((ret & 0x10) >> 1) + | ((ret & 0x20) >> 3) + | ((ret & 0x40) >> 5) + | ((ret & 0x80) >> 7); - if (count & 1) - return 0x00cf; /* RST 08h */ - else - return 0x00d7; /* RST 10h */ + return ret; } -int seawolf_shift_data_r(int offset) +int invaders_shift_data_comp_r(int offset) { - int reverse_data; - - reverse_data = ((((shift_data1 << 8) | shift_data2) << shift_amount) >> 8) & 0xff; - reverse_data = ((reverse_data & 0x01) << 7) - | ((reverse_data & 0x02) << 5) - | ((reverse_data & 0x04) << 3) - | ((reverse_data & 0x08) << 1) - | ((reverse_data & 0x10) >> 1) - | ((reverse_data & 0x20) >> 3) - | ((reverse_data & 0x40) >> 5) - | ((reverse_data & 0x80) >> 7); - return reverse_data; + return SHIFT ^ 0xff; } -void zzzap_snd2_w(int offset, int data) +int invaders_interrupt(void) { -} + static int count; -void zzzap_snd5_w(int offset, int data) -{ -} + count++; -void zzzap_wdog(void) -{ + if (count & 1) + return 0x00cf; /* RST 08h */ + else + return 0x00d7; /* RST 10h */ } /**************************************************************************** @@ -86,31 +76,7 @@ int boothill_shift_data_r(int offset) if (shift_amount < 0x10) return invaders_shift_data_r(0); else - { - int reverse_data1,reverse_data2; - - /* Reverse the bytes */ - - reverse_data1 = ((shift_data1 & 0x01) << 7) - | ((shift_data1 & 0x02) << 5) - | ((shift_data1 & 0x04) << 3) - | ((shift_data1 & 0x08) << 1) - | ((shift_data1 & 0x10) >> 1) - | ((shift_data1 & 0x20) >> 3) - | ((shift_data1 & 0x40) >> 5) - | ((shift_data1 & 0x80) >> 7); - - reverse_data2 = ((shift_data2 & 0x01) << 7) - | ((shift_data2 & 0x02) << 5) - | ((shift_data2 & 0x04) << 3) - | ((shift_data2 & 0x08) << 1) - | ((shift_data2 & 0x10) >> 1) - | ((shift_data2 & 0x20) >> 3) - | ((shift_data2 & 0x40) >> 5) - | ((shift_data2 & 0x80) >> 7); - - return ((((reverse_data2 << 8) | reverse_data1) << (0xff-shift_amount)) >> 8) & 0xff; - } + return invaders_shift_data_rev_r(0); } /* Grays Binary again! */ @@ -149,15 +115,14 @@ static const int ControllerTable[64] = { 36 , 37 , 39 , 38 , 34 , 35 , 33 , 32 }; -/* TODO: I think the bits may need inverting for Sea Wolf and Space Encounters, a la Boot Hill */ int gray6bit_controller0_r(int offset) { - return (input_port_0_r(0) & 0xc0) + ControllerTable[input_port_0_r(0) & 0x3f]; + return (input_port_0_r(0) & 0xc0) + (ControllerTable[input_port_0_r(0) & 0x3f] ^ 0x3f); } int gray6bit_controller1_r(int offset) { - return (input_port_1_r(0) & 0xc0) + ControllerTable[input_port_1_r(0) & 0x3f]; + return (input_port_1_r(0) & 0xc0) + (ControllerTable[input_port_1_r(0) & 0x3f] ^ 0x3f); } int seawolf_port_0_r (int offset) @@ -166,48 +131,14 @@ int seawolf_port_0_r (int offset) } -int midbowl_shift_data_r(int offset) -{ -return ((~(((shift_data1 << 8) | shift_data2) << shift_amount) >> 8)) & 0xff; -} - -int midbowl_shift_data_rev_r(int offset) -{ -int reverse_data, return_data; - -reverse_data = ((~(((shift_data1 << 8) | shift_data2) << shift_amount) >> 8)) & 0xff; -return_data = ((reverse_data & 0x01) << 7) - | ((reverse_data & 0x02) << 5) - | ((reverse_data & 0x04) << 3) - | ((reverse_data & 0x08) << 1) - | ((reverse_data & 0x10) >> 1) - | ((reverse_data & 0x20) >> 3) - | ((reverse_data & 0x40) >> 5) - | ((reverse_data & 0x80) >> 7); -return return_data; -} - -/* - * note: shift_amount is always 0 - */ +static int desertgu_controller_select; -int blueshrk_shift_data_r(int offset) +int desertgu_port_1_r(int offset) { -return (((((shift_data1 << 8) | shift_data2) << (0)) >> 8)) & 0xff; + return readinputport(desertgu_controller_select ? 1 : 2); } -int blueshrk_shift_data_rev_r(int offset) +void desertgu_controller_select_w(int offset, int data) { -int reverse_data, return_data; - -reverse_data = (((((shift_data1 << 8) | shift_data2) << (0)) >> 8)) & 0xff; -return_data = ((reverse_data & 0x01) << 7) - | ((reverse_data & 0x02) << 5) - | ((reverse_data & 0x04) << 3) - | ((reverse_data & 0x08) << 1) - | ((reverse_data & 0x10) >> 1) - | ((reverse_data & 0x20) >> 3) - | ((reverse_data & 0x40) >> 5) - | ((reverse_data & 0x80) >> 7); -return return_data; + desertgu_controller_select = data & 0x08; } diff --git a/src/machine/arkanoid.c b/src/machine/arkanoid.c index f8f39e4fc..c575cc0a7 100644 --- a/src/machine/arkanoid.c +++ b/src/machine/arkanoid.c @@ -39,7 +39,7 @@ void arkanoid_Z80_mcu_w(int offset,int data) fromz80 = data; /* give up a little bit of time to let the 68705 detect the write */ - cpu_yielduntil_trigger (700); + cpu_spinuntil_trigger(700); } int arkanoid_68705_portA_r(int offset) @@ -76,7 +76,7 @@ void arkanoid_68705_portC_w(int offset,int data) if ((ddrC & 0x04) && (~data & 0x04) && (portC_out & 0x04)) { /* mark that the command has been seen */ - cpu_trigger (700); + cpu_trigger(700); /* return the last value the Z80 wrote */ z80write = 0; diff --git a/src/machine/asteroid.c b/src/machine/asteroid.c index bbadc00fc..41362c2b1 100644 --- a/src/machine/asteroid.c +++ b/src/machine/asteroid.c @@ -29,16 +29,8 @@ int llander_interrupt (void) return ignore_interrupt(); } -/* - * We catch the following busy loop in Asteroids: - * 6812 lda $2002 - * 6815 bmi $6812 - * - * and the following busy loop in Asteroid Deluxe - * 6014 bit $2002 - * 6017 bmi $6014 - */ -int asteroid_IN0_r (int offset) { +int asteroid_IN0_r (int offset) +{ int res; int bitmask; @@ -49,13 +41,8 @@ int asteroid_IN0_r (int offset) { if (cpu_gettotalcycles() & 0x100) res |= 0x02; - if (!avgdvg_done()) { - if (cpu_get_pc()==0x6815) - cpu_spinuntil_int(); - if (cpu_get_pc()==0x6017) - cpu_spinuntil_int(); + if (!avgdvg_done()) res |= 0x04; - } if (res & bitmask) res = 0x80; @@ -65,6 +52,20 @@ int asteroid_IN0_r (int offset) { return res; } +int asteroib_IN0_r (int offset) +{ + int res; + + res=readinputport(0); + +// if (cpu_gettotalcycles() & 0x100) +// res |= 0x02; + if (!avgdvg_done()) + res |= 0x80; + + return res; +} + /* * These 7 memory locations are used to read the player's controls. * Typically, only the high bit is used. This is handled by one input port. @@ -155,18 +156,11 @@ void asteroid_init_machine(void) /* * This is Lunar Lander's Inputport 0. - * We also catch the following busyloop: - * 6531 lda $2000 - * 6534 lsr - * 6535 bcc 6531 */ int llander_IN0_r (int offset) { int res; - if (cpu_get_pc()==0x6534) - cpu_spinuntil_int(); - res = readinputport(0); if (avgdvg_done()) diff --git a/src/machine/dec0.c b/src/machine/dec0.c index 74bbc7750..789ea919c 100644 --- a/src/machine/dec0.c +++ b/src/machine/dec0.c @@ -1,6 +1,6 @@ /******************************************************************************* -Data East machine functions - Bryan McPhail, mish@tendril.force9.net +Data East machine functions - Bryan McPhail, mish@tendril.co.uk * Control reads, protection chip emulations & cycle skipping patches @@ -27,9 +27,6 @@ void dec0_pf3_control_1_w(int offset,int data); void dec0_pf3_control_0_w(int offset,int data); void dec0_pf3_data_w(int offset,int data); -//dont need this?? -void dec0_priority_w(int offset,int data); - /******************************************************************************/ int dec0_controls_read(int offset) @@ -46,10 +43,7 @@ int dec0_controls_read(int offset) return (readinputport(3) + (readinputport(4) << 8)); case 8: /* Intel 8751 mc, Bad Dudes & Heavy Barrel only */ - - if (errorlog) fprintf(errorlog,"CPU #0 PC %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),0x30c000+offset); - - + //if (errorlog) fprintf(errorlog,"CPU #0 PC %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),0x30c000+offset); return i8751_return; } @@ -301,7 +295,7 @@ void hippodrm_shared_w(int offset,int data) static int hippodrm_68000_share_r(int offset) { - if (offset==0) cpu_spin(); /* A wee helper */ + if (offset==0) cpu_yield(); /* A wee helper */ return share[offset/2]; } diff --git a/src/machine/namcos1.c b/src/machine/namcos1.c index 8e1ca317d..25e4fe132 100644 --- a/src/machine/namcos1.c +++ b/src/machine/namcos1.c @@ -1,7 +1,7 @@ #include "driver.h" #include "vidhrdw/generic.h" -#define NEW_TIMER 0 /* CPU slice optimize with new timer system */ +#define NEW_TIMER 0 /* CPU slice optimize with new timer system */ #define NAMCOS1_MAX_BANK 0x400 @@ -10,8 +10,8 @@ extern int namcos1_videoram_r( int offset ); extern void namcos1_videoram_w( int offset, int data ); extern int namcos1_paletteram_r( int offset ); extern void namcos1_paletteram_w( int offset, int data ); -extern void namcos1_videocontroll_w(int offset,int data); -extern void namcos1_set_scroll_offsets( const int *bgx, const int*bgy, int negative, int optimize ); +extern void namcos1_videocontrol_w(int offset,int data); +extern void namcos1_set_scroll_offsets( const int *bgx, const int *bgy, int negative, int optimize ); extern void namcos1_set_optimize( int optimize ); extern void namcos1_set_sprite_offsets( int x, int y ); @@ -23,445 +23,512 @@ static unsigned char *s1ram; static int namcos1_cpu1_banklatch; static int namcos1_reset = 0; + +static int berabohm_input_counter; + + + /******************************************************************************* -* * -* Key emulation (CUS136) Rev1 (Pacmania & Galaga 88) * -* * +* * +* Key emulation (CUS136) Rev1 (Pacmania & Galaga 88) * +* * *******************************************************************************/ static int key_id; static int key_id_query; static int rev1_key_r( int offset ) { -// if (errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); - return 0; - } - return key[offset]; +// if (errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; } static void rev1_key_w( int offset, int data ) { - static unsigned short divider, divide_32 = 0; - //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - return; - } - - key[offset] = data; - - switch ( offset ) - { - case 0x01: - divider = ( key[0] << 8 ) + key[1]; - break; - case 0x03: - { - static unsigned short d; - unsigned short v1, v2; - unsigned long l=0; - - if ( divide_32 ) - l = d << 16; - - d = ( key[2] << 8 ) + key[3]; - - if ( divider == 0 ) { - v1 = 0xffff; - v2 = 0; - } else { - if ( divide_32 ) { - l |= d; - - v1 = l / divider; - v2 = l % divider; - } else { - v1 = d / divider; - v2 = d % divider; - } - } - - key[2] = v1 >> 8; - key[3] = v1; - key[0] = v2 >> 8; - key[1] = v2; - } - break; - case 0x04: - if ( key[4] == key_id_query ) /* get key number */ - key[4] = key_id; - - if ( key[4] == 0x0c ) - divide_32 = 1; - else - divide_32 = 0; - break; - } + static unsigned short divider, divide_32 = 0; + //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + + key[offset] = data; + + switch ( offset ) + { + case 0x01: + divider = ( key[0] << 8 ) + key[1]; + break; + case 0x03: + { + static unsigned short d; + unsigned short v1, v2; + unsigned long l=0; + + if ( divide_32 ) + l = d << 16; + + d = ( key[2] << 8 ) + key[3]; + + if ( divider == 0 ) { + v1 = 0xffff; + v2 = 0; + } else { + if ( divide_32 ) { + l |= d; + + v1 = l / divider; + v2 = l % divider; + } else { + v1 = d / divider; + v2 = d % divider; + } + } + + key[2] = v1 >> 8; + key[3] = v1; + key[0] = v2 >> 8; + key[1] = v2; + } + break; + case 0x04: + if ( key[4] == key_id_query ) /* get key number */ + key[4] = key_id; + + if ( key[4] == 0x0c ) + divide_32 = 1; + else + divide_32 = 0; + break; + } } /******************************************************************************* -* * -* Key emulation (CUS136) Rev2 (Dragon Spirit, Blazer, World Court) * -* * +* * +* Key emulation (CUS136) Rev2 (Dragon Spirit, Blazer, World Court) * +* * *******************************************************************************/ static int rev2_key_r( int offset ) { - //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); - return 0; - } - return key[offset]; + //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; } static void rev2_key_w( int offset, int data ) { - //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - return; - } - key[offset] = data; - - switch(offset) - { - case 0x00: - if ( data == 1 ) - { - /* fetch key ID */ - key[3] = key_id; - return; - } - break; - case 0x02: - /* $f2 = Dragon Spirit, $b7 = Blazer , $35($d9) = worldcourt */ - if ( key[3] == 0xf2 || key[3] == 0xb7 || key[3] == 0x35 ) - { - switch( key[0] ) - { - case 0x10: key[0] = 0x05; key[1] = 0x00; key[2] = 0xc6; break; - case 0x12: key[0] = 0x09; key[1] = 0x00; key[2] = 0x96; break; - case 0x15: key[0] = 0x0a; key[1] = 0x00; key[2] = 0x8f; break; - case 0x22: key[0] = 0x14; key[1] = 0x00; key[2] = 0x39; break; - case 0x32: key[0] = 0x31; key[1] = 0x00; key[2] = 0x12; break; - case 0x3d: key[0] = 0x35; key[1] = 0x00; key[2] = 0x27; break; - case 0x54: key[0] = 0x10; key[1] = 0x00; key[2] = 0x03; break; - case 0x58: key[0] = 0x49; key[1] = 0x00; key[2] = 0x23; break; - case 0x7b: key[0] = 0x48; key[1] = 0x00; key[2] = 0xd4; break; - case 0xc7: key[0] = 0xbf; key[1] = 0x00; key[2] = 0xe8; break; - } - return; - } - break; - case 0x03: - /* $c2 = Dragon Spirit, $b6 = Blazer */ - if ( key[3] == 0xc2 || key[3] == 0xb6 ) { - key[3] = 0x36; - return; - } - /* $d9 = World court */ - if ( key[3] == 0xd9 ) - { - key[3] = 0x35; - return; - } - break; - case 0x3f: /* Splatter House */ - key[0x3f] = 0xb5; - key[0x36] = 0xb5; - return; - } - /* ?? */ - if ( key[3] == 0x01 ) { - if ( key[0] == 0x40 && key[1] == 0x04 && key[2] == 0x00 ) { - key[1] = 0x00; key[2] = 0x10; - return; - } - } + //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + key[offset] = data; + + switch(offset) + { + case 0x00: + if ( data == 1 ) + { + /* fetch key ID */ + key[3] = key_id; + return; + } + break; + case 0x02: + /* $f2 = Dragon Spirit, $b7 = Blazer , $35($d9) = worldcourt */ + if ( key[3] == 0xf2 || key[3] == 0xb7 || key[3] == 0x35 ) + { + switch( key[0] ) + { + case 0x10: key[0] = 0x05; key[1] = 0x00; key[2] = 0xc6; break; + case 0x12: key[0] = 0x09; key[1] = 0x00; key[2] = 0x96; break; + case 0x15: key[0] = 0x0a; key[1] = 0x00; key[2] = 0x8f; break; + case 0x22: key[0] = 0x14; key[1] = 0x00; key[2] = 0x39; break; + case 0x32: key[0] = 0x31; key[1] = 0x00; key[2] = 0x12; break; + case 0x3d: key[0] = 0x35; key[1] = 0x00; key[2] = 0x27; break; + case 0x54: key[0] = 0x10; key[1] = 0x00; key[2] = 0x03; break; + case 0x58: key[0] = 0x49; key[1] = 0x00; key[2] = 0x23; break; + case 0x7b: key[0] = 0x48; key[1] = 0x00; key[2] = 0xd4; break; + case 0xc7: key[0] = 0xbf; key[1] = 0x00; key[2] = 0xe8; break; + } + return; + } + break; + case 0x03: + /* $c2 = Dragon Spirit, $b6 = Blazer */ + if ( key[3] == 0xc2 || key[3] == 0xb6 ) { + key[3] = 0x36; + return; + } + /* $d9 = World court */ + if ( key[3] == 0xd9 ) + { + key[3] = 0x35; + return; + } + break; + case 0x3f: /* Splatter House */ + key[0x3f] = 0xb5; + key[0x36] = 0xb5; + return; + } + /* ?? */ + if ( key[3] == 0x01 ) { + if ( key[0] == 0x40 && key[1] == 0x04 && key[2] == 0x00 ) { + key[1] = 0x00; key[2] = 0x10; + return; + } + } } /******************************************************************************* -* * -* Key emulation (CUS136) for Dangerous Seed * -* * +* * +* Key emulation (CUS136) for Dangerous Seed * +* * *******************************************************************************/ static int dangseed_key_r( int offset ) { -// if (errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); - return 0; - } - return key[offset]; +// if (errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; } static void dangseed_key_w( int offset, int data ) { - int i; -// if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - return; - } - - key[offset] = data; - - switch ( offset ) - { - case 0x50: - for ( i = 0; i < 0x50; i++ ) { - key[i] = ( data >> ( ( i >> 4 ) & 0x0f ) ) & 0x0f; - key[i] |= ( i & 0x0f ) << 4; - } - break; - - case 0x57: - key[3] = key_id; - break; - } + int i; +// if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + + key[offset] = data; + + switch ( offset ) + { + case 0x50: + for ( i = 0; i < 0x50; i++ ) { + key[i] = ( data >> ( ( i >> 4 ) & 0x0f ) ) & 0x0f; + key[i] |= ( i & 0x0f ) << 4; + } + break; + + case 0x57: + key[3] = key_id; + break; + } } /******************************************************************************* -* * -* Key emulation (CUS136) for Dragon Spirit * -* * +* * +* Key emulation (CUS136) for Dragon Spirit * +* * *******************************************************************************/ static int dspirit_key_r( int offset ) { - //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); - return 0; - } - return key[offset]; + //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; } static void dspirit_key_w( int offset, int data ) { - static unsigned short divisor; -// if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - return; - } - key[offset] = data; - - switch(offset) - { - case 0x00: - if ( data == 1 ) - { - /* fetch key ID */ - key[3] = key_id; - } else - divisor = data; - break; - - case 0x01: - if ( key[3] == 0x01 ) { /* division gets resolved on latch to $1 */ - unsigned short d, v1, v2; - - d = ( key[1] << 8 ) + key[2]; - - if ( divisor == 0 ) { - v1 = 0xffff; - v2 = 0; - } else { - v1 = d / divisor; - v2 = d % divisor; - } - - key[0] = v2 & 0xff; - key[1] = v1 >> 8; - key[2] = v1 & 0xff; - - return; - } - - if ( key[3] != 0xf2 ) { /* if its an invalid mode, clear regs */ - key[0] = 0; - key[1] = 0; - key[2] = 0; - } - break; - case 0x02: - if ( key[3] == 0xf2 ) { /* division gets resolved on latch to $2 */ - unsigned short d, v1, v2; - - d = ( key[1] << 8 ) + key[2]; - - if ( divisor == 0 ) { - v1 = 0xffff; - v2 = 0; - } else { - v1 = d / divisor; - v2 = d % divisor; - } - - key[0] = v2 & 0xff; - key[1] = v1 >> 8; - key[2] = v1 & 0xff; - - return; - } - - if ( key[3] != 0x01 ) { /* if its an invalid mode, clear regs */ - key[0] = 0; - key[1] = 0; - key[2] = 0; - } - break; - case 0x03: - if ( key[3] != 0xf2 && key[3] != 0x01 ) /* if the mode is unknown return the id on $3 */ - key[3] = key_id; - break; - } + static unsigned short divisor; +// if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + key[offset] = data; + + switch(offset) + { + case 0x00: + if ( data == 1 ) + { + /* fetch key ID */ + key[3] = key_id; + } else + divisor = data; + break; + + case 0x01: + if ( key[3] == 0x01 ) { /* division gets resolved on latch to $1 */ + unsigned short d, v1, v2; + + d = ( key[1] << 8 ) + key[2]; + + if ( divisor == 0 ) { + v1 = 0xffff; + v2 = 0; + } else { + v1 = d / divisor; + v2 = d % divisor; + } + + key[0] = v2 & 0xff; + key[1] = v1 >> 8; + key[2] = v1 & 0xff; + + return; + } + + if ( key[3] != 0xf2 ) { /* if its an invalid mode, clear regs */ + key[0] = 0; + key[1] = 0; + key[2] = 0; + } + break; + case 0x02: + if ( key[3] == 0xf2 ) { /* division gets resolved on latch to $2 */ + unsigned short d, v1, v2; + + d = ( key[1] << 8 ) + key[2]; + + if ( divisor == 0 ) { + v1 = 0xffff; + v2 = 0; + } else { + v1 = d / divisor; + v2 = d % divisor; + } + + key[0] = v2 & 0xff; + key[1] = v1 >> 8; + key[2] = v1 & 0xff; + + return; + } + + if ( key[3] != 0x01 ) { /* if its an invalid mode, clear regs */ + key[0] = 0; + key[1] = 0; + key[2] = 0; + } + break; + case 0x03: + if ( key[3] != 0xf2 && key[3] != 0x01 ) /* if the mode is unknown return the id on $3 */ + key[3] = key_id; + break; + } } /******************************************************************************* -* * -* Key emulation (CUS136) for Blazer * -* * +* * +* Key emulation (CUS136) for Blazer * +* * *******************************************************************************/ static int blazer_key_r( int offset ) { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); - return 0; - } - return key[offset]; + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; } static void blazer_key_w( int offset, int data ) { - static unsigned short divisor; - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - if(offset >= NAMCOS1_MAX_KEY) - { - if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); - return; - } - key[offset] = data; - - switch(offset) - { - case 0x00: - if ( data == 1 ) - { - /* fetch key ID */ - key[3] = key_id; - } else - divisor = data; - break; - - case 0x01: - if ( key[3] != 0xb7 ) { /* if its an invalid mode, clear regs */ - key[0] = 0; - key[1] = 0; - key[2] = 0; - } - break; - - case 0x02: - if ( key[3] == 0xb7 ) { /* division gets resolved on latch to $2 */ - unsigned short d, v1, v2; - - d = ( key[1] << 8 ) + key[2]; - - if ( divisor == 0 ) { - v1 = 0xffff; - v2 = 0; - } else { - v1 = d / divisor; - v2 = d % divisor; - } - - key[0] = v2 & 0xff; - key[1] = v1 >> 8; - key[2] = v1 & 0xff; - - return; - } - - /* if its an invalid mode, clear regs */ - key[0] = 0; - key[1] = 0; - key[2] = 0; - break; - case 0x03: - if ( key[3] != 0xb7 ) { /* if the mode is unknown return the id on $3 */ - key[3] = key_id; - } - break; - } + static unsigned short divisor; + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + key[offset] = data; + + switch(offset) + { + case 0x00: + if ( data == 1 ) + { + /* fetch key ID */ + key[3] = key_id; + } else + divisor = data; + break; + + case 0x01: + if ( key[3] != 0xb7 ) { /* if its an invalid mode, clear regs */ + key[0] = 0; + key[1] = 0; + key[2] = 0; + } + break; + + case 0x02: + if ( key[3] == 0xb7 ) { /* division gets resolved on latch to $2 */ + unsigned short d, v1, v2; + + d = ( key[1] << 8 ) + key[2]; + + if ( divisor == 0 ) { + v1 = 0xffff; + v2 = 0; + } else { + v1 = d / divisor; + v2 = d % divisor; + } + + key[0] = v2 & 0xff; + key[1] = v1 >> 8; + key[2] = v1 & 0xff; + + return; + } + + /* if its an invalid mode, clear regs */ + key[0] = 0; + key[1] = 0; + key[2] = 0; + break; + case 0x03: + if ( key[3] != 0xb7 ) { /* if the mode is unknown return the id on $3 */ + key[3] = key_id; + } + break; + } } /******************************************************************************* -* * -* Banking emulation (CUS117) * -* * +* * +* Key emulation (CUS136) for World Stadium * +* * +*******************************************************************************/ + +static int key_id; +static int key_id_query; + +static int ws_key_r( int offset ) { +// if (errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip read %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,key[offset]); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip read %04x\n",cpu_getactivecpu(),cpu_get_pc(),offset); + return 0; + } + return key[offset]; +} + +static void ws_key_w( int offset, int data ) { + static unsigned short divider; + //if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: keychip write %04X=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset >= NAMCOS1_MAX_KEY) + { + if(errorlog) fprintf(errorlog,"CPU #%d PC %08x: unmapped keychip write %04x=%04x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + return; + } + + key[offset] = data; + + switch ( offset ) + { + case 0x01: + divider = ( key[0] << 8 ) + key[1]; + break; + case 0x03: + { + static unsigned short d; + unsigned short v1, v2; + + d = ( key[2] << 8 ) + key[3]; + + if ( divider == 0 ) { + v1 = 0xffff; + v2 = 0; + } else { + v1 = d / divider; + v2 = d % divider; + } + + key[2] = v1 >> 8; + key[3] = v1; + key[0] = v2 >> 8; + key[1] = v2; + } + break; + case 0x04: + key[4] = key_id; + break; + } +} + +/******************************************************************************* +* * +* Banking emulation (CUS117) * +* * *******************************************************************************/ static int soundram_r( int offset) { - if(offset<0x100) - return namcos1_wavedata_r(offset); - if(offset<0x140) - return namcos1_sound_r(offset-0x100); + if(offset<0x100) + return namcos1_wavedata_r(offset); + if(offset<0x140) + return namcos1_sound_r(offset-0x100); - /* shared ram */ - return namco_wavedata[offset]; + /* shared ram */ + return namco_wavedata[offset]; } static void soundram_w( int offset, int data ) { - if(offset<0x100) - { - namcos1_wavedata_w(offset,data); - return; - } - if(offset<0x140) - { - namcos1_sound_w(offset-0x100,data); - return; - } - /* shared ram */ - namco_wavedata[offset] = data; - - //if(offset>=0x1000 && errorlog) - // fprintf(errorlog,"CPU #%d PC %04x: write shared ram %04x=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); + if(offset<0x100) + { + namcos1_wavedata_w(offset,data); + return; + } + if(offset<0x140) + { + namcos1_sound_w(offset-0x100,data); + return; + } + /* shared ram */ + namco_wavedata[offset] = data; + + //if(offset>=0x1000 && errorlog) + // fprintf(errorlog,"CPU #%d PC %04x: write shared ram %04x=%02x\n",cpu_getactivecpu(),cpu_get_pc(),offset,data); } /* ROM handlers */ static void rom_w( int offset, int data ) { - if(errorlog) - fprintf(errorlog,"CPU #%d PC %04x: warning - write %02x to rom address %04x\n",cpu_getactivecpu(),cpu_get_pc(),data,offset); + if(errorlog) + fprintf(errorlog,"CPU #%d PC %04x: warning - write %02x to rom address %04x\n",cpu_getactivecpu(),cpu_get_pc(),data,offset); } /* error handlers */ static int unknown_r( int offset ) { - if(errorlog) - fprintf(errorlog,"CPU #%d PC %04x: warning - read from unknown chip\n",cpu_getactivecpu(),cpu_get_pc() ); - return 0; + if(errorlog) + fprintf(errorlog,"CPU #%d PC %04x: warning - read from unknown chip\n",cpu_getactivecpu(),cpu_get_pc() ); + return 0; } static void unknown_w( int offset, int data) { - if(errorlog) - fprintf(errorlog,"CPU #%d PC %04x: warning - wrote to unknown chip\n",cpu_getactivecpu(),cpu_get_pc() ); + if(errorlog) + fprintf(errorlog,"CPU #%d PC %04x: warning - wrote to unknown chip\n",cpu_getactivecpu(),cpu_get_pc() ); } /* Bank handler definitions */ @@ -469,70 +536,70 @@ typedef int (*handler_r)(int offset); typedef void (*handler_w)(int offset, int data); typedef struct { - handler_r bank_handler_r; - handler_w bank_handler_w; - int bank_offset; - unsigned char *bank_pointer; + handler_r bank_handler_r; + handler_w bank_handler_w; + int bank_offset; + unsigned char *bank_pointer; } bankhandler; static bankhandler namcos1_bank_element[NAMCOS1_MAX_BANK]; /* This is where we store our handlers */ -/* 2 cpus with 8 banks of 8k each */ +/* 2 cpus with 8 banks of 8k each */ static bankhandler namcos1_banks[2][8]; /* Main bankswitching routine */ void namcos1_bankswitch_w( int offset, int data ) { - static int chip = 0; - - if ( offset & 1 ) { - int bank = ( offset >> 9 ) & 0x07; //0x0f; - int cpu = cpu_getactivecpu(); - chip &= 0x0300; - chip |= ( data & 0xff ); - /* copy bank handler */ - namcos1_banks[cpu][bank].bank_handler_r = namcos1_bank_element[chip].bank_handler_r; - namcos1_banks[cpu][bank].bank_handler_w = namcos1_bank_element[chip].bank_handler_w; - namcos1_banks[cpu][bank].bank_offset = namcos1_bank_element[chip].bank_offset; - namcos1_banks[cpu][bank].bank_pointer = namcos1_bank_element[chip].bank_pointer; - //memcpy( &namcos1_banks[cpu][bank] , &namcos1_bank_element[chip] , sizeof(bankhandler)); - - /* unmapped bank warning */ - if( namcos1_banks[cpu][bank].bank_handler_r == unknown_r) - { - if (errorlog) - fprintf(errorlog,"CPU #%d PC %04x:warning unknown chip selected bank %x=$%04x\n", cpu , cpu_get_pc(), bank , chip ); - } - - /* renew pc base */ -// change_pc16(cpu_get_pc()); - } else { - chip &= 0x00ff; - chip |= ( data & 0xff ) << 8; - } + static int chip = 0; + + if ( offset & 1 ) { + int bank = ( offset >> 9 ) & 0x07; //0x0f; + int cpu = cpu_getactivecpu(); + chip &= 0x0300; + chip |= ( data & 0xff ); + /* copy bank handler */ + namcos1_banks[cpu][bank].bank_handler_r = namcos1_bank_element[chip].bank_handler_r; + namcos1_banks[cpu][bank].bank_handler_w = namcos1_bank_element[chip].bank_handler_w; + namcos1_banks[cpu][bank].bank_offset = namcos1_bank_element[chip].bank_offset; + namcos1_banks[cpu][bank].bank_pointer = namcos1_bank_element[chip].bank_pointer; + //memcpy( &namcos1_banks[cpu][bank] , &namcos1_bank_element[chip] , sizeof(bankhandler)); + + /* unmapped bank warning */ + if( namcos1_banks[cpu][bank].bank_handler_r == unknown_r) + { + if (errorlog) + fprintf(errorlog,"CPU #%d PC %04x:warning unknown chip selected bank %x=$%04x\n", cpu , cpu_get_pc(), bank , chip ); + } + + /* renew pc base */ +// change_pc16(cpu_get_pc()); + } else { + chip &= 0x00ff; + chip |= ( data & 0xff ) << 8; + } } /* Sub cpu set start bank port */ void namcos1_subcpu_bank(int offset,int data) { - int oldcpu = cpu_getactivecpu(); + int oldcpu = cpu_getactivecpu(); - //if(errorlog) fprintf(errorlog,"cpu1 bank selected %02x=%02x\n",offset,data); - namcos1_cpu1_banklatch = (namcos1_cpu1_banklatch&0x300)|data; - /* Prepare code for Cpu 1 */ - cpu_setactivecpu( 1 ); - namcos1_bankswitch_w( 0x0e00, namcos1_cpu1_banklatch>>8 ); - namcos1_bankswitch_w( 0x0e01, namcos1_cpu1_banklatch&0xff); - /* cpu_set_reset_line(1,PULSE_LINE); */ + //if(errorlog) fprintf(errorlog,"cpu1 bank selected %02x=%02x\n",offset,data); + namcos1_cpu1_banklatch = (namcos1_cpu1_banklatch&0x300)|data; + /* Prepare code for Cpu 1 */ + cpu_setactivecpu( 1 ); + namcos1_bankswitch_w( 0x0e00, namcos1_cpu1_banklatch>>8 ); + namcos1_bankswitch_w( 0x0e01, namcos1_cpu1_banklatch&0xff); + /* cpu_set_reset_line(1,PULSE_LINE); */ - cpu_setactivecpu( oldcpu ); + cpu_setactivecpu( oldcpu ); } #define MR_HANDLER(cpu,bank) \ int namcos1_##cpu##_banked_area##bank##_r(int offset) {\ - if( namcos1_banks[cpu][bank].bank_handler_r) \ - return (*namcos1_banks[cpu][bank].bank_handler_r)( offset+namcos1_banks[cpu][bank].bank_offset); \ - return namcos1_banks[cpu][bank].bank_pointer[offset]; } + if( namcos1_banks[cpu][bank].bank_handler_r) \ + return (*namcos1_banks[cpu][bank].bank_handler_r)( offset+namcos1_banks[cpu][bank].bank_offset); \ + return namcos1_banks[cpu][bank].bank_pointer[offset]; } MR_HANDLER(0,0) MR_HANDLER(0,1) @@ -554,12 +621,12 @@ MR_HANDLER(1,7) #define MW_HANDLER(cpu,bank) \ void namcos1_##cpu##_banked_area##bank##_w( int offset, int data ) {\ - if( namcos1_banks[cpu][bank].bank_handler_w) \ - { \ - (*namcos1_banks[cpu][bank].bank_handler_w)( offset+ namcos1_banks[cpu][bank].bank_offset,data ); \ - return; \ - }\ - namcos1_banks[cpu][bank].bank_pointer[offset]=data; \ + if( namcos1_banks[cpu][bank].bank_handler_w) \ + { \ + (*namcos1_banks[cpu][bank].bank_handler_w)( offset+ namcos1_banks[cpu][bank].bank_offset,data ); \ + return; \ + }\ + namcos1_banks[cpu][bank].bank_pointer[offset]=data; \ } MW_HANDLER(0,0) @@ -579,53 +646,53 @@ MW_HANDLER(1,6) #undef MW_HANDLER /******************************************************************************* -* * -* 63701 MCU emulation (CUS64) * -* * +* * +* 63701 MCU emulation (CUS64) * +* * *******************************************************************************/ static int mcu_patch_data; void namcos1_cpu_control_w( int offset, int data ) { -// if(errorlog) fprintf(errorlog,"reset controll pc=%04x %02x\n",cpu_get_pc(),data); - if( (data&1)^namcos1_reset) - { - namcos1_reset = data&1; - if (namcos1_reset) - { - cpu_set_reset_line(1,CLEAR_LINE); - cpu_set_reset_line(2,CLEAR_LINE); - cpu_set_reset_line(3,CLEAR_LINE); - mcu_patch_data = 0; - } - else - { - cpu_set_reset_line(1,ASSERT_LINE); - cpu_set_reset_line(2,ASSERT_LINE); - cpu_set_reset_line(3,ASSERT_LINE); - } - } +// if(errorlog) fprintf(errorlog,"reset control pc=%04x %02x\n",cpu_get_pc(),data); + if( (data&1)^namcos1_reset) + { + namcos1_reset = data&1; + if (namcos1_reset) + { + cpu_set_reset_line(1,CLEAR_LINE); + cpu_set_reset_line(2,CLEAR_LINE); + cpu_set_reset_line(3,CLEAR_LINE); + mcu_patch_data = 0; + } + else + { + cpu_set_reset_line(1,ASSERT_LINE); + cpu_set_reset_line(2,ASSERT_LINE); + cpu_set_reset_line(3,ASSERT_LINE); + } + } } /******************************************************************************* -* * -* Sound banking emulation (CUS121) * -* * +* * +* Sound banking emulation (CUS121) * +* * *******************************************************************************/ void namcos1_sound_bankswitch_w( int offset, int data ) { - unsigned char *RAM = memory_region(REGION_CPU3); - int bank = ( data >> 4 ) & 0x07; + unsigned char *RAM = memory_region(REGION_CPU3); + int bank = ( data >> 4 ) & 0x07; - cpu_setbank( 1, &RAM[ 0x0c000 + ( 0x4000 * bank ) ] ); + cpu_setbank( 1, &RAM[ 0x0c000 + ( 0x4000 * bank ) ] ); } /******************************************************************************* -* * -* CPU idling spinlock routine * -* * +* * +* CPU idling spinlock routine * +* * *******************************************************************************/ static unsigned char *sound_spinlock_ram; static int sound_spinlock_pc; @@ -633,285 +700,289 @@ static int sound_spinlock_pc; /* sound cpu */ static int namcos1_sound_spinlock_r(int offset) { - if(cpu_get_pc()==sound_spinlock_pc && *sound_spinlock_ram == 0) - cpu_spinuntil_int(); - return *sound_spinlock_ram; + if(cpu_get_pc()==sound_spinlock_pc && *sound_spinlock_ram == 0) + cpu_spinuntil_int(); + return *sound_spinlock_ram; } /******************************************************************************* -* * -* MCU banking emulation and patch * -* * +* * +* MCU banking emulation and patch * +* * *******************************************************************************/ /* mcu banked rom area select */ void namcos1_mcu_bankswitch_w(int offset,int data) { - int addr; - /* bit 2-7 : chip select line of ROM chip */ - switch(data&0xfc) - { - case 0xf8: addr = 0x10000; break; /* bit 2 : ROM 0 */ - case 0xf4: addr = 0x30000; break; /* bit 3 : ROM 1 */ - case 0xec: addr = 0x50000; break; /* bit 4 : ROM 2 */ - case 0xdc: addr = 0x70000; break; /* bit 5 : ROM 3 */ - case 0xbc: addr = 0x90000; break; /* bit 6 : ROM 4 */ - case 0x7c: addr = 0xb0000; break; /* bit 7 : ROM 5 */ - default: addr = 0x100000; /* illegal */ - } - /* bit 0-1 : address line A15-A16 */ - addr += (data&3)*0x8000; - if( addr >= memory_region_length(REGION_CPU4)) - { - if(errorlog) - fprintf(errorlog,"unmapped mcu bank selected pc=%04x bank=%02x\n",cpu_get_pc(),data); - addr = 0x4000; - } - cpu_setbank( 4, memory_region(REGION_CPU4)+addr ); + int addr; + /* bit 2-7 : chip select line of ROM chip */ + switch(data&0xfc) + { + case 0xf8: addr = 0x10000; break; /* bit 2 : ROM 0 */ + case 0xf4: addr = 0x30000; break; /* bit 3 : ROM 1 */ + case 0xec: addr = 0x50000; break; /* bit 4 : ROM 2 */ + case 0xdc: addr = 0x70000; break; /* bit 5 : ROM 3 */ + case 0xbc: addr = 0x90000; break; /* bit 6 : ROM 4 */ + case 0x7c: addr = 0xb0000; break; /* bit 7 : ROM 5 */ + default: addr = 0x100000; /* illegal */ + } + /* bit 0-1 : address line A15-A16 */ + addr += (data&3)*0x8000; + if( addr >= memory_region_length(REGION_CPU4)) + { + if(errorlog) + fprintf(errorlog,"unmapped mcu bank selected pc=%04x bank=%02x\n",cpu_get_pc(),data); + addr = 0x4000; + } + cpu_setbank( 4, memory_region(REGION_CPU4)+addr ); } /* This point is very obscure, but i havent found any better way yet. */ -/* Works with all games so far. */ +/* Works with all games so far. */ /* patch points of memory address */ /* CPU0/1 bank[17f][1000] */ -/* CPU2 [7000] */ -/* CPU3 [c000] */ +/* CPU2 [7000] */ +/* CPU3 [c000] */ -/* This memory point should be set $A6 by anyware , but */ -/* I found set $A6 only initialize in MCU */ +/* This memory point should be set $A6 by anywhere, but */ +/* I found set $A6 only initialize in MCU */ /* This patch kill write this data by MCU case $A6 to xx(clear) */ void namcos1_mcu_patch_w(int offset,int data) { extern void mwh_bank3(int _address,int _data); - //if(errorlog) fprintf(errorlog,"mcu C000 write pc=%04x data=%02x\n",cpu_get_pc(),data); - if(mcu_patch_data == 0xa6) return; - mcu_patch_data = data; + //if(errorlog) fprintf(errorlog,"mcu C000 write pc=%04x data=%02x\n",cpu_get_pc(),data); + if(mcu_patch_data == 0xa6) return; + mcu_patch_data = data; - mwh_bank3( offset, data ); + mwh_bank3( offset, data ); } /******************************************************************************* -* * -* Initialization * -* * +* * +* Initialization * +* * *******************************************************************************/ static int namcos1_setopbase_0 (int pc) { - int bank = (pc>>13)&7; - OP_RAM = OP_ROM = (namcos1_banks[0][bank].bank_pointer) - (bank<<13); - /* memory.c output warning - op-code execute on mapped i/o */ - /* but it is necessary to continue cpu_setOPbase16 function */ - /* for update current operationhardware(ophw) code */ - return pc; + int bank = (pc>>13)&7; + OP_RAM = OP_ROM = (namcos1_banks[0][bank].bank_pointer) - (bank<<13); + /* memory.c output warning - op-code execute on mapped i/o */ + /* but it is necessary to continue cpu_setOPbase16 function */ + /* for update current operationhardware(ophw) code */ + return pc; } static int namcos1_setopbase_1 (int pc) { - int bank = (pc>>13)&7; - OP_RAM = OP_ROM = (namcos1_banks[1][bank].bank_pointer) - (bank<<13); - /* memory.c output warning - op-code execute on mapped i/o */ - /* but it is necessary to continue cpu_setOPbase16 function */ - /* for update current operationhardware(ophw) code */ - return pc; + int bank = (pc>>13)&7; + OP_RAM = OP_ROM = (namcos1_banks[1][bank].bank_pointer) - (bank<<13); + /* memory.c output warning - op-code execute on mapped i/o */ + /* but it is necessary to continue cpu_setOPbase16 function */ + /* for update current operationhardware(ophw) code */ + return pc; } static void namcos1_install_bank(int start,int end,handler_r hr,handler_w hw, - int offset,unsigned char *pointer) + int offset,unsigned char *pointer) { - int i; - for(i=start;i<=end;i++) - { - namcos1_bank_element[i].bank_handler_r = hr; - namcos1_bank_element[i].bank_handler_w = hw; - namcos1_bank_element[i].bank_offset = offset; - namcos1_bank_element[i].bank_pointer = pointer; - offset += 0x2000; - if(pointer) pointer += 0x2000; - } + int i; + for(i=start;i<=end;i++) + { + namcos1_bank_element[i].bank_handler_r = hr; + namcos1_bank_element[i].bank_handler_w = hw; + namcos1_bank_element[i].bank_offset = offset; + namcos1_bank_element[i].bank_pointer = pointer; + offset += 0x2000; + if(pointer) pointer += 0x2000; + } } static void namcos1_install_rom_bank(int start,int end,int size,int offset) { - unsigned char *BROM = memory_region(REGION_USER1); - int step = size/0x2000; - while(start < end) - { - namcos1_install_bank(start,start+step-1,0,rom_w,0,&BROM[offset]); - start += step; - } + unsigned char *BROM = memory_region(REGION_USER1); + int step = size/0x2000; + while(start < end) + { + namcos1_install_bank(start,start+step-1,0,rom_w,0,&BROM[offset]); + start += step; + } } static void namcos1_build_banks(handler_r key_r,handler_w key_w) { - int i; - - /* S1 RAM pointer set */ - s1ram = memory_region(REGION_USER2); - - /* clear all banks to unknown area */ - for(i=0;i=0 : delay cycle */ - /* delay<0 : slide cycle */ + int sync_cpu; /* synchronus cpu attribute */ + int sliceHz; /* slice cycle */ + int delayHz; /* delay>=0 : delay cycle */ + /* delay<0 : slide cycle */ }; struct namcos1_specific { - /* keychip */ - int key_id_query , key_id; - handler_r key_r; - handler_w key_w; - /* cpu slice timer */ - const struct namcos1_slice_timer *slice_timer; - /* optimize flag , use tilemap for playfield */ - int tilemap_use; + /* keychip */ + int key_id_query , key_id; + handler_r key_r; + handler_w key_w; + /* cpu slice timer */ + const struct namcos1_slice_timer *slice_timer; + /* optimize flag , use tilemap for playfield */ + int tilemap_use; }; static void namcos1_driver_init(const struct namcos1_specific *specific ) { - /* keychip id */ - key_id_query = specific->key_id_query; - key_id = specific->key_id; - - /* tilemap use optimize option */ - namcos1_set_optimize( specific->tilemap_use ); - - /* build bank elements */ - namcos1_build_banks(specific->key_r,specific->key_w); - - /* override opcode handling for extended memory bank handler */ - cpu_setOPbaseoverride( 0,namcos1_setopbase_0 ); - cpu_setOPbaseoverride( 1,namcos1_setopbase_1 ); - - /* sound cpu speedup optimize (auto detect) */ - { - unsigned char *RAM = memory_region(REGION_CPU3); /* sound cpu */ - int addr,flag_ptr; - - for(addr=0xd000;addr<0xd0ff;addr++) - { - if(RAM[addr+0]==0xb6 && /* lda xxxx */ - RAM[addr+3]==0x27 && /* BEQ addr */ - RAM[addr+4]==0xfb ) - { - flag_ptr = RAM[addr+1]*256 + RAM[addr+2]; - if(flag_ptr>0x5140 && flag_ptr<0x5400) - { - sound_spinlock_pc = addr+3; - sound_spinlock_ram = install_mem_read_handler(2,flag_ptr,flag_ptr,namcos1_sound_spinlock_r); - if(errorlog) - fprintf(errorlog,"Set sound cpu spinlock : pc=%04x , addr = %04x\n",sound_spinlock_pc,flag_ptr); - break; - } - } - } - } + /* keychip id */ + key_id_query = specific->key_id_query; + key_id = specific->key_id; + + /* tilemap use optimize option */ + namcos1_set_optimize( specific->tilemap_use ); + + /* build bank elements */ + namcos1_build_banks(specific->key_r,specific->key_w); + + /* override opcode handling for extended memory bank handler */ + cpu_setOPbaseoverride( 0,namcos1_setopbase_0 ); + cpu_setOPbaseoverride( 1,namcos1_setopbase_1 ); + + /* sound cpu speedup optimize (auto detect) */ + { + unsigned char *RAM = memory_region(REGION_CPU3); /* sound cpu */ + int addr,flag_ptr; + + for(addr=0xd000;addr<0xd0ff;addr++) + { + if(RAM[addr+0]==0xb6 && /* lda xxxx */ + RAM[addr+3]==0x27 && /* BEQ addr */ + RAM[addr+4]==0xfb ) + { + flag_ptr = RAM[addr+1]*256 + RAM[addr+2]; + if(flag_ptr>0x5140 && flag_ptr<0x5400) + { + sound_spinlock_pc = addr+3; + sound_spinlock_ram = install_mem_read_handler(2,flag_ptr,flag_ptr,namcos1_sound_spinlock_r); + if(errorlog) + fprintf(errorlog,"Set sound cpu spinlock : pc=%04x , addr = %04x\n",sound_spinlock_pc,flag_ptr); + break; + } + } + } + } #if NEW_TIMER - /* all cpu's does not need synchronization to all timers */ - cpu_set_full_synchronize(SYNC_NO_CPU); - { - const struct namcos1_slice_timer *slice = specific->slice_timer; - while(slice->sync_cpu != SYNC_NO_CPU) - { - /* start CPU slice timer */ - cpu_start_extend_time_slice(slice->sync_cpu, - TIME_IN_HZ(slice->delayHz),TIME_IN_HZ(slice->sliceHz) ); - slice++; - } - } + /* all cpu's does not need synchronization to all timers */ + cpu_set_full_synchronize(SYNC_NO_CPU); + { + const struct namcos1_slice_timer *slice = specific->slice_timer; + while(slice->sync_cpu != SYNC_NO_CPU) + { + /* start CPU slice timer */ + cpu_start_extend_time_slice(slice->sync_cpu, + TIME_IN_HZ(slice->delayHz),TIME_IN_HZ(slice->sliceHz) ); + slice++; + } + } #else - /* compatible with old timer system */ - timer_pulse(TIME_IN_HZ(60*25),0,0); + /* compatible with old timer system */ + timer_pulse(TIME_IN_HZ(60*25),0,0); #endif } @@ -919,357 +990,412 @@ static void namcos1_driver_init(const struct namcos1_specific *specific ) /* normaly CPU slice optimize */ /* slice order is 0:2:1:x:0:3:1:x */ static const struct namcos1_slice_timer normal_slice[]={ - { SYNC_2CPU(0,1),60*20,-60*20*2 }, /* CPU 0,1 20/vblank , slide slice */ - { SYNC_2CPU(2,3),60*5,-(60*5*2+60*20*4) }, /* CPU 2,3 10/vblank */ - { SYNC_NO_CPU } + { SYNC_2CPU(0,1),60*20,-60*20*2 }, /* CPU 0,1 20/vblank , slide slice */ + { SYNC_2CPU(2,3),60*5,-(60*5*2+60*20*4) }, /* CPU 2,3 10/vblank */ + { SYNC_NO_CPU } }; #else static const struct namcos1_slice_timer normal_slice[]={{0}}; #endif -/*********************************************************************** -* Shadowland / Youkai Douchuuki specific * -***********************************************************************/ - +/******************************************************************************* +* Shadowland / Youkai Douchuuki specific * +*******************************************************************************/ void init_shadowld( void ) { - const struct namcos1_specific shadowld_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&shadowld_specific); + const struct namcos1_specific shadowld_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&shadowld_specific); } -/*********************************************************************** -* Dragon Spirit specific * -***********************************************************************/ - -/* Theres is an id check followed by some key nightmare */ +/******************************************************************************* +* Dragon Spirit specific * +*******************************************************************************/ void init_dspirit( void ) { - const struct namcos1_specific dspirit_specific= - { - 0x00,0x36, /* key query , key id */ - dspirit_key_r,dspirit_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&dspirit_specific); + const struct namcos1_specific dspirit_specific= + { + 0x00,0x36, /* key query , key id */ + dspirit_key_r,dspirit_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&dspirit_specific); } /******************************************************************************* -* Quester specific * +* Quester specific * *******************************************************************************/ - -/* Theres is an id check followed by some key nightmare */ void init_quester( void ) { - const struct namcos1_specific quester_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&quester_specific); + const struct namcos1_specific quester_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&quester_specific); } /******************************************************************************* -* Blazer specific * +* Blazer specific * *******************************************************************************/ - -/* Theres is an id check followed by some key nightmare */ - void init_blazer( void ) { - const struct namcos1_specific blazer_specific= - { - 0x00,0x13, /* key query , key id */ - blazer_key_r,blazer_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&blazer_specific); + const struct namcos1_specific blazer_specific= + { + 0x00,0x13, /* key query , key id */ + blazer_key_r,blazer_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&blazer_specific); } /******************************************************************************* -* Pacmania / Pacmania (Japan) specific * +* Pac-Mania / Pac-Mania (Japan) specific * *******************************************************************************/ void init_pacmania( void ) { - const struct namcos1_specific pacmania_specific= - { - 0x4b,0x12, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&pacmania_specific); + const struct namcos1_specific pacmania_specific= + { + 0x4b,0x12, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&pacmania_specific); } /******************************************************************************* -* Galaga 88 / Galaga 88 (Japan) specific * +* Galaga '88 / Galaga '88 (Japan) specific * *******************************************************************************/ void init_galaga88( void ) { - const struct namcos1_specific galaga88_specific= - { - 0x2d,0x31, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&galaga88_specific); + const struct namcos1_specific galaga88_specific= + { + 0x2d,0x31, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&galaga88_specific); } -#if 0 /******************************************************************************* -* World Stadium specific * +* World Stadium specific * *******************************************************************************/ -void init_wstadium( void ) +void init_ws( void ) { - const struct namcos1_specific wstadium_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&wstadium_specific); + const struct namcos1_specific ws_specific= + { + 0xd3,0x07, /* key query , key id */ + ws_key_r,ws_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&ws_specific); } -#endif /******************************************************************************* -* Berabohman specific * +* Beraboh Man specific * *******************************************************************************/ +static int berabohm_buttons_r(int offset) +{ + int res; + + + if (offset == 0) + { + if (berabohm_input_counter == 0) res = readinputport(0); + else + { + static int counter[4]; + + res = readinputport(4 + (berabohm_input_counter-1)); + if (res & 0x80) + { + if (counter[berabohm_input_counter-1] >= 0) +// res = 0x40 | counter[berabohm_input_counter-1]; I can't get max power with this... + res = 0x40 | (counter[berabohm_input_counter-1]>>1); + else + { + if (res & 0x40) res = 0x40; + else res = 0x00; + } + } + else if (res & 0x40) + { + if (counter[berabohm_input_counter-1] < 0x3f) + { + counter[berabohm_input_counter-1]++; + res = 0x00; + } + else res = 0x7f; + } + else + counter[berabohm_input_counter-1] = -1; + } + berabohm_input_counter = (berabohm_input_counter+1) % 5; + } + else + { + static int clk; + + res = 0; + clk++; + if (clk & 1) res |= 0x40; + else if (berabohm_input_counter == 4) res |= 0x10; + + res |= (readinputport(1) & 0x8f); + } + + return res; +} + void init_berabohm( void ) { - const struct namcos1_specific berabohm_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&berabohm_specific); + const struct namcos1_specific berabohm_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&berabohm_specific); + install_mem_read_handler(3,0x1400,0x1401,berabohm_buttons_r); } /******************************************************************************* -* Alice in Wonderland / Marchen Maze specific * +* Alice in Wonderland / Marchen Maze specific * *******************************************************************************/ void init_alice( void ) { - const struct namcos1_specific alice_specific= - { - 0x5b,0x25, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&alice_specific); + const struct namcos1_specific alice_specific= + { + 0x5b,0x25, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&alice_specific); } /******************************************************************************* -* Bakutotsu Kijuutei specific * +* Bakutotsu Kijuutei specific * *******************************************************************************/ void init_bakutotu( void ) { - const struct namcos1_specific bakutotu_specific= - { - 0x03,0x22, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&bakutotu_specific); + const struct namcos1_specific bakutotu_specific= + { + 0x03,0x22, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&bakutotu_specific); } /******************************************************************************* -* World Court specific * +* World Court specific * *******************************************************************************/ void init_wldcourt( void ) { - const struct namcos1_specific worldcourt_specific= - { - 0x00,0x35, /* key query , key id */ - rev2_key_r,rev2_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&worldcourt_specific); + const struct namcos1_specific worldcourt_specific= + { + 0x00,0x35, /* key query , key id */ + rev2_key_r,rev2_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&worldcourt_specific); } /******************************************************************************* -* Splatter House specific * +* Splatter House specific * *******************************************************************************/ - -/* Theres is an id check followed by some key nightmare */ - void init_splatter( void ) { - const struct namcos1_specific splatter_specific= - { - 0x00,0x00, /* key query , key id */ - rev2_key_r,rev2_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&splatter_specific); + const struct namcos1_specific splatter_specific= + { + 0x00,0x00, /* key query , key id */ + rev2_key_r,rev2_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&splatter_specific); } /******************************************************************************* -* Face Off specific * +* Face Off specific * *******************************************************************************/ void init_faceoff( void ) { - const struct namcos1_specific faceoff_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&faceoff_specific); + const struct namcos1_specific faceoff_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&faceoff_specific); } /******************************************************************************* -* Rompers specific * +* Rompers specific * *******************************************************************************/ void init_rompers( void ) { - const struct namcos1_specific rompers_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&rompers_specific); - key[0x70] = 0xb6; + const struct namcos1_specific rompers_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&rompers_specific); + key[0x70] = 0xb6; } /******************************************************************************* -* Blast Off specific * +* Blast Off specific * *******************************************************************************/ void init_blastoff( void ) { - const struct namcos1_specific blastoff_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&blastoff_specific); - key[0] = 0xb7; + const struct namcos1_specific blastoff_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&blastoff_specific); + key[0] = 0xb7; } -#if 0 /******************************************************************************* -* World Stadium 89 specific * +* World Stadium '89 specific * *******************************************************************************/ void init_ws89( void ) { - const struct namcos1_specific ws89_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&ws89_specific); + const struct namcos1_specific ws89_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&ws89_specific); + + key[0x20] = 0xb8; } -#endif /******************************************************************************* -* Dangerous Seed specific * +* Dangerous Seed specific * *******************************************************************************/ void init_dangseed( void ) { - const struct namcos1_specific dangseed_specific= - { - 0x00,0x34, /* key query , key id */ - dangseed_key_r,dangseed_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&dangseed_specific); + const struct namcos1_specific dangseed_specific= + { + 0x00,0x34, /* key query , key id */ + dangseed_key_r,dangseed_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&dangseed_specific); } /******************************************************************************* -* World Stadium 90 specific * +* World Stadium '90 specific * *******************************************************************************/ -/* Theres is an id check followed by some key nightmare */ - void init_ws90( void ) { - const struct namcos1_specific ws90_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&ws90_specific); - - key[0x47] = 0x36; - key[0x40] = 0x36; + const struct namcos1_specific ws90_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&ws90_specific); + + key[0x47] = 0x36; + key[0x40] = 0x36; } /******************************************************************************* -* Pistol Daimyo no Bouken specific * +* Pistol Daimyo no Bouken specific * *******************************************************************************/ void init_pistoldm( void ) { - const struct namcos1_specific pistoldm_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&pistoldm_specific); - //key[0x17] = ; - //key[0x07] = ; - key[0x43] = 0x35; + const struct namcos1_specific pistoldm_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&pistoldm_specific); + //key[0x17] = ; + //key[0x07] = ; + key[0x43] = 0x35; } /******************************************************************************* -* Souko Ban DX specific * +* Souko Ban DX specific * *******************************************************************************/ void init_soukobdx( void ) { - const struct namcos1_specific soukobdx_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&soukobdx_specific); - //key[0x27] = ; - //key[0x07] = ; - key[0x43] = 0x37; + const struct namcos1_specific soukobdx_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&soukobdx_specific); + //key[0x27] = ; + //key[0x07] = ; + key[0x43] = 0x37; +} + +/******************************************************************************* +* Puzzle Club specific * +*******************************************************************************/ +void init_puzlclub( void ) +{ + const struct namcos1_specific puzlclub_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&puzlclub_specific); + key[0x03] = 0x35; } /******************************************************************************* -* Tank Force specific * +* Tank Force specific * *******************************************************************************/ void init_tankfrce( void ) { - const struct namcos1_specific tankfrce_specific= - { - 0x00,0x00, /* key query , key id */ - rev1_key_r,rev1_key_w, /* key handler */ - normal_slice, /* CPU slice normal */ - 1 /* use tilemap flag : speedup optimize */ - }; - namcos1_driver_init(&tankfrce_specific); - //key[0x57] = ; - //key[0x17] = ; - key[0x2b] = 0xb9; - key[0x50] = 0xb9; + const struct namcos1_specific tankfrce_specific= + { + 0x00,0x00, /* key query , key id */ + rev1_key_r,rev1_key_w, /* key handler */ + normal_slice, /* CPU slice normal */ + 1 /* use tilemap flag : speedup optimize */ + }; + namcos1_driver_init(&tankfrce_specific); + //key[0x57] = ; + //key[0x17] = ; + key[0x2b] = 0xb9; + key[0x50] = 0xb9; } diff --git a/src/machine/namcos2.c b/src/machine/namcos2.c index 1f7419dd3..e520a03bf 100644 --- a/src/machine/namcos2.c +++ b/src/machine/namcos2.c @@ -23,7 +23,7 @@ int namcos2_gametype=0; /*************************************************************/ -/* Perform basic machine initialisation */ +/* Perform basic machine initialisation */ /*************************************************************/ void namcos2_init_machine(void) @@ -41,7 +41,7 @@ void namcos2_init_machine(void) memset( namcos2_68k_serial_comms_ram, 0, 0x4000 ); /* Initialise the bank select in the sound CPU */ - namcos2_sound_bankselect_w(0,0); /* Page in bank 0 */ + namcos2_sound_bankselect_w(0,0); /* Page in bank 0 */ /* Place CPU2 & CPU3 into the reset condition */ namcos2_68k_master_C148_w(0x1e2000-0x1c0000,0); @@ -67,7 +67,7 @@ void namcos2_init_machine(void) /*************************************************************/ -/* EEPROM Load/Save and read/write handling */ +/* EEPROM Load/Save and read/write handling */ /*************************************************************/ unsigned char *namcos2_eeprom; @@ -99,7 +99,7 @@ int namcos2_68k_eeprom_r( int offset ) } /*************************************************************/ -/* 68000 Shared memory area - Data ROM area */ +/* 68000 Shared memory area - Data ROM area */ /*************************************************************/ int namcos2_68k_data_rom_r(int offset) @@ -110,74 +110,74 @@ int namcos2_68k_data_rom_r(int offset) /*************************************************************/ -/* 68000 Shared memory area - Video RAM control */ +/* 68000 Shared memory area - Video RAM control */ /*************************************************************/ int namcos2_68k_vram_size=0; void namcos2_68k_vram_w(int offset, int data) { - int col=(offset>>1)&0x3f; - int row=(offset>>7)&0x3f; + int col=(offset>>1)&0x3f; + int row=(offset>>7)&0x3f; - COMBINE_WORD_MEM(&videoram[offset],data); + COMBINE_WORD_MEM(&videoram[offset],data); /* Some games appear to use the 409000 region as SRAM to */ - /* communicate between master/slave processors ?? */ + /* communicate between master/slave processors ?? */ if(offset<0x9000) { - switch(offset&0xe000) - { - case 0x0000: + switch(offset&0xe000) + { + case 0x0000: if(namcos2_tilemap0_flip&TILEMAP_FLIPX) col=63-col; if(namcos2_tilemap0_flip&TILEMAP_FLIPY) row=63-row; tilemap_mark_tile_dirty(namcos2_tilemap0,col,row); - break; + break; - case 0x2000: + case 0x2000: if(namcos2_tilemap1_flip&TILEMAP_FLIPX) col=63-col; if(namcos2_tilemap1_flip&TILEMAP_FLIPY) row=63-row; tilemap_mark_tile_dirty(namcos2_tilemap1,col,row); - break; + break; - case 0x4000: + case 0x4000: if(namcos2_tilemap2_flip&TILEMAP_FLIPX) col=63-col; if(namcos2_tilemap2_flip&TILEMAP_FLIPY) row=63-row; tilemap_mark_tile_dirty(namcos2_tilemap2,col,row); - break; + break; - case 0x6000: + case 0x6000: if(namcos2_tilemap3_flip&TILEMAP_FLIPX) col=63-col; if(namcos2_tilemap3_flip&TILEMAP_FLIPY) row=63-row; tilemap_mark_tile_dirty(namcos2_tilemap3,col,row); - break; - - case 0x8000: - if(offset>=0x8010 && offset<0x87f0) - { - offset-=0x10; /* Fixed plane offsets */ - row=((offset&0x7ff)>>1)/36; - col=((offset&0x7ff)>>1)%36; + break; + + case 0x8000: + if(offset>=0x8010 && offset<0x87f0) + { + offset-=0x10; /* Fixed plane offsets */ + row=((offset&0x7ff)>>1)/36; + col=((offset&0x7ff)>>1)%36; if(namcos2_tilemap4_flip&TILEMAP_FLIPX) col=35-col; if(namcos2_tilemap4_flip&TILEMAP_FLIPY) row=27-row; tilemap_mark_tile_dirty(namcos2_tilemap4,col,row); } - else if(offset>=0x8810 && offset<0x8ff0) - { - offset-=0x10; /* Fixed plane offsets */ - row=((offset&0x7ff)>>1)/36; - col=((offset&0x7ff)>>1)%36; + else if(offset>=0x8810 && offset<0x8ff0) + { + offset-=0x10; /* Fixed plane offsets */ + row=((offset&0x7ff)>>1)/36; + col=((offset&0x7ff)>>1)%36; if(namcos2_tilemap5_flip&TILEMAP_FLIPX) col=35-col; if(namcos2_tilemap5_flip&TILEMAP_FLIPY) row=27-row; tilemap_mark_tile_dirty(namcos2_tilemap5,col,row); } - break; + break; - default: - break; - } - } + default: + break; + } + } } int namcos2_68k_vram_r(int offset) @@ -270,7 +270,7 @@ int namcos2_68k_vram_ctrl_r( int offset ) /*************************************************************/ -/* 68000 Shared memory area - Video palette control */ +/* 68000 Shared memory area - Video palette control */ /*************************************************************/ unsigned char *namcos2_68k_palette_ram; @@ -297,13 +297,13 @@ int namcos2_68k_video_palette_r( int offset ) void namcos2_68k_video_palette_w( int offset, int data ) { - int oldword = READ_WORD(&namcos2_68k_palette_ram[offset&0xffff]); - int newword = COMBINE_WORD(oldword, data); - int pen,red,green,blue; + int oldword = READ_WORD(&namcos2_68k_palette_ram[offset&0xffff]); + int newword = COMBINE_WORD(oldword, data); + int pen,red,green,blue; - if(oldword != newword) - { - WRITE_WORD(&namcos2_68k_palette_ram[offset&0xffff],newword); + if(oldword != newword) + { + WRITE_WORD(&namcos2_68k_palette_ram[offset&0xffff],newword); /* 0x3000 offset is control registers */ if((offset&0x3000)!=0x3000) @@ -320,10 +320,10 @@ void namcos2_68k_video_palette_w( int offset, int data ) } /*************************************************************/ -/* 68000/6809/63705 Shared memory area - DUAL PORT Memory */ +/* 68000/6809/63705 Shared memory area - DUAL PORT Memory */ /*************************************************************/ -unsigned char *namcos2_dpram=NULL; /* 2Kx8 */ +unsigned char *namcos2_dpram=NULL; /* 2Kx8 */ int namcos2_68k_dpram_word_r(int offset) { @@ -334,7 +334,7 @@ int namcos2_68k_dpram_word_r(int offset) void namcos2_68k_dpram_word_w(int offset, int data) { offset = offset/2; - if(!(data & 0x00ff0000)) namcos2_dpram[offset&0x7ff] = data & 0xff; + if(!(data & 0x00ff0000)) namcos2_dpram[offset&0x7ff] = data & 0xff; } int namcos2_dpram_byte_r(int offset) @@ -349,7 +349,7 @@ void namcos2_dpram_byte_w(int offset, int data) /**************************************************************/ -/* 68000 Shared serial communications processor (CPU5?) */ +/* 68000 Shared serial communications processor (CPU5?) */ /**************************************************************/ unsigned char namcos2_68k_serial_comms_ctrl[0x10]; @@ -375,7 +375,7 @@ int namcos2_68k_serial_comms_ctrl_r(int offset) switch(offset) { case 0x00: - retval|=0x0004; /* Set READY? status bit */ + retval|=0x0004; /* Set READY? status bit */ break; default: break; @@ -394,7 +394,7 @@ void namcos2_68k_serial_comms_ctrl_w(int offset,int data) /*************************************************************/ -/* 68000 Shared SPRITE/OBJECT Memory access/control */ +/* 68000 Shared SPRITE/OBJECT Memory access/control */ /*************************************************************/ /* The sprite bank register also holds the colour bank for */ @@ -405,13 +405,13 @@ int namcos2_sprite_bank=0; void namcos2_68k_sprite_ram_w(int offset, int data) { - COMBINE_WORD_MEM(&namcos2_sprite_ram[offset&0x3fff],data); + COMBINE_WORD_MEM(&namcos2_sprite_ram[offset&0x3fff],data); } void namcos2_68k_sprite_bank_w( int offset, int data ) { - int newword = COMBINE_WORD(namcos2_sprite_bank, data); - namcos2_sprite_bank=newword; + int newword = COMBINE_WORD(namcos2_sprite_bank, data); + namcos2_sprite_bank=newword; } int namcos2_68k_sprite_ram_r(int offset) @@ -428,17 +428,17 @@ int namcos2_68k_sprite_bank_r( int offset ) /*************************************************************/ -/* 68000 Shared protection/random key generator */ +/* 68000 Shared protection/random key generator */ /*************************************************************/ // //$d00000 //$d00002 -//$d00004 Write 13 x $0000, read back $00bd from $d00002 (burnf) -//$d00006 Write $b929, read $014a (cosmog, does a jmp $0 if it doesnt get this) -//$d00008 Write $13ec, read $013f (rthun2) -//$d0000a Write $f00f, read $f00f (phelios) -//$d0000c Write $8fc8, read $00b2 (rthun2) -//$d0000e Write $31ad, read $00bd (burnf) +//$d00004 Write 13 x $0000, read back $00bd from $d00002 (burnf) +//$d00006 Write $b929, read $014a (cosmog, does a jmp $0 if it doesnt get this) +//$d00008 Write $13ec, read $013f (rthun2) +//$d0000a Write $f00f, read $f00f (phelios) +//$d0000c Write $8fc8, read $00b2 (rthun2) +//$d0000e Write $31ad, read $00bd (burnf) // unsigned char namcos2_68k_key[0x10]; @@ -458,21 +458,21 @@ void namcos2_68k_key_w( int offset, int data ) /**************************************************************/ -/* ROZ - Rotate & Zoom memory function handlers */ -/* */ -/* ROZ control made up of 8 registers, looks to be split */ -/* into 2 groups of 3 registers one for each plane and two */ -/* other registers ?? */ -/* */ -/* 0 - Plane 2 Offset 0x20000 */ -/* 2 - Plane 2 */ -/* 4 - Plane 2 */ -/* 6 - Plane 1 Offset 0x00000 */ -/* 8 - Plane 1 */ -/* A Plane 1 */ -/* C - Unused */ -/* E - Control reg ?? */ -/* */ +/* ROZ - Rotate & Zoom memory function handlers */ +/* */ +/* ROZ control made up of 8 registers, looks to be split */ +/* into 2 groups of 3 registers one for each plane and two */ +/* other registers ?? */ +/* */ +/* 0 - Plane 2 Offset 0x20000 */ +/* 2 - Plane 2 */ +/* 4 - Plane 2 */ +/* 6 - Plane 1 Offset 0x00000 */ +/* 8 - Plane 1 */ +/* A Plane 1 */ +/* C - Unused */ +/* E - Control reg ?? */ +/* */ /**************************************************************/ unsigned char namcos2_68k_roz_ctrl[0x10]; @@ -502,9 +502,9 @@ int namcos2_68k_roz_ram_r( int offset ) /**************************************************************/ -/* */ -/* Final Lap 1/2/3 Roadway generator function handlers */ -/* */ +/* */ +/* Final Lap 1/2/3 Roadway generator function handlers */ +/* */ /**************************************************************/ unsigned char *namcos2_68k_roadtile_ram=NULL; @@ -543,12 +543,12 @@ int namcos2_68k_road_ctrl_r( int offset ) /*************************************************************/ -/* 68000 Interrupt/IO Handlers - CUSTOM 148 - NOT SHARED */ +/* 68000 Interrupt/IO Handlers - CUSTOM 148 - NOT SHARED */ /*************************************************************/ -#define NO_OF_LINES 256 -#define FRAME_TIME (1.0/60.0) -#define LINE_LENGTH (FRAME_TIME/NO_OF_LINES) +#define NO_OF_LINES 256 +#define FRAME_TIME (1.0/60.0) +#define LINE_LENGTH (FRAME_TIME/NO_OF_LINES) int namcos2_68k_master_C148[0x20]; int namcos2_68k_slave_C148[0x20]; @@ -578,7 +578,7 @@ void namcos2_68k_master_C148_w( int offset, int data ) cpu_set_irq_line(CPU_MASTER, namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; - case 0x1e2000: /* Reset register CPU3 */ + case 0x1e2000: /* Reset register CPU3 */ { data&=0x01; if(data&0x01) @@ -594,7 +594,7 @@ void namcos2_68k_master_C148_w( int offset, int data ) } } break; - case 0x1e4000: /* Reset register CPU2 & CPU4 */ + case 0x1e4000: /* Reset register CPU2 & CPU4 */ { data&=0x01; if(data&0x01) @@ -613,7 +613,7 @@ void namcos2_68k_master_C148_w( int offset, int data ) } } break; - case 0x1e6000: /* Watchdog reset */ + case 0x1e6000: /* Watchdog reset */ /* watchdog_reset_w(0,0); */ break; default: @@ -639,10 +639,10 @@ int namcos2_68k_master_C148_r( int offset ) case 0x1da000: cpu_set_irq_line(CPU_MASTER, namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; - case 0x1e0000: /* EEPROM Status register*/ - return 0xffff; /* Only BIT0 used: 1=EEPROM READY 0=EEPROM BUSY */ + case 0x1e0000: /* EEPROM Status register*/ + return 0xffff; /* Only BIT0 used: 1=EEPROM READY 0=EEPROM BUSY */ break; - case 0x1e6000: /* Watchdog reset */ + case 0x1e6000: /* Watchdog reset */ /* watchdog_reset_w(0,0); */ break; default: @@ -694,7 +694,7 @@ void namcos2_68k_slave_C148_w( int offset, int data ) case 0x1da000: cpu_set_irq_line(CPU_SLAVE, namcos2_68k_slave_C148[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; - case 0x1e6000: /* Watchdog reset */ + case 0x1e6000: /* Watchdog reset */ /* watchdog_reset_w(0,0); */ break; default: @@ -720,7 +720,7 @@ int namcos2_68k_slave_C148_r( int offset ) case 0x1da000: cpu_set_irq_line(CPU_SLAVE, namcos2_68k_slave_C148[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; - case 0x1e6000: /* Watchdog reset */ + case 0x1e6000: /* Watchdog reset */ /* watchdog_reset_w(0,0); */ break; default: @@ -735,7 +735,7 @@ int namcos2_68k_slave_vblank(void) } /**************************************************************/ -/* Sound sub-system */ +/* Sound sub-system */ /**************************************************************/ int namcos2_sound_interrupt(void) @@ -754,9 +754,9 @@ void namcos2_sound_bankselect_w(int offset, int data) /**************************************************************/ -/* */ -/* 68705 IO CPU Support functions */ -/* */ +/* */ +/* 68705 IO CPU Support functions */ +/* */ /**************************************************************/ int namcos2_mcu_interrupt(void) @@ -806,10 +806,13 @@ void namcos2_mcu_analog_ctrl_w( int offset, int data ) namcos2_mcu_analog_data=input_port_9_r(0); break; } +#if 0 /* Perform the offset handling on the input port */ /* this converts it to a twos complement number */ - namcos2_mcu_analog_data-=0x80; - namcos2_mcu_analog_data&=0xff; + if ((namcos2_gametype==NAMCOS2_DIRT_FOX) || + (namcos2_gametype==NAMCOS2_DIRT_FOX_JP)) + namcos2_mcu_analog_data^=0x80; +#endif /* If the interrupt enable bit is set trigger an A/D IRQ */ if(data&0x20) diff --git a/src/machine/namcos2.h b/src/machine/namcos2.h index 8883b5176..d5655f8ca 100644 --- a/src/machine/namcos2.h +++ b/src/machine/namcos2.h @@ -11,60 +11,62 @@ /* CPU reference numbers */ -#define NAMCOS2_CPU1 0 -#define NAMCOS2_CPU2 1 -#define NAMCOS2_CPU3 2 -#define NAMCOS2_CPU4 3 +#define NAMCOS2_CPU1 0 +#define NAMCOS2_CPU2 1 +#define NAMCOS2_CPU3 2 +#define NAMCOS2_CPU4 3 -#define CPU_MASTER NAMCOS2_CPU1 -#define CPU_SLAVE NAMCOS2_CPU2 -#define CPU_SOUND NAMCOS2_CPU3 -#define CPU_MCU NAMCOS2_CPU4 +#define CPU_MASTER NAMCOS2_CPU1 +#define CPU_SLAVE NAMCOS2_CPU2 +#define CPU_SOUND NAMCOS2_CPU3 +#define CPU_MCU NAMCOS2_CPU4 /* VIDHRDW */ -#define GFX_OBJ1 0 -#define GFX_OBJ2 1 -#define GFX_CHR 2 -#define GFX_ROZ 3 +#define GFX_OBJ1 0 +#define GFX_OBJ2 1 +#define GFX_CHR 2 +#define GFX_ROZ 3 /*********************************************/ /* IF GAME SPECIFIC HACKS ARE REQUIRED THEN */ /* USE THE namcos2_gametype VARIABLE TO FIND */ -/* OUT WHAT GAME IS RUNNING */ +/* OUT WHAT GAME IS RUNNING */ /*********************************************/ -#define NAMCOS2_ASSAULT 0x1000 -#define NAMCOS2_ASSAULT_JP 0x1001 -#define NAMCOS2_ASSAULT_PLUS 0x1002 -#define NAMCOS2_BUBBLE_TROUBLE 0x1003 -#define NAMCOS2_BURNING_FORCE 0x1004 -#define NAMCOS2_COSMO_GANG 0x1005 -#define NAMCOS2_COSMO_GANG_US 0x1006 -#define NAMCOS2_DIRT_FOX 0x1007 -#define NAMCOS2_DIRT_FOX_JP 0x1008 -#define NAMCOS2_DRAGON_SABER 0x1009 -#define NAMCOS2_DRAGON_SABER_JP 0x100a -#define NAMCOS2_FINAL_LAP 0x100b -#define NAMCOS2_FINAL_LAP_2 0x100c -#define NAMCOS2_FINAL_LAP_3 0x100d -#define NAMCOS2_FINEST_HOUR 0x100e -#define NAMCOS2_FOUR_TRAX 0x100f -#define NAMCOS2_GOLLY_GHOST 0x1010 -#define NAMCOS2_LUCKY_AND_WILD 0x1011 -#define NAMCOS2_MARVEL_LAND 0x1012 -#define NAMCOS2_METAL_HAWK 0x1013 -#define NAMCOS2_MIRAI_NINJA 0x1014 -#define NAMCOS2_ORDYNE 0x1015 -#define NAMCOS2_PHELIOS 0x1016 -#define NAMCOS2_ROLLING_THUNDER_2 0x1017 -#define NAMCOS2_STEEL_GUNNER 0x1018 -#define NAMCOS2_STEEL_GUNNER_2 0x1019 -#define NAMCOS2_SUPER_WSTADIUM 0x101a -#define NAMCOS2_SUPER_WSTADIUM_92 0x101b -#define NAMCOS2_SUPER_WSTADIUM_93 0x101c -#define NAMCOS2_SUZUKA_8_HOURS 0x101d -#define NAMCOS2_VALKYRIE 0x101e +#define NAMCOS2_ASSAULT 0x1000 +#define NAMCOS2_ASSAULT_JP 0x1001 +#define NAMCOS2_ASSAULT_PLUS 0x1002 +#define NAMCOS2_BUBBLE_TROUBLE 0x1003 +#define NAMCOS2_BURNING_FORCE 0x1004 +#define NAMCOS2_COSMO_GANG 0x1005 +#define NAMCOS2_COSMO_GANG_US 0x1006 +#define NAMCOS2_DIRT_FOX 0x1007 +#define NAMCOS2_DIRT_FOX_JP 0x1008 +#define NAMCOS2_DRAGON_SABER 0x1009 +#define NAMCOS2_DRAGON_SABER_JP 0x100a +#define NAMCOS2_FINAL_LAP 0x100b +#define NAMCOS2_FINAL_LAP_2 0x100c +#define NAMCOS2_FINAL_LAP_3 0x100d +#define NAMCOS2_FINEST_HOUR 0x100e +#define NAMCOS2_FOUR_TRAX 0x100f +#define NAMCOS2_GOLLY_GHOST 0x1010 +#define NAMCOS2_LUCKY_AND_WILD 0x1011 +#define NAMCOS2_MARVEL_LAND 0x1012 +#define NAMCOS2_METAL_HAWK 0x1013 +#define NAMCOS2_MIRAI_NINJA 0x1014 +#define NAMCOS2_ORDYNE 0x1015 +#define NAMCOS2_PHELIOS 0x1016 +#define NAMCOS2_ROLLING_THUNDER_2 0x1017 +#define NAMCOS2_STEEL_GUNNER 0x1018 +#define NAMCOS2_STEEL_GUNNER_2 0x1019 +#define NAMCOS2_SUPER_WSTADIUM 0x101a +#define NAMCOS2_SUPER_WSTADIUM_92 0x101b +#define NAMCOS2_SUPER_WSTADIUM_93 0x101c +#define NAMCOS2_SUZUKA_8_HOURS 0x101d +#define NAMCOS2_SUZUKA_8_HOURS_2 0x101e +#define NAMCOS2_VALKYRIE 0x101f +#define NAMCOS2_KYUUKAI_DOUCHUUKI 0x1020 extern int namcos2_gametype; @@ -82,7 +84,7 @@ void namcos2_init_machine(void); /**************************************************************/ -/* Dual port memory handlers */ +/* Dual port memory handlers */ /**************************************************************/ int namcos2_dpram_byte_r(int offset); void namcos2_dpram_byte_w(int offset, int data); @@ -92,7 +94,7 @@ void namcos2_68k_dpram_word_w(int offset, int data); extern unsigned char *namcos2_dpram; /**************************************************************/ -/* Sprite memory handlers */ +/* Sprite memory handlers */ /**************************************************************/ void namcos2_68k_sprite_ram_w(int offset, int data); void namcos2_68k_sprite_bank_w( int offset, int data ); @@ -104,18 +106,18 @@ extern int namcos2_sprite_bank; /**************************************************************/ -/* EEPROM memory function handlers */ +/* EEPROM memory function handlers */ /**************************************************************/ -#define NAMCOS2_68K_EEPROM_W namcos2_68k_eeprom_w, &namcos2_eeprom, &namcos2_eeprom_size -#define NAMCOS2_68K_EEPROM_R namcos2_68k_eeprom_r +#define NAMCOS2_68K_EEPROM_W namcos2_68k_eeprom_w, &namcos2_eeprom, &namcos2_eeprom_size +#define NAMCOS2_68K_EEPROM_R namcos2_68k_eeprom_r void namcos2_nvram_handler(void *file, int read_or_write); void namcos2_68k_eeprom_w( int offset, int data ); -int namcos2_68k_eeprom_r( int offset ); +int namcos2_68k_eeprom_r( int offset ); extern unsigned char *namcos2_eeprom; extern int namcos2_eeprom_size; /**************************************************************/ -/* Shared video memory function handlers */ +/* Shared video memory function handlers */ /**************************************************************/ void namcos2_68k_vram_w(int offset, int data); int namcos2_68k_vram_r(int offset); @@ -142,24 +144,24 @@ extern int namcos2_tilemap4_flip; extern int namcos2_tilemap5_flip; /**************************************************************/ -/* Shared video palette function handlers */ +/* Shared video palette function handlers */ /**************************************************************/ int namcos2_68k_video_palette_r( int offset ); void namcos2_68k_video_palette_w( int offset, int data ); -#define NAMCOS2_COLOUR_CODES 0x20 +#define NAMCOS2_COLOUR_CODES 0x20 extern unsigned char *namcos2_68k_palette_ram; extern int namcos2_68k_palette_size; /**************************************************************/ -/* Shared data ROM memory handlerhandlers */ +/* Shared data ROM memory handlerhandlers */ /**************************************************************/ int namcos2_68k_data_rom_r(int offset); /**************************************************************/ -/* Shared serial communications processory (CPU5 ????) */ +/* Shared serial communications processory (CPU5 ????) */ /**************************************************************/ int namcos2_68k_serial_comms_ram_r(int offset); void namcos2_68k_serial_comms_ram_w(int offset, int data); @@ -172,7 +174,7 @@ extern unsigned char *namcos2_68k_serial_comms_ram; /**************************************************************/ -/* Shared protection/random number generator */ +/* Shared protection/random number generator */ /**************************************************************/ int namcos2_68k_key_r( int offset ); void namcos2_68k_key_w( int offset, int data ); @@ -187,20 +189,20 @@ extern int namcos2_68k_protect; /**************************************************************/ -/* Non-shared memory custom IO device - IRQ/Inputs/Outputs */ +/* Non-shared memory custom IO device - IRQ/Inputs/Outputs */ /**************************************************************/ -#define NAMCOS2_C148_0 0 /* 0x1c0000 */ -#define NAMCOS2_C148_1 1 -#define NAMCOS2_C148_2 2 -#define NAMCOS2_C148_CPUIRQ 3 -#define NAMCOS2_C148_EXIRQ 4 /* 0x1c8000 */ -#define NAMCOS2_C148_POSIRQ 5 -#define NAMCOS2_C148_SERIRQ 6 -#define NAMCOS2_C148_VBLANKIRQ 7 +#define NAMCOS2_C148_0 0 /* 0x1c0000 */ +#define NAMCOS2_C148_1 1 +#define NAMCOS2_C148_2 2 +#define NAMCOS2_C148_CPUIRQ 3 +#define NAMCOS2_C148_EXIRQ 4 /* 0x1c8000 */ +#define NAMCOS2_C148_POSIRQ 5 +#define NAMCOS2_C148_SERIRQ 6 +#define NAMCOS2_C148_VBLANKIRQ 7 -extern int namcos2_68k_master_C148[32]; -extern int namcos2_68k_slave_C148[32]; +extern int namcos2_68k_master_C148[32]; +extern int namcos2_68k_slave_C148[32]; void namcos2_68k_master_C148_w( int offset, int data ); int namcos2_68k_master_C148_r( int offset ); @@ -214,27 +216,27 @@ void namcos2_68k_slave_posirq( int moog ); /**************************************************************/ -/* MASTER CPU RAM MEMORY */ +/* MASTER CPU RAM MEMORY */ /**************************************************************/ extern unsigned char *namcos2_68k_master_ram; -#define NAMCOS2_68K_MASTER_RAM_W MWA_BANK3, &namcos2_68k_master_ram -#define NAMCOS2_68K_MASTER_RAM_R MRA_BANK3 +#define NAMCOS2_68K_MASTER_RAM_W MWA_BANK3, &namcos2_68k_master_ram +#define NAMCOS2_68K_MASTER_RAM_R MRA_BANK3 /**************************************************************/ -/* SLAVE CPU RAM MEMORY */ +/* SLAVE CPU RAM MEMORY */ /**************************************************************/ extern unsigned char *namcos2_68k_slave_ram; -#define NAMCOS2_68K_SLAVE_RAM_W MWA_BANK4, &namcos2_68k_slave_ram -#define NAMCOS2_68K_SLAVE_RAM_R MRA_BANK4 +#define NAMCOS2_68K_SLAVE_RAM_W MWA_BANK4, &namcos2_68k_slave_ram +#define NAMCOS2_68K_SLAVE_RAM_R MRA_BANK4 /**************************************************************/ -/* ROZ - Rotate & Zoom memory function handlers */ +/* ROZ - Rotate & Zoom memory function handlers */ /**************************************************************/ void namcos2_68k_roz_ctrl_w( int offset, int data ); @@ -248,7 +250,7 @@ extern unsigned char *namcos2_68k_roz_ram; /**************************************************************/ -/* FINAL LAP road generator definitions..... */ +/* FINAL LAP road generator definitions..... */ /**************************************************************/ void namcos2_68k_roadtile_ram_w( int offset, int data ); @@ -266,15 +268,15 @@ int namcos2_68k_road_ctrl_r( int offset ); /**************************************************************/ -/* */ +/* */ /**************************************************************/ -#define BANKED_SOUND_ROM_R MRA_BANK6 -#define CPU3_ROM1 6 /* Bank number */ +#define BANKED_SOUND_ROM_R MRA_BANK6 +#define CPU3_ROM1 6 /* Bank number */ /**************************************************************/ -/* Sound CPU support handlers - 6809 */ +/* Sound CPU support handlers - 6809 */ /**************************************************************/ int namcos2_sound_interrupt(void); @@ -282,7 +284,7 @@ void namcos2_sound_bankselect_w(int offset, int data); /**************************************************************/ -/* MCU Specific support handlers - HD63705 */ +/* MCU Specific support handlers - HD63705 */ /**************************************************************/ int namcos2_mcu_interrupt(void); diff --git a/src/machine/neogeo.c b/src/machine/neogeo.c index 8e91189e1..3c1ed407a 100644 --- a/src/machine/neogeo.c +++ b/src/machine/neogeo.c @@ -715,7 +715,8 @@ static void neogeo_custom_memory(void) !strcmp(Machine->gamedrv->name,"lastblad") || !strcmp(Machine->gamedrv->name,"lastbld2") || !strcmp(Machine->gamedrv->name,"rbff2") || - !strcmp(Machine->gamedrv->name,"mslug2")) + !strcmp(Machine->gamedrv->name,"mslug2") || + !strcmp(Machine->gamedrv->name,"garou")) sram_protection_hack = 0x100; if (!strcmp(Machine->gamedrv->name,"pulstar")) diff --git a/src/machine/smashtv.c b/src/machine/smashtv.c index 489d58118..93d029812 100644 --- a/src/machine/smashtv.c +++ b/src/machine/smashtv.c @@ -2456,7 +2456,7 @@ void narc_init_machine(void) /* special input handler */ install_mem_read_handler(0, TOBYTE(0x01c00000), TOBYTE(0x01c0005f), narc_input_r ); - install_mem_read_handler(0, TOBYTE(0x09afffd0), TOBYTE(0x09afffef), narc_unknown_r); /* bug? */ + install_mem_read_handler(0, TOBYTE(0x09afffc0), TOBYTE(0x09afffff), narc_unknown_r); /* bug? */ install_mem_read_handler(0, TOBYTE(0x38383900), TOBYTE(0x383839ff), narc_unknown_r); /* bug? */ } void smashtv_init_machine(void) diff --git a/src/memory.c b/src/memory.c index d250b8715..3b71ff7c5 100644 --- a/src/memory.c +++ b/src/memory.c @@ -877,14 +877,19 @@ void memory_shutdown(void) #define CAN_BE_MISALIGNED 0 /* word/dwords can be read on non-16-bit boundaries */ #define ALWAYS_ALIGNED 1 /* word/dwords are always read on 16-bit boundaries */ +/* stupid workarounds so that we can generate an address mask that works even for 32 bits */ +#define ADDRESS_TOPBIT(abits) (1UL << (ABITS1_##abits + ABITS2_##abits + ABITS_MIN_##abits - 1)) +#define ADDRESS_MASK(abits) (ADDRESS_TOPBIT(abits) | (ADDRESS_TOPBIT(abits) - 1)) + + /* generic byte-sized read handler */ -#define READBYTE(name,type,abits2,abitsmin) \ +#define READBYTE(name,type,abits) \ int name(int address) \ { \ MHELE hw; \ \ /* first-level lookup */ \ - hw = cur_mrhard[(UINT32)address >> (abits2 + abitsmin)]; \ + hw = cur_mrhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ \ /* for compatibility with setbankhandler, 8-bit systems must call handlers */ \ /* for banked memory reads/writes */ \ @@ -902,7 +907,7 @@ int name(int address) \ if (hw >= MH_HARDMAX) \ { \ hw -= MH_HARDMAX; \ - hw = readhardware[(hw << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw = readhardware[(hw << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ \ /* for compatibility with setbankhandler, 8-bit systems must call handlers */ \ /* for banked memory reads/writes */ \ @@ -932,7 +937,7 @@ int name(int address) \ } /* generic word-sized read handler (16-bit aligned only!) */ -#define READWORD(name,type,abits2,abitsmin,align) \ +#define READWORD(name,type,abits,align) \ int name##_word(int address) \ { \ MHELE hw; \ @@ -945,7 +950,7 @@ int name##_word(int address) \ if (align == ALWAYS_ALIGNED || !(address & 1)) \ { \ /* first-level lookup */ \ - hw = cur_mrhard[(UINT32)address >> (abits2 + abitsmin)]; \ + hw = cur_mrhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ if (hw <= HT_BANKMAX) \ return READ_WORD(&cpu_bankbase[hw][address - memoryreadoffset[hw]]); \ \ @@ -953,7 +958,7 @@ int name##_word(int address) \ if (hw >= MH_HARDMAX) \ { \ hw -= MH_HARDMAX; \ - hw = readhardware[(hw << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw = readhardware[(hw << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ if (hw <= HT_BANKMAX) \ return READ_WORD(&cpu_bankbase[hw][address - memoryreadoffset[hw]]); \ } \ @@ -976,7 +981,7 @@ int name##_word(int address) \ } /* generic dword-sized read handler (16-bit aligned only!) */ -#define READLONG(name,type,abits2,abitsmin,align) \ +#define READLONG(name,type,abits,align) \ int name##_dword(int address) \ { \ UINT16 word1, word2; \ @@ -989,20 +994,22 @@ int name##_dword(int address) \ /* handle aligned case first */ \ if (align == ALWAYS_ALIGNED || !(address & 1)) \ { \ + int address2 = (address + 2) & ADDRESS_MASK(abits); \ + \ /* first-level lookup */ \ - hw1 = cur_mrhard[(UINT32)address >> (abits2 + abitsmin)]; \ - hw2 = cur_mrhard[(UINT32)(address + 2) >> (abits2 + abitsmin)]; \ + hw1 = cur_mrhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ + hw2 = cur_mrhard[(UINT32)address2 >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ \ /* second-level lookup */ \ if (hw1 >= MH_HARDMAX) \ { \ hw1 -= MH_HARDMAX; \ - hw1 = readhardware[(hw1 << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw1 = readhardware[(hw1 << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ } \ if (hw2 >= MH_HARDMAX) \ { \ hw2 -= MH_HARDMAX; \ - hw2 = readhardware[(hw2 << MH_SBITS) + (((UINT32)(address + 2) >> abitsmin) & MHMASK(abits2))]; \ + hw2 = readhardware[(hw2 << MH_SBITS) + (((UINT32)address2 >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ } \ \ /* process each word */ \ @@ -1011,9 +1018,9 @@ int name##_dword(int address) \ else \ word1 = (*memoryreadhandler[hw1])(address - memoryreadoffset[hw1]); \ if (hw2 <= HT_BANKMAX) \ - word2 = READ_WORD(&cpu_bankbase[hw2][address + 2 - memoryreadoffset[hw2]]); \ + word2 = READ_WORD(&cpu_bankbase[hw2][address2 - memoryreadoffset[hw2]]); \ else \ - word2 = (*memoryreadhandler[hw2])(address + 2 - memoryreadoffset[hw2]); \ + word2 = (*memoryreadhandler[hw2])(address2 - memoryreadoffset[hw2]); \ \ /* fall back to handler */ \ if (type == TYPE_16BIT_BE) \ @@ -1039,27 +1046,27 @@ int name##_dword(int address) \ /* the handlers we need to generate */ -READBYTE(cpu_readmem16, TYPE_8BIT, ABITS2_16, ABITS_MIN_16) -READBYTE(cpu_readmem20, TYPE_8BIT, ABITS2_20, ABITS_MIN_20) -READBYTE(cpu_readmem21, TYPE_8BIT, ABITS2_21, ABITS_MIN_21) +READBYTE(cpu_readmem16, TYPE_8BIT, 16) +READBYTE(cpu_readmem20, TYPE_8BIT, 20) +READBYTE(cpu_readmem21, TYPE_8BIT, 21) -READBYTE(cpu_readmem16bew, TYPE_16BIT_BE, ABITS2_16BEW, ABITS_MIN_16BEW) -READWORD(cpu_readmem16bew, TYPE_16BIT_BE, ABITS2_16BEW, ABITS_MIN_16BEW, ALWAYS_ALIGNED) +READBYTE(cpu_readmem16bew, TYPE_16BIT_BE, 16BEW) +READWORD(cpu_readmem16bew, TYPE_16BIT_BE, 16BEW, ALWAYS_ALIGNED) -READBYTE(cpu_readmem16lew, TYPE_16BIT_LE, ABITS2_16LEW, ABITS_MIN_16LEW) -READWORD(cpu_readmem16lew, TYPE_16BIT_LE, ABITS2_16LEW, ABITS_MIN_16LEW, ALWAYS_ALIGNED) +READBYTE(cpu_readmem16lew, TYPE_16BIT_LE, 16LEW) +READWORD(cpu_readmem16lew, TYPE_16BIT_LE, 16LEW, ALWAYS_ALIGNED) -READBYTE(cpu_readmem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24) -READWORD(cpu_readmem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24, CAN_BE_MISALIGNED) -READLONG(cpu_readmem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24, CAN_BE_MISALIGNED) +READBYTE(cpu_readmem24, TYPE_16BIT_BE, 24) +READWORD(cpu_readmem24, TYPE_16BIT_BE, 24, CAN_BE_MISALIGNED) +READLONG(cpu_readmem24, TYPE_16BIT_BE, 24, CAN_BE_MISALIGNED) -READBYTE(cpu_readmem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29) -READWORD(cpu_readmem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29, CAN_BE_MISALIGNED) -READLONG(cpu_readmem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29, CAN_BE_MISALIGNED) +READBYTE(cpu_readmem29, TYPE_16BIT_LE, 29) +READWORD(cpu_readmem29, TYPE_16BIT_LE, 29, CAN_BE_MISALIGNED) +READLONG(cpu_readmem29, TYPE_16BIT_LE, 29, CAN_BE_MISALIGNED) -READBYTE(cpu_readmem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32) -READWORD(cpu_readmem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_BE_MISALIGNED) -READLONG(cpu_readmem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_BE_MISALIGNED) +READBYTE(cpu_readmem32, TYPE_16BIT_BE, 32) +READWORD(cpu_readmem32, TYPE_16BIT_BE, 32, CAN_BE_MISALIGNED) +READLONG(cpu_readmem32, TYPE_16BIT_BE, 32, CAN_BE_MISALIGNED) /*************************************************************************** @@ -1069,13 +1076,13 @@ READLONG(cpu_readmem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_BE_ ***************************************************************************/ /* generic byte-sized write handler */ -#define WRITEBYTE(name,type,abits2,abitsmin) \ +#define WRITEBYTE(name,type,abits) \ void name(int address, int data) \ { \ MHELE hw; \ \ /* first-level lookup */ \ - hw = cur_mwhard[(UINT32)address >> (abits2 + abitsmin)]; \ + hw = cur_mwhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ \ /* for compatibility with setbankhandler, 8-bit systems must call handlers */ \ /* for banked memory reads/writes */ \ @@ -1097,7 +1104,7 @@ void name(int address, int data) \ if (hw >= MH_HARDMAX) \ { \ hw -= MH_HARDMAX; \ - hw = writehardware[(hw << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw = writehardware[(hw << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ \ /* for compatibility with setbankhandler, 8-bit systems must call handlers */ \ /* for banked memory reads/writes */ \ @@ -1129,7 +1136,7 @@ void name(int address, int data) \ } /* generic word-sized write handler (16-bit aligned only!) */ -#define WRITEWORD(name,type,abits2,abitsmin,align) \ +#define WRITEWORD(name,type,abits,align) \ void name##_word(int address, int data) \ { \ MHELE hw; \ @@ -1142,7 +1149,7 @@ void name##_word(int address, int data) \ if (align == ALWAYS_ALIGNED || !(address & 1)) \ { \ /* first-level lookup */ \ - hw = cur_mwhard[(UINT32)address >> (abits2 + abitsmin)]; \ + hw = cur_mwhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ if (hw <= HT_BANKMAX) \ { \ WRITE_WORD(&cpu_bankbase[hw][address - memorywriteoffset[hw]], data); \ @@ -1153,7 +1160,7 @@ void name##_word(int address, int data) \ if (hw >= MH_HARDMAX) \ { \ hw -= MH_HARDMAX; \ - hw = writehardware[(hw << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw = writehardware[(hw << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ if (hw <= HT_BANKMAX) \ { \ WRITE_WORD(&cpu_bankbase[hw][address - memorywriteoffset[hw]], data); \ @@ -1179,7 +1186,7 @@ void name##_word(int address, int data) \ } /* generic dword-sized write handler (16-bit aligned only!) */ -#define WRITELONG(name,type,abits2,abitsmin,align) \ +#define WRITELONG(name,type,abits,align) \ void name##_dword(int address, int data) \ { \ UINT16 word1, word2; \ @@ -1192,20 +1199,22 @@ void name##_dword(int address, int data) \ /* handle aligned case first */ \ if (align == ALWAYS_ALIGNED || !(address & 1)) \ { \ + int address2 = (address + 2) & ADDRESS_MASK(abits); \ + \ /* first-level lookup */ \ - hw1 = cur_mwhard[(UINT32)address >> (abits2 + abitsmin)]; \ - hw2 = cur_mwhard[(UINT32)(address + 2) >> (abits2 + abitsmin)]; \ + hw1 = cur_mwhard[(UINT32)address >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ + hw2 = cur_mwhard[(UINT32)address2 >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ \ /* second-level lookup */ \ if (hw1 >= MH_HARDMAX) \ { \ hw1 -= MH_HARDMAX; \ - hw1 = writehardware[(hw1 << MH_SBITS) + (((UINT32)address >> abitsmin) & MHMASK(abits2))]; \ + hw1 = writehardware[(hw1 << MH_SBITS) + (((UINT32)address >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ } \ if (hw2 >= MH_HARDMAX) \ { \ hw2 -= MH_HARDMAX; \ - hw2 = writehardware[(hw2 << MH_SBITS) + (((UINT32)(address + 2) >> abitsmin) & MHMASK(abits2))]; \ + hw2 = writehardware[(hw2 << MH_SBITS) + (((UINT32)address2 >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ } \ \ /* extract words */ \ @@ -1226,9 +1235,9 @@ void name##_dword(int address, int data) \ else \ (*memorywritehandler[hw1])(address - memorywriteoffset[hw1], word1); \ if (hw2 <= HT_BANKMAX) \ - WRITE_WORD(&cpu_bankbase[hw2][address + 2 - memorywriteoffset[hw2]], word2);\ + WRITE_WORD(&cpu_bankbase[hw2][address2 - memorywriteoffset[hw2]], word2); \ else \ - (*memorywritehandler[hw2])(address + 2 - memorywriteoffset[hw2], word2); \ + (*memorywritehandler[hw2])(address2 - memorywriteoffset[hw2], word2); \ } \ \ /* unaligned case */ \ @@ -1248,27 +1257,27 @@ void name##_dword(int address, int data) \ /* the handlers we need to generate */ -WRITEBYTE(cpu_writemem16, TYPE_8BIT, ABITS2_16, ABITS_MIN_16) -WRITEBYTE(cpu_writemem20, TYPE_8BIT, ABITS2_20, ABITS_MIN_20) -WRITEBYTE(cpu_writemem21, TYPE_8BIT, ABITS2_21, ABITS_MIN_21) +WRITEBYTE(cpu_writemem16, TYPE_8BIT, 16) +WRITEBYTE(cpu_writemem20, TYPE_8BIT, 20) +WRITEBYTE(cpu_writemem21, TYPE_8BIT, 21) -WRITEBYTE(cpu_writemem16bew, TYPE_16BIT_BE, ABITS2_16BEW, ABITS_MIN_16BEW) -WRITEWORD(cpu_writemem16bew, TYPE_16BIT_BE, ABITS2_16BEW, ABITS_MIN_16BEW, ALWAYS_ALIGNED) +WRITEBYTE(cpu_writemem16bew, TYPE_16BIT_BE, 16BEW) +WRITEWORD(cpu_writemem16bew, TYPE_16BIT_BE, 16BEW, ALWAYS_ALIGNED) -WRITEBYTE(cpu_writemem16lew, TYPE_16BIT_LE, ABITS2_16LEW, ABITS_MIN_16LEW) -WRITEWORD(cpu_writemem16lew, TYPE_16BIT_LE, ABITS2_16LEW, ABITS_MIN_16LEW, ALWAYS_ALIGNED) +WRITEBYTE(cpu_writemem16lew, TYPE_16BIT_LE, 16LEW) +WRITEWORD(cpu_writemem16lew, TYPE_16BIT_LE, 16LEW, ALWAYS_ALIGNED) -WRITEBYTE(cpu_writemem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24) -WRITEWORD(cpu_writemem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24, CAN_BE_MISALIGNED) -WRITELONG(cpu_writemem24, TYPE_16BIT_BE, ABITS2_24, ABITS_MIN_24, CAN_BE_MISALIGNED) +WRITEBYTE(cpu_writemem24, TYPE_16BIT_BE, 24) +WRITEWORD(cpu_writemem24, TYPE_16BIT_BE, 24, CAN_BE_MISALIGNED) +WRITELONG(cpu_writemem24, TYPE_16BIT_BE, 24, CAN_BE_MISALIGNED) -WRITEBYTE(cpu_writemem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29) -WRITEWORD(cpu_writemem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29, CAN_BE_MISALIGNED) -WRITELONG(cpu_writemem29, TYPE_16BIT_LE, ABITS2_29, ABITS_MIN_29, CAN_BE_MISALIGNED) +WRITEBYTE(cpu_writemem29, TYPE_16BIT_LE, 29) +WRITEWORD(cpu_writemem29, TYPE_16BIT_LE, 29, CAN_BE_MISALIGNED) +WRITELONG(cpu_writemem29, TYPE_16BIT_LE, 29, CAN_BE_MISALIGNED) -WRITEBYTE(cpu_writemem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32) -WRITEWORD(cpu_writemem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_BE_MISALIGNED) -WRITELONG(cpu_writemem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_BE_MISALIGNED) +WRITEBYTE(cpu_writemem32, TYPE_16BIT_BE, 32) +WRITEWORD(cpu_writemem32, TYPE_16BIT_BE, 32, CAN_BE_MISALIGNED) +WRITELONG(cpu_writemem32, TYPE_16BIT_BE, 32, CAN_BE_MISALIGNED) /*************************************************************************** @@ -1278,7 +1287,7 @@ WRITELONG(cpu_writemem32, TYPE_16BIT_BE, ABITS2_32, ABITS_MIN_32, CAN_B ***************************************************************************/ /* generic opcode base changer */ -#define SETOPBASE(name,abits2,abitsmin,shift) \ +#define SETOPBASE(name,abits,shift) \ void name(int pc) \ { \ MHELE hw; \ @@ -1294,11 +1303,11 @@ void name(int pc) \ } \ \ /* perform the lookup */ \ - hw = cur_mrhard[(UINT32)pc >> (abits2 + abitsmin)]; \ + hw = cur_mrhard[(UINT32)pc >> (ABITS2_##abits + ABITS_MIN_##abits)]; \ if (hw >= MH_HARDMAX) \ { \ hw -= MH_HARDMAX; \ - hw = readhardware[(hw << MH_SBITS) + (((UINT32)pc >> abitsmin) & MHMASK(abits2))]; \ + hw = readhardware[(hw << MH_SBITS) + (((UINT32)pc >> ABITS_MIN_##abits) & MHMASK(ABITS2_##abits))]; \ } \ ophw = hw; \ \ @@ -1317,14 +1326,14 @@ void name(int pc) \ /* the handlers we need to generate */ -SETOPBASE(cpu_setOPbase16, ABITS2_16, ABITS_MIN_16, 0) -SETOPBASE(cpu_setOPbase16bew, ABITS2_16BEW, ABITS_MIN_16BEW, 0) -SETOPBASE(cpu_setOPbase16lew, ABITS2_16LEW, ABITS_MIN_16LEW, 0) -SETOPBASE(cpu_setOPbase20, ABITS2_20, ABITS_MIN_20, 0) -SETOPBASE(cpu_setOPbase21, ABITS2_21, ABITS_MIN_21, 0) -SETOPBASE(cpu_setOPbase24, ABITS2_24, ABITS_MIN_24, 0) -SETOPBASE(cpu_setOPbase29, ABITS2_29, ABITS_MIN_29, 3) -SETOPBASE(cpu_setOPbase32, ABITS2_32, ABITS_MIN_32, 0) +SETOPBASE(cpu_setOPbase16, 16, 0) +SETOPBASE(cpu_setOPbase16bew, 16BEW, 0) +SETOPBASE(cpu_setOPbase16lew, 16LEW, 0) +SETOPBASE(cpu_setOPbase20, 20, 0) +SETOPBASE(cpu_setOPbase21, 21, 0) +SETOPBASE(cpu_setOPbase24, 24, 0) +SETOPBASE(cpu_setOPbase29, 29, 3) +SETOPBASE(cpu_setOPbase32, 32, 0) /*************************************************************************** diff --git a/src/mess/dir_list/crc/gamegear.crc b/src/mess/dir_list/crc/gamegear.crc index e31817861..616a75909 100644 --- a/src/mess/dir_list/crc/gamegear.crc +++ b/src/mess/dir_list/crc/gamegear.crc @@ -1,5 +1,5 @@ # Sega Gamegear Cartridge CRC list -# Compiled by Gerardo Jorrin, with Chris Henry +# Compiled by Gerardo Jorrin and Chris Henry # Note: This list is provided as a record of known dumps for this system. # These checksums have not been validated and cannot be assumed correct. # They are provided here as a database to help the emulation of this system. @@ -8,204 +8,313 @@ # crc = Game Name/Version | Year | Manufacturer | Emulation Status [gamegear] +f85a8ce8 = 5 in 1 Funpack +1d17d2a0 = A A Harimanada +bb4f23ff = Adventures of Batman and Robin +899515d0 = Aerial Assault 3e549b7a = Aerial Assault | 1992 | Sega | NOT PLAYABLE +770e95e1 = Aladdin (Japan) 7a41c1dc = Aladdin | 1994 | Sega | NOT PLAYABLE +1d80a75b = Aleste GG 11a68c08 = Alien 3 | 1992 | Acclaim ffe43d47 = Alien Syndrome | 1992 | Sims Co. Ltd. 3deca813 = Arcade Classics | 199? | Sega -7cb3facf = Arena | 1995 | Sega/Eden Software -97e3a18c = Ariel The Little Mermaid | 1992 | Sega -dfcf555f = Ax Battler: A Legend of Golden Axe (Japan) | 1991 | Sega -661faeff = Ayrton's Senna Super Monaco GP II | | | GRAPHIC GLITCHES -655fb1f4 = Bank Panic | | | NOT PLAYABLE +f0204191 = Arch Rivals +7cb3facf = Arena - Maze of Death | 1995 | Sega/Eden Software +78208b40 = Asterix and the Great Rescue +1023ff26 = Ax Battler - A Legend of Golden Axe (Japan) +dfcf555f = Ax Battler - A Legend of Golden Axe (Japan) | 1991 | Sega +663bcf8a = Ax Battler - A Legend of Golden Axe +10ac9374 = Baku Baku Animals c0009274 = Bart Vs. Space Mutants | 1992 | Flying Edge -6d3a10d3 = Baseball'91 | 1991 | Sega -16448209 = Batter Up | 1991 | Namcot +18ba70d3 = Bart Vs. the World +6d3a10d3 = Baseball '91 | 1991 | Sega 618b19e2 = Batman Forever | 1995 | Acclaim +65e60dfe = Batman Returns 7ac4a3ca = Batman Returns | 1992 | Sega -53f37c4c = Battleship | 1993 | Mindscape +16448209 = Batter Up | 1991 | Namcot +d8342782 = Battleship cb3cd075 = Battletoads | 1993 | Sega +a6bf865e = Beavis and Butt-Head 325b1797 = Berlin Wall | 1991 | Kaneko 7b7717b8 = Big War (Japan) | 1990 | System Soft -bfceba5f = Bonker's Wax Up | 1994 | Sega | NO SPRITE COLLISION -0f3e3840 = Box Boy (Japan) | 1992 | River Hill Soft | 1992 +bfceba5f = Bonker's Wax Up! | 1994 | Sega | NO SPRITE COLLISION +69ebe5fa = Bram Stoker's Dracula fba338c5 = Bubble Bobble | 1994 | Taito | NOT PLAYABLE -5c34d9cd = Bugs Bunny Double Trouble | 1996 | Sega | NOT PLAYABLE +5c34d9cd = Bugs Bunny in Double Trouble | 1996 | Sega | NOT PLAYABLE c90f29ef = Bust-a-Move | 1995 | Taito 7cb079d0 = Buster Ball | 1992 | River Hill Soft a72a1753 = Buster Fight | 1994 | Sega -09534742 = Casino (Japan) | 1995 | Sega -dd1d2ebf = Cat (Japan) | 1995 | Sega +5675dfdd = Captain America and the Avengers dfc7adc8 = Chakan | 1992 | Rak Graphics +da811ba6 = The Chessmaster | 1991 | Sega 6b0fcec3 = Chicago Syndicate | 1995 | Sega | NOT PLAYABLE -6e1cc23c = Chicho (Japan) | 1991 | Tsukuda Ideal -da811ba6 = Chessmaster | 1991 | Sega 191b1ed8 = Chuck Rock | | | NOT PLAYABLE d228a467 = Clutch Hitter | 1991 | Sega f3ca6676 = Columns | 1990 | Sega +529c864e = Crystal Warriors 6a24e47e = Cuttroat Island | 1995 | Acclaim | NOT PLAYABLE +16abe1ee = Daffy Duck in Hollywood aae268fc = Daffy Duck in Hollywood | 1994 | Sega 4457e7c0 = Deep Duck Trouble | 1993 | Sega -f6c400da = Desert Strike: Return to the Gulf | 1992 | Electronic Arts +e2791cc1 = Defenders of Oasis +c2e111ac = Desert Speedtrap +f6c400da = Desert Strike - Return to the Gulf | 1992 | Electronic Arts 25db174f = Devilish | 1991 | Genki -dfa805a0 = Dodge Ball | 1992 | Sega -9a8b2c16 = Dolamon (Japan) | 1993 | Sega +9a8b2c16 = Doraemon Nora No Suke No Yabou | 1993 | Sega 1307a290 = Double Dragon | 1993 | Virgin | NOT PLAYABLE 3c2d4f48 = Dr. Robotnik's Mean Bean Machine | 1993 | Compile 89f12e1e = Dragon Crystal | 1990 | Sega -abddf0eb = Dream Eleven (Japan) | 1995 | Sega +0ef2ed93 = Dragon Crystal +abddf0eb = Dream Eleven | 1995 | Sega 77ed48f5 = Dunk Kids | 1994 | Sega +fdc8fc18 = Dynamite Headdy f6af4b6b = Dynamite Headdy | 1994 | Sega 5d3f23a9 = Earthworm Jim | 1995 | Playmates | NOT PLAYABLE -2b60873e = Ecco | 1993 | Sega | NOT PLAYABLE -e2f3b203 = Ecco, The Tides of Time | 1994 | Sega -36aaf536 = Evander Holyfield Boxing | 1992 | Sega | Issue: Screen flickers -d0a93e00 = F-1 | 1993 | Domark +982e7132 = Ecco the Dolphin +2b60873e = Ecco the Dolphin | 1993 | Sega | NOT PLAYABLE +e2f3b203 = Ecco the Dolphin 2 - The Tides of Time | 1994 | Sega +04302bbd = Eternal Legend +36aaf536 = Evander Holyfield's Boxing | 1992 | Sega | Issue: Screen flickers +8bdb0806 = F-15 Strike Eagle +a1f2f4a1 = Factory Panic (Japan) 59e3be92 = Factory Panic | 1991 | Sega +365b92cf = Fantasy Zone Gear d69097e8 = Fantasy Zone Gear | 1991 | Sanritsu | Issue: No Sprite Collision +29b1df1a = Fatal Fury Special 449787e2 = Fatal Fury Special | 1994 | Takara +e632a3a2 = FIFA International Soccer d46d5685 = Foreman for Real | 1995 | Acclaim -46f40b9f = Fred Couples | | | NOT PLAYABLE +d0a93e00 = Formula 1 | 1993 | Domark +46f40b9f = Fred Couples Golf | | | NOT PLAYABLE +2333f615 = G-Loc Air Battle | 1990 | Sega 33237f50 = G-Loc Air Battle | 1990 | Sega 18de59ed = G-Loc Air Battle | 1991 | Sega -2333f615 = G-Loc Air Battle | 1990 | Sega 0593ba24 = Galaga '91 | 1990 | Namcot -f3774c65 = Game Paradise 2 | | | NOT PLAYABLE +09534742 = Gamble Panic | 1995 | Sega +423803a7 = Gambler +141aaf96 = Gear 0e300223 = Gear Stadium | 1991 | Namco +a0530664 = Gear Stadium Heiseiban +58b44585 = George Foreman KO Boxing +83926bd1 = GG Shinobi | 1991 | Sega | NOT PLAYABLE +c2d8fe07 = GG Shinobi II - The Silent Fury +6201c694 = GG Shinobi II - The Silent Fury | 1992 | Sega +4cf97801 = Godzilla 876e9b72 = GP Rider | 1994 | Sega -f27925b0 = Green Dog | 1993 | Sega | GRAPHIC GLITCHES +933e8d3a = Greendog +f27925b0 = Greendog | 1993 | Sega | GRAPHIC GLITCHES a93e8b0f = Griffin | 1991 | Telenet Japan c3c52767 = Gun Star Heroes | 1995 | Sega | Issue: Graphic Glitches def5a5d0 = Halley Wars | 1991 | Taito | GRAPHIC GLITCHES -071b045e = Hang On | | | NOT PLAYABLE -7e689995 = Head Buster (Japan) | 1991 | NCS +069fb868 = Head Buster +7e689995 = Head Buster | 1991 | NCS dde29f74 = Home Alone | 1992 | Sega +57834c03 = House of Tarot dab0f265 = In the Wake of the Vampire | 1992 | Sims 087fc247 = The Incredible Crash Test Dummies | 1993 | Acclaim +d7055f88 = Incredible Hulk 8c048325 = Indiana Jones and the Last Crusade | 199? | Lucasfilm Games +8927b69b = Iron Man X-O Manowar in Heavy Metal 44e7e2da = The Itchy & Scratchy Game | 1994 | Acclaim -4a98678b = Joe Montana Football | 1991 | Sega +4a98678b = Joe Montana's Football | 1991 | Sega 04d23fc4 = Judge Dredd | 199? | Acclaim a8ef36a7 = Junction | 1991 | Micronet 30c09f31 = The Jungle Book | 1994 | Virgin 2f536ae3 = Jurassic Park | 1993 | Sega 808a71c3 = Kinetic Connection | 1991 | Sega -d01e784f = Krusty's Fun House | 1993 | Acclaim -4ec30806 = Last Bible (Japan) | 1995 | Sega | NOT PLAYABLE -######## = Last Bible 2 -0fde7baa = Lemmings | 1992 | Sega +d01e784f = Krusty's Funhouse | 1993 | Acclaim +398f2358 = Kuni chan no Game Tengoku +f3774c65 = Kuni chan no Game Tengoku 2 | | | NOT PLAYABLE +937fd52b = Kyoto Saint Tale +4ec30806 = Last Bible | 1995 | Sega | NOT PLAYABLE +2e4ec17b = Last Bible 2 51548f61 = Lemmings | 1992 | Psygnosis +0fde7baa = Lemmings | 1992 | Sega d5195a39 = Lillehammer' 94 | 1993 | Sega -fe12a92f = Legend of Illusion (Japan) | 1994 | Sega 9808d7b3 = The Lion King | 1994 | Virgin +97e3a18c = Ariel The Little Mermaid | 1992 | Sega 2d98bd87 = Lucky Dime Caper with Donald Duck | 1991 | Sega +07a7815a = Lucky Dime Caper with Donald Duck +58459edd = Lunar +208f0f87 = Lunar +75c71ebf = Madden NFL '95 +00c34d94 = Madou Monogatari +12eb2287 = Madou Monogatari 2 +0a634d79 = Madou Monogatari 3 +7ec95282 = Madou Monogatari A - Doki Doki +8f82a6b9 = Magic Knight Rayearth +1c2c2b04 = Magic Knight Rayearth 2 cf6d7bc5 = Magical Puzzle Popils | 199? | Tengen -9c5c7f53 = Majohn (Japan) | 1991 | Sunsoft -3d8d0dd6 = Major League Baseball | 1993 | Sega +6e1cc23c = Magical Tarurutokun | 1991 | Tsukuda Ideal 01d2dd2a = Mappy | 1991 | Namcot -feb16091 = Marble Madness | 1992 | Tengen +9559e339 = Marble Madness | 1992 | Tengen 22c418bf = Marko's Magic Football | 1994 | Sega | NOT PLAYABLE +1ace93af = Megaman | 1994 | Capcom d2b6021e = Mick & Mack as the Global Gladiators +0117c3df = Mickey Mouse in Land of Ilusion (Japan) 52dbf3e1 = Mickey Mouse in Land of Ilusion | 1993 | Sega +fe12a92f = Mickey Mouse in Legend of Illusion (Japan) | 1994 | Sega eccf7a4f = Mickey's Ultimate Challenge | 1994 | Sega -9289dfcc = Mighty Morphin Power Rangers | 1994 | Sega | NOT PLAYABLE -b47c19e5 = Mighty Morphin Power Rangers the Movie | 1995 | Sega -1ace93af = Megaman | 1994 | Capcom 453c5cec = Monster Truck Wars | 1994 | Acclaim -07494f2a = Mortal Kombat | 1993 | Acclaim +ea89e0e7 = Monster World 2 4b304e0f = Mortal Kombat II | 1994 | Acclaim | NOT PLAYABLE +c2be62bb = Mortal Kombat III +07494f2a = Mortal Kombat (v2.6) | 1993 | Acclaim +dbff0461 = Mortal Kombat (v3.3) +19030108 = NBA Action a49e9033 = NBA Jam | 1993 | Acclaim | NOT PLAYABLE 86c32e5b = NBA Jam Tournament Edition | 1994 | Acclaim -20ef017a = Ninja Gaiden | 1992 | Sega +4680c7aa = NHL All-Star Hockey +20ef017a = Ninja Gaiden (Japan) | 1992 | Sega +4ed37a63 = Ninja Gaiden (Japan) +c578756b = Ninja Gaiden 1e673168 = The Ottifants -d58cb27c = Out Run | 1991 | Sega | Issue: Screen Flickering +d58cb27c = OutRun | 1991 | Sega | Issue: Screen Flickering 9273ee2c = Pac Attack | 1994 | Namco | NOT PLAYABLE a16c5e58 = Pac-Man | 1990 | Namcot e9783cea = Panzer Dragoon Mini | 1996 | Sega | NOT PLAYABLE f54b6803 = Paperboy | 1992 | Tengen ce863dba = Pengo | 1990 | Sega +b4921239 = PGA Tour 2 542b6d8e = PGA Tour 96 | 1994 | Polugames -1a51579d = Phantasy Star Adventure (Japan) | 1992 | Sega -89d34067 = Poker Face Paul's BlackJack | 1993 | Adrenaline +f8f4b9a3 = Phantasy Star Adventure +1a51579d = Phantasy Star Adventure | 1992 | Sega +a942514a = Phantasy Star Gaiden +281b1c3a = Phantom 2040 +89d34067 = Poker Face Paul's Blackjack | 1993 | Adrenaline +03bb0668 = Poker Face Paul's Poker 71deba5a = Pop Breaker | 1990 | Microcabin | NOT PLAYABLE (No Input) -3ef66810 = Popeye Beach Volley Ball | 1994 | Technos +3ef66810 = Popeye's Beach Volleyball | 1994 | Technos +9289dfcc = Mighty Morphin Power Rangers | 1994 | Sega | NOT PLAYABLE +b47c19e5 = Mighty Morphin Power Rangers the Movie | 1995 | Sega 09de1528 = Power Strike II | 1993 | Compile 2a34b5c7 = Primal Rage | 1995 | Time Warner | NOT PLAYABLE afcc7828 = Psychic World | 1991 | Sega -d173a06f = Puzzlow Kids | 1993 | Compile +407ac070 = Putt and Putter 3ab2393b = Puyo Puyo 2 | 1994 | Compile +d173a06f = Puzzlow Kids / Puyo Puyo | 1993 | Compile a45fffb7 = Riddick Bowe Boxing | 1993 | Extreme -efe65b3b = Ristar | 1995 | Sega +efe65b3b = Ristar the Shooting Star | 1995 | Sega +96045f76 = Road Rash 069a0704 = Robocop 3 | 1993 | Acclaim | NOT PLAYABLE 4ab7fa4e = Robocop Vs. The Terminator | 1993 | Virgin | NOT PLAYABLE -87b8b612 = Ronald in the Magic World | 1994 | Sega -445d7cd2 = Royal Stone (Japan) | 1995 | Sega +87b8b612 = Ronald in the Magical World | 1994 | Sega +445d7cd2 = Royal Stone | 1995 | Sega 95efd52b = Ryu Kyu | 1991 | Face -fe7374d2 = Sailor Moon S (Japan) | 1995 | Sega +fe7374d2 = Sailor Moon S | 1995 | Sega +98171deb = Samurai Shodown 93fd73dc = Samurai Spirits | 1994 | Takara +ec0f2c72 = Scratch Golf 5e2b39b8 = SD Gundam Winner's History (Japan) +d06136ac = Sega 4 in 1 Pack 0924d2ec = Sega Game Pack 4 in 1 | 1992 | Sega -09f9ed60 = Shadam Crusader (Japan) | 1992 | Sega +09f9ed60 = Shadam Crusader | 1992 | Sega 2ae8c75f = Shangai II | 1990 | Sunsoft -9c5c7f53 = Shikinjoh | 1991 | Sunsoft -4d1f4699 = Shining Force (Japan) | 1992 | Sega | NOT PLAYABLE -30374681 = Shining Force II (Japan) | 1993 | Sega | NOT PLAYABLE -6019fe5e = Shining Force Final Conflict (Japan) | 1995 | Sega | NOT PLAYABLE -83926bd1 = Shinobi | 1991 | Sega | NOT PLAYABLE -6201c694 = Shinobi II: The Silent Fury | 1992 | Sega +30374681 = Shining Force 2 - Sword of Haija (Japan) | 1993 | Sega | NOT PLAYABLE +a6ca6fa9 = Shining Force 2 - Sword of Haija +7bf365e1 = Shining Force 3 - Final Conflict +6019fe5e = Shining Force 3 - Final Conflict | 1995 | Sega | NOT PLAYABLE +4d1f4699 = Shining Force Gaiden | 1992 | Sega | NOT PLAYABLE +9c5c7f53 = Sikin Jyo | 1991 | Sunsoft 786dd67b = Skweek | 1991 | Victor 751dad4c = Slamdunk | 1994 | Bandai | NOT PLAYABLE 4dc6f555 = Slider | 1991 | Victor 1006e4e3 = Smash TV | 1992 | Acclaim -354e1cbd = Smurfs | 1994 | Infogrames +0f3e3840 = Sokoban World | 1992 | River Hill Soft 8ac0dade = Sonic and Tails | 199? | Sega 496bce64 = Sonic and Tails 2 | 1994 | Sega +663f2abb = Sonic and Chaos 68f0a776 = Sonic Drift | 1994 | Sega | NOT PLAYABLE -d6e8a305 = Sonic Drift II | 1995 | Sega | NOT PLAYABLE (Severe Graphic Glitches) +7ca02906 = Sonic Drift 2 +d6e8a305 = Sonic Drift 2 | 1995 | Sega | NOT PLAYABLE (Severe Graphic Glitches) 5550173b = Sonic Labyrinth | 199? | Sega a9210434 = Sonic Spinball | 1994 | Sega 3e31cb8c = Sonic the Hedgehog | 199? | Sega +d23a2a93 = Sonic the Hedgehog - Triple Trouble 95a18ec7 = Sonic the Hedgehog 2 | 199? | Sega 600c15b3 = Space Harrier | 1991 | Sega -bc240779 = Spiderman: Return of the Sinister Six | 1992 | Acclaim | NOT PLAYABLE -742a372b = Spiderman & the X-Men: Arcade's Revenge +2d8e81bc = Space Invaders +742a372b = Spiderman & the X-Men - Arcade's Revenge +bc240779 = Spiderman - Return of the Sinister Six | 1992 | Acclaim | NOT PLAYABLE a7af7ca9 = Sports Trivia | 1995 | Sega 5b5de94d = Sports Trivia Championship Edition | 1995 | Sega 0228769c = Star Wars | 1993 | Lucasfilm Games +fc7c64e4 = Stargate 3d8bcf1d = Streets of Rage | 1992 | Sega -0b618409 = Streets of Rage II | 1993 | Sega -1ebfa5ca = Strider Returns: Journey from Darkness | 1990 | Capcom +0b618409 = Streets of Rage 2 | 1993 | Sega +1ebfa5ca = Strider Returns - Journey from Darkness | 1990 | Capcom 8ba43af3 = Super Columns 528cbbce = Super Golf | 1991 | Sigma +e30e7dc6 = Super Monaco GP 4f686c4a = Super Monaco GP | 1991 | Sega +346e1cf1 = Super Monaco GP 2 +661faeff = Super Monaco GP 2 | | | GRAPHIC GLITCHES e8b42b1f = Super Off Road | 1992 | Virgin +2e217fae = Super Off Road +dfe38e24 = Super Space Invaders +18deeec8 = Surf Ninjas +2ea26930 = Surf Ninjas +cb591501 = Tails' Adventures 88618afa = Tails' Sky Patrol cf9c607c = Taisen Mahjong HaoPai | 1990 | Sega eebad66b = Tale Spin | 1993 | Sega | NO SPRITE COLLISION +dd1d2ebf = Tama & Friends - Tamalympics (Japan) | 1995 | Sega eebad668 = Taz in Escape from Mars +36040c24 = Taz-Mania - The Search for the Lost Seabirds de466796 = Tempo Jr. | 1995 | Sega -914514e3 = Teni | | | NOT PLAYABLE +1bd15773 = Terminator 2 - Judgement Day | 1993 | Acclaim | GRAPHIC AND SOUND GLITCHES +9479c83a = Terminator 2 - The Arcade Game c029a5fd = The Terminator | 1992 | Virgin -1bd15773 = Terminator 2: Judgement Day | 1993 | Acclaim | GRAPHIC AND SOUND GLITCHES ca0e11cc = Tesserae | 1993 | Gametek -5cd33ff2 = Tom & Jerry: The Movie | 1993 | Sega | NOT PLAYABLE +736cdb76 = The Quiz of Gears +354e1cbd = The Smurfs | 1994 | Infogrames +5cd33ff2 = Tom & Jerry - The Movie | 1993 | Sega | NOT PLAYABLE 5173b02a = True Lies | 1994 | Virgin 820965a3 = Ultimate Soccer | 1993 | Sega -695cc120 = Virtua Fighter Portrait: Pai Chan +695cc120 = Virtua Fighter Portrait - Pai Chan +dfa805a0 = Volleyball | 1992 | Sega b0f22745 = VR Troopers | 1995 | Sega -29e697b2 = Wagan Land | 1991 | Namco +231e5b78 = VR Troopers +f514e58c = Wagyan Land +29e697b2 = Wagyan Land | 1991 | Namco +d5369192 = Wakiyarando 9977fcb3 = Wonderboy | 1990 | Sega -db1b5b44 = Wonderboy III: The Dragon's Trap | 1992 | Sega +db1b5b44 = Wonderboy 3 - The Dragon's Trap | 1992 | Sega 9c0e5a04 = Woody Pop | 1991 | Sega +dd6d2e34 = World Cup Soccer +1e81861f = World Derby 8dc68d92 = WWF Raw -c169c344 = X-Men: Gamemaster's Legacy | 1994 | Sega -c2cba9d7 = X-Men: Mojo World | 1996 | Sega -e678f264 = Yogi Bear | 1994 | GameTek | NOT PLAYABLE +567a5ee6 = X-Men +c169c344 = X-Men - Gamemaster's Legacy | 1994 | Sega +c2cba9d7 = X-Men - Mojo World | 1996 | Sega +d9ce3f4c = Yaiba Adventures +e678f264 = Yogi Bear (prototype) | 1994 | GameTek | NOT PLAYABLE 42389270 = Yokaru Yotantori | 1992 | Sega +88ebbf9e = Yuyu Hakusho 1 +46ae9159 = Yuyu Hakusho 2 e35ef7ed = Zool | 1993 | Gremlin Graphics -f397f041 = Zoop | | | NOT PLAYABLE +#demos +f397f041 = Zoop's SMS Power Demo | | | NOT PLAYABLE -#[known_bad_dumps] + +#Translations +988daa36 = Phantasy Star Gaiden (English Translation) +e9fb916b = Phantasy Star Gaiden (English Translation, large font) +e285cb3f = Phantasy Star Gaiden (English Translation, small font) +17e64f1e = Phantasy Star Gaiden A (Magic Translations Company) +1c98154a = Phantasy Star Gaiden B (Magic Translations Company) +#[known_bad_dumps] +53f37c4c = Battleship | 1993 | Mindscape | OVERDUMPED +dfa2ae07 = Enduro Racer | | | NO GOOD DUMP KNOWN +feb16091 = Marble Madness | 1992 | Tengen | OVERDUMPED +e1109230 = Psychic World | | | OVERDUMPED +924ce5be = Virtua Fighters | | | NO GOOD DUMP KNOWN +3d8d0dd6 = World Series Baseball | 1993 | Sega | NO GOOD DUMP KNOWN + +#unconfirmed +655fb1f4 = Bank Panic | | | NOT PLAYABLE +914514e3 = Teni | | | NOT PLAYABLE \ No newline at end of file diff --git a/src/mess/dir_list/crc/nes.crc b/src/mess/dir_list/crc/nes.crc index 8e914409d..f5b04ae09 100644 --- a/src/mess/dir_list/crc/nes.crc +++ b/src/mess/dir_list/crc/nes.crc @@ -29,7 +29,7 @@ e378e459 = A Boy and His Blob - Trouble on Blobolonia (E) | 1989 | Absolute Ente 20a9e4a2 = A Boy and His Blob - Trouble on Blobolonia (U) | 1989 | Absolute Entertainment 2a83ddc5 = A Nightmare On Elm Street (U) | 1989 | LJN 58fe5467 = A Ressha De Ikou (J) | ???? | Pony Canyon -bff8b627 = Aa! Yakyuu Jinsei Itchokusen (J) | 1992 | Sammy +bff8b627 = Aa Yakyuu Jinsei Itchokusen (J) | 1992 | Sammy dc87f63d = Abadox (U) | 1989 | Milton Bradley 920dd63f = Aces - Iron Eagle 3 (J) ee309168 = Action 52 (U) @@ -160,7 +160,7 @@ c3244352 = Bugs Bunny Fun House (Prototype) (U) d56740c2 = Burger Time (J) 1c6f3036 = California Games (U) | 1988 | Milton Bradley -856114c8 = Castlevania (U, PRG1) | 1987 | Konami +856114c8 = Castlevania (Rev 1) (U) | 1987 | Konami a9c2c503 = Castlevania 2: Simon's Quest (U) | 1988 | Konami 7cc9c669 = Castlevania 3: Dracula's Curse (U) | 19?? | Konami | NOT PLAYABLE 1826e6d2 = Caveman Games (U) | 1990 | Data East @@ -196,7 +196,7 @@ e36d5991 = Galaga (U) 87ed54aa = Ghosts n' Goblins (U) 3e8dec2f = Golf (JU) d1fb1533 = Gremlins 2: The New Batch (U) | 1990 | Sunsoft -6d3396e3 = Gumshoe (U; Europe) | | | LIGHT GUN GAME/NOT PLAYABLE +aab00873 = Gumshoe (UE) | | | LIGHT GUN GAME/NOT PLAYABLE 526ad690 = Gyruss (U) 56dbfd1f = Hatris (U) @@ -220,7 +220,7 @@ e9bad787 = Karateka (J) 05b05500 = Kid Icarus (UE) 32b45889 = Kung Fu (U) -d7ae93df = The Legend of Zelda (U, PRG0) +d7ae93df = The Legend of Zelda (Rev 0) (U) 71d868c4 = Little Nemo: The Dream Master (U) | | | NOT PLAYABLE/LOCKS UP 68309d06 = Maniac Mansion (U) @@ -239,7 +239,7 @@ a2c89cb9 = Metroid (U) faf48d27 = Monopoly (U) bd0e29b3 = Ms. Pac-Man (U) -7d111919 = Nangoku Shirei: Spy Vs. Spy 2 (J) +7d111919 = Nangoku Shirei!! Spy Vs. Spy 2 (J) 9316bf4b = NES Open Tournament Golf (U) 4de7236f = Ninja Kid (U) @@ -265,11 +265,12 @@ bdd176af = Sky Kid (U) c4c896d8 = Spy Vs. Spy (J) 1ccba824 = Star Wars (U) | | | NOT PLAYABLE 721be58a = Superman (U) | 1988 | Kemco | GRAPHIC GLITCHES -2e1b6b3c = Super Mario Bros. (PRG1,CHR0) (JU) | 1985 | Nintendo -8aa4ace0 = Super Mario Bros. 2 (PRG0,CHR0) (U) | 1988 | Nintendo +3337ec46 = Super Mario Bros. (Rev 0) (JU) | 1985 | Nintendo +2e1b6b3c = Super Mario Bros. (Rev 1) (JU) | 1985 | Nintendo +8aa4ace0 = Super Mario Bros. 2 (Rev 0) (U) | 1988 | Nintendo 3bc2e2df = Super Mario Bros. 3 (E) | 1988 | Nintendo | NOT PLAYABLE -85a79d9c = Super Mario Bros. 3 (PRG0, CHR0) (U) | 1988 | Nintendo | May Lock Up/ Graphic Glitches -0b742b33 = Super Mario Bros. 3 (PRG1, CHR0) (U) | 1988 | Nintendo | May Lock Up/Graphic Glitches +85a79d9c = Super Mario Bros. 3 (Rev 0) (U) | 1988 | Nintendo | May Lock Up/ Graphic Glitches +0b742b33 = Super Mario Bros. 3 (Rev 1) (U) | 1988 | Nintendo | May Lock Up/Graphic Glitches 83213ca0 = Teenage Mutant Ninja Turtles (U) 470b031b = Teenage Mutant Ninja Turtles 2 (U) | 1990 | Ultra Games/Konami diff --git a/src/mess/dir_list/crc/pet.crc b/src/mess/dir_list/crc/pet.crc index d62cbc7c9..38901f290 100644 --- a/src/mess/dir_list/crc/pet.crc +++ b/src/mess/dir_list/crc/pet.crc @@ -1,3 +1,4 @@ +[pet] #pet series testlog # programs 4beaba9c 17und4.prg diff --git a/src/mess/dir_list/crc/plus4.crc b/src/mess/dir_list/crc/plus4.crc deleted file mode 100644 index e187cc69e..000000000 --- a/src/mess/dir_list/crc/plus4.crc +++ /dev/null @@ -1,6 +0,0 @@ -# only used when started with 1 image (in mess36b9.1) - -[PLUS4] -##moduls -92f922dc = UTILV4.LO utility v4 -4d959782 = UTILV4.HI diff --git a/src/mess/dir_list/crc/sms.crc b/src/mess/dir_list/crc/sms.crc index 95827c6d2..7f14ad312 100644 --- a/src/mess/dir_list/crc/sms.crc +++ b/src/mess/dir_list/crc/sms.crc @@ -1,164 +1,491 @@ # Sega Mark III/Master System Cartridge CRC List - +# Maintained by Chris Henry # Note: This list is provided as a record of known dumps for this system. # These checksums have not been validated and cannot be assumed correct. # They are provided here as a database to help the emulation of this system. +# Send corrections/submissions to: battlepriest@hotmail.com [sms] +887d9f6b = Ace of Aces | | | NOT PLAYABLE 3658f3e0 = Action Fighter | 1986 | Sega +ecf491cf = Aerial Assault | 1990 | Sega 978c2927 = Afterburner | 1987 | Sega +8b43d21d = Air Rescue | 1992 | Sega +60c19645 = Akai Koudan Zillion +c8718d40 = Aladdin d8c4165b = Aleste | 1988 | Sega -514e7abe = Aleste / Power Strike | 1988 | Sega +c13896d5 = Alex Kidd - The Lost Stars | 1988 | Sega f9dbb533 = Alex Kidd BMX Trial | 1987 | Sega | Input Problems -013c0a9a = Alex Kidd: High Tech World | 1989 | Sega -f8144914 = Alex Kidd in Miracle World | 1986 | Sega -c13896d5 = Alex Kidd: The Lost Stars | 1988 | Sega +013c0a9a = Alex Kidd in High Tech World | 1989 | Sega +08c9ec91 = Alex Kidd in Miracle World (J) | 1986 | Sega +aed9aac4 = Alex Kidd in Miracle World (UE) | 1986 | Sega d2417ed7 = Alex Kidd in Shinobi World | 1990 | Sega +b618b144 = Alien 3 | 1992 | Acclaim bff6e8fe = Alien Storm | 1991 | Sega f327d0a5 = Altered Beast | 1988 | Sega +3727d8b2 = American Pro Football | | | NOT PLAYABLE (looping) e4163163 = Arcade Smash Hits | 1992 | Virgin Games +ae705699 = Ashura | 1986 | Sega 147e02fa = Asterix | 1991 | Sega -fe8e978b = Astro Warrior | 1986 | Sega +f9b7d26b = Asterix and the Great Rescue | 1994 | Sega +def9b14e = Asterix and the Secret Mission | 1993 | Sega f922d39a = Astro Warrior & Pit Pot | 1986 | Sega -9efc7a9f = Aztec Adventure: The Golden Road to Adventure | 1987 | Sega -b4dfb825 = Bank Panic | 1987 | Sega -8550541e = Barcelona '92 -d1cc08ee = The Simpsons: Bart Vs. The Space Mutants | 1992 | Acclaim/Flying Edge -8d39b5e7 = Black Belt | 1986 | Sega +bbe02270 = Astro Warrior +ff614eb3 = Aztec Adventure: The Golden Road to Adventure | 1987 | Sega +e5ff50d8 = Back to the Future 2 | 1990 | Mirrorsoft +2d48c1d3 = Back to the Future 3 | | | NOT PLAYABLE +35d84dc2 = Baku Baku Animals | 1996 | Sega | NOT PLAYABLE (Input Problems) +0d3d510b = Bank Panic | 1987 | Sega +d1cc08ee = Bart Vs. The Space Mutants | 1992 | Acclaim/Flying Edge +f6b2370a = Bart Vs. The World | | | NOT PLAYABLE +0df8597f = Basketball Nightmare | 1989 | Sega +b154ec38 = Batman Returns | 1992 | Sega +c19430ce = Battle Out Run | 1989 | Sega +da3a2f57 = Black Belt | 1986 | Sega +fbf96c81 = Blade Eagle 3D (Brasil) +8ecd201c = Blade Eagle 3D | 1988 | Sega | Playable, but 3D is not emulated 3084cf11 = Bomber Raid | 1988 | Sega 07f73eed = Bonanza Brothers | 1991 | Sega +e421e466 = Borgman | 1988 | Sega 1b10a951 = Bram Stoker's Dracula | 1993 | Sony Imagesoft +e843ba7e = Bubble Bobble | 1991 | Taito b0fc4577 = Buggy Run | 1993 | Sega +b3b5d047 = California Games (Brasil) ac6009a7 = California Games | 1989 | Sega +c0e25d62 = California Games 2 (33485) | | | NOT PLAYABLE +45c50294 = California Games 2 (64854) | | | NOT PLAYABLE +97bf8a47 = Captain Silver a4852757 = Captain Silver | 1988 | Sega | Issue: Game Restarts Upon Losing a Life -9942b69b = Castle of Illusion Starring Mickey Mouse (Japan) | 1991 | Sega | NOT PLAYABLE (No Input) +31ffd7c3 = Castelo Ra Tin Bum | 1997 | TecToy | SEVERE GRAPHIC GLITCHES 7e5839a0 = Championship Hockey | 1992 | Electronic Arts/U.S. Gold -46340c41 = Cheese Cat-astrophe Starring Speedy Gonzales -8c02d693 = Choplifter | 1985 | Sega | Issue: Graphic Glitches -e7f62e6d = Cloudmaster: Chuka Taisen | 1989 | Hot B Co. -13ac9023 = Cool Spot | 1993 | Virgin Games +492c7c6e = Chapolim x Dracula | 1993 | TecToy +44fbe8f6 = Chase HQ +46340c41 = Cheese Cat-astrophe Starring Speedy Gonzales | 1995 | Sega | Partially Playable (Sprite Collision issues) +4a21c15f = Choplifter | 1985 | Sega +e7f62e6d = Cloud Master | 1989 | Hot B. Co. 665fda92 = Columns | 1990 | Sega -b4584dde = Crash Test Dummies | 1993 | Acclaim/Flying Edge -1350e4f8 = Cyber Shinobi: Shinobi Part 2 | 1990 | Sega +13ac9023 = Cool Spot | 1993 | Virgin Games +1350e4f8 = Cyber Shinobi - Shinobi Part 2 | 1990 | Sega +903aad36 = Cyborg Hunter (Brasil) 908e7524 = Cyborg Hunter | 1988 | Sega -f6fab48d = Dick Tracy | 1990 | Sega +71abef27 = Daffy Duck in Hollywood | 1994 | Sega +ae4a28d7 = Danan the Jungle Fighter | 1990 | Sega +5ef8dbda = Dead Angle +e2f7193e = Dead Angle 42fc3a6e = Deep Duck Trouble | 19?? | Sega +b137007a = Desert Speedtrap +82efda3c = Desert Strike 6c1433f9 = Desert Strike | Domark/Electronic Arts | 1992 +f6fab48d = Dick Tracy | 1990 | Sega +a55d89f3 = Double Dragon +8370f6cd = Double Hawk +52b83072 = Double Target +6c696221 = Dr. Robotnik's Mean Bean Machine +9549fcea = Dragon Crystal 07306947 = Dynamite Duke | 1991 | Sega 0e1cc1e0 = Dynamite Dux | 1989 | Sega +6687fab9 = Ecco the Dolphin +1fe4e74d = Enduro Racer (Brasil) 00e73541 = Enduro Racer | 1987 | Sega -c4bb1676 = E-SWAT: City Under Siege | 1990 | Sega -82a38ef8 = Fantasy Zone | 1986 | Sega -b8b141f9 = Fantasy Zone 2: The Tears of OPA-OPA | 1987 | Sega -483394f9 = Fantasy Zone 3: The Maze | 1987 | Sega +c10fce39 = ESWAT - City Under Siege +c4bb1676 = ESWAT - City Under Siege | 1990 | Sega +eaebf323 = F16 Fighting Falcon +65d7e4e0 = Fantasy Zone | 1986 | Sega +d29889ad = Fantasy Zone - The Maze | 1987 | Sega +b8b141f9 = Fantasy Zone 2 - The Tears of OPA-OPA | 1987 | Sega 3ebb7457 = Final Bubble Bobble | 1988 | Taito -ca5c78a5 = Flintstones | 1990 | Grandslam +f6ad7b1d = Fire & Forget 2 +be31d63f = The Flash +ca5c78a5 = The Flintstones | 1990 | Grandslam +38c53916 = Forgotten Worlds +05cdc24e = G-Loc Air Battle +3ec5e627 = Gain Ground +a6fa42d0 = Galactic Protector +1890f407 = Gamebox Esportes Radicais (Brasil) 5fc74d2a = Gangster Town | 1987 | Sega | NOT PLAYABLE (Light Gun Game) +af2abb95 = Gauntlet d9190956 = Gauntlet | 1990 | U.S. Gold/Tengen +a64898ce = George Foreman's KO Boxing +956c416b = Geraldinho (Brasil) +f1f8ff2d = Ghost House | 1986 | Sega 1ddc3059 = Ghostbusters | 1986 | Sega -eedd93fa = Ghost House | 1986 | Sega 6700985a = Ghouls & Ghosts | 1990 | Sega -68646b7b = Global Defense -8dae576e = Mick and Mack as the Global Gladiators | 19?? | Virgin Games +b746a6f5 = Global Defense +b67ceb76 = Global Gladiators +95f54c15 = Golden Axe c08132fb = Golden Axe | 1989 | Sega +f424ad15 = Golden Axe Warrior (Brasil) c7ded988 = Golden Axe Warrior | 1991 | Sega -1533b4ed = Great Football | 1987 | Sega -00b31658 = Great Golf | 1987 | Sega -071b045e = Hang-On | 1985 | Sega +48651325 = Golf Mania +10ed6b57 = Great Baseball +2ac001eb = Great Basketball +2055825f = Great Football | 1987 | Sega +6586bd1f = Great Golf (Japan) | 1987 | Sega +98e4ae4a = Great Golf | 1987 | Sega +72112b75 = Great Soccer / World Soccer +6819b0c0 = Great Volleyball c5083000 = Hang-On & Safari Hunt | 1986 | Sega +585c448a = Hang-On (Brasil) +071b045e = Hang-On | 1985 | Sega fdab876a = Heavyweight Champ | 1991 | Sega cde13ffb = Heroes of the Lance | 1991 | U.S. Gold/S.S.I. +9eb1aa4f = High School Kimengumi 656d1a3e = Hokutonoken +24f5fe8c = Hokutonoken +c9dbf936 = Home Alone 9ced34a7 = Hook | 1992 | Sony +955a009e = Hoshi Wo Sagasite / The Story of Mio 64d6af3b = Impossible Mission | 19?? | U.S. Gold/Epyx | NOT PLAYABLE (Crashes) +b4584dde = The Incredible Crash Test Dummies +be9a7071 = The Incredible Hulk 8aeb574b = Indiana Jones and the Last Crusade | 1990 | U.S. Gold/Lucasarts +fef68275 = James Pond 2 - Codename: Robocod 102d5fea = James Pond 2 - Codename: Robocod | 1991 | U.S. Gold -695a9a15 = Jungle Book | 1993 | Virgin Games | GRAPHIC GLITCHES -516ed32e = Kenseiden | 1988 | Sega +e959e820 = The Jungle Book +695a9a15 = The Jungle Book | 1993 | Virgin Games | GRAPHIC GLITCHES +0667ed9f = Jurassic Park +05ea5353 = Kenseiden +548aa53c = Kenseiden (Brasil) +516ed32e = Kenseiden (Japan) | 1988 | Sega f8d33bc4 = Kings Quest | 1989 | Parker Brothers +bb351118 = Klax +ed15f21e = Klax 2b435fd6 = Klax | 1991 | Tengen -1fbe3106 = Kung Fu Kid -24e97200 = Land of Illusion Starring Mickey Mouse | 1992 | Sega -f369b2d8 = Lemmings | 1992 | Sega/Psygnosis -e8511b08 = Lord of the Sword | 1988 | Sega -1a9b396f = Mahjong Sengoku Jidai | 1987 | Sega +64a585eb = Krusty's Fun House +1e949d1f = Kung Fu Kid +0ca95637 = Laser Ghost +f369b2d8 = Lemmings (13377) | 1992 | Sega/Psygnosis +2c61ed88 = Lemmings (58740) | 1992 | Sega/Psygnosis +cb09f355 = Line of Fire +aa7d6f45 = Lord of the Sword (Japan) | 1988 | Sega +e8511b08 = Lord of the Sword +a1710f13 = The Lucky Dime Caper +9d549e08 = Machine Gun Joe +bcfbfc67 = Mahjong Sengoku Jidai | 1987 | Sega +ca860451 = Makai Retsuden +94fee07b = Marble Madness bf6f3e5f = Marble Madness | 1992 | Tengen +49c5d8e2 = Master of Darkness 96fb4d4b = Master of Darkness | 1992 | Sega -0e333b6e = Miracle Warriors: Seal of the Dark Lord | 1988 | Sega -82fda895 = Montezuma's Revenge | 1989 | Parker Brothers +28bc7fad = Megumi Rescue +d7416b83 = Mercs 56cc906b = Michael Jackson's Moonwalker | 1990 | Sega +8dae576e = Mick & Mack as the Global Gladiators +9942b69b = Mickey Mouse - Castle of Illusion (Japan) +953f42e1 = Mickey Mouse - Castle of Illusion | 1991 | Sega +24e97200 = Mickey Mouse - Land of Illusion | 1992 | Sega +6350e649 = Mickey Mouse - Legend of Illusion +ebc2bfa1 = Miracle Warriors - Seal of the Dark Lord +0e333b6e = Miracle Warriors - Seal of the Dark Lord | 1988 | Sega +82fda895 = Montezuma's Revenge | 1989 | Parker Brothers 302dc686 = Mortal Kombat | 1993 | Acclaim +9ed8341a = Mortal Kombat 2 2663bf18 = Mortal Kombat 2 | 1994 | Acclaim 3cd816c6 = Ms. Pac-Man | 1991 | Tengen +62f0c23d = My Hero +c660ff34 = The New Zealand Story +761e9396 = Ninja Gaiden +1b1d8cc2 = Ninja Gaiden +ce97efe8 = Olympic Gold - Barcelone '92 82ef2a7d = The Ottifants | 1993 | Sega -dc0860e7 = Out Run | 1987 | Sega | Issue: Minor Graphic Glitches +04fa0682 = OutRun +ca99cefa = OutRun +481bab2e = OutRun | 1987 | Sega | Issue: Minor Graphic Glitches +2aa12d7e = OutRun Europa f037ec00 = Outrun Europa | 1991 | U.S. Gold -327a0b4c = Paperboy | 1990 | Tengen +be57a9a5 = Pacmania +294e0759 = Paperboy (43701) | 1990 | Tengen +327a0b4c = Paperboy (4705) | 1990 | Tengen +e030e66c = Parlour Games 7abc70e9 = Party Games / Family Games | 1987 | Sega +2bcdb8fa = Penguin Land (Japan) | 1987 | Sega f97e9875 = Penguin Land | 1987 | Sega +75971bef = Phantasy Star (Brasil) +07301f83 = Phantasy Star (Saturn Collection Version) +6605d36a = Phantasy Star (Japan) 00bef1d7 = Phantasy Star | 1988 | Sega +283712a9 = Pit Fighter +c7a1fdef = Populous +abd48ad2 = Poseideon Wars 3D +4077efd9 = Power Strike a109a6fe = Power Strike 2 | 1993 | Sega Compile -2c8f5b9f = Prince of Persia | 1992 | Br0derbund e5f789b9 = Predator 2 | 1992 | Acclaim | NOT PLAYABLE (Input Problems) -09489195 = Pro Wrestling | 1986 | Sega -97993479 = Psycho Fox | 1989 | Sega +ba6344fc = Prince of Persia +45f058d6 = Prince of Persia +2c8f5b9f = Prince of Persia | 1992 | Br0derbund +fbde42d3 = Pro Wrestling | 1986 | Sega 5c0b1f0f = Psychic World | 1991 | Sega -001db6d7 = Quartet | 1987 | Sega +97993479 = Psycho Fox | 1989 | Sega +8167ccc4 = Putt & Putter (29049) +357d4f78 = Putt & Putter (37744) +e0f34fa6 = Quartet | 1987 | Sega +7510bce3 = R-Type (Brasil) +bb54b6b0 = R-Type +56201996 = R.C. Grand Prix +54316fea = R.C. Grand Prix c172a22c = Rainbow Islands | 1993 | Sega +bbda65f0 = Rambo - First Blood Part 2 +da5a7013 = Rambo 3 42fc47ee = Rampage | 1988 | Sega +426e5c8a = Rampart c547eb1b = Rastan | 1988 | Taito +6d94bb0e = Reggie Jackson Baseball +3be7f641 = Renegade +79ac8e7f = Rescue Mission +b876fc74 = Road Rash +9f951756 = Robocop 3 +8212b754 = Robocop Vs. Terminator +065e081f = Rocky +1fdae719 = Running Battle +bae75805 = Rygar +32da4b0d = Rygar +cb5d369b = Sagaia +66388128 = Sagaia +9a608327 = Sapo Xule vs. os Invasores do Brejo +00529114 = Secret Commando a8061aef = Sega Chess | 1991 | Sega +56476a54 = Seishyun Scandal +f8176918 = Sensible Soccer +aab67ec3 = Shanghai +11fddfb2 = Shinobi +abdf3923 = Sitio do Picapau Amarelo +d33b296a = Slap Shot +e0b1aff8 = Smash TV +11645549 = Solomon no Kagi 96b3f29e = Sonic Blast | 1996 | Sega | NOT PLAYABLE (Locks Up System) +fb14f1cf = Sonic Chaos aedf38df = Sonic Chaos | 1993 | Sega 11c1bc8a = Sonic Spinball | 1994 | Sega | NOT PLAYABLE (Frames Drop, Graphic Glitches) b519e833 = Sonic The Hedgehog | 1991 | Sega 5b3b922c = Sonic The Hedgehog 2 | 1992 | Sega +d78f44ae = Space Harrier +6bd5c2bf = Space Harrier 3D +a57cad18 = Speedball | | Mirrorsoft +5ccc1a65 = Speedball | | Virgin +0c7366a0 = Speedball 2 4752cae7 = Spellcaster 908ff25c = Spiderman Vs. the Kingpin +ebe45388 = Spiderman - Return of the Sinister Six +41c948bf = Sports Pad Soccer 78d7faab = Spy Vs. Spy | 1986 | Sega d4b8f66d = Star Wars | 1993 | U.S. Gold/Lucasarts +0f8287ec = Street Fighter 2 +cb6f3d1a = Strider (Brasil) 131bdb98 = Strider +b8f0915a = Strider 2 +d8f2f1b9 = Supmarine Attack +b13df647 = Sukeban Deka 2 +8da5c93f = Summer Games +10dbbef4 = Super Kick Off +406aa0c2 = Super Kick Off +54f68c2a = Super Off-Road +7e0ef8cb = Super Racing +1d6244ee = Super Space Invaders 914514e3 = Super Tennis 8230384e = Super Tetris 6f9ac98f = Superman | 1992 | Virgin Games 7cc3e837 = Tazmania | 1992 2728faa3 = Teddy Boy +1a390b93 = Tennis Ace +8132ab2c = Tensai Bakabon +ac56104f = Terminator 2 - Judgment Day +93ca8152 = Terminator 2 - The Arcade Game edc5c012 = The Terminator +8fb75994 = The Circuit / World Grand Prix +66a15bd9 = The Ninja 3e63768a = The Smurfs | 1994 | Infogrames b3007db7 = Thunder Blade -51bd14be = Time Soldier +ed9a19b6 = Time Soldiers (Brasil) +51bd14be = Time Soldiers +0c2fc2de = Tom and Jerry bf7b7285 = Tom and Jerry - The Movie -d62f520a = Transbot +4bc42857 = Trans-bot +e8215c2e = Trap Shooting / Marksman Shooting / Safari Hunt +e94784f2 = Treinomento Do Mymo +2f2e3bc9 = Tri Formation e5374022 = Trivial Pursuit | 1992 | Domark -b52d60c8 = Ultima 4: Quest of the Avatar | 1990 | Sega |NOT PLAYABLE +22cca9bb = Turma da Monica em Oresgate +de9f8517 = Ultima 4 - Quest of the Avatar +b52d60c8 = Ultima 4 - Quest of the Avatar | 1990 | Sega |NOT PLAYABLE +15668ca4 = Ultimate Soccer +39540619 = Vampire 20f40cae = Vampire | 1992 | Sega +912d92af = Wimbledon a20290b6 = Winter Olympics '94 -f374ecba = Wonder Boy -488983b4 = Wonder Boy 2 +1f8efa1d = Wolf Child +73705c02 = Wonder Boy +8cbef0c1 = Wonder Boy in Monsterland 679e1676 = Wonder Boy 3 +81bff9bb = Wonder Boy 5 (Beta Version) +7d7ce80b = Wonder Boy 5 +fa8b5f3d = Wonder Boy in Monster World (Beta) c9a449b7 = World Class Leaderboard +96e75f48 = World Cup '92 a6bf8f9e = World Cup '94 | 1994 |U.S. Gold +6e1ad6fd = World Cup Italia '90 914d3fc4 = World Games | 1986 | Epyx -e2fc504c = World Grand Prix -b1b230df = WWF Steel Cage | 1993 | Acclaim +4aaad0d6 = World Grand Prix +72112b75 = World Soccer +b1b230df = WWF Steel Cage Challenge| 1993 | Acclaim +3e1387f6 = X-Men - Mojo World ec726c0d = Xenon 2 b33e2827 = Y's - The Vanished Omen +a3ef13cb = Zaxxon 3D +5718762c = Zillion 9d9d0a5f = Zool -5cf5a9bf = Zillion -2ebacafc = Zillion 2 - Tri Formation + + +#SG-1000 Cartridges +0b4bca74 = Borderline +092f29d6 = The Castle +5970a12b = Champion Baseball +868419b5 = Championship Golf +bd24d27b = Flicky +191ffe0a = GP World +9be3c6bd = Hang-On 2 +11db4b1d = Loderunner +49e9718b = Safari Hunting +6a96978d = Tanoshii Sansuu + + +#SC-3000 Cartridges +0e21e6cf = Astro Flash +ea0f2691 = Bombjack +d37bda49 = Chack'n Pop +62b21e31 = Champion Billiards +732b7180 = Choplifter +dc4383cc = Congo Bongo +288940cb = Drol +a2c45b61 = Exerion +7ce06fce = F16 Fighting Falcon +8efc77bc = Flipper +dabcc054 = Ghost House +1898f274 = Girl's Garden +c1e699db = Great Baseball +61fa9ea0 = Guzzler +4587de6e = H.E.R.O. +a627d440 = Hustle Chummy +ba09a0fd = Hyper Sports +90160849 = James Bond 007 +bcd91d78 = Kung Fu Kid +72542786 = Monaco Grand Prix +09196fc5 = N-Sub +22f4f92a = Nihonshi Ninpyou +3b912408 = Ninja Princess +f4f78b76 = Orguss +30c52e5e = Pacar +346556b9 = Penguin Land +db6404ba = Pop Flamer +77db4704 = Q*Bert +619dd066 = Safari Race +87b9ecb8 = Satellite 7 +f691f9c7 = Sega BASIC Level 2 +5d9f11ca = Sega BASIC Level 3 V1 +622010e1 = Sega Music Editor +54d5bec3 = Sinbad Mystery +922c5468 = Soukoban +6ad5cb3d = Space Invaders +a71bc542 = Spy Vs. Spy +7f25deca = Star Jacker +1ae94122 = Star Jacker +981e36c1 = Super Galaga +084cc13e = Supertank +9dfa67ee = Teddy Boy +e2fd5201 = Yamato +905467e4 = Zaxxon +bc5d20df = Zippy Race + + +#SMS demos +1a07b7a4 = Zoop's SMS Power Demo + #[known_bad_dumps] -82038ad4 = Alf | 1989 | Sega | BAD DUMP +8b4ca9ea = Air Rescue | | | BAD DUMP +2210f389 = Alex Kidd - The Lost Stars | | | BAD DUMP +2c7278ad = Alex Kidd in Miracle World (Brasil) | | | OVERDUMPED +2cd7dec7 = Alex Kidd in Shinobi World | | | BAD DUMP +82038ad4 = Alf | 1989 | Sega | NO GOOD DUMP KNOWN e558a867 = Alien Syndrome | 1987 | Sega | BAD DUMP +fff63b0b = Anmitsu Hime | | | BAD DUMP +6a9eaef7 = Astro Warrior & Pit Pot | | | BAD DUMP +f922d39a = Astro Warrior & Pit Pot | | | OVERDUMPED +fe8e978b = Astro Warrior | | | OVERDUMPED +9efc7a9f = Aztec Adventure - The Golden Road to Paradise | | | OVERDUMPED +b4dfb825 = Bank Panic | | | BAD DUMP +8d39b5e7 = Black Belt | | | OVERDUMPED +5f5d13af = California Games 2 | | | BAD DUMP 3cff6e80 = Casino Games | 1989 | Sega | BAD DUMP -18086b70 = Taito Chase HQ | 1991 | Taito | BAD HEADER/NOT PLAYABLE (No Input) -a55d89f3 = Double Dragon | 1988 | Sega | BAD DUMP +18086b70 = Chase HQ | 1991 | Taito | BAD DUMP/NOT PLAYABLE (No Input) +3b627808 = Chase HQ | | | BAD DUMP +7bb81e3d = Chase HQ | | | BAD DUMP +75eb037d = Choplifter | | | BAD DUMP +8c02d693 = Choplifter | | | OVERDUMPED +cc92057a = Cool Spot | | | BAD DUMP +df8c8f76 = Desert Strike | | | BAD DUMP +faa2c8db = Double Dragon | 1988 | Sega | BAD DUMP +52d9eaf1 = Double Hawk | | | BAD DUMP ec788661 = F1 Championship | 1991 | Domark Group | BAD DUMP +82a38ef8 = Fantasy Zone | | | OVERDUMPED +483394f9 = Fantasy Zone - The Maze | | | OVERDUMPED 6c827520 = Galaxy Force | 1989 | Sega | BAD DUMP +61bc1fa6 = Ghost House | | | BAD DUMP +eedd93fa = Ghost House | | | OVERDUMPED +68646b7b = Global Defense | | | OVERDUMPED +5dabfdc3 = Golf Mania | | | BAD DUMP a51376fe = Golvellius | 1988 | Sega | BAD DUMP +1533b4ed = Great Football | | | OVERDUMPED +00b31658 = Great Golf | | | OVERDUMPED b2801b0c = Great Volleyball | 1987 | Sega | BAD DUMP +2b7f7447 = James Bond 007 - The Duel | | | BAD DUMP +68108314 = Kujakuou | | | BAD DUMP +1fbe3106 = Kung Fu Kid | | | OVERDUMPED +1a9b396f = Mahjong Sengoku Jidai | | | OVERDUMPED +22f2c541 = Masters of Combat | | | BAD DUMP +9c4f03ac = Michael Jackson's Moonwalker | | | BAD DUMP +45e5c2f1 = Mickey Mouse - Castle of Illusion | | | BAD DUMP +fac09af4 = Monica no Castelo do Drago | | | BAD DUMP 93097cb7 = My Hero | 1986 | Sega | OVERDUMPED -c660ff34 = New Zealand Story | 1992 | Taito | BAD DUMP -bb54b6b0 = R-Type | 1988 | Sega | BAD DUMP +fbc66cbf = The New Zealand Story | 1992 | Taito | BAD DUMP +a2f9c7af = Olympic Gold - Barcelona '92 | | | BAD DUMP +2be9619b = Pacmania | | | BAD DUMP +6708cc37 = Pacmania | | | OVERDUMPED +7f4f28c6 = Phantasy Star | | | BAD DUMP +514e7abe = Power Strike | | | OVERDUMPED +fd069aae = Pro Wrestling | | | BAD DUMP +09489195 = Pro Wrestling | | | OVERDUMPED +001db6d7 = Quartet | | | OVERDUMPED +4902b7a2 = R.C. Grand Prix | | | BAD DUMP +5d634d43 = Rocky | | | BAD DUMP +9a8b28ec = Scramble Spirits | | | BAD DUMP +73cdf9db = Secret Commando | | | OVERDUMPED +4135ae1d = Shadow Dancer | | | BAD DUMP +1575581d = Shadow of the Beast | | | BAD DUMP +e8ae1c44 = Shinobi | | | BAD DUMP +483bd1c8 = Shinobi | | | BAD DUMP +0473142f = Slap Shot | | | BAD DUMP +1b7d2a20 = Special Criminal Investigation | | | BAD DUMP +87aabdfe = Street Fighter 2 | | | BAD DUMP +599901bb = Street Fighter 2 | | | BAD DUMP +5b731a99 = Strider | | | BAD DUMP +ab260100 = Super Futebol | | | BAD DUMP 55bf81a0 = Super Monaco GP | 1990 | Sega | BAD DUMP -dfb0b161 = Vigilante | | | BAD DUMP \ No newline at end of file +8230384e = Super Tetris | | | OVERDUMPED +7522cf0a = Super Wonderboy - Monster World | | | BAD DUMP +1b312e04 = Taz Mania | | | BAD DUMP +cf9f0a7f = The Ninja | | | OVERDUMPED +a2ff09b9 = Tom and Jerry - The Movie | | | BAD DUMP +b003f4eb = Tom and Jerry - The Movie | | | BAD DUMP +d62f520a = Trans-Bot | | | OVERDUMPED +2ebacafc = Tri Formation | | | OVERDUMPED +7840d45c = Ultimate Soccer | | | BAD DUMP +dfb0b161 = Vigilante | | | BAD DUMP +f374ecba = Wonder Boy | | | OVERDUMPED +e2fc504c = World Grand Prix | | | OVERDUMPED +bae431a4 = World Soccer | | | OVERDUMPED +5cf5a9bf = Zillion | | | OVERDUMPED + +#SG/SC Bad Dumps +323f357f = Rozetta no Syouzou | | | NO GOOD DUMP KNOWN +155fd01f = Sega BASIC Level 3 V1 | | | BAD DUMP +b67ea1c4 = Sega Music Editor | | | BAD DUMP diff --git a/src/mess/dir_list/crc/vc20.crc b/src/mess/dir_list/crc/vc20.crc deleted file mode 100644 index 41e38fc70..000000000 --- a/src/mess/dir_list/crc/vc20.crc +++ /dev/null @@ -1,16 +0,0 @@ - -# problem with file formats -# prg are images, but startet with 2 bytes for its load address -# so gives other crc then binary file - -[VC20] -#autostart moduls -9eac9fab = ARCARDIA.A0 (modulized version) -963b2cae = JAWBREAK.PRG -a92bfff2 = JAW2_PAL.A0 (same version as above) -2bc4b231 = FRANTIC.PRG -72ee00db = K-RAZY.60 -324e2a30 = K-RAZY.A0 -2ffd2894 = K-STAR.60 -2fe93f44 = K-STAR.A0 - diff --git a/src/mess/dir_list/roms/c16c/dir.txt b/src/mess/dir_list/roms/c16c/dir.txt new file mode 100644 index 000000000..0950580bf --- /dev/null +++ b/src/mess/dir_list/roms/c16c/dir.txt @@ -0,0 +1 @@ +Files for this system go here. \ No newline at end of file diff --git a/src/mess/dir_list/roms/msxuk/dir.txt b/src/mess/dir_list/roms/msxuk/dir.txt new file mode 100644 index 000000000..0950580bf --- /dev/null +++ b/src/mess/dir_list/roms/msxuk/dir.txt @@ -0,0 +1 @@ +Files for this system go here. \ No newline at end of file diff --git a/src/mess/dir_list/roms/plus4c/dir.txt b/src/mess/dir_list/roms/plus4c/dir.txt new file mode 100644 index 000000000..0950580bf --- /dev/null +++ b/src/mess/dir_list/roms/plus4c/dir.txt @@ -0,0 +1 @@ +Files for this system go here. \ No newline at end of file diff --git a/src/mess/docs/6522-via.txt b/src/mess/docs/6522-via.txt deleted file mode 100644 index 66c20c856..000000000 --- a/src/mess/docs/6522-via.txt +++ /dev/null @@ -1,1315 +0,0 @@ -This document covers all programming information about Rockwell R6522 -Versatile Interface Adapter (VIA) chip used in many Commodore devices. -Figures and tables in this file were drawn with +, -, | characters. -For clear description, some of the figures are bit wider than 80 characters. - -This file was created from scannings by Frank Kontros -Many thanks for corrections to Wolfgang Lorenz - -If you have any questions, comments or suggestions concerning this file or -6522 chip, please contact me (Frank). - - ------------------------------------------------------------------------------- - R6522 - VERSATILE INTERFACE - ADAPTER ------------------------------------------------------------------------------- - - -DESCRIPTION - -The R6522 Versatile Interface Adapter (VIA) is a very flexible I/O control -device. In addition, this device contains a pair of very powerful 16-bit -interval timers, a serial-to-parallel/parallel-to-serial shift register and -input data latching on the peripheral ports. Expanded handshaking capability -allows control of bidirectional data transfers between VIA's in multiple -processor systems. - -Control of peripheral devices is handled primarily through two 8-bit -bidirectional ports. Each line can be programmed as either an input or an -output. Several peripheral I/O lines can be controlled directly from the -interval timers for generating programmable frequency square waves or for -counting externally generated pulses. To facilitate control of the many -powerful features of this chip, an interrupt flag register, an interrupt -enable register and a pair of function control registers are provided. - - -FEATURES - -o Two 8-bit bidirectional I/O ports -o Two 16-bit programmable timer/counters -o Serial data port -o TTL compatible -o CMOS compatible peripheral control lines -o Expanded "handshake" capability allows positive control - data transfers between processor and peripheral devices -o Latched output and input registers -o 1 MHz and 2 Mhz operation -o Single +5V power supply - - - ORDERING INFORMATION +---------------+ - Vss =| 1 40 |= CA1 - PA0 =| 2 39 |= CA2 - Part Number: PA1 =| 3 38 |= RS0 - R6522 _ _ _ PA2 =| 4 37 |= RS1 - | | | PA3 =| 5 36 |= RS2 - | | | PA4 =| 6 35 |= RS3 - | | | PA5 =| 7 34 |= RES - | | | PA6 =| 8 33 |= D0 - | | | PA7 =| 9 32 |= D1 - | | +------ Temperature Range PB0 =| 10 31 |= D2 - | | Blank = 40øC to +70øC PB1 =| 11 30 |= D3 - | | E = 40øC to +85øC PB2 =| 12 29 |= D4 - | | PB3 =| 13 28 |= D5 - | | PB4 =| 14 27 |= D6 - | +-------- Package PB5 =| 15 26 |= D7 - | C = Ceramic PB6 =| 16 25 |= 02 - | P = Plastic PB7 =| 17 24 |= CS1 - | CB1 =| 18 23 |= CS2 - | CB2 =| 19 22 |= R/W - +---------- Frequency Vcc =| 20 21 |= IRQ - No Letter = 1 MHz +---------------+ - A = 2 MHz R6522 Pin Configuration - - -INTERFACE SIGNALS - - +---------------+ - / | | \ - | /-------\ | | /-------\ | - M B | D0-D7 < 8 >| |< (8) > PA0-PA7 | - I U | \-------/ | | \-------/ | - C S | | | | P I - R | 02 ---------->| |<---------- CA1 | E N - R O I | _ | | | R T - 6 P N | R/W ---------->| R6522 |<---------> CA2 | I E - 5 R T < ___ 2 | VIA | > P R - 0 O E | CS1,CS2 -----/---->| |<---------> CB1 | H F - 0 C R | 4 | | | E A - E F | RS0-RS3 -----/---->| |<---------> CB2 | R C - S A | ___ | | | A E - S C | RES ---------->| | /-------\ | L - O E | ___ | |< (8) > PB0-PB7 | - R | IRQ ---------->| | \-------/ | - \ | | / - +---------------+ - - Figure 1. R6522 VIA interface Signals - - ___ -RESET (RES) - ___ -A low reset (RES) input clears all R6522 internal registers to logic 0 -(except T1 and T2 latches and counters and the Shift Register). This -places all peripheral interface lines in the input state, disables the -timers, shift register, etc. and disables interrupting from the chip. - -INPUT CLOCK (PHASE 2) - -The input clock is the system 02 clock and triggers all data transfers -between processor bus and the R6522. - _ -READ/WRITE (R/W) - -The direction of the data transfers between the R6522 and the system processor -is controlled by the R/W line in conjunction with the CS1 and CS2 inputs. When -R/W is low (write operation), and the R6522 is selected, data is transferred -from the processor bus into the selected R6522 register. When R/W is high -(read operation), and the R6522 is selected, data is transferred from the -selected R6522 register to the processor bus. - -DATA BUS (D0-D7) - -The eight bidirectional data bus lines transfer data between the R6522 and -the system processor bus. During read cycles, the contents of the selected -R6522 register are placed on the data bus lines. During write cycles, these -lines are high-impedance inputs and data is transferred from the processor -bus into the selected register. When the R6522 is not selected, the data -bus lines are high impedance. - ___ -CHIP SELECTS (CS1, CS2) - -The two chip select inputs are normally connected to processor address lines -either directly or through decoding. The selected R6522 register is accessed -when CS1 is high and CS2 is low. - -REGISTER SELECTS (RS0-RS3) - -The coding of the four Register Select inputs select one of the 16 internal -registers of the R6522, as shown in Table 1. - - - Table 1. R6522 Register Addressing - -+----+---------------+---------+---------------------------------------------+ -|Reg.| RS Coding |Register | Register/Description | -| # +---+---+---+---+ Desig. +----------------------+----------------------+ -| |RS3|RS2|RS1|RS0| | Write (R/W = L) | Read (R/W = H) | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 0 | 0 | 0 | 0 | 0 | ORB/IRB | Output Register B | Input Register B | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 1 | 0 | 0 | 0 | 1 | ORA/IRA | Output Register A | Input Register A | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 2 | 0 | 0 | 1 | 0 | DDRB | Data Direction Register B | -+----+---+---+---+---+---------+---------------------------------------------+ -| 3 | 0 | 0 | 1 | 1 | DDRA | Data Direction Register A | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 4 | 0 | 1 | 0 | 0 | T1C-L | T1 Low-Order Latches | T1 Low-Order Counter | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 5 | 0 | 1 | 0 | 1 | T1C-H | T1 High-Order Counter| T1 High-Order Counter| -+----+---+---+---+---+---------+---------------------------------------------+ -| 6 | 0 | 1 | 1 | 0 | T1L-L | T1 Low-Order Latches | -+----+---+---+---+---+---------+---------------------------------------------+ -| 7 | 0 | 1 | 1 | 1 | T1L-H | T1 High-Order Latches | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 8 | 1 | 0 | 0 | 0 | T2C-L | T2 Low-Order Latches | T2 Low-Order Counter | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 9 | 1 | 0 | 0 | 1 | T2C-H | T2 High-Order Counter | -+----+---+---+---+---+---------+---------------------------------------------+ -| 10 | 1 | 0 | 1 | 0 | SR | Shift Register | -+----+---+---+---+---+---------+---------------------------------------------+ -| 11 | 1 | 0 | 1 | 1 | ACR | Auxiliary Control Register | -+----+---+---+---+---+---------+---------------------------------------------+ -| 12 | 1 | 1 | 0 | 0 | PCR | Peripheral Control Register | -+----+---+---+---+---+---------+---------------------------------------------+ -| 13 | 1 | 1 | 0 | 1 | IFR | Interrupt Flag Register | -+----+---+---+---+---+---------+---------------------------------------------+ -| 14 | 1 | 1 | 1 | 0 | IER | Interrupt Enable Register | -+----+---+---+---+---+---------+----------------------+----------------------+ -| 15 | 1 | 1 | 1 | 1 | ORA/IRA | Output Register A* | Input Register A* | -+----+---+---+---+---+---------+----------------------+----------------------+ -| NOTE: * Same as Register 1 except no handshake. | -+----------------------------------------------------------------------------+ - - ___ -INTERRUPT REQUEST (IRQ) - -The Interrupt Request output goes low whenever an internal interrupt flag is -set and the corresponding interrupt enable bit is a logic 1. This output is -open-drain to allow the interrupt request signal to be wire-OR'ed with other -equivalent signals in the system. - -PERIPHERAL PORT A (PA0-PA7) - -Port A consists of eight lines which can be individually programmed to act -as inputs or outputs under control of a Data Direction Register A. The -polarity of output pins is controlled by an Output Register and input data -may be latched into an internal register under control of the CA1 line. All -of these modes of operation are controlled by the system processor through -the internal control registers. These lines represents one standard TTL -load in the input mode and will drive one standard TTL load in the output -mode. Figure 2 illustrates the output circuit. - - - +5V - o - | - > - < - > - < - | - *-----*---> PA0-PA7, - | | CA2 - +-----+ +--+ | - I/O CONTROL ----+ | || | - | NOR |o----+| | - OUTPUT DATA ----+ | || | - +-----+ +--+ | - __|__ | - --- | - ~ | - INPUT DATA <-------------------------+ - - Figure 2. Port A Output Circuit - - -PORT A CONTROL LINES (CA1,CA2) - -The two Port A control lines act as interrupt inputs or as handshake -outputs. Each line controls an internal interrupt flag with a corresponding -interrupt enable bit. In addition, CA1 controls the latching of data on -Port A input lines. CA1 is a high-impedance input only while CA2 represents -one standard TTL load in the input mode. CA2 will drive one standard TTL -load in the output mode. - -PORT B (PB0-PB7) - -Peripheral Port B consists of eight bi-directional lines which are -controlled by an output register and a data direction register in much the -same manner as the Port A. In addition, the polarity of the PB7 output -signal can be controlled by one of the interval timers while the second -timer can be programmed to count pulses on the PB6 pin. Port B lines -represent one standard TTL load in the input mode and will drive one -standard TTL load in the output mode. In addition, they are capable of -sourcing 1.0 mA at 1.5 Vdc in the output mode to allow the outputs to -directly drive Darlington transistor circuits. Figure 3 is the circuit -schematic. - - +5V - o - | - *------+ - | | - INPUT +-----+ +--+ > - OUTPUT -------------*---+ | || < - CONTROL |\ | | NOR |o----+| > - +--o| >---+---+ | || < - | |/ | +-----+ +--+ | - | | | | - | | *------*---> PB0-PB7, - | | | | CB1,CB2 - | | +-----+ +--+ | - | +---+ | || | - OUTPUT | | NOR |o----+| | - DATA ---*-------------+ | || | - +-----+ +--+ | - __|__ | - --- | - ~ | - INPUT DATA <---------------------------------------+ - - Figure 3. Port B Output Circuit - - -PORT B CONTROL LINES (CB1,CB2) - -The Port B control lines act as interrupt inputs or as handshake outputs. -As with CA1 and CA2, each line controls an interrupt flag with a -corresponding interrupt enable bit. In addition, these lines act as a -serial port under control of the Shift Register. These lines represent one -standard TTL load in the input mode and will drive one standard TTL load in -the output mode. CB2 can also drive a Darlington transistor circuit; -however, CB1 cannot. - - -FUNCTIONAL DESCRIPTION - -The internal organization of the R6522 VIA is illustrated in Figure 4. - - - INTERRUPT ___ - CONTROL +----------------------------------> IRQ - +------------+ | +-----------+ +-------+ - | FLAGS | | |INPUT LATCH| | | - | (IFR) | | | (IRA) | | | P - +--\+------------+ | +-----------+ | | O - | +/| ENABLE +-+ +--\| OUTPUT |/--\|BUFFERS|/--\ R - +-------+ | | | (IER) | | +/| (ORA) |\--/| (PA) |\--/ T - | | | | +------------+ | | +-----------+ | | -DATA /--\| DATA +-+ +-------------------+ | | DATA DIR | | | A -BUS \--/| BUS +-+ +-------------------+ | | (DDRA) | | | - |BUFFERS| | | +------------+ | | +-----------+ +-------+ - | | | | | PERIPHERAL | | |PORT A REGISTER - +-------+ | | | (PCR) | | | - | +\+------------+ | | +-----------+<--------------- CA1 - | +/| AUXILIARY | | +\| PORT A |<--------------> CA2 - | | | (ACR) | | +/+-----------+ - | | +------------+ | | | PORT B |<--------+ - | | FUNCTION | | +-----------+<------+ | - | | CONTROL | | HANDSHAKE | | - | | +-------+-------+ | | CONTROL | | -___ +-------+ | | | LATCH | LATCH | | | +-----------+ | | -RES ---->| | | | |(T1L-H)|(T1L-L)| | +\| SHIFT REG |<------+-*-----> CB1 - _ | | | +\+-------+-------+ | +/| (SR) |<------*-------> CB2 -R/W ---->| | | +/|COUNTER|COUNTER| | | +-----------+ -02 ---->| | | | |(T1C-H)|(T1C-L)| | | -___ | CHIP | | | +-------+-------+ | |PORT B REGISTER -CS2 ---->| ACCESS| | | TIMER 1 | | +-----------+ +-------+ -CS1 ---->|CONTROL| | | +-------+ | | |INPUT LATCH| | | - | | | | | LATCH | | | | (IRB) | | | P -RS0 ---->| | | | |(T2L-L)| | | +-----------+ | | O -RS1 ---->| | | | +-------+-------+ | +\| OUTPUT |/--\|BUFFERS|/--\ R -RS2 ---->| | | +\|COUNTER|COUNTER| +--/| (ORB) |\--/| (PB) |\--/ T -RS3 ---->| | +--/|(T2C-H)|(T2C-L)| +-----------+ | | - +-------+ +-------+-------+ | DATA DIR | | | B - TIMER 2 | (DDRB) | | | - +-----------+ +-------+ - - Figure 4. R6522 VIA Block Diagram - - -PORT A AND PORT B OPERATION - -The R6522 VIA has two 8-bit bidirectional I/O ports (Port A and Port B) -and each port has two associated control lines. - -Each 8-bit peripheral port has a Data Direction Register (DDRA, DDRB) for -specifying whether the peripheral pins are to act as inputs or outputs. A 0 -in a bit of the Data Direction Register causes the corresponding peripheral -pin to act as an input. A 1 causes the pin to act as an output. - -Each peripheral pin is also controlled by a bit in the Output Register -(ORA, ORB) and the Input Register (IRA, IRB). When the pin is programmed as -an output, the voltage on the pin is controlled by the corresponding bit of -the Output Register. A 1 in the Output Register causes the output to go -high, and a 0 causes the output to go low. Data may be written into Output -Register bits corresponding to pins which are programmed as inputs. In this -case, however, the output signal is unaffected. - -Reading a peripheral port causes the contents of the Input Register (IRA, -IRB) to be transferred onto the Data Bus. With input latching disabled, IRA -will always reflect the levels on the PA pins. With input latching enabled, -IRA will reflect the levels on the PA pins at time the latching occurred -(via CA1). - -The IRB register operates similar to the IRA register. However, for pins -programmed as outputs there is a difference. When reading IRA, the level on -the pin determines whether a 0 or a 1 is sensed. When reading IRB, however, -the bit stored in the output register, ORB, is the bit sensed. Thus, for -outputs which have large loading effects and which pull an output "1" down -or which pull an output "0" up, reading IRA may result in reading a "0" -when a "1" was actually programmed, and reading a "1" when a "0" was -programmed. Reading IRB, on the other hand, will read the "1" or "0" level -actually programmed, no matter what the loading on the pin. - -Figures 5 through 8 illustrate the formats of the port registers. In -addition, the input latching modes are selected by the Auxiliary Control -Register (Figure 12). - - - REG 0 -- ORB/IRB - +---+---+---+---+---+---+---+---+ - | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+ - | | | | | | | +----- PB0 | - | | | | | | | | - | | | | | | +--------- PB1 | - | | | | | | | - | | | | | +------------- PB2 | OUTPUT REGISTER - | | | | | | "B" (ORB) - | | | | +----------------- PB3 | - | | | | +- OR - | | | +--------------------- PB4 | - | | | | INPUT REGISTER - | | +------------------------- PB5 | "B" (IRB) - | | | - | +----------------------------- PB6 | - | | - +--------------------------------- PB7 | - -+ - -+-----------------------+-----------------------+---------------------------+ -| PIN | | | -| DATA DIRECTION | WRITE | READ | -| SELECTION | | | -+-----------------------+-----------------------+---------------------------+ -|DDRB = 1 OUTPUT |MPU WRITES OUTPUT LEVEL|MPU READS OUTPUT REGISTER | -| |ORB |BIT, ORB PIN LEVEL HAS NO | -| | |AFFECT | -+-----------------------+-----------------------+---------------------------+ -|DDRB = 0 INPUT |MPU WRITES INTO ORB BUT|MPU READS INPUT LEVEL ON PB| -|INPUT LATCHING DISABLED|NO AFFECT ON PIN LEVEL |PIN | -| |UNTIL DDRB CHANGED | | -+-----------------------+ +---------------------------+ -|DDRB = 0 INPUT | |MPU READS IRB BIT WHICH IS | -|INPUT LATCHING ENABLED | |THE LEVEL OF THE PB PIN AT | -| | |THE TIME OF THE LAST CB1 | -| | |ACTIVE TRANSITION | -+-----------------------+-----------------------+---------------------------+ - - Figure 5. Output Register B (ORB), Input Register B (IRB) - - - REG 1 -- ORA/IRA - +---+---+---+---+---+---+---+---+ - | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+ - | | | | | | | +----- PA0 | - | | | | | | | | - | | | | | | +--------- PA1 | - | | | | | | | - | | | | | +------------- PA2 | OUTPUT REGISTER - | | | | | | "A" (ORA) - | | | | +----------------- PA3 | - | | | | +- OR - | | | +--------------------- PA4 | - | | | | INPUT REGISTER - | | +------------------------- PA5 | "A" (IRA) - | | | - | +----------------------------- PA6 | - | | - +--------------------------------- PA7 | - -+ -+-----------------------+-----------------------+---------------------------+ -| PIN | | | -| DATA DIRECTION | WRITE | READ | -| SELECTION | | | -+-----------------------+-----------------------+---------------------------+ -|DDRA = 1 OUTPUT |MPU WRITES OUTPUT LEVEL|MPU READS LEVEL ON PA PIN | -|INPUT LATCHING DISABLED|ORA | | -+-----------------------+ +---------------------------+ -|DDRA = 1 INPUT | |MPU READS IRA BIT WHICH IS | -|INPUT LATCHING ENABLED | |THE LEVEL OF THE PA PIN AT | -| | |THE TIME OF THE LAST CA1 | -| | |ACTIVE TRANSITION | -+-----------------------+-----------------------+---------------------------+ -|DDRA = 0 INPUT |MPU WRITES INTO ORA BUT|MPU READS LEVEL ON PA PIN | -|INPUT LATCHING DISABLED|NO AFFECT ON PIN LEVEL | | -| |UNTIL DDRA CHANGED | | -+-----------------------+ +---------------------------+ -|DDRA = 0 INPUT | |MPU READS IRA BIT WHICH IS | -|INPUT LATCHING ENABLED | |THE LEVEL OF THE PA PIN AT | -| | |THE TIME OF THE LAST CA1 | -| | |ACTIVE TRANSITION | -+-----------------------+-----------------------+---------------------------+ - - Figure 6. Output Register A (ORA), Input Register A (IRA) - - - REG 2 -- DDRB REG 3 -- DDRA - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ +-+-+-+-+-+-+-+-+ -+ - | | | | | | | +--- PB0 | | | | | | | | +--- PA0 | - | | | | | | +----- PB1 | | | | | | | +----- PA1 | - | | | | | +------- PB2 | DATA | | | | | +------- PA2 | DATA - | | | | +--------- PB3 |_ DIRECTION | | | | +--------- PA3 |_ DIRECTION - | | | +----------- PB4 | REGISTER | | | +----------- PA4 | REGISTER - | | +------------- PB5 | "B" (DDRB) | | +------------- PA5 | "A" (DDRA) - | +--------------- PB6 | | +--------------- PA6 | - +----------------- PB7 | +----------------- PA7 | - -+ -+ - - "0" ASSOCIATED PB PIN IS AN INPUT "0" ASSOCIATED PA PIN IS AN INPUT - (HIGH IMPEDANCE) (HIGH IMPEDANCE) - "1" ASSOCIATED PB PIN IS AN OUTPUT "1" ASSOCIATED PA PIN IS AN OUTPUT - WHOSE LEVEL IS DETERMINED BY WHOSE LEVEL IS DETERMINED BY - ORB REGISTER BIT ORA REGISTER BIT - - Figure 7. Data Direction Register B Figure 8. Data Direction Register A - (DDRB) (DDRA) - - - -HANDSHAKE CONTROL OF DATA TRANSFERS - -The R6522 allows positive control of data transfers between the system -processor and peripheral devices through the operation of "handshake" lines. -Port A lines (CA1, CA2) handshake data on both a read and a write operation -while the Port B lines (CB1, CB2) handshake on a write operation only. - -READ HANDSHAKE - -Positive control of data transfers from peripheral devices into the system -processor can be accomplished very effectively using Read Handshaking. In -this case, the peripheral device must generate the equivalent of a "Data -Ready" signal to the processor signifying that valid data is present on the -peripheral port. This signal normally interrupts the processor, which then -reads the data, causing generation of a "Data Taken" signal. The peripheral -device responds by making new data available. This process continues until -the data transfer is complete. - -In the R6522, automatic "Read Handshaking" is possible on the Peripheral A -Port only. The CA1 interrupt input pin accepts the "Data Ready" signal and -CA2 generates the "Data Taken" signal. The "Data Ready" signal will set an -internal flag which may interrupt the processor or which may be polled -under program control. The "Data Taken" signal can either be a pulse or a -level which is set low by the system processor and is cleared by the "Data -Ready" signal. These options are shown in Figure 9 which illustrates the -normal Read Handshake sequence. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 --+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +- - | | - "DATA READY" ---------+ +----#-------+-------------#------+ - CA1) +---+----#-------+ | | +------ - ___ | | | | - IRQ OUTPUT ---------+ +---------#------+ - +--------#-----------+ | +------ - READ IRA +---+ | | - OPERATION ------------------#-------+ +---------#------------- - | | | - "DATA TAKEN" ------------------------------+ | +------ - HANDSHAKE MODE +---------#------+ - (CA2) | | - | | - "DATA TAKEN" ------------------#-----------+ +-----#------------- - PULSE MODE +---+ - (CA2) - - Figure 9. Read Handshake Timing (Port A, Only) - - -WRITE HANDSHAKE - -The sequence of operations which allows handshaking data from the system -processor to a peripheral device is very similar to that described for Read -Handshaking. However, for Write Handshaking, the R6522 generates the "Data -Ready" signal and the peripheral device must respond with the "Data Taken" -signal. This can be accomplished on both the PA port and the PB port on the -R6522. CA2 or CB2 act as a "Data Ready" output in either the handshake mode -or pulse mode and CA1 or CB1 accept the "Data Taken" signal from the -peripheral device, setting the interrupt flag and cleaning the "Data Ready" -output. This sequence is shown in Figure 10. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 --+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +- - | | | | - +---+ +---+ - WRITE ORA,ORB ----+ +---------#---------------------#---+ +----- - OPERATION | - | - "DATA READY" ----------+ +----------------------+ - HANDSHAKE MODE +-------#--------+ | +--- - (CA2,CB2) | | | - | | | - "DATA READY" ----------+ +---#---------------------#---------+ - PULSE MODE +---+ | | +--- - (CA2,CB2) | | | - | | | - "DATA TAKEN" ---------------------------+ +--------#---+--------- - (CA1,CB1) +---+--------#---+ | - ___ | | - IRQ OUTPUT ------------------#--------+ +--- - +------------#---------+ - - Figure 10. Write Handshake Timing - - -Selection of operating modes for CA1, CA2, CB1 and CB2 is accomplished by -the Peripheral Control Register (Figure 11). - - - REG 12 -- PERIPHERAL CONTROL REGISTER - +---+---+---+---+---+---+---+---+ - | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - +---+---+---+---+---+---+---+---+ - | | | | | | - +----+----+ | +----+----+ | - | | | | - CB2 CONTROL -----+ | | +- CA1 INTERRUPT CONTROL -+-+-+-+------------------------+ | | +--------------------------+ -|7|6|5| OPERATION | | | | 0 = NEGATIVE ACTIVE EDGE | -+-+-+-+------------------------+ | | | 1 = POSITIVE ACTIVE EDGE | -|0|0|0| INPUT NEG. ACTIVE EDGE | | | +--------------------------+ -+-+-+-+------------------------+ | +---- CA2 INTERRUPT CONTROL -|0|0|1| INDEPENDENT INTERRUPT | | +-+-+-+------------------------+ -| | | | INPUT NEGATIVE EDGE | | |3|2|1| OPERATION | -+-+-+-+------------------------+ | +-+-+-+------------------------+ -|0|1|0| INPUT POS. ACTIVE EDGE | | |0|0|0| INPUT NEG. ACTIVE EDGE | -+-+-+-+------------------------+ | +-+-+-+------------------------+ -|0|1|1| INDEPENDENT INTERRUPT | | |0|0|1| INDEPENDENT INTERRUPT | -| | | | INPUT POSITIVE EDGE | | | | | | INPUT NEGATIVE EDGE | -+-+-+-+------------------------+ | +-+-+-+------------------------+ -|1|0|0| HANDSHAKE OUTPUT | | |0|1|0| INPUT POS. ACTIVE EDGE | -+-+-+-+------------------------+ | +-+-+-+------------------------+ -|1|0|1| PULSE OUTPUT | | |0|1|1| INDEPENDENT INTERRUPT | -+-+-+-+------------------------+ | | | | | INPUT POSITIVE EDGE | -|1|1|0| LOW OUTPUT | | +-+-+-+------------------------+ -+-+-+-+------------------------+ | |1|0|0| HANDSHAKE OUTPUT | -|1|1|1| HIGH OUTPUT | | +-+-+-+------------------------+ -+-+-+-+------------------------+ | |1|0|1| PULSE OUTPUT | - CB1 INTERRUPT CONTROL --------+ +-+-+-+------------------------+ -+--------------------------+ |1|1|0| LOW OUTPUT | -| 0 = NEGATIVE ACTIVE EDGE | +-+-+-+------------------------+ -| 1 = POSITIVE ACTIVE EDGE | |1|1|1| HIGH OUTPUT | -+--------------------------+ +-+-+-+------------------------+ - - Figure 11. Peripheral Control Register (PCR) - - -COUNTERS/TIMERS - -There are two independent 16-bit-counter/timers (called Timer 1 and Timer -2) in the R6522. Each timer is controlled by writing bits into the Auxiliary -Control Register (ACR) to select this mode of operation (Figure 12). - - - REG 11 -- AUXILIARY CONTROL REGISTER - +---+---+---+---+---+---+---+---+ - | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - +---+---+---+---+---+---+---+---+ - | | | | | | | - +--+--+ | +----+----+ | +------ PA - | | | | - T1 TIMER CONTROL ---+ | | +---------- PB -+-+-+----------------+-------+ | | -|7|6|OPERATION | PB7 | | | LATCHING ENABLE/DISABLE -+-+-+----------------+-------+ | | +---------------------+ -|0|0|TIMED INTERRUPT | | | | | 0 = DISABLE LATCHING| -| | |EACH TIME T1 IS | | | | | 1 = ENABLE LATCHING | -| | |LOADED |DISABLE| | | +---------------------+ -+-+-+----------------+ | | | -|0|1|CONTINUOUS | | | | -| | |INTERRUPTS | | | +---- SHIFT REGISTER CONTROL -+-+-+----------------+-------+ | +-+-+-+-----------------------------------+ -|1|0|TIMED INTERRUPT |ONE- | | |4|3|2| OPERATION | -| | |EACH TIME T1 IS |SHOT | | +-+-+-+-----------------------------------+ -| | |LOADED |OUTPUT | | |0|0|0| DISABLED | -+-+-+----------------+-------+ | +-+-+-+-----------------------------------+ -|1|1|CONTINUOUS |SQUARE | | |0|0|1| SHIFT IN UNDER COMTROL OF T2 | -| | |INTERRUPTS |WAVE | | +-+-+-+-----------------------------------+ -| | | |OUTPUT | | |0|1|0| SHIFT IN UNDER CONTROL OF 02 | -+-+-+----------------+-------+ | +-+-+-+-----------------------------------+ - | |0|1|1| SHIFT IN UNDER CONTROL OF EXT.CLK | - T2 TIMER CONTROL ------------+ +-+-+-+-----------------------------------+ -+-+-----------------+ |1|0|0| SHIFT OUT FREE-RUNNING AT T2 RATE | -|5| OPERATION | +-+-+-+-----------------------------------+ -+-+-----------------+ |1|0|1| SHIFT OUT UNDER CONTROL OF T2 | -|0| TIMED INTERRUPT | +-+-+-+-----------------------------------+ -+-+-----------------+ |1|1|0| SHIFT OUT UNDER CONTROL OF 02 | -|1| COUNT DOWN WITH | +-+-+-+-----------------------------------+ -| | PULSES ON PB6 | |1|1|1| SHIFT OUT UNDER CONTROL OF EXT.CLK| -+-+-----------------+ +-+-+-+-----------------------------------+ - - Figure 12. Auxiliary Control Register (ACR) - - -Timer 1 Operation - -Interval Timer T1 consists of two 8-bit latches (Figure 13) and a 16-bit -counter (Figure 14). The latches store data which is to be loaded into the -counter. After loading, the counter decrements at 02 clock rate. Upon -reaching zero, an interrupt flag is set, and IRQ goes low if the T1 -interrupt is enabled. Timer 1 then disables any further interrupts or -automatically transfers the contents of the latches into the counter and -continues to decrement. In addition, the timer may be programmed to invert -the output signal on a peripheral pin (PB7) each time it "times-out". Each -of these modes is discussed separately below. - -Note that the processor does not write directly into the low-order counter -(T1C-L). Instead, this half of the counter is loaded automatically from the -low order latch (T1L-L) when the processor writes into the high order -counter (T1C-H). In fact, it may not be necessary to write to the low order -counter in some applications since the timing operation is triggered by -writing to the high order latch. - - - REG 6 -- T1 LOW-ORDER LATCH REG 7 -- T1 HIGH-ORDER LATCH - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ +-+-+-+-+-+-+-+-+ -+ - | | | | | | | +--- 1 | | | | | | | | +--- 256 | - | | | | | | +----- 2 | | | | | | | +----- 512 | - | | | | | +------- 4 | | | | | | +------- 1024 | - | | | | +--------- 8 |_ COUNT | | | | +--------- 2048 |_ COUNT - | | | +----------- 16 | VALUE | | | +----------- 4096 | VALUE - | | +------------- 32 | | | +------------- 8192 | - | +--------------- 64 | | +--------------- 16384 | - +----------------- 128 | +----------------- 32768 | - -+ -+ - - WRITE - 8 BITS LOADED INTO T1 WRITE - 8 BITS LOADED INTO T1 HIGH- - LOW-ORDER LATCHES. THIS ORDER LATCHES. UNLIKE REG 4 - OPERATION IS NO DIFFERENT OPERATION NO LATCH TO - THAN A WRITE INTO REG 4 COUNTER TRANSFERS TAKE PLACE - - READ - 8 BITS FROM T1 LOW ORDER- READ - 8 BITS FROM T1 HIGH-ORDER - LATCHES TRANSFERRED TO MPU. LATCHES TRANSFERRED TO MPU - UNLIKE REG 4 OPERATION, - THIS DOES NOT CAUSE RESET - OF T1 INTERRUPT FLAG - - Figure 13. Timer 1 (T1) Latch Registers - - - REG 4 -- T1 LOW-ORDER COUNTER REG 5 -- T1 HIGH-ORDER COUNTER - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ +-+-+-+-+-+-+-+-+ -+ - | | | | | | | +--- 1 | | | | | | | | +--- 256 | - | | | | | | +----- 2 | | | | | | | +----- 512 | - | | | | | +------- 4 | | | | | | +------- 1024 | - | | | | +--------- 8 |_ COUNT | | | | +--------- 2048 |_ COUNT - | | | +----------- 16 | VALUE | | | +----------- 4096 | VALUE - | | +------------- 32 | | | +------------- 8192 | - | +--------------- 64 | | +--------------- 16384 | - +----------------- 128 | +----------------- 32768 | - -+ -+ - - WRITE - 8 BITS LOADED INTO T1 WRITE - 8 BITS LOADED INTO T1 - LOW-ORDER LATCHES. LATCH HIGH-ORDER LATCHES. ALSO - CONTENTS ARE TRANSFERRED AT THIS TIME BOTH HIGH- AND - INTO LOW-ORDER COUNTER AT LOW-ORDER LATCHES TRANSFERRED - THE TIME THE HIGH-ORDER INTO T1 COUNTER. T1 INTERRUPT - COUNTER IS LOADED (REG 5) FLAG ALSO IS RESET - - READ - 8 BITS FROM T1 LOW-ORDER READ - 8 BITS FROM T1 HIGH-ORDER - COUNTER TRANSFERRED TO MPU. COUNTER TRANSFERRED TO MPU - IN ADDITION T1 INTERRUPT FLAG - IS RESET (BIT 6 IN INTERRUPT - FLAG REGISTER) - - Figure 14. Timer 1 (T1) Counter Registers - - -Timer 1 One-Shot Mode - -The Timer 1 one-shot mode generates a single interrupt for each timer load -operation. As with any interval timer, the delay between the "write T1C-H" -operation and generation of the processor interrupt is a direct function of -the data loaded into the timing counter. In addition to generating a single -interrupt, Timer 1 can be programmed to produce a single negative pulse on -the PB7 peripheral pin. With the output enabled (ACR7=1) a "write T1C-H" -operation will cause PB7 to go low. PB7 will return high when Timer 1 times -out. The result is a single programmable width pulse. - ___ -T1 interrupt flag will be set, the IRQ pin will go low (interrupt -enabled), and the signal on PB7 will go high. At this time the counter will -continue to decrement at system clock rate. This allows the system -processor to read the contents of the counter to determine the time since -interrupt. However, the T1 interrupt flag cannot be set again unless it has -been cleared as described in this specification. - -Timing for the R6522 interval timer one-shot mode is shown in Figure 15. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 --+ +-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-+ +- - | | | - +---+ | - WRITE T1C-H ----+ +-----------------#------------------------- - ___ | | - IRQ OUTPUT --------------------------#---------+ - | +--------------- - | | - PB7 OUTPUT --------+ +--------------- - +-----------------#---------+ - | N |N-1|N-2|N-3| | 0 |N| |N-1|N-2|N-3| - | | - |<---- N + 1.5 CYCLES ----->| - - Figure 15. Timer 1 One-Shot Mode Timing - - -In the one-shot mode, writing into the T1L-H has no effect on the -operation of Timer 1. However, it will be necessary to assure that the low -order latch contains the proper data before initiating the count-down with -a "write T1C-H" operation. When the processor writes into the high order -counter (T1C-H), the T1 interrupt flag will be cleared, the contents of the -low order latch will be transferred into the low order counter, and the -timer will begin to decrement at system clock rate. If the PB7 output is -enabled, this signal will go low on the 02 following the write operation. -When the counter reaches zero, the T1 interrupt flag will be set, the IRQ -pin will go low (interrupt enabled), and the signal on PB7 will go high. At -this time the counter will continue to decrement at system clock rate. This -allows the system processor to read the contents of the counter to -determine the time since interrupt. However, the T1 interrupt flag cannot -be set again unless it has been cleared as described in this specification. - -Timer 1 Free-Run Mode - -The most important advantage associated with the latches in T1 is the -ability to produce a continuous series of evenly spaced interrupts and the -ability to produce a square wave on PB7 whose frequency is not affected by -variations in the processor interrupt response time. This is accomplished -in the "free-running" mode. - -In the free-running mode, the interrupt flag is set and the signal on PB7 -is inverted each time the counter reaches zero. However, instead of -continuing to decrement from zero after a time-out, the timer automatically -transfers the contents of the latch into the counter (16 bits) and -continues to decrement from there. The interrupt flag can be cleared by -writing T1C-H, by reading T1C-L or by writing directly into the flag as -described later. However, it is not necessary to rewrite the timer to -enable setting the interrupt flag on the next time-out. - -All interval timers in the R6522 are "re-triggerable". Rewriting the -counter will always re-initialize the time-out period. In fact, the -time-out can be prevented completely if the processor continues to rewrite -the timer before it reaches zero. Timer 1 will operate in this manner if -the processor writes into the high order counter (T1C-H). However, by -loading the latches only, the processor can access the timer during each -down-counting operation without affecting the time-out in process. Instead, -the data loaded into the latches will determine the length of the next -time-out period. This capability is particularly valuable in the -free-running mode with the output enabled. In this mode, the signal on PB7 -is inverted and the interrupt flag is set with each time-out. By responding -to the interrupts with new data for the latches, the processor can -determine the period of the next half cycle during each half cycle of the -output signal on PB7. In this manner, very complex waveforms can be -generated. - -A precaution to take in the use of PB7 as the timer output concerns the -Data Direction Register contents for PB7. Both DDRB bit 7 and ACR bit 7 -must be 1 for PB7 to function as the timer output. If one is 1 and the -other is 0, then PB7 functions as a normal output pin, controlled by ORB -bit 7. - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 --+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +- - | | | - WRITE T1C-H +---+ | | - OPERATION ----+ +-----#---------------------#----------------- - ___ | | | - IRQ OUTPUT --------------#---------+ #---------+ - | +-----------# +------- - | | | - PB7 OUTPUT --------+ +-----------#---------+ - +-----#---------+ +------- - | | | - |< N+1.5 CYCLES>|<---- N+2 CYCLES --->| - - Figure 16. Timer 1 Free-Run Mode Timing - - -Timer 2 Operation - -Timer 2 operates as an interval timer (in the "one-shot" mode only), or as -a counter for counting negative pulses on the PB6 peripheral pin. A single -control bit in the Auxiliary Control Register selects between these two -modes. This timer is comprised of a "write-only" low-order latch (T2L-L), a -"read-only" low-order counter (T2C-L) and a read/write high order counter -(T2C-H). The counter registers act as a 16-bit counter which decrements at -02 rate. Figure 17 illustrates the T2 Latch/Counter Registers. - - - REG 8 - T2 LOW-ORDER LATCH/COUNTER REG 9 - T2 HIGH-ORDER COUNTER - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ +-+-+-+-+-+-+-+-+ -+ - | | | | | | | +--- 1 | | | | | | | | +--- 256 | - | | | | | | +----- 2 | | | | | | | +----- 512 | - | | | | | +------- 4 | | | | | | +------- 1024 | - | | | | +--------- 8 |_ COUNT | | | | +--------- 2048 |_ COUNT - | | | +----------- 16 | VALUE | | | +----------- 4096 | VALUE - | | +------------- 32 | | | +------------- 8192 | - | +--------------- 64 | | +--------------- 16384 | - +----------------- 128 | +----------------- 32768 | - -+ -+ - - - WRITE - 8 BITS LOADED INTO T2 WRITE - 8 BITS LOADED INTO T2 - LOW-ORDER LATCH HIGH-ORDER COUNTER. ALSO, - LOW-ORDER LATCH TRANSFERRED - READ - 8 BITS FROM T2 LOW-ORDER TO LOW-ORDER COUNTER. IN - COUNTER TRANSFERRED TO MPU. ADDITION T2 INTERRUPT FLAG - T2 INTERRUPT FLAG IS RESET IS RESET - - READ - 8 BITS FROM T2 HIGH-ORDER - COUNTER TRANSFERRED TO MPU - - Figure 17. Timer 2 (T2) Latch/Counter Registers - - -Timer 2 One-Shot Mode - -As an interval timer, T2 operates in the "one-shot" mode similar to Timer 1. -In this mode, T2 provides a single interrupt for each "write T2C-H" -operation. After timing out, the counter will continue to decrement. -However, setting of the interrupt flag is disabled after initial time-out -so that it will not be set by the counter decrementing again through zero. -The processor must rewrite T2C-H to enable setting of the interrupt flag. -The interrupt flag is cleared by reading T2C-L or by writing T2C-H. Timing -for this operation is shown in Figure 18. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 --+ +-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-+ +- - | | | - +---+ | - WRITE T2C-H ----+ +-----------------#------------------------- - ___ | | - IRQ OUTPUT --------------------------#---------+ - | +--------------- - | | - | N |N-1|N-2|N-3| | 0 |N| |N-1|N-2|N-3| - |<------ N+1.5 CYCLES ----->| - - Figure 18. Timer 2 One-Shot Mode Timing - - -Timer 2 Pulse Counting Mode - -In the pulse counting mode, T2 counts a predetermined number of -negative-going pulses on PB6. This is accomplished by first loading a -number into Timer 2. Writing into T2C-H clears the interrupt flag and -allows the counter to decrement each time a pulse is applied to PB6. The -interrupt flag is set when T2 counts down past zero. The counter will then -continue to decrement with each pulse on PB6. However, it is necessary to -rewrite T2C-H to allow the interrupt flag to set on a subsequent time-out. -Timing for this mode is shown in Figure 19. The pulse must be low on the -leading edge of 02. - - - WRITE T2C-H +---+ - OPERATION ----+ +------------------------------------------------ - ------------------+ +-----+ +-----#-----+ +-----+ +------ - PB6 INPUT +-+ +-+ +-+ +-+ - ___ ------------------------------------------------+ - IRQ OUTPUT | | | +-------- - N | N-1 | N-2 1 | 0 | -1 - - Figure 19. Timer 2 Pulse Counting Mode - - -SHIFT REGISTER OPERATION - -The Shift Register (SR) performs serial data transfers into and out of the -CB2 pin under control of an internal modulo-8 counter. Shift pulses can be -applied to the CB1 pin from an external source or, with the proper mode -selection, shift pulses generated internally will appear on the CB1 pin for -controlling external devices. - -The control bits which select the various shift register operating modes -are located in the Auxiliary Control Register. Figure 20 illustrates the -configuration of the SR data bits and Figure 21 shows the SR control bits -of the ACR. - - - REG 10 -- SHIFT REGISTER REG 11 -- AUXILIARY CONTROL REGISTER - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ +-+-+-+-+-+-+-+-+ - | | | | | | | +---- | | | - | | | | | | +------ | +-+-+ - | | | | | +-------- | SHIFT | - | | | | +---------- |_ REGISTER | SHIFT REGISTER - | | | +------------ | BITS +- MODE CONTROL - | | +-------------- | +-+-+-+---------------------------------+ - | +---------------- | |4|3|2|OPERATION | - +------------------ | +-+-+-+---------------------------------+ - -+ |0|0|0|DISABLED | - |0|0|1|SHIFT IN UNDER CONTROL OF T2 | - NOTES |0|1|0|SHIFT IN UNDER CONTROL OF 02 | - 1 WHEN SHIFTING OUT BIT 7 IS THE |0|1|1|SHIFT IN UNDER CONT. OF EXT.CLK | - FIRST BIT OUT AND SIMULTANEOUSLY |1|0|0|SHIFT OUT FREE RUNNING AT T2 RATE| - IS ROTATED BACK INTO BIT 0 |1|0|1|SHIFT OUT UNDER CONTROL OF T2 | - 2 WHEN SHIFTING IN BITS INITIALLY |1|1|0|SHIFT OUT UNDER CONTROL OF 02 | - ENTER BIT 0 AND ARE SHIFTED |1|1|1|SHIFT OUT UNDER CONT. OF EXT.CLK | - TOWARDS BIT 7 +-+-+-+---------------------------------+ - - Figure 20. Shift registers Figure 21. Shift Register Modes - - -SR Mode 0 -- Disabled - -Mode 0 disables the Shift Register. In this mode the microprocessor can -write or read the SR and the SR will shift on each CB1 positive edge -shifting in the value on CB2. In this mode the SR Interrupt Flag is -disabled (held to a logic 0). - - -SR Mode 1 -- Shift in Under Control of T2 - -In mode 1, the shifting rate is controlled by the low order 8 bits of T2 -(Figure 22). Shift pulses are generated on the CB1 pin to control shifting -in external devices. The time between transitions of this output clock is a -function of the system clock period and the contents of the low order T2 -latch (N). - - - 02 +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - -+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +- -WRITE OR READ +---+ | | | | | -SHIFT REG ---+ +------------------------------------------------------#---------------------- - N+2 CYCLES |<--------->|<--------->| N+2 CYCLES | -CB1 OUTPUT -----------------+ 1 +-----------+ 2 +--------#--+ 8 +------- -SHIFT CLOCK +-----------+ +-----------+ +-----------+ | - | - CB2 INPUT -----------------------\/---1---\/-------------\/---2---\/----#--------\/---8---\/--- - DATA -----------------------/\-------/\-------------/\-------/\----#--------/\-------/\--- - | - ___ +-----------------------------------------------------------------------------+ - IRQ ---+ +--- - - Figure 22. SR Mode 1 -- Shift In Under T2 Control - - -The shifting operation is triggered by the read or write of the SR if the -SR flag is set in the IFR. Otherwise the first shift will occur at the next -time-out of T2 after a read or write of the SR. Data is shifted first into -the low order bit of SR and is then shifted into the next higher order bit -of the shift register on the negative-going edge of each clock pulse. The -input data should change before the positive-going edge of the CB1 clock -pulse. This data is shifted into shift register during the 02 clock cycle -following the positive-going edge of the CB1 clock pulse. After 8 CB1 clock -pulses, the shift register interrupt flag will set and IRQ will go low. - - -SR Mode 2 -- Shift in Under 02 Control - -In mode 2, the shift rate is a direct function of the system clock -frequency (Figure 23). CB1 becomes an output which generates shift pulses -for controlling external devices. Timer 2 operates as an independent -interval timer and has no effect on SR. The shifting operation is triggered -by reading or writing the Shift Register. Data is shifted, first into bit 0 -and is then shifted into the next higher order bit of the shift register on -the trailing edge of each 02 clock pulse. After 8 clock pulses, the shift -register interrupt flag will be set, and the output clock pulses on CB1 -will stop. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 -+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +- - +---+ | | | | - READ SR ---+ +----------------------------------------------------------------------------- - | | | | -CB1 OUTPUT -----------------+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +------- -SHIFT CLOCK +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ | - | - CB2 INPUT -----------------\/---1--\/---2--\/---3--\/---4--\/---5--\/---6--\/---7--\/---8--\/-- - DATA -----------------/\------/\------/\------/\------/\------/\------/\------/\------/\-- - | - ___ ---------------------------------------------------------------------------------+ - IRQ +--- - - Figure 23. SR Mode 2 -- Shift In Under 02 Control - - -SR Mode 3 -- Shift in Under CB1 Control - -In mode 3, external pin CB1 becomes an input (Figure 24). This allows an -external device to load the shift register at its own pace. The shift -register counter will interrupt the processor each time 8 bits have been -shifted in. However, the shift register counter does not stop the shifting -operation; it acts simply as a pulse counter. Reading or writing the Shift -Register resets the Interrupt Flag and initializes the SR counter to count -another 8 pulses. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 -+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +- - | -CB1 OUTPUT ---+ 1 +---------+ 2 +--------#----+ 8 +------- -SHIFT CLOCK +---------+ +---------+ +---------+ - | - CB2 INPUT -------\/----1---\/--------\/----2---\/---#--------\/----8---\/-- - DATA -------/\--------/\--------/\--------/\---#--------/\--------/\-- - ___ | - IRQ -------------------------------------------------------------+ - +--- - - Figure 24. SR Mode 3 -- Shift In Under CB1 Control - - -Note that the data is shifted during the first system clock cycle -following the positive-going edge of the CB1 shift pulse. For this reason, -data must be held stable during the first full cycle following CB1 going -high. - - -SR Mode 4 -- Shift Out Under T2 Control (Free-Run) - -Mode 4 is very similar to mode 5 in which the shifting rate is set by T2. -However, in mode 4 the SR Counter does not stop the shifting operation -(Figure 25). Since the Shift Register bit 7 (SR7) is recirculated back into -bit 0, the 8 bits loaded into the Shift Register will be clocked onto CB2 -repetitively. In this mode the Shift Register Counter is disabled. - - - 02 +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - -+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +- - +---+ | | | | | | -WRITE SR ---+ +---------------------------------------------------#--------------------------------------------- - N+2 CYCLES |<--------->|<--------->| N+2 CYCLES| | | -CB1 OUTPUT -----------------+ 1 +-----------+ 2 +-----#-----+ 8 +-----------+ 9 +--- -SHIFT CLOCK +-----------+ +-----------+ +-----------+ +-----------+ - -CB2 OUTPUT -------------------\/-----------1----------\/-------2------#-------\/-----------8----------\/-----1------ -DATA -------------------/\----------------------/\--------------#-------/\----------------------/\------------ - - Figure 25. SR Mode 4 -- Shift Out Under T2 Control (Free-Run) - - -SR Mode 5 -- Shift Out Under T2 Control - -In mode 5, the shift rate is controlled by T2 (as in mode 4). The shifting -operation is triggered by the read or write of the SR if the SR flag is set -in the IFR (Figure 26). Otherwise the first shift will occur at the next -time-out of T2 after a read or write of the SR. However, with each read or -write of the shift register the SR Counter is reset and 8 bits are shifted -onto CB2. At the same time, 8 shift pulses are generated on CB1 to control -shifting in external devices. After the 8 shift pulses, the shifting is -disabled, the SR Interrupt Flag is set and CB2 remains at the last data -level. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ - 02 + +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ + - +---+ | | | | | | - WRITE SR --+ +---------------------------------------------------------- - N+2 CYCLES |<----->|<----->| N+2 CYCLES | | - CB1 OUTPUT ----------------+ 1 +-------+ 2 +---#-----+ 8 +------ - SHIFT CLOCK +-------+ +-------+ +-------+ - | - CB2 OUTPUT --------------------\/------1------\/---2---#--------\/-----8---- - DATA --------------------/\-------------/\-------#--------/\---------- - ___ | - IRQ ----------------------------------------------------------+ - +------ - - Figure 26. SR Mode 5 -- Shift Out Under T2 Control - - -SR Mode 6 -- Shift Out Under 02 Control - -In mode 6, the shift rate is controlled by the 02 system clock (Figure 27). - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ +-+ +-+ - 02 + +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ + - +---+ | | | | | | | | | | | | - WRITE SR --+ +---------------------------------------------------------- - | | | | | | | | | | | | - CB1 OUTPUT ------------+ 1 +---+ 2 +---+ 3 +---+ 4 +--#--+ 7 +---+ 8 +------ - SHIFT CLOCK +---+ +---+ +---+ +---+ +---+ +---+ - | | - CB2 OUTPUT -------------\/---1--\/---2--\/---3--\/--4-#---\/---7--\/---8---- - DATA -------------/\------/\------/\------/\----#---/\------/\-------- - ___ | - IRQ ----------------------------------------------------------+ - +------ - - Figure 27. SR Mode 6 -- Shift Out Under 02 Control - - -SR Mode 7 -- Shift Out Under CB1 Control - -In mode 7, shifting is controlled by pulses applied to the CB1 pin by an -external device (Figure 28). The SR counter sets the SR Interrupt Flag each -time it counts 8 pulses but it does not disable the shifting function. Each -time the microprocessor, writes or reads the shift register, the SR -Interrupt Flag is reset and the SR counter is initialized to begin counting -the next 8 shift pulses on pin CB1. After 8 shift pulses, the Interrupt -Flag is set. The microprocessor can then load the shift register with the -next byte of data. - - - +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-#-+ +-+ +-+ +-+ - 02 + +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ + - +---+ | - WRITE SR --+ +---------------------------------------------------------- - | - CB1 INPUT --------------+ 1 +---------------+ 2 +---#----+ | 8 + - SHIFT CLOCK +-------+ +-------+ +--------+ - | - CB2 OUTPUT --------------\/-----------1----------\/-----2----#----\/---8---- - DATA --------------/\----------------------/\----------#----/\-------- - ___ | - IRQ ----------------------------------------------------------+ - +------ - - Figure 28. SR Mode 7 -- Shift Out Under CB1 Control - - - -INTERRUPT OPERATION - -Controlling interrupts within the R6522 involves three principal -operations. These are flagging the interrupts, enabling interrupts and -signaling to the processor that an active interrupt exists within the chip. -Interrupt flags are set in the Interrupt Flag Register (IFR) by conditions -detected within the R6522 or on inputs to the R6522. These flags normally -remain set until the interrupt has been serviced. To determine the source -of an interrupt, the microprocessor must examine these flags in order, from -highest to lowest priority. - -Associated with each interrupt flag is an interrupt enable bit in the -Interrupt Enable Register (IER). This can be set or cleared by the -processor to enable interrupting the processor from the corresponding -interrupt flag. If an interrupt flag is set to a logic 1 by an interrupting -condition, and the corresponding interrupt enable bit is set to a 1, the -Interrupt Request (IRQ) output will go low. IRQ is an "open-collector" -output which can be "wire-OR'ed" with other devices in the system to -interrupt the processor. - - -Interrupt Flag Register (IFR) - -In the R6522, all the interrupt flags are contained in one register, i.e., -the IFR (Figure 29). In addition, bit 7 of this register will be read as a -logic 1 when an interrupt exists within the chip. This allows very -convenient polling of several devices within a system to locate the source -of an interrupt. - - - REG 13 -- INTERRUPT FLAG REGISTER -+-+-+-+-+-+-+-+-+ -|7|6|5|4|3|2|1|0| SET BY CLEARED BY -+-+-+-+-+-+-+-+-+ +-----------------------+------------------------------+ - | | | | | | | +--CA2| CA2 ACTIVE EDGE | READ OR WRITE REG 1 (ORA)* | - | | | | | | | +-----------------------+------------------------------+ - | | | | | | +--CA1--| CA1 ACTIVE EDGE | READ OR WRITE REG 1 (ORA) | - | | | | | | +-----------------------+------------------------------+ - | | | | | +SHIFT REG| COMPLETE 8 SHIFTS | READ OR WRITE SHIFT REG | - | | | | | +-----------------------+------------------------------+ - | | | | +-CB2-------| CB2 ACTIVE EDGE | READ OR WRITE ORB* | - | | | | +-----------------------+------------------------------+ - | | | +-CB1---------| CB1 ACTIVE EDGE | READ OR WRITE ORB | - | | | +-----------------------+------------------------------+ - | | +-TIMER 2-------| TIME-OUT OF T2 | READ T2 LOW OR WRITE T2 HIGH | - | | +-----------------------+------------------------------+ - | +-TIMER 1---------| TIME-OUT OF T1 | READ T1 LOW OR WRITE T1 HIGH | - | +-----------------------+------------------------------+ - +-IRQ---------------| ANY ENABLED INTERRUPT | CLEAR ALL INTERRUPTS | - +-----------------------+------------------------------+ - - * IF THE CA2/CB2 CONTROL IN THE PCR IS SELECTED AS "INDEPENDENT" - INTERRUPT INPUT, THEN READING OR WRITING THE OUTPUT REGISTER - ORA/ORB WILL NOT CLEAR THE FLAG BIT. INSTEAD, THE BIT MUST BE - CLEARED BY WRITING INTO THE IFR, AS DESCRIBED PREVIOUSLY. - - Figure 29. Interrupt Flag Register (IFR) - - -The Interrupt Flag Register (IFR) may be read directly by the processor. -In addition, individual flag bits may be cleared by writing a "1" into the -appropriate bit of the IFR. When the proper chip select and register -signals are applied to the chip, the contents of this register are placed -on the data bus. Bit 7 indicates the status of the IRQ output. This bit -corresponds to the logic function: IRQ = IFR6xIER6 + IFR5xIER5 + IFR4xIER4 + -+ IFR3xIER3 + IFR2xIER2 + IFR1xIER1 + IFR0xIER0 - - Note: - - x = logic AND, + = logic OR - -The IFR bit 7 is not a flag. Therefore, this bit is not directly cleared -by writing a logic 1 into it. It can only be cleared by clearing all the -flags in the register or by disabling all the active interrupts as -discussed in next section. - - -Interrupt Enable Register (IER) - -For each interrupt flag in IFR, there is a corresponding bit in the -Interrupt Enable Register (IER) (Figure 30). Individual bits in the IER can -be set or cleared to facilitate controlling individual interrupts without -affecting others. This is accomplished by writing to the IER after bit 7 -set or cleared to, in turn, set or clear selected enable bits. If bit 7 of -the data placed on the system data bus during this write operation is a 0, -each 1 in bits 6 through 0 clears the corresponding bit in the IER. For -each zero in bits 6 through 0, the corresponding bit is unaffected. - - - REG 14 -- INTERRUPT ENABLE REGISTER - +-+-+-+-+-+-+-+-+ - |7|6|5|4|3|2|1|0| - +-+-+-+-+-+-+-+-+ -+ - | | | | | | | +--- CA2 | - | | | | | | +----- CA1 | 0 = INTERRUPT - | | | | | +------- SHIFT REG | DISABLED - | | | | +--------- CB2 |_ - | | | +----------- CB1 | - | | +------------- TIMER 2 | 1 = INTERRUPT - | +--------------- TIMER 1 | ENABLED - +----------------- SET/CLEAR | - -+ - - NOTES: - 1 IF BIT 7 IS A "0", THEN EACH "1" IN BITS 0-6 DISABLES THE - CORRESPONDING INTERRUPT. - 2 IF BIT 7 IS A "1", THEN EACH "1" IN BITS 0-6 ENABLES THE - CORRESPONDING INTERRUPT. - 3 IF A READ OF THIS REGISTER IS DONE, BIT 7 WILL BE "1" AND - ALL OTHER BITS WILL REFLECT THEIR ENABLE/DISABLE STATE. - - Figure 30. Interrupt Enable Register (IER) - - -Selected bits in the IER can be set by writing to the IER with bit 7 in -the data word set to a logic 1. In this case, each 1 in bits 6 through 0 -will set the corresponding bit. For each zero, the corresponding bit will -be unaffected. This individual control of the setting and clearing -operations allows very convenient control of the interrupts during system -operation. - -In addition to setting and clearing IER bits, the contents of this -register can be read at any time. Bit 7 will be read as a logic 1, however. - diff --git a/src/mess/docs/mchanges.txt b/src/mess/docs/mchanges.txt index 98487face..5253073fa 100644 --- a/src/mess/docs/mchanges.txt +++ b/src/mess/docs/mchanges.txt @@ -8,9 +8,10 @@ MESS misc info 2. DEBUG = 1 (optional) 3. NEOFREE = 1 4. uncomment all the required CPU cores (use all is ok) see below -5. COREOBJS first 2 lines are: +5. COREOBJS first 3 lines are: COREOBJS = obj/version.o obj/mess/system.o obj/mame.o obj/mess/mess.o \ - obj/mess/config.o obj/mess/filemngr.o obj/mess/tapectrl.o \ + obj/mess/config.o obj/mess/filemngr.o obj/mess/tapectrl.o \ + obj/mess/machine/6522via.o obj/mess/machine/nec765.o \ 6. DRVLIBS replace with MESS ones 7. MSDOSOBJS += obj/mess/msdos.o obj/msdos/nec765.o 8. version.... after $(TINYFLAGS) -DMESS @@ -18,10 +19,19 @@ COREOBJS = obj/version.o obj/mess/system.o obj/mame.o obj/mess/mess.o \ 10. add dat2html definition after romcmp.exe: dat2html.exe: obj/mess/dat2html.o $(LD) $(LDFLAGS) $^ -lz -o $@ -11. replace archive definitions -12. add MAKE MESSDIR to the bottom of MAKETREE -13. add messdir: -14. add del dat2html.exe to make clean +11. replace MAME's ifndef DEBUG section to: + ifndef DEBUG + $(EMULATOR_EXE) -listtext > mess.txt + $(EMULATOR_EXE) -listdevices >> mess.txt + upx $(EMULATOR_EXE) + + endif + +12. replace archive definitions +13. add MAKE MESSDIR to the bottom of MAKETREE +14. add messdir: +15. add del dat2html.exe to make clean + # uncomment the following lines to include a CPU core CPUS+=Z80@ @@ -30,6 +40,7 @@ CPUS+=M6502@ CPUS+=M65C02@ CPUS+=M65SC02@ CPUS+=M65CE02@ +CPUS+=M6509@ CPUS+=M6510@ CPUS+=N2A03@ CPUS+=H6280@ @@ -68,7 +79,7 @@ SOUNDS+=QSOUND@ SOUNDS+=SPEAKER@ SOUNDS+=WAVE@ -remove debug and 2600, update mess.txt list and dir_list ;-) +ensure you remove debug, 2600, and update dir_list ;-) diff --git a/src/mess/docs/mess.txt b/src/mess/docs/mess.txt deleted file mode 100644 index 7b16e6109..000000000 --- a/src/mess/docs/mess.txt +++ /dev/null @@ -1,268 +0,0 @@ - ========================================== - M.E.S.S. - Multi-Emulator Super System - Copyright (C) 1999 by the MESS team - Official Page at: http://mess.emuverse.com - ========================================== - -Please note that many people helped with this project, either directly or by -releasing source code which was used to write the drivers. We are not trying to -appropriate merit which isn't ours. See the acknowledgemnts section for a list -of contributors, however please note that the list is largely incomplete. See -also the CREDITS section in the emulator to see the people who contributed to a -specific driver. Again, that list might be incomplete. We apologize in advance -for any omission. - -All trademarks cited in this document are property of their respective owners. - -Especially, the MESS team would like to thank Nicola Salmoria and the MAME team -for letting us play with their code and, in fact, incorporating MESS specific -code into MAME. Without it, MESS would be substantially less than what it is -right now! ;-) - - -Usage and Distribution Licence: -=============================== - -- MESS usage and distribution follows that of MAME. Please read the MAME - readme.txt file distributed with MESS for further information. - - - -How to Contact The MESS Team -============================ - -Here are some of the people contributing to MESS. If you have comments, -suggestions or bug reports about an existing driver, check the driver's Credits -section to find who has worked on it, and send comments to that person. If you -are not sure who to contact, write to Ben (ben@netstra.com.au) - who is the -current coordinator of the MESS project [DOS]. If you have comments specific to a -given operating system, they should be sent to the respective port maintainer. -You will find their e-mail address below. - -Mike Balfour mab22@po.cwru.edu -Richard Bannister titan@indigo.ie -Ben Bruscella ben@netstra.com.au -Juergen Buchmueller pullmoll@t-online.de -Jeff Mitchell skeezix@skeleton.org -Gareth Long gatch@elecslns.demon.co.uk -Brad Oliver bradman@primenet.com - -PLEASE DON'T SEND BINARY ATTACHMENTS WITHOUT ASKING FIRST, *ESPECIALLY* ROM IMAGES. - -THESE ARE NOT SUPPORT ADDRESSES. Support questions sent to these addresses -*will* be ignored. Please understand that this is a *free* project, mostly -targeted at experienced users. We don't have the resources to provide end user -support. Basically, if you can't get the emulator to work, you are on your own. -First of all, read this doc carefully. If you still can't find an answer to -your question, try checking the beginner's sections that many emulation pages -have, or ask on the appropriate Usenet newsgroups (e.g. comp.emulators.misc) -or on the many emulation message boards. The official MESS message board is at: - http://mess.emuverse.com - - -Also, DO NOT SEND REQUESTS FOR NEW SYSTEMS TO ADD, unless you have some original -info on the hardware or, even better, have the technical expertise needed to -help us. Please don't send us information widely available on the Internet - -we are perfectly capable of finding it ourselves, thank you. - - - -CURRENTLY EMULATED: -============================================================================== -Here are the currently supported systems (mess -listfull): - -System: Description: ---------------------------------------------- -a400 "Atari 400 (NTSC)" -a400pal "Atari 400 (PAL)" -a5200 "Atari 5200" -a7800 "Atari 7800" -a800 "Atari 800 (NTSC)" -a800pal "Atari 800 (PAL)" -a800xl "Atari 800XL" -advision "Adventurevision" -amiga "Amiga (NTSC)" -apple1 "Apple 1 8k" -apple2c "Apple //c" -apple2c0 "Apple //c (3.5 ROM)" -apple2cp "Apple //c Plus" -apple2e "Apple //e" -apple2ee "Apple //e (enhanced)" -apple2ep "Apple //e (Platinum)" -astrocde "Bally Arcade/Astrocade" -aszmic "ZX.Aszmic" -c128 "Commodore C128 (NTSC) 656x216" -c128fra "Commodore C128 French (PAL) 656x432" -c128ger "Commodore C128 German (PAL) 336x216" -c16 "Commodore C16/C116/C232/C264 (PAL)" -c364 "Commodore 364 (Prototype)" -c64 "Commodore C64 (NTSC)" -c64gs "Commodore C64GS (NTSC)" -c64pal "Commodore C64/VC64/VIC64 (PAL)" -c65 "Commodore C65 Prototype (C64DX) (NTSC)" -c65ger "Commodore C65 Prototype German (C64DX) (PAL)" -cbm30 "Commodore CBM3000 Series (Basic 2)" -cbm30b "Commodore CBM3000 Series (Basic 2) (business keyboard)" -cbm40 "Commodore CBM4000 FAT Series (CRTC 50Hz)" -cbm4064 "Commodore CBM4064/Pet64/Educator64 (NTSC)" -cbm40b "Commodore CBM4000 THIN Series (business keyboard)" -cbm500 "Commodore B128-40/Pet-II/P500 60Hz" -cbm610 "Commodore B128-80LP/610 60Hz" -cbm620 "Commodore B256-80LP/620 Hungarian 50Hz" -cbm710 "Commodore B128-80HP/710" -cbm720 "Commodore B256-80HP/720" -cbm80 "Commodore CBM8000 60Hz" -cbm80ger "Commodore CBM8000 German (50Hz)" -cbm80swe "Commodore CBM8000 Swedish (50Hz)" -cgenie "Colour Genie EG2000" -coco "Color Computer" -coco3 "Color Computer 3" -coleco "Colecovision" -cp400 "Prologica CP400" -cpc464 "Amstrad/Schneider CPC464" -cpc6128 "Amstrad/Schneider CPC6128" -cpc664 "Amstrad/Schneider CPC664" -dragon32 "Dragon 32" -ep128 "Enterprise 128K" -fellow "Salora Fellow" -gameboy "GameBoy" -gamegear "Sega Game Gear" -genesis "Sega Megadrive / Genesis" -jupiter "Jupiter Ace 49k" -kaypro "Kaypro 2x" -kc85_4 "KC 85/4" -kccomp "KC Compact" -kim1 "KIM-1" -laser110 "Laser 110" -laser200 "Laser 200" -laser210 "Laser 210" -laser310 "Laser 310" -laser350 "Laser 350" -laser500 "Laser 500" -laser700 "Laser 700" -macplus "Macintosh Plus" -max "Commodore Max (VIC10/Ultimax/Vickie)" -mbee "Microbee 32K" -mbee56k "Microbee 56K (CP/M)" -mc10 "MC-10" -msx "MSX1" -msxj "MSX1 (Japan)" -msxkr "MSX1 (Korean)" -nascom1 "Nascom 1" -nes "Nintendo Entertainment System/Famicom" -oric1 "Oric 1" -orica "Oric Atmos" -p2000m "Philips P2000M" -p2000t "Philips P2000T" -pc8300 "PC8300" -pccga "IBM PC-XT CGA" -pce "PC-Engine" -pcmda "IBM PC-XT MDA" -pdp1 "PDP1 Spacewar!" -pet "Commodore PET2000/CBM2000 Series (Basic 1)" -plus4 "Commodore +4 (NTSC)" -pow3000 "Power 3000" -raaspec "RA+A Spectrum I+" -sfzch "CPS Changer (Street Fighter ZERO)" -sms "Sega Master System" -specpls3 "Spectrum +3" -spectrum "ZX-Spectrum 48k" -superbrd "Superboard" -sx64 "Commodore SX64/VIP64 (PAL)" -sys80 "System-80" -tandy1t "Tandy 1000TX" -ti99_4 "TI99/4 Home Computer (60 Hz)" -ti99_4a "TI99/4A Home Computer (60 Hz)" -ti99_4ae "TI99/4A Home Computer (50 Hz)" -ti99_4e "TI99/4 Home Computer (50 Hz)" -trs80 "TRS-80 Model I (Level II Basic)" -ts1000 "TS1000" -tx8000 "Texet TX8000" -uk101 "Compukit UK101" -vc20 "Commodore VC20 (PAL)" -vectrex "GCE Vectrex" -vic20 "Commodore VIC20 (NTSC)" -vz200 "Sanyo / Dick Smith VZ200" -vz300 "Sanyo / Dick Smith VZ300" -zx80 "ZX-80" -zx81 "ZX-81" - - -MESS USAGE -========== - -MESS <[file1] [file2] [file...]> - -*For a complete list of systems emulated, use: MESS -listfull -*For system files required by each system, use: MESS -listroms -*See the MAME readme.txt for a detailed list of options. -*make sure you have roms in a subdirectory from your ROMPATH - with the same name as the system (eg ROMS/COLECO) - -Examples: - -MESS nes zelda.nes - will run MESS in the following way: - = nes (Nintendo Entertainment System) - = zelda.nes (Zelda cartridge) - = default options (all listed in mess.cfg) - -MESS coleco dkong.rom -soundcard 0 - will run MESS in the following way: - = coleco (Nintendo Entertainment System) - = dkong.rom (Donkey Kong cartridge) - = default options but without sound - -MESS trs80 boot.dsk arcade1.dsk - will run MESS in the following way: - = trs80 (TRs-80 model 1) - = boot.dsk (The Trs80 boot diskl) - = arcade1.dsk (Disk which contains games) - = default options (all listed in mess.cfg) - -MESS cgenie games1.dsk - will run the system Colour Genie with one disk image loaded - - - -A NOTE ABOUT FILES: - - Place files to be loaded in a subdirectory from you rompath with the - same name as the system you want to run. - (eg) ROMPATH = C:\MESS\ROMS; - The files for the coleco system would be placed here: - C:\MESS\ROMS\COLECO - - You can also specify the exact path to a file in the ROMPATH. - - - You can now specify switches on the commandlinem in which case - every image name following them goes to that respective slot, - regardless of it's extension. - - Some examples: - ; recognized by extension - mess a800 mule.xfd - mess oric1 game.tap - ; 'slot' overrides - mess vic20 -cassette a.dsk b.img c.d64 -floppy d.cas - mess amiga -floppy itdesert.adf - The switches are -rom, -floppy, -harddisk and -cassette. - Recognized extensions without overrides are now: - cassette: cas, cmd, tap, t64, vz - harddisk: img - floppy: d64, dsk, adf, atr, xfd, vzd - roms: everything else - - -MESS specific switches: ------------------------ --listextensions: obtain information about each driver in terms of - DEVICE supported, and common file extensions for each - of these devices. - - - -System Information: -------------------- - -See SysInfo.dat (online in the MESS UI from the Machine history) or -sysinfo.htm for all system related information. TO generate -sysinfo.html, execute dat2html.exe. diff --git a/src/mess/docs/mess_old.txt b/src/mess/docs/mess_old.txt deleted file mode 100644 index 44f91ab2b..000000000 --- a/src/mess/docs/mess_old.txt +++ /dev/null @@ -1,912 +0,0 @@ -NOTE: - -This information is being transferred to SYSINFO.DAT, and will be available from the -MESS UI, accessable from the Machine History entry. The information in sysinfo.dat -will also be able to be viewed offline in html format. - - - - - - - - - -==================================== -Supported Systems and Related Issues -==================================== - - -a5200 - Atari 5200: -------------------- -Known Issues: - - This driver is preliminary. You can see the Atari system loadup screen, - and a ROM will start, but the emulated system hangs... If you can supply - info, please contact the MESS team! ;-) - - - Required System ROM (5200sys.bin - 2,048k - CRC 4248d3e3) - the system - will not run without it. - - -Compatibility: - - This driver is preliminary and won't run past the demo screen. - Help is needed. - - - - - -a7800 - Atari 7800: -------------------- -Known Issues: - - This system requires the SYSTEM BIOS to enable it to work. To see what - file is required, type: - MESS a7800 -listroms - -Usage: - - "R" = Reset - - "S" = Select - - Ctrl = Button 1 - - Alt = Button 2 - -Compatibility: - - Runs most games well. - - - - - - ------------------ -a800 - Atari 800: ------------------ -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - Required System ROM (atariosb.rom - 1024 bytes 3e28a1fe) - - - The Atari800 driver now has two ROM slots. It really had two - slots, so I modified the code to optionally read the second - part of a 16K ROM from the second cartridge filename provided - (right slot). - The previous version had a800_cartridge_32k flag which was - wrong. Cartridges are either 8K or 16K, so I renamed that to - ..._16k too ;) - -Compatibility: - - It should run just about anything you throw at it. - - - - - - ------------------------- -amiga - Commodore Amiga: ------------------------- -Known Issues: - - NOT WORKING. Problems introduced during the conversion to the - new MAME core :( System begins to boot, but eventually hangs. - - - ----------------------- -amstrad - CPC Amstrad: ----------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - This system requires the SYSTEM BIOS to enable it to work. To see what - file is required, type: - MESS amstrad -listroms - -Compatibility: - - This driver is considered preliminary. The system ROM is loaded, and the - Amstrad screen is shown. Image loading is not supported yet. - - - ----------------------- -apl2cpls - APPLE DRIVERS -apple2c - -apple2c0 - -apple2e - -apple2ee - -apple2ep - ----------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - Keyboard problems with the conversion to the MAME core.... These systems - work ok, but not much happens due to the keyboard problems... You need - the system ROMS to run these... - - - - - - ---------------------- -astrocde - Astrocade: ---------------------- -Compatibility: - It should run just about anything you throw at it. - - - ------------------------------------- -c16 commodore c16 (pal version) -plus4 commodore plus4 (ntsc version) ------------------------------------- -(beta version) - -if the game runs to fast with the ntsc version, try the pal version! - -status ------- -(hardware softscrolling vertical?) -(imperfect colors) -imperfect sound (noise channel complete wrong) -simple tape support -no serial bus support (disk drives/printer) -no rs232 (plus4) - -no special expansion modules - simple iec support (c1551 floppy disk drive) - -some unsolved problems - - memory check by c16 kernel will not recognize more memory without -restart of mess - cpu clock switching/changing - -Keys ----- -Some PC-Keyboards does not behave well when special two or more keys are -pressed at the same time -(with my keyboard printscreen clears the pressed pause key!) - -shift-cbm switches between upper-only and normal character set -(when wrong characters on screen this can help) - -Tape ----- -loading of wav, prg and prg files in zip archiv -commandline cassette=image -wav: - 8 or 16(not tested), 5000 Hz minimum - has the same problems like an original tape drive (tone head must - be adjusted to get working(no load error,...) wav-files) -zip: - must be placed in current directory - prg's are played in the order of the files in zip file -must be 1st romname in commandline -use load or load"" or load"",1 for loading of normal programs -use load"",1,1 for loading programs to their special address - -Discs ------ -only file load from drive 8 and 9 implemented - loads file from rom directory (*.prg) - or file from d64 image (here also directory supported) -use dload"filename" -or load"filename",8 -or load"filename",8,1 (for loading machine language programs at their -address) -for loading -type run or the appropriate sys call to start them - -Roms ----- -.bin .rom .lo .hi .prg -files with boot-sign in it - recogniced as roms - -.prg files loaded at address in its first two bytes -.bin, .rom, .lo , .hi roms loaded to cs1 low, cs1 high, cs2 low, cs2 -high - address accordingly to order in command line - -when problems start with -log and look into error.log file - - - - ----------------------- -cgenie - Colour Genie: ----------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - -Usage: - keyboard - relatively close to the original layout. - joystick - emulation of dual Colour Genie joysticks with keypads. - cassette - emulation of virtual tapes supported. - Use SYSTEM or CLOAD commands to read images. - SYSTEM supports 6 character filenames, CLOAD loads - a file named BASIC[N].CAS, where [N] is the character - you supplied (e.g. CLOAD"M" loads BASICM.CAS) - floppies - emulation of virtual floppy discs supported. - Use CMD"I0" to "CMDI3" to get an inventory of drive 0 to 3, - use CMD"S FILENAME/CMD" to start a binary executable or use - LOAD"FILENAME/BAS" to load a basic program. - -Options: -Under the "Options" menu, accessible by hitting TAB, there are three settings. - "Floppy Disc Drives" - enable or disable floppy disc controller. - "DOS ROM C000-DFFF" - enable 8K DOS ROM or make it RAM. - "EXT ROM E000-EFFF" - enable 4K Extension ROM or make it RAM. - -Compatibility: - The Colour Genie driver should run most of the known programs out there. - It supports the Motorola 6845 CRT controller with text and graphics - modes (LGR and FGR), the AY-3-8910 sound chip with three audio channels - and noise and the WD 179x floppy disc controller with up to four - virtual floppy disc drives contained in image files. - -Known issues: - Startup with CAS or CMD images does not always work. Use the BASIC - SYSTEM or CLOAD commands to read cassette image files, or use - the Colour Genie DOS ROM with floppy disc images to run programs. - The driver does not yet emulate the printer port mode for AY-3-8910. - Right now it always uses the AY-3-8910 ports for joystick emulation. - -Notes: -The Colour Genie driver requires the presence of the following images: - CGENIE.ROM 16K Basic and BIOS. - CGENIE1.FNT 8x8 default character set with graphics. -To access the virtual floppy disc capabilities you need: - CGDOS.ROM 8K Disk Operation System. -And as an add-on "DOS Interface" you can use: - NEWE000.ROM 4K Extension - - - -Additional info: - Specify the disk image on the mess commandline. - mess cgenie games1.dsk - - The newe000.rom is loaded if the corresponding "dip switch" is set - from the driver itself. No need to specify any roms on the commandline. - - Inside the emulation type: - cmd"i - to list the contents of the floppy disk image. - To start a game, eg. paint/cmd, type - cmd"s paint/cmd - - You can omit the blank between cmd"s and the filename.................. - - - This is how it also works: - mess cgenie games1.dsk games2.dsk games3.dsk games4.dsk - - CLOAD is for BASIC type tapes only. It should work if you have a - BASIC *.cas file. File "names" in that case are _one_ character in - length (inside the emulation). In your roms/cgenie folder the - names will be basicA.cas, basicB.cas and so on. If you CSAVE"A - you'll see a file basicA.cas laterand you can CLOAD"A it again. - - To load a binary image there was a different command: - SYSTEM - You'll see a prompt looking like this: - *? - and there you can enter a name of up to six (wow!) characters. - *?chop16 - will start loading a file named chop16.cas if it is in your rompath. - If you don't have it... well, wait and see (nothing ;) If you have - it, you'll see two stars (**) in the upper right corner. The right - one will twinkle after every couple of bytes loaded, every 254 I - think. - - After several minutes you'll see the prompt again - *? - now type / (slash) and ENTER and the program will be started at it's - defined run address. If a program does not have a run address, you - could also specify / to run from a specific value... - - Also,..... - Tap and also confirm the following - MEM SIZE? - with . - After that you're in BASIC (DISK BASIC, to be exact, unless you disable - cgdos.rom via the dip switches). - - Now you can use the DISK BASIC extensions to issue commands. Most important - CMD"I display inventory, disk# is optional and can be from 0 to 3 - CMD"Sname/cmd start a binary file name/cmd from any disk - CMD"Limage/bin:3 load image/bin from disk 3 - - To ease things you could also enbale my DOS lookalike frontend ;) - It's contained in newE000.rom but not enabled by default. - If you enable it you can type HELP (hehe ;) and DIR and simply - give a name to execute a binary file. - - - - - ---------------------- -coco - Color Computer: ---------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - - ----------------------- -coleco - ColecoVision: ----------------------- -Usage: - arrow keys - 1p move - ctrl, alt - 1p fire - 1-0 - number keys on the Colecovision controller - minus - '#' key on the Colecovision controller - equals - '.' key on the Colecovision controller - -Compatibility: - To the best of my knowledge, this emulation should run any cartridge - accurately. - -Notes: - The Colecovision driver requires the presence of "COLECO.ROM". The driver - will not function without this ROM. A real Colecovision also will not - function without this ROM. - -Thanks: - Special thanks to Marat Fayzullin for providing loads of Colecovision - information through the ColEm source. - - - - - --------------------- -dragon32 - Dragon32: --------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - ------------------------ -ep128 - Enterprise 128: ------------------------ -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - This system requires the SYSTEM BIOS to enable it to work. To see what - file is required, type: - MESS ep128 -listroms - -Compatibility: - - This driver is considered preliminary. The system ROM is loaded, and the - Enterprise screen is shown. Image loading is not supported yet. - - - -------------------------- -gamegear - Sega GameGear: -------------------------- - - See Sega Master System. - - - ----------------------------------------------- -genesis - Genesis (MegaDrive in Japan/Europe): ----------------------------------------------- -Usage: - arrow keys - 1p move - control, alt - 1p fire - 1,2 - 1, 2 player select - return - 1p start - -Options: - Under the "Options" menu, accessible by hitting TAB, you will find the - following option: - - "Country" - this allows you to alter the 'flavour' of Genesis, to either European, - Japanese or American. Many cartridges compare their country codes with - that of the Genesis itself and may behave differently, or lock up if the - two types do not match. - 'Auto' attempts to auto-set the Genesis country code to the value the - cartridge will appear to be checking for. This may not be 100% accurate, - however. - -Compatibility: - Most games tend to run fairly well. some with slight graphic glitches, incorrect - colours part way down the screen or other b'zarre effects. - - Cartridges up to 32MBit (4MByte) are supported. - - The controller may not work well with some games. This will be resolved when I - obtain more information. Similarly, 6-button joypads aren't emulated yet. - - Split screen effects and interlacing are not yet supported. - - Sprite/layer priority should be perfect. - - Sound is emulated at Z80 and PSG76489 level. There is no inbuilt YM2612 support, - this will follow on soon using software FM synthesis. - -Notes: - I still consider the Genesis driver extremely preliminary. I have a lot of further - work to do before I consider it anywhere near complete. My initial goal is to make - it as compatible as possible. Currently there is scope within the driver to handle - split screen colour changes/any VDP effect, interlacing, without rewriting. The - graphics renderer emulates VDP at scanline level, and does not use tile-based - methods. - -Wanted: - Any Sega Megadrive information! Information is extremely sparse; typically the same - three-four documents, with parts incomplete, conflicting, and corrupted. Specifically, - some of the finer points of DMA transfer, and access of the 68K memory map by the Z80. - Generally, points which conflict with themselves in the documentation available on - the net... - -Thanks: - ...which I'm thankful for, as there certainly isn't any source available to look at! - Thanks to the rest of the MESS team, Terence & Philip and the MAME team, Kevin Lingley - for support and ex(p|t)ensive games testing in this driver's ARM code & early forms, - and, of course, Stan, Kyle, Eric, Kenny... - - Please note that no goats were sacrificed during the development of this driver. - - - - ----------------- -kaypro - Kaypro: ----------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - Problems with the conversion to the MAME core.... Emulation OK.... - - - - --------------------- -kccomp - KC Compact: --------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - This system requires the SYSTEM BIOS to enable it to work. To see what - file is required, type: - MESS kccomp -listroms - -Compatibility: - - This driver is considered preliminary. The system ROM is loaded, and the - KC compact screen is shown. Image loading is not supported yet. - - - - ------------- -kim1 - KIM-1 ------------- -Compatibility: - - This driver supports the backdrop image of the KIM-1. - -Description: -A 'Lunar Lander' game is currently hardcoded into kim1_init_machine() ;-) -It is in memory from 0200 to 02DA. To start it just enter -[0] [2] [0] [0] and [F5] afterwards (GO). - -/* - * LUNAR LANDER - * Jim Butterfield - * - * Description - * This program starts at 0200. When started, you will find - * yourself at 4500 feet and falling. The thrust on your machine - * is set to low; so you will pick up speed due to the force of - * gravity. - * You can look at your fuel at any time by pressing the - * "F" button. Your fuel (initially 800 pounds) will be shown - * in the first four digits of the KIM display. - * The last two digits of the KIM display always show - * your rate of ascent of descent. "A" restores altitude. - * Set your thrust by pressing buttons 1 through 9. - * Warning: button 0 turns you motor off, and it will not - * reignite! A thrust of 1, minimum, burns very little fuel; - * but gravity will be pulling your craft down faster and - * faster. A thrust of 9, maximum, overcomes gravity - * and reduces your rate of descent very sharply A thrust of 5 - * exactly counterbalances gravity; you will continue to descend - * (or ascend) at a constant rate. If you run out of fuel, - * your thrust controls will become inoperative. - * - * Suggestions for a safe flight: - * [1] Conserve fuel at the beginning by pressing 1. You - * begin to pick up speed downwards. - * [2] When your rate of descent gets up to the 90's, you're - * falling fast enough. Press 5 to steady the rate. - * [3] When your altitude reaches about 1500 feet, you'll - * need to slow down. Press 9 and slow down fast. - * [4] When your rate of descent has dropped to 15 or 20, - * steady the craft by pressing 5 or 6. Now you're on - * your own. - */ - -It'd be interesting if the audio output of a save would be readable -on a KIM-1 board. To listen to the hard-bit-rock ;) just type -[F1] [1] [8] [0] [0] and [F5] - -the keys: -key name description -------------------------------------- -F1 AD address mode -F2 DA data mode -F3 RS reset -F5 GO execute from address -F6 PC program counter (hmm.. whatever) -F7 ST step (does not yet work; NMI handling for K7 missing) -ENTER + increase address -0-F hex hex digits - - - ------------------------------------- -nes - Nintendo Entertainment System: ------------------------------------- -Usage: - arrow keys - 1p move - control, alt - 1p fire - 3 - Select - 1,2 - 1, 2 player select - return - 1p start - - -Options: - Under the "Options" menu, accessible by hitting TAB, are two settings. - "Renderer" - can be set to Scanline or Experimental. The Scanline renderer gives - the most accurate display, but can be slow. The Experimental - option is much faster, but still needs quite a bit of work before it - displays properly in all cases. It's best used for games with no - scrolling playfields, like Donkey Kong, etc. - "Split-Screen fix" - defaults to off. Turn it on to see proper split screens in - games like Kirby's Adventure and Airwolf. This will most likely go - away in the future as we figure out how these split screens really work. - -Compatibility: - The NES driver should run 99% of the ROMs currently out there with very little problem. - It doesn't yet support a lot of the obscure mappers used in fwNES, but this is on deck - for the next release. For the record, it supports mappers 1, 2, 3, 4, 5 (incomplete), - 7, 8, 9 & 10 (incomplete), 11, 15, 16, 18 (vrom probs), 25 (vrom probs), 33, 34, - 64, 65, 66, 68 (incomplete), 69 (incomplete), 71, 78, 79. - Some of the mappers > 63 haven't been fully tested yet. - -Notes: - The main focus up until this point has been in getting the NES driver as accurate - as possible. Unfortunately, the scanline rendering method is quite slow, so future - efforts will be focusing on bringing up the speed. Also, the sound code is still a - bit shaky. However, the NES driver does have quite accurate sample playback. For example, - you can hear speech samples in Bayou Billy, Gauntlet, Dirty Harry, and Skate or Die - that are not present in a few other NES emulators. - -Wanted: - I'd appreciate any info on some of the more obscure mappers. If you have - any of this, please drop me a line at bradman@primenet.com. - -Thanks: - Special thanks to Nicolas Hamel for xNES. Also, thanks to Marat Fayzullin, D, - Icer Addis, Matt Conte, Arthur Langereis, and John Stiles for tips and moral support - during the development of the NES driver. And last but not least, thanks to Jeremy - Chadwick and Firebug for their respective NES docs, without which this driver would - have taken considerably longer. I'll be sending you guys updates for both files - soon. ;) - - - - -------------------------------------- -oric1 "Oric 1" -orica "Oric Atmos" -------------------------------------- - - - - - -------------------------------------- -pccga "IBM PC/XT - CGA" -pcmda "IBM PC/XT - MDA" -------------------------------------- - - - - ------------------------- -pce - PC Engine/TurboGfx ------------------------- - - Preliminary... Xevious and Raiden8x work OK. - - ---------------------------- -pdp1 "pdp1 SPACEWAR!" ---------------------------- - - Currently emulates one image - SPACEWAR! - - ----------------------------- -raaspec "RA+A Spectrum I+" ----------------------------- -Intro: - - The Spectrum I+ was a modified Vectrex. It had a 32K ROM cart and 2K additional - battery backed RAM (0x8000 - 0x87ff). PB6 was used to signal inserted coins to - the VIA. The unit was controlled by 8 buttons (2x4 buttons of controller 1 and - 2). Each button had a LED which were mapped to 0xa000. The srvice mode can - be accessed by pressing button 8 during startup. As soon as all LEDs light up, - press 2 and 3 without releasing 8. Then release 8 and after that 2 and 3. You - can leave the screen where you enter ads by pressing 8 several times. - -Usage: - - This is the list of the ROMs required for driver "raaspec". - Name Size Checksum - spectrum.bin 32768 bytes 20af7f3f - system.img 8192 bytes ba13fb57 - - - For the 8-button key mappings, see the user menu under - "Keys (This Machine)". - -Compatibility: - - This driver supports the LED backdrop images: - spec_bt.png - led.png - - - - ------------------------ -sms - Sega MasterSystem ------------------------ -Usage: - arrow keys - 1p move - control, alt - 1p fire - 1,2 - 1, 2 player select - return - 1p start - -Compatibility: - It's not very compatible right now. The code is still quite preliminary. It should run - most of the ROMs, but quite a few exhibit graphics glitches. The MasterSystem has - totally incorrect color also. Sound emulation appears to be near perfect though. - -Wanted: - We'd like some spare time to work on this. Care to donate any? :) - -Thanks: - Thanks to Marat Fayzullin for his MasterGear emulation. - - - - - ----------------------------- -spectrum - Sinclair Specrum: ----------------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - This system requires the SYSTEM BIOS to enable it to work. To see what - file is required, type: - MESS spectrum -listroms - -Compatibility: - - This driver is considered preliminary. The system ROM is loaded, and the - Spectrum screen is shown. - - - - - --------------------------------- -ti99 "TI99/4A Home Computer --------------------------------- -Known Issues: - - Requires full keyboard emulation. At startup, full keyboard emulation - mode is enabled by default. Whilst in full keyboard emulation mode, - some key associated functionality may be disabled (like the ESC key for - EXIT). The keyboard emulation mode is toggled using the scroll_lock key. - - - The system does not work due to keyboard problems. - - - - - ----------------------- -trs80 - TRS-80 Model I ----------------------- -Usage: - keyboard - relatively close to the original layout. - Take a look into the "Options" menu, accessible by hitting - TAB, and choose "Keyboard Setup" to find out more about - the key mapping - changing is not yet supported. - cassette - emulation of virtual tapes supported. - Use SYSTEM or CLOAD commands to read images. - SYSTEM supports 6 character filenames and loads the - corresponding FILENM.CAS image, CLOAD loads a file named - BASIC[N].CAS, where [N] is the character you supplied - (e.g. CLOAD"M" loads BASICM.CAS) - floppies - emulation of virtual floppy discs supported. - Use a NEWDOS/80 boot disk for drive 0 and set up correct - PDRIVE parameters for the other drives. - If only drives 0 to 2 are used they can be double sided - by interpreting drive select 3 as head select bit. - -Options: -Under the "Options" menu, accessible by hitting TAB, there are three settings. - "Floppy Disc Drives" - enable or disable floppy disc controller. - "Video RAM" - enable upper case only or upper/lower font. - "Virtual E000-EFFF" - enable 4K Extension ROM or make it RAM. - -Compatibility: - The TRS-80 driver should run most of the known programs out there. - It supports a WD 179x floppy disc controller with up to four - virtual floppy disc drives contained in image files. - -Notes: -The TRS-80 driver requires the presence of the following images: - TRS80.ROM 12K Level II Basic. - TRS80.FNT 6x15 default character set with block graphics. - - - - ------------------- -vectrex - Vectrex: ------------------- -Usage: - -Compatibility: - To the best of our knowledge, this emulation should run most cartridges - accurately. - -Notes: - The Vectrex driver requires the presence of "SYSTEM.IMG". The driver - will not function without this ROM. A real Vectrex also will not - function without this ROM. Also, overlay support is present now! - -Thanks: - Special thanks to Keith Wilkins and Chris Salomon for their work on DVE - and their help, without which this driver would have taken much longer. - - - - ------------------------------------- -vic20 commodore vic20 (ntsc version) -vc20 commodore vc20 (pal version) ------------------------------------- - -vic20 ntsc-version - when screen is two wide right or low, or screen doesn't fitt in visible - area try the pal version - -vc20 pal-version - -a normal or good written program does not depend on the video system - -Status ------- - -imperfect sound (noise channel complete wrong) - simple tape support - no serial bus support (disks/printer) - no rs232 - -for a more complete vic20 emulation take a look at the very good -vice emulator - -Video ------ -NTSC: -Screen Size (normal TV (horicontal),4/3 ratio) -pixel ratio: about 7/5 ! -so no standard Vesa Resolution is good -tweaked mode 256x256 acceptable -best define own display mode (when graphic driver supports this) -PAL: -pixel ratio about 13/10 ! -good (but only part of screen filled) 1024x768 -acceptable 800x600 -better define own display mode (when graphic driver supports this) - -XMESS: -use -scalewidth 3 -scaleheight 2 for acceptable display -better define own display mode - -Keys ----- -Some PC-Keyboards does not behave well when special two or more keys are -pressed at the same time -(with my keyboard printscreen clears the pressed pause key!) - -stop-restore in much cases prompt will appear -shift-cbm switches between upper-only and normal character set -(when wrong characters on screen this can help) - -Lightpen --------- -Paddle 3 x-axe -Paddle 4 y-axe - -Tape ----- -loading of wav, prg and prg files in zip archiv -commandline cassette=image -wav: - 8 or 16(not tested), 12500 Hz minimum - has the same problems like an original tape drive (tone head must - be adjusted to get working(no load error,...) wav-files) -zip: - must be placed in current directory - prg's are played in the order of the files in zip file - -must be 1st romname in commandline -use load or load"" or load"",1 for loading of normal programs -use load"",1,1 for loading programs to their special address - -Roms ----- -.bin .rom .a0 .20 .40 .60 .prg -files with boot-sign in it - recogniced as roms - -.20 files loaded at 0x2000 -.40 files loaded at 0x4000 -.60 files loaded at 0x6000 -.a0 files loaded at 0xa000 -.prg files loaded at address in its first two bytes -.bin .rom files loaded at 0x4000 when 0x4000 bytes long -else loaded at 0xa000 - -when problems start with -log and look into error.log file - - - - ------- -vz200 -vz300 ------- - -If a game doesn't start after a second, it's most probably a BASIC -game and you have to type "RUN" ;) -If it still doesn't run, there's a bug (in the image or the driver). - - - diff --git a/src/mess/docs/messnew.txt b/src/mess/docs/messnew.txt index 56df44d63..2fb424700 100644 --- a/src/mess/docs/messnew.txt +++ b/src/mess/docs/messnew.txt @@ -1,3 +1,66 @@ +0.36 Release Candidate 2 + +Note: .inp record/playback does still not work currently. +Note: DOS image loading at the command line has changed. see below + + +New System Drivers Supported (in no particular order): +------------------------------------------------------ +MSX1 UK [Sean Young] +C16 (c1551) [Peter Trauner] +Plus4 (c1551) [Peter Trauner] + + +System Driver Changes: +---------------------- +- COCO/Dragon - Implemented several obscure video modes (CoCo 3), fixes a bug in + flashing on hires text (CoCo 3), implemented the CoCo 3 timer, added several new + additional key mappings so things like backspace work [Nate Woods] + +- CBM family bugfixes, C64/C128 Mouse support, VIC20 Dipswitches fixes + [Peter Trauner] + +-Msx system driver bug fixes. [Sean Young] Also, for the latest news regarding + this excellent system driver, check out his MSX1 WIP page at: + http://www.msxnet.org/mess/ + + + +Other Changes: +-------------- + +- [DOS] Images specified at the command line must now be accompanied by the device they + are to be attached to, and will not be loaded unless the device is specified *and* + supported by that system. Eg, to attach a cartridge for the NES, you must specify: + MESS nes -cart galaga.nes + This may affect the usage of frontends, however it brings the MESS command line + into sync with the well accepted MAME convention. See mess.txt for options and + usage. + +- The core is based on MAME 0.36RC2. This incorporates all + features of the update to this core. [MAME team] + +- Image CRC's for clones can now be retreived from the parent named CRC file [Sean Young] + +- IO_QUICKLOAD for CBM system drivers. [Peter Trauner] + +- M65CE02 changes [Peter Trauner] + +- File Manager now much more user friendly [Kev Thacker, Juergen Buchmueller] + +- Note that -listextensions has been renamed to -listdevices. Use this to obtain + valid device names for use at the command line to attach images to the system. + +- Extensive CRC updates. + [Sean Young, Chris Henry, Gerardo Jorrin, Peter Trauner, Cowering] + SysInfo.dat documentation update + [Thierry Schimbi, Chris Henry, Kev Thacker, Raphael Nabet] + Please send all CRC/sysinfo file contributions to Chris Henry. + (battlepriest@hotmail.com). + + +----------------------------------------- + 0.36 Release Candidate 1 Note: .inp record/playback does still not work currently. diff --git a/src/mess/filemngr.c b/src/mess/filemngr.c index 8cbd0116e..7aabbd963 100644 --- a/src/mess/filemngr.c +++ b/src/mess/filemngr.c @@ -1,6 +1,6 @@ #include "driver.h" #include -#include +//#include /* used to tell updatescreen(void) to clear the bitmap */ extern int need_to_clear_bitmap; @@ -24,6 +24,7 @@ static void start_enter_string(char *string_buffer, int max_string_size, int fil enter_filename_mode = filename_mode; } + /* code, lower case (w/o shift), upper case (with shift), control */ static int code_to_char_table[] = { @@ -190,7 +191,7 @@ char current_filespecification[32] = "*.*"; const char fs_directory[] = "[DIR]"; const char fs_device[] = "[DRIVE]"; const char fs_file[] = "[FILE]"; -//const char fs_archive[] = "[ARCHIVE]"; +/*const char fs_archive[] = "[ARCHIVE]"; */ static const char **fs_item; static const char **fs_subitem; @@ -209,6 +210,10 @@ enum { FILESELECT_FILE } FILESELECT_ENTRY_TYPE; + + + +/* char *fs_dupe(const char *src, int len) { char *dst; @@ -218,6 +223,34 @@ char *fs_dupe(const char *src, int len) strcpy(dst, src); return dst; } +*/ + +char *fs_dupe(const char *src, int len) +{ + char *dst; + int display_length; + int display_width; + + display_width = (Machine->uiwidth / Machine->uifontwidth); + display_length = len; + + if (display_length>display_width) + display_length = display_width; + + /* malloc space for string + NULL char + extra char.*/ + dst = malloc(len+2); + if (dst) + { + strcpy(dst, src); + /* copy old char to end of string */ + dst[len+1]=dst[display_length]; + /* put in NULL to cut string. */ + dst[len+1]='\0'; + } + return dst; + +} + void fs_free(void) { @@ -594,7 +627,7 @@ int fileselect(int selected) break; case FILESELECT_DIRECTORY: - // fs_chdir(fs_item[sel]); + /* fs_chdir(fs_item[sel]); */ osd_change_directory(fs_item[sel]); fs_free(); @@ -602,7 +635,7 @@ int fileselect(int selected) break; case FILESELECT_DEVICE: - // fs_chdir("/"); + /* fs_chdir("/"); */ osd_change_device(fs_item[sel]); fs_free(); need_to_clear_bitmap = 1; @@ -648,6 +681,31 @@ int filemanager(int selected) sel = selected - 1; + + total = 0; + for (type = 0; type < IO_COUNT; type++) + { + for (id = 0; id < device_count(type); id++) + { + name = device_typename_id(type, id); + + if (name) + { + menu_item[total] = name; + + name = device_filename(type, id); + menu_subitem[total] = (name) ? name : "---"; + + flag[total] = 0; + types[total] = type; + ids[total] = id; + + total++; + } + } + } + + /* if the fileselect() mode is active */ if (sel & (2 << SEL_BITS)) { @@ -675,29 +733,6 @@ int filemanager(int selected) } - total = 0; - for (type = 0; type < IO_COUNT; type++) - { - for (id = 0; id < device_count(type); id++) - { - name = device_typename_id(type, id); - - if (name) - { - menu_item[total] = name; - - name = device_filename(type, id); - menu_subitem[total] = (name) ? name : "---"; - - flag[total] = 0; - types[total] = type; - ids[total] = id; - - total++; - } - } - } - menu_item[total] = "Return to Main Menu"; menu_subitem[total] = 0; flag[total] = 0; diff --git a/src/mess/machine/a2600.c b/src/mess/machine/a2600.c index 5148612f1..353cf95ba 100644 --- a/src/mess/machine/a2600.c +++ b/src/mess/machine/a2600.c @@ -3,9 +3,10 @@ #include "driver.h" #include "mess/machine/riot.h" #include "sound/tiaintf.h" +#include "cpuintrf.h" /* for detailed logging */ -#define TIA_VERBOSE 1 +#define TIA_VERBOSE 0 #define RIOT_VERBOSE 0 /* TIA *Write* Addresses (6 bit) */ @@ -16,10 +17,36 @@ #define RSYNC 0x03 /* Reset Horizontal Sync Counter */ #define NUSIZ0 0x04 /* Number-Size player/missle 0 */ #define NUSIZ1 0x05 /* Number-Size player/missle 1 */ + + #define COLUP0 0x06 /* Color-Luminance Player 0 */ #define COLUP1 0x07 /* Color-Luminance Player 1 */ #define COLUPF 0x08 /* Color-Luminance Playfield */ #define COLUBK 0x09 /* Color-Luminance BackGround */ +/* +COLUP0, COLUP1, COLUPF, COLUBK: +These addresses write data into the player, playfield +and background color-luminance registers: + +COLOR D7 D6 D5 D4 | D3 D2 D1 LUM +grey/gold 0 0 0 0 | 0 0 0 black + 0 0 0 1 | 0 0 1 dark grey +orange/brt org 0 0 1 0 | 0 1 0 + 0 0 1 1 | 0 1 1 grey +pink/purple 0 1 0 0 | 1 0 0 + 0 1 0 1 | 1 0 1 +purp/blue/blue 0 1 1 0 | 1 1 0 light grey + 0 1 1 1 | 1 1 1 white +blue/lt blue 1 0 0 0 + 1 0 0 1 +torq/grn blue 1 0 1 0 + 1 0 1 1 +grn/yel grn 1 1 0 0 + 1 1 0 1 +org.grn/lt org 1 1 1 0 + 1 1 1 1 +*/ + #define CTRLPF 0x0A /* Control Playfield, Ball, Collisions */ #define REFP0 0x0B /* Reflection Player 0 */ #define REFP1 0x0C /* Reflection Player 1 */ @@ -38,11 +65,15 @@ #define AUDF1 0x18 /* Audio Frequency 1 */ #define AUDV0 0x19 /* Audio Volume 0 */ #define AUDV1 0x1A /* Audio Volume 1 */ + +/* The next 5 registers are flash registers */ #define GRP0 0x1B /* Graphics Register Player 0 */ #define GRP1 0x1C /* Graphics Register Player 0 */ #define ENAM0 0x1D /* Graphics Enable Missle 0 */ #define ENAM1 0x1E /* Graphics Enable Missle 1 */ #define ENABL 0x1F /* Graphics Enable Ball */ + + #define HMP0 0x20 /* Horizontal Motion Player 0 */ #define HMP1 0x21 /* Horizontal Motion Player 0 */ #define HMM0 0x22 /* Horizontal Motion Missle 0 */ @@ -75,6 +106,7 @@ #define INPT5 0x0D /* Read Input (Trigger) 1 */ +int a2600_scanline_interrupt(void); static int a2600_riot_a_r(int chip); static int a2600_riot_b_r(int chip); @@ -92,6 +124,29 @@ static struct RIOTinterface a2600_riot = { { NULL } /* interrupt callback */ }; +/* keep a record of the colors here */ +struct color_registers { + int P0; /* player 0 */ + int M0; /* missile 0 */ + int P1; /* player 1 */ + int M1; /* missile 1 */ + int PF; /* playfield */ + int BL; /* ball */ + int BK; /* background */ +} colreg; + + +/* keep a record of the playfield registers here */ +struct playfield_registers { + int B0; /* 8 bits, only left 4 bits used */ + int B1; /* 8 bits */ + int B2; /* 8 bits */ +} pfreg; + +int scanline_registers[80]; /* array to hold info on who gets displayed */ + +static int msize0; +static int msize1; /* bitmap */ struct osd_bitmap *stella_bitmap; @@ -99,8 +154,6 @@ struct osd_bitmap *stella_bitmap; /* local */ static unsigned char *a2600_cartridge_rom; -static int stella_scanline; - static int a2600_riot_a_r(int chip) { /* joystick !? */ @@ -125,6 +178,12 @@ static void a2600_riot_b_w(int chip, int data) +/*************************************************************************** + + TIA Reads. + +***************************************************************************/ + int a2600_TIA_r(int offset) { @@ -181,27 +240,41 @@ int a2600_TIA_r(int offset) } + +/*************************************************************************** + + TIA Writes. + +***************************************************************************/ + void a2600_TIA_w(int offset, int data) { UINT8 *ROM = memory_region(REGION_CPU1); + switch (offset) { case VSYNC: if ( !(data & 0x00) ) { + if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - VSYNC Stop\n"); + { + fprintf(errorlog,"TIA_w - VSYNC Stop\n"); + } + } else if (data & 0x02) { + if (errorlog && TIA_VERBOSE) fprintf(errorlog,"TIA_w - VSYNC Start\n"); + } else /* not allowed */ { - if (errorlog && TIA_VERBOSE) + if (errorlog) fprintf(errorlog,"TIA_w - VSYNC Write Error! offset $%02x & data $%02x\n", offset, data); } break; @@ -220,7 +293,7 @@ void a2600_TIA_w(int offset, int data) } else { - if (errorlog && TIA_VERBOSE) + if (errorlog) fprintf(errorlog,"TIA_w - VBLANK Write Error! offset $%02x & data $%02x\n", offset, data); } break; @@ -231,6 +304,7 @@ void a2600_TIA_w(int offset, int data) { if (errorlog && TIA_VERBOSE) fprintf(errorlog,"TIA_w - WSYNC \n"); + //cpu_spinuntil_int (); /* wait til end of scanline */ } else { @@ -257,203 +331,221 @@ void a2600_TIA_w(int offset, int data) case NUSIZ0: /* offset 0x04 */ - if ( !(data >>4 & 0x00) ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = 1 clock \n"); - } - else if ( data >>4 & 0x01 ) /* check D5 and D4*/ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = 2 clocks \n"); - } - else if ( data >>4 & 0x02 ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = 4 clocks \n"); - } - else if ( data >>4 & 0x03 ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = 8 clocks \n"); - } - if ( !(data <<4 & 0x00) ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = One Copy \n"); - } - else if ( data <<4 & 0x01 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Two Copies, Close \n"); - } - else if ( data <<4 & 0x02 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Two Copies, Med \n"); - } - else if ( data <<4 & 0x03 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Three Copies, Close \n"); - } - else if ( data <<4 & 0x04 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Two Copies, Wide \n"); - } - else if ( data <<4 & 0x05 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Double Sized Player \n"); - } - else if ( data <<4 & 0x06 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Three Copies Medium \n"); - } - else if ( data <<4 & 0x07 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ0 = Quad Sized Player \n"); - } - else - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - Write Error, NUSIZ0 offset $%02x & data $%02x\n", offset, data); - } + msize0 = 2^(data>>4); + if (errorlog) + fprintf(errorlog,"TIA_w - NUSIZ0, Missile Size = %d clocks at horzpos %d\n",msize0, cpu_gethorzbeampos()); + /* must implement player size checking! */ + break; case NUSIZ1: /* offset 0x05 */ - if ( !(data >>4 & 0x00) ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = 1 clock \n"); - } - else if ( data >>4 & 0x01 ) /* check D5 and D4*/ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = 2 clocks \n"); - } - else if ( data >>4 & 0x02 ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = 4 clocks \n"); - } - else if ( data >>4 & 0x03 ) /* check D5 and D4 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = 8 clocks \n"); - } - if ( !(data <<4 & 0x00) ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = One Copy \n"); - } - else if ( data <<4 & 0x01 ) /* check D2, D1, D0 */ - { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Two Copies, Close \n"); - } - else if ( data <<4 & 0x02 ) /* check D2, D1, D0 */ - { + msize1 = 2^(data>>4); + if (errorlog) + fprintf(errorlog,"TIA_w - NUSIZ1, Missile Size = %d clocks at horzpos %d\n",msize1, cpu_gethorzbeampos()); + /* must implement player size checking! */ + + break; + + + case COLUP0: /* offset 0x06 */ + + colreg.P0 = data>>4; + colreg.M0 = colreg.P0; /* missile same color */ + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - COLUP0 Write color is $%02x\n", colreg.P0); + break; + + case COLUP1: /* offset 0x07 */ + + colreg.P1 = data>>4; + colreg.M1 = colreg.P1; /* missile same color */ + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - COLUP1 Write color is $%02x\n", colreg.P1); + break; + + case COLUPF: /* offset 0x08 */ + + colreg.PF = data>>4; + colreg.BL = data>>4; /* ball is same as playfield */ + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - COLUPF Write color is $%02x\n", colreg.PF); + break; + + case COLUBK: /* offset 0x09 */ + + colreg.BK = data>>4; + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - COLUBK Write color is $%02x\n", colreg.BK); + break; + + + case CTRLPF: /* offset 0x0A */ + + if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Two Copies, Med \n"); - } - else if ( data <<4 & 0x03 ) /* check D2, D1, D0 */ + fprintf(errorlog,"TIA_w - CTRLPF Write offset $%02x & data $%02x\n", offset, data); + + break; + + + + case REFP0: + if ( !(data & 0x00) ) { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Three Copies, Close \n"); + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - REFP0 No reflect \n"); } - else if ( data <<4 & 0x04 ) /* check D2, D1, D0 */ + else if ( data & 0x08) { if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Two Copies, Wide \n"); + fprintf(errorlog,"TIA_w - REFP0 Reflect \n"); } - else if ( data <<4 & 0x05 ) /* check D2, D1, D0 */ + else { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Double Sized Player \n"); + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - Write Error, REFP0 offset $%02x & data $%02x\n", offset, data); } - else if ( data <<4 & 0x06 ) /* check D2, D1, D0 */ + break; + + + case REFP1: + if ( !(data & 0x00) ) { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Three Copies Medium \n"); + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - REFP1 No reflect \n"); } - else if ( data <<4 & 0x07 ) /* check D2, D1, D0 */ + else if ( data & 0x08) { if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - NUSIZ1 = Quad Sized Player \n"); + fprintf(errorlog,"TIA_w - REFP1 Reflect \n"); } else { - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - Write Error, NUSIZ1 offset $%02x & data $%02x\n", offset, data); + if (errorlog && TIA_VERBOSE) + fprintf(errorlog,"TIA_w - Write Error, REFP1 offset $%02x & data $%02x\n", offset, data); } break; - case COLUP0: /* offset 0x06 */ - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - COLUP0 Write offset $%02x & data $%02x\n", offset, data); - break; - case COLUP1: /* offset 0x07 */ - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - COLUP1 Write offset $%02x & data $%02x\n", offset, data); + case PF0: /* 0x0D Playfield Register Byte 0 */ + pfreg.B0 = data; + if (errorlog) + fprintf(errorlog,"TIA_w - PF0 register is $%02x \n", pfreg.B0); + break; - break; + case PF1: /* 0x0E Playfield Register Byte 1 */ + pfreg.B1 = data; + if (errorlog) + fprintf(errorlog,"TIA_w - PF1 register is $%02x \n", pfreg.B1); + break; + case PF2: /* 0x0F Playfield Register Byte 2 */ + pfreg.B2 = data; + if (errorlog) + fprintf(errorlog,"TIA_w - PF2 register is $%02x \n", pfreg.B2); + break; - case COLUPF: /* offset 0x08 */ +/* These next 5 Registers are Strobe registers */ +/* They will need to update the screen as soon as written */ - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - COLUPF Write offset $%02x & data $%02x\n", offset, data); + case RESP0: /* 0x10 Reset Player 0 */ + break; - break; + case RESP1: /* 0x11 Reset Player 1 */ + break; + case RESM0: /* 0x12 Reset Missle 0 */ + break; - case COLUBK: /* offset 0x09 */ + case RESM1: /* 0x13 Reset Missle 1 */ + break; - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - COLUBK Write offset $%02x & data $%02x\n", offset, data); + case RESBL: /* 0x14 Reset Ball */ + break; - break; - case CTRLPF: /* offset 0x0A */ - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - CTRLPF Write offset $%02x & data $%02x\n", offset, data); - break; + case AUDC0: /* audio control */ + case AUDC1: /* audio control */ + case AUDF0: /* audio frequency */ + case AUDF1: /* audio frequency */ + case AUDV0: /* audio volume 0 */ + case AUDV1: /* audio volume 1 */ - case REFP0: /* offset 0x0B */ + tia_w(offset,data); + //ROM[offset] = data; + break; - if (errorlog && TIA_VERBOSE) - fprintf(errorlog,"TIA_w - CTRLPF Write offset $%02x & data $%02x\n", offset, data); - break; + case GRP0: /* 0x1B Graphics Register Player 0 */ + break; + + case GRP1: /* 0x1C Graphics Register Player 0 */ + break; - case 0x15: /* audio control */ - case 0x16: /* audio control */ - case 0x17: /* audio frequency */ - case 0x18: /* audio frequency */ - case 0x19: /* audio volume 0 */ - case 0x1A: /* audio volume 1 */ + case ENAM0: /* 0x1D Graphics Enable Missle 0 */ + break; - tia_w(offset,data); - ROM[offset] = data; + case ENAM1: /* 0x1E Graphics Enable Missle 1 */ + break; + + case ENABL: /* 0x1F Graphics Enable Ball */ + break; + + case HMP0: /* 0x20 Horizontal Motion Player 0 */ break; + + case HMP1: /* 0x21 Horizontal Motion Player 0 */ + break; + + case HMM0: /* 0x22 Horizontal Motion Missle 0 */ + break; + + case HMM1: /* 0x23 Horizontal Motion Missle 1 */ + break; + + case HMBL: /* 0x24 Horizontal Motion Ball */ + break; + + case VDELP0: /* 0x25 Vertical Delay Player 0 */ + break; + + case VDELP1: /* 0x26 Vertical Delay Player 1 */ + break; + + case VDELBL: /* 0x27 Vertical Delay Ball */ + break; + + case RESMP0: /* 0x28 Reset Missle 0 to Player 0 */ + break; + + case RESMP1: /* 0x29 Reset Missle 1 to Player 1 */ + break; + + case HMOVE: /* 0x2A Apply Horizontal Motion */ + break; + + case HMCLR: /* 0x2B Clear Horizontal Move Registers */ + break; + + case CXCLR: /* 0x2C Clear Collision Latches */ + break; + + + + default: - if (errorlog && TIA_VERBOSE) + if (errorlog) fprintf(errorlog,"TIA_w - UNKNOWN - offset %02x & data %02x\n", offset, data); /* all others */ ROM[offset] = data; @@ -462,11 +554,11 @@ void a2600_TIA_w(int offset, int data) void a2600_init_machine(void) { + + /* start RIOT interface */ riot_init(&a2600_riot); - /* set the scanline to 0 */ - stella_scanline=0; } @@ -510,7 +602,7 @@ int a2600_load_rom (int id) if (cartfile!=NULL) { - osd_fread (cartfile, a2600_cartridge_rom, 2048); /* testing COmbat for now */ + osd_fread (cartfile, a2600_cartridge_rom, 2048); /* testing Combat for now */ osd_fclose (cartfile); /* copy to mirrorred memory regions */ memcpy(&ROM[0x1800], &ROM[0x1000], 0x0800); @@ -530,14 +622,9 @@ int a2600_load_rom (int id) -/* Video functions for the a2600 */ +/* Video functions for the a2600 */ /* Since all software drivern, have here */ -//#include "vidhrdw/generic.h" - - - - /*************************************************************************** @@ -557,6 +644,44 @@ void a2600_vh_stop(void) } +/* when called, update the bitmap. */ +int a2600_scanline_interrupt(void) +{ + int regpos, pixpos; + int xs = Machine->drv->visible_area.min_x;//68; + int ys = Machine->drv->visible_area.max_y;//228; + int currentline = cpu_getscanline(); + int backcolor; + + /* plot the playfield and background for now */ + /* each register value is 4 color clocks */ + /* to pick the color, need to bit check the playfield regs */ + + /* set color to background */ + backcolor=colreg.BK; + + /* check PF register 0 (left 4 bits only) */ + + //pfreg.P0 + + + + + /* now we have color, plot for 4 color cycles */ + for (regpos=xs;regpospens[backcolor]); + } + + + + + + return 0; +} + + /*************************************************************************** Refresh the video screen @@ -565,7 +690,11 @@ void a2600_vh_stop(void) /* This routine is called at the start of vblank to refresh the screen */ void a2600_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) { + if (errorlog) + fprintf(errorlog,"SCREEN UPDATE CALLED\n"); + copybitmap(bitmap,stella_bitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); + } diff --git a/src/mess/machine/c128.c b/src/mess/machine/c128.c index 5a720c719..ae3e8629f 100644 --- a/src/mess/machine/c128.c +++ b/src/mess/machine/c128.c @@ -740,10 +740,6 @@ static void c128_common_driver_init (void) cbm_drive_attach_fs (0); cbm_drive_attach_fs (1); -#ifdef VC1541 - vc1541_driver_init (); -#endif - sid6581_0_init (c64_paddle_read); c64_cia0.todin50hz = c64_pal; cia6526_config (0, &c64_cia0); @@ -759,6 +755,7 @@ void c128_driver_init (void) vic2_set_rastering(0); vdc8563_init(c128_vdcram, 0); vdc8563_set_rastering(1); + raster1.display_state=c64_state; raster2.display_state=c128_state; } @@ -771,6 +768,7 @@ void c128pal_driver_init (void) vic2_set_rastering(1); vdc8563_init(c128_vdcram, 0); vdc8563_set_rastering(0); + raster1.display_state=c64_state; raster2.display_state=c128_state; } @@ -782,6 +780,7 @@ void c128pal2_driver_init (void) vic2_set_rastering(0); vdc8563_init(c128_vdcram, 0); vdc8563_set_rastering(1); + raster1.display_state=c64_state; raster2.display_state=c128_state; } @@ -844,21 +843,22 @@ void c128_state(PRASTER *this) y = Machine->gamedrv->drv->visible_area.max_y + 1 - Machine->uifont->height; #if VERBOSE_DBG -#if 0 +# if 0 cia6526_status (text, sizeof (text)); praster_draw_text (this, text, &y); -#if 1 +# if 1 snprintf (text, size, "c128 vic:%.5x m6510:%d exrom:%d game:%d", c128_vicaddr - c64_memory, c64_port6510 & 7, c64_exrom, c64_game); -#else +# else snprintf (text, size, "size:%.4x %s %s %.6x %s %.6x %.6x", MMU_SIZE, MMU_BOTTOM?"bottom":"", MMU_TOP?"top":"",MMU_RAM_ADDR, MMU_IO_ON?"io":"", MMU_PAGE0, MMU_PAGE1); -#endif +# endif praster_draw_text (this, text, &y); -#endif +# endif + vdc8563_status(text, sizeof(text)); praster_draw_text (this, text, &y); #endif @@ -866,7 +866,7 @@ void c128_state(PRASTER *this) vc20_tape_status (text, sizeof (text)); praster_draw_text (this, text, &y); #ifdef VC1541 - vc1541_drive_status (this, sizeof (text)); + vc1541_drive_status (text, sizeof (text)); #else cbm_drive_0_status (text, sizeof (text)); #endif diff --git a/src/mess/machine/c1551.c b/src/mess/machine/c1551.c index e1c565cae..378a682a6 100644 --- a/src/mess/machine/c1551.c +++ b/src/mess/machine/c1551.c @@ -113,38 +113,39 @@ int cbm_drive_attach_fs (int id) return 0; } -static int d64_open (CBM_Drive * drive) +static int d64_open (int id) { FILE *in; int size; - memset (&(drive->d.d64), 0, sizeof (drive->d.d64)); + memset (&(cbm_drive[id].d.d64), 0, sizeof (cbm_drive[id].d.d64)); - if (!(in = image_fopen (IO_FLOPPY, drive->drive, OSD_FILETYPE_IMAGE_R, 0))) + cbm_drive[id].d.d64.imagename= device_filename(IO_FLOPPY, id); + if (!(in = image_fopen (IO_FLOPPY, id, OSD_FILETYPE_IMAGE_R, 0))) { if (errorlog) - fprintf (errorlog, " image %s not found\n", device_filename(IO_FLOPPY,drive->drive)); + fprintf (errorlog, " image %s not found\n", device_filename(IO_FLOPPY,id)); return 1; } size = osd_fsize (in); - if (!(drive->d.d64.image = malloc (size))) + if (!(cbm_drive[id].d.d64.image = malloc (size))) { osd_fclose (in); return 1; } - if (size != osd_fread (in, drive->d.d64.image, size)) + if (size != osd_fread (in, cbm_drive[id].d.d64.image, size)) { - free (drive->d.d64.image); + free (cbm_drive[id].d.d64.image); osd_fclose (in); return 1; } osd_fclose (in); if (errorlog) - fprintf (errorlog, "floppy image %s loaded\n", device_filename(IO_FLOPPY,drive->drive)); + fprintf (errorlog, "floppy image %s loaded\n", + cbm_drive[id].d.d64.imagename); - drive->drive = D64_IMAGE; - drive->d.d64.imagename = device_filename(IO_FLOPPY,drive->drive); + cbm_drive[id].drive = D64_IMAGE; return 0; } @@ -160,7 +161,7 @@ int cbm_drive_attach_image (int id) } #endif - return d64_open (cbm_drive + id); + return d64_open (id); } @@ -402,14 +403,14 @@ static void cbm_drive_status (CBM_Drive * c1551, char *text, int size) switch (c1551->state) { case OPEN: - snprintf (text, size, "Disk File %s open", c1551->d.fs.filename); + snprintf (text, size, "Romdir File %s open", c1551->d.fs.filename); break; case READING: - snprintf (text, size, "Disk File %s loading %d", + snprintf (text, size, "Romdir File %s loading %d", c1551->d.fs.filename, c1551->size - c1551->pos - 1); break; case WRITING: - snprintf (text, size, "Disk File %s saving %d", + snprintf (text, size, "Romdir File %s saving %d", c1551->d.fs.filename, c1551->pos); break; } @@ -419,18 +420,18 @@ static void cbm_drive_status (CBM_Drive * c1551, char *text, int size) switch (c1551->state) { case OPEN: - snprintf (text, size, "Disk (%s) File %s open", + snprintf (text, size, "Image %s File %s open", c1551->d.d64.imagename, c1551->d.d64.filename); break; case READING: - snprintf (text, size, "Disk (%s) File %s loading %d", + snprintf (text, size, "Image %s File %s loading %d", c1551->d.d64.imagename, c1551->d.d64.filename, c1551->size - c1551->pos - 1); break; case WRITING: - snprintf (text, size, "Disk (%s) File %s saving %d", + snprintf (text, size, "Image %s File %s saving %d", c1551->d.d64.imagename, c1551->d.d64.filename, c1551->pos); break; diff --git a/src/mess/machine/c16.c b/src/mess/machine/c16.c index cc4fb37aa..5bdc57539 100644 --- a/src/mess/machine/c16.c +++ b/src/mess/machine/c16.c @@ -1,5 +1,10 @@ /*************************************************************************** + commodore c16 home computer + + peter.trauner@jk.uni-linz.ac.at + documentation + www.funet.fi ***************************************************************************/ #include @@ -8,6 +13,7 @@ #define VERBOSE_DBG 0 #include "cbm.h" +#include "tpi6525.h" #include "c1551.h" #include "vc1541.h" #include "vc20tape.h" @@ -35,40 +41,10 @@ static const char *romnames[2] = * 6 dav output edge data on port a available * 7 ack input edge ready for next datum */ -typedef struct -{ - void (*write_data) (int data); - int (*read_data) (void); - void (*write_handshake) (int data); - int (*read_handshake) (void); - int (*read_status) (void); - UINT8 ddra, ddrb, ddrc; - UINT8 dataa, datab, datac; -} -TIA6523; - -static TIA6523 tia6523a = -{ - c1551_0_write_data, - c1551_0_read_data, - c1551_0_write_handshake, - c1551_0_read_handshake, - c1551_0_read_status, - 0 -}, tia6523b = -{ - c1551_1_write_data, - c1551_1_read_data, - c1551_1_write_handshake, - c1551_1_read_handshake, - c1551_1_read_status, - 0 -}; static UINT8 port6529, port7501, ddr7501; static int lowrom = 0, highrom = 0; -static int c16; UINT8 *c16_memory; static UINT8 *c16_memory_10000; @@ -150,112 +126,6 @@ int c16_m7501_port_r (int offset) } } -static void tia6523_port_w (TIA6523 * tia6523, int offset, int data) -{ - offset &= 0x7; - switch (offset) - { - case 0: - /* DBG_LOG(1,"iec8",(errorlog,"write port a %.2x\n",data)); */ - tia6523->write_data ((data & tia6523->ddra) | (tia6523->ddra ^ 0xff)); - tia6523->dataa = data; - break; - case 1: - DBG_LOG (1, "iec8", (errorlog, "write port b %.2x\n", data)); - tia6523->datab = data; - break; - case 2: - /* DBG_LOG(1,"iec8",(errorlog,"write handshake out %d\n",data&0x40?1:0)); */ - tia6523->write_handshake ((data & tia6523->ddrc & 0x40) ? 1 : 0); - tia6523->datac = data; - break; - case 3: -/* DBG_LOG(1,"iec8",(errorlog,"write ddr a %.2x\n",data)); */ - tia6523->ddra = data; - tia6523->write_data (tia6523->dataa & data); - break; - case 4: - DBG_LOG (1, "iec8", (errorlog, "write ddr b %.2x\n", data)); - tia6523->ddrb = data; - break; - case 5: - DBG_LOG (1, "iec8", (errorlog, "write ddr c %.2x\n", data)); - tia6523->ddrc = data; - tia6523->write_handshake ((tia6523->datac & data & 0x40) ? 1 : 0); - break; - default: - DBG_LOG (3, "iec8", (errorlog, "port write %.2x %.2x\n", offset, data)); - } -} - -static int tia6523_port_r (TIA6523 * tia6523, int offset) -{ - int data = 0; - - offset &= 7; - switch (offset) - { - case 0: - data = (tia6523->read_data () & ~tia6523->ddra) - | (tia6523->ddra & tia6523->dataa); - DBG_LOG (1, "iec8", (errorlog, "read port a %.2x\n", data)); - break; - case 1: - data = (tia6523->read_status () & ~tia6523->ddrb) - | (tia6523->ddrb & tia6523->datab); -/* DBG_LOG(1,"iec8",(errorlog,"read status %.2x\n",data)); */ - break; - case 2: - data = ((tia6523->read_handshake ()? 0x80 : 0) & ~tia6523->ddrc) - | (tia6523->ddrc & tia6523->datac); -/* DBG_LOG(1,"iec8",(errorlog,"read handshake in %d\n",data&0x80?1:0)); */ - break; - case 3: - data = tia6523->ddra; - break; - case 4: - data = tia6523->ddrb; - break; - case 5: - data = tia6523->ddrc; - break; - } - return data; -} - - -void c16_iec9_port_w (int offset, int data) -{ - offset &= 7; - tia6523_port_w (&tia6523b, offset, data); - DBG_LOG (3, "iec9", (errorlog, "port write %.2x %.2x\n", offset, data)); -} - -int c16_iec9_port_r (int offset) -{ - int data = 0; - - offset &= 7; - data = tia6523_port_r (&tia6523b, offset); - DBG_LOG (3, "iec9", (errorlog, "port read %.2x %.2x\n", offset, data)); - return data; -} - -void c16_iec8_port_w (int offset, int data) -{ - tia6523_port_w (&tia6523a, offset & 7, data); - DBG_LOG (3, "iec8", (errorlog, "port write %.2x %.2x\n", offset, data)); -} - -int c16_iec8_port_r (int offset) -{ - int data = 0; - - data = tia6523_port_r (&tia6523a, offset & 7); - DBG_LOG (3, "iec8", (errorlog, "port read %.2x %.2x\n", offset, data)); - return data; -} - static void c16_bankswitch (void) { switch (lowrom) @@ -564,20 +434,13 @@ static int ted7360_dma_read_rom (int offset) return c16_memory_28000[offset & 0x7fff]; } } - if (c16) - { - switch (DIPMEMORY) - { - case MEMORY16K: - return c16_memory[offset & 0x3fff]; - case MEMORY32K: - return c16_memory[offset & 0x7fff]; - case MEMORY64K: - return c16_memory[offset]; - } - } - else + switch (DIPMEMORY) { + case MEMORY16K: + return c16_memory[offset & 0x3fff]; + case MEMORY32K: + return c16_memory[offset & 0x7fff]; + case MEMORY64K: return c16_memory[offset]; } exit (0); @@ -597,9 +460,31 @@ void c16_interrupt (int level) static void c16_common_driver_init (void) { + C1551_CONFIG config= { 1 }; + c16_select_roms (0, 0); c16_switch_to_rom (0, 0); + if (REAL_C1551) { + tpi6525[2].a.read=c1551x_0_read_data; + tpi6525[2].a.output=c1551x_0_write_data; + tpi6525[2].b.read=c1551x_0_read_status; + tpi6525[2].c.read=c1551x_0_read_handshake; + tpi6525[2].c.output=c1551x_0_write_handshake; + } else { + tpi6525[2].a.read=c1551_0_read_data; + tpi6525[2].a.output=c1551_0_write_data; + tpi6525[2].b.read=c1551_0_read_status; + tpi6525[2].c.read=c1551_0_read_handshake; + tpi6525[2].c.output=c1551_0_write_handshake; + } + + tpi6525[3].a.read=c1551_1_read_data; + tpi6525[3].a.output=c1551_1_write_data; + tpi6525[3].b.read=c1551_1_read_status; + tpi6525[3].c.read=c1551_1_read_handshake; + tpi6525[3].c.output=c1551_1_write_handshake; + c16_memory_10000 = c16_memory + 0x10000; c16_memory_14000 = c16_memory + 0x14000; c16_memory_18000 = c16_memory + 0x18000; @@ -619,24 +504,14 @@ static void c16_common_driver_init (void) cbm_drive_attach_fs (0); cbm_drive_attach_fs (1); -#ifdef VC1541 - vc1541_driver_init (); -#endif + if (REAL_C1551) + c1551_config (0, 0, &config); } void c16_driver_init (void) { - c16 = 1; - c16_common_driver_init (); - ted7360_init (1); - ted7360_set_dma (ted7360_dma_read, ted7360_dma_read_rom); -} - -void plus4_driver_init (void) -{ - c16 = 0; c16_common_driver_init (); - ted7360_init (0); + ted7360_init (C16_PAL); ted7360_set_dma (ted7360_dma_read, ted7360_dma_read_rom); } @@ -650,11 +525,14 @@ void c16_init_machine (void) { int i; + tpi6525_2_reset(); + tpi6525_3_reset(); + #if 0 c16_switch_to_rom (0, 0); c16_select_roms (0, 0); #endif - if (c16) + if (TYPE_C16) { cpu_setbank (1, (DIPMEMORY == MEMORY16K) ? c16_memory : c16_memory + 0x4000); switch (DIPMEMORY) @@ -704,20 +582,20 @@ void c16_init_machine (void) { ted7360_set_dma (ted7360_dma_read, ted7360_dma_read_rom); } - if (IEC8ON) + if (IEC8ON||REAL_C1551) { - install_mem_write_handler (0, 0xfee0, 0xfeff, c16_iec8_port_w); - install_mem_read_handler (0, 0xfee0, 0xfeff, c16_iec8_port_r); + install_mem_write_handler (0, 0xfee0, 0xfeff, tpi6525_2_port_w); + install_mem_read_handler (0, 0xfee0, 0xfeff, tpi6525_2_port_r); } - else + else { install_mem_write_handler (0, 0xfee0, 0xfeff, MWA_NOP); install_mem_read_handler (0, 0xfee0, 0xfeff, MRA_NOP); } if (IEC9ON) { - install_mem_write_handler (0, 0xfec0, 0xfedf, c16_iec9_port_w); - install_mem_read_handler (0, 0xfec0, 0xfedf, c16_iec9_port_r); + install_mem_write_handler (0, 0xfec0, 0xfedf, tpi6525_3_port_w); + install_mem_read_handler (0, 0xfec0, 0xfedf, tpi6525_3_port_r); } else { @@ -740,10 +618,9 @@ void c16_init_machine (void) i = 0; cbm_drive_1_config (i); + if (REAL_C1551) + c1551_reset (); -#ifdef VC1541 - vc1541_machine_init (); -#endif cbm_serial_reset_write (0); for (i = 0; (romnames[i] != 0) && (i < sizeof (romnames) / sizeof (romnames[0])); diff --git a/src/mess/machine/c16.h b/src/mess/machine/c16.h index 7adde5174..f203c48d1 100644 --- a/src/mess/machine/c16.h +++ b/src/mess/machine/c16.h @@ -103,12 +103,25 @@ #define DATASSETTE (input_port_7_r(0)&0x20) #define DATASSETTE_TONE (input_port_7_r(0)&0x10) -#define IEC8ON ((input_port_7_r(0)&0xc)==4) -#define IEC9ON ((input_port_7_r(0)&3)==1) -#define SERIAL8ON ((input_port_7_r(0)&0xc)==8) -#define SERIAL9ON ((input_port_7_r(0)&3)==2) -#define DIPMEMORY (input_port_8_r(0)&3) +#define NO_REAL_FLOPPY ((input_port_8_r(0)&0xc0)==0) +#define REAL_C1551 ((input_port_8_r(0)&0xc0)==0x40) +#define REAL_VC1541 ((input_port_8_r(0)&0xc0)==0x80) + +#define IEC8ON ((input_port_8_r(0)&0x38)==8) +#define IEC8ON ((input_port_8_r(0)&0x38)==8) +#define IEC9ON ((input_port_8_r(0)&7)==1) + +#define SERIAL8ON ((input_port_8_r(0)&0x38)==0x18) +#define SERIAL9ON ((input_port_8_r(0)&7)==3) + +#define C16_PAL ((input_port_9_r(0)&0x10)==0) + +#define TYPE_C16 ((input_port_9_r(0)&0xc)==0) +#define TYPE_PLUS4 ((input_port_9_r(0)&0xc)==4) +#define TYPE_364 ((input_port_9_r(0)&0xc)==8) + +#define DIPMEMORY (input_port_9_r(0)&3) #define MEMORY16K (0) #define MEMORY32K (2) #define MEMORY64K (3) @@ -148,7 +161,6 @@ extern int c16_read_keyboard (int databus); extern void c16_interrupt (int); extern void c16_driver_init (void); -extern void plus4_driver_init (void); extern void c16_driver_shutdown (void); extern void c16_init_machine (void); extern void c16_shutdown_machine (void); diff --git a/src/mess/machine/c64.c b/src/mess/machine/c64.c index 920fb2db2..1e4ffacbe 100644 --- a/src/mess/machine/c64.c +++ b/src/mess/machine/c64.c @@ -239,7 +239,7 @@ static void c64_cia1_interrupt (int level) if (level != old_level) { DBG_LOG (1, "mos6510", (errorlog, "nmi %s\n", level ? "start" : "end")); - // cpu_set_nmi_line(0, level); + /* cpu_set_nmi_line(0, level); */ old_level = level; } } @@ -582,6 +582,8 @@ int c64_paddle_read (int which) if (JOYSTICK_2_BUTTON2) pot4=0x00; } if (MOUSE2) { + if (which) pot4=MOUSE2_Y; + else pot3=MOUSE2_X; } if (PADDLES12) { if (which) pot2=PADDLE2_VALUE; @@ -591,6 +593,8 @@ int c64_paddle_read (int which) if (JOYSTICK_1_BUTTON2) pot1=0x00; } if (MOUSE1) { + if (which) pot2=MOUSE1_Y; + else pot1=MOUSE1_X; } if (JOYSTICK_SWAP) { temp=pot1;pot1=pot2;pot2=pot1; @@ -661,10 +665,6 @@ static void c64_common_driver_init (void) cbm_drive_attach_fs (0); cbm_drive_attach_fs (1); - -#ifdef VC1541 - vc1541_driver_init (); -#endif } sid6581_0_init (c64_paddle_read); @@ -720,9 +720,11 @@ void c64gs_driver_init (void) void sx64_driver_init (void) { + VC1541_CONFIG vc1541= { 1, 8 }; c64_tape_on = 0; c64_pal = 1; c64_common_driver_init (); + vc1541_config (0, 0, &vc1541); } void c64_driver_shutdown (void) @@ -738,7 +740,7 @@ void c64_driver_shutdown (void) void c64_common_init_machine (void) { #ifdef VC1541 - vc1541_machine_init (); + vc1541_reset (); #endif if (c64_cia1_on) { @@ -969,8 +971,12 @@ int c64_frame_interrupt (void) nmilevel = KEY_RESTORE; } - if (!quickload && QUICKLOAD) - cbm_quick_open (0, 0, c64_memory); + if (!quickload && QUICKLOAD) { + if (c65) { + cbm_c65_quick_open (0, 0, c64_memory); + } else + cbm_quick_open (0, 0, c64_memory); + } quickload = QUICKLOAD; if (c128) { @@ -1201,9 +1207,9 @@ int c64_frame_interrupt (void) if (PADDLE1_BUTTON) value &= ~4; } else if (MOUSE1) { - if (JOYSTICK_1_BUTTON) + if (MOUSE1_BUTTON1) value &= ~0x10; - if (JOYSTICK_1_BUTTON2) + if (MOUSE1_BUTTON2) value &= ~1; } c64_keyline[8] = value; @@ -1226,9 +1232,9 @@ int c64_frame_interrupt (void) if (PADDLE3_BUTTON) value2 &= ~4; } else if (MOUSE2) { - if (JOYSTICK_2_BUTTON) + if (MOUSE2_BUTTON1) value2 &= ~0x10; - if (JOYSTICK_2_BUTTON2) + if (MOUSE2_BUTTON2) value2 &= ~1; } c64_keyline[9] = value2; @@ -1297,24 +1303,24 @@ int c64_frame_interrupt (void) if (C65_KEY_ESCAPE) value &= ~0x80; if (C65_KEY_F13) - value &= ~0x40; //? + value &= ~0x40; /*? */ if (C65_KEY_F11) - value &= ~0x20; //? + value &= ~0x20; /*? */ if (C65_KEY_F9) - value &= ~0x10; //? + value &= ~0x10; /*? */ if (C65_KEY_HELP) value &= ~8; - if (C65_KEY_ALT) //? non blocking + if (C65_KEY_ALT) /*? non blocking */ value &= ~4; if (C65_KEY_TAB) value &= ~2; - if (C65_KEY_NOSCRL) //? + if (C65_KEY_NOSCRL) /*? */ value &= ~1; c65_keyline[0] = value; value = 0xff; - if (C65_KEY_DIN) value &= ~0x80; //? - //if (KEY_5) value &= ~0x8; // left - //if (KEY_6) value &= ~0x4; // down + if (C65_KEY_DIN) value &= ~0x80; /*? */ + /*if (KEY_5) value &= ~0x8; // left */ + /*if (KEY_6) value &= ~0x4; // down */ c65_keyline[1] = value; } @@ -1342,11 +1348,12 @@ void c64_state(PRASTER *this) cia6526_status (text, sizeof (text)); praster_draw_text (this, text, &y); - snprintf (text, size, "c64 vic:%.4x m6510:%d exrom:%d game:%d", + snprintf (text, sizeof(text), "c64 vic:%.4x m6510:%d exrom:%d game:%d", c64_vicaddr - c64_memory, c64_port6510 & 7, c64_exrom, c64_game); praster_draw_text (this, text, &y); #endif + vdc8563_status(text, sizeof(text)); praster_draw_text (this, text, &y); #endif diff --git a/src/mess/machine/c64.h b/src/mess/machine/c64.h index 2ad5964da..f20ec357a 100644 --- a/src/mess/machine/c64.h +++ b/src/mess/machine/c64.h @@ -22,9 +22,9 @@ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY ) \ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY )\ PORT_BITX( 8, IP_ACTIVE_HIGH, IPT_BUTTON1|IPF_PLAYER2, \ - "P2 Button", KEYCODE_LALT,JOYCODE_2_BUTTON1 )\ + "P2 Button", KEYCODE_INSERT,JOYCODE_2_BUTTON1 )\ PORT_BITX( 4, IP_ACTIVE_HIGH, IPT_BUTTON2|IPF_PLAYER2, \ - "P2 Button 2", KEYCODE_LCONTROL,JOYCODE_2_BUTTON2 )\ + "P2 Button 2", KEYCODE_PGUP,JOYCODE_2_BUTTON2 )\ PORT_BITX( 0x80, IP_ACTIVE_HIGH, \ IPT_JOYSTICK_LEFT|IPF_PLAYER2 | IPF_8WAY,\ "P2 Left",KEYCODE_DEL,JOYCODE_2_LEFT )\ @@ -40,36 +40,42 @@ PORT_BIT ( 0x7, 0x0, IPT_UNUSED )\ PORT_START \ PORT_BITX( 0x100, IP_ACTIVE_HIGH, IPT_BUTTON1, \ - "Paddle 1 Button", KEYCODE_LCONTROL, 0)\ + "Paddle 1 Button", KEYCODE_LCONTROL, JOYCODE_1_BUTTON1)\ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_REVERSE,\ 30,20,0,255,KEYCODE_LEFT,KEYCODE_RIGHT,\ JOYCODE_1_LEFT,JOYCODE_1_RIGHT)\ PORT_START \ PORT_BITX( 0x100, IP_ACTIVE_HIGH, IPT_BUTTON2, \ - "Paddle 2 Button", KEYCODE_LALT, 0)\ + "Paddle 2 Button", KEYCODE_LALT, JOYCODE_1_BUTTON2)\ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_PLAYER2|IPF_REVERSE,\ - 30,20,0,255,KEYCODE_DOWN,KEYCODE_UP,0,0)\ + 30,20,0,255,KEYCODE_DOWN,KEYCODE_UP,\ + JOYCODE_1_UP,JOYCODE_1_DOWN)\ PORT_START \ PORT_BITX( 0x100, IP_ACTIVE_HIGH, IPT_BUTTON3, \ - "Paddle 3 Button", KEYCODE_INSERT, 0)\ + "Paddle 3 Button", KEYCODE_INSERT,JOYCODE_2_BUTTON1 )\ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_PLAYER3|IPF_REVERSE,\ - 30,20,0,255,KEYCODE_HOME,KEYCODE_PGUP,0,0)\ + 30,20,0,255,KEYCODE_HOME,KEYCODE_PGUP,JOYCODE_NONE,JOYCODE_NONE)\ PORT_START \ PORT_BITX( 0x100, IP_ACTIVE_HIGH, IPT_BUTTON4, \ - "Paddle 4 Button", KEYCODE_DEL, 0)\ + "Paddle 4 Button", KEYCODE_DEL, JOYCODE_2_BUTTON2)\ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_PLAYER4|IPF_REVERSE,\ - 30,20,0,255,KEYCODE_END,KEYCODE_PGDN,\ - JOYCODE_1_UP,JOYCODE_1_DOWN)\ + 30,20,0,255,KEYCODE_END,KEYCODE_PGDN,JOYCODE_NONE,JOYCODE_NONE)\ PORT_START \ - PORT_BITX( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2, \ - "Lightpen Signal", KEYCODE_LCONTROL, 0)\ - PORT_ANALOGX(0x1ff,0,IPT_PADDLE|IPF_PLAYER1,\ - 30,2,0,320-1,KEYCODE_LEFT,KEYCODE_RIGHT,\ - JOYCODE_1_LEFT,JOYCODE_1_RIGHT)\ + PORT_BITX( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1, \ + "Mouse Button Left", KEYCODE_LCONTROL, JOYCODE_1_BUTTON1 )\ + PORT_BITX( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1, \ + "Mouse Button Right", KEYCODE_LALT, JOYCODE_1_BUTTON2)\ + PORT_ANALOGX( 0x7e, 0x00, IPT_TRACKBALL_X | IPF_PLAYER1, 100, 0, 0, 0, KEYCODE_NONE, KEYCODE_NONE, JOYCODE_NONE, JOYCODE_NONE ) \ + /*PORT_BITX( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2,*/ \ + /*"Lightpen Signal", KEYCODE_LCONTROL, 0)*/\ + /*PORT_ANALOGX(0x1ff,0,IPT_PADDLE|IPF_PLAYER1,*/\ + /*30,2,0,320-1,KEYCODE_LEFT,KEYCODE_RIGHT,*/\ + /*JOYCODE_1_LEFT,JOYCODE_1_RIGHT)*/\ PORT_START \ - PORT_ANALOGX(0xff,0,IPT_PADDLE|IPF_PLAYER2,\ - 30,2,0,200-1,KEYCODE_UP,KEYCODE_DOWN,\ - JOYCODE_1_UP,JOYCODE_1_DOWN)\ + PORT_ANALOGX( 0x7e, 0x00, IPT_TRACKBALL_Y | IPF_PLAYER1 | IPF_REVERSE, 100, 0, 0, 0, KEYCODE_NONE, KEYCODE_NONE, JOYCODE_NONE, JOYCODE_NONE ) \ + /*PORT_ANALOGX(0xff,0,IPT_PADDLE|IPF_PLAYER2,*/\ + /*30,2,0,200-1,KEYCODE_UP,KEYCODE_DOWN,*/\ + /*JOYCODE_1_UP,JOYCODE_1_DOWN)*/\ PORT_START \ PORT_DIPNAME ( 0xe000, 0x2000, "Gameport A")\ PORT_DIPSETTING( 0, "None" )\ @@ -77,8 +83,8 @@ PORT_DIPSETTING( 0x4000, "Paddles 1, 2" )\ PORT_DIPSETTING( 0x6000, "Mouse Joystick Emulation/2 Button Joystick" )\ PORT_DIPSETTING( 0x8000, "Mouse" )\ - PORT_DIPSETTING( 0xa000, "Lightpen" )\ - PORT_DIPNAME ( 0x1000, 0x1000, "Lightpen Draw Pointer")\ + /*PORT_DIPSETTING( 0xa000, "Lightpen" )*/\ + /*PORT_DIPNAME ( 0x1000, 0x1000, "Lightpen Draw Pointer")*/\ PORT_DIPSETTING( 0, DEF_STR( Off ) )\ PORT_DIPSETTING( 0x1000, DEF_STR( On ) )\ PORT_DIPNAME ( 0xe00, 0x200, "Gameport B")\ @@ -111,6 +117,16 @@ #define PADDLE4_BUTTON ((input_port_4_r(0)&0x100)) #define PADDLE4_VALUE (input_port_4_r(0)&0xff) +#define MOUSE1_BUTTON1 (MOUSE1&&(readinputport(5)&0x8000)) +#define MOUSE1_BUTTON2 (MOUSE1&&(readinputport(5)&0x4000)) +#define MOUSE1_X ((readinputport(5)&0x3ff)) +#define MOUSE1_Y (readinputport(6)) + +#define MOUSE2_BUTTON1 (MOUSE1&&(readinputport(5)&0x8000)) +#define MOUSE2_BUTTON2 (MOUSE1&&(readinputport(5)&0x4000)) +#define MOUSE2_X ((readinputport(5)&0x3ff)) +#define MOUSE2_Y (readinputport(6)) + #define LIGHTPEN_BUTTON (LIGHTPEN&&(readinputport(5)&0x8000)) #define LIGHTPEN_X_VALUE ((readinputport(5)&0x3ff)&~1) /* effectiv resolution */ #define LIGHTPEN_Y_VALUE (readinputport(6)&~1) /* effectiv resolution */ diff --git a/src/mess/machine/c65.c b/src/mess/machine/c65.c index b073b4d44..422dc5888 100644 --- a/src/mess/machine/c65.c +++ b/src/mess/machine/c65.c @@ -52,6 +52,8 @@ UINT8 *c65_graphics; seldom copy (overlapping) from 0x402002 to 0x402008 (making place for new line in basic area) for whats this bit 0x400000, or is this really the address? + maybe means add counter to address for access, + so allowing up or down copies, and reordering copies */ static void c65_dma_port_w(int offset, int value) { @@ -348,7 +350,7 @@ void c65_bankswitch (void) cpu_setbank (3, c64_memory + 0x6000); /* dont care */ cpu_setbank (4, c65_dos); cpu_setbank (5, c65_dos + 0x2000); - //cpu_setbank (6, c65_interface); + /*cpu_setbank (6, c65_interface); */ cpu_setbankhandler_r (7, c65_read_io); c65_write_io = 1; cpu_setbank (8, c65_kernal); @@ -362,7 +364,7 @@ void c65_bankswitch (void) cpu_setbank (3, c65_monitor); cpu_setbank (4, c64_memory + 0x8000); /* dont care */ cpu_setbank (5, c64_basic); /* dont care*/ - //cpu_setbank (6, c65_interface); + /*cpu_setbank (6, c65_interface); */ cpu_setbankhandler_r (7, c65_read_io); c65_write_io = 1; cpu_setbank (8, c65_kernal); @@ -373,7 +375,7 @@ void c65_bankswitch (void) cpu_setbank (3, c65_basic + 0x4000); cpu_setbank (4, c65_graphics); cpu_setbank (5, c65_graphics+0x2000); - //cpu_setbank (6, c65_interface); + /*cpu_setbank (6, c65_interface); */ cpu_setbankhandler_r (7, c65_read_io); c65_write_io = 1; cpu_setbank (8, c65_kernal); @@ -550,10 +552,6 @@ static void c65_common_driver_init (void) cbm_drive_attach_fs (0); cbm_drive_attach_fs (1); -#ifdef VC1541 - vc1541_driver_init (1); -#endif - sid6581_0_init (c64_paddle_read); sid6581_1_init (NULL); c64_cia0.todin50hz = c64_cia1.todin50hz = c64_pal; @@ -583,9 +581,7 @@ void c65_driver_shutdown (void) void c65_init_machine (void) { memset(c64_memory+0x40000, 0xff, 0xc0000); -#ifdef VC1541 - vc1541_machine_init (); -#endif + cbm_serial_reset_write (0); cbm_drive_0_config (SERIAL8ON ? SERIAL : 0); cbm_drive_1_config (SERIAL9ON ? SERIAL : 0); diff --git a/src/mess/machine/cbm.c b/src/mess/machine/cbm.c index 8b4d0c3ae..2a31b11d5 100644 --- a/src/mess/machine/cbm.c +++ b/src/mess/machine/cbm.c @@ -38,7 +38,7 @@ int cbm_quick_init (int id) FILE *fp; int read; char *cp; - const char *name=device_filename(IO_HARDDISK, id); + const char *name=device_filename(IO_QUICKLOAD, id); memset (&quick, 0, sizeof (quick)); @@ -46,7 +46,7 @@ int cbm_quick_init (int id) quick.name = name; - fp = image_fopen (IO_HARDDISK, id, OSD_FILETYPE_IMAGE_R, 0); + fp = image_fopen (IO_QUICKLOAD, id, OSD_FILETYPE_IMAGE_R, 0); if (!fp) return INIT_FAILED; @@ -150,6 +150,64 @@ int cbm_pet1_quick_open (int id, int mode, void *arg) return 0; } +int cbmb_quick_open (int id, int mode, void *arg) +{ + int addr; + UINT8 *memory = arg; + + if (quick.data == NULL) + return 1; + addr = quick.addr + quick.length; + + memcpy (memory + quick.addr+0x10000, quick.data, quick.length); + memory[0xf0046] = addr & 0xff; + memory[0xf0047] = addr >> 8; + if (errorlog) + fprintf (errorlog, "quick loading %s at %.4x size:%.4x\n", + quick.name, quick.addr, quick.length); + + return 0; +} + +int cbm500_quick_open (int id, int mode, void *arg) +{ + int addr; + UINT8 *memory = arg; + + if (quick.data == NULL) + return 1; + addr = quick.addr + quick.length; + + memcpy (memory + quick.addr, quick.data, quick.length); + memory[0xf0046] = addr & 0xff; + memory[0xf0047] = addr >> 8; + if (errorlog) + fprintf (errorlog, "quick loading %s at %.4x size:%.4x\n", + quick.name, quick.addr, quick.length); + + return 0; +} + +int cbm_c65_quick_open (int id, int mode, void *arg) +{ + int addr; + UINT8 *memory = arg; + + if (quick.data == NULL) + return 1; + addr = quick.addr + quick.length; + + memcpy (memory + quick.addr, quick.data, quick.length); + memory[0x5a] = addr & 0xff; + memory[0x5b] = addr >> 8; + if (errorlog) + fprintf (errorlog, "quick loading %s at %.4x size:%.4x\n", + quick.name, quick.addr, quick.length); + + return 0; +} + + CBM_ROM cbm_rom[0x20]= { {0} }; void cbm_rom_exit(int id) diff --git a/src/mess/machine/cbm.h b/src/mess/machine/cbm.h index 9ef696d66..bda84a09d 100644 --- a/src/mess/machine/cbm.h +++ b/src/mess/machine/cbm.h @@ -67,14 +67,17 @@ typedef int bool; void cbm_quick_exit (int id); int cbm_quick_init (int id); -int cbm_quick_open (int id, int mode, void *arg); -int cbm_pet_quick_open (int id, int mode, void *arg); /* pet with basic 1 */ int cbm_pet1_quick_open (int id, int mode, void *arg); +int cbm_pet_quick_open (int id, int mode, void *arg); +int cbm_quick_open (int id, int mode, void *arg); +int cbmb_quick_open (int id, int mode, void *arg); +int cbm500_quick_open (int id, int mode, void *arg); +int cbm_c65_quick_open (int id, int mode, void *arg); -#define IODEVICE_CBM_PET_QUICK \ +#define IODEVICE_CBM_PET1_QUICK \ {\ - IO_HARDDISK, /* type */\ + IO_QUICKLOAD, /* type */\ 1, /* count */\ "p00\0prg\0", /*file extensions */\ NULL, /* private */\ @@ -82,7 +85,7 @@ int cbm_pet1_quick_open (int id, int mode, void *arg); cbm_quick_init, /* init */\ cbm_quick_exit, /* exit */\ NULL, /* info */\ - cbm_pet_quick_open, /* open */\ + cbm_pet1_quick_open, /* open */\ NULL, /* close */\ NULL, /* status */\ NULL, /* seek */\ @@ -92,9 +95,9 @@ int cbm_pet1_quick_open (int id, int mode, void *arg); NULL /* output_chunk */\ } -#define IODEVICE_CBM_PET1_QUICK \ +#define IODEVICE_CBM_PET_QUICK \ {\ - IO_HARDDISK, /* type */\ + IO_QUICKLOAD, /* type */\ 1, /* count */\ "p00\0prg\0", /*file extensions */\ NULL, /* private */\ @@ -102,7 +105,7 @@ int cbm_pet1_quick_open (int id, int mode, void *arg); cbm_quick_init, /* init */\ cbm_quick_exit, /* exit */\ NULL, /* info */\ - cbm_pet1_quick_open, /* open */\ + cbm_pet_quick_open, /* open */\ NULL, /* close */\ NULL, /* status */\ NULL, /* seek */\ @@ -114,7 +117,7 @@ int cbm_pet1_quick_open (int id, int mode, void *arg); #define IODEVICE_CBM_QUICK \ {\ - IO_HARDDISK, /* type */\ + IO_QUICKLOAD, /* type */\ 1, /* count */\ "p00\0prg\0", /*file extensions */\ NULL, /* private */\ @@ -132,6 +135,66 @@ int cbm_pet1_quick_open (int id, int mode, void *arg); NULL /* output_chunk */\ } +#define IODEVICE_CBMB_QUICK \ +{\ + IO_QUICKLOAD, /* type */\ + 1, /* count */\ + "p00\0prg\0", /*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + cbm_quick_init, /* init */\ + cbm_quick_exit, /* exit */\ + NULL, /* info */\ + cbmb_quick_open, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + +#define IODEVICE_CBM500_QUICK \ +{\ + IO_QUICKLOAD, /* type */\ + 1, /* count */\ + "p00\0prg\0", /*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + cbm_quick_init, /* init */\ + cbm_quick_exit, /* exit */\ + NULL, /* info */\ + cbm500_quick_open, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + +#define IODEVICE_CBM_C65_QUICK \ +{\ + IO_QUICKLOAD, /* type */\ + 1, /* count */\ + "p00\0prg\0", /*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + cbm_quick_init, /* init */\ + cbm_quick_exit, /* exit */\ + NULL, /* info */\ + cbm_c65_quick_open, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + /* use to functions to parse, load the rom images into memory and then use the cbm_rom var */ int cbm_rom_init(int id); @@ -147,11 +210,11 @@ typedef struct { extern CBM_ROM cbm_rom[0x20]; -#define IODEVICE_CBM_ROM(idfunc) \ +#define IODEVICE_CBM_ROM(extensions, idfunc) \ {\ IO_CARTSLOT, /* type */\ 2, /* in reality 1 *//* count */\ - "crt\0", /*file extensions */\ + extensions, /*file extensions */\ NULL, /* private */\ idfunc, /* id */\ cbm_rom_init, /* init */\ diff --git a/src/mess/machine/cbmb.c b/src/mess/machine/cbmb.c index 13cf25366..deddca1de 100644 --- a/src/mess/machine/cbmb.c +++ b/src/mess/machine/cbmb.c @@ -136,10 +136,10 @@ static void cbmb_irq (int level) struct cia6526_interface cbmb_cia = { - 0,//c64_cia0_port_a_r, - 0,//c64_cia0_port_b_r, - 0,//c64_cia0_port_a_w, - 0,//c64_cia0_port_b_w, + 0,/*c64_cia0_port_a_r, */ + 0,/*c64_cia0_port_b_r, */ + 0,/*c64_cia0_port_a_w, */ + 0,/*c64_cia0_port_b_w, */ 0, /*c64_cia0_pc_w */ 0, /*c64_cia0_sp_r */ 0, /*c64_cia0_sp_w */ @@ -237,20 +237,18 @@ void cbmb_shutdown_machine (void) void cbmb_frame_interrupt (int param) { static int level=0; -#if 0 static int quickload = 0; -#endif int value; tpi6525_0_irq0_level(level); level=!level; if (level) return ; -#if 0 - if (!quickload && QUICKLOAD) - cbm_quick_open (0, cbmb_memory); + if (!quickload && QUICKLOAD) { + if (cbm500) cbm500_quick_open(0, 0, cbmb_memory); + else cbmb_quick_open (0, 0, cbmb_memory); + } quickload = QUICKLOAD; -#endif value = 0; if (KEY_STOP) diff --git a/src/mess/machine/cbmdrive.c b/src/mess/machine/cbmdrive.c index e5208efa0..ca04abe3e 100644 --- a/src/mess/machine/cbmdrive.c +++ b/src/mess/machine/cbmdrive.c @@ -40,9 +40,9 @@ * ended with illegal track and sector numbers */ -#define MAX_TRACKS 35 +#define D64_MAX_TRACKS 35 -int sectors_per_track[] = +int d64_sectors_per_track[] = { 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 19, 19, 19, 19, 19, 19, 19, @@ -50,22 +50,22 @@ int sectors_per_track[] = 17, 17, 17, 17, 17 }; -static int offset[MAX_TRACKS]; /* offset of begin of track in d64 file */ +static int d64_offset[D64_MAX_TRACKS]; /* offset of begin of track in d64 file */ /* must be called before other functions */ void cbm_drive_open_helper (void) { int i; - offset[0] = 0; + d64_offset[0] = 0; for (i = 1; i <= 35; i++) - offset[i] = offset[i - 1] + sectors_per_track[i - 1] * 256; + d64_offset[i] = d64_offset[i - 1] + d64_sectors_per_track[i - 1] * 256; } /* calculates offset to beginning of d64 file for sector beginning */ -static int tracksector2offset (int track, int sector) +int d64_tracksector2offset (int track, int sector) { - return offset[track - 1] + sector * 256; + return d64_offset[track - 1] + sector * 256; } static int cbm_compareNames (unsigned char *left, unsigned char *right) @@ -94,13 +94,13 @@ static int d64_find (CBM_Drive * drive, unsigned char *name) { int pos, track, sector, i; - pos = tracksector2offset (18, 0); + pos = d64_tracksector2offset (18, 0); track = drive->d.d64.image[pos]; sector = drive->d.d64.image[pos + 1]; while ((track >= 1) && (track <= 35)) { - pos = tracksector2offset (track, sector); + pos = d64_tracksector2offset (track, sector); for (i = 2; i < 256; i += 32) { if (drive->d.d64.image[pos + i] & 0x80) @@ -127,14 +127,14 @@ static void d64_readprg (CBM_Drive * c1551, int pos) c1551->d.d64.filename[i] = 0; - pos = tracksector2offset (c1551->d.d64.image[pos + 1], c1551->d.d64.image[pos + 2]); + pos = d64_tracksector2offset (c1551->d.d64.image[pos + 1], c1551->d.d64.image[pos + 2]); i = pos; c1551->size = 0; while (c1551->d.d64.image[i] != 0) { c1551->size += 254; - i = tracksector2offset (c1551->d.d64.image[i], c1551->d.d64.image[i + 1]); + i = d64_tracksector2offset (c1551->d.d64.image[i], c1551->d.d64.image[i + 1]); } c1551->size += c1551->d.d64.image[i + 1]; @@ -153,7 +153,7 @@ static void d64_readprg (CBM_Drive * c1551, int pos) if (i + 254 < c1551->size) { /* not last sector */ memcpy (c1551->buffer + i, c1551->d.d64.image + pos + 2, 254); - pos = tracksector2offset (c1551->d.d64.image[pos + 0], + pos = d64_tracksector2offset (c1551->d.d64.image[pos + 0], c1551->d.d64.image[pos + 1]); DBG_LOG (3, "d64 readprg", (errorlog, "track: %d sector: %d\n", c1551->d.d64.image[pos], @@ -174,7 +174,7 @@ static void d64_read_sector (CBM_Drive * c1551, int track, int sector) snprintf (c1551->d.d64.filename, sizeof (c1551->d.d64.filename), "track %d sector %d", track, sector); - pos = tracksector2offset (track, sector); + pos = d64_tracksector2offset (track, sector); c1551->buffer = malloc (256); @@ -194,7 +194,7 @@ static void d64_read_directory (CBM_Drive * c1551) c1551->buffer = malloc (8 * 18 * 25); c1551->size = 0; - pos = tracksector2offset (18, 0); + pos = d64_tracksector2offset (18, 0); track = c1551->d.d64.image[pos]; sector = c1551->d.d64.image[pos + 1]; @@ -225,7 +225,7 @@ static void d64_read_directory (CBM_Drive * c1551) while ((track >= 1) && (track <= 35)) { - pos = tracksector2offset (track, sector); + pos = d64_tracksector2offset (track, sector); for (i = 2; i < 256; i += 32) { if (c1551->d.d64.image[pos + i] & 0x80) diff --git a/src/mess/machine/cbmdrive.h b/src/mess/machine/cbmdrive.h index 7688d36ac..817b82919 100644 --- a/src/mess/machine/cbmdrive.h +++ b/src/mess/machine/cbmdrive.h @@ -77,6 +77,12 @@ typedef struct } CBM_Drive; +#define D64_MAX_TRACKS 35 +extern int d64_sectors_per_track[D64_MAX_TRACKS]; +int d64_tracksector2offset (int track, int sector); +#define D64_TRACK_ID1 (d64_tracksector2offset(18,0)+162) +#define D64_TRACK_ID2 (d64_tracksector2offset(18,0)+163) + typedef struct { int count; diff --git a/src/mess/machine/dragon.c b/src/mess/machine/dragon.c index 232af8e10..64aeef9a6 100644 --- a/src/mess/machine/dragon.c +++ b/src/mess/machine/dragon.c @@ -7,7 +7,9 @@ TODO: - Implement unimplemented SAM registers - - Implement unimplemented CoCo 3 GIME registers (marked with '!') + - Implement unimplemented interrupts (serial, keyboard, timer) + - Implement 63.5usec interrupt + - Choose and implement more appropriate rations for the speed up poke - Support .PAK files generated by PC-Dragon ***************************************************************************/ @@ -16,6 +18,9 @@ #include "machine/6821pia.h" UINT8 *coco_rom; +static int coco3_enable_64k; +static int coco3_mmu[16]; +static int coco3_gimereg[8]; /* from vidhrdw/dragon.c */ extern void coco3_ram_b1_w (int offset, int data); @@ -31,6 +36,7 @@ extern void coco3_vh_sethires(int hires); extern void d_pia1_pb_w(int offset, int data); extern void coco3_pia1_pb_w(int offset, int data); +static void coco3_set_irq_line(int mask, int state); static void d_pia1_pa_w(int offset, int data); static int d_pia1_cb1_r(int offset); static int d_pia0_ca1_r(int offset); @@ -41,27 +47,47 @@ static void d_pia1_cb2_w(int offset, int data); static void d_pia0_cb2_w(int offset, int data); static void d_pia1_ca2_w(int offset, int data); static void d_pia0_ca2_w(int offset, int data); +static void d_pia0_irq_a(int state); static void d_pia0_irq_b(int state); +static void coco3_pia0_irq_a(int state); +static void coco3_pia0_irq_b(int state); -static struct pia6821_interface dragon_pia_0_intf = -{ - /*inputs : A/B,CA/B1,CA/B2 */ d_pia0_pa_r, 0, d_pia0_ca1_r, 0, 0, 0, - /*outputs: A/B,CA/B2 */ 0, d_pia0_pb_w, d_pia0_ca2_w, d_pia0_cb2_w, - /*irqs : A/B */ 0, d_pia0_irq_b -}; -static struct pia6821_interface dragon_pia_1_intf = +static void coco3_timer_recalculate(int newcounterval); + + +static struct pia6821_interface dragon_pia_intf[] = { - /*inputs : A/B,CA/B1,CA/B2 */ d_pia1_pa_r, 0, 0, d_pia1_cb1_r, 0, 0, - /*outputs: A/B,CA/B2 */ d_pia1_pa_w, d_pia1_pb_w, d_pia1_ca2_w, d_pia1_cb2_w, - /*irqs : A/B */ 0, 0 + /* PIA 0 */ + { + /*inputs : A/B,CA/B1,CA/B2 */ d_pia0_pa_r, 0, d_pia0_ca1_r, 0, 0, 0, + /*outputs: A/B,CA/B2 */ 0, d_pia0_pb_w, d_pia0_ca2_w, d_pia0_cb2_w, + /*irqs : A/B */ d_pia0_irq_a, d_pia0_irq_b + }, + + /* PIA 1 */ + { + /*inputs : A/B,CA/B1,CA/B2 */ d_pia1_pa_r, 0, 0, d_pia1_cb1_r, 0, 0, + /*outputs: A/B,CA/B2 */ d_pia1_pa_w, d_pia1_pb_w, d_pia1_ca2_w, d_pia1_cb2_w, + /*irqs : A/B */ 0, 0 + } }; -static struct pia6821_interface coco3_pia_1_intf = +static struct pia6821_interface coco3_pia_intf[] = { - /*inputs : A/B,CA/B1,CA/B2 */ d_pia1_pa_r, 0, 0, d_pia1_cb1_r, 0, 0, - /*outputs: A/B,CA/B2 */ d_pia1_pa_w, coco3_pia1_pb_w, d_pia1_ca2_w, d_pia1_cb2_w, - /*irqs : A/B */ 0, 0 + /* PIA 0 */ + { + /*inputs : A/B,CA/B1,CA/B2 */ d_pia0_pa_r, 0, d_pia0_ca1_r, 0, 0, 0, + /*outputs: A/B,CA/B2 */ 0, d_pia0_pb_w, d_pia0_ca2_w, d_pia0_cb2_w, + /*irqs : A/B */ coco3_pia0_irq_a, coco3_pia0_irq_b + }, + + /* PIA 1 */ + { + /*inputs : A/B,CA/B1,CA/B2 */ d_pia1_pa_r, 0, 0, d_pia1_cb1_r, 0, 0, + /*outputs: A/B,CA/B2 */ d_pia1_pa_w, coco3_pia1_pb_w, d_pia1_ca2_w, d_pia1_cb2_w, + /*irqs : A/B */ 0, 0 + } }; static int cart_inserted; @@ -202,11 +228,71 @@ typedef struct { UINT8 dummy_zero2[6]; } pak_trailer9; +/* Used by PC-Dragon; UINT16's are little endian */ +typedef struct { + /* Info */ + UINT8 data1[2]; + UINT8 magic1[2]; + UINT8 checksum; + UINT8 pak_version; + UINT8 ext_version; + UINT8 emu_version; + UINT8 state_only; + UINT8 architecture; + UINT8 rom_start; + + /* Machine state */ + UINT8 irq_cycles_lsb; + UINT8 irq_cycles_msb; + UINT8 screen_size; + UINT8 pia[9]; + UINT8 last_shift; + UINT8 filemem[8]; + + /* Debugger */ + UINT16 last_text_base; + UINT16 breakpoints[6]; + UINT16 break_operation; + UINT16 dasm_pcr; + UINT16 fill_start; + UINT16 fill_end; + UINT8 fill_value; + UINT8 left_window; + UINT16 temp_break; + UINT16 break_value; + UINT8 break_control; + UINT8 break_type; + UINT16 internal; + UINT16 dumpaddr; +} pcd_info1; + +/* Used by PC-Dragon; UINT16's are little endian */ +typedef struct { + UINT8 pakdata[65]; + UINT8 dummy1; + UINT8 background; + UINT8 foreground; + UINT8 vmode[2][2][6]; + UINT8 border[2][2]; + UINT8 dummy2; + UINT16 irq_rate; + UINT8 servicemem[16]; + UINT8 speed; + UINT8 lpt_and_swapping; + UINT8 hardjoy_resol; +} pcd_info2; + /* All versions */ typedef struct { UINT8 writeprotect; - char disk_directory[66]; /* PaulB's emulator uses this space for its own data */ - char disk_name[4][32]; /* PaulB's emulator uses this space for its own data */ + union { + char disk_directory[66]; + pcd_info1 pcd1; + } u1; + union { + char disk_name[4][32]; + pcd_info2 pcd2; + } u2; char pak_directory[66]; UINT8 crlf; UINT8 keyboard_mode; @@ -281,16 +367,9 @@ typedef struct { */ static int pak_decode_trailer(UINT8 *rawtrailer, int rawtrailerlen, pak_trailer *trailer) { -/* pak_trailer1 p1; */ -/* pak_trailer2 p2; */ pak_trailer3 p3; -/* pak_trailer4 p4; */ pak_trailer5 p5; -/* pak_trailer6 p6; */ pak_trailer8 p8; -/* pak_trailer9 p9; */ -/* pak_trailer10 p10; */ -/* pak_trailer11 p11; */ union { pak_trailer7 p7; @@ -648,6 +727,146 @@ void dragon_sam_memory_size(int offset, int data) */ } +/*************************************************************************** + CoCo 3 Interrupts +***************************************************************************/ + +enum { + COCO3_INT_TMR = 0x20, /* Timer */ + COCO3_INT_HBORD = 0x10, /* Horizontal border sync */ + COCO3_INT_VBORD = 0x08, /* Vertical border sync */ + COCO3_INT_EI2 = 0x04, /* Serial data */ + COCO3_INT_EI1 = 0x02, /* Keyboard */ + COCO3_INT_EI0 = 0x01 /* Cartridge */ +}; + +static void coco3_set_irq_line(int mask, int state) +{ + if ((coco3_gimereg[2] & mask) && (coco3_gimereg[0] & 0x20)) + cpu_set_irq_line(0, M6809_IRQ_LINE, state); + if ((coco3_gimereg[3] & mask) && (coco3_gimereg[0] & 0x10)) + cpu_set_irq_line(0, M6809_FIRQ_LINE, state); +} + +/* TODO: Make this interrupt called, and also - make the CoCo 2 HBORD work */ +static void coco3_hbord(void) +{ + pia_0_ca1_w(0, 0); + coco3_set_irq_line(COCO3_INT_HBORD, 0); +} + +void coco3_vbord(void) +{ + pia_0_cb1_w(0, 0); + coco3_set_irq_line(COCO3_INT_VBORD, 0); +} + +/*************************************************************************** + CoCo 3 Timer + + The CoCo 3 had a timer that had would activate when first written to, and + would decrement over and over again until zero was reached, and at that + point, would flag an interrupt. At this point, the timer starts back up + again. +***************************************************************************/ + +static void *coco3_timer; +static int coco3_timer_interval; /* interval: 1=70 nsec, 0=63.5 usec */ +static int coco3_timer_base; +static int coco3_timer_counter; +extern void coco3_vh_blink(void); + +static void coco3_timer_init(void) +{ + coco3_timer = 0; + coco3_timer_interval = 0; +} + +static void coco3_timer_callback(int dummy) +{ + + //static void coco3_timer_recalculate(int newcounterval); + + coco3_timer = 0; + coco3_set_irq_line(COCO3_INT_TMR, 0); + coco3_timer_recalculate(coco3_timer_base); + coco3_vh_blink(); + +} + +static double coco3_timer_interval_time(void) +{ + return coco3_timer_interval ? TIME_IN_NSEC(70) : TIME_IN_USEC(63.5); +} + +/* This function takes the value in coco3_timer_counter, and sets up the timer + * and the coco3_time_counter_time for it + */ +static void coco3_timer_recalculate(int newcounterval) +{ + if (coco3_timer) + timer_remove(coco3_timer); + + if (newcounterval) { + coco3_timer = timer_set(newcounterval * coco3_timer_interval_time(), + 0, coco3_timer_callback); + } + else { + coco3_timer = 0; + } + + coco3_timer_counter = newcounterval; +} + +static int coco3_timer_r(void) +{ + int result = 0; + + if (coco3_timer) { + result = coco3_timer_counter - + (timer_timeleft(coco3_timer) / coco3_timer_interval_time()); + + /* This shouldn't happen, but I'm prepared anyways */ + if (result < 0) + result = 0; + else if (result > 4095) + result = 4095; + } + return result; /* result = 0..4095 */ +} + +static void coco3_timer_w(int data) /* data = 0..4095 */ +{ + coco3_timer_base = (data & 4095); + coco3_timer_recalculate(coco3_timer_base); +} + +static void coco3_timer_msb_w(int data) +{ + coco3_timer_w(((data & 0x0f) << 8) | (coco3_timer_base & 0xff)); +} + +static void coco3_timer_lsb_w(int data) +{ + coco3_timer_w((coco3_timer_base & 0xf00) | (data & 0xff)); +} + +static void coco3_timer_set_interval(int interval) +{ + int oldtimerval; + + if (interval != coco3_timer_interval) { + if (coco3_timer) { + oldtimerval = coco3_timer_r(); + coco3_timer_interval = interval; + coco3_timer_recalculate(oldtimerval); + } + else { + coco3_timer_interval = interval; + } + } +} + /*************************************************************************** MMU ***************************************************************************/ @@ -675,10 +894,6 @@ void dragon64_sam_himemmap(int offset, int data) /* Coco 3 */ -static int coco3_enable_64k; -static int coco3_mmu[16]; -static int coco3_gimereg[8]; - int coco3_mmu_lookup(int block) { int result; @@ -748,7 +963,22 @@ void coco3_mmu_w(int offset, int data) int coco3_gime_r(int offset) { - return coco3_gimereg[offset]; + int result = 0; + + switch(offset) { + case 4: /* Timer MSB */ + result = coco3_timer_r() >> 8; + break; + + case 5: /* Timer LSB */ + result = coco3_timer_r() & 0xff; + break; + + default: + result = coco3_gimereg[offset]; + break; + } + return result; } void coco3_gime_w(int offset, int data) @@ -759,12 +989,12 @@ void coco3_gime_w(int offset, int data) switch(offset) { case 0: /* $FF90 Initialization register 0 - * ? Bit 7 COCO 1=CoCo compatible mode + * Bit 7 COCO 1=CoCo compatible mode * Bit 6 MMUEN 1=MMU enabled - * ! Bit 5 IEN 1 = GIME chip IRQ enabled - * ! Bit 4 FEN 1 = GIME chip FIRQ enabled + * Bit 5 IEN 1 = GIME chip IRQ enabled + * Bit 4 FEN 1 = GIME chip FIRQ enabled * Bit 3 MC3 1 = RAM at FEXX is constant - * ! Bit 2 MC2 1 = standard SCS (Spare Chip Select) + * Bit 2 MC2 1 = standard SCS (Spare Chip Select) * Bit 1 MC1 ROM map control * Bit 0 MC0 ROM map control */ @@ -775,7 +1005,7 @@ void coco3_gime_w(int offset, int data) case 1: /* $FF91 Initialization register 1Bit 7 Unused * Bit 6 Unused - * ! Bit 5 TINS Timer input select; 1 = 70 nsec, 0 = 63.5 usec + * Bit 5 TINS Timer input select; 1 = 70 nsec, 0 = 63.5 usec * Bit 4 Unused * Bit 3 Unused * Bit 2 Unused @@ -783,18 +1013,19 @@ void coco3_gime_w(int offset, int data) * Bit 0 TR Task register select */ coco3_mmu_update(0, 7); + coco3_timer_set_interval(data & 0x20 ? 1 : 0); break; case 2: /* $FF92 Interrupt request enable register * Bit 7 Unused * Bit 6 Unused - * ! Bit 5 TMR Timer interrupt - * ! Bit 4 HBORD Horizontal border interrupt - * ! Bit 3 VBORD Vertical border interrupt + * Bit 5 TMR Timer interrupt + * Bit 4 HBORD Horizontal border interrupt + * Bit 3 VBORD Vertical border interrupt * ! Bit 2 EI2 Serial data interrupt * ! Bit 1 EI1 Keyboard interrupt - * ! Bit 0 EI0 Cartridge interrupt + * Bit 0 EI0 Cartridge interrupt */ break; @@ -802,9 +1033,9 @@ void coco3_gime_w(int offset, int data) /* $FF93 Fast interrupt request enable register * Bit 7 Unused * Bit 6 Unused - * ! Bit 5 TMR Timer interrupt - * ! Bit 4 HBORD Horizontal border interrupt - * ! Bit 3 VBORD Vertical border interrupt + * Bit 5 TMR Timer interrupt + * Bit 4 HBORD Horizontal border interrupt + * Bit 3 VBORD Vertical border interrupt * ! Bit 2 EI2 Serial border interrupt * ! Bit 1 EI1 Keyboard interrupt * Bit 0 EI0 Cartridge interrupt @@ -814,14 +1045,16 @@ void coco3_gime_w(int offset, int data) case 4: /* $FF94 Timer register MSB * Bits 4-7 Unused - * ! Bits 0-3 High order four bits of the timer + * Bits 0-3 High order four bits of the timer */ + coco3_timer_msb_w(data); break; case 5: /* $FF95 Timer register LSB - * ! Bits 0-7 Low order eight bits of the timer + * Bits 0-7 Low order eight bits of the timer */ + coco3_timer_lsb_w(data); break; } } @@ -911,27 +1144,36 @@ static void d_pia0_pb_w(int offset, int data) pia0_pb = data; } +static void d_pia0_irq_a(int state) +{ + cpu_set_irq_line(0, M6809_IRQ_LINE, state); +} + static void d_pia0_irq_b(int state) { cpu_set_irq_line(0, M6809_IRQ_LINE, state); } -/*************************************************************************** - Machine Initialization -***************************************************************************/ +static void coco3_pia0_irq_a(int state) +{ + if (!(coco3_gimereg[0] & 0x20)) + d_pia0_irq_a(state); +} -void coco3_throw_interrupt(int mask) +static void coco3_pia0_irq_b(int state) { - if (coco3_gimereg[2] & mask) - cpu_set_irq_line(0, M6809_IRQ_LINE, ASSERT_LINE); - if (coco3_gimereg[3] & mask) - cpu_set_irq_line(0, M6809_FIRQ_LINE, ASSERT_LINE); + if (!(coco3_gimereg[0] & 0x20)) + d_pia0_irq_b(state); } -static void generic_init_machine(struct pia6821_interface *pia1intf) +/*************************************************************************** + Machine Initialization +***************************************************************************/ + +static void generic_init_machine(struct pia6821_interface *piaintf) { - pia_config(0, PIA_STANDARD_ORDERING | PIA_8BIT, &dragon_pia_0_intf); - pia_config(1, PIA_STANDARD_ORDERING | PIA_8BIT, pia1intf); + pia_config(0, PIA_STANDARD_ORDERING | PIA_8BIT, &piaintf[0]); + pia_config(1, PIA_STANDARD_ORDERING | PIA_8BIT, &piaintf[1]); pia_reset(); if (trailer_load) { @@ -942,7 +1184,7 @@ static void generic_init_machine(struct pia6821_interface *pia1intf) void dragon32_init_machine(void) { - generic_init_machine(&dragon_pia_1_intf); + generic_init_machine(dragon_pia_intf); coco_rom = memory_region(REGION_CPU1) + 0x8000; @@ -952,7 +1194,7 @@ void dragon32_init_machine(void) void coco_init_machine(void) { - generic_init_machine(&dragon_pia_1_intf); + generic_init_machine(dragon_pia_intf); coco_rom = memory_region(REGION_CPU1) + 0x10000; @@ -973,12 +1215,12 @@ void coco3_init_machine(void) { int i; - generic_init_machine(&coco3_pia_1_intf); + generic_init_machine(coco3_pia_intf); coco_rom = memory_region(REGION_CPU1) + 0x80000; if (cart_inserted) - coco3_throw_interrupt(1 << 0); + coco3_set_irq_line(COCO3_INT_EI0, ASSERT_LINE); coco3_enable_64k = 0; for (i = 0; i < 7; i++) { @@ -986,6 +1228,7 @@ void coco3_init_machine(void) coco3_gimereg[i] = 0; } coco3_mmu_update(0, 7); + coco3_timer_init(); } void dragon_stop_machine(void) @@ -1105,7 +1348,7 @@ static int coco_cassette_fill_wave(INT16 *buffer, int length, UINT8 *bytes) return p - buffer; } -static int generic_coco_cassette_init(int id, int pen0, int pen1) +int coco_cassette_init(int id) { void *file; @@ -1115,8 +1358,6 @@ static int generic_coco_cassette_init(int id, int pen0, int pen1) struct wave_args wa; memset(&wa, 0, sizeof(&wa)); wa.file = file; - //wa.pen0 = pen0; - //wa.pen1 = pen1; wa.chunk_size = 1; wa.chunk_samples = 8*4; /* 8 bits * 4 samples */ wa.smpfreq = 4800; /* cassette samples go at 4800 baud */ @@ -1131,17 +1372,20 @@ static int generic_coco_cassette_init(int id, int pen0, int pen1) return INIT_OK; } -int coco_cassette_init(int id) +void coco_cassette_exit(int id) { - return generic_coco_cassette_init(id, 0, 5); + device_close(IO_CASSETTE,id); } -int coco3_cassette_init(int id) +int coco3_floppy_r(int offset) { - return generic_coco_cassette_init(id, 8, 4); + extern int coco_floppy_r(int offset_c); + return ((coco3_gimereg[0] & 0x04) || (offset >= 0x10)) ? coco_floppy_r(offset) : 0; } -void coco_cassette_exit(int id) +void coco3_floppy_w(int offset, int data) { - device_close(IO_CASSETTE,id); + extern void coco_floppy_w(int offset_c, int data_c); + if ((coco3_gimereg[0] & 0x04) || (offset >= 0x10)) + coco_floppy_w(offset, data); } diff --git a/src/mess/machine/kc.c b/src/mess/machine/kc.c index 7adea0e68..73a43339c 100644 --- a/src/mess/machine/kc.c +++ b/src/mess/machine/kc.c @@ -625,5 +625,5 @@ static const struct IODevice io_kc85_4[] = /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 19??, kc85_4, 0, kc85_4, kc85_4, 0, "VEB Mikroelektronik", "KC 85/4") +COMPX( 19??, kc85_4, 0, kc85_4, kc85_4, 0, "VEB Mikroelektronik", "KC 85/4", GAME_NOT_WORKING) diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c index 6ce40c294..f8f89d7e1 100644 --- a/src/mess/machine/msx.c +++ b/src/mess/machine/msx.c @@ -61,7 +61,8 @@ int msx_load_rom (int id) "konami4 without SCC", "ASCII/8kB", "ASCII//16kB", "Konami Game Master 2", "ASCII/8kB with 8kB SRAM", "ASCII/16kB with 2kB SRAM", "R-Type", "Konami Majutsushi", - "Panasonic FM-PAC" }; + "Panasonic FM-PAC", "ASCII/16kB (bogus; use type 5)", + "Konami Synthesizer" }; /* try to load it */ F = image_fopen (IO_CARTSLOT, id, OSD_FILETYPE_IMAGE_R, 0); @@ -76,7 +77,6 @@ int msx_load_rom (int id) } /* get mapper type */ pext = (char *)device_extrainfo (IO_CARTSLOT, id); - fprintf (errorlog, "Cart %d extra info: %s\n", id, pext); if (!pext || (1 != sscanf (pext, "%d", &type) ) ) { if (errorlog) fprintf (errorlog, @@ -91,10 +91,12 @@ int msx_load_rom (int id) "Cart #%d Invalid extra info\n", id); type = -1; } + else if (errorlog) + fprintf (errorlog, "Cart %d extra info: %s\n", id, pext); } /* mapper type 0 always needs 64kB */ - if (!type || type == -1) + if (!type || type == -1) { size_aligned = 0x10000; if (size > 0x10000) size = 0x10000; @@ -144,7 +146,7 @@ int msx_load_rom (int id) id, size, msx1.cart[id].bank_mask, mapper_types[type]); /* set filename for sram (memcard) */ msx1.cart[id].sramfile = malloc (strlen (device_filename - (IO_CARTSLOT, id))); + (IO_CARTSLOT, id)) + 1); if (!msx1.cart[id].sramfile) { if (errorlog) fprintf (errorlog, "malloc () failed\n"); @@ -342,6 +344,7 @@ int msx_load_rom (int id) msx1.cart[id].banks[3] = (0x16000/0x2000); msx1.cart[id].mem = pmem; break; + case 5: /* ASCII 16kb */ case 12: /* Gall Force */ msx1.cart[id].banks[0] = 0; msx1.cart[id].banks[1] = 1; @@ -420,42 +423,42 @@ static void msx_vdp_interrupt(int i) { } void msx_ch_reset(void) { - int i; - - /* reset memory */ - ppi8255_0_w (0, 0); - ppi8255_0_w (2, 0xff); - /* reset leds */ - for (i=0;i<3;i++) osd_led_w (i, 0); -} - -void init_msx (void) { + TMS9928A_reset (); + SCCResetChip (0); /* set interrupt stuff */ - TMS9928A_int_callback(msx_vdp_interrupt); cpu_irq_line_vector_w(0,0,0xff); - /* setup PPI */ ppi8255_init (&msx_ppi8255_interface); /* initialize mem regions */ - msx1.empty = (UINT8*)malloc (0x4000); - msx1.ram = (UINT8*)malloc (0x10000); - if (!msx1.ram || !msx1.empty) + if (!msx1.empty || !msx1.ram) { - if (errorlog) fprintf (errorlog, "malloc () in init_msx () failed!\n"); - return; + msx1.empty = (UINT8*)malloc (0x4000); + msx1.ram = (UINT8*)malloc (0x10000); + if (!msx1.ram || !msx1.empty) + { + if (errorlog) + fprintf (errorlog, "malloc () in init_msx () failed!\n"); + return; + } + + memset (msx1.empty, 0xff, 0x4000); + memset (msx1.ram, 0, 0x10000); } - - memset (msx1.empty, 0xff, 0x4000); - memset (msx1.ram, 0, 0x10000); msx1.run = 1; return; } +void init_msx (void) +{ + /* this function is called at a very early stage, and not after a reset. */ + TMS9928A_int_callback(msx_vdp_interrupt); +} + void msx_ch_stop (void) { - free (msx1.empty); - free (msx1.ram); + free (msx1.empty); msx1.empty = NULL; + free (msx1.ram); msx1.ram = NULL; msx1.run = 0; } @@ -685,7 +688,6 @@ static void msx_cart_write (int cart, int offset, int data) switch (msx1.cart[cart].type) { case 0: - if (errorlog) fprintf (errorlog, "Synth: %04x = %02x\n", offset, data); break; case 1: /* MSX-DOS 2 cartridge */ if (offset == 0x2000) @@ -738,6 +740,7 @@ static void msx_cart_write (int cart, int offset, int data) cpu_setbank (3+(offset/0x800),msx1.cart[cart].mem + n * 0x2000); } break; + case 12: /* Gall Force */ case 5: /* ASCII 16kB */ if ( (offset & 0x6800) == 0x2000) { @@ -804,7 +807,6 @@ static void msx_cart_write (int cart, int offset, int data) (msx1.cart[cart].bank_mask+1)*0x2000] = data; } break; - case 12: /* Gall Force */ case 8: /* ASCII 16kB */ if ( (offset & 0x6800) == 0x2000) { diff --git a/src/mess/machine/riot.c b/src/mess/machine/riot.c index 6a96439d8..466b90628 100644 --- a/src/mess/machine/riot.c +++ b/src/mess/machine/riot.c @@ -25,7 +25,7 @@ struct RIOT { UINT8 ddrb; /* Data direction register B; 1 bits = output */ UINT8 irqen; /* IRQ enabled ? */ UINT8 state; /* current timer state (bit 7) */ - double clock; /* baseclock/1(,8,64,1024) */ + long double clock; /* baseclock/1(,8,64,1024) */ void *timer; /* timer callback */ double baseclock; /* copied from interface */ int (*port_a_r)(int chip); @@ -82,6 +82,7 @@ int riot_r(int chip, int offset) LOG((errorlog, "riot(%d) DDRB read : $%02x\n", chip, data)); break; case 0x4: case 0xc: /* Timer count read (not supported?) */ + LOG((errorlog, "riot(%d) TIMR read : $%02x%s\n", chip, data, (char*)((offset & 8) ? " (IRQ)":" "))); data = (int)(256 * timer_timeleft(riot[chip].timer) / TIME_IN_HZ(riot[chip].clock)); riot[chip].irqen = (offset & 8) ? 1 : 0; LOG((errorlog, "riot(%d) TIMR read : $%02x%s\n", chip, data, (char*)((offset & 8) ? " (IRQ)":" "))); diff --git a/src/mess/machine/tpi6525.c b/src/mess/machine/tpi6525.c index 2edce39f5..00dfe14e7 100644 --- a/src/mess/machine/tpi6525.c +++ b/src/mess/machine/tpi6525.c @@ -1,9 +1,11 @@ /*************************************************************************** mos tri port interface 6525 + mos triple interface adapter 6523 peter.trauner@jk.uni-linz.ac.at used in commodore b series + used in commodore c1551 floppy disk drive ***************************************************************************/ /* @@ -77,9 +79,11 @@ #include "tpi6525.h" -TPI6525 tpi6525[2]={ +TPI6525 tpi6525[4]={ { 0 }, - { 1 } + { 1 }, + { 2 }, + { 3 } }; #define INTERRUPT_MODE (this->cr&1) @@ -97,6 +101,9 @@ static void tpi6525_reset(TPI6525 *this) this->a.ddr=0;this->a.port=0; this->b.ddr=0;this->b.port=0; this->c.ddr=0;this->c.port=0; + this->a.in=0xff; + this->b.in=0xff; + this->c.in=0xff; this->interrupt.level= this->irq_level[0]= this->irq_level[1]= @@ -184,18 +191,63 @@ static void tpi6525_irq4_level(TPI6525 *this, int level) } } +static int tpi6525_port_a_r(TPI6525 *this, int offset) +{ + int data=this->a.in; + + if (this->a.read) data=this->a.read(); + data=(data&~this->a.ddr)|(this->a.ddr&this->a.port); + + return data; +} + +static void tpi6525_port_a_w(TPI6525 *this, int offset, int data) +{ + this->a.in=data; +} + +static int tpi6525_port_b_r(TPI6525 *this, int offset) +{ + int data=this->b.in; + + if (this->b.read) data=this->b.read(); + data=(data&~this->b.ddr)|(this->b.ddr&this->b.port); + + return data; +} + +static void tpi6525_port_b_w(TPI6525 *this, int offset, int data) +{ + this->b.in=data; +} + +static int tpi6525_port_c_r(TPI6525 *this, int offset) +{ + int data=this->c.in; + + if (this->c.read) data&=this->c.read(); + data=(data&~this->c.ddr)|(this->c.ddr&this->c.port); + + return data; +} + +static void tpi6525_port_c_w(TPI6525 *this, int offset, int data) +{ + this->c.in=data; +} + static int tpi6525_port_r(TPI6525 *this, int offset) { int data=0xff; switch (offset&7) { case 0: - if (this->a.read) data=this->a.read(); - else data=0xff; + data=this->a.in; + if (this->a.read) data&=this->a.read(); data=(data&~this->a.ddr)|(this->a.ddr&this->a.port); break; case 1: - if (this->b.read) data=this->b.read(); - else data=0xff; + data=this->b.in; + if (this->b.read) data&=this->b.read(); data=(data&~this->b.ddr)|(this->b.ddr&this->b.port); break; case 2: @@ -210,10 +262,12 @@ static int tpi6525_port_r(TPI6525 *this, int offset) if (this->ca.level) data|=0x40; if (this->cb.level) data|=0x80; } else { - if (this->c.read) data=this->c.read(); - else data=0xff; + data=this->c.in; + if (this->c.read) data&=this->c.read(); data=(data&~this->c.ddr)|(this->c.ddr&this->c.port); } + DBG_LOG (2, "tpi6525", + (errorlog, "%d read %.2x %.2x\n",this->number, offset,data)); break; case 3: data=this->a.ddr; @@ -259,7 +313,7 @@ static int tpi6525_port_r(TPI6525 *this, int offset) static void tpi6525_port_w(TPI6525 *this, int offset, int data) { - DBG_LOG (3, "tpi6525", + DBG_LOG (2, "tpi6525", (errorlog, "%d write %.2x %.2x\n",this->number, offset,data)); switch (offset&7) { @@ -333,6 +387,16 @@ void tpi6525_1_reset(void) tpi6525_reset(tpi6525+1); } +void tpi6525_2_reset(void) +{ + tpi6525_reset(tpi6525+2); +} + +void tpi6525_3_reset(void) +{ + tpi6525_reset(tpi6525+3); +} + void tpi6525_0_irq0_level(int level) { tpi6525_irq0_level(tpi6525, level); @@ -393,6 +457,16 @@ int tpi6525_1_port_r(int offset) return tpi6525_port_r(tpi6525+1, offset); } +int tpi6525_2_port_r(int offset) +{ + return tpi6525_port_r(tpi6525+2, offset); +} + +int tpi6525_3_port_r(int offset) +{ + return tpi6525_port_r(tpi6525+3, offset); +} + void tpi6525_0_port_w(int offset, int data) { tpi6525_port_w(tpi6525, offset, data); @@ -403,3 +477,133 @@ void tpi6525_1_port_w(int offset, int data) tpi6525_port_w(tpi6525+1, offset, data); } +void tpi6525_2_port_w(int offset, int data) +{ + tpi6525_port_w(tpi6525+2, offset, data); +} + +void tpi6525_3_port_w(int offset, int data) +{ + tpi6525_port_w(tpi6525+3, offset, data); +} + +int tpi6525_0_port_a_r(int offset) +{ + return tpi6525_port_a_r(tpi6525, offset); +} + +int tpi6525_1_port_a_r(int offset) +{ + return tpi6525_port_a_r(tpi6525+1, offset); +} + +int tpi6525_2_port_a_r(int offset) +{ + return tpi6525_port_a_r(tpi6525+2, offset); +} + +int tpi6525_3_port_a_r(int offset) +{ + return tpi6525_port_a_r(tpi6525+3, offset); +} + +void tpi6525_0_port_a_w(int offset, int data) +{ + tpi6525_port_a_w(tpi6525, offset, data); +} + +void tpi6525_1_port_a_w(int offset, int data) +{ + tpi6525_port_a_w(tpi6525+1, offset, data); +} + +void tpi6525_2_port_a_w(int offset, int data) +{ + tpi6525_port_a_w(tpi6525+2, offset, data); +} + +void tpi6525_3_port_a_w(int offset, int data) +{ + tpi6525_port_a_w(tpi6525+3, offset, data); +} + +int tpi6525_0_port_b_r(int offset) +{ + return tpi6525_port_b_r(tpi6525, offset); +} + +int tpi6525_1_port_b_r(int offset) +{ + return tpi6525_port_b_r(tpi6525+1, offset); +} + +int tpi6525_2_port_b_r(int offset) +{ + return tpi6525_port_b_r(tpi6525+2, offset); +} + +int tpi6525_3_port_b_r(int offset) +{ + return tpi6525_port_b_r(tpi6525+3, offset); +} + +void tpi6525_0_port_b_w(int offset, int data) +{ + tpi6525_port_b_w(tpi6525, offset, data); +} + +void tpi6525_1_port_b_w(int offset, int data) +{ + tpi6525_port_b_w(tpi6525+1, offset, data); +} + +void tpi6525_2_port_b_w(int offset, int data) +{ + tpi6525_port_b_w(tpi6525+2, offset, data); +} + +void tpi6525_3_port_b_w(int offset, int data) +{ + tpi6525_port_b_w(tpi6525+3, offset, data); +} + +int tpi6525_0_port_c_r(int offset) +{ + return tpi6525_port_c_r(tpi6525, offset); +} + +int tpi6525_1_port_c_r(int offset) +{ + return tpi6525_port_c_r(tpi6525+1, offset); +} + +int tpi6525_2_port_c_r(int offset) +{ + return tpi6525_port_c_r(tpi6525+2, offset); +} + +int tpi6525_3_port_c_r(int offset) +{ + return tpi6525_port_c_r(tpi6525+3, offset); +} + +void tpi6525_0_port_c_w(int offset, int data) +{ + tpi6525_port_c_w(tpi6525, offset, data); +} + +void tpi6525_1_port_c_w(int offset, int data) +{ + tpi6525_port_c_w(tpi6525+1, offset, data); +} + +void tpi6525_2_port_c_w(int offset, int data) +{ + tpi6525_port_c_w(tpi6525+2, offset, data); +} + +void tpi6525_3_port_c_w(int offset, int data) +{ + tpi6525_port_c_w(tpi6525+3, offset, data); +} + diff --git a/src/mess/machine/tpi6525.h b/src/mess/machine/tpi6525.h index 4472b5301..daec1e1da 100644 --- a/src/mess/machine/tpi6525.h +++ b/src/mess/machine/tpi6525.h @@ -1,20 +1,39 @@ /*************************************************************************** mos tri port interface 6525 + mos triple interface adapter 6523 peter.trauner@jk.uni-linz.ac.at used in commodore b series + used in commodore c1551 floppy disk drive ***************************************************************************/ #ifndef __TPI6525_H_ #define __TPI6525_H_ +/* tia6523 is a tpi6525 without control register!? */ + +/* + * tia6523 + * + * only some lines of port b and c are in the pinout ! + * + * connector to floppy c1551 (delivered with c1551 as c16 expansion) + * port a for data read/write + * port b + * 0 status 0 + * 1 status 1 + * port c + * 6 dav output edge data on port a available + * 7 ack input edge ready for next datum + */ + /* fill in the callback functions */ typedef struct { int number; struct { int (*read)(void); void (*output)(int data); - int port, ddr; + int port, ddr, in; } a,b,c; struct { @@ -28,10 +47,12 @@ typedef struct { int irq_level[5]; } TPI6525; -extern TPI6525 tpi6525[2]; +extern TPI6525 tpi6525[4]; void tpi6525_0_reset(void); void tpi6525_1_reset(void); +void tpi6525_2_reset(void); +void tpi6525_3_reset(void); void tpi6525_0_irq0_level(int level); void tpi6525_0_irq1_level(int level); @@ -47,8 +68,42 @@ void tpi6525_1_irq4_level(int level); int tpi6525_0_port_r(int offset); int tpi6525_1_port_r(int offset); +int tpi6525_2_port_r(int offset); +int tpi6525_3_port_r(int offset); void tpi6525_0_port_w(int offset, int data); void tpi6525_1_port_w(int offset, int data); +void tpi6525_2_port_w(int offset, int data); +void tpi6525_3_port_w(int offset, int data); + +int tpi6525_0_port_a_r(int offset); +int tpi6525_1_port_a_r(int offset); +int tpi6525_2_port_a_r(int offset); +int tpi6525_3_port_a_r(int offset); + +void tpi6525_0_port_a_w(int offset, int data); +void tpi6525_1_port_a_w(int offset, int data); +void tpi6525_2_port_a_w(int offset, int data); +void tpi6525_3_port_a_w(int offset, int data); + +int tpi6525_0_port_b_r(int offset); +int tpi6525_1_port_b_r(int offset); +int tpi6525_2_port_b_r(int offset); +int tpi6525_3_port_b_r(int offset); + +void tpi6525_0_port_b_w(int offset, int data); +void tpi6525_1_port_b_w(int offset, int data); +void tpi6525_2_port_b_w(int offset, int data); +void tpi6525_3_port_b_w(int offset, int data); + +int tpi6525_0_port_c_r(int offset); +int tpi6525_1_port_c_r(int offset); +int tpi6525_2_port_c_r(int offset); +int tpi6525_3_port_c_r(int offset); + +void tpi6525_0_port_c_w(int offset, int data); +void tpi6525_1_port_c_w(int offset, int data); +void tpi6525_2_port_c_w(int offset, int data); +void tpi6525_3_port_c_w(int offset, int data); #endif diff --git a/src/mess/machine/trs80.c b/src/mess/machine/trs80.c index 21b270bfa..64ed84592 100644 --- a/src/mess/machine/trs80.c +++ b/src/mess/machine/trs80.c @@ -28,9 +28,9 @@ static int trs80_load_cas = 0; #define IRQ_FDC 0x40 static UINT8 irq_status = 0; -#define MAX_LUMPS 192 // crude storage units - don't now much about it -#define MAX_GRANULES 8 // lumps consisted of granules.. aha -#define MAX_SECTORS 5 // and granules of sectors +#define MAX_LUMPS 192 /* crude storage units - don't now much about it */ +#define MAX_GRANULES 8 /* lumps consisted of granules.. aha */ +#define MAX_SECTORS 5 /* and granules of sectors */ /* this indicates whether the floppy images geometry shall be calculated */ static UINT8 first_fdc_access = 1; @@ -218,13 +218,13 @@ void trs80_floppy_exit(int id) void trs80_init_machine(void) { - if( floppy_name[0][0] ) + if( floppy_name[0] ) wd179x_init(1); else wd179x_init(0); first_fdc_access = 1; - if( tape_name[0] ) + if( tape_name ) { trs80_load_cas = 1; cpu_setOPbaseoverride(0, opbaseoverride); @@ -645,7 +645,7 @@ int result = irq_status; void trs80_irq_mask_w(int offset, int data) { -// irq_mask = data; +/* irq_mask = data; */ } void trs80_motor_w(int offset, int data) diff --git a/src/mess/machine/vc1541.c b/src/mess/machine/vc1541.c index c4a6280bd..1a31cfe8f 100644 --- a/src/mess/machine/vc1541.c +++ b/src/mess/machine/vc1541.c @@ -30,9 +30,12 @@ c1551 used with commodore c16 - m6510 processor, VIA6522, CIA6526, 2 KByte RAM, 16 KByte ROM + m6510t? processor (4 MHz???), + (m6510t internal 4mhz clock?, 8 port pins?) + VIA6522 ?, CIA6526 ?, + 2 KByte RAM, 16 KByte ROM connector commodore C16 expansion cartridge - IEEE488 protocoll + parallel protocoll 1750 single sided 1751 @@ -40,24 +43,71 @@ (also build in in c128d series) used with c128 (vic20,c16,c64 possible?) double sided - con read some other disk formats (mfm encoded?) + can read some other disk formats (mfm encoded?) modified commodore serial bus (with quick serial transmission) (m6510?, cia6526?) +0000-00FF Zero page work area, job queue, variables +0100-01FF GCR overflow area and stack (1571 mode BAM side 1) +0200-02FF Command buffer, parser, tables, variables +0300-07FF 5 data buffers, 0-4 one of which is used for BAM +1800-1BFF 65C22A, serial, controller ports +1C00-1FFF 65C22A, controller ports +8000-FFE5 32K byte ROM, DOS and controller routines +FFE6-FFFF JMP table, user command vectors 1581 3 1/2 inch, double sided, double density, 80 tracks used with c128 (vic20,c16,c64 possible?) only mfm encoding? - */ +0000-00FF Zero page work area, job queue, variables +0100-01FF Stack, variables, vectors +0200-02FF Command buffer, tables, variables +0300-09FF Data buffers (0-6) +0A00-0AFF BAM for tracks 0-39 +0B00-0BFF BAM for tracks 40-79 +0C00-1FFF Track cache buffer +4000-5FFF 8520A CIA +6000-7FFF WD177X FDC +8000-FEFF 32K byte ROM, DOS and controller routines +FF00-FFFF Jump table, vectors + + 2031/4031 + ieee488 interface + 1541 with ieee488 bus instead of serial bus + $1800 via6522 used for ieee488 interface? + maybe like in pet series? + port a data in/out? + port b ce port, ddr 31 + + 2040/3040 + ieee488 interface + 2 drives + + 2041 + ieee488 interface + + 4040 + ieee488 interface + 2 drives + sfd1001 + ieee488 interface + 5 1/4 inch high density + 2 heads + */ + +#include +#include "driver.h" #include "cpu/m6502/m6502.h" +#include "6522via.h" #define VERBOSE_DBG 1 #include "cbm.h" -#include "mess/machine/vc1541.h" -#include "mess/machine/6522via.h" -#include "driver.h" +#include "cbmdrive.h" +#include "tpi6525.h" + +#include "vc1541.h" /* * only for testing at the moment @@ -65,56 +115,201 @@ #define WRITEPROTECTED 0 +/* 0 summarized, 1 computer, 2 vc1541 */ +static struct +{ + int atn[3], data[3], clock[3]; +} +serial; + +/* G64 or D64 image + implementation as writeback system + */ +typedef struct +{ + int cpunumber; + enum { TypeVC1541, TypeC1551, Type2031 } type; + union { + struct { + int deviceid; + int serial_atn, serial_clock, serial_data; + int acka, data; + } serial; + struct { + int deviceid; + } ieee488; + struct { + UINT8 cpu_ddr, cpu_port; + void *timer; + } c1551; + } drive; + + int via0irq, via1irq; + + int led, motor, frequency; + + double track; + int clock; + + void *timer; + + struct { + UINT8 data[(1+2+2+1+256/4+4)*5]; + int sync; + int ready; + int ffcount; + } head; + + struct { + int pos; /* position in sector */ + int sector; + const char *name; + UINT8 *data; + } d64; +} CBM_Drive_Emu; + +CBM_Drive_Emu vc1541_static= { 0 }, *vc1541 = &vc1541_static; + +/* four different frequencies for the 4 different zones on the disk */ +static double vc1541_times[4]= { + 13/16e6, 14/16e6, 15/16e6, 16/16e6 +}; + /* * gcr encoding 4 bits to 5 bits * 1 change, 0 none * * physical encoding of the data on a track * sector header - * sync (5x 0xff not gcr encoded) - * sync mark (0x08) - * checksum - * sector# - * track# - * id2 (disk id to prevent writing to disk after disk change) - * id1 - * 0x0f - * 0x0f + * sync (5x 0xff not gcr encoded) + * sync mark (0x08) + * checksum (chksum xor sector xor track xor id1 xor id2 gives 0) + * sector# + * track# + * id2 (disk id to prevent writing to disk after disk change) + * id1 + * 0x0f + * 0x0f * cap normally 10 (min 5) byte? * sector data - * sync (5x 0xff not gcr encoded) - * sync mark (0x07) - * 256 bytes - * checksum + * sync (5x 0xff not gcr encoded) + * sync mark (0x07) + * 256 bytes + * checksum (256 bytes xored) * cap * * max 42 tracks, stepper resolution 84 tracks */ - -#if 0 -static int gcr[] = +static int bin_2_gcr[] = { 0xa, 0xb, 0x12, 0x13, 0xe, 0xf, 0x16, 0x17, 9, 0x19, 0x1a, 0x1b, 0xd, 0x1d, 0x1e, 0x15 }; + +#if 0 +static int gcr_2_bin[] = { + -1, -1, -1, -1, + -1, -1, -1, -1, + -1, 8, 0, 1, + -1, 0xc, 4, 5, + -1, -1, 2, 3, + -1, 0xf, 6, 7, + -1, 9, 0xa, 0xb, + -1, 0xd, 0xe, -1 +}; #endif -/* 0 summarized, 1 computer, 2 vc1541 */ -static struct +static void gcr_double_2_gcr(UINT8 a, UINT8 b, UINT8 c, UINT8 d, UINT8 *dest) { - int atn[3], data[3], clock[3]; + UINT8 gcr[8]; + gcr[0]=bin_2_gcr[a>>4]; + gcr[1]=bin_2_gcr[a&0xf]; + gcr[2]=bin_2_gcr[b>>4]; + gcr[3]=bin_2_gcr[b&0xf]; + gcr[4]=bin_2_gcr[c>>4]; + gcr[5]=bin_2_gcr[c&0xf]; + gcr[6]=bin_2_gcr[d>>4]; + gcr[7]=bin_2_gcr[d&0xf]; + dest[0]=(gcr[0]<<3)|(gcr[1]>>2); + dest[1]=(gcr[1]<<6)|(gcr[2]<<1)|(gcr[3]>>4); + dest[2]=(gcr[3]<<4)|(gcr[4]>>1); + dest[3]=(gcr[4]<<7)|(gcr[5]<<2)|(gcr[6]>>3); + dest[4]=(gcr[6]<<5)|gcr[7]; } -serial; -static struct +static struct { + int count; + int data[4]; +} gcr_helper; + +static void vc1541_sector_start(void) { - int cpunumber; - int via0irq, via1irq; - int deviceid; - int serial_atn, serial_clock, serial_data; - int led, motor, stepper, timer; + gcr_helper.count=0; +} + +static void vc1541_sector_data(UINT8 data, int *pos) +{ + gcr_helper.data[gcr_helper.count++]=data; + if (gcr_helper.count==4) { + gcr_double_2_gcr(gcr_helper.data[0], gcr_helper.data[1], + gcr_helper.data[2], gcr_helper.data[3], + vc1541->head.data+*pos); + *pos=*pos+5; + gcr_helper.count=0; + } +} + +static void vc1541_sector_end(int *pos) +{ + assert(gcr_helper.count==0); +} + +static void vc1541_sector_to_gcr(int track, int sector) +{ + int i=0, j, offset, chksum=0; + + if (vc1541->d64.data==NULL) return; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541_sector_start(); + + vc1541_sector_data(8, &i); + chksum= sector^track + ^vc1541->d64.data[D64_TRACK_ID1]^vc1541->d64.data[D64_TRACK_ID2]; + vc1541_sector_data(chksum, &i); + vc1541_sector_data(sector, &i); + vc1541_sector_data(track, &i); + vc1541_sector_data(vc1541->d64.data[D64_TRACK_ID1], &i); + vc1541_sector_data(vc1541->d64.data[D64_TRACK_ID2], &i); + vc1541_sector_data(0xf, &i); + vc1541_sector_data(0xf, &i); + vc1541_sector_end(&i); + + /* 5 - 10 gcr bytes cap */ + gcr_double_2_gcr(0, 0, 0, 0, vc1541->head.data+i);i+=5; + gcr_double_2_gcr(0, 0, 0, 0, vc1541->head.data+i);i+=5; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541->head.data[i++]=0xff; + vc1541_sector_data(0x7, &i); + + chksum=0; + for (offset=d64_tracksector2offset(track,sector), j=0; j<256; j++) { + chksum^=vc1541->d64.data[offset]; + vc1541_sector_data(vc1541->d64.data[offset++], &i); + } + vc1541_sector_data(chksum, &i); + vc1541_sector_data(0, &i); /* padding up */ + vc1541_sector_data(0, &i); + vc1541_sector_end(&i); + gcr_double_2_gcr(0, 0, 0, 0, vc1541->head.data+i);i+=5; + gcr_double_2_gcr(0, 0, 0, 0, vc1541->head.data+i);i+=5; } -vc1541_static, *vc1541 = &vc1541_static; struct MemoryReadAddress vc1541_readmem[] = { @@ -156,47 +351,54 @@ struct MemoryWriteAddress dolphin_writemem[] = {-1} /* end of table */ }; -struct MemoryReadAddress c1551_readmem[] = -{ -#if 0 - {0x0000, 0x0001, m6510_port_r}, -#endif - {0x0002, 0x07ff, MRA_RAM}, - {0x1800, 0x180f, via_2_r}, /* 0 and 1 used in vc20 */ - {0x1c00, 0x1c0f, via_3_r}, -#if 0 - {0x4000, 0x4007, tia6523_port_r}, -#endif - {0xc000, 0xffff, MRA_ROM}, - {-1} /* end of table */ -}; - -struct MemoryWriteAddress c1551_writemem[] = -{ -#if 0 - {0x0000, 0x0001, m6510_port_w}, -#endif - {0x0002, 0x07ff, MWA_RAM}, - {0x1800, 0x180f, via_2_w}, - {0x1c00, 0x1c0f, via_3_w}, -#if 0 - {0x4000, 0x4007, tia6523_port_w}, -#endif - {0xc000, 0xffff, MWA_ROM}, - {-1} /* end of table */ -}; - #if 0 INPUT_PORTS_START (vc1541) PORT_START PORT_DIPNAME (0x60, 0x00, "Device #", IP_KEY_NONE) PORT_DIPSETTING (0x00, "8") -PORT_DIPSETTING (0x40, "9") -PORT_DIPSETTING (0x20, "10") +PORT_DIPSETTING (0x20, "9") +PORT_DIPSETTING (0x40, "10") PORT_DIPSETTING (0x60, "11") INPUT_PORTS_END #endif +static void vc1541_timer(int param) +{ + if (vc1541->clock==0) { + vc1541->clock=1; + vc1541->head.ready=0; + vc1541->head.sync=0; + if (vc1541->type==TypeVC1541) { + cpu_set_irq_line(vc1541->cpunumber, M6502_SET_OVERFLOW, 1); + via_3_ca1_w(0,1); + } + return; + } + if (++(vc1541->d64.pos)>=sizeof(vc1541->head.data)) { + if (++(vc1541->d64.sector)>= + d64_sectors_per_track[(int)vc1541->track-1]) { + vc1541->d64.sector=0; + } + vc1541_sector_to_gcr(vc1541->track,vc1541->d64.sector); + vc1541->d64.pos=0; + } + vc1541->head.ready=1; + if (vc1541->head.data[vc1541->d64.pos]==0xff) { + vc1541->head.ffcount++; + if (vc1541->head.ffcount==5) { + vc1541->head.sync=1; + } + } else { + vc1541->head.ffcount=0; + vc1541->head.sync=0; + } + if (vc1541->type==TypeVC1541) { + cpu_set_irq_line(vc1541->cpunumber, M6502_SET_OVERFLOW, 0); + via_3_ca1_w(0,0); + } + vc1541->clock=0; +} + /* * via 6522 at 0x1800 * port b @@ -207,7 +409,7 @@ INPUT_PORTS_END * 4 inverted serial atn out * 5 input device id 1 * 6 input device id 2 - * id 1+id 2/0+0 devicenumber 8/0+1 9/1+0 10/1+1 11 + * id 2+id 1/0+0 devicenumber 8/0+1 9/1+0 10/1+1 11 * 7 inverted serial atn in * also ca1 (books says cb2) * irq to m6502 irq connected (or with second via irq) @@ -215,80 +417,110 @@ INPUT_PORTS_END static void vc1541_via0_irq (int level) { vc1541->via0irq = level; + DBG_LOG(2, "vc1541 via0 irq",(errorlog, "level %d %d\n",vc1541->via0irq,vc1541->via1irq)); cpu_set_irq_line (vc1541->cpunumber, M6502_INT_IRQ, vc1541->via1irq || vc1541->via0irq); } static int vc1541_via0_read_portb (int offset) { - int value = 0xff; - - if (!vc1541->serial_data && serial.data[0]) - value &= ~1; - if (!vc1541->serial_clock && serial.clock[0]) - value &= ~4; - if (serial.atn[0]) value &= ~0x80; + static int old=-1; + int value = 0x7a; - DBG_LOG(2, "vc1541 serial read",(errorlog, "%s %s %s\n", - serial.atn[0]?"ATN":"atn", - serial.clock[0]?"CLOCK":"clock", - serial.data[0]?"DATA":"data")); + if (!vc1541->drive.serial.serial_data || !serial.data[0]) + value |= 1; + if (!vc1541->drive.serial.serial_clock || !serial.clock[0]) + value |= 4; + if (!serial.atn[0]) value |= 0x80; - switch (vc1541->deviceid) + switch (vc1541->drive.serial.deviceid) { case 8: value &= ~0x60; break; case 9: - value &= ~0x20; + value &= ~0x40; break; case 10: - value &= ~0x40; + value &= ~0x20; break; case 11: break; } + if (value!=old) { + DBG_LOG(2, "vc1541 serial read",(errorlog, "%s %s %s\n", + serial.atn[0]?"ATN":"atn", + serial.clock[0]?"CLOCK":"clock", + serial.data[0]?"DATA":"data")); + + DBG_LOG(2, "vc1541 serial read",(errorlog, "%s %s %s\n", + value&0x80?"ATN":"atn", + value&4?"CLOCK":"clock", + value&1?"DATA":"data")); + old=value; + } return value; } +static void vc1541_acka(void) +{ + int value=vc1541->drive.serial.data; + if (vc1541->drive.serial.acka!=serial.atn[0]) { + value=0; + } + if (value!= vc1541->drive.serial.serial_data) + { + vc1541_serial_data_write (1, vc1541->drive.serial.serial_data = value ); + } +} + static void vc1541_via0_write_portb (int offset, int data) { - DBG_LOG(1, "vc1541 serial write",(errorlog, "%s %s %s\n", + DBG_LOG(2, "vc1541 serial write",(errorlog, "%s %s %s\n", data&0x10?"ATN":"atn", data&8?"CLOCK":"clock", data&2?"DATA":"data")); - if ((!(data & 2)) != vc1541->serial_data) - { - vc1541_serial_data_write (1, vc1541->serial_data = !(data & 2)); - } - if ((!(data & 8)) != vc1541->serial_clock) + vc1541->drive.serial.data=data&2?0:1; + vc1541->drive.serial.acka=(data&0x10)?1:0; +#if 0 + vc1541_acka(); +#else + if ((!(data & 2)) != vc1541->drive.serial.serial_data) { - vc1541_serial_clock_write (1, vc1541->serial_clock = !(data & 8)); + vc1541_serial_data_write (1, vc1541->drive.serial.serial_data = !(data & 2)); } - if ((!(data & 0x10)) != vc1541->serial_atn) +#endif + if ((!(data & 8)) != vc1541->drive.serial.serial_clock) { - vc1541_serial_atn_write (1, vc1541->serial_atn = !(data & 0x10)); + vc1541_serial_clock_write (1, vc1541->drive.serial.serial_clock = !(data & 8)); } + vc1541_serial_atn_write (1, vc1541->drive.serial.serial_atn = 1); } /* * via 6522 at 0x1c00 + * port a + byte in gcr format from or to floppy + * port b - * 0 output steppermotor for drive 1 (not connected) - * 1 output steppermotor (track) + * 0 output steppermotor + * 1 output steppermotor + 10: 00->01->10->11->00 move head to higher tracks * 2 output motor (rotation) (300 revolutions per minute) * 3 output led * 4 input disk not write protected * 5 timer adjustment * 6 timer adjustment * 4 different speed zones (track dependend) - * frequency select? - * 3 slowest - * 0 highest + frequency select? + 3 slowest + 0 highest * 7 input sync signal when reading from disk (more then 9 1 bits) - * ca1 byte ready + + * ca1 byte ready input (also m6502 set overflow input) + * ca2 set overflow enable for 6502 * ca3 read/write * @@ -297,25 +529,85 @@ static void vc1541_via0_write_portb (int offset, int data) static void vc1541_via1_irq (int level) { vc1541->via1irq = level; + DBG_LOG(2, "vc1541 via1 irq",(errorlog, "level %d %d\n",vc1541->via0irq,vc1541->via1irq)); cpu_set_irq_line (vc1541->cpunumber, M6502_INT_IRQ, vc1541->via1irq || vc1541->via0irq); } +static int vc1541_via1_read_porta (int offset) +{ + int data=vc1541->head.data[vc1541->d64.pos]; + DBG_LOG(2, "vc1541 drive",(errorlog, "port a read %.2x\n", data)); + return data; +} + +static void vc1541_via1_write_porta (int offset, int data) +{ + DBG_LOG(1, "vc1541 drive",(errorlog, "port a write %.2x\n", data)); +} + static int vc1541_via1_read_portb (int offset) { int value = 0xff; +#if 0 if (WRITEPROTECTED) value &= ~0x10; +#endif + if (vc1541->head.sync) { + value&=~0x80; + } + return value; } static void vc1541_via1_write_portb (int offset, int data) { + static int old=0; + if (data!=old) { + DBG_LOG(1, "vc1541 drive",(errorlog, "%.2x\n", data)); + if ((old&3)!=(data&3)) { + switch (old&3) { + case 0: + if ((data&3)==1) vc1541->track+=0.5; + else if ((data&3)==3) vc1541->track-=0.5; + break; + case 1: + if ((data&3)==2) vc1541->track+=0.5; + else if ((data&3)==0) vc1541->track-=0.5; + break; + case 2: + if ((data&3)==3) vc1541->track+=0.5; + else if ((data&3)==1) vc1541->track-=0.5; + break; + case 3: + if ((data&3)==0) vc1541->track+=0.5; + else if ((data&3)==2) vc1541->track-=0.5; + break; + } + if (vc1541->track<1) vc1541->track=1.0; + if (vc1541->track>35) vc1541->track=35; + } + if ( (vc1541->motor!=(data&4))||(vc1541->frequency!=(data&0x60)) ) { + double time; + vc1541->motor = data & 4; + vc1541->frequency = data & 0x60; + time=vc1541_times[vc1541->frequency>>5]*8*2; + if (vc1541->motor) { + if (vc1541->timer!=NULL) { + timer_reset(vc1541->timer, time); + } else { + vc1541->timer=timer_pulse(time, 0, vc1541_timer); + } + } else { + if (vc1541->timer!=NULL) + timer_remove(vc1541->timer); + vc1541->timer=NULL; + } + } + old=data; + } vc1541->led = data & 8; - vc1541->stepper = data & 2; - vc1541->motor = data & 4; - vc1541->timer = data & 0x60; } static struct via6522_interface via2 = @@ -333,50 +625,107 @@ static struct via6522_interface via2 = vc1541_via0_irq }, via3 = { - 0, /*via3_read_porta, */ + vc1541_via1_read_porta, vc1541_via1_read_portb, 0, /*via3_read_ca1, */ 0, /*via3_read_cb1, */ 0, /*via3_read_ca2, */ 0, /*via3_read_cb2, */ - 0, /*via3_write_porta, */ + vc1541_via1_write_porta, vc1541_via1_write_portb, 0, /*via3_write_ca2, */ 0, /*via3_write_cb2, */ vc1541_via1_irq }; -void vc1541_driver_init (int cpunumber) +int vc1541_init (int id) +{ + const char *imagename=device_filename(IO_FLOPPY, id); + FILE *in; + int size; + + //memset (&(drive->d64), 0, sizeof (drive->d64)); + in = image_fopen (IO_FLOPPY, id, OSD_FILETYPE_IMAGE_R, 0); + if (!in) + return INIT_FAILED; + + size = osd_fsize (in); + if (!(vc1541->d64.data = malloc (size))) + { + osd_fclose (in); + return 1; + } + if (size != osd_fread (in, vc1541->d64.data, size)) + { + free (vc1541->d64.data); + osd_fclose (in); + return 1; + } + osd_fclose (in); + + if (errorlog) + fprintf (errorlog, "floppy image %s loaded\n", imagename); + + //vc1541->drive = ; + vc1541->d64.name = imagename; + return 0; +} + +void vc1541_exit(int id) +{ + /* writeback of image data */ + free(vc1541->d64.data);vc1541->d64.data=NULL; +} + +int vc1541_config (int id, int mode, VC1541_CONFIG *config) { via_config (2, &via2); via_config (3, &via3); - vc1541->cpunumber = cpunumber; - vc1541->deviceid = 8; + vc1541->type=TypeVC1541; + vc1541->cpunumber = config->cpunr; + vc1541->drive.serial.deviceid = config->devicenr; + return 0; } -void vc1541_machine_init (void) +void vc1541_reset (void) { int i; - for (i = 0; i < sizeof (serial.atn) / sizeof (serial.atn[0]); i++) - { - serial.atn[i] = serial.data[i] = serial.clock[i] = 1; + if (vc1541->type==TypeVC1541) { + for (i = 0; i < sizeof (serial.atn) / sizeof (serial.atn[0]); i++) + { + serial.atn[i] = serial.data[i] = serial.clock[i] = 1; + } + } + vc1541->track=1.0; + if ((vc1541->type==TypeVC1541)||(vc1541->type==Type2031)) { + via_reset (); + } + if ((vc1541->type==TypeC1551)) { + tpi6525_0_reset(); } - via_reset (); } /* delivers status for displaying */ extern void vc1541_drive_status (char *text, int size) { -#if VERBOSE_DBG - snprintf (text, size, "%s %s %s %.2x %s %s %s", - vc1541->led ? "LED" : "led", - vc1541->stepper ? "STEPPER" : "stepper", - vc1541->motor ? "MOTOR" : "motor", - vc1541->timer, - serial.atn[0]?"ATN":"atn", - serial.clock[0]?"CLOCK":"clock", - serial.data[0]?"DATA":"data"); +#if 1||VERBOSE_DBG + if (vc1541->type==TypeVC1541) { + snprintf (text, size, "%s %4.1f %s %.2x %s %s %s", + vc1541->led ? "LED" : "led", + vc1541->track, + vc1541->motor ? "MOTOR" : "motor", + vc1541->frequency, + serial.atn[0]?"ATN":"atn", + serial.clock[0]?"CLOCK":"clock", + serial.data[0]?"DATA":"data"); + } else if (vc1541->type==TypeC1551) { + snprintf (text, size, "%s %4.1f %s %.2x", + vc1541->led ? "LED" : "led", + vc1541->track, + vc1541->motor ? "MOTOR" : "motor", + vc1541->frequency); + } #else text[0] = 0; #endif @@ -389,24 +738,43 @@ void vc1541_serial_reset_write (int which, int level) int vc1541_serial_atn_read (int which) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif return serial.atn[0]; } void vc1541_serial_atn_write (int which, int level) { +#if 0 + int value; +#endif if (serial.atn[1 + which] != level) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif serial.atn[1 + which] = level; if (serial.atn[0] != level) { serial.atn[0] = serial.atn[1] && serial.atn[2]; if (serial.atn[0] == level) { - DBG_LOG(1, "vc1541",(errorlog, "%d atn %s\n", + DBG_LOG(1, "vc1541",(errorlog, "%d:%.4x atn %s\n", cpu_getactivecpu (), + cpu_get_pc(), serial.atn[0]?"ATN":"atn")); via_set_input_ca1 (2, !level); - cpu_yield (); +#if 0 + value=vc1541->drive.serial.data; + if (vc1541->drive.serial.acka!=!level) value=0; + if (value!=serial.data[2]) { + serial.data[2]=value; + if (serial.data[0]!=value) { + serial.data[0]=serial.data[1] && serial.data[2]; + } + } +#endif } } } @@ -414,6 +782,9 @@ void vc1541_serial_atn_write (int which, int level) int vc1541_serial_data_read (int which) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif return serial.data[0]; } @@ -421,16 +792,19 @@ void vc1541_serial_data_write (int which, int level) { if (serial.data[1 + which] != level) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif serial.data[1 + which] = level; if (serial.data[0] != level) { serial.data[0] = serial.data[1] && serial.data[2]; if (serial.data[0] == level) { - DBG_LOG(1, "vc1541",(errorlog, "%d data %s\n", + DBG_LOG(1, "vc1541",(errorlog, "%d:%.4x data %s\n", cpu_getactivecpu (), + cpu_get_pc(), serial.data[0]?"DATA":"data")); - cpu_yield (); } } } @@ -438,6 +812,9 @@ void vc1541_serial_data_write (int which, int level) int vc1541_serial_clock_read (int which) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif return serial.clock[0]; } @@ -445,16 +822,19 @@ void vc1541_serial_clock_write (int which, int level) { if (serial.clock[1 + which] != level) { +#ifdef CPU_SYNC + if (cpu_getactivecpu()==0) cpu_sync(); +#endif serial.clock[1 + which] = level; if (serial.clock[0] != level) { serial.clock[0] = serial.clock[1] && serial.clock[2]; if (serial.clock[0] == level) { - DBG_LOG(1, "vc1541",(errorlog, "%d clock %s\n", + DBG_LOG(1, "vc1541",(errorlog, "%d:%.4x clock %s\n", cpu_getactivecpu (), + cpu_get_pc(), serial.clock[0]?"CLOCK":"clock")); - cpu_yield (); } } } @@ -467,5 +847,247 @@ int vc1541_serial_request_read (int which) void vc1541_serial_request_write (int which, int level) { +} + +/* + c1551 irq line + only timing related??? (60 hz?), delivered from c16? + */ +static void c1551_timer(int param) +{ + cpu_set_irq_line(vc1541->cpunumber, M6502_INT_IRQ, PULSE_LINE); +} + +/* + ddr 0x6f (p0 .. p5? in pinout) + 0,1: output stepper motor + 2 output motor (rotation) (300 revolutions per minute) + 3 output led ? + 4 input disk not write protected ? + 5,6: output frequency select + 7: input byte ready + */ +static void c1551_port_w(int offset, int data) +{ + static int old=0; + if (offset) { + DBG_LOG(1, "c1551 port",(errorlog, "write %.2x\n",data)); + vc1541->drive.c1551.cpu_port=data; + + if (data!=old) { + DBG_LOG(1, "vc1541 drive",(errorlog, "%.2x\n", data)); + if ((old&3)!=(data&3)) { + switch (old&3) { + case 0: + if ((data&3)==1) vc1541->track+=0.5; + else if ((data&3)==3) vc1541->track-=0.5; + break; + case 1: + if ((data&3)==2) vc1541->track+=0.5; + else if ((data&3)==0) vc1541->track-=0.5; + break; + case 2: + if ((data&3)==3) vc1541->track+=0.5; + else if ((data&3)==1) vc1541->track-=0.5; + break; + case 3: + if ((data&3)==0) vc1541->track+=0.5; + else if ((data&3)==2) vc1541->track-=0.5; + break; + } + if (vc1541->track<1) vc1541->track=1.0; + if (vc1541->track>35) vc1541->track=35; + } + if ( (vc1541->motor!=(data&4))||(vc1541->frequency!=(data&0x60)) ) { + double time; + vc1541->motor = data & 4; + vc1541->frequency = data & 0x60; + time=vc1541_times[vc1541->frequency>>5]*8*2; + if (vc1541->motor) { + if (vc1541->timer!=NULL) { + timer_reset(vc1541->timer, time); + } else { + vc1541->timer=timer_pulse(time, 0, vc1541_timer); + } + } else { + if (vc1541->timer!=NULL) + timer_remove(vc1541->timer); + vc1541->timer=NULL; + } + } + old=data; + } + vc1541->led = data & 8; + } else { + vc1541->drive.c1551.cpu_ddr=data; + DBG_LOG(1, "c1551 ddr",(errorlog, "write %.2x\n",data)); + } +} + +static int c1551_port_r(int offset) +{ + int data; + + if (offset) { + data=0x7f; +#if 0 + if (WRITEPROTECTED) + data &= ~0x10; +#endif + if (vc1541->head.ready) { + data|=0x80; + vc1541->head.ready=0; + } + data&=~vc1541->drive.c1551.cpu_ddr; + data|=vc1541->drive.c1551.cpu_ddr&vc1541->drive.c1551.cpu_port; + DBG_LOG(3, "c1551 port",(errorlog, "read %.2x\n", data)); + } else { + data=vc1541->drive.c1551.cpu_ddr; + DBG_LOG(3, "c1551 ddr",(errorlog, "read %.2x\n", data)); + } + return data; +} + +/* + tia6523 + port a + c16 communication in/out + port b + drive data in/out + port c ddr (0x1f) + 0 output status out + 1 output status out + 2 output + 3 output handshake out + 4 output + 5 input drive number 9 + 6 input sync 0 active + 7 input handshake in + */ +static int c1551_port_c_r(void) +{ + int data=0xff; + data&=~0x20; + if (vc1541->head.sync) data&=~0x40; + return data; +} + +static int c1551_port_b_r (void) +{ + int data=vc1541->head.data[vc1541->d64.pos]; + DBG_LOG(2, "c1551 drive",(errorlog, "port a read %.2x\n", data)); + return data; +} + +int c1551_config (int id, int mode, C1551_CONFIG *config) +{ + vc1541->cpunumber = config->cpunr; + vc1541->type=TypeC1551; + tpi6525[0].c.read=c1551_port_c_r; + tpi6525[0].b.read=c1551_port_b_r; + if (vc1541->drive.c1551.timer==NULL) { + /* time should be small enough to allow quitting of the irq + line before the next interrupt is triggered */ + vc1541->drive.c1551.timer=timer_pulse(1.0/60, 0, c1551_timer); + } + return 0; +} + +struct MemoryReadAddress c1551_readmem[] = +{ + {0x0000, 0x0001, c1551_port_r}, + {0x0002, 0x07ff, MRA_RAM}, + {0x4000, 0x4007, tpi6525_0_port_r}, + {0xc000, 0xffff, MRA_ROM}, + {-1} /* end of table */ +}; + +struct MemoryWriteAddress c1551_writemem[] = +{ + {0x0000, 0x0001, c1551_port_w}, + {0x0002, 0x07ff, MWA_RAM}, + {0x4000, 0x4007, tpi6525_0_port_w}, + {0xc000, 0xffff, MWA_ROM}, + {-1} /* end of table */ +}; + +void c1551x_write_data (TPI6525 *this, int data) +{ + DBG_LOG(1, "c1551 cpu",(errorlog, "%d write data %.2x\n", + cpu_getactivecpu (), data)); +#ifdef CPU_SYNC + cpu_sync(); +#endif + tpi6525_0_port_a_w(0,data); +} + +int c1551x_read_data (TPI6525 *this) +{ + int data=0xff; +#ifdef CPU_SYNC + cpu_sync (); +#endif + data=tpi6525_0_port_a_r(0); + DBG_LOG(2, "c1551 cpu",(errorlog, "%d read data %.2x\n", + cpu_getactivecpu (), data)); + return data; +} + +void c1551x_write_handshake (TPI6525 *this, int data) +{ + DBG_LOG(1, "c1551 cpu",(errorlog, "%d write handshake %.2x\n", + cpu_getactivecpu (), data)); +#ifdef CPU_SYNC + cpu_sync(); +#endif + tpi6525_0_port_c_w(0,data&0x40?0xff:0x7f); +} + +int c1551x_read_handshake (TPI6525 *this) +{ + int data=0xff; +#ifdef CPU_SYNC + cpu_sync(); +#endif + data=tpi6525_0_port_c_r(0)&8?0x80:0; + DBG_LOG(2, "c1551 cpu",(errorlog, "%d read handshake %.2x\n", + cpu_getactivecpu (), data)); + return data; +} + +int c1551x_read_status (TPI6525 *this) +{ + int data=0xff; +#ifdef CPU_SYNC + cpu_sync(); +#endif + data=tpi6525_0_port_c_r(0)&3; + DBG_LOG(1, "c1551 cpu",(errorlog, "%d read status %.2x\n", + cpu_getactivecpu (), data)); + return data; +} + +void c1551x_0_write_data (int data) +{ + c1551x_write_data(tpi6525, data); +} + +int c1551x_0_read_data (void) +{ + return c1551x_read_data(tpi6525); +} +void c1551x_0_write_handshake (int data) +{ + c1551x_write_handshake(tpi6525, data); +} + +int c1551x_0_read_handshake (void) +{ + return c1551x_read_handshake(tpi6525); +} + +int c1551x_0_read_status (void) +{ + return c1551x_read_status(tpi6525); } diff --git a/src/mess/machine/vc1541.h b/src/mess/machine/vc1541.h index 56294dd28..c0a5bb9fa 100644 --- a/src/mess/machine/vc1541.h +++ b/src/mess/machine/vc1541.h @@ -6,8 +6,11 @@ #include "mess/machine/6522via.h" #include "driver.h" +#ifdef PET_TEST_CODE /* test with preliminary VC1541 emulation */ -//#define VC1541 +#define VC1541 +//#define CPU_SYNC +#endif extern struct MemoryReadAddress vc1541_readmem[]; extern struct MemoryWriteAddress vc1541_writemem[]; @@ -18,7 +21,88 @@ extern struct MemoryWriteAddress dolphin_writemem[]; extern struct MemoryReadAddress c1551_readmem[]; extern struct MemoryWriteAddress c1551_writemem[]; -#define VC1541_CPU \ +typedef struct { + int cpunr; + int devicenr; +} VC1541_CONFIG; + +int vc1541_init(int id); +void vc1541_exit(int id); + +int vc1541_config(int id, int mode, VC1541_CONFIG*config); +void vc1541_reset(void); +void vc1541_drive_status(char *text, int size); + +typedef struct { + int cpunr; +} C1551_CONFIG; + +int c1551_config(int id, int mode, C1551_CONFIG*config); +#define c1551_reset vc1541_reset + +#define IODEVICE_VC1541 \ +{\ + IO_FLOPPY, /* type */\ + 1, /* count */\ + "d64\0", /* G64 later *//*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + vc1541_init, /* init */\ + vc1541_exit, /* exit */\ + NULL, /* info */\ + (int(*)(int,int,void*))vc1541_config, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + +#define IODEVICE_C2031 IODEVICE_VC1541 + +#define IODEVICE_C1551 \ +{\ + IO_FLOPPY, /* type */\ + 1, /* count */\ + "d64\0", /* G64 later *//*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + vc1541_init, /* init */\ + vc1541_exit, /* exit */\ + NULL, /* info */\ + (int(*)(int,int,void*))c1551_config, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + +#define IODEVICE_C1571 \ +{\ + IO_FLOPPY, /* type */\ + 1, /* count */\ + "d64\0", /* G64 later *//*file extensions */\ + NULL, /* private */\ + NULL, /* id */\ + vc1541_init, /* init */\ + vc1541_exit, /* exit */\ + NULL, /* info */\ + (int(*)(int,int,void*))vc1541_config, /* open */\ + NULL, /* close */\ + NULL, /* status */\ + NULL, /* seek */\ + NULL, /* input */\ + NULL, /* output */\ + NULL, /* input_chunk */\ + NULL /* output_chunk */\ +} + +#define VC1540_CPU \ {\ CPU_M6502,\ 1000000,\ @@ -27,7 +111,8 @@ extern struct MemoryWriteAddress c1551_writemem[]; 0,0,\ } -#define VC1540_CPU VC1541_CPU +#define VC1541_CPU VC1540_CPU +#define C2031_CPU VC1540_CPU #define DOLPHIN_CPU \ {\ @@ -41,21 +126,36 @@ extern struct MemoryWriteAddress c1551_writemem[]; #define C1551_CPU \ {\ CPU_M6510,\ - 1000000,\ + 2000000,/* ??? reading seems to need more than 1 mhz */\ c1551_readmem,c1551_writemem,\ 0,0,\ 0,0,\ } +/* will follow later */ +#define C1571_CPU VC1541_CPU + #define VC1540_ROM(cpu) \ ROM_REGION(0x10000,cpu) \ ROM_LOAD("325302.01", 0xc000, 0x2000, 0x29ae9752) \ ROM_LOAD("325303.01", 0xe000, 0x2000, 0x10b39158) +#define C2031_ROM(cpu) \ + ROM_REGION(0x10000,cpu) \ + ROM_LOAD("dos2031", 0xc000, 0x4000, 0x21b80fdf) + +#if 1 #define VC1541_ROM(cpu) \ ROM_REGION(0x10000,cpu) \ ROM_LOAD("325302.01", 0xc000, 0x2000, 0x29ae9752) \ ROM_LOAD("901229.05", 0xe000, 0x2000, 0x361c9f37) +#else +/* for this I have the documented rom listing in german */ +#define VC1541_ROM(cpu) \ + ROM_REGION(0x10000,cpu) \ + ROM_LOAD("325302.01", 0xc000, 0x2000, 0x29ae9752) \ + ROM_LOAD("901229.03", 0xe000, 0x2000, 0x9126e74a) +#endif #define DOLPHIN_ROM(cpu) \ ROM_REGION(0x10000,cpu) \ @@ -63,9 +163,28 @@ extern struct MemoryWriteAddress c1551_writemem[]; #define C1551_ROM(cpu) \ ROM_REGION(0x10000,cpu) \ - ROM_LOAD("1551.318008-01.bin", 0xc000, 0x4000, 0x6d16d024) + ROM_LOAD("318008.01", 0xc000, 0x4000, 0x6d16d024) + +#define C1570_ROM(cpu) \ + ROM_REGION(0x10000,cpu) \ + ROM_LOAD("315090.01", 0x8000, 0x8000, 0x5a0c7937) + +#define C1571_ROM(cpu) \ + ROM_REGION(0x10000,cpu) \ + ROM_LOAD("310654.03", 0x8000, 0x8000, 0x3889b8b8) #if 0 + ROM_LOAD("dos2040", 0x?000, 0x2000, 0xd04c1fbb) + + ROM_LOAD("dos3040", 0x?000, 0x3000, 0xf4967a7f) + + ROM_LOAD("dos4040", 0x?000, 0x3000, 0x40e0ebaa) + + ROM_LOAD("dos1001", 0xc000, 0x4000, 0x87e6a94e) + + /* vc1541 drive hardware */ + ROM_LOAD("dos2031", 0xc000, 0x4000, 0x21b80fdf) + ROM_LOAD("1540-c000.325302-01.bin", 0xc000, 0x2000, 0x29ae9752) ROM_LOAD("1540-e000.325303-01.bin", 0xe000, 0x2000, 0x10b39158) @@ -79,7 +198,6 @@ extern struct MemoryWriteAddress c1551_writemem[]; ROM_LOAD("1541C.251968-01.bin", 0xc000, 0x4000, 0x1b3ca08d) ROM_LOAD("1541C.251968-02.bin", 0xc000, 0x4000, 0x2d862d20) - ROM_LOAD("dos1541.c0", 0xc000, 0x2000, 0x5b84bcef) ROM_LOAD("dos1541.e0", 0xe000, 0x2000, 0x2d8c1fde) /* merged gives 0x899fa3c5 */ @@ -87,13 +205,30 @@ extern struct MemoryWriteAddress c1551_writemem[]; /* 0x29ae9752 and 0x361c9f37 merged */ ROM_LOAD("vc1541", 0xc000, 0x4000, 0x57224cde) + /* 0x29ae9752 and 0xb29bab75 merged */ + ROM_LOAD("vc1541", 0xc000, 0x4000, 0xd3a5789c) + + /* dolphin vc1541 */ + ROM_LOAD("c1541.rom", 0xa000, 0x6000, 0xbd8e42b2) + + ROM_LOAD("1551.318008-01.bin", 0xc000, 0x4000, 0x6d16d024) + + /* bug fixes introduced bugs for 1541 mode + jiffydos to have fixed 1571 and working 1541 mode */ + ROM_LOAD("1570-rom.315090-01.bin", 0x8000, 0x8000, 0x5a0c7937) + ROM_LOAD("1571-rom.310654-03.bin", 0x8000, 0x8000, 0x3889b8b8) + ROM_LOAD("1571-rom.310654-05.bin", 0x8000, 0x8000, 0x5755bae3) + ROM_LOAD("1571cr-rom.318047-01.bin", 0x8000, 0x8000, 0xf24efcc4) + + ROM_LOAD("1581-rom.318045-01.bin", 0x8000, 0x8000, 0x113af078) + ROM_LOAD("1581-rom.318045-02.bin", 0x8000, 0x8000, 0xa9011b84) + ROM_LOAD("1581-rom.beta.bin", 0x8000, 0x8000, 0xecc223cd) + /* modified drive 0x2000-0x3ffe ram, 0x3fff 6529 */ + ROM_LOAD("1581rom5.bin", 0x8000, 0x8000, 0xe08801d7) + ROM_LOAD("", 0xc000, 0x4000, 0x) #endif -void vc1541_driver_init(int cpunumber); -void vc1541_machine_init(void); -void vc1541_drive_status(char *text, int size); - /* serial bus vc20/c64/c16/vc1541 and some printer */ #ifdef VC1541 @@ -117,3 +252,10 @@ int vc1541_serial_clock_read(int which); void vc1541_serial_clock_write(int which,int level); int vc1541_serial_request_read(int which); void vc1541_serial_request_write(int which,int level); + +void c1551x_0_write_data (int data); +int c1551x_0_read_data (void); +void c1551x_0_write_handshake (int data); +int c1551x_0_read_handshake (void); +int c1551x_0_read_status (void); + diff --git a/src/mess/machine/vc20.c b/src/mess/machine/vc20.c index b7f1e8ec8..7fc7c7bb2 100644 --- a/src/mess/machine/vc20.c +++ b/src/mess/machine/vc20.c @@ -1,5 +1,12 @@ /*************************************************************************** + commodore vic20 home computer + Peter Trauner + (peter.trauner@jk.uni-linz.ac.at) + + documentation + Marko.Makela@HUT.FI (vic6560) + www.funet.fi ***************************************************************************/ #include @@ -253,6 +260,9 @@ static void vc20_memory_init(void) static void vc20_common_driver_init (void) { +#ifdef VC1541 + VC1541_CONFIG vc1541= { 1, 8 }; +#endif vc20_memory_init(); vc20_tape_open (via_1_ca1_w); @@ -263,7 +273,7 @@ static void vc20_common_driver_init (void) cbm_drive_attach_fs (1); #ifdef VC1541 - vc1541_driver_init (); + vc1541_config (0, 0, &vc1541); #endif via_config (0, &via0); via_config (1, &via1); @@ -343,7 +353,7 @@ void vc20_init_machine (void) cbm_serial_reset_write (0); #ifdef VC1541 - vc1541_machine_init (); + vc1541_reset (); #endif cbm_drive_0_config (SERIAL8ON ? SERIAL : 0); cbm_drive_1_config (SERIAL9ON ? SERIAL : 0); diff --git a/src/mess/machine/vc20tape.c b/src/mess/machine/vc20tape.c index 4033da110..429d09343 100644 --- a/src/mess/machine/vc20tape.c +++ b/src/mess/machine/vc20tape.c @@ -85,6 +85,7 @@ prg; /* these are values for zip files */ struct { + const char *imagename; int state; ZIP *zip; struct zipent *zipentry; @@ -457,6 +458,7 @@ static void vc20_prg_open (const char *name) for (; i < 16; i++) prg.name[i] = ' '; + prg.imagename=name; prg.stateblock = 0; prg.stateheader = 0; prg.statebyte = 0; @@ -1051,6 +1053,7 @@ static void vc20_zip_open (const char *name) tape.type = TAPE_ZIP; tape.on = 1; + zip.imagename=name; zip.state = 2; prg.stateblock = 0; prg.stateheader = 0; @@ -1335,7 +1338,7 @@ void vc20_tape_status (char *text, int size) snprintf (text, size, "Tape saving"); break; case 3: - snprintf (text, size, "Tape (%s) loading %d", prg.imagename, prg.pos); + snprintf (text, size, "Tape (%s) File %s loading %d", zip.imagename, zip.zipentry->name, prg.pos); break; } break; diff --git a/src/mess/mess.c b/src/mess/mess.c index 6ab98a82a..51ecf2100 100644 --- a/src/mess/mess.c +++ b/src/mess/mess.c @@ -11,9 +11,10 @@ extern struct GameOptions options; /* CRC database file for this driver, supplied by the OS specific code */ extern const char *crcfile; +extern const char *pcrcfile; /* used to tell updatescreen() to clear the bitmap */ -extern int need_to_clear_bitmap; +extern int need_to_clear_bitmap; struct image_info { char *name; @@ -36,7 +37,20 @@ static const char *typename[IO_COUNT] = { "Cassette ", "Printer ", "Serial ", - "Snapshot " + "Snapshot ", + "Quickload " +}; + +static const char *brieftypename[IO_COUNT] = { + "NONE", + "Cart", + "Flop", + "Hard", + "Cass", + "Prin", + "Serl", + "Snap", + "Quik" }; static char *mess_alpha = ""; @@ -106,6 +120,8 @@ int DECL_SPEC mess_printf(char *fmt, ...) return length; } +static int read_crc_config (const char *, struct image_info *, const char*); + void *image_fopen(int type, int id, int filetype, int read_or_write) { struct image_info *img = &images[type][id]; @@ -204,30 +220,45 @@ void *image_fopen(int type, int id, int filetype, int read_or_write) } free_image_info(img); - config = config_open(crcfile); - if( config ) - { - static char line[1024]; - char crc[9+1]; + if (read_crc_config (crcfile, img, sysname) && Machine->gamedrv->clone_of->name) + read_crc_config (pcrcfile, img, Machine->gamedrv->clone_of->name); - sprintf(crc, "%08x", img->crc); - config_load_string(config,sysname,0,crc,line,sizeof(line)); - if( line[0] ) - { - if( errorlog ) fprintf(errorlog, "found CRC %s= %s\n", crc, line); - img->longname = dupe(stripspace(strtok(line, "|"))); - img->manufacturer = dupe(stripspace(strtok(NULL, "|"))); - img->year = dupe(stripspace(strtok(NULL, "|"))); - img->playable = dupe(stripspace(strtok(NULL, "|"))); - img->extrainfo = dupe(stripspace(strtok(NULL, "|"))); - } - config_close(config); - } + config = config_open(crcfile); } return file; } + +static int read_crc_config (const char *file, struct image_info *img, const char* sysname) +{ + int retval; + void *config = config_open (file); + + retval = 1; + if( config ) + { + char line[1024]; + char crc[9+1]; + + sprintf(crc, "%08x", img->crc); + config_load_string(config,sysname,0,crc,line,sizeof(line)); + if( line[0] ) + { + if( errorlog ) fprintf(errorlog, "found CRC %s= %s\n", crc, line); + img->longname = dupe(stripspace(strtok(line, "|"))); + img->manufacturer = dupe(stripspace(strtok(NULL, "|"))); + img->year = dupe(stripspace(strtok(NULL, "|"))); + img->playable = dupe(stripspace(strtok(NULL, "|"))); + img->extrainfo = dupe(stripspace(strtok(NULL, "|"))); + retval = 0; + } + config_close(config); + } + return retval; +} + + /* * Return a name for the device type (to be used for UI functions) */ @@ -238,6 +269,20 @@ const char *device_typename(int type) return "UNKNOWN"; } +const char *briefdevice_typename(int type) +{ + if (type < IO_COUNT) + return brieftypename[type]; + return "UNKNOWN"; +} + +const char *device_brieftypename(int type) +{ + if (type < IO_COUNT) + return brieftypename[type]; + return "UNKNOWN"; +} + /* Return a name for a device of type 'type' with id 'id' */ const char *device_typename_id(int type, int id) { @@ -823,11 +868,16 @@ void showmessinfo(void) build_version, mess_alpha); showmessdisclaimer(); mess_printf( - "Usage: MESS machine [image] [options]\n\n" - " MESS -list for a brief list of supported systems\n" - " MESS -listfull for a full list of supported systems\n" - "See mess.txt for a complete list of options.\n"); + "Usage: MESS \n\n" + " MESS -list for a brief list of supported systems\n" + " MESS -listfull for a full list of supported systems\n" + " MESS -listdevices for a full list of supported devices\n" + "See mess.txt for help, readme.txt for options.\n"); } + + + + diff --git a/src/mess/mess.h b/src/mess/mess.h index 5c62879e4..350df18f2 100644 --- a/src/mess/mess.h +++ b/src/mess/mess.h @@ -161,6 +161,7 @@ enum { IO_PRINTER, IO_SERIAL, IO_SNAPSHOT, + IO_QUICKLOAD, IO_COUNT }; @@ -194,6 +195,7 @@ extern void exit_devices(void); extern int device_count(int type); extern const char *device_typename(int type); +extern const char *briefdevice_typename(int type); extern const char *device_typename_id(int type, int id); extern const char *device_filename(int type, int id); extern unsigned int device_length(int type, int id); diff --git a/src/mess/msdos.c b/src/mess/msdos.c index 30d360f4f..f2544f186 100644 --- a/src/mess/msdos.c +++ b/src/mess/msdos.c @@ -20,6 +20,14 @@ extern int strwildcmp(const char *sp1, const char *sp2); /**********************************************************/ /* Functions called from MSDOS.C by MAME for running MESS */ /**********************************************************/ +static char startup_dir[260]; /* Max Windows Path? */ + + +/* Go back to the startup dir on exit */ +void return_to_startup_dir(void) +{ + chdir(startup_dir); +} /* * Detect the type of image given in 'arg': @@ -89,6 +97,23 @@ static int detect_image_type(int game_index, int type, char *arg) return 0; } + + +/* Small check to see if system supports device */ +int system_supports_device(int game_index, int type) +{ + const struct IODevice *dev = drivers[game_index]->dev; + + while(dev->type!=IO_END) + { + if(dev->type==type) + return 1; + dev++; + } + return 0; +} + + /* * Load images from the command line. * Detect aliases and substitute the list of images for them. @@ -108,22 +133,38 @@ int load_image(int argc, char **argv, int j, int game_index) for (i = j + 1; i < argc; i++) { /* skip options and their additional arguments */ + /* this should really look up the structure values for easy maintenance */ if (argv[i][0] == '-') { - if (!stricmp(argv[i], "-rom") || !stricmp(argv[i], "-cart")) + if (!stricmp(argv[i], "-cartridge") || !stricmp(argv[i], "-cart")) type = IO_CARTSLOT; - else if (!stricmp(argv[i], "-floppy")) + else if (!stricmp(argv[i], "-floppydisk") || !stricmp(argv[i], "-flop")) type = IO_FLOPPY; - else if (!stricmp(argv[i], "-harddisk")) + else if (!stricmp(argv[i], "-harddisk") || !stricmp(argv[i], "-hard")) type = IO_HARDDISK; - else if (!stricmp(argv[i], "-cassette")) + else if (!stricmp(argv[i], "-cassette") || !stricmp(argv[i], "-cass")) type = IO_CASSETTE; - else if (!stricmp(argv[i], "-printer")) + else if (!stricmp(argv[i], "-printer") || !stricmp(argv[i], "-prin")) type = IO_PRINTER; - else if (!stricmp(argv[i], "-serial")) + else if (!stricmp(argv[i], "-serial") || !stricmp(argv[i], "-serl")) type = IO_SERIAL; + else if (!stricmp(argv[i], "-snapshot") || !stricmp(argv[i], "-snap")) + type = IO_SNAPSHOT; + else if (!stricmp(argv[i], "-quickload") || !stricmp(argv[i], "-quik")) + type = IO_QUICKLOAD; + /* all other switches set type to -1 */ + else type = -1; + + if (type>IO_END && !system_supports_device(game_index, type)) + { + if (errorlog) + fprintf(errorlog,"Specified Device (%s) not supported by this system\n", argv[i]); + type = -1; /* strip device if systems doesnt support it */ + } + + } - else + else if (type != -1) /* only enter when valid option, otherwise get next */ { /* check if this is an alias for a set of images */ char *alias = get_alias(driver, argv[i]); @@ -139,18 +180,21 @@ int load_image(int argc, char **argv, int j, int game_index) { res = detect_image_type(game_index, type, arg); arg = strtok(0, ","); + type = IO_END; /* image detected, reset type */ } } - else + else if (type != IO_END) { if (errorlog) fprintf(errorlog, "NOTE: No alias found\n"); res = detect_image_type(game_index, type, argv[i]); + type = IO_END; /* image detected, reset type */ } } /* If we had an error bail out now */ if (res) return res; + } return res; } @@ -160,22 +204,23 @@ int load_image(int argc, char **argv, int j, int game_index) /* This function contains all the -list calls from fronthlp.c for MESS */ /* Currently Supported: */ -/* -listextensions */ +/* -listdevices */ -void list_mess_info(char *gamename, char *arg) +void list_mess_info(char *gamename, char *arg, int listclones) { int i, j; - /* -listextensions */ - if (!stricmp(arg, "-listextensions")) + /* -listdevices */ + if (!stricmp(arg, "-listdevices")) { i = 0; j = 0; - printf("\nSYSTEM DEVICE IMAGE FILE EXTENSIONS SUPPORTED\n"); - printf("-------- ---------- -------------------------------\n"); + + printf(" SYSTEM DEVICE NAME (brief) IMAGE FILE EXTENSIONS SUPPORTED \n"); + printf("---------- -------------------- ------------------------------------\n"); while (drivers[i]) { @@ -185,7 +230,7 @@ void list_mess_info(char *gamename, char *arg) { int devcount = 1; - printf("%-10s", drivers[i]->name); + printf("%-13s", drivers[i]->name); /* if IODevice not used, print UNKNOWN */ if (dev->type == IO_END) @@ -197,9 +242,10 @@ void list_mess_info(char *gamename, char *arg) const char *src = dev->file_extensions; if (devcount == 1) - printf("%-12s", device_typename(dev->type)); + printf("%-12s(%s) ", device_typename(dev->type), briefdevice_typename(dev->type)); else - printf("%-10s%-12s", " ", device_typename(dev->type)); + printf("%-13s%-12s(%s) ", " ", device_typename(dev->type), briefdevice_typename(dev->type)); + devcount++; while (src && *src) @@ -220,6 +266,278 @@ void list_mess_info(char *gamename, char *arg) } + /* -listtext */ + else if (!stricmp(arg, "-listtext")) + { + printf(" ==========================================\n" ); + printf(" M.E.S.S. - Multi-Emulator Super System\n" ); + printf(" Copyright (C) 1998-2000\n"); + printf(" by the MESS team\n" ); + printf(" Official Page at: http://mess.emuverse.com\n"); + printf(" ==========================================\n\n" ); + + printf("This document is generated for MESS %s\n\n",build_version); + + printf("Please note that many people helped with this project, either directly or by\n" + "releasing source code which was used to write the drivers. We are not trying to\n" + "appropriate merit which isn't ours. See the acknowledgemnts section for a list\n" + "of contributors, however please note that the list is largely incomplete. See\n" + "also the CREDITS section in the emulator to see the people who contributed to a\n" + "specific driver. Again, that list might be incomplete. We apologize in advance\n" + "for any omission.\n\n" + + "All trademarks cited in this document are property of their respective owners.\n" + + "Especially, the MESS team would like to thank Nicola Salmoria and the MAME team\n" + "for letting us play with their code and, in fact, incorporating MESS specific\n" + "code into MAME. Without it, MESS would be substantially less than what it is\n" + "right now! ;-)\n\n" + + "Usage and Distribution Licence:\n" + "===============================\n" + "- MESS usage and distribution follows that of MAME. Please read the MAME\n" + " readme.txt file distributed with MESS for further information.\n\n" + + "How to Contact The MESS Team\n" + "============================\n" + "Visit the web page at http://mess.emuverse.com to see a list of contributers\n" + "If you have comments, suggestions or bug reports about an existing driver, check\n" + "the page contacts section to find who has worked on it, and send comments to that \n" + "person. If you are not sure who to contact, write to Ben (ben@mame.net) - who is the \n" + "current coordinator of the MESS project [DOS]. \n\n" + + "PLEASE DON'T SEND BINARY ATTACHMENTS WITHOUT ASKING FIRST, *ESPECIALLY* ROM IMAGES.\n" + + "THESE ARE NOT SUPPORT ADDRESSES. Support questions sent to these addresses\n" + "*will* be ignored. Please understand that this is a *free* project, mostly\n" + "targeted at experienced users. We don't have the resources to provide end user\n" + "support. Basically, if you can't get the emulator to work, you are on your own.\n" + "First of all, read this doc carefully. If you still can't find an answer to\n" + "your question, try checking the beginner's sections that many emulation pages\n" + "have, or ask on the appropriate Usenet newsgroups (e.g. comp.emulators.misc)\n" + "or on the many emulation message boards. The official MESS message board is at:\n" + " http://mess.emuverse.com\n\n"); + + + printf("Also, please DO NOT SEND REQUESTS FOR NEW SYSTEMS TO ADD, unless you have some original\n"); + printf("info on the hardware or, even better, have the technical expertise needed to\n"); + printf("help us. Please don't send us information widely available on the Internet -\n"); + printf("we are perfectly capable of finding it ourselves, thank you.\n\n\n"); + + + printf("Complete Emulated System List\n"); + printf("=============================\n"); + printf("Here is the list of systems supported by MESS %s\n",build_version); + if (!listclones) + printf("Variants of the same system are not included, you can use the -listclones command\n" + "to get a list of the alternate versions of a given system.\n"); + printf("\n" + "The meanings of the columns are as follows:\n" + "Working - \"No\" means that the emulation has shortcomings that cause the system\n" + " not to work correctly. This can be anywhere from just showing a black screen\n" + " to not being playable with major problems.\n" + "Correct Colors - \"Yes\" means that colors should be identical to the original,\n" + " \"Close\" that they are very similar but wrong in places, \"No\" that they are\n" + " completely wrong. \n" + "Sound - \"Partial\" means that sound support is either incomplete or not entirely\n" + " accurate. \n" + "Internal Name - This is the unique name that should be specified on the command\n" + " line to run the system. ROMs must be placed in the ROM path, either in a .zip\n" + " file or in a subdirectory of the same name. The former is suggested, because\n" + " the files will be identified by their CRC instead of requiring specific\n" + " names. NOTE! that as well as required ROM files to emulate the system, you may\n" + " also attach IMAGES of files created for system specific devices (some examples of \n" + " devices are cartridges, floppydisks, harddisks, etc). See below for a complete list\n" + " of a systems supported devices and common file formats used for that device\n\n"); + + printf("System Information can be obtained from the SysInfo.dat file (online in the MESS UI\n" + "from the Machine history) or sysinfo.htm. To generate sysinfo.htm, execute \n" + "dat2html.exe.\n\n\n"); + + printf("+-----------------------------------------+-------+-------+-------+----------+\n"); + printf("| | |Correct| | Internal |\n"); + printf("| System Name |Working|Colors | Sound | Name |\n"); + printf("+-----------------------------------------+-------+-------+-------+----------+\n"); + + + + /* Generate the System List */ + + i = 0; + while (drivers[i]) + { + + if ((listclones || drivers[i]->clone_of == 0 + || (drivers[i]->clone_of->flags & NOT_A_DRIVER) + ) && !strwildcmp(gamename, drivers[i]->name)) + { + char name[200],name_ref[200]; + + strcpy(name,drivers[i]->description); + + /* Move leading "The" to the end */ + if (strstr(name," (")) *strstr(name," (") = 0; + if (strncmp(name,"The ",4) == 0) + { + sprintf(name_ref,"%s, The ",name+4); + } + else + sprintf(name_ref,"%s ",name); + + /* print the additional description only if we are listing clones */ + if (listclones) + { + if (strchr(drivers[i]->description,'(')) + strcat(name_ref,strchr(drivers[i]->description,'(')); + } + + //printf("| %-33.33s",name_ref); + printf("| %-40.40s",name_ref); + + if (drivers[i]->flags & GAME_NOT_WORKING) + { + const struct GameDriver *maindrv; + int foundworking; + + if (drivers[i]->clone_of && !(drivers[i]->clone_of->flags & NOT_A_DRIVER)) + maindrv = drivers[i]->clone_of; + else maindrv = drivers[i]; + + foundworking = 0; + j = 0; + while (drivers[j]) + { + if (drivers[j] == maindrv || drivers[j]->clone_of == maindrv) + { + if ((drivers[j]->flags & GAME_NOT_WORKING) == 0) + { + foundworking = 1; + break; + } + } + j++; + } + + if (foundworking) + printf("| No(1) "); + else + printf("| No "); + } + else + printf("| Yes "); + + if (drivers[i]->flags & GAME_WRONG_COLORS) + printf("| No "); + else if (drivers[i]->flags & GAME_IMPERFECT_COLORS) + printf("| Close "); + else + printf("| Yes "); + + { + const char **samplenames = 0; + for (j = 0;drivers[i]->drv->sound[j].sound_type && j < MAX_SOUND; j++) + { + if (drivers[i]->drv->sound[j].sound_type == SOUND_SAMPLES) + { + samplenames = ((struct Samplesinterface *)drivers[i]->drv->sound[j].sound_interface)->samplenames; + break; + } + } + if (drivers[i]->flags & GAME_NO_SOUND) + printf("| No "); + else if (drivers[i]->flags & GAME_IMPERFECT_SOUND) + { + if (samplenames) + printf("|Part(2)"); + else + printf("|Partial"); + } + else + { + if (samplenames) + printf("| Yes(2)"); + else + printf("| Yes "); + } + } + + printf("| %-8s |\n",drivers[i]->name); + } + i++; + } + + printf("+-----------------------------------------+-------+-------+-------+----------+\n"); + printf("(1) There are variants of the system that work correctly\n"); + printf("(2) Needs samples provided separately\n\n\n\n\n"); + + + printf("QUICK MESS USAGE GUIDE!\n" + "=======================\n" + "In order to use MESS, you must at least specify at the command line\n\n" + " MESS \n\n" + "This will emulate the system requested. Note that most systems require ROMS for\n" + "emulation. These system ROM files are copyright and ARE NOT supplied with MESS.\n\n" + "To use files created for the system emulated (IMAGES), MESS works by attaching an image\n" + "of the file created for the particular device of that system, for example, a cartridge,\n" + "floppydisk, harddisk, cassette, image etc. Therefore, in order to attach an image to the\n" + "system, you must specify at the command line:\n\n" + " MESS \n\n" + "To manually manipulate the emulation options, you must specify:\n\n" + " MESS \n\n"); + printf("*For a complete list of systems emulated, use: MESS -listfull\n" + "*For system files (ROMS) required by each system, use: MESS -listroms\n" + "*See below for valid device names and usage." + "*See the MAME readme.txt and below for a detailed list of options.\n\n" + "Make sure you have ROMS and IMAGES in a subdirectory from your ROMPATH\n" + "with the same name as the system (eg ROMS/COLECO)\n\n\n"); + printf("Examples:\n\n" + " MESS nes -cart zelda.nes\n" + " will attach zelda.nes to the cartridge device and run MESS in\n" + " the following way:\n" + " = nes (Nintendo Entertainment System)\n" + " = CARTRIDGE\n" + " = zelda.nes (Zelda cartridge)\n" + " = none specified, so default options (see mess.cfg)\n\n" + " MESS coleco -cart dkong -soundcard 0\n" + " will run MESS in the following way:\n\n" + " = coleco (Nintendo Entertainment System)\n" + " = CARTRIDGE\n" + " = dkong.rom (Donkey Kong cartridge)\n" + " = default options without sound (see mess.cfg)\n\n" + " MESS trs80 -flop boot.dsk -flop arcade1.dsk\n" + " will run MESS in the following way:\n" + " = trs80 (TRs-80 model 1)\n" + " = FLOPPYDISK\n" + " = boot.dsk (The Trs80 boot floppy diskl)\n" + " = FLOPPYDISK\n" + " = arcade1.dsk (floppy Disk which contains games)\n" + " = default options (all listed in mess.cfg)\n\n" + " MESS cgenie -fd games1\n" + " will run the system Colour Genie with one disk image loaded,\n" + " automatically appending the file extension .dsk.\n\n\n\n\n"); + + + + + printf("DEVICE support list\n"); + printf("===================\n"); + printf("As mentioned, in order to fully utilise MESS, you will need to attach image files\n" + "to the system devices. The following list specifies all the devices and image \n" + "file extensions currently supported by MESS. Remember to use the DEVICE name \n" + "(or the brief name) to attach an image. This list can easily be generated by \n" + "specifying:\n\n" + " MESS -listdevices\n\n"); + printf("Also note that MESS has a preliminary built-in File Manager for attaching images to\n" + "system devices. Use the UI (TAB key) to access.\n\n\n\n"); + + + + + } + + + + } /***************************************************************************** @@ -333,6 +651,12 @@ void osd_change_device(const char *device) void osd_change_directory(const char *directory) { + if (!startup_dir[0]) + { + getcwd(startup_dir,sizeof(startup_dir)); + atexit(return_to_startup_dir); + } + chdir(directory); } diff --git a/src/mess/msdos.h b/src/mess/msdos.h index 6a8bd9431..8cdb6d3a6 100644 --- a/src/mess/msdos.h +++ b/src/mess/msdos.h @@ -3,6 +3,6 @@ char *get_alias(const char *driver_name, char *argv); int load_image(int argc, char **argv, int j, int game_index); -void list_mess_info(char *gamename, char *arg); +void list_mess_info(char *gamename, char *arg, int listclones); #endif diff --git a/src/mess/sndhrdw/sid6581.c b/src/mess/sndhrdw/sid6581.c index 16a5eea32..ed95e90a7 100644 --- a/src/mess/sndhrdw/sid6581.c +++ b/src/mess/sndhrdw/sid6581.c @@ -56,6 +56,8 @@ static int sid6581_port_r (SID6581 *this, int offset) if (this->paddle_read != NULL) return this->paddle_read (1); return 0; + case 0x1b:case 0x1c: /* noise channel readback? */ + return rand(); default: return this->reg[offset]; } diff --git a/src/mess/system.c b/src/mess/system.c index ab235bdb8..de4801c94 100644 --- a/src/mess/system.c +++ b/src/mess/system.c @@ -157,14 +157,18 @@ const struct GameDriver *drivers[] = /* COMMODORE */ DRIVER( c16 ) /* Commodore 16 */ - DRIVER( plus4 ) /* Commodore +4 */ + DRIVER( c16c ) /* Commodore 16 c1551 */ + TESTDRIVER( c16v ) /* Commodore 16 vc1541 */ + DRIVER( plus4 ) /* Commodore +4 c1551 */ + DRIVER( plus4c ) /* Commodore +4 vc1541 */ + TESTDRIVER( plus4v ) /* Commodore +4 */ DRIVER( c364 ) /* Commodore 364 - Prototype */ DRIVER( c64 ) /* Commodore 64 - NTSC */ DRIVER( c64pal ) /* Commodore 64 - PAL */ DRIVER( c64gs ) /* Commodore 64 - NTSC */ DRIVER( cbm4064 ) /* Commodore CBM4064 */ - DRIVER( sx64 ) /* Commodore SX 64 - PAL */ + TESTDRIVER( sx64 ) /* Commodore SX 64 - PAL */ DRIVER( max ) /* Ulitimax */ DRIVER( c65 ) /* Commodore 65 - NTSC */ DRIVER( c65ger ) /* Commodore 65 - PAL (german) */ @@ -281,6 +285,7 @@ const struct GameDriver *drivers[] = DRIVER( msx ) /* MSX */ DRIVER( msxj ) /* MSX Jap */ DRIVER( msxkr ) /* MSX Korean */ + DRIVER( msxuk ) /* MSX UK */ /* Nascom */ DRIVER( nascom1 ) /* Nascom 1 */ diff --git a/src/mess/systems/a2600.c b/src/mess/systems/a2600.c index 6051c5850..13ef61ae5 100644 --- a/src/mess/systems/a2600.c +++ b/src/mess/systems/a2600.c @@ -108,8 +108,9 @@ /* vidhrdw/a2600.c */ extern int a2600_vh_start(void); extern void a2600_vh_stop(void); +extern int a2600_scanline_interrupt(void); extern void a2600_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh); -//extern int a2600_interrupt(void); + /* machine/a2600.c */ extern int a2600_TIA_r(int offset); @@ -204,7 +205,7 @@ INPUT_PORTS_START( a2600 ) PORT_START /* IN2 */ PORT_BIT (0x7F, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT (0x80, IP_ACTIVE_HIGH, IPT_VBLANK) + //PORT_BIT (0x80, IP_ACTIVE_HIGH, IPT_VBLANK) PORT_START /* IN3 */ PORT_BITX( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN, "Reset", KEYCODE_R, IP_JOY_DEFAULT) @@ -214,63 +215,46 @@ INPUT_PORTS_START( a2600 ) INPUT_PORTS_END -/* a7800 palette and colortable */ -#define RANGE(r0,g0,b0,r1,g1,b1) \ - ( 0*(r1-r0)/15+r0)*4, ( 0*(g1-g0)/15+g0)*4, ( 0*(b1-b0)/15+b0)*4, \ - ( 1*(r1-r0)/15+r0)*4, ( 1*(g1-g0)/15+g0)*4, ( 1*(b1-b0)/15+b0)*4, \ - ( 2*(r1-r0)/15+r0)*4, ( 2*(g1-g0)/15+g0)*4, ( 2*(b1-b0)/15+b0)*4, \ - ( 3*(r1-r0)/15+r0)*4, ( 3*(g1-g0)/15+g0)*4, ( 3*(b1-b0)/15+b0)*4, \ - ( 4*(r1-r0)/15+r0)*4, ( 4*(g1-g0)/15+g0)*4, ( 4*(b1-b0)/15+b0)*4, \ - ( 5*(r1-r0)/15+r0)*4, ( 5*(g1-g0)/15+g0)*4, ( 5*(b1-b0)/15+b0)*4, \ - ( 6*(r1-r0)/15+r0)*4, ( 6*(g1-g0)/15+g0)*4, ( 6*(b1-b0)/15+b0)*4, \ - ( 7*(r1-r0)/15+r0)*4, ( 7*(g1-g0)/15+g0)*4, ( 7*(b1-b0)/15+b0)*4, \ - ( 8*(r1-r0)/15+r0)*4, ( 8*(g1-g0)/15+g0)*4, ( 8*(b1-b0)/15+b0)*4, \ - ( 9*(r1-r0)/15+r0)*4, ( 9*(g1-g0)/15+g0)*4, ( 9*(b1-b0)/15+b0)*4, \ - (10*(r1-r0)/15+r0)*4, (10*(g1-g0)/15+g0)*4, (10*(b1-b0)/15+b0)*4, \ - (11*(r1-r0)/15+r0)*4, (11*(g1-g0)/15+g0)*4, (11*(b1-b0)/15+b0)*4, \ - (12*(r1-r0)/15+r0)*4, (12*(g1-g0)/15+g0)*4, (12*(b1-b0)/15+b0)*4, \ - (13*(r1-r0)/15+r0)*4, (13*(g1-g0)/15+g0)*4, (13*(b1-b0)/15+b0)*4, \ - (14*(r1-r0)/15+r0)*4, (14*(g1-g0)/15+g0)*4, (14*(b1-b0)/15+b0)*4, \ - (15*(r1-r0)/15+r0)*4, (15*(g1-g0)/15+g0)*4, (15*(b1-b0)/15+b0)*4 +/* these are *so* wrong for now */ static unsigned char palette[] = { - RANGE( 0, 0, 0, 63,63,63), /* gray */ - RANGE( 4, 0, 0, 63,55, 0), /* gold */ - RANGE(12, 0, 0, 63,43, 0), /* orange */ - RANGE(18, 0, 0, 63,23,23), /* red orange */ - RANGE(15, 0,24, 63,39,55), /* pink */ - RANGE(10, 0, 8, 35,35,63), /* purple */ - RANGE(10, 0,32, 39,39,63), /* violet */ - RANGE( 0, 0,32, 24,39,63), /* blue1 */ - RANGE( 0, 4,32, 31,43,59), /* blue2 */ - RANGE( 0, 6,18, 0,47,63), /* light blue */ - RANGE( 0, 8, 8, 15,63,43), /* light cyan */ - RANGE( 0,10, 0, 39,63,13), /* cyan */ - RANGE( 0,10, 0, 0,63, 0), /* green */ - RANGE(16,24, 0, 31,63, 0), /* light green */ - RANGE( 4, 4, 0, 63,63, 0), /* green orange */ - RANGE( 8, 4, 0, 63,43, 0) /* light orange */ + 0x00, 0x00, 0x00, /* Transparent? */ + 0x00, 0x00, 0x00, /* Black */ + 0x20, 0xC0, 0x20, /* Medium Green */ + 0x60, 0xE0, 0x60, /* Light Green */ + 0x20, 0x20, 0xE0, /* Dark Blue */ + 0x40, 0x60, 0xE0, /* Light Blue */ + 0xA0, 0x20, 0x20, /* Dark Red */ + 0x40, 0xC0, 0xE0, /* Cyan */ + 0xE0, 0x20, 0x20, /* Medium Red */ + 0xE0, 0x60, 0x60, /* Light Red */ + 0xC0, 0xC0, 0x20, /* Dark Yellow */ + 0xC0, 0xC0, 0x80, /* Light Yellow */ + 0x20, 0x80, 0x20, /* Dark Green */ + 0xC0, 0x40, 0xA0, /* Magenta */ + 0xA0, 0xA0, 0xA0, /* Gray */ + 0xE0, 0xE0, 0xE0, /* White */ }; static unsigned short colortable[] = { - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, - 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, - 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f, - 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f, - 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f, - 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f, - 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f, - 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f, - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f, - 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf, - 0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf, - 0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf, - 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef, - 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, }; /* Initialise the palette */ @@ -364,17 +348,18 @@ static struct MachineDriver machine_driver_a2600 = { CPU_M6502, 1190000, /* 1.19Mhz */ - readmem,writemem + readmem,writemem,0,0, + a2600_scanline_interrupt,262 /* for screen updates per scanline */ } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 60, DEFAULT_60HZ_VBLANK_DURATION, 1, a2600_init_machine, /* init_machine */ a2600_stop_machine, /* stop_machine */ /* video hardware */ - 228,262, {0,227,37,35+192}, + 228,262, {68,227,37,231}, gfxdecodeinfo, sizeof(palette) / sizeof(palette[0]) / 3, sizeof(colortable) / sizeof(colortable[0]), @@ -443,5 +428,5 @@ static const struct IODevice io_a2600[] = { }; /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -CONS( 19??, a2600, 0, a2600, a2600, a2600, "Atari", "Atari 2600 - VCS" ) +CONSX( 19??, a2600, 0, a2600, a2600, a2600, "Atari", "Atari 2600 - VCS", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_WRONG_COLORS ) diff --git a/src/mess/systems/c128.c b/src/mess/systems/c128.c index 254cbaec5..4f4903680 100644 --- a/src/mess/systems/c128.c +++ b/src/mess/systems/c128.c @@ -740,25 +740,26 @@ static void c128_init_palette (unsigned char *sys_palette, unsigned short *sys_c #endif ROM_START (c128) - ROM_REGION (0x132800, REGION_CPU1) -#if 1 - ROM_LOAD ("318018.04", 0x100000, 0x4000, 0x9f9c355b) - ROM_LOAD ("318019.04", 0x104000, 0x4000, 0x6e2c91a7) - ROM_LOAD ("251913.01", 0x108000, 0x4000, 0x0010ec31) - ROM_LOAD ("318020.05", 0x10c000, 0x4000, 0xba456b8e) - ROM_LOAD ("390059.01", 0x120000, 0x2000, 0x6aaaafe6) -#else - /* 128d */ - ROM_LOAD ("252343.03", 0x100000, 0x8000, 0xbc07ed87) - ROM_LOAD ("252343.04", 0x108000, 0x8000, 0xcc6bdb69) - ROM_LOAD ("390059.01", 0x120000, 0x2000, 0x6aaaafe6) -#endif - ROM_REGION (0x10000, REGION_CPU2) -#ifdef VC1541 - VC1541_ROM (REGION_CPU3) -#endif + ROM_REGION (0x132800, REGION_CPU1) + ROM_LOAD ("318018.04", 0x100000, 0x4000, 0x9f9c355b) + ROM_LOAD ("318019.04", 0x104000, 0x4000, 0x6e2c91a7) + ROM_LOAD ("251913.01", 0x108000, 0x4000, 0x0010ec31) + ROM_LOAD ("318020.05", 0x10c000, 0x4000, 0xba456b8e) + ROM_LOAD ("390059.01", 0x120000, 0x2000, 0x6aaaafe6) + ROM_REGION (0x10000, REGION_CPU2) ROM_END +#ifdef PET_TEST_CODE +ROM_START (c128d) + ROM_REGION (0x132800, REGION_CPU1) + ROM_LOAD ("252343.03", 0x100000, 0x8000, 0xbc07ed87) + ROM_LOAD ("252343.04", 0x108000, 0x8000, 0xcc6bdb69) + ROM_LOAD ("390059.01", 0x120000, 0x2000, 0x6aaaafe6) + ROM_REGION (0x10000, REGION_CPU2) + C1571_ROM(REGION_CPU3) +ROM_END +#endif + ROM_START (c128ger) /* c128d german */ ROM_REGION (0x132800, REGION_CPU1) @@ -766,9 +767,6 @@ ROM_START (c128ger) ROM_LOAD ("318077.01", 0x108000, 0x8000, 0xeb6e2c8f) ROM_LOAD ("315079.01", 0x120000, 0x2000, 0xfe5a2db1) ROM_REGION (0x10000, REGION_CPU2) -#ifdef VC1541 - VC1541_ROM (REGION_CPU3) -#endif ROM_END ROM_START (c128fra) @@ -785,9 +783,6 @@ ROM_START (c128fra) #endif ROM_LOAD ("325167.01", 0x120000, 0x2000, 0xbad36b88) ROM_REGION (0x10000, REGION_CPU2) -#ifdef VC1541 - VC1541_ROM (REGION_CPU3) -#endif ROM_END static struct MachineDriver machine_driver_c128 = @@ -810,9 +805,6 @@ static struct MachineDriver machine_driver_c128 = c64_frame_interrupt, 1, c128_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU, -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -842,6 +834,58 @@ static struct MachineDriver machine_driver_c128 = } }; +#ifdef PET_TEST_CODE +static struct MachineDriver machine_driver_c128d = +{ + /* basic machine hardware */ + { + { + CPU_Z80 | CPU_16BIT_PORT, + VIC6567_CLOCK, + c128_z80_readmem, c128_z80_writemem, + c128_z80_readio, c128_z80_writeio, + c64_frame_interrupt, 1, + c128_raster_irq, VIC2_HRETRACERATE, + }, + { + CPU_M6510, /* m8502 */ + VIC6567_CLOCK, + c128_readmem, c128_writemem, + 0, 0, + c64_frame_interrupt, 1, + c128_raster_irq, VIC2_HRETRACERATE, + }, + C1571_CPU + }, + VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 0, + c128_init_machine, + c128_shutdown_machine, + + /* video hardware */ + 656, /* screen width */ + 216, /* screen height */ + {0, 656 - 1, 0, 216 - 1}, /* visible_area */ + 0, /* graphics decode info */ + (sizeof (vic2_palette) +sizeof(vdc8563_palette)) + / sizeof (vic2_palette[0]) / 3, + 0, + c128_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + c128_vh_start, + c128_vh_stop, + c128_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + /* { SOUND_CUSTOM, &sid6581_sound_interface }, */ + {SOUND_DAC, &vc20tape_sound_interface} + } +}; +#endif + static struct MachineDriver machine_driver_c128pal = { /* basic machine hardware */ @@ -862,9 +906,6 @@ static struct MachineDriver machine_driver_c128pal = c64_frame_interrupt, 1, c128_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU, -#endif }, VIC6569_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -915,9 +956,6 @@ static struct MachineDriver machine_driver_c128pal2 = c64_frame_interrupt, 1, c128_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU, -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -952,13 +990,25 @@ static const struct IODevice io_c128[] = IODEVICE_CBM_QUICK, #if 0 IODEVICE_ROM_SOCKET, - IODEVICE_CBM_ROM(c64_rom_id), -#endif + IODEVICE_CBM_ROM("crt\080\0", c64_rom_id), IODEVICE_VC20TAPE, +#endif IODEVICE_CBM_DRIVE, {IO_END} }; +static const struct IODevice io_c128d[] = +{ + IODEVICE_CBM_QUICK, +#if 0 + IODEVICE_ROM_SOCKET, + IODEVICE_CBM_ROM(c64_rom_id), + IODEVICE_VC20TAPE, +#endif + IODEVICE_C1571, + {IO_END} +}; + #define init_c128 c128_driver_init #define init_c128pal c128pal_driver_init #define init_c128pal2 c128pal2_driver_init @@ -967,11 +1017,12 @@ static const struct IODevice io_c128[] = #ifdef PET_TEST_CODE /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP (1985, c128, 0, c128, c128, c128, "Commodore Business Machines Co.","Commodore C128 (NTSC) 656x216") +COMP (1985, c128, 0, c128, c128, c128, "Commodore Business Machines Co.","Commodore C128 NTSC 656x216") +COMP (1985, c128d, 0, c128d, c128, c128, "Commodore Business Machines Co.","Commodore C128D NTSC 656x216") COMP (1985, c128ger, c128, c128pal, c128ger, c128pal, "Commodore Business Machines Co.","Commodore C128 German (PAL) 336x216") COMP (1985, c128fra, c128, c128pal2, c128, c128pal2, "Commodore Business Machines Co.","Commodore C128 French (PAL) 656x432") #else -COMPX (1985, c128, 0, c128, c128, c128, "Commodore Business Machines Co.","Commodore C128 (NTSC) 656x216", GAME_NO_SOUND) +COMPX (1985, c128, 0, c128, c128, c128, "Commodore Business Machines Co.","Commodore C128 NTSC 656x216", GAME_NO_SOUND) COMPX (1985, c128ger, c128, c128pal, c128ger, c128pal, "Commodore Business Machines Co.","Commodore C128 German (PAL) 336x216",GAME_NO_SOUND) /* someone to add french keyboard inputports !? */ COMPX (1985, c128fra, c128, c128pal2, c128, c128pal2, "Commodore Business Machines Co.","Commodore C128 French (PAL) 656x432",GAME_NO_SOUND) diff --git a/src/mess/systems/c16.c b/src/mess/systems/c16.c index bac0f867e..a8e1a8729 100644 --- a/src/mess/systems/c16.c +++ b/src/mess/systems/c16.c @@ -81,7 +81,7 @@ quickloader some unsolved problems memory check by c16 kernel will not recognize more memory without restart of mess - cpu clock switching/changing (overclocking should it be) + cpu clock switching/changing (overclocking should it be) Keys ---- @@ -420,34 +420,135 @@ static struct MemoryWriteAddress plus4_writemem[] = PORT_DIPSETTING(0x20, DEF_STR( On ) )\ PORT_DIPNAME ( 0x10, 0x00, " Tape Sound")\ PORT_DIPSETTING( 0, DEF_STR( Off ) )\ - PORT_DIPSETTING(0x10, DEF_STR( On ) )\ - PORT_DIPNAME ( 0x0c, 0x04, "Device 8")\ + PORT_DIPSETTING(0x10, DEF_STR( On ) ) + +INPUT_PORTS_START (c16) + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x0, IPT_UNUSED) /* no real floppy */ + PORT_DIPNAME ( 0x38, 8, "Device 8")\ PORT_DIPSETTING( 0, "None" )\ - PORT_DIPSETTING( 4, "IEEE488 Port 0/C1551 Floppy Drive" )\ - PORT_DIPSETTING( 8, "Serial Bus/VC1541 Floppy Drive" )\ - PORT_DIPNAME ( 0x03, 0x01, "Device 9")\ + PORT_DIPSETTING( 8, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x18, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_DIPNAME ( 0x07, 0x01, "Device 9")\ PORT_DIPSETTING( 0, "None" )\ - PORT_DIPSETTING( 1, "IEEE488 Port 1/C1551 Floppy Drive" )\ - PORT_DIPSETTING( 2, "Serial Bus/VC1541 Floppy Drive" )\ + PORT_DIPSETTING( 1, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 3, "Serial Bus/VC1541 Floppy Drive Simulation" )\ PORT_START + PORT_BIT (0x10, 0x0, IPT_UNUSED) /* pal */ + PORT_BIT (0xc, 0x0, IPT_UNUSED) /* c16 */ + PORT_DIPNAME (3, 3, "Memory") + PORT_DIPSETTING (0, "16 KByte") + PORT_DIPSETTING (2, "32 KByte") + PORT_DIPSETTING (3, "64 KByte") +INPUT_PORTS_END -INPUT_PORTS_START (c16) - DIPS_BOTH - PORT_DIPNAME (3, 3, "Memory") - PORT_DIPSETTING (0, "16 KByte") - PORT_DIPSETTING (2, "32 KByte") - PORT_DIPSETTING (3, "64 KByte") +INPUT_PORTS_START (c16c) + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x40, IPT_UNUSED) /* c1551 floppy */ + PORT_BIT (0x38, 0x10, IPT_UNUSED) + PORT_BIT (0x7, 0x0, IPT_UNUSED) + PORT_START + PORT_BIT (0x10, 0x0, IPT_UNUSED) /* pal */ + PORT_BIT (0xc, 0x0, IPT_UNUSED) /* c16 */ + PORT_DIPNAME (3, 3, "Memory") + PORT_DIPSETTING (0, "16 KByte") + PORT_DIPSETTING (2, "32 KByte") + PORT_DIPSETTING (3, "64 KByte") INPUT_PORTS_END +#ifdef PET_TEST_CODE +INPUT_PORTS_START (c16v) + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x80, IPT_UNUSED) /* vc1541 floppy */ + PORT_DIPNAME ( 0x38, 0x10, "Device 8")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 8, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x18, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x20, "VC1541 Floppy Drive" )\ + PORT_DIPNAME ( 0x07, 0x01, "Device 9")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 1, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 3, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_START + PORT_BIT (0x10, 0x0, IPT_UNUSED) /* pal */ + PORT_BIT (0xc, 0x0, IPT_UNUSED) /* c16 */ + PORT_DIPNAME (3, 3, "Memory") + PORT_DIPSETTING (0, "16 KByte") + PORT_DIPSETTING (2, "32 KByte") + PORT_DIPSETTING (3, "64 KByte") +INPUT_PORTS_END +#endif + INPUT_PORTS_START (plus4) - DIPS_BOTH - PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x00, IPT_UNUSED) /* no real floppy */ + PORT_DIPNAME ( 0x38, 0x8, "Device 8")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 8, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x18, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_DIPNAME ( 0x07, 0x01, "Device 9")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 1, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 3, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_START + PORT_BIT (0x10, 0x10, IPT_UNUSED) /* ntsc */ + PORT_BIT (0xc, 0x4, IPT_UNUSED) /* plus4 */ + PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ +INPUT_PORTS_END + +INPUT_PORTS_START (plus4c) + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x40, IPT_UNUSED) /* c1551 floppy */ + PORT_BIT (0x38, 0x10, IPT_UNUSED) + PORT_BIT (0x7, 0x0, IPT_UNUSED) + PORT_START + PORT_BIT (0x10, 0x10, IPT_UNUSED) /* ntsc */ + PORT_BIT (0xc, 0x4, IPT_UNUSED) /* plus4 */ + PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ +INPUT_PORTS_END + +#ifdef PET_TEST_CODE +INPUT_PORTS_START (plus4v) + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x80, IPT_UNUSED) /* vc1541 floppy */ + PORT_DIPNAME ( 0x38, 0x10, "Device 8")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 8, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x18, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x20, "VC1541 Floppy Drive" )\ + PORT_DIPNAME ( 0x07, 0x01, "Device 9")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 1, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 3, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_START + PORT_BIT (0x10, 0x10, IPT_UNUSED) /* ntsc */ + PORT_BIT (0xc, 0x4, IPT_UNUSED) /* plus4 */ + PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ INPUT_PORTS_END +#endif #if 0 INPUT_PORTS_START (c364) - DIPS_BOTH - PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ + DIPS_BOTH + PORT_START + PORT_BIT (0xc0, 0x00, IPT_UNUSED) /* no real floppy */ + PORT_DIPNAME ( 0x38, 0x10, "Device 8")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 8, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 0x18, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_DIPNAME ( 0x03, 0x01, "Device 9")\ + PORT_DIPSETTING( 0, "None" )\ + PORT_DIPSETTING( 1, "C1551 Floppy Drive Simulation" )\ + PORT_DIPSETTING( 3, "Serial Bus/VC1541 Floppy Drive Simulation" )\ + PORT_START + PORT_BIT (0xc, 0x8, IPT_UNUSED) /* 364 */ + PORT_BIT (0x3, 0x3, IPT_UNUSED) /* 64K Memory */ /* numeric block hardware wired to other keys? @ + - = @@ -469,23 +570,20 @@ static void c16_init_palette (unsigned char *sys_palette, unsigned short *sys_co /* cbm version in kernel at 0xff80 (offset 0x3f80) 0x80 means pal version */ - /* 318006-01 */ - ROM_LOAD ("basic.80", 0x10000, 0x4000, 0x74eaae87) + /* basic */ + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) - /* 318004-05 pal */ - ROM_LOAD("kernel5p.c0", 0x14000, 0x4000, 0x71c07bd4) - /* 318004-03 pal */ - ROM_LOAD ("kernel3p.c0", 0x14000, 0x4000, 0x77bab934) + /* kernal pal */ + ROM_LOAD("318004.05", 0x14000, 0x4000, 0x71c07bd4) + ROM_LOAD ("318004.03", 0x14000, 0x4000, 0x77bab934) - /* 318005-05 */ - ROM_LOAD ("kernel5.c0", 0x14000, 0x4000, 0x70295038) - /* 318005-04 */ - ROM_LOAD ("kernel4.c0", 0x14000, 0x4000, 0x799a633d) + /* kernal ntsc */ + ROM_LOAD ("318005.05", 0x14000, 0x4000, 0x70295038) + ROM_LOAD ("318005.04", 0x14000, 0x4000, 0x799a633d) - /* 317053-01 */ - ROM_LOAD ("3plus1lo.rom", 0x18000, 0x4000, 0x4fd1d8cb) - /* 317054-01 */ - ROM_LOAD ("3plus1hi.rom", 0x1c000, 0x4000, 0x109de2fc) + /* 3plus1 program */ + ROM_LOAD ("317053.01", 0x18000, 0x4000, 0x4fd1d8cb) + ROM_LOAD ("317054.01", 0x1c000, 0x4000, 0x109de2fc) /* same as 109de2fc, but saved from running machine, so io area different ! */ @@ -496,35 +594,62 @@ static void c16_init_palette (unsigned char *sys_palette, unsigned short *sys_co ROM_START (c16) ROM_REGION (0x40000, REGION_CPU1) - ROM_LOAD ("basic.80", 0x10000, 0x4000, 0x74eaae87) - ROM_LOAD("kernel5p.c0", 0x14000, 0x4000, 0x71c07bd4) -#ifdef VC1541 + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD("318004.05", 0x14000, 0x4000, 0x71c07bd4) +ROM_END + +ROM_START (c16c) + ROM_REGION (0x40000, REGION_CPU1) + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD("318004.05", 0x14000, 0x4000, 0x71c07bd4) + C1551_ROM (REGION_CPU2) +ROM_END + +#ifdef PET_TEST_CODE +ROM_START (c16v) + ROM_REGION (0x40000, REGION_CPU1) + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD("318004.05", 0x14000, 0x4000, 0x71c07bd4) VC1541_ROM (REGION_CPU2) -#endif ROM_END +#endif ROM_START (plus4) ROM_REGION (0x40000, REGION_CPU1) - ROM_LOAD ("basic.80", 0x10000, 0x4000, 0x74eaae87) - ROM_LOAD ("kernel5.c0", 0x14000, 0x4000, 0x70295038) - ROM_LOAD ("3plus1lo.rom", 0x18000, 0x4000, 0x4fd1d8cb) - ROM_LOAD ("3plus1hi.rom", 0x1c000, 0x4000, 0x109de2fc) -#ifdef VC1541 + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD ("318005.05", 0x14000, 0x4000, 0x70295038) + ROM_LOAD ("317053.01", 0x18000, 0x4000, 0x4fd1d8cb) + ROM_LOAD ("317054.01", 0x1c000, 0x4000, 0x109de2fc) +ROM_END + +ROM_START (plus4c) + ROM_REGION (0x40000, REGION_CPU1) + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD ("318005.05", 0x14000, 0x4000, 0x70295038) + ROM_LOAD ("317053.01", 0x18000, 0x4000, 0x4fd1d8cb) + ROM_LOAD ("317054.01", 0x1c000, 0x4000, 0x109de2fc) + C1551_ROM (REGION_CPU2) +ROM_END + +#ifdef PET_TEST_CODE +ROM_START (plus4v) + ROM_REGION (0x40000, REGION_CPU1) + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD ("318005.05", 0x14000, 0x4000, 0x70295038) + ROM_LOAD ("317053.01", 0x18000, 0x4000, 0x4fd1d8cb) + ROM_LOAD ("317054.01", 0x1c000, 0x4000, 0x109de2fc) VC1541_ROM (REGION_CPU2) -#endif ROM_END +#endif ROM_START (c364) ROM_REGION (0x40000, REGION_CPU1) - ROM_LOAD ("basic.80", 0x10000, 0x4000, 0x74eaae87) + ROM_LOAD ("318006.01", 0x10000, 0x4000, 0x74eaae87) ROM_LOAD ("kern364p.bin", 0x14000, 0x4000, 0x84fd4f7a) - ROM_LOAD ("3plus1lo.rom", 0x18000, 0x4000, 0x4fd1d8cb) - ROM_LOAD ("3plus1hi.rom", 0x1c000, 0x4000, 0x109de2fc) + ROM_LOAD ("317053.01", 0x18000, 0x4000, 0x4fd1d8cb) + ROM_LOAD ("317054.01", 0x1c000, 0x4000, 0x109de2fc) /* at address 0x20000 not so good */ ROM_LOAD ("spk3cc4.bin", 0x28000, 0x4000, 0x5227c2ee) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END static struct MachineDriver machine_driver_c16 = @@ -539,12 +664,54 @@ static struct MachineDriver machine_driver_c16 = c16_frame_interrupt, 1, ted7360_raster_interrupt, TED7360_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, - TED7360PAL_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + TED7360PAL_VRETRACERATE, 0, /* frames per second, vblank duration */ + 0, + c16_init_machine, + c16_shutdown_machine, + + /* video hardware */ + 336, /* screen width */ + 216, /* screen height */ + {0, 336 - 1, 0, 216 - 1}, /* visible_area */ + 0, /* graphics decode info */ + sizeof (ted7360_palette) / sizeof (ted7360_palette[0]) / 3, + 0, + c16_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, 0, + ted7360_vh_start, + ted7360_vh_stop, + ted7360_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &ted7360_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; + +static struct MachineDriver machine_driver_c16c = +{ + /* basic machine hardware */ + { + { + CPU_M6510, /* MOS7501 has no nmi line */ + 1400000, /*TED7360PAL_CLOCK/2, */ + c16_readmem, c16_writemem, + 0, 0, + c16_frame_interrupt, 1, + ted7360_raster_interrupt, TED7360_HRETRACERATE, + }, + C1551_CPU + }, + TED7360PAL_VRETRACERATE, 0, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 100, +#endif c16_init_machine, c16_shutdown_machine, @@ -570,6 +737,53 @@ static struct MachineDriver machine_driver_c16 = } }; +#ifdef PET_TEST_CODE +static struct MachineDriver machine_driver_c16v = +{ + /* basic machine hardware */ + { + { + CPU_M6510, /* MOS7501 has no nmi line */ + 1400000, /*TED7360PAL_CLOCK/2, */ + c16_readmem, c16_writemem, + 0, 0, + c16_frame_interrupt, 1, + ted7360_raster_interrupt, TED7360_HRETRACERATE, + }, + VC1541_CPU + }, + TED7360PAL_VRETRACERATE, 0, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 3000, +#endif + c16_init_machine, + c16_shutdown_machine, + + /* video hardware */ + 336, /* screen width */ + 216, /* screen height */ + {0, 336 - 1, 0, 216 - 1}, /* visible_area */ + 0, /* graphics decode info */ + sizeof (ted7360_palette) / sizeof (ted7360_palette[0]) / 3, + 0, + c16_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + ted7360_vh_start, + ted7360_vh_stop, + ted7360_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &ted7360_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; +#endif + static struct MachineDriver machine_driver_plus4 = { /* basic machine hardware */ @@ -582,13 +796,102 @@ static struct MachineDriver machine_driver_plus4 = c16_frame_interrupt, 1, ted7360_raster_interrupt, TED7360_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif + }, + TED7360NTSC_VRETRACERATE,0, /* frames per second, vblank duration */ + 0, + c16_init_machine, + c16_shutdown_machine, + + /* video hardware */ + 336, /* screen width */ + 216, /* screen height */ + {0, 336 - 1, 0, 216 - 1}, /* visible_area */ + 0, /* graphics decode info */ + sizeof (ted7360_palette) / sizeof (ted7360_palette[0]) / 3, + 0, + c16_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + ted7360_vh_start, + ted7360_vh_stop, + ted7360_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &ted7360_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; + +static struct MachineDriver machine_driver_plus4c = +{ + /* basic machine hardware */ + { + { + CPU_M6510, /* MOS 7501 */ + 1200000, /*TED7360NTSC_CLOCK/2, */ + plus4_readmem, plus4_writemem, + 0, 0, + c16_frame_interrupt, 1, + ted7360_raster_interrupt, TED7360_HRETRACERATE, + }, + C1551_CPU }, TED7360NTSC_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 1000, +#endif + c16_init_machine, + c16_shutdown_machine, + + /* video hardware */ + 336, /* screen width */ + 216, /* screen height */ + {0, 336 - 1, 0, 216 - 1}, /* visible_area */ + 0, /* graphics decode info */ + sizeof (ted7360_palette) / sizeof (ted7360_palette[0]) / 3, + 0, + c16_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, 0, + ted7360_vh_start, + ted7360_vh_stop, + ted7360_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &ted7360_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; + +#ifdef PET_TEST_CODE +static struct MachineDriver machine_driver_plus4v = +{ + /* basic machine hardware */ + { + { + CPU_M6510, /* MOS 7501 */ + 1200000, /*TED7360NTSC_CLOCK/2, */ + plus4_readmem, plus4_writemem, + 0, 0, + c16_frame_interrupt, 1, + ted7360_raster_interrupt, TED7360_HRETRACERATE, + }, + VC1541_CPU + }, + TED7360NTSC_VRETRACERATE, + DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 3000, +#endif c16_init_machine, c16_shutdown_machine, @@ -613,6 +916,7 @@ static struct MachineDriver machine_driver_plus4 = {SOUND_DAC, &vc20tape_sound_interface} } }; +#endif static struct MachineDriver machine_driver_c364 = { @@ -626,9 +930,6 @@ static struct MachineDriver machine_driver_c364 = c16_frame_interrupt, 1, ted7360_raster_interrupt, TED7360_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, TED7360NTSC_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -664,7 +965,7 @@ static const struct IODevice io_c16[] = { IO_CARTSLOT, /* type */ 2, /* normal 1 *//* count */ - NULL, /* file extensions */ + "bin\0rom\0", /* file extensions */ NULL, /* private */ c16_rom_id, /* id */ c16_rom_init, /* init */ @@ -684,15 +985,86 @@ static const struct IODevice io_c16[] = {IO_END} }; -#define io_plus4 io_c16 -#define io_c364 io_c16 +static const struct IODevice io_c16c[] = +{ + IODEVICE_CBM_QUICK, + { + IO_CARTSLOT, /* type */ + 2, /* normal 1 *//* count */ + "bin\0rom\0", /* file extensions */ + NULL, /* private */ + c16_rom_id, /* id */ + c16_rom_init, /* init */ + NULL, /* exit */ + NULL, /* info */ + NULL, /* open */ + NULL, /* close */ + NULL, /* status */ + NULL, /* seek */ + NULL, /* input */ + NULL, /* output */ + NULL, /* input_chunk */ + NULL /* output_chunk */ + }, + IODEVICE_VC20TAPE, + IODEVICE_C1551, + {IO_END} +}; + +#ifdef PET_TEST_CODE +static const struct IODevice io_c16v[] = +{ + IODEVICE_CBM_QUICK, + { + IO_CARTSLOT, /* type */ + 2, /* normal 1 *//* count */ + "bin\0rom\0", /* file extensions */ + NULL, /* private */ + c16_rom_id, /* id */ + c16_rom_init, /* init */ + NULL, /* exit */ + NULL, /* info */ + NULL, /* open */ + NULL, /* close */ + NULL, /* status */ + NULL, /* seek */ + NULL, /* input */ + NULL, /* output */ + NULL, /* input_chunk */ + NULL /* output_chunk */ + }, + IODEVICE_VC20TAPE, + IODEVICE_VC1541, + {IO_END} +}; +#endif -#define init_c16 c16_driver_init -#define init_plus4 plus4_driver_init -#define init_c364 plus4_driver_init +#define io_plus4 io_c16 +#define io_plus4c io_c16c +#define io_plus4v io_c16v +#define io_c364 io_c16 -/* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMPX (1984, c16, 0, c16, c16, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) -COMPX (1984, plus4, c16, plus4, plus4, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) -COMPX (198?, c364, c16, c364, plus4, plus4, "Commodore Business Machines Co.", "Commodore 364 (Prototype)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +#define init_c16 c16_driver_init +#define init_c16c c16_driver_init +#define init_c16v c16_driver_init +#define init_plus4 c16_driver_init +#define init_plus4c c16_driver_init +#define init_plus4v c16_driver_init +#define init_c364 c16_driver_init +/* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ +#ifdef PET_TEST_CODE +COMP ( 1984, c16, 0, c16, c16, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL)") +COMP ( 1984, c16c, c16, c16c, c16c, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL), C1551") +COMP ( 1984, c16v, c16, c16v, c16v, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL), VC1541") +COMP ( 1984, plus4, c16, plus4, plus4, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC)") +COMP ( 1984, plus4c, c16, plus4c, plus4c, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC), C1551") +COMP ( 1984, plus4v, c16, plus4v, plus4v, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC), VC1541") +COMP ( 198?, c364, c16, c364, plus4, plus4, "Commodore Business Machines Co.", "Commodore 364 (Prototype)") +#else +COMPX ( 1984, c16, 0, c16, c16, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +COMPX ( 1984, c16c, c16, c16c, c16c, c16, "Commodore Business Machines Co.", "Commodore C16/C116/C232/C264 (PAL), C1551", GAME_NOT_WORKING | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +COMPX ( 1984, plus4, c16, plus4, plus4, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +COMPX ( 1984, plus4c, c16, plus4c, plus4c, plus4, "Commodore Business Machines Co.", "Commodore +4 (NTSC), C1551", GAME_NOT_WORKING | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +COMPX ( 198?, c364, c16, c364, plus4, plus4, "Commodore Business Machines Co.", "Commodore 364 (Prototype)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND) +#endif diff --git a/src/mess/systems/c64.c b/src/mess/systems/c64.c index a894c3e0b..20372a513 100644 --- a/src/mess/systems/c64.c +++ b/src/mess/systems/c64.c @@ -488,9 +488,6 @@ ROM_START (c64) ROM_LOAD ("basic.a0", 0x10000, 0x2000, 0xf833d117) ROM_LOAD ("kernel3.e0", 0x12000, 0x2000, 0xdbe3e7c7) ROM_LOAD ("char.do", 0x14000, 0x1000, 0xec4272ee) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END ROM_START (c64pal) @@ -498,9 +495,6 @@ ROM_START (c64pal) ROM_LOAD ("basic.a0", 0x10000, 0x2000, 0xf833d117) ROM_LOAD ("kernel3.e0", 0x12000, 0x2000, 0xdbe3e7c7) ROM_LOAD ("char.do", 0x14000, 0x1000, 0xec4272ee) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END ROM_START (sx64) @@ -508,9 +502,7 @@ ROM_START (sx64) ROM_LOAD ("basic.a0", 0x10000, 0x2000, 0xf833d117) ROM_LOAD( "sx64.e0", 0x12000, 0x2000, 0x2c5965d4 ) ROM_LOAD ("char.do", 0x14000, 0x1000, 0xec4272ee) -#ifdef VC1541 VC1541_ROM (REGION_CPU2) -#endif ROM_END ROM_START (pet64) @@ -518,9 +510,6 @@ ROM_START (pet64) ROM_LOAD ("basic.a0", 0x10000, 0x2000, 0xf833d117) ROM_LOAD( "4064.e0", 0x12000, 0x2000, 0x789c8cc5 ) ROM_LOAD ("char.do", 0x14000, 0x1000, 0xec4272ee) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END #if 0 @@ -597,9 +586,6 @@ static struct MachineDriver machine_driver_c64 = c64_frame_interrupt, 1, vic2_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -640,9 +626,6 @@ static struct MachineDriver machine_driver_pet64 = c64_frame_interrupt, 1, vic2_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -683,9 +666,6 @@ static struct MachineDriver machine_driver_c64pal = c64_frame_interrupt, 1, vic2_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, VIC6569_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -715,7 +695,7 @@ static struct MachineDriver machine_driver_c64pal = } }; -static struct MachineDriver machine_driver_c64_notape = +static struct MachineDriver machine_driver_c64gs = { /* basic machine hardware */ { @@ -727,9 +707,6 @@ static struct MachineDriver machine_driver_c64_notape = c64_frame_interrupt, 1, vic2_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -758,7 +735,7 @@ static struct MachineDriver machine_driver_c64_notape = } }; -static struct MachineDriver machine_driver_c64pal_notape = +static struct MachineDriver machine_driver_sx64 = { /* basic machine hardware */ { @@ -770,9 +747,7 @@ static struct MachineDriver machine_driver_c64pal_notape = c64_frame_interrupt, 1, vic2_raster_irq, VIC2_HRETRACERATE, }, -#ifdef VC1541 - VC1541_CPU (REGION_CPU2) -#endif + VC1541_CPU }, VIC6569_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -845,8 +820,10 @@ static struct MachineDriver machine_driver_ultimax = static const struct IODevice io_c64[] = { IODEVICE_CBM_QUICK, - IODEVICE_CBM_ROM(c64_rom_id), + IODEVICE_CBM_ROM("crt\080\0", c64_rom_id), +#ifdef PET_TEST_CODE IODEVICE_VC20TAPE, +#endif IODEVICE_CBM_DRIVE, {IO_END} }; @@ -854,22 +831,24 @@ static const struct IODevice io_c64[] = static const struct IODevice io_sx64[] = { IODEVICE_CBM_QUICK, - IODEVICE_CBM_ROM(c64_rom_id), - IODEVICE_CBM_DRIVE, + IODEVICE_CBM_ROM("crt\080\0", c64_rom_id), + IODEVICE_VC1541, {IO_END} }; static const struct IODevice io_ultimax[] = { IODEVICE_CBM_QUICK, - IODEVICE_CBM_ROM(c64_rom_id), + IODEVICE_CBM_ROM("crt\0e0\0f0\0", c64_rom_id), +#ifdef PET_TEST_CODE IODEVICE_VC20TAPE, +#endif {IO_END} }; static const struct IODevice io_c64gs[] = { - IODEVICE_CBM_ROM(c64_rom_id), + IODEVICE_CBM_ROM("crt\080\0", c64_rom_id), {IO_END} }; @@ -892,14 +871,14 @@ COMP (1982, max, 0, ultimax, ultimax,ultimax,"Commodore Business Machines Co. COMP (1982, c64, 0, c64, c64, c64, "Commodore Business Machines Co.", "Commodore C64 (NTSC)") COMP (1982, cbm4064, c64, pet64, c64, c64, "Commodore Business Machines Co.", "Commodore CBM4064/Pet64/Educator64 (NTSC)") COMP (1982, c64pal, c64, c64pal, c64, c64pal, "Commodore Business Machines Co.", "Commodore C64/VC64/VIC64 (PAL)") -COMP (1983, sx64, c64, c64pal_notape, sx64, sx64, "Commodore Business Machines Co.", "Commodore SX64/VIP64 (PAL)") -CONS (1987, c64gs, c64, c64_notape, c64gs, c64gs, "Commodore Business Machines Co.", "Commodore C64GS (NTSC)") +COMP (1983, sx64, c64, sx64, sx64, sx64, "Commodore Business Machines Co.", "Commodore SX64/VIP64 (PAL)") +CONS (1987, c64gs, c64, c64gs, c64gs, c64gs, "Commodore Business Machines Co.", "Commodore C64GS (NTSC)") #else /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ COMPX(1982, max, 0, ultimax, ultimax,ultimax,"Commodore Business Machines Co.", "Commodore Max (VIC10/Ultimax/Vickie)", GAME_NO_SOUND) COMPX(1982, c64, 0, c64, c64, c64, "Commodore Business Machines Co.", "Commodore C64 (NTSC)", GAME_NO_SOUND) COMPX(1982, cbm4064, c64, pet64, c64, c64, "Commodore Business Machines Co.", "Commodore CBM4064/Pet64/Educator64 (NTSC)", GAME_NO_SOUND) COMPX(1982, c64pal, c64, c64pal, c64, c64pal, "Commodore Business Machines Co.", "Commodore C64/VC64/VIC64 (PAL)", GAME_NO_SOUND) -COMPX(1983, sx64, c64, c64pal_notape, sx64, sx64, "Commodore Business Machines Co.", "Commodore SX64/VIP64 (PAL)", GAME_NO_SOUND) -CONSX(1987, c64gs, c64, c64_notape, c64gs, c64gs, "Commodore Business Machines Co.", "Commodore C64GS (NTSC)", GAME_NO_SOUND) +COMPX(1983, sx64, c64, sx64, sx64, sx64, "Commodore Business Machines Co.", "Commodore SX64/VIP64 (PAL)", GAME_NOT_WORKING|GAME_NO_SOUND) +CONSX(1987, c64gs, c64, c64gs, c64gs, c64gs, "Commodore Business Machines Co.", "Commodore C64GS (NTSC)", GAME_NO_SOUND) #endif diff --git a/src/mess/systems/c65.c b/src/mess/systems/c65.c index 2a96c0bd0..3f8d821a0 100644 --- a/src/mess/systems/c65.c +++ b/src/mess/systems/c65.c @@ -82,7 +82,7 @@ expansion modules c64 (adapter needed) no other expansion modules no userport no rs232/v.24 interface -quickloader +preliminary quickloader Keys ---- @@ -444,17 +444,11 @@ static void c65_init_palette (unsigned char *sys_palette, unsigned short *sys_co ROM_START (c65) ROM_REGION (0x100000, REGION_CPU1) ROM_LOAD ("910828.bin", 0x20000, 0x20000, 0x3ee40b06) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END ROM_START (c65ger) ROM_REGION (0x100000, REGION_CPU1) ROM_LOAD ("910429.bin", 0x20000, 0x20000, 0xb025805c) -#ifdef VC1541 - VC1541_ROM (REGION_CPU2) -#endif ROM_END static struct MachineDriver machine_driver_c65 = @@ -470,9 +464,6 @@ static struct MachineDriver machine_driver_c65 = vic2_raster_irq, VIC2_HRETRACERATE, (void*)c65_map }, -#ifdef VC1541 - VC1541_CPU -#endif }, VIC6567_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 0, @@ -518,9 +509,6 @@ static struct MachineDriver machine_driver_c65pal = vic2_raster_irq, VIC2_HRETRACERATE, (void*)c65_map }, -#ifdef VC1541 - VC1541_CPU -#endif }, VIC6569_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ @@ -556,8 +544,8 @@ static struct MachineDriver machine_driver_c65pal = static const struct IODevice io_c65[] = { -#ifdef PET_TEST_CODE - IODEVICE_CBM_QUICK, + IODEVICE_CBM_C65_QUICK, +#if 0 IODEVICE_CBM_ROM(c64_rom_id), IODEVICE_CBM_DRIVE, #endif @@ -571,9 +559,9 @@ static const struct IODevice io_c65[] = /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ #ifdef PET_TEST_CODE -COMP ( 199?, c65, 0, c65, c65, c65, "Commodore Business Machines Co.", "Commodore C65 Prototype (C64DX) (NTSC)") -COMP ( 199?, c65ger, c65, c65pal, c65ger, c65, "Commodore Business Machines Co.", "Commodore C65 Prototype German (C64DX) (PAL)") +COMP ( 199?, c65, 0, c65, c65, c65, "Commodore Business Machines Co.", "Commodore C65/C64DX (Prototype) NTSC") +COMP ( 199?, c65ger, c65, c65pal, c65ger, c65, "Commodore Business Machines Co.", "Commodore C65/C64DX (Prototype) German (PAL)") #else -COMPX ( 199?, c65, 0, c65, c65, c65, "Commodore Business Machines Co.", "Commodore C65 Prototype (C64DX) (NTSC)", GAME_NOT_WORKING | GAME_NO_SOUND) -COMPX ( 199?, c65ger, c65, c65pal, c65ger, c65, "Commodore Business Machines Co.", "Commodore C65 Prototype German (C64DX) (PAL)", GAME_NOT_WORKING | GAME_NO_SOUND) +COMPX ( 199?, c65, 0, c65, c65, c65, "Commodore Business Machines Co.", "Commodore C65/C64DX (Prototype) NTSC", GAME_NOT_WORKING | GAME_NO_SOUND) +COMPX ( 199?, c65ger, c65, c65pal, c65ger, c65, "Commodore Business Machines Co.", "Commodore C65/C64DX (Prototype) German (PAL)", GAME_NOT_WORKING | GAME_NO_SOUND) #endif diff --git a/src/mess/systems/cbmb.c b/src/mess/systems/cbmb.c index 5206a3443..77fa84e0b 100644 --- a/src/mess/systems/cbmb.c +++ b/src/mess/systems/cbmb.c @@ -121,6 +121,7 @@ no ieee488 support no internal userport support no internal slot1/slot2 support no internal cpu/dram slot support +preliminary quickloader state 600/700 ------------- @@ -223,19 +224,19 @@ static struct MemoryReadAddress cbmb_readmem[] = {0xf0002, 0xf07ff, MRA_RAM }, #if 0 {0xf0800, 0xf1fff, MRA_ROM }, - {0xf2000, 0xf3fff, MRA_ROM }, // cartridges or ram + {0xf2000, 0xf3fff, MRA_ROM }, /* cartridges or ram */ {0xf4000, 0xf5fff, MRA_ROM }, {0xf6000, 0xf7fff, MRA_ROM }, #endif {0xf8000, 0xfbfff, MRA_ROM }, - // {0xfc000, 0xfcfff, MRA_ROM }, + /* {0xfc000, 0xfcfff, MRA_ROM }, */ {0xfd000, 0xfd7ff, MRA_ROM }, {0xfd800, 0xfd8ff, crtc6845_port_r }, - // disk units + /* disk units */ {0xfda00, 0xfdaff, sid6581_0_port_r }, - // db00 coprocessor + /* db00 coprocessor */ {0xfdc00, 0xfdcff, cia6526_0_port_r }, - // dd00 acia + /* dd00 acia */ {0xfde00, 0xfdeff, tpi6525_0_port_r}, {0xfdf00, 0xfdfff, tpi6525_1_port_r}, {0xfe000, 0xfffff, MRA_ROM }, @@ -255,13 +256,13 @@ static struct MemoryWriteAddress cbmb_writemem[] = {0x20002, 0x2ffff, MWA_RAM }, {0x30000, 0x30000, m6509_write_00000 }, {0x30001, 0x30001, m6509_write_00001 }, - {0x30002, 0x3ffff, MWA_NOP }, + {0x30002, 0x3ffff, MWA_RAM }, {0x40000, 0x40000, m6509_write_00000 }, {0x40001, 0x40001, m6509_write_00001 }, {0x40002, 0x4ffff, MWA_RAM }, {0x50000, 0x50000, m6509_write_00000 }, {0x50001, 0x50001, m6509_write_00001 }, - {0x50002, 0x5ffff, MWA_RAM }, + {0x50002, 0x5ffff, MWA_NOP }, {0x60000, 0x60000, m6509_write_00000 }, {0x60001, 0x60001, m6509_write_00001 }, {0x60002, 0x6ffff, MWA_RAM }, @@ -293,18 +294,18 @@ static struct MemoryWriteAddress cbmb_writemem[] = {0xf0001, 0xf0001, m6509_write_00001 }, {0xf0002, 0xf07ff, MWA_RAM }, #if 0 - {0xf2000, 0xf3fff, MWA_ROM }, // cartridges + {0xf2000, 0xf3fff, MWA_ROM }, /* cartridges */ {0xf4000, 0xf5fff, MWA_ROM }, {0xf6000, 0xf7fff, MWA_ROM }, #endif {0xf8000, 0xfbfff, MWA_ROM, &cbmb_basic }, - {0xfd000, 0xfd7ff, crtc6845_videoram_w, &cbmb_videoram }, // VIDEORAM + {0xfd000, 0xfd7ff, crtc6845_videoram_w, &cbmb_videoram }, /* VIDEORAM */ {0xfd800, 0xfd8ff, crtc6845_port_w }, - // disk units + /* disk units */ {0xfda00, 0xfdaff, sid6581_0_port_w}, - // db00 coprocessor + /* db00 coprocessor */ {0xfdc00, 0xfdcff, cia6526_0_port_w}, - // dd00 acia + /* dd00 acia */ {0xfde00, 0xfdeff, tpi6525_0_port_w}, {0xfdf00, 0xfdfff, tpi6525_1_port_w}, {0xfe000, 0xfffff, MWA_ROM, &cbmb_kernal }, @@ -364,20 +365,20 @@ static struct MemoryReadAddress cbm500_readmem[] = {0xf0002, 0xf07ff, MRA_RAM }, #if 0 {0xf0800, 0xf1fff, MRA_ROM }, - {0xf2000, 0xf3fff, MRA_ROM }, // cartridges or ram + {0xf2000, 0xf3fff, MRA_ROM }, /* cartridges or ram */ {0xf4000, 0xf5fff, MRA_ROM }, {0xf6000, 0xf7fff, MRA_ROM }, #endif {0xf8000, 0xfbfff, MRA_ROM }, - // {0xfc000, 0xfcfff, MRA_ROM }, - {0xfd000, 0xfd3ff, MRA_RAM }, // videoram - {0xfd400, 0xfd7ff, MRA_RAM }, // colorram + /* {0xfc000, 0xfcfff, MRA_ROM }, */ + {0xfd000, 0xfd3ff, MRA_RAM }, /* videoram */ + {0xfd400, 0xfd7ff, MRA_RAM }, /* colorram */ {0xfd800, 0xfd8ff, vic2_port_r }, - // disk units + /* disk units */ {0xfda00, 0xfdaff, sid6581_0_port_r }, - // db00 coprocessor + /* db00 coprocessor */ {0xfdc00, 0xfdcff, cia6526_0_port_r }, - // dd00 acia + /* dd00 acia */ {0xfde00, 0xfdeff, tpi6525_0_port_r}, {0xfdf00, 0xfdfff, tpi6525_1_port_r}, {0xfe000, 0xfffff, MRA_ROM }, @@ -435,7 +436,7 @@ static struct MemoryWriteAddress cbm500_writemem[] = {0xf0001, 0xf0001, m6509_write_00001 }, {0xf0002, 0xf07ff, MWA_RAM }, #if 0 - {0xf2000, 0xf3fff, MWA_ROM }, // cartridges + {0xf2000, 0xf3fff, MWA_ROM }, /* cartridges */ {0xf4000, 0xf5fff, MWA_ROM }, {0xf6000, 0xf7fff, MWA_ROM }, #endif @@ -443,11 +444,11 @@ static struct MemoryWriteAddress cbm500_writemem[] = {0xfd000, 0xfd3ff, MWA_RAM, &cbmb_videoram }, {0xfd400, 0xfd7ff, cbmb_colorram_w, &cbmb_colorram }, {0xfd800, 0xfd8ff, vic2_port_w }, - // disk units + /* disk units */ {0xfda00, 0xfdaff, sid6581_0_port_w}, - // db00 coprocessor + /* db00 coprocessor */ {0xfdc00, 0xfdcff, cia6526_0_port_w}, - // dd00 acia + /* dd00 acia */ {0xfde00, 0xfdeff, tpi6525_0_port_w}, {0xfdf00, 0xfdfff, tpi6525_1_port_w}, {0xfe000, 0xfffff, MWA_ROM, &cbmb_kernal }, @@ -567,8 +568,8 @@ INPUT_PORTS_START (cbm600) DIPS_HELPER( 0x0040, "GRAPH NORM", KEYCODE_PGUP) CBMB_KEYBOARD2 PORT_START -#ifdef PET_TEST_CODE DIPS_HELPER( 0x8000, "Quickload", KEYCODE_F8) +#ifdef PET_TEST_CODE PORT_DIPNAME ( 0x4000, 0x4000, "Tape Drive/Device 1") PORT_DIPSETTING( 0, DEF_STR( Off ) ) PORT_DIPSETTING(0x4000, DEF_STR( On ) ) @@ -589,8 +590,8 @@ INPUT_PORTS_START (cbm600pal) DIPS_HELPER( 0x0040, "ASCII DIN", KEYCODE_PGUP) CBMB_KEYBOARD2 PORT_START -#ifdef PET_TEST_CODE DIPS_HELPER( 0x8000, "Quickload", KEYCODE_F8) +#ifdef PET_TEST_CODE PORT_DIPNAME ( 0x4000, 0x4000, "Tape Drive/Device 1") PORT_DIPSETTING( 0, DEF_STR( Off ) ) PORT_DIPSETTING(0x4000, DEF_STR( On ) ) @@ -611,8 +612,8 @@ INPUT_PORTS_START (cbm700) DIPS_HELPER( 0x0040, "GRAPH NORM", KEYCODE_PGUP) CBMB_KEYBOARD2 PORT_START -#ifdef PET_TEST_CODE DIPS_HELPER( 0x8000, "Quickload", KEYCODE_F8) +#ifdef PET_TEST_CODE PORT_DIPNAME ( 0x4000, 0x4000, "Tape Drive/Device 1") PORT_DIPSETTING( 0, DEF_STR( Off ) ) PORT_DIPSETTING(0x4000, DEF_STR( On ) ) @@ -633,8 +634,8 @@ INPUT_PORTS_START (cbm500) DIPS_HELPER( 0x0040, "GRAPH NORM", KEYCODE_PGUP) CBMB_KEYBOARD2 PORT_START -#ifdef PET_TEST_CODE DIPS_HELPER( 0x8000, "Quickload", KEYCODE_F8) +#ifdef PET_TEST_CODE PORT_DIPNAME ( 0x4000, 0x4000, "Tape Drive/Device 1") PORT_DIPSETTING( 0, DEF_STR( Off ) ) PORT_DIPSETTING(0x4000, DEF_STR( On ) ) @@ -647,7 +648,7 @@ INPUT_PORTS_START (cbm500) #endif PORT_BIT (0x200, 0x000, IPT_UNUSED) /* not used */ PORT_BIT (0x100, 0x000, IPT_UNUSED) /* not used */ - //C64_DIPS + /*C64_DIPS */ INPUT_PORTS_END unsigned char cbm700_palette[] = @@ -1001,10 +1002,15 @@ static struct MachineDriver machine_driver_cbm500 = static const struct IODevice io_cbmb[] = { -#if 0 - IODEVICE_CBM_QUICK, + IODEVICE_CBMB_QUICK, + /* monitor OR tape routine in kernal */ + {IO_END} +}; + +static const struct IODevice io_cbm500[] = +{ + IODEVICE_CBM500_QUICK, /* monitor OR tape routine in kernal */ -#endif {IO_END} }; @@ -1017,7 +1023,6 @@ static const struct IODevice io_cbmb[] = #define io_cbm720 io_cbmb #define io_cbm610 io_cbmb #define io_cbm620 io_cbmb -#define io_cbm500 io_cbmb #if 0 #define rom_cbm730 rom_cbmb256hp diff --git a/src/mess/systems/dragon.c b/src/mess/systems/dragon.c index e404d9d66..19f631ec4 100644 --- a/src/mess/systems/dragon.c +++ b/src/mess/systems/dragon.c @@ -3,12 +3,6 @@ Mathis Rosenhauer Nate Woods - TODO - Implement missing SAM registers - Page ($FFD4-$FFD5) - CPU Rate ($FFD6-$FFD8) (currently we double the speed on both sides) - Memory Size ($FFDA-$FFDD) (we never limit the memory size) - ******************************************************************************/ #include "driver.h" #include "machine/6821pia.h" @@ -34,7 +28,6 @@ extern void coco_cassette_exit(int id); extern int dragon32_rom_load(int id); extern int dragon64_rom_load(int id); extern int coco3_rom_load(int id); - extern int dragon_mapped_irq_r(int offset); extern int coco3_mapped_irq_r(int offset); extern void dragon64_sam_himemmap(int offset, int data); @@ -46,6 +39,8 @@ extern void coco3_gime_w(int offset, int data); extern void dragon_sam_speedctrl(int offset, int data); extern void dragon_sam_page_mode(int offset, int data); extern void dragon_sam_memory_size(int offset, int data); +extern int coco3_floppy_r(int offset); +extern void coco3_floppy_w(int offset, int data); extern int dragon_vh_start(void); extern int coco3_vh_start(void); @@ -126,7 +121,7 @@ static struct MemoryReadAddress coco3_readmem[] = { 0xe000, 0xfeff, MRA_BANK8 }, { 0xff00, 0xff1f, pia_0_r }, { 0xff20, 0xff3f, pia_1_r }, - { 0xff40, 0xff5f, coco_floppy_r }, + { 0xff40, 0xff5f, coco3_floppy_r }, { 0xff90, 0xff97, coco3_gime_r }, { 0xff98, 0xff9f, coco3_gimevh_r }, { 0xffa0, 0xffaf, coco3_mmu_r }, @@ -152,7 +147,7 @@ static struct MemoryWriteAddress coco3_writemem[] = { 0xe000, 0xfeff, MWA_BANK8 }, { 0xff00, 0xff1f, pia_0_w }, { 0xff20, 0xff3f, pia_1_w }, - { 0xff40, 0xff5f, coco_floppy_w }, + { 0xff40, 0xff5f, coco3_floppy_w }, { 0xff90, 0xff97, coco3_gime_w }, { 0xff98, 0xff9f, coco3_gimevh_w }, { 0xffa0, 0xffaf, coco3_mmu_w }, @@ -234,6 +229,8 @@ INPUT_PORTS_START( dragon32 ) PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "UP", KEYCODE_UP, IP_JOY_NONE) PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "DOWN", KEYCODE_DOWN, IP_JOY_NONE) PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT", KEYCODE_LEFT, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Backspace)", KEYCODE_BACKSPACE, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Del)", KEYCODE_DEL, IP_JOY_NONE) PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "RIGHT", KEYCODE_RIGHT, IP_JOY_NONE) PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SPACE", KEYCODE_SPACE, IP_JOY_NONE) @@ -241,8 +238,10 @@ INPUT_PORTS_START( dragon32 ) PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "ENTER", KEYCODE_ENTER, IP_JOY_NONE) PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "CLEAR", KEYCODE_HOME, IP_JOY_NONE) PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK", KEYCODE_END, IP_JOY_NONE) + PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK (Esc)", KEYCODE_ESC, IP_JOY_NONE) PORT_BITX(0x78, IP_ACTIVE_LOW, IPT_UNUSED, DEF_STR( Unused ), IP_KEY_NONE, IP_JOY_NONE) - PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "L-SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "R-SHIFT", KEYCODE_RSHIFT, IP_JOY_NONE) PORT_START /* 7 */ PORT_ANALOGX( 0xff, 0x80, IPT_AD_STICK_X, 100, 10, 0x0, 0xff, KEYCODE_LEFT, KEYCODE_RIGHT, JOYCODE_1_LEFT, JOYCODE_1_RIGHT) @@ -309,6 +308,8 @@ INPUT_PORTS_START( coco ) PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "UP", KEYCODE_UP, IP_JOY_NONE) PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "DOWN", KEYCODE_DOWN, IP_JOY_NONE) PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT", KEYCODE_LEFT, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Backspace)", KEYCODE_BACKSPACE, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Del)", KEYCODE_DEL, IP_JOY_NONE) PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "RIGHT", KEYCODE_RIGHT, IP_JOY_NONE) PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SPACE", KEYCODE_SPACE, IP_JOY_NONE) @@ -336,8 +337,10 @@ INPUT_PORTS_START( coco ) PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "ENTER", KEYCODE_ENTER, IP_JOY_NONE) PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "CLEAR", KEYCODE_HOME, IP_JOY_NONE) PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK", KEYCODE_END, IP_JOY_NONE) + PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK (Esc)", KEYCODE_ESC, IP_JOY_NONE) PORT_BITX(0x78, IP_ACTIVE_LOW, IPT_UNUSED, DEF_STR( Unused ), IP_KEY_NONE, IP_JOY_NONE) - PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "L-SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "R-SHIFT", KEYCODE_RSHIFT, IP_JOY_NONE) PORT_START /* 7 */ PORT_ANALOGX( 0xff, 0x80, IPT_AD_STICK_X, 100, 10, 0, 0xff, KEYCODE_LEFT, KEYCODE_RIGHT, JOYCODE_1_LEFT, JOYCODE_1_RIGHT) @@ -405,6 +408,8 @@ INPUT_PORTS_START( coco3 ) PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "UP", KEYCODE_UP, IP_JOY_NONE) PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "DOWN", KEYCODE_DOWN, IP_JOY_NONE) PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT", KEYCODE_LEFT, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Backspace)", KEYCODE_BACKSPACE, IP_JOY_NONE) + PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT (Del)", KEYCODE_DEL, IP_JOY_NONE) PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "RIGHT", KEYCODE_RIGHT, IP_JOY_NONE) PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SPACE", KEYCODE_SPACE, IP_JOY_NONE) @@ -432,11 +437,13 @@ INPUT_PORTS_START( coco3 ) PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "ENTER", KEYCODE_ENTER, IP_JOY_NONE) PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "CLEAR", KEYCODE_HOME, IP_JOY_NONE) PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK", KEYCODE_END, IP_JOY_NONE) + PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "BREAK (Esc)", KEYCODE_ESC, IP_JOY_NONE) PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "ALT", KEYCODE_LALT, IP_JOY_NONE) PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "CTRL", KEYCODE_LCONTROL, IP_JOY_NONE) PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "F1", KEYCODE_F1, IP_JOY_NONE) PORT_BITX(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "F2", KEYCODE_F2, IP_JOY_NONE) - PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "L-SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "R-SHIFT", KEYCODE_RSHIFT, IP_JOY_NONE) PORT_START /* 7 */ PORT_ANALOGX( 0xff, 0x80, IPT_AD_STICK_X, 100, 10, 0, 0xff, KEYCODE_LEFT, KEYCODE_RIGHT, JOYCODE_1_LEFT, JOYCODE_1_RIGHT) diff --git a/src/mess/systems/enterp.c b/src/mess/systems/enterp.c index e6a0286e1..8cc4ac2e0 100644 --- a/src/mess/systems/enterp.c +++ b/src/mess/systems/enterp.c @@ -688,6 +688,6 @@ static const struct IODevice io_ep128[] = { ***************************************************************************/ /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1985, ep128, 0, ep128, ep128, 0, "Intelligent Software", "Enterprise 128K" ) +COMPX( 1985, ep128, 0, ep128, ep128, 0, "Intelligent Software", "Enterprise 128K", GAME_NO_SOUND ) diff --git a/src/mess/systems/msx.c b/src/mess/systems/msx.c index 7dccc34b6..095260fda 100644 --- a/src/mess/systems/msx.c +++ b/src/mess/systems/msx.c @@ -71,7 +71,7 @@ INPUT_PORTS_START( msx ) PORT_START /* 1 */ PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "8 *", KEYCODE_8, IP_JOY_NONE) PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "9 (", KEYCODE_9, IP_JOY_NONE) - PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "- )", KEYCODE_MINUS, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "- _", KEYCODE_MINUS, IP_JOY_NONE) PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "= +", KEYCODE_EQUALS, IP_JOY_NONE) PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "\\ |", KEYCODE_BACKSLASH, IP_JOY_NONE) PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "[ {", KEYCODE_OPENBRACE, IP_JOY_NONE) @@ -168,6 +168,116 @@ INPUT_PORTS_START( msx ) INPUT_PORTS_END +INPUT_PORTS_START( msxuk ) + PORT_START /* 0 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "0 )", KEYCODE_0, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "1 !", KEYCODE_1, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "2 @", KEYCODE_2, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "3 #", KEYCODE_3, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "4 $", KEYCODE_4, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "5 %", KEYCODE_5, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "6 ^", KEYCODE_6, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "7 &", KEYCODE_7, IP_JOY_NONE) + + PORT_START /* 1 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "8 *", KEYCODE_8, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "9 (", KEYCODE_9, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "- _", KEYCODE_MINUS, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "= +", KEYCODE_EQUALS, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "\\ |", KEYCODE_BACKSLASH, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "[ {", KEYCODE_OPENBRACE, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "] }", KEYCODE_CLOSEBRACE, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "; :", KEYCODE_COLON, IP_JOY_NONE) + + PORT_START /* 2 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "' \"", KEYCODE_QUOTE, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "POUND STERLING ~", KEYCODE_TILDE, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, ", <", KEYCODE_COMMA, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, ". >", KEYCODE_STOP, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "/ ?", KEYCODE_SLASH, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "Dead Key", KEYCODE_NONE, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "a A", KEYCODE_A, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "b B", KEYCODE_B, IP_JOY_NONE) + + PORT_START /* 3 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "c C", KEYCODE_C, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "d D", KEYCODE_D, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "e E", KEYCODE_E, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "f F", KEYCODE_F, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "g G", KEYCODE_G, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "h H", KEYCODE_H, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "i I", KEYCODE_I, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "j J", KEYCODE_J, IP_JOY_NONE) + + PORT_START /* 4 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "k K", KEYCODE_K, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "l L", KEYCODE_L, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "m M", KEYCODE_M, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "n N", KEYCODE_N, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "o O", KEYCODE_O, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "p P", KEYCODE_P, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "q Q", KEYCODE_Q, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "r R", KEYCODE_R, IP_JOY_NONE) + + PORT_START /* 5 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "s S", KEYCODE_S, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "t T", KEYCODE_T, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "u U", KEYCODE_U, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "v V", KEYCODE_V, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "w W", KEYCODE_W, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "x X", KEYCODE_X, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "y Y", KEYCODE_Y, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "z Z", KEYCODE_Z, IP_JOY_NONE) + + PORT_START /* 6 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "SHIFT", KEYCODE_LSHIFT, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "CTRL", KEYCODE_LCONTROL, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "GRAPH", KEYCODE_PGUP, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "CAPS", KEYCODE_CAPSLOCK, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "CODE", KEYCODE_PGDN, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "F1", KEYCODE_F1, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "F2", KEYCODE_F2, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "F3", KEYCODE_F3, IP_JOY_NONE) + + PORT_START /* 7 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "F4", KEYCODE_F4, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "F5", KEYCODE_F5, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "ESC", KEYCODE_ESC, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "TAB", KEYCODE_TAB, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "STOP", KEYCODE_RCONTROL, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "BACKSPACE", KEYCODE_BACKSPACE, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "SELECT", KEYCODE_END, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "ENTER", KEYCODE_ENTER, IP_JOY_NONE) + + PORT_START /* 8 */ + PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "SPACE", KEYCODE_SPACE, IP_JOY_NONE) + PORT_BITX (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD, "HOME", KEYCODE_HOME, IP_JOY_NONE) + PORT_BITX (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD, "INSERT", KEYCODE_INSERT, IP_JOY_NONE) + PORT_BITX (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD, "DEL", KEYCODE_DEL, IP_JOY_NONE) + PORT_BITX (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD, "LEFT", KEYCODE_LEFT, IP_JOY_NONE) + PORT_BITX (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD, "UP", KEYCODE_UP, IP_JOY_NONE) + PORT_BITX (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD, "DOWN", KEYCODE_DOWN, IP_JOY_NONE) + PORT_BITX (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD, "RIGHT", KEYCODE_RIGHT, IP_JOY_NONE) + + PORT_START /* 9 */ + PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) + PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) + PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) + PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) + PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_BUTTON1) + PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_BUTTON2) + PORT_BITX (0xc0, IP_ACTIVE_LOW, IPT_UNUSED, DEF_STR( Unused ), IP_KEY_NONE, IP_JOY_NONE) + + PORT_START /* 10 */ + PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2) + PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2) + PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2) + PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2) + PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2) + PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2) + PORT_BITX (0xc0, IP_ACTIVE_LOW, IPT_UNUSED, DEF_STR( Unused ), IP_KEY_NONE, IP_JOY_NONE) +INPUT_PORTS_END + INPUT_PORTS_START( msxj ) PORT_START /* 0 */ PORT_BITX (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "0", KEYCODE_0, IP_JOY_NONE) @@ -343,7 +453,7 @@ static struct MachineDriver machine_driver_msx = msx_interrupt,1 } }, - 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, 1, msx_ch_reset, /* init_machine */ msx_ch_stop, /* stop_machine */ @@ -386,6 +496,59 @@ static struct MachineDriver machine_driver_msx = } }; +static struct MachineDriver machine_driver_msx_pal = +{ + /* basic machine hardware */ + { + { + CPU_Z80, + 3579545, /* 3.579545 Mhz */ + readmem,writemem,readport,writeport, + msx_interrupt,1 + } + }, + 50, DEFAULT_REAL_60HZ_VBLANK_DURATION, + 1, + msx_ch_reset, /* init_machine */ + msx_ch_stop, /* stop_machine */ + + /* video hardware */ + 32*8, 24*8, { 0*8, 32*8-1, 0*8, 24*8-1 }, + gfxdecodeinfo, + TMS9928A_PALETTE_SIZE,TMS9928A_COLORTABLE_SIZE, + tms9928A_init_palette, + + VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_TYPE_RASTER, + 0, + msx_vh_start, + TMS9928A_stop, + TMS9928A_refresh, + + /* sound hardware */ + 0,0,0,0, + { + { + SOUND_AY8910, + &ay8910_interface + }, + { + SOUND_CUSTOM, + &scc_custom_interface + }, + { + SOUND_DAC, + &dac_interface + }, + { + SOUND_YM2413, + &ym2413_interface + }, + { + SOUND_WAVE, + &wave_interface + } + } +}; /*************************************************************************** @@ -403,6 +566,11 @@ ROM_START (msxj) ROM_LOAD ("msxj.rom", 0x0000, 0x8000, 0xee229390) ROM_END +ROM_START (msxuk) + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("msxuk.rom", 0x0000, 0x8000, 0xe9ccd789) +ROM_END + ROM_START (msxkr) ROM_REGION (0x10000, REGION_CPU1) ROM_LOAD ("msxkr.rom", 0x0000, 0x8000, 0x3ab0cd3b) @@ -435,8 +603,10 @@ static const struct IODevice io_msx[] = { #define io_msxj io_msx #define io_msxkr io_msx +#define io_msxuk io_msx /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1983, msx, 0, msx, msx, msx, "ASCII & Microsoft", "MSX1" ) +COMP( 1983, msx, 0, msx_pal, msx, msx, "ASCII & Microsoft", "MSX1" ) COMP( 1983, msxj, msx, msx, msxj, msx, "ASCII & Microsoft", "MSX1 (Japan)" ) COMP( 1983, msxkr, msx, msx, msxj, msx, "ASCII & Microsoft", "MSX1 (Korean)" ) +COMP( 1983, msxuk, msx, msx_pal, msxuk, msx, "ASCII & Microsoft", "MSX1 (UK)" ) diff --git a/src/mess/systems/pce.c b/src/mess/systems/pce.c index c573a120f..2cd8028ed 100644 --- a/src/mess/systems/pce.c +++ b/src/mess/systems/pce.c @@ -269,5 +269,5 @@ static const struct IODevice io_pce[] = { ***************************************************************************/ /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -CONSX( 1987, pce, 0, pce, pce, 0, "Nippon Electronic Company", "PC-Engine", GAME_NOT_WORKING ) +CONSX( 1987, pce, 0, pce, pce, 0, "Nippon Electronic Company", "PC-Engine", GAME_NOT_WORKING | GAME_NO_SOUND ) diff --git a/src/mess/systems/pet.c b/src/mess/systems/pet.c index 84c4cabc5..76baf92c2 100644 --- a/src/mess/systems/pet.c +++ b/src/mess/systems/pet.c @@ -828,22 +828,22 @@ static const struct IODevice io_pet2[] = #define rom_cbm80swe rom_pet80swe #ifdef PET_TEST_CODE -COMP (1977, pet, 0, pet, pet, pet1, "Commodore Business Machines Co.", "Commodore PET2000/CBM2000 Series (Basic 1)") -COMP (198 ?, cbm30, pet, pet, pet, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2)") -COMP (198 ?, cbm30b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2) (business keyboard)") +COMP (1977, pet, 0, pet, pet, pet1, "Commodore Business Machines Co.", "Commodore PET2001/CBM2000 Series (Basic 1)") +COMP (1979, cbm30, pet, pet, pet, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2)") +COMP (1979, cbm30b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2) (business keyboard)") COMP (198 ?, cbm40, pet, pet40, pet, pet40, "Commodore Business Machines Co.", "Commodore CBM4000 FAT Series (CRTC 50Hz)") COMP (198 ?, cbm40b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM4000 THIN Series (business keyboard)") -COMP (198 ?, cbm80, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 60Hz") +COMP (1980, cbm80, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 60Hz") COMP (198 ?, cbm80ger, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 German (50Hz)") COMP (198 ?, cbm80swe, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 Swedish (50Hz)") #else /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMPX (1977, pet, 0, pet, pet, pet1, "Commodore Business Machines Co.", "Commodore PET2000/CBM2000 Series (Basic 1)", GAME_NO_SOUND) -COMPX (198 ?, cbm30, pet, pet, pet, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2)", GAME_NO_SOUND) -COMPX (198 ?, cbm30b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2) (business keyboard)", GAME_NO_SOUND) +COMPX (1977, pet, 0, pet, pet, pet1, "Commodore Business Machines Co.", "Commodore PET2001/CBM2000 Series (Basic 1)", GAME_NO_SOUND) +COMPX (1979, cbm30, pet, pet, pet, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2)", GAME_NO_SOUND) +COMPX (1979, cbm30b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM3000 Series (Basic 2) (business keyboard)", GAME_NO_SOUND) COMPX (198 ?, cbm40, pet, pet40, pet, pet40, "Commodore Business Machines Co.", "Commodore CBM4000 FAT Series (CRTC 50Hz)", GAME_NO_SOUND) COMPX (198 ?, cbm40b, pet, pet, petb, pet, "Commodore Business Machines Co.", "Commodore CBM4000 THIN Series (business keyboard)", GAME_NO_SOUND) -COMPX (198 ?, cbm80, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 60Hz", GAME_NO_SOUND) -COMPX (198 ?, cbm80ger, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 German (50Hz)", GAME_NO_SOUND) -COMPX (198 ?, cbm80swe, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 Swedish (50Hz)", GAME_NO_SOUND) +COMPX (1980, cbm80, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 60Hz", GAME_NO_SOUND) +COMPX (198?, cbm80ger, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 German (50Hz)", GAME_NO_SOUND) +COMPX (198?, cbm80swe, pet, pet80, petb, pet40, "Commodore Business Machines Co.", "Commodore CBM8000 Swedish (50Hz)", GAME_NO_SOUND) #endif diff --git a/src/mess/systems/vc20.c b/src/mess/systems/vc20.c index 57427cd68..4d01ddacf 100644 --- a/src/mess/systems/vc20.c +++ b/src/mess/systems/vc20.c @@ -17,7 +17,7 @@ vc20 commodore vc20 (pal version) ------------------------------------ vic20 ntsc-version - when screen is two wide right or low, + when screen is two wide right or low, or screen doesn't fitt in visible area or gameplay is too fast try the pal version @@ -109,16 +109,16 @@ use LOAD"",1,1 for loading programs to their special address several programs rely on more features (loading other file types, writing, ...) - -Discs ------ -only file load from drive 8 and 9 implemented + +Discs +----- +only file load from drive 8 and 9 implemented loads file from rom directory (*.prg,*.p00)(must NOT be specified on commandline) or file from d64 image (here also directory command LOAD"$",8 supported) -LOAD"filename",8 -or LOAD"filename",8,1 (for loading machine language programs at their address) -for loading -type RUN or the appropriate SYS call to start them +LOAD"filename",8 +or LOAD"filename",8,1 (for loading machine language programs at their address) +for loading +type RUN or the appropriate SYS call to start them several programs rely on more features (loading other file types, writing, ...) @@ -223,17 +223,17 @@ static struct MemoryWriteAddress vc20_writemem[] = PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )\ PORT_START \ PORT_BITX( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2, \ - "Paddle 2 Button", KEYCODE_DEL, 0)\ + "Paddle 2 Button", KEYCODE_DEL, JOYCODE_NONE)\ PORT_BIT ( 0x60, IP_ACTIVE_LOW, IPT_UNUSED )\ PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1, \ - "Paddle 1 Button", KEYCODE_INSERT, 0)\ + "Paddle 1 Button", KEYCODE_INSERT, JOYCODE_NONE)\ PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )\ PORT_START \ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_REVERSE,\ - 30,20,0,255,KEYCODE_HOME,KEYCODE_PGUP,0,0)\ + 30,20,0,255,KEYCODE_HOME,KEYCODE_PGUP,JOYCODE_NONE,JOYCODE_NONE)\ PORT_START \ PORT_ANALOGX(0xff,128,IPT_PADDLE|IPF_PLAYER2|IPF_REVERSE,\ - 30,20,0,255,KEYCODE_END,KEYCODE_PGDN,0,0)\ + 30,20,0,255,KEYCODE_END,KEYCODE_PGDN,JOYCODE_NONE,JOYCODE_NONE)\ PORT_START \ DIPS_HELPER( 0x80, "DEL INST", KEYCODE_BACKSPACE)\ DIPS_HELPER( 0x40, "Pound", KEYCODE_MINUS)\ @@ -324,19 +324,19 @@ static struct MemoryWriteAddress vc20_writemem[] = PORT_DIPSETTING( 3, "16k" )\ PORT_DIPSETTING( 4, "32k" )\ PORT_DIPSETTING( 5, "Custom" )\ - PORT_DIPNAME ( 0x08, 0, " Ram at 0x0400 till 0x0fff")\ + PORT_DIPNAME ( 0x08, 0, " Ram at 0x0400")\ PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )\ - PORT_DIPNAME ( 0x10, 0, " Ram at 0x2000 till 0x3fff")\ + PORT_DIPNAME ( 0x10, 0, " Ram at 0x2000")\ PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )\ - PORT_DIPNAME ( 0x20, 0, " Ram at 0x4000 till 0x5fff")\ + PORT_DIPNAME ( 0x20, 0, " Ram at 0x4000")\ PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )\ - PORT_DIPNAME ( 0x40, 0, " Ram at 0x6000 till 0x7fff")\ + PORT_DIPNAME ( 0x40, 0, " Ram at 0x6000")\ PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )\ - PORT_DIPNAME ( 0x80, 0, " Ram at 0xa000 till 0xbfff")\ + PORT_DIPNAME ( 0x80, 0, " Ram at 0xa000")\ PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )\ PORT_START \ @@ -368,31 +368,30 @@ static struct MemoryWriteAddress vc20_writemem[] = PORT_BITX( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2, "Lightpen Signal", KEYCODE_LALT, 0) INPUT_PORTS_START (vic20) - DIPS_BOTH - PORT_START /* in 16 lightpen X */ - PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER3, - 30, 2, 0, (VIC6560_MAME_XSIZE - 1), - KEYCODE_LEFT, KEYCODE_RIGHT, - JOYCODE_1_LEFT, JOYCODE_1_RIGHT) - PORT_START /* in 17 lightpen Y */ - PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER4, - 30, 2, 0, (VIC6560_MAME_YSIZE - 1), - KEYCODE_UP, KEYCODE_DOWN, JOYCODE_1_UP, JOYCODE_1_DOWN) - + DIPS_BOTH + PORT_START /* in 16 lightpen X */ + PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER3, + 30, 2, 0, (VIC6560_MAME_XSIZE - 1), + KEYCODE_LEFT, KEYCODE_RIGHT, + JOYCODE_1_LEFT, JOYCODE_1_RIGHT) + PORT_START /* in 17 lightpen Y */ + PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER4, + 30, 2, 0, (VIC6560_MAME_YSIZE - 1), + KEYCODE_UP, KEYCODE_DOWN, JOYCODE_1_UP, JOYCODE_1_DOWN) INPUT_PORTS_END INPUT_PORTS_START (vc20) - DIPS_BOTH - PORT_START /* in 16 lightpen X */ - PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER3, - 30, 2, 0, (VIC6561_MAME_XSIZE - 1), - KEYCODE_LEFT, KEYCODE_RIGHT, - JOYCODE_1_LEFT, JOYCODE_1_RIGHT) - PORT_START /* in 17 lightpen Y */ - PORT_ANALOGX (0x1ff, 0, IPT_PADDLE | IPF_PLAYER4, - 30, 2, 0, (VIC6561_MAME_YSIZE - 1), - KEYCODE_UP, KEYCODE_DOWN, - JOYCODE_1_UP, JOYCODE_1_DOWN) + DIPS_BOTH + PORT_START /* in 16 lightpen X */ + PORT_ANALOGX (0xff, 0, IPT_PADDLE | IPF_PLAYER3, + 30, 2, 0, (VIC6561_MAME_XSIZE - 1), + KEYCODE_LEFT, KEYCODE_RIGHT, + JOYCODE_1_LEFT, JOYCODE_1_RIGHT) + PORT_START /* in 17 lightpen Y */ + PORT_ANALOGX (0x1ff, 0, IPT_PADDLE | IPF_PLAYER4, + 30, 2, 0, (VIC6561_MAME_YSIZE - 1), + KEYCODE_UP, KEYCODE_DOWN, + JOYCODE_1_UP, JOYCODE_1_DOWN) INPUT_PORTS_END @@ -406,43 +405,109 @@ static void vc20_init_palette (unsigned char *sys_palette, } #if 0 - /* 901460-03 */ - ROM_LOAD ("chargen.80", 0x8000, 0x1000, 0x83e032a6) - /* 901486-01 */ - ROM_LOAD ("basic.80", 0xc000, 0x2000, 0xdb4c43c1) - /* 901486-06 ntsc */ - ROM_LOAD ("kernal6.c0", 0xe000, 0x2000, 0xe5e7c174) - /* 901486-07 pal */ - ROM_LOAD ("kernal7p.c0", 0xe000, 0x2000, 0x4be07cb4) - - /* patched pal system for swedish/finish keyboard and chars */ - ROM_LOAD ("char.80", 0x8000, 0x1000, 0xd808551d) - ROM_LOAD ("kernal7p.c0", 0xe000, 0x2000, 0xb2a60662) + /* chargen */ + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + /* basic */ + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + /* kernel ntsc */ + ROM_LOAD ("901486.06", 0xe000, 0x2000, 0xe5e7c174) + /* kernel pal */ + ROM_LOAD ("901486.07", 0xe000, 0x2000, 0x4be07cb4) + + /* patched pal system for swedish/finish keyboard and chars */ + ROM_LOAD ("char.80", 0x8000, 0x1000, 0xd808551d) + ROM_LOAD ("kernal7p.c0", 0xe000, 0x2000, 0xb2a60662) + ROM_LOAD ("325329-04.bin", 0xb000, 0x800, 0xd37b6335) #endif ROM_START (vic20) - ROM_REGION (0x10000, REGION_CPU1) - ROM_LOAD ("chargen.80", 0x8000, 0x1000, 0x83e032a6) - ROM_LOAD ("basic.c0", 0xc000, 0x2000, 0xdb4c43c1) - ROM_LOAD ("kernal6.e0", 0xe000, 0x2000, 0xe5e7c174) -#ifdef VC1541 - VC1540_ROM (REGION_CPU2) -#endif + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + ROM_LOAD ("901486.06", 0xe000, 0x2000, 0xe5e7c174) ROM_END -ROM_START (vc20) - ROM_REGION (0x10000, REGION_CPU1) - ROM_LOAD ("chargen.80", 0x8000, 0x1000, 0x83e032a6) - ROM_LOAD ("basic.c0", 0xc000, 0x2000, 0xdb4c43c1) - ROM_LOAD ("kernal7p.e0", 0xe000, 0x2000, 0x4be07cb4) -#ifdef VC1541 - VC1540_ROM (REGION_CPU2) +#ifdef PET_TEST_CODE +ROM_START (vic20v) + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + ROM_LOAD ("901486.06", 0xe000, 0x2000, 0xe5e7c174) + VC1540_ROM (REGION_CPU2) +ROM_END + +ROM_START (vic20i) + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + ROM_LOAD ("325329.04", 0xb000, 0x800, 0xd37b6335) + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + ROM_LOAD ("901486.06", 0xe000, 0x2000, 0xe5e7c174) + C2031_ROM (REGION_CPU2) +ROM_END #endif + +ROM_START (vc20) + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + ROM_LOAD ("901486.07", 0xe000, 0x2000, 0x4be07cb4) ROM_END +#ifdef PET_TEST_CODE +ROM_START (vc20v) + ROM_REGION (0x10000, REGION_CPU1) + ROM_LOAD ("901460.03", 0x8000, 0x1000, 0x83e032a6) + ROM_LOAD ("901486.01", 0xc000, 0x2000, 0xdb4c43c1) + ROM_LOAD ("901486.07", 0xe000, 0x2000, 0x4be07cb4) + VC1541_ROM (REGION_CPU2) +ROM_END +#endif + static struct MachineDriver machine_driver_vic20 = { - /* basic machine hardware */ + /* basic machine hardware */ + { + { + CPU_M6502, + VIC6560_CLOCK, + vc20_readmem, vc20_writemem, + 0, 0, + vc20_frame_interrupt, 1, + vic656x_raster_interrupt, VIC656X_HRETRACERATE, + }, + }, + VIC6560_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ + 0, + vc20_init_machine, + vc20_shutdown_machine, + + /* video hardware */ + (VIC6560_XSIZE + 7) & ~7, /* screen width */ + VIC6560_YSIZE, /* screen height */ + {VIC6560_MAME_XPOS, VIC6560_MAME_XPOS + VIC6560_MAME_XSIZE - 1, + VIC6560_MAME_YPOS, VIC6560_MAME_YPOS + VIC6560_MAME_YSIZE - 1}, + 0, /* graphics decode info */ + sizeof (vic6560_palette) / sizeof (vic6560_palette[0]) / 3, + 0, + vc20_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + vic6560_vh_start, + vic6560_vh_stop, + vic6560_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &vic6560_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; + +#ifdef PET_TEST_CODE +static struct MachineDriver machine_driver_vic20v = +{ + /* basic machine hardware */ { { CPU_M6502, @@ -452,16 +517,64 @@ static struct MachineDriver machine_driver_vic20 = vc20_frame_interrupt, 1, vic656x_raster_interrupt, VIC656X_HRETRACERATE, }, -#ifdef VC1541 VC1540_CPU, + }, + VIC6560_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 3000, #endif + vc20_init_machine, + vc20_shutdown_machine, + + /* video hardware */ + (VIC6560_XSIZE + 7) & ~7, /* screen width */ + VIC6560_YSIZE, /* screen height */ + {VIC6560_MAME_XPOS, VIC6560_MAME_XPOS + VIC6560_MAME_XSIZE - 1, + VIC6560_MAME_YPOS, VIC6560_MAME_YPOS + VIC6560_MAME_YSIZE - 1}, + 0, /* graphics decode info */ + sizeof (vic6560_palette) / sizeof (vic6560_palette[0]) / 3, + 0, + vc20_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + vic6560_vh_start, + vic6560_vh_stop, + vic6560_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &vic6560_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; + +static struct MachineDriver machine_driver_vic20i = +{ + /* basic machine hardware */ + { + { + CPU_M6502, + VIC6560_CLOCK, + vc20_readmem, vc20_writemem, + 0, 0, + vc20_frame_interrupt, 1, + vic656x_raster_interrupt, VIC656X_HRETRACERATE, + }, + C2031_CPU, }, VIC6560_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 100, +#ifdef CPU_SYNC + 1, +#else + 3000, +#endif vc20_init_machine, vc20_shutdown_machine, - /* video hardware */ + /* video hardware */ (VIC6560_XSIZE + 7) & ~7, /* screen width */ VIC6560_YSIZE, /* screen height */ {VIC6560_MAME_XPOS, VIC6560_MAME_XPOS + VIC6560_MAME_XSIZE - 1, @@ -476,17 +589,18 @@ static struct MachineDriver machine_driver_vic20 = vic6560_vh_stop, vic6560_vh_screenrefresh, - /* sound hardware */ + /* sound hardware */ 0, 0, 0, 0, { {SOUND_CUSTOM, &vic6560_sound_interface}, {SOUND_DAC, &vc20tape_sound_interface} } }; +#endif static struct MachineDriver machine_driver_vc20 = { - /* basic machine hardware */ + /* basic machine hardware */ { { CPU_M6502, @@ -496,16 +610,13 @@ static struct MachineDriver machine_driver_vc20 = vc20_frame_interrupt, 1, vic656x_raster_interrupt, VIC656X_HRETRACERATE, }, -#ifdef VC1541 - VC1540_CPU, -#endif }, VIC6561_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ - 100, + 0, vc20_init_machine, vc20_shutdown_machine, - /* video hardware */ + /* video hardware */ (VIC6561_XSIZE + 7) & ~7, /* screen width */ VIC6561_YSIZE, /* screen height */ {VIC6561_MAME_XPOS, VIC6561_MAME_XPOS + VIC6561_MAME_XSIZE - 1, @@ -520,7 +631,7 @@ static struct MachineDriver machine_driver_vc20 = vic6560_vh_stop, vic6560_vh_screenrefresh, - /* sound hardware */ + /* sound hardware */ 0, 0, 0, 0, { {SOUND_CUSTOM, &vic6560_sound_interface}, @@ -528,13 +639,61 @@ static struct MachineDriver machine_driver_vc20 = } }; +#ifdef PET_TEST_CODE +static struct MachineDriver machine_driver_vc20v = +{ + /* basic machine hardware */ + { + { + CPU_M6502, + VIC6561_CLOCK, + vc20_readmem, vc20_writemem, + 0, 0, + vc20_frame_interrupt, 1, + vic656x_raster_interrupt, VIC656X_HRETRACERATE, + }, + VC1541_CPU, + }, + VIC6561_VRETRACERATE, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ +#ifdef CPU_SYNC + 1, +#else + 3000, +#endif + vc20_init_machine, + vc20_shutdown_machine, + + /* video hardware */ + (VIC6561_XSIZE + 7) & ~7, /* screen width */ + VIC6561_YSIZE, /* screen height */ + {VIC6561_MAME_XPOS, VIC6561_MAME_XPOS + VIC6561_MAME_XSIZE - 1, + VIC6561_MAME_YPOS, VIC6561_MAME_YPOS + VIC6561_MAME_YSIZE - 1}, /* visible_area */ + 0, /* graphics decode info */ + sizeof (vic6560_palette) / sizeof (vic6560_palette[0]) / 3, + 0, + vc20_init_palette, /* convert color prom */ + VIDEO_TYPE_RASTER, + 0, + vic6560_vh_start, + vic6560_vh_stop, + vic6560_vh_screenrefresh, + + /* sound hardware */ + 0, 0, 0, 0, + { + {SOUND_CUSTOM, &vic6560_sound_interface}, + {SOUND_DAC, &vc20tape_sound_interface} + } +}; +#endif + static const struct IODevice io_vc20[] = { IODEVICE_CBM_QUICK, { IO_CARTSLOT, /* type */ 2, /* normal 1 *//* count */ - NULL, /* file extensions */ + "a0\00020\00040\00060\0rom\0bin\0",/* file extensions */ NULL, /* private */ vc20_rom_id, /* id */ vc20_rom_load, /* init */ @@ -544,8 +703,7 @@ static const struct IODevice io_vc20[] = NULL, /* close */ NULL, /* status */ NULL, /* seek */ - NULL, /* tell */ - NULL, /* input */ + NULL, /* input */ NULL, /* output */ NULL, /* input_chunk */ NULL /* output_chunk */ @@ -555,15 +713,72 @@ static const struct IODevice io_vc20[] = {IO_END} }; -#define init_vc20 vc20_driver_init -#define init_vic20 vic20_driver_init -#define io_vic20 io_vc20 +static const struct IODevice io_vc20v[] = +{ + IODEVICE_CBM_QUICK, + { + IO_CARTSLOT, /* type */ + 2, /* normal 1 *//* count */ + "a0\00020\00040\00060\0rom\0bin\0",/* file extensions */ + NULL, /* private */ + vc20_rom_id, /* id */ + vc20_rom_load, /* init */ + NULL, /* exit */ + NULL, /* info */ + NULL, /* open */ + NULL, /* close */ + NULL, /* status */ + NULL, /* seek */ + NULL, /* input */ + NULL, /* output */ + NULL, /* input_chunk */ + NULL /* output_chunk */ + }, + IODEVICE_VC20TAPE, + IODEVICE_VC1541, + {IO_END} +}; + +static const struct IODevice io_vc20i[] = +{ + IODEVICE_CBM_QUICK, + { + IO_CARTSLOT, /* type */ + 2, /* normal 1 *//* count */ + "a0\00020\00040\00060\0rom\0bin\0",/* file extensions */ + NULL, /* private */ + vc20_rom_id, /* id */ + vc20_rom_load, /* init */ + NULL, /* exit */ + NULL, /* info */ + NULL, /* open */ + NULL, /* close */ + NULL, /* status */ + NULL, /* seek */ + NULL, /* input */ + NULL, /* output */ + NULL, /* input_chunk */ + NULL /* output_chunk */ + }, + IODEVICE_VC20TAPE, + IODEVICE_C2031, + {IO_END} +}; + +#define init_vc20 vc20_driver_init +#define init_vic20 vic20_driver_init +#define io_vic20 io_vc20 +#define io_vic20v io_vc20v +#define io_vic20i io_vc20i #ifdef PET_TEST_CODE -/* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP (1981, vic20, 0, vic20, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC)") -COMP (1981, vc20, vic20, vc20, vc20, vc20, "Commodore Business Machines Co.", "Commodore VC20 (PAL)") +/* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ +COMP ( 1981, vic20, 0, vic20, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC)") +COMP ( 1981, vic20v, vic20, vic20v, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC), VC1540") +COMP ( 1981, vic20i, vic20, vic20i, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC), IEEE488, 2031") +COMP ( 1981, vc20, vic20, vc20, vc20, vc20, "Commodore Business Machines Co.", "Commodore VC20 (PAL)") +COMP ( 1981, vc20v, vic20, vc20v, vic20, vc20, "Commodore Business Machines Co.", "Commodore VC20 (PAL), VC1541") #else -COMPX(1981, vic20, 0, vic20, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC)",GAME_IMPERFECT_SOUND) -COMPX(1981, vc20, vic20, vc20, vc20, vc20, "Commodore Business Machines Co.", "Commodore VC20 (PAL)", GAME_IMPERFECT_SOUND) +COMPX ( 1981, vic20, 0, vic20, vic20, vic20, "Commodore Business Machines Co.", "Commodore VIC20 (NTSC)", GAME_IMPERFECT_SOUND) +COMPX ( 1981, vc20, vic20, vc20, vc20, vc20, "Commodore Business Machines Co.", "Commodore VC20 (PAL)", GAME_IMPERFECT_SOUND) #endif diff --git a/src/mess/systems/vtech1.c b/src/mess/systems/vtech1.c index 1af6ec18b..40e454861 100644 --- a/src/mess/systems/vtech1.c +++ b/src/mess/systems/vtech1.c @@ -577,7 +577,7 @@ static struct MachineDriver machine_driver_laser310 = ROM_START( laser110 ) ROM_REGION(0x10000,REGION_CPU1) ROM_LOAD("vtechv20.lo", 0x0000, 0x2000, 0xcc854fe9) - ROM_LOAD("vtectv20.hi", 0x2000, 0x2000, 0x7060f91a) + ROM_LOAD("vtechv20.hi", 0x2000, 0x2000, 0x7060f91a) ROM_REGION(0x0d00,REGION_GFX1) ROM_LOAD("vtech1.chr", 0x0000, 0x0c00, 0xead006a1) @@ -587,7 +587,7 @@ ROM_END ROM_START( laser210 ) ROM_REGION(0x10000,REGION_CPU1) ROM_LOAD("vtechv20.lo", 0x0000, 0x2000, 0xcc854fe9) - ROM_LOAD("vtectv20.hi", 0x2000, 0x2000, 0x7060f91a) + ROM_LOAD("vtechv20.hi", 0x2000, 0x2000, 0x7060f91a) ROM_REGION(0x0d00,REGION_GFX1) ROM_LOAD("vtech1.chr", 0x0000, 0x0c00, 0xead006a1) diff --git a/src/mess/systems/zx.c b/src/mess/systems/zx.c index 72af774a5..0d6243054 100644 --- a/src/mess/systems/zx.c +++ b/src/mess/systems/zx.c @@ -811,10 +811,10 @@ static const struct IODevice io_zx81[] = ***************************************************************************/ /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP (1980, zx80, 0, zx80, zx80, zx, "Sinclair Research", "ZX-80") -COMP (1981, aszmic, zx80, zx80, zx80, zx, "Sinclair Research", "ZX.Aszmic") -COMP (1981, zx81, 0, zx81, zx81, zx, "Sinclair Research", "ZX-81") -COMP (1981, ts1000, zx81, ts1000, zx81, zx, "Timex Sinclair", "TS1000") -COMP (198?, pc8300, zx81, pc8300, zx81, zx, "Your Computer", "PC8300") -COMPX(198?, pow3000, zx81, pow3000, pow3000, zx, "Creon Enterprises", "Power 3000", GAME_NOT_WORKING) +COMPX (1980, zx80, 0, zx80, zx80, zx, "Sinclair Research", "ZX-80", GAME_NOT_WORKING) +COMPX (1981, aszmic, zx80, zx80, zx80, zx, "Sinclair Research", "ZX.Aszmic", GAME_NOT_WORKING) +COMPX (1981, zx81, 0, zx81, zx81, zx, "Sinclair Research", "ZX-81", GAME_NOT_WORKING) +COMPX (1981, ts1000, zx81, ts1000, zx81, zx, "Timex Sinclair", "TS1000", GAME_NOT_WORKING) +COMPX (198?, pc8300, zx81, pc8300, zx81, zx, "Your Computer", "PC8300", GAME_NOT_WORKING) +COMPX (198?, pow3000, zx81, pow3000, pow3000, zx, "Creon Enterprises", "Power 3000", GAME_NOT_WORKING) diff --git a/src/mess/vidhrdw/dragon.c b/src/mess/vidhrdw/dragon.c index d4b8393bb..51b1d88cd 100644 --- a/src/mess/vidhrdw/dragon.c +++ b/src/mess/vidhrdw/dragon.c @@ -1,7 +1,10 @@ /* Video hardware for CoCo/Dragon family * - * TODO - * Implement missing CoCo 3 GIME registers (denoted with '!') + * TODO: + * - Implement "burst phase invert" (it switches the artifact colors) + * - Figure out what Bit 3 of $FF98 is and implement it + * - Support palette rotation at HBLANK time, and maybe get a SockMaster + * demo working... */ #include "machine/6821pia.h" @@ -12,6 +15,8 @@ static int coco3_hires; static int coco3_gimevhreg[8]; static int coco3_borderred, coco3_bordergreen, coco3_borderblue; static int sam_videomode; +static int coco3_somethingdirty; +static int coco3_blinkstatus; static struct GfxElement *coco3font; #define MAX_HIRES_VRAM 57600 @@ -139,7 +144,7 @@ struct GfxElement *build_coco3_font(void) mem = memory_region(REGION_CPU1); - /* The font info for the CoCo 3 hi res text modes happens to be + /* The font info for the CoCo 3 hi res text modes happens to be * same as the font info used for the HPRINT command, which is in * the CoCo 3 ROM, so we get it from there */ @@ -233,7 +238,7 @@ static void coco3_compute_color(int color, int *red, int *green, int *blue) /* CMP colors * * These colors are of the format IICCCC, where II is the intensity and - * CCCC is the base color. There is some weirdness because intensity + * CCCC is the base color. There is some weirdness because intensity * is often different for each base color. Thus a table is used here * to map to RGB colors * @@ -242,7 +247,7 @@ static void coco3_compute_color(int color, int *red, int *green, int *blue) * that mapped RGB to CMP, then I compared it with the palette that the * CoCo III uses on startup for CMP. Where they conflicted, the CoCo III * startup palette took precedence. Where neither of them helped, I guessed - * + * * The fault of this table is that some colors directly map to each other. * I do not like this, so if anyone can come up with a better formula, I'm * all ears. @@ -316,7 +321,7 @@ static void coco3_compute_color(int color, int *red, int *green, int *blue) color = cmp2rgb[color & 63]; } - /* RGB colors + /* RGB colors * * These colors are of the format RGBRGB, where the first 3 bits * are more significant than the last three bits @@ -324,6 +329,14 @@ static void coco3_compute_color(int color, int *red, int *green, int *blue) *red = (((color >> 4) & 2) | ((color >> 2) & 1)) * 0x55; *green = (((color >> 3) & 2) | ((color >> 1) & 1)) * 0x55; *blue = (((color >> 2) & 2) | ((color >> 0) & 1)) * 0x55; + + if (!input_port_11_r(0) && (coco3_gimevhreg[0] & 0x10)) { + /* We are on a composite monitor/TV and the monochrome phase invert + * flag is on in the GIME. This means we have to average out all + * colors + */ + *red = *green = *blue = (*red + *green + *blue) / 3; + } } static void coco3_vh_palette_change_color(int color, int data) @@ -333,6 +346,13 @@ static void coco3_vh_palette_change_color(int color, int data) palette_change_color(color, red, green, blue); } +static void coco3_vh_palette_recompute(void) +{ + int i; + for (i = 0; i < 16; i++) + coco3_vh_palette_change_color(i, paletteram[i]); +} + static int coco3_vh_setborder(struct osd_bitmap *bitmap, int red, int green, int blue, int screenx, int screeny) { int left, right, top, bottom, x, y; @@ -374,6 +394,12 @@ static int coco3_vh_setborder(struct osd_bitmap *bitmap, int red, int green, int return full_refresh; } +void coco3_vh_blink(void) +{ + coco3_blinkstatus = !coco3_blinkstatus; + coco3_somethingdirty = 1; +} + void coco3_palette_w(int offset, int data) { paletteram[offset] = data; @@ -413,6 +439,8 @@ static void coco3_artifact_blue(int *artifactcolors) void coco3_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) { + extern void coco3_vbord(void); + UINT8 *RAM = memory_region(REGION_CPU1); static int coco3_metapalette[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 @@ -441,12 +469,13 @@ void coco3_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) } /* clear vblank */ - pia_0_cb1_w (0, 0); + coco3_vbord(); if (coco3_hires) { - static int blink_status, blink_timer; + static int last_blink; + int blink_switch=0; int vidbase, bytesperrow, linesperrow, rows = 0, x, y, basex = 0, basey, wf = 0; - int use_attr, charsperrow = 0, blink_switch = 0, underlined = 0; + int use_attr, charsperrow = 0, underlined = 0; int visualbytesperrow, c, emupixelsperbyte; int borderred, bordergreen, borderblue; UINT8 *vram, *db; @@ -487,6 +516,7 @@ void coco3_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) memset(dirtybuffer, 1, MAX_HIRES_VRAM); m6847_full_refresh = 0; osd_mark_dirty(0, (225 - rows) / 2, 639, (225 - rows) / 2 + rows-1, 0); + coco3_somethingdirty = 1; } use_mark_dirty = 1; @@ -494,43 +524,11 @@ void coco3_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) switch(coco3_gimevhreg[0] & 0x80) { case 0x00: /* Text */ - rows /= 8; use_attr = coco3_gimevhreg[1] & 1; - switch(coco3_gimevhreg[1] & 0x14) { - case 0x14: - charsperrow = 80; - basex = 0; - wf = 1; - break; - case 0x10: - charsperrow = 64; - basex = 64; - wf = 1; - break; - case 0x04: - charsperrow = 40; - basex = 0; - wf = 2; - break; - case 0x00: - charsperrow = 32; - basex = 64; - wf = 2; - break; - } - - if (!bytesperrow) - bytesperrow = charsperrow * (use_attr + 1); - if (use_attr) { /* Resolve blink */ - /* TODO: This needs to be adjusted to a true timer; not a counter */ - blink_switch = (++blink_timer > 3); - - if (blink_switch) { - blink_timer = 0; - blink_status = !blink_status; - } + blink_switch = coco3_blinkstatus == last_blink; + last_blink = coco3_blinkstatus; } else { /* Set colortable to be default */ @@ -539,48 +537,77 @@ void coco3_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) underlined = 0; } - for (y = 0; y < rows; y++) { - i = y * bytesperrow; - vram = &RAM[(vidbase + i) & 0x7FFFF]; - db = dirtybuffer + i; - - for (x = 0; x < charsperrow; x++) { - if (db[0] || (use_attr && (db[1] || (blink_switch && (vram[1] & 0x80))))) { - b = *vram & 0x7f; + if (coco3_somethingdirty) { + rows /= 8; + switch(coco3_gimevhreg[1] & 0x14) { + case 0x14: + charsperrow = 80; + basex = 0; + wf = 1; + break; + case 0x10: + charsperrow = 64; + basex = 64; + wf = 1; + break; + case 0x04: + charsperrow = 40; + basex = 0; + wf = 2; + break; + case 0x00: + charsperrow = 32; + basex = 64; + wf = 2; + break; + } + if (!bytesperrow) + bytesperrow = charsperrow * (use_attr + 1); + + for (y = 0; y < rows; y++) { + i = y * bytesperrow; + vram = &RAM[(vidbase + i) & 0x7FFFF]; + db = dirtybuffer + i; + + for (x = 0; x < charsperrow; x++) { + if (db[0] || (use_attr && (db[1] || (blink_switch && (vram[1] & 0x80))))) { + b = *vram & 0x7f; + + if (use_attr) { + coco3font->colortable[0] = Machine->pens[vram[1] & 7]; + coco3font->colortable[1] = Machine->pens[8 + ((vram[1] >> 3) & 7)]; + + /* Are we blinking? */ + if (coco3_blinkstatus && (vram[1] & 0x80)) { + b = 0x20; + underlined = 0; + } + else { + /* Are we underlined? */ + underlined = vram[1] & 0x40; + } + } - if (use_attr) { - coco3font->colortable[0] = Machine->pens[vram[1] & 7]; - coco3font->colortable[1] = Machine->pens[8 + ((vram[1] >> 3) & 7)]; + drawgfx_wf(bitmap, coco3font, b, x*8*wf+basex, y*8+basey, 0, TRANSPARENCY_NONE, 0, wf); + if (underlined) + drawgfx_wf(bitmap, coco3font, 128, x*8*wf+basex, y*8+basey, 0, TRANSPARENCY_PEN, 0, wf); + if (use_mark_dirty) + osd_mark_dirty(x*8*wf+basex, y*8+basey, (x+1)*8*wf-1+basex, y*8+7+basey, 0); - /* Are we blinking? */ - if (blink_status && (vram[1] & 0x80)) { - b = 0; - underlined = 0; - } - else { - /* Are we underlined? */ - underlined = vram[1] & 0x40; - } + db[0] = 0; + if (use_attr) + db[1] = 0; } + vram++; + db++; + vram += use_attr; + db += use_attr; - drawgfx_wf(bitmap, coco3font, b, x*8*wf+basex, y*8+basey, 0, TRANSPARENCY_NONE, 0, wf); - if (underlined) - drawgfx_wf(bitmap, coco3font, 128, x*8*wf+basex, y*8+basey, 0, TRANSPARENCY_PEN, 0, wf); - if (use_mark_dirty) - osd_mark_dirty(x*8*wf+basex, y*8+basey, (x+1)*8*wf-1+basex, y*8+7+basey, 0); - - db[0] = 0; - if (use_attr) - db[1] = 0; + if (vram > &RAM[0x80000]) + vram -= 0x80000; } - vram++; - db++; - vram += use_attr; - db += use_attr; - - if (vram > &RAM[0x80000]) - vram -= 0x80000; } + coco3_somethingdirty = 0; } break; @@ -700,13 +727,15 @@ static void coco3_ram_w(int offset, int data, int block) unsigned int vidbasediff; offset = coco3_mmu_translate(block, offset); - + if (RAM[offset] != data) { if (coco3_hires) { vidbase = (coco3_gimevhreg[5] * 0x800) + (coco3_gimevhreg[6] * 8); vidbasediff = (unsigned int) (offset - vidbase) & 0x7ffff; - if (vidbasediff < MAX_HIRES_VRAM) + if (vidbasediff < MAX_HIRES_VRAM) { dirtybuffer[vidbasediff] = 1; + coco3_somethingdirty = 1; + } } else { if (offset >= 0x70000) @@ -757,20 +786,30 @@ int coco3_gimevh_r(int offset) void coco3_gimevh_w(int offset, int data) { + int xorval; + /* Features marked with '!' are not yet implemented */ + + xorval = coco3_gimevhreg[offset] ^ data; coco3_gimevhreg[offset] = data; + switch(offset) { case 0: /* $FF98 Video Mode Register * Bit 7 BP 0 = Text modes, 1 = Graphics modes * Bit 6 Unused * ! Bit 5 BPI Burst Phase Invert (Color Set) - * ! Bit 4 MOCH 1 = Monochrome on Composite + * Bit 4 MOCH 1 = Monochrome on Composite * ! Bit 3 H50 1 = 50 Hz power, 0 = 60 Hz power * Bits 0-2 LPR Lines per row */ - coco3_borderred = -1; /* force border to redraw */ - m6847_full_refresh = 1; + if (xorval & 0xA7) { + coco3_borderred = -1; /* force border to redraw */ + m6847_full_refresh = 1; + } + if (xorval & 0x10) { + coco3_vh_palette_recompute(); + } break; case 1: diff --git a/src/mess/vidhrdw/ted7360.c b/src/mess/vidhrdw/ted7360.c index acbd79eaf..678098f13 100644 --- a/src/mess/vidhrdw/ted7360.c +++ b/src/mess/vidhrdw/ted7360.c @@ -1354,11 +1354,13 @@ int ted7360_raster_interrupt (void) vc20_tape_status (text, sizeof (text)); ted7360_draw_text (ted7360_bitmap, text, &y); -#ifdef VC1541 - vc1541_drive_status (text, sizeof (text)); -#else + + if (REAL_C1551) { + vc1541_drive_status (text, sizeof (text)); + ted7360_draw_text (ted7360_bitmap, text, &y); + } + cbm_drive_0_status (text, sizeof (text)); -#endif ted7360_draw_text (ted7360_bitmap, text, &y); cbm_drive_1_status (text, sizeof (text)); diff --git a/src/msdos/config.c b/src/msdos/config.c index 3b055bd9c..c159d2f43 100644 --- a/src/msdos/config.c +++ b/src/msdos/config.c @@ -350,6 +350,9 @@ void parse_cmdline (int argc, char **argv, int game_index) game = game_index; + /* force third mouse button emulation to "no" otherwise Allegro will default to "yes" */ + set_config_string(0,"emulate_three","no"); + /* read graphic configuration */ scanlines = get_bool ("config", "scanlines", NULL, 1); stretch = get_bool ("config", "stretch", NULL, 1); @@ -415,7 +418,9 @@ void parse_cmdline (int argc, char **argv, int game_index) /* read input configuration */ use_mouse = get_bool ("config", "mouse", NULL, 1); joyname = get_string ("config", "joystick", "joy", "none"); - use_hotrod = get_bool ("config", "hotrod", NULL, 0); + use_hotrod = 0; + if (get_bool ("config", "hotrod", NULL, 0)) use_hotrod = 1; + if (get_bool ("config", "hotrodse", NULL, 0)) use_hotrod = 2; /* misc configuration */ options.cheat = get_bool ("config", "cheat", NULL, 0); diff --git a/src/msdos/fronthlp.c b/src/msdos/fronthlp.c index 57da0e7df..802c4f0c3 100644 --- a/src/msdos/fronthlp.c +++ b/src/msdos/fronthlp.c @@ -300,12 +300,14 @@ void romident(const char* name,int enter_dirs) { #ifndef MESS enum { LIST_LIST = 1, LIST_LISTINFO, LIST_LISTFULL, LIST_LISTSAMDIR, LIST_LISTROMS, LIST_LISTSAMPLES, - LIST_LMR, LIST_LISTDETAILS, LIST_LISTGAMES, LIST_LISTCLONES, + LIST_LMR, LIST_LISTDETAILS, LIST_GAMELISTHEADER, LIST_GAMELISTFOOTER, LIST_GAMELIST, + LIST_LISTGAMES, LIST_LISTCLONES, LIST_WRONGORIENTATION, LIST_WRONGFPS, LIST_LISTCRC, LIST_LISTDUPCRC, LIST_WRONGMERGE, LIST_LISTROMSIZE, LIST_LISTCPU, LIST_SOURCEFILE }; #else enum { LIST_LIST = 1, LIST_LISTINFO, LIST_LISTFULL, LIST_LISTSAMDIR, LIST_LISTROMS, LIST_LISTSAMPLES, - LIST_LMR, LIST_LISTDETAILS, LIST_LISTGAMES, LIST_LISTCLONES, + LIST_LMR, LIST_LISTDETAILS, LIST_GAMELISTHEADER, LIST_GAMELISTFOOTER, LIST_GAMELIST, + LIST_LISTGAMES, LIST_LISTCLONES, LIST_WRONGORIENTATION, LIST_WRONGFPS, LIST_LISTCRC, LIST_LISTDUPCRC, LIST_WRONGMERGE, LIST_LISTROMSIZE, LIST_LISTCPU, LIST_SOURCEFILE, LIST_MESSINFO }; #endif @@ -360,6 +362,9 @@ int frontend_help (int argc, char **argv) if (!stricmp(argv[i],"-listinfo")) list = LIST_LISTINFO; if (!stricmp(argv[i],"-listfull")) list = LIST_LISTFULL; if (!stricmp(argv[i],"-listdetails")) list = LIST_LISTDETAILS; /* A detailed MAMELIST.TXT type roms lister */ + if (!stricmp(argv[i],"-gamelistheader")) list = LIST_GAMELISTHEADER; /* GAMELIST.TXT */ + if (!stricmp(argv[i],"-gamelistfooter")) list = LIST_GAMELISTFOOTER; /* GAMELIST.TXT */ + if (!stricmp(argv[i],"-gamelist")) list = LIST_GAMELIST; /* GAMELIST.TXT */ if (!stricmp(argv[i],"-listgames")) list = LIST_LISTGAMES; if (!stricmp(argv[i],"-listclones")) list = LIST_LISTCLONES; if (!stricmp(argv[i],"-listsamdir")) list = LIST_LISTSAMDIR; @@ -369,14 +374,15 @@ int frontend_help (int argc, char **argv) if (!stricmp(argv[i],"-listromsize")) list = LIST_LISTROMSIZE; if (!stricmp(argv[i],"-listcpu")) list = LIST_LISTCPU; -#ifdef MAME_DEBUG /* do not put this into a public release! */ +#ifndef MAME_DEBUG /* do not put this into a public release! */ if (!stricmp(argv[i],"-lmr")) list = LIST_LMR; #endif if (!stricmp(argv[i],"-wrongorientation")) list = LIST_WRONGORIENTATION; if (!stricmp(argv[i],"-wrongfps")) list = LIST_WRONGFPS; if (!stricmp(argv[i],"-noclones")) listclones = 0; #ifdef MESS - if (!stricmp(argv[i],"-listextensions")) list = LIST_MESSINFO; + if (!stricmp(argv[i],"-listdevices")) list = LIST_MESSINFO; + if (!stricmp(argv[i],"-listtext")) list = LIST_MESSINFO; #endif @@ -431,11 +437,12 @@ int frontend_help (int argc, char **argv) { /* list all mess info options here */ if ( - !stricmp(argv[i],"-listextensions") + !stricmp(argv[i],"-listdevices") | + !stricmp(argv[i],"-listtext") ) { /* send the gamename and arg to mess.c */ - list_mess_info(gamename, argv[i]); + list_mess_info(gamename, argv[i], listclones); } } return 0; @@ -612,9 +619,9 @@ int frontend_help (int argc, char **argv) return 0; break; - case LIST_LISTDETAILS: /* A detailed MAMELIST.TXT type roms lister */ + case LIST_LISTDETAILS: /* A detailed MAMELIST.TXT type roms lister */ - /* First, we shall print the header */ + /* First, we shall print the header */ printf(" romname driver "); for(j=0;jclone_of == 0 || (drivers[i]->clone_of->flags & NOT_A_DRIVER) @@ -647,13 +654,13 @@ int frontend_help (int argc, char **argv) #ifndef MESS /* source file (skip the leading "src/drivers/" */ - printf("%-10s ",&drivers[i]->source_file[12]); - #else + printf("%-10s ",&drivers[i]->source_file[12]); + #else /* source file (skip the leading "src/mess/systems/" */ printf("%-10s ",&drivers[i]->source_file[17]); #endif - /* Then, cpus */ + /* Then, cpus */ for(j=0;jdescription); } - i++; - } - return 0; - break; + i++; + } + return 0; + break; + + case LIST_GAMELISTHEADER: /* GAMELIST.TXT */ + printf("This is the complete list of games supported by MAME %s\n",build_version); + if (!listclones) + printf("Variants of the same game are not included, you can use the -listclones command\n" + "to get a list of the alternate versions of a given game.\n"); + printf("\n" + "The list is generated automatically and is not 100%% accurate, particularly in\n" + "the \"Screen Flip\" column. Please let us know of any errors you find so we can\n" + "correct them.\n" + "\n" + "The meanings of the columns are as follows:\n" + "Working - \"No\" means that the emulation has shortcomings that cause the game\n" + " not to work correctly. This can be anywhere from just showing a black screen\n" + " to to being playable with major problems.\n" + "Correct Colors - \"Yes\" means that colors should be identical to the original,\n" + " \"Close\" that they are very similar but wrong in places, \"No\" that they are\n" + " completely wrong. In some cases, we were not able to find the color PROMs of\n" + " the game. Those PROMs will be reported as \"NO GOOD DUMP KNOWN\" on startup,\n" + " and the game will have wrong colors. The game is still reported as \"Yes\" in\n" + " this column, because the code to handle the color PROMs is in the driver and\n" + " if you provide them colors will be correct.\n" + "Sound - \"Partial\" means that sound support is either incomplete or not entirely\n" + " accurate. Note that, due to analog circuitry which is difficult to emulate,\n" + " sound may be significantly different from the real board. A common case is\n" + " the presence of low pass filters that make the real board sound less harsh\n" + " than the emulation.\n" + "Screen Flip - A large number of games have a dip switch setting for \"Cocktail\"\n" + " cabinet, meaning that the players sit in front of each other, and the screen\n" + " is flipped when player 2 is playing. Some games also ahve a \"Flip Screen\" dip\n" + " switch. Those need special support in the driver, whcih is missing in many\n" + " cases.\n" + "Internal Name - This is the unique name that should be specified on the command\n" + " line to run the game. ROMs must be placed in the ROM path, either in a .zip\n" + " file or in a subdirectory of the same name. The former is suggested, because\n" + " the files will be identified by their CRC instead of requiring specific\n" + " names.\n\n"); + printf("+----------------------------------+-------+-------+-------+-------+----------+\n"); + printf("| | |Correct| |Screen | Internal |\n"); + printf("| Game Name |Working|Colors | Sound | Flip | Name |\n"); + printf("+----------------------------------+-------+-------+-------+-------+----------+\n"); + return 0; + break; + + case LIST_GAMELISTFOOTER: /* GAMELIST.TXT */ + printf("+----------------------------------+-------+-------+-------+-------+----------+\n\n"); + printf("(1) There are variants of the game (usually bootlegs) that work correctly\n"); + printf("(2) Needs samples provided separately\n"); + return 0; + break; + + case LIST_GAMELIST: /* GAMELIST.TXT */ + i = 0; + + while (drivers[i]) + { + if ((listclones || drivers[i]->clone_of == 0 + || (drivers[i]->clone_of->flags & NOT_A_DRIVER) + ) && !strwildcmp(gamename, drivers[i]->name)) + { + char name[200],name_ref[200]; + + strcpy(name,drivers[i]->description); + + /* Move leading "The" to the end */ + if (strstr(name," (")) *strstr(name," (") = 0; + if (strncmp(name,"The ",4) == 0) + { + sprintf(name_ref,"%s, The ",name+4); + } + else + sprintf(name_ref,"%s ",name); + + /* print the additional description only if we are listing clones */ + if (listclones) + { + if (strchr(drivers[i]->description,'(')) + strcat(name_ref,strchr(drivers[i]->description,'(')); + } + + printf("| %-33.33s",name_ref); + + if (drivers[i]->flags & GAME_NOT_WORKING) + { + const struct GameDriver *maindrv; + int foundworking; + + if (drivers[i]->clone_of && !(drivers[i]->clone_of->flags & NOT_A_DRIVER)) + maindrv = drivers[i]->clone_of; + else maindrv = drivers[i]; + + foundworking = 0; + j = 0; + while (drivers[j]) + { + if (drivers[j] == maindrv || drivers[j]->clone_of == maindrv) + { + if ((drivers[j]->flags & GAME_NOT_WORKING) == 0) + { + foundworking = 1; + break; + } + } + j++; + } + + if (foundworking) + printf("| No(1) "); + else + printf("| No "); + } + else + printf("| Yes "); + + if (drivers[i]->flags & GAME_WRONG_COLORS) + printf("| No "); + else if (drivers[i]->flags & GAME_IMPERFECT_COLORS) + printf("| Close "); + else + printf("| Yes "); + + { + const char **samplenames = 0; + for (j = 0;drivers[i]->drv->sound[j].sound_type && j < MAX_SOUND; j++) + { + if (drivers[i]->drv->sound[j].sound_type == SOUND_SAMPLES) + { + samplenames = ((struct Samplesinterface *)drivers[i]->drv->sound[j].sound_interface)->samplenames; + break; + } + } + if (drivers[i]->flags & GAME_NO_SOUND) + printf("| No "); + else if (drivers[i]->flags & GAME_IMPERFECT_SOUND) + { + if (samplenames) + printf("|Part(2)"); + else + printf("|Partial"); + } + else + { + if (samplenames) + printf("| Yes(2)"); + else + printf("| Yes "); + } + } + + if (drivers[i]->flags & GAME_NO_COCKTAIL) + printf("| No "); + else + printf("| Yes "); + + printf("| %-8s |\n",drivers[i]->name); + } + i++; + } + return 0; + break; case LIST_LISTGAMES: /* list games, production year, manufacturer */ i = 0; @@ -1023,7 +1190,8 @@ int frontend_help (int argc, char **argv) if (atoi(drivers[i]->year) == year) { - for (j = 0;j < MAX_CPU;j++) +// for (j = 0;j < MAX_CPU;j++) +j = 0; // count only the main cpu count[x_cpu[j].cpu_type & ~CPU_FLAGS_MASK]++; } } diff --git a/src/msdos/input.c b/src/msdos/input.c index 1b10acd20..970ed9cd3 100644 --- a/src/msdos/input.c +++ b/src/msdos/input.c @@ -184,7 +184,7 @@ int osd_wait_keypress(void) #define MAX_JOY 256 -#define MAX_JOY_NAME_LEN 20 +#define MAX_JOY_NAME_LEN 40 static struct JoystickInfo joylist[MAX_JOY] = { @@ -537,9 +537,9 @@ void osd_customize_inputport_defaults(struct ipd *defaults) #ifndef NEOFREE #ifndef TINY_COMPILE - if (Machine->gamedrv->clone_of == &driver_neogeo || - (Machine->gamedrv->clone_of && - Machine->gamedrv->clone_of->clone_of == &driver_neogeo)) + if (use_hotrod == 2 && + (Machine->gamedrv->clone_of == &driver_neogeo || + (Machine->gamedrv->clone_of && Machine->gamedrv->clone_of->clone_of == &driver_neogeo))) { if (defaults->type == (IPT_BUTTON1 | IPF_PLAYER1)) seq_set_1(&defaults->seq,KEYCODE_C); if (defaults->type == (IPT_BUTTON2 | IPF_PLAYER1)) seq_set_1(&defaults->seq,KEYCODE_LSHIFT); diff --git a/src/msdos/msdos.c b/src/msdos/msdos.c index bbfc52ee2..926b814bb 100644 --- a/src/msdos/msdos.c +++ b/src/msdos/msdos.c @@ -22,6 +22,9 @@ extern char *crcdir; static char crcfilename[256] = ""; const char *crcfile = crcfilename; +extern char *pcrcdir; +static char pcrcfilename[256] = ""; +const char *pcrcfile = pcrcfilename; #endif @@ -338,6 +341,10 @@ int main (int argc, char **argv) #ifdef MESS /* Build the CRC database filename */ sprintf(crcfilename, "%s/%s.crc", crcdir, drivers[game_index]->name); + if (drivers[game_index]->clone_of->name) + sprintf (pcrcfilename, "%s/%s.crc", crcdir, drivers[game_index]->clone_of->name); + else + pcrcfilename[0] = 0; #endif /* go for it */ diff --git a/src/msdos/sound.c b/src/msdos/sound.c index 5a37b5505..5b8bd922f 100644 --- a/src/msdos/sound.c +++ b/src/msdos/sound.c @@ -109,13 +109,13 @@ int msdos_init_sound(void) /* info.nDeviceId = AUDIO_DEVICE_MAPPER;*/ info.nDeviceId = soundcard; /* always use 16 bit mixing if possible - better quality and same speed of 8 bit */ - info.wFormat = AUDIO_FORMAT_16BITS | AUDIO_FORMAT_MONO; + info.wFormat = AUDIO_FORMAT_16BITS | AUDIO_FORMAT_MONO | AUDIO_FORMAT_RAW_SAMPLE; /* use stereo output if supported */ if (usestereo) { if (Machine->drv->sound_attributes & SOUND_SUPPORTS_STEREO) - info.wFormat = AUDIO_FORMAT_16BITS | AUDIO_FORMAT_STEREO; + info.wFormat = AUDIO_FORMAT_16BITS | AUDIO_FORMAT_STEREO | AUDIO_FORMAT_RAW_SAMPLE; } info.nSampleRate = Machine->sample_rate; @@ -244,9 +244,9 @@ int msdos_init_sound(void) #endif #ifdef USE_ALLEGRO + reserve_voices(1,0); if (install_sound(DIGI_AUTODETECT,MIDI_NONE,0) != 0) { - reserve_voices(1,0); if (errorlog) fprintf(errorlog,"Allegro install_sound error: %s\n",allegro_error); return 1; } diff --git a/src/msdos/ticker.c b/src/msdos/ticker.c index 477115f4c..80e9a8880 100644 --- a/src/msdos/ticker.c +++ b/src/msdos/ticker.c @@ -58,9 +58,6 @@ void init_ticker(void) uclock_t a,b; TICKER start,end; - printf("calculating CPU speed... "); - fflush(stdout); - use_rdtsc = 1; /* must set this before calling ticker() */ a = uclock(); @@ -75,12 +72,12 @@ void init_ticker(void) do { b = uclock(); - } while (b-a < UCLOCKS_PER_SEC); + } while (b-a < UCLOCKS_PER_SEC/4); end = ticker(); - ticks_per_sec = end - start; + ticks_per_sec = (end - start)*4; - printf("%d.%06d MHz\n",(int)(ticks_per_sec/1000000),(int)(ticks_per_sec%1000000)); -if (errorlog) fprintf(errorlog,"using RDTSC for timing\n"); +if (errorlog) fprintf(errorlog,"using RDTSC for timing, CPU speed = %d.%06d MHz\n", + (int)(ticks_per_sec/1000000),(int)(ticks_per_sec%1000000)); } else { diff --git a/src/msdos/video.c b/src/msdos/video.c index 6de96adea..5ca7260b8 100644 --- a/src/msdos/video.c +++ b/src/msdos/video.c @@ -1766,7 +1766,7 @@ int osd_allocate_colors(unsigned int totalcolors,const unsigned char *palette,un dirtycolor = malloc(screen_colors * sizeof(int)); current_palette = malloc(3 * screen_colors * sizeof(unsigned char)); - palette_16bit_lookup = malloc(screen_colors * sizeof(UINT32)); + palette_16bit_lookup = malloc(screen_colors * sizeof(palette_16bit_lookup[0])); if (dirtycolor == 0 || current_palette == 0 || palette_16bit_lookup == 0) return 1; @@ -2280,6 +2280,8 @@ void osd_update_video_and_audio(void) } if (dirtypalette) { + if (use_dirty) init_dirty(1); /* have to redraw the whole screen */ + dirtypalette = 0; for (i = 0;i < screen_colors;i++) { diff --git a/src/osdepend.h b/src/osdepend.h index 54580207b..6e4372182 100644 --- a/src/osdepend.h +++ b/src/osdepend.h @@ -10,12 +10,6 @@ #define CLIB_DECL #endif -/* TODO: this should be removed and put into a unix-specific header */ -/** suggested by Scott Trent */ -#ifdef aix -#include -#endif - #ifdef __LP64__ #define FPTR long /* 64bit: sizeof(void *) is sizeof(long) */ #else @@ -108,8 +102,13 @@ void osd_save_snapshot(void); osd_start_audio_stream() and osd_stop_audio_stream() must return the number of samples (or couples of samples, when using stereo) required for next frame. This will be around Machine->sample_rate / Machine->drv->frames_per_second, - the code may adjust it at will to keep timing accurate and to maintain audio - and video in sync when using vsync. + the code may adjust it by SMALL AMOUNTS to keep timing accurate and to maintain + audio and video in sync when using vsync. Note that sound generation, + especially when DACs are involved, greatly depends on the samples per frame to + be roughly constant, so the returned value must always stay close to the + reference value of Machine->sample_rate / Machine->drv->frames_per_second. + Of course that value is not necessarily an integer so at least a +/- 1 + adjustment is necessary to avoid drifting over time. */ int osd_start_audio_stream(int stereo); int osd_update_audio_stream(INT16 *buffer); @@ -149,7 +148,7 @@ int osd_is_key_pressed(int keycode); wait for the user to press a key and return its code. This function is not required to do anything, it is here so we can avoid bogging down multitasking systems while using the debugger. If you don't want to or can't support this - function you can just return KEYCODE_NONE. + function you can just return OSD_KEY_NONE. */ int osd_wait_keypress(void); @@ -322,5 +321,5 @@ int osd_dir_get_entry(void *dir, char *name, int namelength, int *is_dir); void osd_dir_close(void *dir); #endif -#endif +#endif diff --git a/src/palette.c b/src/palette.c index fc31bdd77..a04a98c40 100644 --- a/src/palette.c +++ b/src/palette.c @@ -541,7 +541,9 @@ INLINE void palette_change_color_16_palettized(int color,unsigned char red,unsig game_palette[3*color + 2] == blue) return; - osd_modify_pen(Machine->pens[color],red,green,blue); + /* Machine->pens[color] might have been remapped to transparent_pen, so I */ + /* use shrinked_pens[] directly */ + osd_modify_pen(shrinked_pens[color + RESERVED_PENS],red,green,blue); game_palette[3*color + 0] = red; game_palette[3*color + 1] = green; game_palette[3*color + 2] = blue; diff --git a/src/sndhrdw/8080bw.c b/src/sndhrdw/8080bw.c index 85f4abd4c..ab5bb759e 100644 --- a/src/sndhrdw/8080bw.c +++ b/src/sndhrdw/8080bw.c @@ -32,7 +32,9 @@ #include "cpu/i8039/i8039.h" #include "machine/74123.h" -void invaders_vh_flipscreen(int data); +void invaders_flipscreen_w(int data); +void invaders_screen_red_w(int data); + /* Note: For invad2ct, the Player 1 sounds are the same as for the @@ -52,9 +54,7 @@ void invad2ct_sh_port1_w(int offset, int data) sample_stop (7); if (data & 0x02 && ~Sound & 0x02) - { sample_start (8, 11, 0); /* Missle Sound - Player 2 */ - } if (data & 0x04 && ~Sound & 0x04) sample_start (9, 12, 0); /* Explosion - Player 2 */ @@ -73,105 +73,27 @@ void invaders_sh_port3_w(int offset, int data) static unsigned char Sound = 0; if (data & 0x01 && ~Sound & 0x01) - sample_start (0, 0, 1); /* Saucer Sound */ + sample_start (0, 0, 1); if (~data & 0x01 && Sound & 0x01) sample_stop (0); if (data & 0x02 && ~Sound & 0x02) - sample_start (1, 1, 0); /* Missle Sound */ + sample_start (1, 1, 0); if (data & 0x04 && ~Sound & 0x04) - sample_start (2, 2, 0); /* Explosion */ - - if (data & 0x08 && ~Sound & 0x08) - sample_start (3, 3, 0); /* Invader Hit */ - - if (data & 0x10 && ~Sound & 0x10) - sample_start (4, 9, 0); /* Bonus Missle Base */ - - Sound = data; -} - -/* LT 20-3-1998 */ -void invadpt2_sh_port3_w(int offset, int data) -{ - static unsigned char Sound = 0; + sample_start (2, 2, 0); - if (data & 0x01 && ~Sound & 0x01) - sample_start (0, 0, 1); + if (~data & 0x04 && Sound & 0x04) + sample_stop (2); - if (~data & 0x01 && Sound & 0x01) - sample_stop (0); - - if (data & 0x02 && ~Sound & 0x02) - sample_start (1, 1, 0); - - if (data & 0x04 && ~Sound & 0x04){ - sample_start (2, 2, 0); - /* turn all colours red here */ - palette_change_color(1,0xff,0x00,0x00); - palette_change_color(2,0xff,0x00,0x00); - palette_change_color(3,0xff,0x00,0x00); - palette_change_color(4,0xff,0x00,0x00); - palette_change_color(5,0xff,0x00,0x00); - palette_change_color(6,0xff,0x00,0x00); - } - - if (~data & 0x04 && Sound & 0x04){ - sample_stop (2); - palette_change_color(1,0xff,0x20,0x20); - palette_change_color(2,0x20,0xff,0x20); - palette_change_color(3,0xff,0xff,0x20); - palette_change_color(4,0xff,0xff,0xff); - palette_change_color(5,0x20,0xff,0xff); - palette_change_color(6,0xff,0x20,0xff); - } if (data & 0x08 && ~Sound & 0x08) sample_start (3, 3, 0); - Sound = data; -} - -/* LT 20-3-1998 */ -void invaders_sh_port4_w(int offset, int data) -{ - static unsigned char Sound = 0; - - if (data & 0x01 && ~Sound & 0x01) - sample_start (0, 0, 1); - - if (~data & 0x01 && Sound & 0x01) - sample_stop (0); - - if (data & 0x02 && ~Sound & 0x02) - sample_start (1, 1, 0); + if (data & 0x10 && ~Sound & 0x10) + sample_start (4, 9, 0); - if (data & 0x04 && ~Sound & 0x04){ - sample_start (2, 2, 0); - /* turn all colours red here */ - palette_change_color(1,0xff,0x00,0x00); - palette_change_color(2,0xff,0x00,0x00); - palette_change_color(3,0xff,0x00,0x00); - palette_change_color(4,0xff,0x00,0x00); - palette_change_color(5,0xff,0x00,0x00); - palette_change_color(6,0xff,0x00,0x00); - palette_change_color(7,0xff,0x00,0x00); - } - - if (~data & 0x04 && Sound & 0x04){ - sample_stop (2); - /* restore colours here */ - palette_change_color(1,0x20,0x20,0xff); - palette_change_color(2,0x20,0xff,0x20); - palette_change_color(3,0x20,0xff,0xff); - palette_change_color(4,0xff,0x20,0x20); - palette_change_color(5,0xff,0x20,0xff); - palette_change_color(6,0xff,0xff,0x20); - palette_change_color(7,0xff,0xff,0xff); - } - if (data & 0x08 && ~Sound & 0x08) - sample_start (3, 3, 0); + invaders_screen_red_w(data & 0x04); Sound = data; } @@ -195,7 +117,7 @@ void invaders_sh_port5_w(int offset, int data) if (data & 0x10 && ~Sound & 0x10) sample_start (6, 8, 0); /* Saucer Hit */ - invaders_vh_flipscreen(data & 0x20); + invaders_flipscreen_w(data & 0x20); Sound = data; } @@ -219,7 +141,7 @@ void invad2ct_sh_port7_w(int offset, int data) if (data & 0x10 && ~Sound & 0x10) sample_start (12, 18, 0); /* Saucer Hit - Player 2 */ - invaders_vh_flipscreen(data & 0x20); + invaders_flipscreen_w(data & 0x20); Sound = data; } @@ -270,35 +192,7 @@ void boothill_sh_port5_w(int offset, int data) void ballbomb_sh_port3_w(int offset, int data) { - static unsigned char colorswap = 0; - - if (data & 0x04 && ~colorswap & 0x04) - { - /* turn all colours red here */ - - palette_change_color(1,0xff,0x00,0x00); - palette_change_color(2,0xff,0x00,0x00); - palette_change_color(3,0xff,0x00,0x00); - palette_change_color(4,0xff,0x00,0x00); - palette_change_color(5,0xff,0x00,0x00); - palette_change_color(6,0xff,0x00,0x00); - palette_change_color(7,0xff,0x00,0x00); - } - - if (~data & 0x04 && colorswap & 0x04) - { - /* restore colours here */ - - palette_change_color(1,0x20,0xff,0xff); - palette_change_color(2,0xff,0x20,0xff); - palette_change_color(3,0x20,0x20,0xff); - palette_change_color(4,0xff,0xff,0x20); - palette_change_color(5,0x20,0xff,0x20); - palette_change_color(6,0xff,0x20,0x20); - palette_change_color(7,0xff,0xff,0xff); - } - - colorswap = data; + invaders_screen_red_w(data & 0x04); } diff --git a/src/sndhrdw/asteroid.c b/src/sndhrdw/asteroid.c index 7632978df..7796675bb 100644 --- a/src/sndhrdw/asteroid.c +++ b/src/sndhrdw/asteroid.c @@ -1,7 +1,29 @@ +/***************************************************************************** + * + * A (partially wrong) try to emulate Asteroid's analog sound + * It's getting better but is still imperfect :/ + * If you have ideas, corrections, suggestions contact Juergen + * Buchmueller + * + * Known issues (TODO): + * - find out if/why the samples are 'damped', I don't see no + * low pass filter in the sound output, but the samples sound + * like there should be one. Maybe in the amplifier.. + * - better (accurate) way to emulate the low pass on the thrust sound? + * - verify the thump_frequency calculation. It's only an approximation now + * - the nastiest piece of the circuit is the saucer sound IMO + * the circuits are almost equal, but there are some strange looking + * things like the direct coupled op-amps and transistors and I can't + * calculate the true resistance and thus voltage at the control + * input (5) of the NE555s. + * - saucer sound is not easy either and the calculations might be off, still. + * + *****************************************************************************/ + #include #include "driver.h" -#define VMAX 32767 +#define VMAX 32767 #define VMIN 0 #define SAUCEREN 0 @@ -16,342 +38,354 @@ #define EXPAUDSHIFT 2 #define EXPAUDMASK (0x0f<sample_rate; + static int counter, sample_counter; + static int out; - while( length-- > 0 ) + counter -= 12000; + while( counter <= 0 ) { - int sum = 0; - - poly_counter -= 12000; - while( poly_counter <= 0 ) + counter += samplerate; + if( ((polynome & 0x4000) == 0) == ((polynome & 0x0040) == 0) ) + polynome = (polynome << 1) | 1; + else + polynome <<= 1; + if( ++sample_counter == 16 ) { - poly_counter += samplerate; - if( ((poly_shifter & 0x4000) == 0) == ((poly_shifter & 0x0040) == 0) ) - poly_shifter = (poly_shifter << 1) | 1; + sample_counter = 0; + if( explosion_latch & EXPITCH0 ) + sample_counter |= 2 + 8; else - poly_shifter <<= 1; - if( ++poly_sample_count == 16 ) - { - poly_sample_count = 0; - if( explosion_latch & EXPITCH0 ) - poly_sample_count |= 2 + 8; - else - poly_sample_count |= 4; - if( explosion_latch & EXPITCH1 ) - poly_sample_count |= 1 + 8; - } - /* ripple count output goes high? */ - if( poly_sample_count == 15 ) - explosion_out = poly_shifter & 1; - } - /* mixer 4.7K */ - if( explosion_out ) - sum += vol_explosion[(explosion_latch & EXPAUDMASK) >> EXPAUDSHIFT] / 7; + sample_counter |= 4; + if( explosion_latch & EXPITCH1 ) + sample_counter |= 1 + 8; + } + /* ripple count output is high? */ + if( sample_counter == 15 ) + out = polynome & 1; + } + if( out ) + return vol_explosion[(explosion_latch & EXPAUDMASK) >> EXPAUDSHIFT]; + + return 0; +} + +INLINE int thrust(int samplerate) +{ + static int counter, out, amp; - if( sound_latch[THRUSTEN] ) + if( sound_latch[THRUSTEN] ) + { + /* SHPSND filter */ + counter -= 110; + while( counter <= 0 ) { - /* SHPSND filter - * rumbling low noise... well, the filter parameters - * are beyond me. I implement a 110Hz digital filter - * on the poly noise and sweep the amplitude of the - * signal to the new level. - */ - thrust_counter -= 110; - while( thrust_counter <= 0 ) - { - thrust_counter += samplerate; - thrust_out = poly_shifter & 1; - } - if( thrust_out ) - { - if( thrust_amp < VMAX ) - { - thrust_amp += (VMAX - thrust_amp) * samplerate / 32768 / 32; - if( thrust_amp > VMAX ) - thrust_amp = VMAX; - } - } - else - { - if( thrust_amp > VMIN ) - { - thrust_amp -= thrust_amp * samplerate / 32768 / 32; - if( thrust_amp < VMIN) - thrust_amp = VMIN; - } - } - sum += thrust_amp / 7; - } + counter += samplerate; + out = polynome & 1; + } + if( out ) + { + if( amp < VMAX ) + amp += (VMAX - amp) * 32768 / 32 / samplerate + 1; + } + else + { + if( amp > VMIN ) + amp -= amp * 32768 / 32 / samplerate + 1; + } + return amp; + } + return 0; +} + +INLINE int thump(int samplerate) +{ + static int counter, out; - if( thump_latch & 0x10 ) + if( thump_latch & 0x10 ) + { + counter -= thump_frequency; + while( counter <= 0 ) { - thump_counter -= thump_frequency; - while( thump_counter <= 0 ) - { - thump_counter += samplerate; - thump_out ^= 1; - } - if( thump_out ) - sum += VMAX / 7; + counter += samplerate; + out ^= 1; } + if( out ) + return VMAX; + } + return 0; +} - /* saucer sound enabled ? */ - if( sound_latch[SAUCEREN] ) + +INLINE int saucer(int samplerate) +{ + static int vco, vco_charge, vco_counter; + static int out, counter; + double v5; + + /* saucer sound enabled ? */ + if( sound_latch[SAUCEREN] ) + { + /* NE555 setup as astable multivibrator: + * C = 10u, Ra = 5.6k, Rb = 10k + * or, with /SAUCERSEL being low: + * C = 10u, Ra = 5.6k, Rb = 6k (10k parallel with 15k) + */ + if( vco_charge ) { - /* NE555 setup as astable multivibrator - * C = 10u, Ra = 5.6k, Rb = 10k - * charge time = 0.693 * (5.6k + 10k) * 10u = 0.108108s - * discharge time = 0.693 * 10k * 10u = 0.0693s - * --------- - * C = 10u, Ra = 5.6k, Rb = 6k [1 / (1/10k + 1/15k)] - * charge time = 0.693 * (5.6k + 6k) * 10u = 0.0.080388s - * discharge time = 0.693 * 6k * 10u = 0.04158s - */ - if( saucer_vco_charge ) + if( sound_latch[SAUCERSEL] ) + vco_counter -= NE555_T1(5600,10000,10e-6); + else + vco_counter -= NE555_T1(5600,6000,10e-6); + if( vco_counter <= 0 ) { - if( sound_latch[SAUCERSEL] ) - saucer_vco_counter -= (int)(VMAX / 0.108108); - else - saucer_vco_counter -= (int)(VMAX / 0.080388); - if( saucer_vco_counter < 0 ) + int steps = (-vco_counter / samplerate) + 1; + vco_counter += steps * samplerate; + if( (vco += steps) >= VMAX*2/3 ) { - int n = (-saucer_vco_counter / samplerate) + 1; - saucer_vco_counter += n * samplerate; - if( (saucer_vco += n) >= VMAX*2/3 ) - { - saucer_vco = VMAX*2/3; - saucer_vco_charge = 0; - break; - } + vco = VMAX*2/3; + vco_charge = 0; } } - else - { - if( sound_latch[SAUCERSEL] ) - saucer_vco_counter -= (int)(VMAX / 0.0693); - else - saucer_vco_counter -= (int)(VMAX / 0.04158); - if( saucer_vco_counter < 0 ) - { - int n = (-saucer_vco_counter / samplerate) + 1; - saucer_vco_counter += n * samplerate; - if( (saucer_vco -= n) <= VMAX*1/3 ) - { - saucer_vco = VMIN*1/3; - saucer_vco_charge = 1; - break; - } - } - } - /* - * NE566 setup as voltage controlled astable multivibrator - * C = 0.001u, Ra = 5.6k, Rb = 3.9k - * frequency = 1.44 / ((5600 + 2*3900) * 0.047e-6) = 2286Hz - */ + } + else + { if( sound_latch[SAUCERSEL] ) - saucer_counter -= 2286*1/3 + (2286 * EXP(saucer_vco_charge,saucer_vco) / 32768); + vco_counter -= NE555_T2(5600,10000,10e-6); else - saucer_counter -= 2286*1/3 + 800 /*???*/ + ((2286*1/3 + 800) * EXP(saucer_vco_charge,saucer_vco) / 32768); - while( saucer_counter <= 0 ) + vco_counter -= NE555_T2(5600,6000,10e-6); + if( vco_counter <= 0 ) { - saucer_counter += samplerate; - saucer_out ^= 1; + int steps = (-vco_counter / samplerate) + 1; + vco_counter += steps * samplerate; + if( (vco -= steps) <= VMAX*1/3 ) + { + vco = VMIN*1/3; + vco_charge = 1; + } } - if( saucer_out ) - sum += VMAX / 7; - } + } + /* + * NE566 voltage controlled oscillator + * Co = 0.047u, Ro = 10k + * to = 2.4 * (Vcc - V5) / (Ro * Co * Vcc) + */ + if( sound_latch[SAUCERSEL] ) + v5 = 12.0 - 1.66 - 5.0 * EXP(vco_charge,vco) / 32768; + else + v5 = 11.3 - 1.66 - 5.0 * EXP(vco_charge,vco) / 32768; + counter -= floor(2.4 * (12.0 - v5) / (10000 * 0.047e-6 * 12.0)); + while( counter <= 0 ) + { + counter += samplerate; + out ^= 1; + } + if( out ) + return VMAX; + } + return 0; +} - if( sound_latch[SAUCRFIREEN] ) +INLINE int saucerfire(int samplerate) +{ + static int vco, vco_counter; + static int amp, amp_counter; + static int out, counter; + + if( sound_latch[SAUCRFIREEN] ) + { + if( vco < VMAX*12/5 ) { - if( saucerfire_vco > VMIN ) + /* charge C38 (10u) through R54 (10K) from 5V to 12V */ + #define C38_CHARGE_TIME (VMAX) + vco_counter -= C38_CHARGE_TIME; + while( vco_counter <= 0 ) { - /* charge C38 (10u) through R54 (10K) */ - #define C38_CHARGE_TIME (int)(VMAX / 6.93); - saucerfire_vco_counter -= C38_CHARGE_TIME; - while( saucerfire_vco_counter <= 0 ) - { - saucerfire_vco_counter += samplerate; - if( --saucerfire_vco == VMIN ) - break; - } + vco_counter += samplerate; + if( ++vco == VMAX*12/5 ) + break; } - if( saucerfire_amp > VMIN ) + } + if( amp > VMIN ) + { + /* discharge C39 (10u) through R58 (10K) and diode CR6, + * but only during the time the output of the NE555 is low. + */ + if( out ) { - /* discharge C39 (10u) through R58 (10K) and CR6 */ - #define C39_DISCHARGE_TIME (int)(VMAX / 6.93); - saucerfire_amp_counter -= C39_DISCHARGE_TIME; - while( saucerfire_amp_counter <= 0 ) + #define C39_DISCHARGE_TIME (int)(VMAX) + amp_counter -= C39_DISCHARGE_TIME; + while( amp_counter <= 0 ) { - saucerfire_amp_counter += samplerate; - if( --saucerfire_amp == VMIN ) - saucerfire_amp = VMIN; + amp_counter += samplerate; + if( --amp == VMIN ) break; - } - } - if( saucerfire_out ) - { - /* C35 = 1u, Rb = 680 -> f = 8571Hz */ - saucerfire_counter -= 8571; - while( saucerfire_counter <= 0 ) - { - saucerfire_counter += samplerate; - saucerfire_out = 0; } } - else + } + if( out ) + { + /* C35 = 1u, Ra = 3.3k, Rb = 680 + * discharge = 0.693 * 680 * 1e-6 = 4.7124e-4 -> 2122 Hz + */ + counter -= 2122; + if( counter <= 0 ) { - if( saucerfire_vco > VMAX*1/3 ) - { - /* C35 = 1u, Ra = 3.3k, Rb = 680 -> f = 522Hz */ - saucerfire_counter -= 522*1/3 + (522 * EXP(0,saucerfire_vco) / 32768); - while( saucerfire_counter <= 0 ) - { - saucerfire_counter += samplerate; - saucerfire_out = 1; - } - } + int n = -counter / samplerate + 1; + counter += n * samplerate; + out = 0; } - if( saucerfire_out ) - sum += saucerfire_amp / 7; } else { - /* charge C38 and C39 */ - saucerfire_amp = VMAX; - saucerfire_vco = VMAX; + /* C35 = 1u, Ra = 3.3k, Rb = 680 + * charge 0.693 * (3300+680) * 1e-6 = 2.75814e-3 -> 363Hz + */ + counter -= 363 * 2 * (VMAX*12/5-vco) / 32768; + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + out = 1; + } } + if( out ) + return amp; + } + else + { + /* charge C38 and C39 */ + amp = VMAX; + vco = VMAX; + } + return 0; +} - if( sound_latch[SHIPFIREEN] ) +INLINE int shipfire(int samplerate) +{ + static int vco, vco_counter; + static int amp, amp_counter; + static int out, counter; + + if( sound_latch[SHIPFIREEN] ) + { + if( vco < VMAX*12/5 ) { - if( shipfire_vco > VMIN ) + /* charge C47 (1u) through R52 (33K) and Q3 from 5V to 12V */ + #define C47_CHARGE_TIME (VMAX * 3) + vco_counter -= C47_CHARGE_TIME; + while( vco_counter <= 0 ) { -#if 0 /* A typo in the schematics? 1u is too low */ - /* charge C47 (1u) through R52 (33K) */ - #define C47_CHARGE_TIME (int)(VMAX / 0.033); -#else - /* charge C47 (10u) through R52 (33K) */ - #define C47_CHARGE_TIME (int)(VMAX / 0.33); -#endif - shipfire_vco_counter -= C47_CHARGE_TIME; - while( shipfire_vco_counter <= 0 ) - { - shipfire_vco_counter += samplerate; - if( --shipfire_vco == VMIN ) - break; - } + vco_counter += samplerate; + if( ++vco == VMAX*12/5 ) + break; } - if( shipfire_amp > VMIN ) + } + if( amp > VMIN ) + { + /* discharge C48 (10u) through R66 (2.7K) and CR8, + * but only while the output of theNE555 is low. + */ + if( out ) { -#if 0 - /* A typo in the schematics? 1u is too low */ - /* discharge C48 (10u) through R66 (2.7K) and CR8 */ - #define C48_DISCHARGE_TIME (int)(VMAX / 0.027); -#else - /* discharge C48 (10u) through R66 (2.7K) and CR8 */ - #define C48_DISCHARGE_TIME (int)(VMAX / 0.27); -#endif - shipfire_amp_counter -= C48_DISCHARGE_TIME; - while( shipfire_amp_counter <= 0 ) + #define C48_DISCHARGE_TIME (VMAX * 3) + amp_counter -= C48_DISCHARGE_TIME; + while( amp_counter <= 0 ) { - shipfire_amp_counter += samplerate; - if( --shipfire_amp == VMIN ) + amp_counter += samplerate; + if( --amp == VMIN ) break; - } - } - if( shipfire_out ) - { - /* C50 = 1u, Rb = 680 -> f = 8571Hz */ - shipfire_counter -= 8571; - while( shipfire_counter <= 0 ) - { - shipfire_counter += samplerate; - shipfire_out = 0; } } - else + } + + if( out ) + { + /* C50 = 1u, Ra = 3.3k, Rb = 680 + * discharge = 0.693 * 680 * 1e-6 = 4.7124e-4 -> 2122 Hz + */ + counter -= 2122; + if( counter <= 0 ) { - /* C50 = 1u, Ra = 3.3k, Rb = 680 -> f = 522Hz */ - if( shipfire_vco > VMAX*1/3 ) - { - shipfire_counter -= 522*1/3 + (522 * EXP(0,shipfire_vco) / 32768); - while( shipfire_counter <= 0 ) - { - shipfire_counter += samplerate; - shipfire_out = 1; - } - } + int n = -counter / samplerate + 1; + counter += n * samplerate; + out = 0; } - if( shipfire_out ) - sum += shipfire_amp / 7; } else { - /* charge C47 and C48 */ - shipfire_amp = VMAX; - shipfire_vco = VMAX; + /* C50 = 1u, Ra = R65 (3.3k), Rb = R61 (680) + * charge = 0.693 * (3300+680) * 1e-6) = 2.75814e-3 -> 363Hz + */ + counter -= 363 * 2 * (VMAX*12/5-vco) / 32768; + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + out = 1; + } } + if( out ) + return amp; + } + else + { + /* charge C47 and C48 */ + amp = VMAX; + vco = VMAX; + } + return 0; +} - if( sound_latch[LIFEEN] ) +INLINE int life(int samplerate) +{ + static int counter, out; + if( sound_latch[LIFEEN] ) + { + counter -= 3000; + while( counter <= 0 ) { - lifesound_counter -= 3000; - while( lifesound_counter <= 0 ) - { - lifesound_counter += samplerate; - lifesound_out ^= 1; - } - if( lifesound_out ) - sum += VMAX / 7; + counter += samplerate; + out ^= 1; } + if( out ) + return VMAX; + } + return 0; +} + + +static void asteroid_sound_update(int param, INT16 *buffer, int length) +{ + int samplerate = Machine->sample_rate; + + while( length-- > 0 ) + { + int sum = 0; + + sum += explosion(samplerate) / 7; + sum += thrust(samplerate) / 7; + sum += thump(samplerate) / 7; + sum += saucer(samplerate) / 7; + sum += saucerfire(samplerate) / 7; + sum += shipfire(samplerate) / 7; + sum += life(samplerate) / 7; *buffer++ = sum; } @@ -493,67 +527,9 @@ static void astdelux_sound_update(int param, INT16 *buffer, int length) { int sum = 0; - poly_counter -= 12000; - while( poly_counter <= 0 ) - { - poly_counter += samplerate; - if( ((poly_shifter & 0x4000) == 0) == ((poly_shifter & 0x0040) == 0) ) - poly_shifter = (poly_shifter << 1) | 1; - else - poly_shifter <<= 1; - if( ++poly_sample_count == 16 ) - { - poly_sample_count = 0; - if( explosion_latch & EXPITCH0 ) - poly_sample_count |= 2 + 8; - else - poly_sample_count |= 4; - if( explosion_latch & EXPITCH1 ) - poly_sample_count |= 1 + 8; - } - /* ripple count output goes high? */ - if( poly_sample_count == 15 ) - explosion_out = poly_shifter & 1; - } - /* mixer 4.7K */ - if( explosion_out ) - sum += vol_explosion[(explosion_latch & EXPAUDMASK) >> EXPAUDSHIFT] / 2; - - - if( astdelux_thrusten ) - { - /* SHPSND filter - * rumbling low noise... well, the filter parameters - * are beyond me. I implement a 110Hz digital filter - * on the poly noise and sweep the amplitude of the - * signal to the new level. - */ - thrust_counter -= 110; - while( thrust_counter < 0 ) - { - thrust_counter += samplerate; - thrust_out = poly_shifter & 1; - } - if( thrust_out ) - { - if( thrust_amp < VMAX ) - { - thrust_amp += (VMAX - thrust_amp) * samplerate / 32768 / 32; - if( thrust_amp > VMAX ) - thrust_amp = VMAX; - } - } - else - { - if( thrust_amp > VMIN ) - { - thrust_amp -= thrust_amp * samplerate / 32768 / 32; - if( thrust_amp < VMIN ) - thrust_amp = VMIN; - } - } - sum += thrust_amp / 2; - } + sum += explosion(samplerate) / 2; + sum += thrust(samplerate) / 2; + *buffer++ = sum; } } @@ -563,7 +539,7 @@ int astdelux_sh_start(const struct MachineSound *msound) /* initialize explosion volume lookup table */ explosion_init(); - channel = stream_init("Custom", 50, Machine->sample_rate, 0, astdelux_sound_update); + channel = stream_init("Custom", 50, Machine->sample_rate, 0, astdelux_sound_update); if( channel == -1 ) return 1; @@ -582,11 +558,11 @@ void astdelux_sh_update(void) void astdelux_sounds_w (int offset,int data) { - data = (data & 0x80) ^ 0x80; - if( data == astdelux_thrusten ) + data = ~data & 0x80; + if( data == sound_latch[THRUSTEN] ) return; stream_update(channel, 0); - astdelux_thrusten = data; + sound_latch[THRUSTEN] = data; } diff --git a/src/sndhrdw/bzone.c b/src/sndhrdw/bzone.c index 635735478..0b53f6104 100644 --- a/src/sndhrdw/bzone.c +++ b/src/sndhrdw/bzone.c @@ -53,228 +53,215 @@ static int motor_amp_counter; void bzone_sounds_w(int offset,int data) { - /* If sound is off, don't bother playing samples */ if( data == latch ) return; stream_update(channel, 0); latch = data; -} -void bzone_pokey_w(int offset,int data) -{ - if( latch & 0x20 ) - pokey1_w (offset, data); + mixer_sound_enable_global_w(latch & 0x20); } static void bzone_sound_update(int param, INT16 *buffer, int length) { - if( latch & 0x20 ) + while( length-- ) { - while( length-- ) - { - static int last_val = 0; - int sum = 0; + static int last_val = 0; + int sum = 0; - /* polynome shifter H5 and H4 (LS164) clocked with 6kHz */ - poly_counter -= 6000; - while( poly_counter <= 0 ) - { - int clock; + /* polynome shifter H5 and H4 (LS164) clocked with 6kHz */ + poly_counter -= 6000; + while( poly_counter <= 0 ) + { + int clock; - poly_counter += Machine->sample_rate; - if( ((poly_shift & 0x0008) == 0) == ((poly_shift & 0x4000) == 0) ) - poly_shift = (poly_shift << 1) | 1; - else - poly_shift <<= 1; + poly_counter += Machine->sample_rate; + if( ((poly_shift & 0x0008) == 0) == ((poly_shift & 0x4000) == 0) ) + poly_shift = (poly_shift << 1) | 1; + else + poly_shift <<= 1; - /* NAND gate J4 */ - clock = ((poly_shift & 0x7000) == 0x7000) ? 0 : 1; + /* NAND gate J4 */ + clock = ((poly_shift & 0x7000) == 0x7000) ? 0 : 1; - /* raising edge on pin 3 of J5 (LS74)? */ - if( clock && !explosion_clock ) - explosion_out ^= 1; + /* raising edge on pin 3 of J5 (LS74)? */ + if( clock && !explosion_clock ) + explosion_out ^= 1; - /* save explo clock level */ - explosion_clock = clock; + /* save explo clock level */ + explosion_clock = clock; - /* input 11 of J5 (LS74) */ - clock = (poly_shift >> 15) & 1; + /* input 11 of J5 (LS74) */ + clock = (poly_shift >> 15) & 1; - /* raising edge on pin 11 of J5 (LS74)? */ - if( clock && !shell_clock ) - shell_out ^= 1; + /* raising edge on pin 11 of J5 (LS74)? */ + if( clock && !shell_clock ) + shell_out ^= 1; - /* save shell clock level */ - shell_clock = clock; - } + /* save shell clock level */ + shell_clock = clock; + } - /* explosion enable: charge C14 */ - if( latch & 0x01 ) - explosion_amp = 32767; + /* explosion enable: charge C14 */ + if( latch & 0x01 ) + explosion_amp = 32767; - /* explosion output? */ - if( explosion_out ) + /* explosion output? */ + if( explosion_out ) + { + if( explosion_amp > 0 ) { - if( explosion_amp > 0 ) + /* + * discharge C14 through R17 + R16 + * time constant is 10e-6 * 23000 = 0.23 seconds + * (samples were decaying much slower: 1/4th rate? ) + */ + explosion_amp_counter -= (int)(32767 / (0.23*4)); + if( explosion_amp_counter < 0 ) { - /* - * discharge C14 through R17 + R16 - * time constant is 10e-6 * 23000 = 0.23 seconds - * (samples were decaying much slower: 1/4th rate? ) - */ - explosion_amp_counter -= (int)(32767 / (0.23*4)); - if( explosion_amp_counter < 0 ) - { - int n = (-explosion_amp_counter / Machine->sample_rate) + 1; - explosion_amp_counter += n * Machine->sample_rate; - if( (explosion_amp -= n) < 0 ) - explosion_amp = 0; - } + int n = (-explosion_amp_counter / Machine->sample_rate) + 1; + explosion_amp_counter += n * Machine->sample_rate; + if( (explosion_amp -= n) < 0 ) + explosion_amp = 0; } - /* - * I don't know the amplification of the op-amp - * and feedback, so the loud/soft values are arbitrary - */ - if( latch & 0x02 ) /* explosion loud ? */ - sum += EXP(0,explosion_amp)/3; - else - sum += EXP(0,explosion_amp)/4; - } + } + /* + * I don't know the amplification of the op-amp + * and feedback, so the loud/soft values are arbitrary + */ + if( latch & 0x02 ) /* explosion loud ? */ + sum += EXP(0,explosion_amp)/3; + else + sum += EXP(0,explosion_amp)/4; + } - /* shell enable: charge C9 */ - if( latch & 0x04 ) - shell_amp = 32767; + /* shell enable: charge C9 */ + if( latch & 0x04 ) + shell_amp = 32767; - /* shell output? */ - if( shell_out ) + /* shell output? */ + if( shell_out ) + { + if( shell_amp > 0 ) { - if( shell_amp > 0 ) + /* + * discharge C9 through R14 + R15 + * time constant is 4.7e-6 * 23000 = 0.1081 seconds + * (samples were decaying much slower: 1/4th rate? ) + */ + shell_amp_counter -= (int)(32767 / (0.1081*4)); + if( shell_amp_counter < 0 ) { - /* - * discharge C9 through R14 + R15 - * time constant is 4.7e-6 * 23000 = 0.1081 seconds - * (samples were decaying much slower: 1/4th rate? ) - */ - shell_amp_counter -= (int)(32767 / (0.1081*4)); - if( shell_amp_counter < 0 ) - { - int n = (-shell_amp_counter / Machine->sample_rate) + 1; - shell_amp_counter += n * Machine->sample_rate; - if( (shell_amp -= n) < 0 ) - shell_amp = 0; - } + int n = (-shell_amp_counter / Machine->sample_rate) + 1; + shell_amp_counter += n * Machine->sample_rate; + if( (shell_amp -= n) < 0 ) + shell_amp = 0; } - /* - * I don't know the amplification of the op-amp - * and feedback, so the loud/soft values are arbitrary - */ - if( latch & 0x08 ) /* shell loud ? */ - sum += EXP(0,shell_amp)/3; - else - sum += EXP(0,shell_amp)/4; - } + } + /* + * I don't know the amplification of the op-amp + * and feedback, so the loud/soft values are arbitrary + */ + if( latch & 0x08 ) /* shell loud ? */ + sum += EXP(0,shell_amp)/3; + else + sum += EXP(0,shell_amp)/4; + } - if( latch & 0x80 ) + if( latch & 0x80 ) + { + static double r0 = 1.0/1e12, r1 = 1.0/1e12; + + /* NE5555 timer + * C = 0.018u, Ra = 100k, Rb = 125k + * charge time = 0.693 * (Ra + Rb) * C = 3870us + * discharge time = 0.693 * Rb * C = 1559.25us + * freq approx. 184 Hz + * I have no idea what frequencies are coming from the NE555 + * with "MOTOR REV EN" being high or low. I took 240Hz as + * higher rate and sweep up or down to the new rate in 0.25s + */ + motor_rate_new = (latch & 0x10) ? 240 : 184; + if( motor_rate != motor_rate_new ) { - static double r0 = 1.0/1e12, r1 = 1.0/1e12; - - /* NE5555 timer - * C = 0.018u, Ra = 100k, Rb = 125k - * charge time = 0.693 * (Ra + Rb) * C = 3870us - * discharge time = 0.693 * Rb * C = 1559.25us - * freq approx. 184 Hz - * I have no idea what frequencies are coming from the NE555 - * with "MOTOR REV EN" being high or low. I took 240Hz as - * higher rate and sweep up or down to the new rate in 0.25s - */ - motor_rate_new = (latch & 0x10) ? 240 : 184; - if( motor_rate != motor_rate_new ) + /* sweep rate to new rate */ + motor_rate_counter -= (int)((240 - 184) / 0.25); + while( motor_rate_counter <= 0 ) { - /* sweep rate to new rate */ - motor_rate_counter -= (int)((240 - 184) / 0.25); - while( motor_rate_counter <= 0 ) - { - motor_rate_counter += Machine->sample_rate; - motor_rate += (motor_rate < motor_rate_new) ? +1 : -1; - } + motor_rate_counter += Machine->sample_rate; + motor_rate += (motor_rate < motor_rate_new) ? +1 : -1; } - motor_counter -= motor_rate; - while( motor_counter <= 0 ) - { - motor_counter += Machine->sample_rate; + } + motor_counter -= motor_rate; + while( motor_counter <= 0 ) + { + motor_counter += Machine->sample_rate; - r0 = 1.0/1e12; - r1 = 1.0/1e12; + r0 = 1.0/1e12; + r1 = 1.0/1e12; - if( ++motor_counter_a == 16 ) - motor_counter_a = 6; - if( ++motor_counter_b == 16 ) - motor_counter_b = 4; + if( ++motor_counter_a == 16 ) + motor_counter_a = 6; + if( ++motor_counter_b == 16 ) + motor_counter_b = 4; - if( motor_counter_a & 8 ) /* bit 3 */ - r1 += 1.0/33000; - else - r0 += 1.0/33000; - if( motor_counter_a == 15 ) /* ripple carry */ - r1 += 1.0/33000; - else - r0 += 1.0/33000; - - if( motor_counter_b & 8 ) /* bit 3 */ - r1 += 1.0/33000; - else - r0 += 1.0/33000; - if( motor_counter_b == 15 ) /* ripple carry */ - r1 += 1.0/33000; - else - r0 += 1.0/33000; - - /* new voltage at C29 */ - r0 = 1.0/r0; - r1 = 1.0/r1; - motor_amp_new = (int)(32767 * r0 / (r0 + r1)); - - /* charge/discharge C29 (0.47uF) */ - if( motor_amp_new > motor_amp ) - motor_amp_step = (int)((motor_amp_new - motor_amp) / (r1*0.47e-6)); - else - motor_amp_step = (int)((motor_amp - motor_amp_new) / (r0*0.47e-6)); - } - if( motor_amp != motor_amp_new ) + if( motor_counter_a & 8 ) /* bit 3 */ + r1 += 1.0/33000; + else + r0 += 1.0/33000; + if( motor_counter_a == 15 ) /* ripple carry */ + r1 += 1.0/33000; + else + r0 += 1.0/33000; + + if( motor_counter_b & 8 ) /* bit 3 */ + r1 += 1.0/33000; + else + r0 += 1.0/33000; + if( motor_counter_b == 15 ) /* ripple carry */ + r1 += 1.0/33000; + else + r0 += 1.0/33000; + + /* new voltage at C29 */ + r0 = 1.0/r0; + r1 = 1.0/r1; + motor_amp_new = (int)(32767 * r0 / (r0 + r1)); + + /* charge/discharge C29 (0.47uF) */ + if( motor_amp_new > motor_amp ) + motor_amp_step = (int)((motor_amp_new - motor_amp) / (r1*0.47e-6)); + else + motor_amp_step = (int)((motor_amp - motor_amp_new) / (r0*0.47e-6)); + } + if( motor_amp != motor_amp_new ) + { + motor_amp_counter -= motor_amp_step; + if( motor_amp_counter < 0 ) { - motor_amp_counter -= motor_amp_step; - if( motor_amp_counter < 0 ) - { - int n = (-motor_amp_counter / Machine->sample_rate) + 1; - motor_amp_counter += n * Machine->sample_rate; - if( motor_amp > motor_amp_new ) - { - motor_amp -= n; - if( motor_amp < motor_amp_new ) - motor_amp = motor_amp_new; - } - else - { - motor_amp += n; - if( motor_amp > motor_amp_new ) - motor_amp = motor_amp_new; - } - } - } - sum += EXP((motor_ampsample_rate) + 1; + motor_amp_counter += n * Machine->sample_rate; + if( motor_amp > motor_amp_new ) + { + motor_amp -= n; + if( motor_amp < motor_amp_new ) + motor_amp = motor_amp_new; + } + else + { + motor_amp += n; + if( motor_amp > motor_amp_new ) + motor_amp = motor_amp_new; + } + } } + sum += EXP((motor_amp> 8] = param & 0xff; } +static void ssio_update_volumes(void) +{ + int chip, chan; + for (chip = 0; chip < 2; chip++) + for (chan = 0; chan < 3; chan++) + AY8910_set_volume(chip, chan, (ssio_duty_cycle[chip][chan] ^ 15) * 100 / 15); +} + +static void ssio_porta0_w(int offset, int data) +{ + ssio_duty_cycle[0][0] = data & 15; + ssio_duty_cycle[0][1] = data >> 4; + ssio_update_volumes(); +} + +static void ssio_portb0_w(int offset, int data) +{ + ssio_duty_cycle[0][2] = data & 15; + ssio_update_volumes(); +} + +static void ssio_porta1_w(int offset, int data) +{ + ssio_duty_cycle[1][0] = data & 15; + ssio_duty_cycle[1][1] = data >> 4; + ssio_update_volumes(); +} + +static void ssio_portb1_w(int offset, int data) +{ + ssio_duty_cycle[1][2] = data & 15; + mixer_sound_enable_global_w(!(data & 0x80)); + ssio_update_volumes(); +} /********* external interfaces ***********/ void ssio_data_w(int offset, int data) @@ -182,7 +217,7 @@ void ssio_reset_w(int state) { int i; - cpu_set_reset_line(ssio_sound_cpu,ASSERT_LINE); + cpu_set_reset_line(ssio_sound_cpu, ASSERT_LINE); /* latches also get reset */ for (i = 0; i < 4; i++) @@ -191,7 +226,7 @@ void ssio_reset_w(int state) } /* going low resets and reactivates the CPU */ else - cpu_set_reset_line(ssio_sound_cpu,CLEAR_LINE); + cpu_set_reset_line(ssio_sound_cpu, CLEAR_LINE); } @@ -203,8 +238,8 @@ struct AY8910interface ssio_ay8910_interface = { MIXER(33,MIXER_PAN_LEFT), MIXER(33,MIXER_PAN_RIGHT) }, /* dotron clips with anything higher */ { 0 }, { 0 }, - { 0 }, - { 0 } + { ssio_porta0_w, ssio_porta1_w }, + { ssio_portb0_w, ssio_portb1_w } }; diff --git a/src/sndhrdw/monsterb.c b/src/sndhrdw/monsterb.c deleted file mode 100644 index 5776a7941..000000000 --- a/src/sndhrdw/monsterb.c +++ /dev/null @@ -1,254 +0,0 @@ -#include "driver.h" - -struct TMS3617_interface -{ - int samplerate; /* sample rate */ - int gain; /* 16 * gain adjustment */ - int volume; /* playback volume */ -}; - - -static int emulation_rate; -static struct TMS3617_interface *interface; -static int buffer_len; -static int sample_pos; -static INT16 *output_buffer; - -static int channel; - -#define NUM_VOICES 6 - -static int voice_enable[NUM_VOICES]; -static int counter[NUM_VOICES]; -static int TMS3617_pitch; - -static INT16 *mixer_table; -static INT16 *mixer_lookup; -static signed short *mixer_buffer; - - -/* waveforms for the audio hardware */ -static const unsigned char TMS3617_waveform[] = -{ - 0x00,0x00,0x01,0x01,0x02,0x02,0x03,0x03,0x04,0x04,0x05,0x05,0x06,0x06,0x07,0x07, - 0x08,0x08,0x09,0x09,0x0a,0x0a,0x0b,0x0b,0x0c,0x0c,0x0d,0x0d,0x0e,0x0e,0x0f,0x0f, -}; - - -#define BASE_FREQ 246.9416506 -#define PITCH_1 BASE_FREQ * 1.0 /* B */ -#define PITCH_2 BASE_FREQ * 1.059463094 /* C */ -#define PITCH_3 BASE_FREQ * 1.122462048 /* C# */ -#define PITCH_4 BASE_FREQ * 1.189207115 /* D */ -#define PITCH_5 BASE_FREQ * 1.259921050 /* D# */ -#define PITCH_6 BASE_FREQ * 1.334839854 /* E */ -#define PITCH_7 BASE_FREQ * 1.414213562 /* F */ -#define PITCH_8 BASE_FREQ * 1.498307077 /* F# */ -#define PITCH_9 BASE_FREQ * 1.587401052 /* G */ -#define PITCH_10 BASE_FREQ * 1.681792830 /* G# */ -#define PITCH_11 BASE_FREQ * 1.781797436 /* A = 440 */ -#define PITCH_12 BASE_FREQ * 1.887748625 /* A# */ -#define PITCH_13 BASE_FREQ * 2.0 /* B */ - -#define SHIFT_1 8*1.0 -#define SHIFT_2 8*2.0 -#define SHIFT_3 8*2.0*1.334839854 -#define SHIFT_4 8*4.0 -#define SHIFT_5 8*4.0*1.334839854 -#define SHIFT_6 8*8.0 - -static int TMS3617_freq[] = -{ - 0, PITCH_1*SHIFT_1, PITCH_2*SHIFT_1, PITCH_3*SHIFT_1, - PITCH_4*SHIFT_1, PITCH_5*SHIFT_1, PITCH_6*SHIFT_1, PITCH_7*SHIFT_1, - PITCH_8*SHIFT_1, PITCH_9*SHIFT_1, PITCH_10*SHIFT_1, PITCH_11*SHIFT_1, - PITCH_12*SHIFT_1, PITCH_13*SHIFT_1, 0, 0, - - 0, PITCH_1*SHIFT_2, PITCH_2*SHIFT_2, PITCH_3*SHIFT_2, - PITCH_4*SHIFT_2, PITCH_5*SHIFT_2, PITCH_6*SHIFT_2, PITCH_7*SHIFT_2, - PITCH_8*SHIFT_2, PITCH_9*SHIFT_2, PITCH_10*SHIFT_2, PITCH_11*SHIFT_2, - PITCH_12*SHIFT_2, PITCH_13*SHIFT_2, 0, 0, - - 0, PITCH_1*SHIFT_3, PITCH_2*SHIFT_3, PITCH_3*SHIFT_3, - PITCH_4*SHIFT_3, PITCH_5*SHIFT_3, PITCH_6*SHIFT_3, PITCH_7*SHIFT_3, - PITCH_8*SHIFT_3, PITCH_9*SHIFT_3, PITCH_10*SHIFT_3, PITCH_11*SHIFT_3, - PITCH_12*SHIFT_3, PITCH_13*SHIFT_3, 0, 0, - - 0, PITCH_1*SHIFT_4, PITCH_2*SHIFT_4, PITCH_3*SHIFT_4, - PITCH_4*SHIFT_4, PITCH_5*SHIFT_4, PITCH_6*SHIFT_4, PITCH_7*SHIFT_4, - PITCH_8*SHIFT_4, PITCH_9*SHIFT_4, PITCH_10*SHIFT_4, PITCH_11*SHIFT_4, - PITCH_12*SHIFT_4, PITCH_13*SHIFT_4, 0, 0, - - 0, PITCH_1*SHIFT_5, PITCH_2*SHIFT_5, PITCH_3*SHIFT_5, - PITCH_4*SHIFT_5, PITCH_5*SHIFT_5, PITCH_6*SHIFT_5, PITCH_7*SHIFT_5, - PITCH_8*SHIFT_5, PITCH_9*SHIFT_5, PITCH_10*SHIFT_5, PITCH_11*SHIFT_5, - PITCH_12*SHIFT_5, PITCH_13*SHIFT_5, 0, 0, - - 0, PITCH_1*SHIFT_6, PITCH_2*SHIFT_6, PITCH_3*SHIFT_6, - PITCH_4*SHIFT_6, PITCH_5*SHIFT_6, PITCH_6*SHIFT_6, PITCH_7*SHIFT_6, - PITCH_8*SHIFT_6, PITCH_9*SHIFT_6, PITCH_10*SHIFT_6, PITCH_11*SHIFT_6, - PITCH_12*SHIFT_6, PITCH_13*SHIFT_6, 0, 0 - -}; - - -/* note: gain is specified as gain*16 */ -static int make_mixer_table (int gain) -{ - int count = NUM_VOICES * 128; - int i; - - /* allocate memory */ - mixer_table = malloc (256 * NUM_VOICES * sizeof(INT16)); - if (!mixer_table) - return 1; - - /* find the middle of the table */ - mixer_lookup = mixer_table + (NUM_VOICES * 128); - - /* fill in the table */ - for (i = 0; i < count; i++) - { - int val = i * gain * 16 / NUM_VOICES; - if (val > 32767) val = 32767; - mixer_lookup[ i] = val; - mixer_lookup[-i] = -val; - } - - return 0; -} - -static void TMS3617_update(INT16 *buffer,int len) -{ - int i; - int voice; - - signed short *mix; - - mix = mixer_buffer; - for (i = 0; i < len; i++) - *mix++ = 0; - - for (voice = 0; voice < NUM_VOICES; voice++) - { - int f; - int v = 0x0F; - - f = TMS3617_freq[TMS3617_pitch+voice*16]; - - if (v && f && voice_enable[voice]) - { -// const unsigned char *w = wave[voice]; - const unsigned char *w = TMS3617_waveform; - int c = counter[voice]; - - mix = mixer_buffer; - for (i = 0; i < len; i++) - { - c += f; - *mix++ += ((w[(c >> 15) & 0x1f] & 0x0f) - 8) * v; - } - - counter[voice] = c; - } - } - - mix = mixer_buffer; - for (i = 0; i < len; i++) - *buffer++ = mixer_lookup[*mix++]; -} - -/* This is just in case we ever need to turn the TMS3617 into a "standard" interface */ -static struct TMS3617_interface monsterb_intf = -{ - 44100, /* sample rate */ - 32, /* gain adjustment */ - 100 /* playback volume */ -}; - -int TMS3617_sh_start(const struct MachineSound *msound) -{ - int voice; - struct TMS3617_interface *intf = &monsterb_intf; - - buffer_len = intf->samplerate / Machine->drv->frames_per_second; - emulation_rate = buffer_len * Machine->drv->frames_per_second; - - channel = mixer_allocate_channel(intf->volume); - - if ((output_buffer = malloc(sizeof(INT16) * buffer_len)) == 0) - return 1; - - if ((mixer_buffer = malloc(sizeof(short) * buffer_len)) == 0) - { - free (output_buffer); - return 1; - } - - if (make_mixer_table (intf->gain)) - { - free (mixer_buffer); - free (output_buffer); - return 1; - } - - sample_pos = 0; - TMS3617_pitch = 0; - interface = intf; - - for (voice = 0;voice < NUM_VOICES;voice++) - { - counter[voice] = 0; - voice_enable[voice] = 1; - } - - return 0; -} - - -void TMS3617_sh_stop(void) -{ - free (mixer_table); - free (mixer_buffer); - free (output_buffer); -} - - -void TMS3617_sh_update(void) -{ - if (Machine->sample_rate == 0) return; - - - TMS3617_update(output_buffer + sample_pos,buffer_len - sample_pos); - sample_pos = 0; - - mixer_play_streamed_sample_16(channel,output_buffer,sizeof(INT16) * buffer_len,emulation_rate); -} - -void TMS3617_voice_enable(int voice, int enable) -{ - if ((voice >=0) && (voice < NUM_VOICES)) - voice_enable[voice] = enable; -} - -void TMS3617_pitch_w(int offset, int pitch) -{ - TMS3617_pitch = pitch; -} - -/********************************************************************************/ - - -void TMS3617_doupdate(void) -{ - int newpos; - - - newpos = sound_scalebufferpos(buffer_len); /* get current position based on the timer */ - - TMS3617_update(output_buffer + sample_pos,newpos - sample_pos); - sample_pos = newpos; -} - -/********************************************************************************/ - diff --git a/src/sndhrdw/phoenix.c b/src/sndhrdw/phoenix.c index 8880c9df7..644d92326 100644 --- a/src/sndhrdw/phoenix.c +++ b/src/sndhrdw/phoenix.c @@ -1,310 +1,603 @@ -/* sound driver now does correct sounds for both small and large - phoenixes. force field sound still needs work. - also all sounds need to be fine-tuned. - music not implemented yet either. - Andrew Scott (ascott@utkux.utcc.utk.edu) */ - -#include "driver.h" -#include - -/* PI isn't in the ANSI standard, so we'll define an instance here */ -#define PHX_PI (3.14159265358979323846L) - -#define MAX_VOLUME 60 -#define NOISE_VOLUME 60 -#define SAMPLE_VOLUME 60 - -/* A nice macro which saves us a lot of typing */ -#define M_PLAY_SAMPLE(channel, soundnum, loop) { \ - if (Machine->samples != 0 && Machine->samples->sample[soundnum] != 0) \ - mixer_play_sample(channel, \ - Machine->samples->sample[soundnum]->data, \ - Machine->samples->sample[soundnum]->length, \ - Machine->samples->sample[soundnum]->smpfreq, \ - loop); } - - -#define SAFREQ 1400 -#define SBFREQ 1400 -#define MAXFREQ_A 44100*7 -#define MAXFREQ_B 44100*4 - -/* for voice A effects */ -#define SW_INTERVAL 4 -#define MOD_RATE 0.14 -#define MOD_DEPTH 0.1 - -/* for voice B effect */ -#define SWEEP_RATE 0.14 -#define SWEEP_DEPTH 0.24 - -/* values needed by phoenix_sh_update */ -static int sound_a_play = 0; -static int sound_a_freq = SAFREQ; -static int sound_a_sw = 0; -static int sound_a_adjust=1; -static int hifreq = 0; -static double t=0; -static double x; - -static int sound_b_play = 0; -static int sound_b_freq = SBFREQ; -static int sound_b_adjust=1; - -static int noise_vol = 0; -static int noise_freq = 1000; -static int pitch_a = 0; -static int pitch_b = 0; - -static int song_playing; - -static int channel0,channel1,channel2,channel3; - -int noisemulate = 0; - - - -/* waveforms for the audio hardware */ -static unsigned char waveform1[32] = -{ - /* sine-wave */ - 0x0F, 0x0F, 0x0F, 0x06, 0x06, 0x09, 0x09, 0x06, 0x06, 0x09, 0x06, 0x0D, 0x0F, 0x0F, 0x0D, 0x00, - 0xE6, 0xDE, 0xE1, 0xE6, 0xEC, 0xE6, 0xE7, 0xE7, 0xE7, 0xEC, 0xEC, 0xEC, 0xE7, 0xE1, 0xE1, 0xE7, -}; -static unsigned char waveform2[] = -{ - /* white-noise ? */ - 0x79, 0x75, 0x71, 0x72, 0x72, 0x6F, 0x70, 0x71, 0x71, 0x73, 0x75, 0x76, 0x74, 0x74, 0x78, 0x7A, - 0x79, 0x7A, 0x7B, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7D, 0x80, 0x85, 0x88, 0x88, 0x87, - 0x8B, 0x8B, 0x8A, 0x8A, 0x89, 0x87, 0x85, 0x87, 0x89, 0x86, 0x83, 0x84, 0x84, 0x85, 0x84, 0x84, - 0x85, 0x86, 0x87, 0x87, 0x88, 0x88, 0x86, 0x81, 0x7E, 0x7D, 0x7F, 0x7D, 0x7C, 0x7D, 0x7D, 0x7C, - 0x7E, 0x81, 0x7F, 0x7C, 0x7E, 0x82, 0x82, 0x82, 0x82, 0x83, 0x83, 0x84, 0x83, 0x82, 0x82, 0x83, - 0x82, 0x84, 0x88, 0x8C, 0x8E, 0x8B, 0x8B, 0x8C, 0x8A, 0x8A, 0x8A, 0x89, 0x85, 0x86, 0x89, 0x89, - 0x86, 0x85, 0x85, 0x85, 0x84, 0x83, 0x82, 0x83, 0x83, 0x83, 0x82, 0x83, 0x83 -}; - +/**************************************************************************** + * + * Phoenix sound hardware simulation - still very ALPHA! + * + * If you find errors or have suggestions, please mail me. + * Juergen Buchmueller + * + ****************************************************************************/ +#include +#include "driver.h" -void phoenix_sound_control_a_w(int offset,int data) +/**************************************************************************** + * 4006 + * Dual 4-bit and dual 5-bit serial-in serial-out shift registers. + * + * +----------+ + * 1D5 |1 +--+ 14| VCC + * /1Q4 |2 13| 1Q1 + * CLK |3 12| 2Q0 + * 2D4 |4 4006 11| 2Q0 + * 3D4 |5 10| 3Q0 + * 4D5 |6 9| 4Q0 + * GND |7 8| 4Q1 + * +----------+ + * + * [This information is part of the GIICM] + * + * Pin 8 and 9 are connected to an EXOR gate and the inverted + * output (EXNOR) is fed back to pin 1 (and the pseudo polynome output). + * + * 1D5 1Q1 2D4 2Q0 3D4 3Q0 4D5 4Q1 4Q0 + * +--+--+--+--+--+ +--+--+--+--+ +--+--+--+--+ +--+--+--+--+--+ + * +->| 0| 1| 2| 3| 4|->| 5| 6| 7| 8|->| 9|10|11|12|->|13|14|15|16|17| + * | +--+--+--+--+--+ +--+--+--+--+ +--+--+--+--+ +--+--+--+--+--+ + * | ____ | | + * | / |------------+ | + * +-----------------------------------------|EXNOR| | + * \____|---------------+ + * + ****************************************************************************/ + +#define VMIN 0 +#define VMAX 32767 + +static int sound_latch_a; +static int sound_latch_b; + +static int channel; + +static int tone1_vco1_cap; +static int tone1_level; +static int tone2_level; + +static UINT32 *poly18 = NULL; + +INLINE int tone1_vco1(int samplerate) { - static int lastnoise; - - /* voice a */ - int freq = data & 0x0f; - int vol = (data & 0x30) >> 4; - - /* noise */ - int noise = (data & 0xc0) >> 6; - - if (freq != sound_a_freq) sound_a_adjust = 1; - else sound_a_adjust=0; - - sound_a_freq = freq; - - if (freq != 0x0f) + static int output, counter, level; + /* + * L447 (NE555): Ra=47k, Rb=100k, C = 0.01uF, 0.48uF, 1.01uF or 1.48uF + * charge times = 0.639*(Ra+Rb)*C = 0.0092s, 0.0451s, 0.0949s, 0.1390s + * discharge times = 0.639*Rb*C = 0.0064s, 0.0307s, 0.0645s, 0.0946s + */ + #define C18a 0.01e-6 + #define C18b 0.48e-6 + #define C18c 1.01e-6 + #define C18d 1.48e-6 + #define R40 47000 + #define R41 100000 + + static int rate[2][4] = { + { + VMAX*2/3/(0.693*(R40+R41)*C18a), + VMAX*2/3/(0.693*(R40+R41)*C18b), + VMAX*2/3/(0.693*(R40+R41)*C18c), + VMAX*2/3/(0.693*(R40+R41)*C18d) + }, + { + VMAX*2/3/(0.693*R41*C18a), + VMAX*2/3/(0.693*R41*C18b), + VMAX*2/3/(0.693*R41*C18c), + VMAX*2/3/(0.693*R41*C18d) + } + }; + if( output ) { - mixer_set_sample_frequency(channel0,MAXFREQ_A/(16-sound_a_freq)); - mixer_set_volume(channel0,100*(3-vol)/3); - sound_a_play = 1; + counter -= rate[1][tone1_vco1_cap]; + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level -= n) <= (VMAX*1/3) ) + { + level = VMAX*1/3; + output = 0; + } + } } else { - mixer_set_volume(channel0,0); - sound_a_play = 0; + counter -= rate[0][tone1_vco1_cap]; + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level += n) >= (VMAX*2/3) ) + { + level = VMAX*2/3; + output = 1; + } + } } + return output; +} - if (noisemulate) +INLINE int tone1_vco2(int samplerate) +{ + static int output, counter, level; + + /* + * L517 (NE555): Ra=570k, Rb=570k, C=10uF + * charge time = 0.639*(Ra+Rb)*C = 7.9002s + * discharge time = 0.639*Rb*C = 3.9501s + */ + #define C20 10.0e-6 + #define R43 570000 + #define R44 570000 + + if( output ) + { + counter -= (int)(VMAX*2/3 / (0.693 * R44 * C20)); + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level -= n) <= (VMAX*1/3) ) + { + level = VMAX*1/3; + output = 0; + } + } + } + else { - if (noise_freq != 1750*(4-noise)) + counter -= (int)(VMAX*2/3 / (0.693 * (R43 + R44) * C20)); + if( counter <= 0 ) { - noise_freq = 1750*(4-noise); - noise_vol = 85*noise; + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level += n) >= (VMAX*2/3) ) + { + level = VMAX*2/3; + output = 1; + } } + } + + return output; +} - if (noise) +INLINE int tone1_vco(int samplerate, int vco1, int vco2) +{ + static int counter, level; + int charge, rate, voltage, frequency = 0; + + if( vco2 ) + { + #define C22 100.0e-6 + #define R42 10000 + #define R45 51000 + #define R46 51000 + #define RP 27777 /* R42+R46 parallel with R45 */ + if( vco1 ) { - mixer_set_sample_frequency(channel2,noise_freq); - mixer_set_volume(channel2,noise_vol*100/255); + /* R42 10k + * +5V -/\/\/------------+ + * 5V | + * +5V -/\/\/--+--/\/\/--+--> V/C + * R45 51k | R46 51k + * --- + * --- 100u + * | + * 0V + */ + charge = VMAX; + rate = (int)(VMAX / (RP * C22)); + voltage = level + (VMAX-level) * R46 / (R42 + R46); } else { - mixer_set_volume(channel2,0); - noise_vol = 0; + /* R42 10k + * 0V -/\/\/------------+ + * 2.7V | + * +5V -/\/\/--+--/\/\/--+--> V/C + * R45 51k | R46 51k + * --- + * --- 100u + * | + * 0V + */ + charge = VMAX * (R42 + R46) / (R42 + R45 + R46); + rate = (int)(VMAX / (R45 * C22 * R45 / (R42 + R45 + R46))); + voltage = level * R42 / (R46 + R42); } } else { - switch (noise) + if( vco1 ) { - case 1 : - if (lastnoise != noise) - M_PLAY_SAMPLE(channel2,0,0); - break; - case 2 : - if (lastnoise != noise) - M_PLAY_SAMPLE(channel2,1,0); - break; + /* R42 10k + * +5V -/\/\/------------+ + * 2.3V | + * 0V -/\/\/--+--/\/\/--+--> V/C + * R45 51k | R46 51k + * --- + * --- 100u + * | + * 0V + */ + charge = VMAX * R45 / (R42 + R45 + R46); + rate = (int)(VMAX / ((R42 + R46) * C22 * (R42 + R46) / (R42 + R45 + R46))); + voltage = level + (VMAX-level) * R46 / (R42 + R46); + } + else + { + /* R42 10k + * 0V -/\/\/------------+ + * 0V | + * 0V -/\/\/--+--/\/\/--+--> V/C + * R45 51k | R46 51k + * --- + * --- 100u + * | + * 0V + */ + charge = VMIN; + rate = (int)(VMAX / (RP * C22)); + voltage = level * R42 / (R46 + R42); } - lastnoise = noise; } -} + /* L507 (NE555): Ra=20k, Rb=20k, C=0.001uF + * frequency 1.44/((Ra+2*Rb)*C) = 24kHz + */ + frequency = 24000*1/3 + 24000*2/3 * (VMAX-voltage) / 32768; + + if (level != charge) + { + /* charge or discharge C22 */ + counter -= rate; + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( level < charge ) + { + if( (level += n) > charge ) + level = charge; + } + else + { + if( (level -= n) < charge ) + level = charge; + } + } + } + return frequency; +} -void phoenix_sound_control_b_w(int offset,int data) +INLINE int tone1(int samplerate) { - /* voice b */ - int freq = data & 0x0f; - int vol = (data & 0x30) >> 4; - int tune = (data & 0xc0) >> 6; + static int counter, divisor, output; + int vco1_out = tone1_vco1(samplerate); + int vco2_out = tone1_vco2(samplerate); - if (freq != sound_b_freq) sound_b_adjust = 1; - else sound_b_adjust=0; + if( (sound_latch_a & 15) != 15 ) + { + counter -= tone1_vco(samplerate, vco1_out, vco2_out); + while( counter <= 0 ) + { + counter += samplerate; + if( ++divisor == 16 ) + { + divisor = sound_latch_a & 15; + output ^= 1; + } + } + } - sound_b_freq = freq; + return output ? tone1_level : -tone1_level; +} - if (freq != 0x0f) +INLINE int tone2_vco(int samplerate) +{ + static int counter, level; + + /* + * This is how the tone2 part of the circuit looks like. + * I was having a hard time to guesstimate the results + * and they might still be wrong :( + * + * +12V + * | + * / R23 + * \ 100k + * / + * !bit4 | /| R22 | + * 0V/5V >--|< |---/\/\/-----+-------+---> V C7 + * | \| 47k | | + * D4 | _|_ + * 6.8u --- \ / D5 + * C7 --- --- + * | | + * | | + * 0V >-------------------+-/\/\/-+ + * R24 33k + * + * V C7 min: + * 0.7V + (12V - 0.7V) * 19388 / (100000 + 19388) = 2.54V + * V C7 max: + * 0.7V + (12V - 0.7V) * 33000 / (100000 + 33000) + + * (12V - 5.7V) * 47000 / (100000 + 47000) = 5.51V + */ + + #define C7 6.8e-6 + #define R23 100000 + #define R22 47000 + #define R24 33000 + #define R22pR24 19388 + + #define C7_MIN (VMAX * 254 / 500) + #define C7_MAX (VMAX * 551 / 500) + #define C7_DIFF (C7_MAX - C7_MIN) + + if( (sound_latch_b & 0x10) == 0 ) { - mixer_set_sample_frequency(channel1,MAXFREQ_B/(16-sound_b_freq)); - mixer_set_volume(channel1,100*(3-vol)/3); - sound_b_play = 1; + counter -= (C7_MAX - level) * 3 / (R23 * C7); + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level += n) > C7_MAX) + level = C7_MAX; + } } else { - mixer_set_volume(channel1,0); - sound_b_play = 0; + counter -= (level - C7_MIN) * 3 / (R22pR24 * C7); + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + if( (level -= n) < C7_MIN) + level = C7_MIN; + } } + /* + * L487 (NE555): + * Ra = R25 (47k), Rb = R26 (47k), C = C8 (0.001uF) + * frequency 1.44/((Ra+2*Rb)*C) = 10212 Hz + */ + return 10212 * level / 32768; +} - /* melody */ - /* 0 - no tune, 1 - alarm beep?, 2 - level tune, 3 - start game tune */ +INLINE int tone2(int samplerate) +{ + static int counter, divisor, output; + int frequency = tone2_vco(samplerate); - switch (tune) + if( (sound_latch_b & 15) != 15 ) { - case 0: - /* The game seems to issue a 'no tune' command to the melody chip when it thinks */ - /* a song should end. As the samples will be of the complete tune from the */ - /* original machine, there is no need to stop the tune ourselves (and if we do */ - /* it sounds wrong). */ - - /* This case seems to prevent the melody from repeating rather than stopping it outright */ - /*mixer_stop_sample(channel3); - if (song_playing != 0) - M_PLAY_SAMPLE(channel3,song_playing,0);*/ - song_playing = 0; - break; - case 2: - if (song_playing != 2) - { - song_playing = 2; - M_PLAY_SAMPLE(channel3,2,0); - } - break; - case 3: - if (song_playing != 3) + counter -= frequency; + while( counter <= 0 ) + { + counter += samplerate; + if( ++divisor == 16 ) { - song_playing = 3; - M_PLAY_SAMPLE(channel3,3,0); + divisor = sound_latch_b & 15; + output ^= 1; } - break; + } } + return output ? tone2_level : -tone2_level; } - - -static const char *phoenix_sample_names[] = +INLINE int update_c24(int samplerate) { - "*phoenix", - "shot8.wav", - "death8.wav", - "phoenix1.wav", - "phoenix2.wav", - 0 /* end of array */ -}; + static int counter, level; + /* + * Noise frequency control (Port B): + * Bit 6 lo charges C24 (6.8u) via R51 (330) and when + * bit 6 is hi, C24 is discharged through R52 (20k) + * in approx. 20000 * 6.8e-6 = 0.136 seconds + */ + #define C24 6.8e-6 + #define R49 1000 + #define R51 330 + #define R52 20000 + if( sound_latch_a & 0x40 ) + { + counter -= (int)((VMAX - level) / ((R51+R49) * C24)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level += n) > VMAX) + level = VMAX; + } + } + else + { + counter -= (int)(level / (R52 * C24)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level -= n) < VMIN) + level = VMIN; + } + } + return VMAX - level; +} -int phoenix_sh_start(const struct MachineSound *msound) +INLINE int update_c25(int samplerate) { - Machine->samples = readsamples(phoenix_sample_names,Machine->gamedrv->name); - - channel0 = mixer_allocate_channel(MAX_VOLUME); - channel1 = mixer_allocate_channel(MAX_VOLUME); - channel2 = mixer_allocate_channel(NOISE_VOLUME); - channel3 = mixer_allocate_channel(SAMPLE_VOLUME); - - x = PHX_PI/2; - - if (Machine->samples != 0 && Machine->samples->sample[0] != 0) /* We should check also that Samplename[0] = 0 */ - noisemulate = 0; + static int counter, level; + /* + * Bit 7 hi charges C25 (6.8u) over a R53 (330) and when + * bit 7 is lo, C25 is discharged through R54 (47k) + * in about 47000 * 6.8e-6 = 0.3196 seconds + */ + #define C25 6.8e-6 + #define R50 1000 + #define R53 330 + #define R54 47000 + + if( sound_latch_a & 0x80 ) + { + counter -= (int)((VMAX - level) / ((R50+R53) * C25)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level += n) > VMAX ) + level = VMAX; + } + } else { - noisemulate = 1; - mixer_set_volume(channel2,0); - mixer_play_sample(channel2,(signed char*)waveform2,128,1000,1); + counter -= (int)(level / (R54 * C25)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level -= n) < VMIN ) + level = VMIN; + } } - - mixer_set_volume(channel0,0); - mixer_play_sample(channel0,(signed char*)waveform1,32,1000,1); - mixer_set_volume(channel1,0); - mixer_play_sample(channel1,(signed char*)waveform1,32,1000,1); - song_playing = 0; - - return 0; + return level; } - -void phoenix_sh_update(void) +INLINE int noise(int samplerate) { - pitch_a=MAXFREQ_A/(16-sound_a_freq); - pitch_b=MAXFREQ_B/(16-sound_b_freq); - - - /* do special effects of voice A */ - if (hifreq) - pitch_a=pitch_a*5/4; + static int counter, polyoffs, polybit, lowpass_counter, lowpass_polybit; + int vc24 = update_c24(samplerate); + int vc25 = update_c25(samplerate); + int sum = 0, level, frequency; + + /* + * The voltage levels are added and control I(CE) of transistor TR1 + * (NPN) which then controls the noise clock frequency (linearily?). + * level = voltage at the output of the op-amp controlling the noise rate. + */ + if( vc24 < vc25 ) + level = vc24 + (vc25 - vc24); + else + level = vc25 + (vc24 - vc25); + + frequency = 6325 - (6325-588) * level / 32768; + + /* + * NE555: Ra=47k, Rb=1k, C=0.05uF + * minfreq = 1.44 / ((47000+2*1000) * 0.05e-6) = approx. 588 Hz + * R71 (2700 Ohms) parallel to R73 (47k Ohms) = approx. 2553 Ohms + * maxfreq = 1.44 / ((2553+2*1000) * 0.05e-6) = approx. 6325 Hz + */ + counter -= frequency; + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + polyoffs = (polyoffs + n) & 0x3ffff; + polybit = (poly18[polyoffs>>5] >> (polyoffs & 31)) & 1; + } + if (!polybit) + sum += VMAX - vc24; - pitch_a+=((double)pitch_a*MOD_DEPTH*sin(t)); + /* 400Hz crude low pass filter: only a guess */ + lowpass_counter -= 400; + if( lowpass_counter <= 0 ) + { + lowpass_counter += samplerate; + lowpass_polybit = polybit; + } + if (!lowpass_polybit) + sum += vc25; -/* if (sound_a_adjust) - sound_a_sw=0; */ + return sum; +} - sound_a_sw++; +static void phoenix_sound_update(int param, INT16 *buffer, int length) +{ + int samplerate = Machine->sample_rate; - if (sound_a_sw==SW_INTERVAL) + while( length-- > 0 ) { - hifreq=!hifreq; - sound_a_sw=0; + int sum = 0; + sum = (tone1(samplerate) + tone2(samplerate) + noise(samplerate)) / 4; + *buffer++ = sum < 32768 ? sum > -32768 ? sum : -32768 : 32767; } +} -/* if (sound_a_adjust) - t=0; */ +void phoenix_sound_control_a_w(int offset,int data) +{ + if( data == sound_latch_a ) + return; - t+=MOD_RATE; + stream_update(channel,0); + sound_latch_a = data; - if (t>2*PHX_PI) - t=0; + tone1_vco1_cap = (sound_latch_a >> 4) & 3; + if( sound_latch_a & 0x20 ) + tone1_level = VMAX * 10000 / (10000+10000); + else + tone1_level = VMAX; +} - /* do special effects of voice B */ - pitch_b+=((double)pitch_b*SWEEP_DEPTH*sin(x)); +void phoenix_sound_control_b_w(int offset,int data) +{ + if( data == sound_latch_b ) + return; - if (sound_b_adjust) - x=0; + stream_update(channel,0); + sound_latch_b = data; - x+=SWEEP_RATE; + if( sound_latch_b & 0x20 ) + tone2_level = VMAX * 10 / 11; + else + tone2_level = VMAX; - if (x>3*PHX_PI/2) - x=3*PHX_PI/2; + /* eventually change the tune that the TMS3615 is playing */ + tms3615_tune_w(0, sound_latch_b >> 6); +} +int phoenix_sh_start(const struct MachineSound *msound) +{ + int i, j; + UINT32 shiftreg; - mixer_set_sample_frequency(channel0,pitch_a); - mixer_set_sample_frequency(channel1,pitch_b); + poly18 = (UINT32 *)malloc((1ul << (18-5)) * sizeof(UINT32)); - if ((noise_vol) && (noisemulate)) + if( !poly18 ) + return 1; + + shiftreg = 0; + for( i = 0; i < (1ul << (18-5)); i++ ) { - mixer_set_volume(channel2,noise_vol*100/255); - noise_vol-=3; + UINT32 bits = 0; + for( j = 0; j < 32; j++ ) + { + bits = (bits >> 1) | (shiftreg << 31); + if( ((shiftreg >> 16) & 1) == ((shiftreg >> 17) & 1) ) + shiftreg = (shiftreg << 1) | 1; + else + shiftreg <<= 1; + } + poly18[i] = bits; } + channel = stream_init("Custom", 50, Machine->sample_rate, 0, phoenix_sound_update); + if( channel == -1 ) + return 1; + + return 0; +} + +void phoenix_sh_stop(void) +{ + if( poly18 ) + free(poly18); + poly18 = NULL; +} + +void phoenix_sh_update(void) +{ + stream_update(channel, 0); } diff --git a/src/sndhrdw/pleiads.c b/src/sndhrdw/pleiads.c index 9f3a9bc97..ca410cd21 100644 --- a/src/sndhrdw/pleiads.c +++ b/src/sndhrdw/pleiads.c @@ -7,260 +7,255 @@ #include "driver.h" -#define SAFREQ 1400 -#define SBFREQ 1400 -#define MAXFREQ_A 40000 +#define VMIN 0 +#define VMAX 32767 -#define VOLUME_A 20 -#define VOLUME_B 80 -#define SAMPLE_VOLUME 25 +static int channel; -/* for voice A effects */ -#define SW_INTERVAL 4 -#define MOD_RATE 0.14 -#define MOD_DEPTH 0.1 +static int sound_latch_a; +static int sound_latch_b; -/* for voice B effect */ -#define SWEEP_RATE 0.14 -#define SWEEP_DEPTH 0.24 +static int tone_level; -static int noise_vol; -static int noise_freq; +static UINT32 *poly18 = NULL; -static int noisemulate; - -static int channel0,channel1,channel2,channel3,channel23; - -/* coin-up */ -static void *timer_a; -static void *timer_b; -void timer_a_callback(int param); -void timer_b_callback(int param); - - -/* waveforms for the audio hardware */ -static signed char waveform0[2] = -{ - /* flip-flop */ - -128, 127 -}; -static unsigned char waveform1[32] = +INLINE int tone(int samplerate) { - /* sine-wave */ - 0x0F, 0x0F, 0x0F, 0x06, 0x06, 0x09, 0x09, 0x06, 0x06, 0x09, 0x06, 0x0D, 0x0F, 0x0F, 0x0D, 0x00, - 0xE6, 0xDE, 0xE1, 0xE6, 0xEC, 0xE6, 0xE7, 0xE7, 0xE7, 0xEC, 0xEC, 0xEC, 0xE7, 0xE1, 0xE1, 0xE7, -}; -static unsigned char waveform2[] = -{ - /* white-noise ? */ - 0x79, 0x75, 0x71, 0x72, 0x72, 0x6F, 0x70, 0x71, 0x71, 0x73, 0x75, 0x76, 0x74, 0x74, 0x78, 0x7A, - 0x79, 0x7A, 0x7B, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7D, 0x80, 0x85, 0x88, 0x88, 0x87, - 0x8B, 0x8B, 0x8A, 0x8A, 0x89, 0x87, 0x85, 0x87, 0x89, 0x86, 0x83, 0x84, 0x84, 0x85, 0x84, 0x84, - 0x85, 0x86, 0x87, 0x87, 0x88, 0x88, 0x86, 0x81, 0x7E, 0x7D, 0x7F, 0x7D, 0x7C, 0x7D, 0x7D, 0x7C, - 0x7E, 0x81, 0x7F, 0x7C, 0x7E, 0x82, 0x82, 0x82, 0x82, 0x83, 0x83, 0x84, 0x83, 0x82, 0x82, 0x83, - 0x82, 0x84, 0x88, 0x8C, 0x8E, 0x8B, 0x8B, 0x8C, 0x8A, 0x8A, 0x8A, 0x89, 0x85, 0x86, 0x89, 0x89, - 0x86, 0x85, 0x85, 0x85, 0x84, 0x83, 0x82, 0x83, 0x83, 0x83, 0x82, 0x83, 0x83 -}; - + static int counter, divisor, output; + int frequency = 11075; + if( (sound_latch_a & 15) != 15 ) + { + counter -= frequency; + while( counter <= 0 ) + { + counter += samplerate; + if( ++divisor == 16 ) + { + divisor = sound_latch_a & 15; + output ^= 1; + } + } + } + return output ? tone_level / 2 : -tone_level / 2; +} -void pleiads_sound_control_a_w (int offset,int data) +INLINE int update_c24(int samplerate) { - static int lastnoise; - - /* voice a */ - int freq = data & 0x0f; - /* (data & 0x10), (data & 0x20), other analog stuff which I don't understand */ - - /* noise */ - int noise = (data & 0xc0) >> 6; - - if (freq != 0x0f) + static int counter, level; + /* + * Noise frequency control (Port B): + * Bit 6 lo charges C24 (6.8u) via R51 (330) and when + * bit 6 is hi, C24 is discharged through R52 (20k) + * in approx. 20000 * 6.8e-6 = 0.136 seconds + */ + #define C24 6.8e-6 + #define R49 1000 + #define R51 330 + #define R52 20000 + if( sound_latch_a & 0x40 ) { - mixer_set_sample_frequency(channel0,MAXFREQ_A/2/(16-freq)); - mixer_set_volume(channel0,VOLUME_A); - } + counter -= (int)((VMAX - level) / ((R51+R49) * C24)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level += n) > VMAX) + level = VMAX; + } + } else { - mixer_set_volume(channel0,0); - } + counter -= (int)(level / (R52 * C24)); + if( counter <= 0 ) + { + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level -= n) < VMIN) + level = VMIN; + } + } + return VMAX - level; +} - if (noisemulate) +INLINE int update_c25(int samplerate) +{ + static int counter, level; + /* + * Bit 7 hi charges C25 (6.8u) over a R53 (330) and when + * bit 7 is lo, C25 is discharged through R54 (47k) + * in about 47000 * 6.8e-6 = 0.3196 seconds + */ + #define C25 6.8e-6 + #define R50 1000 + #define R53 330 + #define R54 47000 + + if( sound_latch_a & 0x80 ) { - if (noise_freq != 1750*(4-noise)) - { - noise_freq = 1750*(4-noise); - noise_vol = 85*noise; - } - - if (noise) - { - mixer_set_sample_frequency(channel1,noise_freq); - mixer_set_volume(channel1,noise_vol*100/255); - } - else + counter -= (int)((VMAX - level) / ((R50+R53) * C25)); + if( counter <= 0 ) { - mixer_set_volume(channel1,0); - noise_vol = 0; + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level += n) > VMAX ) + level = VMAX; } } else { - switch (noise) + counter -= (int)(level / (R54 * C25)); + if( counter <= 0 ) { - case 1 : - if (lastnoise != noise) - mixer_play_sample(channel1,Machine->samples->sample[0]->data, - Machine->samples->sample[0]->length, - Machine->samples->sample[0]->smpfreq, - 0); - break; - case 2 : - if (lastnoise != noise) - mixer_play_sample(channel1,Machine->samples->sample[1]->data, - Machine->samples->sample[1]->length, - Machine->samples->sample[1]->smpfreq, - 0); - break; + int n = -counter / samplerate + 1; + counter += n * samplerate; + if( (level -= n) < VMIN ) + level = VMIN; } - lastnoise = noise; } -/* if (errorlog) fprintf(errorlog,"A:%X \n",data);*/ + return level; } +INLINE int noise(int samplerate) +{ + static int counter, polyoffs, polybit, lowpass_counter, lowpass_polybit; + int vc24 = update_c24(samplerate); + int vc25 = update_c25(samplerate); + int sum = 0, level, frequency; + + /* + * The voltage levels are added and control I(CE) of transistor TR1 + * (NPN) which then controls the noise clock frequency (linearily?). + * level = voltage at the output of the op-amp controlling the noise rate. + */ + if( vc24 < vc25 ) + level = vc24 + (vc25 - vc24); + else + level = vc25 + (vc24 - vc25); + + frequency = 6325 - (6325-588) * level / 32768; + + /* + * NE555: Ra=47k, Rb=1k, C=0.05uF + * minfreq = 1.44 / ((47000+2*1000) * 0.05e-6) = approx. 588 Hz + * R71 (2700 Ohms) parallel to R73 (47k Ohms) = approx. 2553 Ohms + * maxfreq = 1.44 / ((2553+2*1000) * 0.05e-6) = approx. 6325 Hz + */ + counter -= frequency; + if( counter <= 0 ) + { + int n = (-counter / samplerate) + 1; + counter += n * samplerate; + polyoffs = (polyoffs + n) & 0x3ffff; + polybit = (poly18[polyoffs>>5] >> (polyoffs & 31)) & 1; + } + if (!polybit) + sum += VMAX - vc24; -#define BASE_FREQ 246.9416506 -#define PITCH_1 BASE_FREQ * 1.0 /* B */ -#define PITCH_2 BASE_FREQ * 1.059463094 /* C */ -#define PITCH_3 BASE_FREQ * 1.122462048 /* C# */ -#define PITCH_4 BASE_FREQ * 1.189207115 /* D */ -#define PITCH_5 BASE_FREQ * 1.259921050 /* D# */ -#define PITCH_6 BASE_FREQ * 1.334839854 /* E */ -#define PITCH_7 BASE_FREQ * 1.414213562 /* F */ -#define PITCH_8 BASE_FREQ * 1.498307077 /* F# */ -#define PITCH_9 BASE_FREQ * 1.587401052 /* G */ -#define PITCH_10 BASE_FREQ * 1.681792830 /* G# */ -#define PITCH_11 BASE_FREQ * 1.781797436 /* A = 440 */ -#define PITCH_12 BASE_FREQ * 1.887748625 /* A# */ -#define PITCH_13 BASE_FREQ * 2.0 /* B */ + /* 400Hz crude low pass filter: only a guess */ + lowpass_counter -= 400; + if( lowpass_counter <= 0 ) + { + lowpass_counter += samplerate; + lowpass_polybit = polybit; + } + if (!lowpass_polybit) + sum += vc25; -#define SHIFT_1 8*1.0 + return sum; +} -static int TMS3615_freq[] = +static void pleiads_sound_update(int param, INT16 *buffer, int length) { - PITCH_1*SHIFT_1, PITCH_2*SHIFT_1, PITCH_3*SHIFT_1, PITCH_4*SHIFT_1, - PITCH_5*SHIFT_1, PITCH_6*SHIFT_1, PITCH_7*SHIFT_1, PITCH_8*SHIFT_1, - PITCH_9*SHIFT_1, PITCH_10*SHIFT_1, PITCH_11*SHIFT_1, PITCH_12*SHIFT_1, - PITCH_13*SHIFT_1, 0, 0, 0 -}; + int samplerate = Machine->sample_rate; - -void pleiads_sound_control_b_w (int offset,int data) -{ - static int portBstatus; - /* voice b1 & b2 */ - int freq = data & 0x0f; - int pitch = (data & 0xc0) >> 6; - /* pitch selects one of 4 possible clock inputs (actually 3, because */ - /* IC2 and IC3 are tied together) */ - if (pitch == 3) pitch = 2; - - /* (data & 0x30) goes to a 556 */ - - /* freq == 0x0d and 0x0e do nothing, 0x0f does something different (SAST BIAS?) */ - if (freq <= 0x0c) - { - mixer_set_sample_frequency(channel23+portBstatus, (1< 0 ) { - mixer_set_volume(channel23+portBstatus,0); + int sum = tone(samplerate) + noise(samplerate); + sum /= 2; + *buffer++ = sum < 32768 ? sum > -32768 ? sum : -32768 : 32767; } - portBstatus ^= 0x01; - if (errorlog) fprintf(errorlog,"B:%X freq: %02x vol: %02x\n",data, data & 0x0f, (data & 0x30) >> 4); } - -static const char *phoenix_sample_names[] = +void pleiads_sound_control_a_w (int offset,int data) { - "*phoenix", - "shot8.wav", - "death8.wav", - "phoenix1.wav", - "phoenix2.wav", - 0 /* end of array */ -}; + /* (data & 0x10), (data & 0x20), other analog stuff which I don't understand */ -int pleiads_sh_start(const struct MachineSound *msound) -{ - int vol[2]; + stream_update(channel,0); + sound_latch_a = data; - Machine->samples = readsamples(phoenix_sample_names,Machine->gamedrv->name); + /* (data & 0x10), (data & 0x20), other analog stuff which I don't understand */ - channel0 = mixer_allocate_channel(VOLUME_A); - channel1 = mixer_allocate_channel(SAMPLE_VOLUME); - channel2 = mixer_allocate_channel(5); - channel3 = mixer_allocate_channel(5); - vol[0]=vol[1]=VOLUME_B; - channel23 = mixer_allocate_channels(2,vol); + /* maybe bits 4 + 5 are volume control? */ + tone_level = VMAX / 2 + VMAX / 2 * ((data >> 4) & 3) / 4; +} - if (Machine->samples != 0 && Machine->samples->sample[0] != 0) - noisemulate = 0; - else - { - noisemulate = 1; - mixer_set_volume(channel1,0); - mixer_play_sample(channel1,(signed char *)waveform2,128,1000,1); - } +void pleiads_sound_control_b_w (int offset,int data) +{ + static int tms3617_chip; - /* Clear all the variables */ - { - noise_vol = 0; - noise_freq = 1000; - } + /* + * pitch selects one of 4 possible clock inputs + * (actually 3, because IC2 and IC3 are tied together) + * write note value to TMS3615; voice b1 & b2 + */ + tms3617_note_w(tms3617_chip, (data >> 6) & 3, data & 15); - mixer_set_volume(channel0,0); - mixer_play_sample(channel0,waveform0,2,1000,1); - mixer_set_volume(channel23+0,0); - mixer_play_sample(channel23+0,(signed char *)waveform1,32,1000,1); - mixer_set_volume(channel23+1,0); - mixer_play_sample(channel23+1,(signed char *)waveform1,32,1000,1); + /* next time next chip (I guess there's a flip-flop?) */ + tms3617_chip ^= 1; - return 0; -} + if (data == sound_latch_b) + return; + /* (data & 0x30) goes to a 556 */ + stream_update(channel,0); + sound_latch_b = data; +} -void pleiads_sh_update (void) +int pleiads_sh_start(const struct MachineSound *msound) { - if ((noise_vol) && (noisemulate)) + int i, j; + UINT32 shiftreg; + + poly18 = (UINT32 *)malloc((1ul << (18-5)) * sizeof(UINT32)); + + if( !poly18 ) + return 1; + + shiftreg = 0; + for( i = 0; i < (1ul << (18-5)); i++ ) { - mixer_set_volume(channel1,noise_vol*100/255); - noise_vol-=3; - } - if (readinputport(2) & 1) + UINT32 bits = 0; + for( j = 0; j < 32; j++ ) { - mixer_set_volume(channel2,100); - mixer_play_sample(channel2,waveform0,2,1000,1); - mixer_set_volume(channel2+1,100); - mixer_play_sample(channel2+1,waveform0,2,2000,1); + bits = (bits >> 1) | (shiftreg << 31); + if( ((shiftreg >> 16) & 1) == ((shiftreg >> 17) & 1) ) + shiftreg = (shiftreg << 1) | 1; + else + shiftreg <<= 1; + } + poly18[i] = bits; + } - timer_a = timer_set(TIME_IN_SEC(.2),0, timer_a_callback); - } + channel = stream_init("Custom", 50, Machine->sample_rate, 0, pleiads_sound_update); + if( channel == -1 ) + return 1; + + return 0; } -void timer_a_callback (int param) +void pleiads_sh_stop(void) { - mixer_set_volume(channel2,0); - mixer_set_volume(channel3,100); - mixer_play_sample(channel3,waveform0,2,4000,1); - - timer_b = timer_set(TIME_IN_SEC(.08),0, timer_b_callback); + if( poly18 ) + free(poly18); + poly18 = NULL; } -void timer_b_callback (int param) +void pleiads_sh_update(void) { - mixer_set_volume(channel3,0); + stream_update(channel, 0); } + + diff --git a/src/sndhrdw/segar.c b/src/sndhrdw/segar.c index 636d6556a..28f57ae94 100644 --- a/src/sndhrdw/segar.c +++ b/src/sndhrdw/segar.c @@ -25,11 +25,6 @@ speech boards, ADPCM samples, and a TMS3617 music chip. #include "driver.h" #include "cpu/i8039/i8039.h" -extern void TMS3617_voice_enable(int voice, int enable); -extern void TMS3617_pitch_w(int offset, int pitch); -extern void TMS3617_doupdate(void); - - #define TOTAL_SOUNDS 16 struct sa @@ -421,51 +416,44 @@ enum /* Monster Bash uses an 8255 to control the sounds, much like Zaxxon */ void monsterb_audio_8255_w( int offset, int data ) { - /* Port A controls the special TMS3617 music chip */ - if (offset == 0) - { - int enable_val,i; - - TMS3617_doupdate(); - - /* Lower four data lines get decoded into 13 control lines */ - TMS3617_pitch_w(0, ((data & 0x0F)+1) % 16); + /* Port A controls the special TMS3617 music chip */ + if (offset == 0) + { + int enable_val; - /* Top four data lines address an 82S123 ROM that enables/disables voices */ - enable_val = memory_region(REGION_SOUND2)[(data & 0xF0) >> 4]; + /* Lower four data lines get decoded into 13 control lines */ + tms3617_note_w(0, 0, data & 15); - for (i=2; i<8; i++) - { - if (enable_val & (1<> 4]; + tms3617_enable_w(0,enable_val >> 2); + } + /* Port B controls the two discrete sound circuits */ + else if (offset == 1) + { + if (!(data & 0x01)) + sample_start(0, mbzap, 0); - if (!(data & 0x02)) sample_start(1, mbjumpdown, 0); + if (!(data & 0x02)) + sample_start(1, mbjumpdown, 0); - /* TODO: D7 on Port B might affect TMS3617 output (mute?) */ - } - /* Port C controls a NEC7751, which is an 8048 CPU with onboard ROM */ - else if (offset == 2) - { - // D0-D2 = P24-P26, D3 = INT - port_8255_c03 = data & 0x0F; - if ((data & 0x08) == 0) - cpu_cause_interrupt(1,I8039_EXT_INT); + /* TODO: D7 on Port B might affect TMS3617 output (mute?) */ + } + /* Port C controls a NEC7751, which is an 8048 CPU with onboard ROM */ + else if (offset == 2) + { + // D0-D2 = P24-P26, D3 = INT + port_8255_c03 = data & 0x0F; + if ((data & 0x08) == 0) + cpu_cause_interrupt(1,I8039_EXT_INT); - } - /* Write to 8255 control port, this should be 0x80 for "simple mode" */ - else - { - if ((errorlog) && (data != 0x80)) - fprintf(errorlog,"8255 Control Port Write = %02X\n",data); - } + } + /* Write to 8255 control port, this should be 0x80 for "simple mode" */ + else + { + if ((errorlog) && (data != 0x80)) + fprintf(errorlog,"8255 Control Port Write = %02X\n",data); + } } int monsterb_audio_8255_r( int offset ) diff --git a/src/sndhrdw/seibu.c b/src/sndhrdw/seibu.c index 543df5b5d..b1f52a8c5 100644 --- a/src/sndhrdw/seibu.c +++ b/src/sndhrdw/seibu.c @@ -25,7 +25,7 @@ (*What on earth _is_ the YM3931?? There are no unknown memory writes) - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/sndhrdw/z80bw.c b/src/sndhrdw/z80bw.c index 839f79a9a..287c141bd 100644 --- a/src/sndhrdw/z80bw.c +++ b/src/sndhrdw/z80bw.c @@ -34,8 +34,8 @@ #include "driver.h" -void z80bw_flipscreen_w(int data); -void z80bw_screen_red_w(int data); +void invaders_flipscreen_w(int data); +void invaders_screen_red_w(int data); /* output port 0x04 definitions - sound effect drive outputs */ @@ -124,13 +124,13 @@ void astinvad_sh_port_4_w(int offset, int data) { PLAY( SND_BASEHIT, 0 ); /* turn all colours red here */ - z80bw_screen_red_w(1); + invaders_screen_red_w(1); } if ( bitsGoneLow & OUT_PORT_4_BASEHIT ) { STOP( SND_BASEHIT ); /* restore colours here */ - z80bw_screen_red_w(0); + invaders_screen_red_w(0); } if ( bitsGoneHigh & OUT_PORT_4_INVADERHIT ) PLAY( SND_INVADERHIT, 0 ); @@ -168,7 +168,7 @@ void astinvad_sh_port_5_w(int offset, int data) if ( bitsGoneHigh & OUT_PORT_5_UFO2 ) PLAY( SND_UFO2, 0 ); if ( bitsGoneLow & OUT_PORT_5_UFO2 ) STOP( SND_UFO2 ); - if ( bitsChanged & OUT_PORT_5_FLIP ) z80bw_flipscreen_w(data & 0x20); + if ( bitsChanged & OUT_PORT_5_FLIP ) invaders_flipscreen_w(data & 0x20); if ((bitsChanged & OUT_PORT_5_UNUSED) && errorlog) fprintf(errorlog, "Snd Port 5 = %02X\n", data & OUT_PORT_5_UNUSED); } diff --git a/src/sndintrf.c b/src/sndintrf.c index ba696fcb5..24f394b98 100644 --- a/src/sndintrf.c +++ b/src/sndintrf.c @@ -236,6 +236,9 @@ int YM3812_num(const struct MachineSound *msound) { return ((struct YM3812interf #if (HAS_VLM5030) int VLM5030_clock(const struct MachineSound *msound) { return ((struct VLM5030interface*)msound->sound_interface)->baseclock; } #endif +#if (HAS_TMS36XX) +int TMS36XX_num(const struct MachineSound *msound) { return ((struct TMS36XXinterface*)msound->sound_interface)->num; } +#endif #if (HAS_TMS5220) int TMS5220_clock(const struct MachineSound *msound) { return ((struct TMS5220interface*)msound->sound_interface)->baseclock; } #endif @@ -566,6 +569,18 @@ struct snd_interface sndintf[] = 0 }, #endif +#if (HAS_TMS36XX) + { + SOUND_TMS36XX, + "TMS36XX", + TMS36XX_num, + 0, + tms36xx_sh_start, + tms36xx_sh_stop, + tms36xx_sh_update, + 0 + }, +#endif #if (HAS_TMS5220) { SOUND_TMS5220, diff --git a/src/sndintrf.h b/src/sndintrf.h index a2eadce43..7150cd7ff 100644 --- a/src/sndintrf.h +++ b/src/sndintrf.h @@ -66,6 +66,9 @@ struct MachineSound #if (HAS_NAMCO) #include "sound/namco.h" #endif +#if (HAS_TMS36XX) +#include "sound/tms36xx.h" +#endif #if (HAS_TMS5220) #include "sound/5220intf.h" #endif @@ -191,6 +194,9 @@ enum #if (HAS_NAMCO) SOUND_NAMCO, #endif +#if (HAS_TMS36XX) + SOUND_TMS36XX, /* currently TMS3615 and TMS3617 */ +#endif #if (HAS_TMS5220) SOUND_TMS5220, #endif diff --git a/src/sound/ay8910.c b/src/sound/ay8910.c index 9abb49c3d..eddea11dd 100644 --- a/src/sound/ay8910.c +++ b/src/sound/ay8910.c @@ -580,6 +580,16 @@ void AY8910_set_clock(int chip,int clock) } +void AY8910_set_volume(int chip,int channel,int volume) +{ + struct AY8910 *PSG = &AYPSG[chip]; + int ch; + + for (ch = 0; ch < 3; ch++) + if (channel == ch || channel == ALL_8910_CHANNELS) + mixer_set_volume(PSG->Channel + ch, volume); +} + static void build_mixer_table(int chip) { diff --git a/src/sound/ay8910.h b/src/sound/ay8910.h index 38f0e94bb..243dc44a3 100644 --- a/src/sound/ay8910.h +++ b/src/sound/ay8910.h @@ -3,6 +3,7 @@ #define MAX_8910 5 +#define ALL_8910_CHANNELS -1 struct AY8910interface { @@ -19,6 +20,7 @@ struct AY8910interface void AY8910_reset(int chip); void AY8910_set_clock(int chip,int _clock); +void AY8910_set_volume(int chip,int channel,int volume); void AY8910Write(int chip,int a,int data); diff --git a/src/sound/mixer.c b/src/sound/mixer.c index f4c041566..8bd53a25b 100644 --- a/src/sound/mixer.c +++ b/src/sound/mixer.c @@ -22,6 +22,8 @@ #define FRACTION_MASK ((1 << FRACTION_BITS) - 1) +static int mixer_sound_enabled; + /* holds all the data for the a mixer channel */ struct mixer_channel_data @@ -114,6 +116,8 @@ int mixer_sh_start(void) samples_this_frame = osd_start_audio_stream(is_stereo); + mixer_sound_enabled = 1; + return 0; } @@ -470,7 +474,10 @@ void mixer_play_streamed_sample_16(int ch, INT16 *data, int len, int freq) profiler_mark(PROFILER_MIXER); /* compute the overall mixing volume */ - mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + if (mixer_sound_enabled) + mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + else + mixing_volume = 0; /* compute the step size for sample rate conversion */ if (freq != channel->frequency) @@ -544,6 +551,17 @@ int mixer_samples_this_frame(void) } +/*************************************************************************** + mixer_need_samples_this_frame +***************************************************************************/ +#define EXTRA_SAMPLES 1 // safety margin for sampling rate conversion +int mixer_need_samples_this_frame(int channel,int freq) +{ + return (samples_this_frame - mixer_channel[channel].samples_available + EXTRA_SAMPLES) + * freq / Machine->sample_rate; +} + + /*************************************************************************** mixer_play_sample ***************************************************************************/ @@ -655,6 +673,25 @@ void mixer_set_sample_frequency(int ch, int freq) } +/*************************************************************************** + mixer_sound_enable_global_w +***************************************************************************/ + +void mixer_sound_enable_global_w(int enable) +{ + int i; + struct mixer_channel_data *channel; + + /* update all channels (for streams this is a no-op) */ + for (i = 0, channel = mixer_channel; i < first_free_channel; i++, channel++) + { + mixer_update_channel(channel, sound_scalebufferpos(samples_this_frame)); + } + + mixer_sound_enabled = enable; +} + + /*************************************************************************** mix_sample_8 ***************************************************************************/ @@ -666,7 +703,10 @@ void mix_sample_8(struct mixer_channel_data *channel, int samples_to_generate) INT32 mixing_volume; /* compute the overall mixing volume */ - mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + if (mixer_sound_enabled) + mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + else + mixing_volume = 0; /* get the initial state */ step_size = channel->step_size; @@ -755,7 +795,10 @@ void mix_sample_16(struct mixer_channel_data *channel, int samples_to_generate) INT32 mixing_volume; /* compute the overall mixing volume */ - mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + if (mixer_sound_enabled) + mixing_volume = ((channel->volume * channel->mixing_level * 256) << channel->gain) / (100*100); + else + mixing_volume = 0; /* get the initial state */ step_size = channel->step_size; diff --git a/src/sound/mixer.h b/src/sound/mixer.h index 68e845677..89a244e27 100644 --- a/src/sound/mixer.h +++ b/src/sound/mixer.h @@ -49,15 +49,7 @@ const char *mixer_get_name(int channel); which is a private value set only at startup. By default, all channels play at volume 100 (the maximum). If there is some external circuitry which can alter the volume of the sound source, you can - use this function to emulate that. The resolution provided by this function - is VERY LOW, lower than the 100 steps it allows. That's because it is - scaled by the mixing level (which is typically around 25%) before being sent - to the OS dependant code, and because the resolution provided by the OS - dependant code is not guaranteed (for example, the DOS port only has 64 - levels). - Therefore, this function should only be used for rough control of the output, - or to just turn channels on and off. If precise control is needed, it should - be implemented in the stream generation. + use this function to emulate that. */ void mixer_set_volume(int channel,int volume); @@ -66,9 +58,11 @@ void mixer_play_sample_16(int channel,INT16 *data,int len,int freq,int loop); void mixer_stop_sample(int channel); int mixer_is_sample_playing(int channel); void mixer_set_sample_frequency(int channel,int freq); +void mixer_sound_enable_global_w(int enable); void mixer_play_streamed_sample_16(int channel,INT16 *data,int len,int freq); int mixer_samples_this_frame(void); +int mixer_need_samples_this_frame(int channel,int freq); /* private functions for user interface only - don't call them from drivers! */ void mixer_set_mixing_level(int channel,int level); diff --git a/src/sound/streams.c b/src/sound/streams.c index 1b1fba001..23e7e0a8a 100644 --- a/src/sound/streams.c +++ b/src/sound/streams.c @@ -10,10 +10,10 @@ #include -#define BUFFER_LEN 8192 +#define BUFFER_LEN 16384 #define SAMPLES_THIS_FRAME(channel) \ - ((mixer_samples_this_frame() * stream_sample_rate[(channel)] + Machine->sample_rate/2) / Machine->sample_rate) + mixer_need_samples_this_frame((channel),stream_sample_rate[(channel)]) static int stream_joined_channels[MIXER_MAX_CHANNELS]; static INT16 *stream_buffer[MIXER_MAX_CHANNELS]; @@ -171,7 +171,7 @@ void streams_sh_update(void) { for (i = 0;i < stream_joined_channels[channel];i++) mixer_play_streamed_sample_16(channel+i, - stream_buffer[channel+i],sizeof(INT16)*SAMPLES_THIS_FRAME(channel), + stream_buffer[channel+i],sizeof(INT16)*SAMPLES_THIS_FRAME(channel+i), stream_sample_rate[channel]); } } diff --git a/src/sound/tms36xx.c b/src/sound/tms36xx.c new file mode 100644 index 000000000..d529837b8 --- /dev/null +++ b/src/sound/tms36xx.c @@ -0,0 +1,530 @@ +#include "driver.h" + +#define VERBOSE 1 + +#if VERBOSE +#define LOG(x) if( errorlog ) fprintf x +#else +#define LOG(x) +#endif + +#define VMIN 0x0000 +#define VMAX 0x7fff + +/* the frequencies are later adjusted by "* clock / FSCALE" */ +#define FSCALE 1024 + +struct TMS36XX { + int channel; /* returned by stream_init() */ + + int samplerate; /* from Machine->sample_rate */ + + int basefreq; /* chip's base frequency */ + int octave; /* octave select of the TMS3615 */ + + int speed; /* speed of the tune */ + int tune_counter; /* tune counter */ + int note_counter; /* note counter */ + + int voices; /* active voices */ + int vol[6]; /* (decaying) volume of harmonics notes */ + int vol_counter[6]; /* volume adjustment counter */ + int decay[6]; /* volume adjustment rate - dervied from decay */ + + int counter[6]; /* tone frequency counter */ + int frequency[6]; /* tone frequency */ + int output; /* output signal bits */ + int enable; /* mask which harmoics */ + + int tune_num; /* tune currently playing */ + int tune_ofs; /* note currently playing */ + int tune_max; /* end of tune */ +}; + +struct TMS36XXinterface *intf; +struct TMS36XX *tms36xx[MAX_TMS36XX]; + +#define C(n) (int)((FSCALE<<(n-1))*1.18921) /* 2^(3/12) */ +#define Cx(n) (int)((FSCALE<<(n-1))*1.25992) /* 2^(4/12) */ +#define D(n) (int)((FSCALE<<(n-1))*1.33484) /* 2^(5/12) */ +#define Dx(n) (int)((FSCALE<<(n-1))*1.41421) /* 2^(6/12) */ +#define E(n) (int)((FSCALE<<(n-1))*1.49831) /* 2^(7/12) */ +#define F(n) (int)((FSCALE<<(n-1))*1.58740) /* 2^(8/12) */ +#define Fx(n) (int)((FSCALE<<(n-1))*1.68179) /* 2^(9/12) */ +#define G(n) (int)((FSCALE<<(n-1))*1.78180) /* 2^(10/12) */ +#define Gx(n) (int)((FSCALE<<(n-1))*1.88775) /* 2^(11/12) */ +#define A(n) (int)((FSCALE<vol[voice] > VMIN ) \ + { \ + /* decay of first voice */ \ + tms->vol_counter[voice] -= tms->decay[voice]; \ + while( tms->vol_counter[voice] <= 0 ) \ + { \ + tms->vol_counter[voice] += samplerate; \ + if( tms->vol[voice]-- <= VMIN ) \ + { \ + tms->frequency[voice] = 0; \ + tms->vol[voice] = VMIN; \ + break; \ + } \ + } \ + } + +#define RESTART(voice) \ + if( tunes[tms->tune_num][tms->tune_ofs*6+voice] ) \ + { \ + tms->frequency[voice] = \ + tunes[tms->tune_num][tms->tune_ofs*6+voice] * \ + (tms->basefreq << tms->octave) / FSCALE; \ + tms->vol[voice] = VMAX; \ + } + +#define TONE(voice) \ + if( (tms->enable & (1<frequency[voice] ) \ + { \ + /* first note */ \ + tms->counter[voice] -= tms->frequency[voice]; \ + while( tms->counter[voice] <= 0 ) \ + { \ + tms->counter[voice] += samplerate; \ + tms->output ^= 1 << voice; \ + } \ + if (tms->output & tms->enable & (1 << voice)) \ + sum += tms->vol[voice]; \ + } + + + +static void tms36xx_sound_update(int param, INT16 *buffer, int length) +{ + struct TMS36XX *tms = tms36xx[param]; + int samplerate = tms->samplerate; + + /* no tune played? */ + if( !tunes[tms->tune_num] || tms->voices == 0 ) + { + while (--length >= 0) + buffer[length] = 0; + return; + } + + while( length-- > 0 ) + { + int sum = 0; + + /* decay the six voices */ + DECAY(0) DECAY(1) DECAY(2) + DECAY(3) DECAY(4) DECAY(5) + + /* musical note timing */ + tms->tune_counter -= tms->speed; + if( tms->tune_counter <= 0 ) + { + int n = (-tms->tune_counter / samplerate) + 1; + tms->tune_counter += n * samplerate; + + if( (tms->note_counter -= n) <= 0 ) + { + tms->note_counter += VMAX; + if (tms->tune_ofs < tms->tune_max) + { + RESTART(0) RESTART(1) RESTART(2) + RESTART(3) RESTART(4) RESTART(5) + tms->tune_ofs++; + } + } + } + + /* update the six harmonic voices */ + TONE(0) TONE(1) TONE(2) + TONE(3) TONE(4) TONE(5) + + *buffer++ = sum / tms->voices; + } +} + +static void tms36xx_reset_counters(int chip) +{ + struct TMS36XX *tms = tms36xx[chip]; + tms->tune_counter = 0; + tms->note_counter = 0; + memset(tms->vol_counter, 0, sizeof(tms->vol_counter)); + memset(tms->counter, 0, sizeof(tms->counter)); +} + +void tms3615_tune_w(int chip, int tune) +{ + struct TMS36XX *tms = tms36xx[chip]; + + /* which tune? */ + tune &= 3; + if( tune == tms->tune_num ) + return; + + /* update the stream before changing the tune */ + stream_update(tms->channel,0); + + tms->tune_num = tune; + tms->tune_ofs = 0; + tms->tune_max = 96; /* fixed for now */ +} + +void tms3617_note_w(int chip, int octave, int note) +{ + struct TMS36XX *tms = tms36xx[chip]; + + octave &= 3; + note &= 15; + + if (note > 12) + return; + + LOG((errorlog,"TMS3615 #%d octave:%X note:%X\n", chip, octave, note)); + + /* update the stream before changing the tune */ + stream_update(tms->channel,0); + + /* play a single note from 'tune 4', a list of the 13 tones */ + tms36xx_reset_counters(chip); + tms->octave = octave; + tms->tune_num = 4; + tms->tune_ofs = note; + tms->tune_max = note + 1; +} + +void tms3617_enable_w(int chip, int enable) +{ + struct TMS36XX *tms = tms36xx[chip]; + int i, bits = 0; + + enable &= 0x3f; + if (enable == tms->enable) + return; + + /* update the stream before changing the tune */ + stream_update(tms->channel,0); + + for (i = 0; i < 6; i++) + bits += (enable & (1 << i)) ? 1 : 0; + /* set the enable mask and number of active voices */ + tms->enable = enable; + tms->voices = bits; +} + +int tms36xx_sh_start(const struct MachineSound *msound) +{ + int i, j; + intf = msound->sound_interface; + + for( i = 0; i < intf->num; i++ ) + { + int enable; + struct TMS36XX *tms; + char name[16]; + + sprintf(name, "TMS36%02d #%d", intf->subtype[i], i); + tms36xx[i] = malloc(sizeof(struct TMS36XX)); + if( !tms36xx[i] ) + { + if( errorlog ) fprintf(errorlog, "%s failed to malloc struct TMS36XX\n", name); + return 1; + } + tms = tms36xx[i]; + memset(tms, 0, sizeof(struct TMS36XX)); + + tms->channel = stream_init(name, intf->mixing_level[i], Machine->sample_rate, i, tms36xx_sound_update); + + if( tms->channel == -1 ) + { + if( errorlog ) fprintf(errorlog, "%s stream_init failed\n", name); + return 1; + } + tms->samplerate = Machine->sample_rate ? Machine->sample_rate : 1; + tms->basefreq = intf->basefreq[i]; + enable = 0; + for (j = 0; j < 6; j++) + { + if( intf->decay[i][j] > 0 ) + { + tms->decay[j] = VMAX / intf->decay[i][j]; + enable |= 1 << j; + } + } + tms->speed = (intf->speed[i] > 0) ? VMAX / intf->speed[i] : VMAX; + tms3617_enable_w(i,enable); + + LOG((errorlog, "%s samplerate %d\n", name, tms->samplerate)); + LOG((errorlog, "%s basefreq %d\n", name, tms->basefreq)); + LOG((errorlog, "%s speed %d\n", name, tms->speed)); + LOG((errorlog, "%s decay %d,%d,%d,%d,%d,%d\n", name, + tms->decay[0], tms->decay[1], tms->decay[2], + tms->decay[3], tms->decay[4], tms->decay[5])); + } + return 0; +} + +void tms36xx_sh_stop(void) +{ + int i; + for( i = 0; i < intf->num; i++ ) + { + if( tms36xx[i] ) + free(tms36xx[i]); + tms36xx[i] = NULL; + } +} + +void tms36xx_sh_update(void) +{ + int i; + for( i = 0; i < intf->num; i++ ) + stream_update(i,0); +} + diff --git a/src/sound/tms36xx.h b/src/sound/tms36xx.h new file mode 100644 index 000000000..4147a1962 --- /dev/null +++ b/src/sound/tms36xx.h @@ -0,0 +1,31 @@ +#ifndef TMS36XX_SOUND_H +#define TMS36XX_SOUND_H + +#define MAX_TMS36XX 4 + +/* subtypes */ +#define TMS3615 15 +#define TMS3617 17 + +/* The interface structure */ +struct TMS36XXinterface { + int num; + int mixing_level[MAX_TMS36XX]; + int subtype[MAX_TMS36XX]; + int basefreq[MAX_TMS36XX]; /* base frequenies of the chips */ + double decay[MAX_TMS36XX][6]; /* decay times for the six harmonic notes */ + double speed[MAX_TMS36XX]; /* tune speed (meaningful for the TMS3615 only) */ +}; + +extern int tms36xx_sh_start(const struct MachineSound *msound); +extern void tms36xx_sh_stop(void); +extern void tms36xx_sh_update(void); + +/* TMS3615 interface functions */ +extern void tms3615_tune_w(int chip, int tune); + +/* TMS3615 interface functions */ +extern void tms3617_note_w(int chip, int octave, int note); +extern void tms3617_enable_w(int chip, int enable); + +#endif diff --git a/src/tilemap.c b/src/tilemap.c index d5bc2fd1b..b69cad694 100644 --- a/src/tilemap.c +++ b/src/tilemap.c @@ -45,8 +45,8 @@ Optimizations/Features TBA: #include "driver.h" #include "tilemap.h" -static UINT8 flip_bit_table[0x100]; -static struct tilemap *first_tilemap; +static UINT8 flip_bit_table[0x100]; /* horizontal flip for 8 pixels */ +static struct tilemap *first_tilemap; /* resource tracking */ static int screen_width, screen_height; struct tile_info tile_info; @@ -898,6 +898,8 @@ void tilemap_render( struct tilemap *tilemap ){ /***********************************************************************************/ void tilemap_draw( struct osd_bitmap *dest, struct tilemap *tilemap, int priority ){ + int xpos,ypos; + if( tilemap->enable ){ void (*draw)( int, int ); @@ -961,176 +963,233 @@ void tilemap_draw( struct osd_bitmap *dest, struct tilemap *tilemap, int priorit draw( 0,0 ); } else if( rows == 0 ){ /* scrolling columns */ - int col,colwidth; - - colwidth = blit.source_width / cols; + int col = 0; + int colwidth = blit.source_width / cols; blit.clip_top = top; blit.clip_bottom = bottom; - col = 0; while( col < cols ){ - int cons,scroll; + int cons = 1; + int scrolly = colscroll[col]; /* count consecutive columns scrolled by the same amount */ - scroll = colscroll[col]; - cons = 1; - if(scroll != TILE_LINE_DISABLED) - { - while( col + cons < cols && colscroll[col + cons] == scroll ) cons++; + if( scrolly != TILE_LINE_DISABLED ){ + while( col + cons < cols && colscroll[col + cons] == scrolly ) cons++; - if (scroll < 0) scroll = blit.source_height - (-scroll) % blit.source_height; - else scroll %= blit.source_height; + if (scrolly < 0){ + scrolly = blit.source_height - (-scrolly) % blit.source_height; + } + else { + scrolly %= blit.source_height; + } blit.clip_left = col * colwidth; - if (blit.clip_left < left) blit.clip_left = left; + if( blit.clip_left < left ) blit.clip_left = left; blit.clip_right = (col + cons) * colwidth; - if (blit.clip_right > right) blit.clip_right = right; + if( blit.clip_right > right ) blit.clip_right = right; - draw( 0,scroll ); - draw( 0,scroll - blit.source_height ); + for( + ypos = scrolly - blit.source_height; + ypos < blit.clip_bottom; + ypos += blit.source_height ) + { + draw( 0,ypos ); + } } col += cons; } } else if( cols == 0 ){ /* scrolling rows */ - int row,rowheight; - - rowheight = blit.source_height / rows; + int row = 0; + int rowheight = blit.source_height / rows; blit.clip_left = left; blit.clip_right = right; - row = 0; while( row < rows ){ - int cons,scroll; + int cons = 1; + int scrollx = rowscroll[row]; /* count consecutive rows scrolled by the same amount */ - scroll = rowscroll[row]; - cons = 1; - if(scroll != TILE_LINE_DISABLED) - { - while( row + cons < rows && rowscroll[row + cons] == scroll ) cons++; + if( scrollx != TILE_LINE_DISABLED ){ + while( row + cons < rows && rowscroll[row + cons] == scrollx ) cons++; - if (scroll < 0) scroll = blit.source_width - (-scroll) % blit.source_width; - else scroll %= blit.source_width; + if( scrollx < 0 ){ + scrollx = blit.source_width - (-scrollx) % blit.source_width; + } + else { + scrollx %= blit.source_width; + } blit.clip_top = row * rowheight; if (blit.clip_top < top) blit.clip_top = top; blit.clip_bottom = (row + cons) * rowheight; if (blit.clip_bottom > bottom) blit.clip_bottom = bottom; - draw( scroll,0 ); - draw( scroll - blit.source_width,0 ); + for( + xpos = scrollx - blit.source_width; + xpos right) blit.clip_right = right; - draw( scrollx,scroll ); - draw( scrollx,scroll - blit.source_height ); + for( + ypos = scrolly - blit.source_height; + ypos < blit.clip_bottom; + ypos += blit.source_height + ){ + draw( scrollx,ypos ); + } blit.clip_left = col * colwidth + scrollx - blit.source_width; if (blit.clip_left < left) blit.clip_left = left; blit.clip_right = (col + cons) * colwidth + scrollx - blit.source_width; if (blit.clip_right > right) blit.clip_right = right; - draw( scrollx - blit.source_width,scroll ); - draw( scrollx - blit.source_width,scroll - blit.source_height ); + for( + ypos = scrolly - blit.source_height; + ypos < blit.clip_bottom; + ypos += blit.source_height + ){ + draw( scrollx - blit.source_width,ypos ); + } } col += cons; } } else if( cols == 1 ){ /* scrolling rows + vertical scroll */ - int row,rowheight; - int scrolly; + int row = 0; + int rowheight = blit.source_height / rows; + int scrolly = colscroll[0]; - if (colscroll[0] < 0) scrolly = blit.source_height - (-colscroll[0]) % blit.source_height; - else scrolly = colscroll[0] % blit.source_height; - - rowheight = blit.source_height / rows; + if( scrolly < 0 ){ + scrolly = blit.source_height - (-scrolly) % blit.source_height; + } + else { + scrolly = scrolly % blit.source_height; + } blit.clip_left = left; blit.clip_right = right; - row = 0; while( row < rows ){ - int cons,scroll; + int cons = 1; + int scrollx = rowscroll[row]; /* count consecutive rows scrolled by the same amount */ - scroll = rowscroll[row]; - cons = 1; - if(scroll != TILE_LINE_DISABLED) - { - while (row + cons < rows && rowscroll[row + cons] == scroll) cons++; - if (scroll < 0) scroll = blit.source_width - (-scroll) % blit.source_width; - else scroll %= blit.source_width; + if( scrollx != TILE_LINE_DISABLED ){ + while( row + cons < rows && rowscroll[row + cons] == scrollx ) cons++; + + if( scrollx < 0){ + scrollx = blit.source_width - (-scrollx) % blit.source_width; + } + else { + scrollx %= blit.source_width; + } blit.clip_top = row * rowheight + scrolly; if (blit.clip_top < top) blit.clip_top = top; blit.clip_bottom = (row + cons) * rowheight + scrolly; if (blit.clip_bottom > bottom) blit.clip_bottom = bottom; - draw( scroll,scrolly ); - draw( scroll - blit.source_width,scrolly ); + for( + xpos = scrollx - blit.source_width; + xpos < blit.clip_right; + xpos += blit.source_width + ){ + draw( xpos,scrolly ); + } blit.clip_top = row * rowheight + scrolly - blit.source_height; if (blit.clip_top < top) blit.clip_top = top; blit.clip_bottom = (row + cons) * rowheight + scrolly - blit.source_height; if (blit.clip_bottom > bottom) blit.clip_bottom = bottom; - draw( scroll,scrolly - blit.source_height ); - draw( scroll - blit.source_width,scrolly - blit.source_height ); + for( + xpos = scrollx - blit.source_width; + xpos < blit.clip_right; + xpos += blit.source_width + ){ + draw( xpos,scrolly - blit.source_height ); + } } row += cons; } diff --git a/src/timer.c b/src/timer.c index d4e977624..7821a81fa 100644 --- a/src/timer.c +++ b/src/timer.c @@ -546,6 +546,13 @@ int timer_schedule_cpu(int *cpu, int *cycles) /* reset scheduling so it starts with CPU 0 */ last_activecpu = lastcpu; +#ifdef MAME_DEBUG +{ + extern int debug_key_delay; + debug_key_delay = 0x7ffe; +} +#endif + /* go back to scheduling */ return pick_cpu(cpu, cycles, timer_head->expire); } diff --git a/src/usrintrf.c b/src/usrintrf.c index 4a1b444c8..8d4d4767f 100644 --- a/src/usrintrf.c +++ b/src/usrintrf.c @@ -16,6 +16,9 @@ #include "mess/mess.h" #endif +#define SEL_BITS 12 +#define SEL_MASK ((1<orientation ^ trueorientation) & ORIENTATION_FLIP_X; flipy = (Machine->orientation ^ trueorientation) & ORIENTATION_FLIP_Y; + + if (Machine->orientation & ORIENTATION_SWAP_XY) + { + int t; + t = flipx; flipx = flipy; flipy = t; + } #else flipx = 0; flipy = 0; @@ -1121,7 +1130,7 @@ static void showcharset(void) sy = Machine->uiymin + 2*Machine->uifontheight + (Machine->uifontheight)*(i / 16) + Machine->uifontheight; for (y = 0;y < Machine->uifontheight;y++) { - for (x = 0;x < Machine->uifontwidth*3/2;x++) + for (x = 0;x < Machine->uifontwidth*4/3;x++) { int tx,ty; if (Machine->ui_orientation & ORIENTATION_SWAP_XY) @@ -1323,14 +1332,15 @@ static void showtotalcolors(void) { char *used; int i,l,x,y,total; + unsigned char r,g,b; char buf[40]; int trueorientation; - used = malloc(0x10000); + used = malloc(64*64*64); if (!used) return; - for (i = 0;i < 0x10000;i++) + for (i = 0;i < 64*64*64;i++) used[i] = 0; if (Machine->scrbitmap->depth == 16) @@ -1339,7 +1349,11 @@ static void showtotalcolors(void) { for (x = 0;x < Machine->scrbitmap->width;x++) { - used[((unsigned short *)Machine->scrbitmap->line[y])[x]] = 1; + osd_get_pen(((unsigned short *)Machine->scrbitmap->line[y])[x],&r,&g,&b); + r >>= 2; + g >>= 2; + b >>= 2; + used[64*64*r+64*g+b] = 1; } } } @@ -1349,13 +1363,17 @@ static void showtotalcolors(void) { for (x = 0;x < Machine->scrbitmap->width;x++) { - used[Machine->scrbitmap->line[y][x]] = 1; + osd_get_pen(Machine->scrbitmap->line[y][x],&r,&g,&b); + r >>= 2; + g >>= 2; + b >>= 2; + used[64*64*r+64*g+b] = 1; } } } total = 0; - for (i = 0;i < 0x10000;i++) + for (i = 0;i < 64*64*64;i++) if (used[i]) total++; /* hack: force the display into standard orientation to avoid */ @@ -1377,9 +1395,9 @@ static void showtotalcolors(void) static int setdipswitches(int selected) { - const char *menu_item[40]; - const char *menu_subitem[40]; - struct InputPort *entry[40]; + const char *menu_item[128]; + const char *menu_subitem[128]; + struct InputPort *entry[128]; char flag[40]; int i,sel; struct InputPort *in; @@ -2065,13 +2083,13 @@ static int mame_stats(int selected) sel = selected - 1; - strcpy(buf, "Tickets dispensed: "); - if (!dispensed_tickets) - strcat (buf, "NA\n\n"); - else + buf[0] = 0; + + if (dispensed_tickets) { - sprintf (temp, "%d\n\n", dispensed_tickets); - strcat (buf, temp); + strcat(buf, "Tickets dispensed: "); + sprintf(temp, "%d\n\n", dispensed_tickets); + strcat(buf, temp); } for (i=0; igamedrv->flags & (GAME_NOT_WORKING | GAME_WRONG_COLORS | GAME_IMPERFECT_COLORS | - GAME_NO_SOUND | GAME_IMPERFECT_SOUND)) + GAME_NO_SOUND | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL)) { int done; @@ -2366,6 +2384,11 @@ int showgamewarnings(void) strcat(buf, "The game lacks sound.\n"); } + if (Machine->gamedrv->flags & GAME_NO_COCKTAIL) + { + strcat(buf, "Screen flipping in cocktail mode is not supported.\n"); + } + if (Machine->gamedrv->flags & GAME_NOT_WORKING) { const struct GameDriver *maindrv; @@ -3339,7 +3362,7 @@ static void onscrd_vector_intensity(int increment,int arg) intensity_correction = vector_get_intensity(); sprintf(buf,"Vector intensity %1.2f",intensity_correction); - displayosd(buf,100*(intensity_correction-0.5)/(3.0-0.5),100*(1.0-0.5)/(3.0-0.5)); + displayosd(buf,100*(intensity_correction-0.5)/(3.0-0.5),100*(1.5-0.5)/(3.0-0.5)); } diff --git a/src/usrintrf.h b/src/usrintrf.h index 3e8a1420c..a5f00d0d1 100644 --- a/src/usrintrf.h +++ b/src/usrintrf.h @@ -17,12 +17,13 @@ struct DisplayText int y; }; +#define SEL_BITS 12 +#define SEL_MASK ((1<drv->screen_width,Machine->drv->screen_height)) == 0) - return 1; +#define BLACK 0x00,0x00,0x00 +#define RED 0xff,0x20,0x20 +#define GREEN 0x20,0xff,0x20 +#define YELLOW 0xff,0xff,0x20 +#define WHITE 0xff,0xff,0xff +#define CYAN 0x20,0xff,0xff +#define PURPLE 0xff,0x20,0xff - return 0; -} +#define ORANGE 0xff,0x90,0x20 +#define YELLOW_GREEN 0x90,0xff,0x20 +#define GREEN_CYAN 0x20,0xff,0x90 +#define END {{ -1, -1, -1, -1}, 0,0,0,0} -/*************************************************************************** - Stop the video hardware emulation. +static const struct artwork_element invaders_overlay[]= +{ + {{ 0, 255, 0, 255}, WHITE, 0xff}, + {{ 16, 71, 0, 255}, GREEN, 0xff}, + {{ 0, 15, 16, 133}, GREEN, 0xff}, + {{ 192, 223, 0, 255}, RED, 0xff}, + END +}; + +static const struct artwork_element invdpt2m_overlay[]= +{ + {{ 0, 255, 0, 255}, WHITE, 0xff}, + {{ 16, 71, 0, 255}, GREEN, 0xff}, + {{ 0, 15, 16, 133}, GREEN, 0xff}, + {{ 72, 191, 0, 255}, YELLOW, 0xff}, + {{ 192, 223, 0, 255}, RED, 0xff}, + END +}; + +static const struct artwork_element invrvnge_overlay[]= +{ + {{ 0, 255, 0, 255}, WHITE, 0xff}, + {{ 0, 71, 0, 255}, GREEN, 0xff}, + {{ 192, 223, 0, 255}, RED, 0xff}, + END +}; -***************************************************************************/ -void invaders_vh_stop (void) +static const struct artwork_element invad2ct_overlay[]= { - osd_free_bitmap (tmpbitmap); + {{ 0, 24, 0, 255}, YELLOW, 0xff}, + {{ 25, 47, 0, 255}, YELLOW_GREEN, 0xff}, + {{ 48, 70, 0, 255}, GREEN_CYAN, 0xff}, + {{ 71, 116, 0, 255}, CYAN, 0xff}, + {{ 117, 139, 0, 255}, GREEN_CYAN, 0xff}, + {{ 140, 162, 0, 255}, GREEN, 0xff}, + {{ 163, 185, 0, 255}, YELLOW_GREEN, 0xff}, + {{ 186, 208, 0, 255}, YELLOW, 0xff}, + {{ 209, 231, 0, 255}, ORANGE, 0xff}, + {{ 232, 255, 0, 255}, RED, 0xff}, + END +}; + + +void init_8080bw(void) +{ + videoram_w_p = bw_videoram_w; + vh_screenrefresh_p = vh_screenrefresh; + use_tmpbitmap = 0; + screen_red_enabled = 0; + init_overlay = 0; + color_map_select = 0; + flipscreen = 0; } -void invaders_vh_flipscreen(int data) +void init_invaders(void) { - if (input_port_3_r(0) & 0x01) - { - if (data != flipped) - { - int x,y; - int x_size = 256, y_size = 224; - int x_start = 0, y_start = 0; - int x_last, y_last; - if (Machine->orientation & ORIENTATION_SWAP_XY) - { - int tw = x_size; - x_size = y_size, y_size = tw; - } - if (Machine->orientation & ORIENTATION_FLIP_X) - x_start = 256-x_size; - if (Machine->orientation & ORIENTATION_FLIP_Y) - y_start = 256-y_size; - x_last = x_start+x_size-1; - y_last = y_start+y_size-1; - for (y = 0; y < y_size; y++) - { - for (x = 0; x < x_size/2; x++) - { - if (tmpbitmap->depth == 16) - { - int col = ((unsigned short *)tmpbitmap->line[y_last-y])[x_last-x]; - ((unsigned short *)Machine->scrbitmap->line[y_last-y])[x_last-x] = - ((unsigned short *)tmpbitmap->line[y_last-y])[x_last-x] = - ((unsigned short *)tmpbitmap->line[y_start+y])[x_start+x]; - ((unsigned short *)Machine->scrbitmap->line[y_start+y])[x_start+x] = - ((unsigned short *)tmpbitmap->line[y_start+y])[x_start+x] = col; - } - else - { - int col = tmpbitmap->line[y_last-y][x_last-x]; - Machine->scrbitmap->line[y_last-y][x_last-x] = tmpbitmap->line[y_last-y][x_last-x] = tmpbitmap->line[y_start+y][x_start+x]; - Machine->scrbitmap->line[y_start+y][x_start+x] = tmpbitmap->line[y_start+y][x_start+x] = col; - } - } - } - osd_mark_dirty (x_start,y_start,x_last,y_last,0); - flipped = data; - } - } + init_8080bw(); + init_overlay = invaders_overlay; } -static void plot_pixel_8080 (int x, int y, int col) +void init_invdpt2m(void) { - if (flipped) - { - x = 255-x; - y = 223-y; - } + init_8080bw(); + init_overlay = invdpt2m_overlay; +} - plot_pixel2(Machine->scrbitmap,tmpbitmap,x,y,col); +void init_invrvnge(void) +{ + init_8080bw(); + init_overlay = invrvnge_overlay; } -void invaders_videoram_w (int offset,int data) +void init_invad2ct(void) { - if (invaders_videoram[offset] != data) - { - int i,x,y; - int col; + init_8080bw(); + init_overlay = invad2ct_overlay; +} - invaders_videoram[offset] = data; +void init_schaser(void) +{ + init_8080bw(); + videoram_w_p = schaser_videoram_w; +} - y = offset / 32; - x = 8 * (offset % 32); +void init_rollingc(void) +{ + init_8080bw(); + videoram_w_p = rollingc_videoram_w; +} - /* Calculate overlay color for this byte */ - col = Machine->pens[WHITE]; - if (x >= 16 && x < 72) col = Machine->pens[GREEN]; - if (x < 16 && y > 16 && y < 134) col = Machine->pens[GREEN]; - if (x >= 192 && x < 224) col = Machine->pens[RED]; +void init_invadpt2(void) +{ + init_8080bw(); + videoram_w_p = invadpt2_videoram_w; + screen_red_enabled = 1; +} - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, col); +void init_seawolf(void) +{ + init_8080bw(); + vh_screenrefresh_p = seawolf_vh_screenrefresh; + use_tmpbitmap = 1; +} - x++; - data >>= 1; - } - } +void init_blueshrk(void) +{ + init_8080bw(); + vh_screenrefresh_p = blueshrk_vh_screenrefresh; + use_tmpbitmap = 1; } -void invdpt2m_videoram_w (int offset,int data) +void init_desertgu(void) { - if (invaders_videoram[offset] != data) - { - int i,x,y; - int col; + init_8080bw(); + vh_screenrefresh_p = desertgu_vh_screenrefresh; + use_tmpbitmap = 1; +} - invaders_videoram[offset] = data; +void init_astinvad(void) +{ + init_8080bw(); + videoram_w_p = astinvad_videoram_w; + screen_red_enabled = 1; +} - y = offset / 32; - x = 8 * (offset % 32); +void init_spaceint(void) +{ + init_8080bw(); + videoram_w_p = spaceint_videoram_w; +} - /* Calculate overlay color for this byte */ - col = Machine->pens[WHITE]; - if (x >= 16 && x < 72) col = Machine->pens[GREEN]; - if (x < 16 && y > 16 && y < 134) col = Machine->pens[GREEN]; - if (x >= 72 && x < 192) col = Machine->pens[YELLOW]; - if (x >= 192 && x < 224) col = Machine->pens[RED]; - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, col); +int invaders_vh_start(void) +{ + /* create overlay if one of was specified in init_X */ + if (init_overlay) + { + if ((overlay = artwork_create(init_overlay, 2, Machine->drv->total_colors-2)) == 0) + return 1; - x ++; - data >>= 1; - } + use_tmpbitmap = 1; } + + if (use_tmpbitmap && (generic_bitmapped_vh_start() != 0)) + return 1; + + plot_pixel_p = use_tmpbitmap ? plot_pixel_8080_tmpbitmap : plot_pixel_8080; + + return 0; } -void invad2ct_videoram_w (int offset,int data) + +void invaders_vh_stop(void) { - if (invaders_videoram[offset] != data) + if (overlay) { - int i,x,y; - int col; - int band; + artwork_free(overlay); + overlay = 0; + } + + if (use_tmpbitmap) generic_bitmapped_vh_stop(); +} - invaders_videoram[offset] = data; - y = offset / 32; - x = 8 * (offset % 32); +void invaders_flipscreen_w(int data) +{ + if (data != color_map_select) + { + color_map_select = data; + redraw_screen = 1; + } - for (i = 0; i < 8; i++) + if (input_port_3_r(0) & 0x01) + { + if (data != flipscreen) { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - { - /* Calculate overlay color for this bit */ - - /* (This overlay is dithered to create color transitions, - this is a close approximation) */ - - col = Machine->pens[WHITE]; - band = (x - 2)/23; - - if (band < 1) - col = Machine->pens[YELLOW]; - else if (band < 2) - col = Machine->pens[YELLOW_GREEN]; - else if (band < 3) - col = Machine->pens[GREEN_CYAN]; - else if (band < 4) - col = Machine->pens[CYAN]; - else if (band < 5) - col = Machine->pens[CYAN]; - else if (band < 6) - col = Machine->pens[GREEN_CYAN]; - else if (band < 7) - col = Machine->pens[GREEN]; - else if (band < 8) - col = Machine->pens[YELLOW_GREEN]; - else if (band < 9) - col = Machine->pens[YELLOW]; - else if (band < 10) - col = Machine->pens[ORANGE]; - else - col = Machine->pens[RED]; - - plot_pixel_8080 (x, y, col); - } - x++; - data >>= 1; + flipscreen = data; + redraw_screen = 1; } } } -void invrvnge_videoram_w (int offset,int data) + +void invaders_screen_red_w(int data) { - if (invaders_videoram[offset] != data) + if (screen_red_enabled && (data != screen_red)) { - int i,x,y; - int col; - - invaders_videoram[offset] = data; + screen_red = data; + redraw_screen = 1; + } +} - y = offset / 32; - x = 8 * (offset % 32); - /* Calculate overlay color for this byte */ - col = Machine->pens[WHITE]; - if (x < 72) col = Machine->pens[GREEN]; - if (x >= 192 && x < 224) col = Machine->pens[RED]; +static void plot_pixel_8080 (int x, int y, int col) +{ + if (flipscreen) + { + x = 255-x; + y = 223-y; + } - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, col); + plot_pixel(Machine->scrbitmap,x,y,Machine->pens[col]); +} - x ++; - data >>= 1; - } +static void plot_pixel_8080_tmpbitmap (int x, int y, int col) +{ + if (flipscreen) + { + x = 255-x; + y = 223-y; } + + plot_pixel2(Machine->scrbitmap,tmpbitmap,x,y,Machine->pens[col]); } -void lrescue_videoram_w (int offset,int data) +void invaders_videoram_w (int offset,int data) { - if (invaders_videoram[offset] != data) - { - int i,x,y; - int col; - - invaders_videoram[offset] = data; + videoram_w_p(offset, data); +} - y = offset / 32; - x = 8 * (offset % 32); - /* Calculate overlay color for this byte */ - col = Machine->pens[WHITE]; +static void bw_videoram_w (int offset,int data) +{ + int i,x,y; - if (x >= 240 && x < 248) - { - if (y < 72) col = Machine->pens[CYAN]; - if (y >= 72 && y < 152) col = Machine->pens[RED]; - if (y >= 152) col = Machine->pens[YELLOW]; - } - if (x >= 232 && x < 240) - { - if (y < 72) col = Machine->pens[CYAN]; - if (y >= 72 && y < 160) col = Machine->pens[GREEN]; - if (y >= 160) col = Machine->pens[YELLOW]; - } - if (x >= 224 && x < 232) - { - if (y >= 72 && y < 160) col = Machine->pens[GREEN]; /* or 152? */ - if (y >= 160) col = Machine->pens[YELLOW]; - } + videoram[offset] = data; - if (x >= 216 && x < 224) col = Machine->pens[RED]; - if (x >= 192 && x < 216) col = Machine->pens[PURPLE]; - if (x >= 160 && x < 192) col = Machine->pens[GREEN]; - if (x >= 128 && x < 160) col = Machine->pens[CYAN]; - if (x >= 96 && x < 128) col = Machine->pens[PURPLE]; - if (x >= 64 && x < 96) col = Machine->pens[YELLOW]; - if (x >= 40 && x < 64) col = Machine->pens[RED]; - if (x >= 24 && x < 40) col = Machine->pens[CYAN]; - if (x >= 16 && x < 24) col = Machine->pens[RED]; - if (x < 16) - { - if (y < 136) col = Machine->pens[CYAN]; - if (y >= 136 && y < 192) col = Machine->pens[PURPLE]; - if (y >= 192) col = Machine->pens[CYAN]; - } - if (y == 223) col = Machine->pens[BLACK]; + y = offset / 32; + x = 8 * (offset % 32); - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, col); + for (i = 0; i < 8; i++) + { + plot_pixel_p (x, y, data & 0x01); - x ++; - data >>= 1; - } + x ++; + data >>= 1; } } -void rollingc_videoram_w (int offset,int data) -{ - /* TODO: get rid of this */ - unsigned char *RAM = memory_region(REGION_CPU1); +/* thr only difference between these is the background color */ +static void schaser_videoram_w (int offset,int data) +{ + int i,x,y,fore_color,back_color; - if (invaders_videoram[offset] != data) - { - int i,x,y; + videoram[offset] = data; - invaders_videoram[offset] = data; + y = offset / 32; + x = 8 * (offset % 32); - y = offset / 32; - x = 8 * (offset % 32); + back_color = 2; /* blue */ + fore_color = colorram[offset & 0x1f1f] & 0x07; - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[16]); - else - plot_pixel_8080 (x, y, Machine->pens[RAM[0xa400 + offset] & 0x0f]); + for (i = 0; i < 8; i++) + { + if (data & 0x01) + plot_pixel_p (x, y, fore_color); + else + plot_pixel_p (x, y, back_color); - x ++; - data >>= 1; - } + x ++; + data >>= 1; } } +static void rollingc_videoram_w (int offset,int data) +{ + int i,x,y,fore_color,back_color; -/* Bandido has an optional colour kit than can be added on */ /* MJC */ -/* this includes a rom image that we do not yet have, so .. */ + videoram[offset] = data; -void boothill_videoram_w (int offset,int data) -{ - if (invaders_videoram[offset] != data) + y = offset / 32; + x = 8 * (offset % 32); + + back_color = 0; /* black */ + fore_color = colorram[offset & 0x1f1f] & 0x07; + + for (i = 0; i < 8; i++) { - int i,x,y; + if (data & 0x01) + plot_pixel_p (x, y, fore_color); + else + plot_pixel_p (x, y, back_color); - invaders_videoram[offset] = data; + x ++; + data >>= 1; + } +} - y = offset / 32; - x = 8 * (offset % 32); +void schaser_colorram_w (int offset,int data) +{ + int i; - for (i = 0; i < 8; i++) - { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, Machine->pens[WHITE]); - x ++; - data >>= 1; - } + offset &= 0x1f1f; + + colorram[offset] = data; + + /* redraw region with (possibly) changed color */ + for (i = 0; i < 8; i++, offset += 0x20) + { + videoram_w_p(offset, videoram[offset]); } } - /*************************************************************************** Draw the game screen in the given osd_bitmap. @@ -387,123 +373,192 @@ void boothill_videoram_w (int offset,int data) ***************************************************************************/ void invaders_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { - palette_recalc(); + vh_screenrefresh_p(bitmap, full_refresh); +} + + +static void vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + if (palette_recalc() || redraw_screen || (full_refresh && !use_tmpbitmap)) + { + int offs; + + for (offs = 0;offs < videoram_size;offs++) + videoram_w_p(offs, videoram[offs]); + + redraw_screen = 0; + + if (overlay) + overlay_remap(overlay); + } - if (full_refresh) + + if (full_refresh && use_tmpbitmap) /* copy the character mapped graphics */ copybitmap(bitmap,tmpbitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); + + if (overlay) + overlay_draw(bitmap,overlay); } -void seawolf_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) + +static void draw_sight(struct osd_bitmap *bitmap, int x_center, int y_center) { - int x,y,centre,middle; + int x,y; - /* Update the Bitmap (and erase old cross) */ - copybitmap(bitmap,tmpbitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); + if (x_center<2) x_center=2; + if (x_center>253) x_center=253; - /* Draw the Sight */ + if (y_center<2) y_center=2; + if (y_center>253) y_center=253; - centre = ((input_port_0_r(0) & 0x1f) * 8) + 4; - middle = 31; + for(y = y_center-10; y < y_center+11; y++) + if((y >= 0) && (y < 256)) + plot_pixel(bitmap,x_center,y,Machine->pens[1]); + + for(x = x_center-20; x < x_center+21; x++) + if((x >= 0) && (x < 256)) + plot_pixel(bitmap,x,y_center,Machine->pens[1]); +} - if (centre<2) centre=2; - if (centre>253) centre=253; - middle = 31; +static void seawolf_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + /* update the bitmap (and erase old cross) */ - for(y=middle-10;ypens[GREEN]); + vh_screenrefresh(bitmap, 1); - for(x=centre-20;x0) && (x<256)) - plot_pixel(bitmap,x,middle,Machine->pens[GREEN]); + draw_sight(bitmap, ((input_port_0_r(0) & 0x1f) * 8) + 4, 31); } -void blueshrk_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +static void blueshrk_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { - int x,y,centre,middle; + /* update the bitmap (and erase old cross) */ - /* Update the Bitmap (and erase old cross) */ + vh_screenrefresh(bitmap, 1); - copybitmap(bitmap,tmpbitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); + draw_sight(bitmap, ((input_port_1_r(0) & 0x7f) * 2) - 12, 31); +} - /* Draw the Sight */ +static void desertgu_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + /* update the bitmap (and erase old cross) */ - centre = (((input_port_1_r(0)) & 0x7f) * 2) - 12; - middle = 31; + vh_screenrefresh(bitmap, 1); - if (centre<2) centre=2; - if (centre>253) centre=253; + draw_sight(bitmap, + ((input_port_1_r(0) & 0x7f) * 2) - 30, + ((input_port_2_r(0) & 0x7f) * 2) - 30); +} - middle = 31; - for(y=middle-10;ypens[GREEN]); +void invadpt2_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +{ + int i; - for(x=centre-20;x0) && (x<256)) - plot_pixel(bitmap,x,middle,Machine->pens[GREEN]); -} -/*******************************************************/ -/* */ -/* Taito "Balloon Bomber" */ -/* */ -/*******************************************************/ + for (i = 0;i < Machine->drv->total_colors;i++) + { + /* this bit arrangment is a little unusual but are confirmed by screen shots */ -static const unsigned char *colourrom; + *(palette++) = 0xff * ((i >> 0) & 1); + *(palette++) = 0xff * ((i >> 2) & 1); + *(palette++) = 0xff * ((i >> 1) & 1); + } +} -void ballbomb_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +static void invadpt2_videoram_w (int offset,int data) { - int i; - #define TOTAL_COLORS(gfxn) (Machine->gfx[gfxn]->total_colors * Machine->gfx[gfxn]->color_granularity) - #define COLOR(gfxn,offs) (colortable[Machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) + int i,x,y; + int col; - colourrom = color_prom + 128; + videoram[offset] = data; - *(palette++) = 0; - *(palette++) = 0; - *(palette++) = 0; + y = offset / 32; + x = 8 * (offset % 32); - for (i = 1;i < Machine->drv->total_colors-1;i++) + /* 32 x 32 colormap */ + if (!screen_red) + col = memory_region(REGION_PROMS)[(color_map_select ? 0x400 : 0 ) + (((y+32)/8)*32) + (x/8)] & 7; + else + col = 1; /* red */ + + for (i = 0; i < 8; i++) { - *(palette++) = 0xdf * (((i >> 0) & 1) == 0) + 0x20; - *(palette++) = 0xdf * (((i >> 1) & 1) == 0) + 0x20; - *(palette++) = 0xdf * (((i >> 2) & 1) == 0) + 0x20; + plot_pixel_p(x, y, (data & 0x01) ? col : 0); + + x ++; + data >>= 1; } +} - *(palette++) = 0xff; - *(palette++) = 0xff; - *(palette++) = 0xff; + +void astinvad_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +{ + int i; + + for (i = 0;i < Machine->drv->total_colors;i++) + { + *(palette++) = 0xff * ((i >> 2) & 1); + *(palette++) = 0xff * ((i >> 1) & 1); + *(palette++) = 0xff * ((i >> 0) & 1); + } } -void ballbomb_videoram_w (int offset,int data) + +static void astinvad_videoram_w (int offset,int data) { - if (invaders_videoram[offset] != data) + int i,x,y; + int col; + + videoram[offset] = data; + + y = offset / 32; + x = 8 * (offset % 32); + + if (!screen_red) + { + if (flipscreen) + col = memory_region(REGION_PROMS)[((y+32)/8)*32+(x/8)] >> 4; + else + col = memory_region(REGION_PROMS)[(31-y/8)*32+(31-x/8)] & 0x0f; + } + else + col = 4; /* red */ + + for (i = 0; i < 8; i++) { - int i,x,y; - int col; + plot_pixel_p(x, y, (data & 0x01) ? col : 0); - invaders_videoram[offset] = data; + x++; + data >>= 1; + } +} + +static void spaceint_videoram_w (int offset,int data) +{ + int i; + UINT8 x,y; - y = offset / 32; - x = 8 * (offset % 32); + videoram[offset] = data; - /* 32 x 32 colourmap */ + y = 8 * (offset / 256); + x = offset % 256; - col = colourrom[((y / 8) * 32) + (x / 8)] & 7; - col = Machine->pens[col]; + for (i = 0; i < 8; i++) + { + int col = 0; - for (i = 0; i < 8; i++) + if (data & 0x01) { - if (!(data & 0x01)) - plot_pixel_8080 (x, y, Machine->pens[BLACK]); - else - plot_pixel_8080 (x, y, col); - - x ++; - data >>= 1; + /* this is wrong */ + col = memory_region(REGION_PROMS)[(y/16)+16*((x+16)/32)]; } + + plot_pixel_p(x, y, col); + + y++; + data >>= 1; } } diff --git a/src/vidhrdw/actfancr.c b/src/vidhrdw/actfancr.c index d5548996e..918b37790 100644 --- a/src/vidhrdw/actfancr.c +++ b/src/vidhrdw/actfancr.c @@ -1,6 +1,6 @@ /******************************************************************************* - actfancr - Bryan McPhail, mish@tendril.force9.net + actfancr - Bryan McPhail, mish@tendril.co.uk *******************************************************************************/ diff --git a/src/vidhrdw/alpha68k.c b/src/vidhrdw/alpha68k.c index c6fda6033..d1d0fcedc 100644 --- a/src/vidhrdw/alpha68k.c +++ b/src/vidhrdw/alpha68k.c @@ -1,6 +1,6 @@ /*************************************************************************** - Alpha 68k video emulation - Bryan McPhail, mish@tendril.force9.net + Alpha 68k video emulation - Bryan McPhail, mish@tendril.co.uk ****************************************************************************/ diff --git a/src/vidhrdw/ambush.c b/src/vidhrdw/ambush.c index d7dafb74e..b519be4a1 100644 --- a/src/vidhrdw/ambush.c +++ b/src/vidhrdw/ambush.c @@ -61,8 +61,10 @@ void ambush_vh_convert_color_prom(unsigned char *palette, unsigned short *colort static void draw_chars(struct osd_bitmap *bitmap, int priority) { - int offs; + int offs, transparency; + + transparency = (priority == 0) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN; for (offs = 0; offs < videoram_size; offs++) { @@ -93,7 +95,7 @@ static void draw_chars(struct osd_bitmap *bitmap, int priority) (col & 0x0f) | ((*ambush_colorbank & 0x03) << 4), *flip_screen,*flip_screen, 8*sx, (8*sy + scroll) & 0xff, - &Machine->drv->visible_area,TRANSPARENCY_COLOR,0); + &Machine->drv->visible_area,transparency,0); } } diff --git a/src/vidhrdw/astrof.c b/src/vidhrdw/astrof.c index c5ed91b9b..bf59342c6 100644 --- a/src/vidhrdw/astrof.c +++ b/src/vidhrdw/astrof.c @@ -19,7 +19,6 @@ static int flipscreen = 0; static int force_refresh = 0; static int do_modify_palette = 0; static int palette_bank = -1, red_on = -1; -static int protection_value; static const unsigned char *prom; @@ -220,16 +219,18 @@ void tomahawk_video_control2_w(int offset,int data) int tomahawk_protection_r(int offset) { - switch (*tomahawk_protection) - { - case 0xeb: return 0xd7; - case 0x58: return 0x1a; - case 0x43: return 0xc2; - - default: - if (errorlog) fprintf(errorlog, "Unknown protection read %02X\n", protection_value); - return 0x00; - } + /* flip the byte */ + + int res = ((*tomahawk_protection & 0x01) << 7) | + ((*tomahawk_protection & 0x02) << 5) | + ((*tomahawk_protection & 0x04) << 3) | + ((*tomahawk_protection & 0x08) << 1) | + ((*tomahawk_protection & 0x10) >> 1) | + ((*tomahawk_protection & 0x20) >> 3) | + ((*tomahawk_protection & 0x40) >> 5) | + ((*tomahawk_protection & 0x80) >> 7); + + return res; } /*************************************************************************** diff --git a/src/vidhrdw/cbuster.c b/src/vidhrdw/cbuster.c index c52609de3..2ed6784d2 100644 --- a/src/vidhrdw/cbuster.c +++ b/src/vidhrdw/cbuster.c @@ -1,6 +1,6 @@ /*************************************************************************** - Crude Buster Video emulation - Bryan McPhail, mish@tendril.force9.net + Crude Buster Video emulation - Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/vidhrdw/citycon.c b/src/vidhrdw/citycon.c index 3032ccd47..00d586e8f 100644 --- a/src/vidhrdw/citycon.c +++ b/src/vidhrdw/citycon.c @@ -89,7 +89,7 @@ void citycon_background_w(int offset,int data) } /* bit 0 flips screen */ - /* maybe it is also used to multiplex player 1 and player 2 controls */ + /* it is also used to multiplex player 1 and player 2 controls */ if (flipscreen != (data & 1)) { flipscreen = data & 1; @@ -101,6 +101,10 @@ void citycon_background_w(int offset,int data) if (errorlog && (data & 0x0e) != 0) fprintf(errorlog,"background register = %02x\n",data); } +int citycon_in_r(int offset) +{ + return readinputport(flipscreen); +} /*************************************************************************** diff --git a/src/vidhrdw/cninja.c b/src/vidhrdw/cninja.c index fdf747e61..2df964b85 100644 --- a/src/vidhrdw/cninja.c +++ b/src/vidhrdw/cninja.c @@ -1,6 +1,6 @@ /*************************************************************************** - Caveman Ninja Video emulation - Bryan McPhail, mish@tendril.force9.net + Caveman Ninja Video emulation - Bryan McPhail, mish@tendril.co.uk **************************************************************************** diff --git a/src/vidhrdw/combatsc.c b/src/vidhrdw/combatsc.c index b5db4abad..042db3f29 100644 --- a/src/vidhrdw/combatsc.c +++ b/src/vidhrdw/combatsc.c @@ -15,19 +15,19 @@ static struct tilemap *textlayer; static unsigned char *private_spriteram[2]; static int priority; -unsigned char *combatsc_io_ram; -static int combatsc_vreg; +unsigned char *combasc_io_ram; +static int combasc_vreg; unsigned char* banked_area; -static int combatsc_bank_select; /* 0x00..0x1f */ -static int combatsc_video_circuit; /* 0 or 1 */ -static unsigned char *combatsc_page[2]; -static unsigned char combatsc_scrollram0[0x20]; -static unsigned char combatsc_scrollram1[0x20]; -static unsigned char *combatsc_scrollram; +static int combasc_bank_select; /* 0x00..0x1f */ +static int combasc_video_circuit; /* 0 or 1 */ +static unsigned char *combasc_page[2]; +static unsigned char combasc_scrollram0[0x40]; +static unsigned char combasc_scrollram1[0x40]; +static unsigned char *combasc_scrollram; -void combatsc_convert_color_prom(unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ) +void combasc_convert_color_prom(unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ) { int i,pal,clut = 0; for( pal=0; pal<8; pal++ ) @@ -64,12 +64,27 @@ void combatsc_convert_color_prom(unsigned char *palette, unsigned short *colorta else *(colortable++) = 16 * pal + color_prom[256 * clut + i]; } - else + else /* chars */ *(colortable++) = 16 * pal + color_prom[256 * clut + i]; } } } +void combascb_convert_color_prom(unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom ) +{ + int i,pal; + for( pal=0; pal<8; pal++ ) + { + for( i=0; i<256; i++ ) + { + if ((pal & 1) == 0) /* sprites */ + *(colortable++) = 16 * pal + (color_prom[i] ^ 0x0f); + else /* chars */ + *(colortable++) = 16 * pal + (i & 0x0f); /* no lookup? */ + } + } +} + /*************************************************************************** Callbacks for the TileMap code @@ -79,51 +94,110 @@ void combatsc_convert_color_prom(unsigned char *palette, unsigned short *colorta static void get_tile_info0( int col, int row ) { int tile_index = row*32 + col; - unsigned char attributes = combatsc_page[0][tile_index]; - int bank = 4*((combatsc_vreg & 0x0f) - 1); + unsigned char attributes = combasc_page[0][tile_index]; + int bank = 4*((combasc_vreg & 0x0f) - 1); + int number,color; + + if (bank < 0) bank = 0; + if ((attributes & 0xb0) == 0) bank = 0; /* text bank */ + + if (attributes & 0x80) bank += 1; + if (attributes & 0x10) bank += 2; + if (attributes & 0x20) bank += 4; + + color = ((K007121_ctrlram[0][6]&0x10)*2+16) + (attributes & 0x0f); + + number = combasc_page[0][tile_index + 0x400] + 256*bank; + + SET_TILE_INFO(0,number,color) + tile_info.priority = (attributes & 0x40) >> 6; +} + +static void get_tile_info1( int col, int row ) +{ + int tile_index = row*32 + col; + unsigned char attributes = combasc_page[1][tile_index]; + int bank = 4*((combasc_vreg >> 4) - 1); + int number, color; + + if (bank < 0) bank = 0; + if ((attributes & 0xb0) == 0) bank = 0; /* text bank */ + + if (attributes & 0x80) bank += 1; + if (attributes & 0x10) bank += 2; + if (attributes & 0x20) bank += 4; + + color = ((K007121_ctrlram[1][6]&0x10)*2+16+4*16) + (attributes & 0x0f); + + number = combasc_page[1][tile_index + 0x400] + 256*bank; + + SET_TILE_INFO(1,number,color) + tile_info.priority = (attributes & 0x40) >> 6; +} + +static void get_text_info( int col, int row ) +{ + int tile_index = row*32 + col + 0x800; + unsigned char attributes = combasc_page[0][tile_index]; + int number = combasc_page[0][tile_index + 0x400]; + int color = 16 + (attributes & 0x0f); + + SET_TILE_INFO(0,number,color) + + /* the following hack is needed because the TileMap system doesn't support TRANSPARENCY_COLOR */ + tile_info.flags = 0; + if ((attributes & 0x0f) == 0x01 || (attributes & 0x0f) == 0x0e) + tile_info.flags = TILE_IGNORE_TRANSPARENCY; +} + +static void get_tile_info0_bootleg( int col, int row ) +{ + int tile_index = row*32 + col; + unsigned char attributes = combasc_page[0][tile_index]; + int bank = 4*((combasc_vreg & 0x0f) - 1); int number, pal, color; if (bank < 0) bank = 0; - if ((attributes & 0xf0) == 0) bank = 0; /* text bank */ + if ((attributes & 0xb0) == 0) bank = 0; /* text bank */ if (attributes & 0x80) bank += 1; if (attributes & 0x10) bank += 2; if (attributes & 0x20) bank += 4; pal = (bank == 0 || bank >= 0x1c || (attributes & 0x40)) ? 1 : 3; - color = pal*16 + (attributes & 0x0f); - number = combatsc_page[0][tile_index + 0x400] + 256*bank; + color = pal*16;// + (attributes & 0x0f); + number = combasc_page[0][tile_index + 0x400] + 256*bank; - SET_TILE_INFO(0, number, color) + SET_TILE_INFO(0,number,color) } -static void get_tile_info1( int col, int row ) +static void get_tile_info1_bootleg( int col, int row ) { int tile_index = row*32 + col; - unsigned char attributes = combatsc_page[1][tile_index]; - int bank = 4*((combatsc_vreg >> 4) - 1); + unsigned char attributes = combasc_page[1][tile_index]; + int bank = 4*((combasc_vreg >> 4) - 1); int number, pal, color; if (bank < 0) bank = 0; - if ((attributes & 0xf0) == 0) bank = 0; /* text bank */ + if ((attributes & 0xb0) == 0) bank = 0; /* text bank */ if (attributes & 0x80) bank += 1; if (attributes & 0x10) bank += 2; if (attributes & 0x20) bank += 4; pal = (bank == 0 || bank >= 0x1c || (attributes & 0x40)) ? 5 : 7; - color = pal*16 + (attributes & 0x0f); - number = combatsc_page[1][tile_index + 0x400] + 256*bank; + color = pal*16;// + (attributes & 0x0f); + number = combasc_page[1][tile_index + 0x400] + 256*bank; - SET_TILE_INFO(1, number, color) + SET_TILE_INFO(1,number,color) } -static void get_text_info( int col, int row ) +static void get_text_info_bootleg( int col, int row ) { int tile_index = row*32 + col + 0x800; - unsigned char attributes = combatsc_page[0][tile_index]; - int number = combatsc_page[0][tile_index + 0x400]; - int color = 16 + (attributes & 0x0f); /* should be right */ +// unsigned char attributes = combasc_page[0][tile_index]; + int number = combasc_page[0][tile_index + 0x400]; + int color = 16;// + (attributes & 0x0f); SET_TILE_INFO(1, number, color) } @@ -134,13 +208,13 @@ static void get_text_info( int col, int row ) ***************************************************************************/ -int combatsc_vh_start(void) +int combasc_vh_start(void) { - combatsc_vreg = -1; + combasc_vreg = -1; - tilemap[0] = tilemap_create(get_tile_info0,TILEMAP_TRANSPARENT,8,8,32,32); - tilemap[1] = tilemap_create(get_tile_info1,TILEMAP_TRANSPARENT,8,8,32,32); - textlayer = tilemap_create(get_text_info, TILEMAP_TRANSPARENT,8,8,32,32); + tilemap[0] = tilemap_create(get_tile_info0,TILEMAP_TRANSPARENT,8,8,32,32); + tilemap[1] = tilemap_create(get_tile_info1,TILEMAP_TRANSPARENT,8,8,32,32); + textlayer = tilemap_create(get_text_info, TILEMAP_TRANSPARENT,8,8,32,32); private_spriteram[0] = malloc(0x800); private_spriteram[1] = malloc(0x800); @@ -153,8 +227,7 @@ int combatsc_vh_start(void) tilemap[1]->transparent_pen = 0; textlayer->transparent_pen = 0; - tilemap_set_scroll_rows( tilemap[0], 32 ); - tilemap_set_scroll_rows( tilemap[1], 32 ); + tilemap_set_scroll_rows(textlayer,32); return 0; } @@ -162,7 +235,35 @@ int combatsc_vh_start(void) return 1; } -void combatsc_vh_stop(void) +int combascb_vh_start(void) +{ + combasc_vreg = -1; + + tilemap[0] = tilemap_create(get_tile_info0_bootleg,TILEMAP_TRANSPARENT,8,8,32,32); + tilemap[1] = tilemap_create(get_tile_info1_bootleg,TILEMAP_TRANSPARENT,8,8,32,32); + textlayer = tilemap_create(get_text_info_bootleg, TILEMAP_TRANSPARENT,8,8,32,32); + + private_spriteram[0] = malloc(0x800); + private_spriteram[1] = malloc(0x800); + memset(private_spriteram[0],0,0x800); + memset(private_spriteram[1],0,0x800); + + if (tilemap[0] && tilemap[1] && textlayer) + { + tilemap[0]->transparent_pen = 0; + tilemap[1]->transparent_pen = 0; + textlayer->transparent_pen = 0; + + tilemap_set_scroll_rows(tilemap[0],32); + tilemap_set_scroll_rows(tilemap[1],32); + + return 0; + } + + return 1; +} + +void combasc_vh_stop(void) { free(private_spriteram[0]); free(private_spriteram[1]); @@ -174,12 +275,12 @@ void combatsc_vh_stop(void) ***************************************************************************/ -int combatsc_video_r( int offset ) +int combasc_video_r( int offset ) { return videoram[offset]; } -void combatsc_video_w( int offset, int data ) +void combasc_video_w( int offset, int data ) { if( videoram[offset]!=data ) { @@ -187,12 +288,12 @@ void combatsc_video_w( int offset, int data ) if( offset<0x800 ) { offset = offset&0x3ff; - if (combatsc_video_circuit) + if (combasc_video_circuit) tilemap_mark_tile_dirty( tilemap[1], offset%32, offset/32 ); else tilemap_mark_tile_dirty( tilemap[0], offset%32, offset/32 ); } - else if( offset<0x1000 && combatsc_video_circuit==0 ) + else if( offset<0x1000 && combasc_video_circuit==0 ) { offset = offset&0x3ff; tilemap_mark_tile_dirty( textlayer, offset%32, offset/32 ); @@ -201,26 +302,26 @@ void combatsc_video_w( int offset, int data ) } -void combatsc_vreg_w( int offset, int data ) +void combasc_vreg_w( int offset, int data ) { - if (data != combatsc_vreg) + if (data != combasc_vreg) { tilemap_mark_all_tiles_dirty( textlayer ); - if ((data & 0x0f) != (combatsc_vreg & 0x0f)) + if ((data & 0x0f) != (combasc_vreg & 0x0f)) tilemap_mark_all_tiles_dirty( tilemap[0] ); - if ((data >> 4) != (combatsc_vreg >> 4)) + if ((data >> 4) != (combasc_vreg >> 4)) tilemap_mark_all_tiles_dirty( tilemap[1] ); - combatsc_vreg = data; + combasc_vreg = data; } } -void combatsc_sh_irqtrigger_w(int offset, int data) +void combascb_sh_irqtrigger_w(int offset, int data) { soundlatch_w(offset,data); cpu_cause_interrupt(1,0xff); } -int combatsc_io_r( int offset ) +int combasc_io_r( int offset ) { if ((offset <= 0x403) && (offset >= 0x400)) { @@ -235,33 +336,33 @@ int combatsc_io_r( int offset ) return banked_area[offset]; } -void combatsc_io_w( int offset, int data ) +void combasc_io_w( int offset, int data ) { switch (offset) { case 0x400: priority = data & 0x20; break; - case 0x800: combatsc_sh_irqtrigger_w(0, data); break; - case 0xc00: combatsc_vreg_w(0, data); break; + case 0x800: combascb_sh_irqtrigger_w(0, data); break; + case 0xc00: combasc_vreg_w(0, data); break; default: - combatsc_io_ram[offset] = data; + combasc_io_ram[offset] = data; } } -void combatsc_bankselect_w( int offset, int data ) +void combasc_bankselect_w(int offset,int data) { unsigned char *page = memory_region(REGION_CPU1) + 0x10000; if (data & 0x40) { - combatsc_video_circuit = 1; - videoram = combatsc_page[1]; - combatsc_scrollram = combatsc_scrollram1; + combasc_video_circuit = 1; + videoram = combasc_page[1]; + combasc_scrollram = combasc_scrollram1; } else { - combatsc_video_circuit = 0; - videoram = combatsc_page[0]; - combatsc_scrollram = combatsc_scrollram0; + combasc_video_circuit = 0; + videoram = combasc_page[0]; + combasc_scrollram = combasc_scrollram0; } priority = data & 0x20; @@ -276,24 +377,24 @@ void combatsc_bankselect_w( int offset, int data ) } } -void combascb_bankselect_w( int offset, int data ) +void combascb_bankselect_w(int offset,int data) { if (data & 0x40) { - combatsc_video_circuit = 1; - videoram = combatsc_page[1]; + combasc_video_circuit = 1; + videoram = combasc_page[1]; } else { - combatsc_video_circuit = 0; - videoram = combatsc_page[0]; + combasc_video_circuit = 0; + videoram = combasc_page[0]; } data = data & 0x1f; - if( data != combatsc_bank_select ) + if( data != combasc_bank_select ) { unsigned char *page = memory_region(REGION_CPU1) + 0x10000; - combatsc_bank_select = data; + combasc_bank_select = data; if (data & 0x10) { @@ -307,8 +408,8 @@ void combascb_bankselect_w( int offset, int data ) if (data == 0x1f) { cpu_setbank(1,page + 0x20000 + 0x4000 * (data & 1)); - cpu_setbankhandler_r (1, combatsc_io_r);/* IO RAM & Video Registers */ - cpu_setbankhandler_w (1, combatsc_io_w); + cpu_setbankhandler_r (1, combasc_io_r);/* IO RAM & Video Registers */ + cpu_setbankhandler_w (1, combasc_io_w); } else { @@ -318,47 +419,47 @@ cpu_setbank(1,page + 0x20000 + 0x4000 * (data & 1)); } } -void combatsc_init_machine( void ) +void combasc_init_machine( void ) { unsigned char *MEM = memory_region(REGION_CPU1) + 0x38000; - combatsc_io_ram = MEM + 0x0000; - combatsc_page[0] = MEM + 0x4000; - combatsc_page[1] = MEM + 0x6000; + combasc_io_ram = MEM + 0x0000; + combasc_page[0] = MEM + 0x4000; + combasc_page[1] = MEM + 0x6000; - memset( combatsc_io_ram, 0x00, 0x4000 ); - memset( combatsc_page[0], 0x00, 0x2000 ); - memset( combatsc_page[1], 0x00, 0x2000 ); + memset( combasc_io_ram, 0x00, 0x4000 ); + memset( combasc_page[0], 0x00, 0x2000 ); + memset( combasc_page[1], 0x00, 0x2000 ); - combatsc_bank_select = -1; - combatsc_bankselect_w( 0,0 ); + combasc_bank_select = -1; + combasc_bankselect_w( 0,0 ); } -void combatsc_pf_control_w( int offset, int data ) +void combasc_pf_control_w( int offset, int data ) { - K007121_ctrl_w(combatsc_video_circuit,offset,data); + K007121_ctrl_w(combasc_video_circuit,offset,data); if (offset == 7) - tilemap_set_flip(tilemap[combatsc_video_circuit],(data & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); + tilemap_set_flip(tilemap[combasc_video_circuit],(data & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); if (offset == 3) { if (data & 0x08) - memcpy(private_spriteram[combatsc_video_circuit],combatsc_page[combatsc_video_circuit]+0x1000,0x800); + memcpy(private_spriteram[combasc_video_circuit],combasc_page[combasc_video_circuit]+0x1000,0x800); else - memcpy(private_spriteram[combatsc_video_circuit],combatsc_page[combatsc_video_circuit]+0x1800,0x800); + memcpy(private_spriteram[combasc_video_circuit],combasc_page[combasc_video_circuit]+0x1800,0x800); } } -int combatsc_scrollram_r( int offset ) +int combasc_scrollram_r( int offset ) { - return combatsc_scrollram[offset]; + return combasc_scrollram[offset]; } -void combatsc_scrollram_w( int offset, int data ) +void combasc_scrollram_w( int offset, int data ) { - combatsc_scrollram[offset] = data; + combasc_scrollram[offset] = data; } @@ -371,60 +472,101 @@ void combatsc_scrollram_w( int offset, int data ) static void draw_sprites(struct osd_bitmap *bitmap, const unsigned char *source, int circuit) { - K007121_sprites_draw(circuit,bitmap,source,(circuit*4)*16,0,0); + int base_color = (circuit*4)*16+(K007121_ctrlram[circuit][6]&0x10)*2; + + K007121_sprites_draw(circuit,bitmap,source,base_color,0,0); } -void combatsc_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ) +void combasc_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ) { int i; - if (!K007121_ctrlram[0][0x00] && K007121_ctrlram[0][0x01] != 8) - for( i=0; i<32; i++ ) + if (K007121_ctrlram[0][0x01] & 0x02) + { + tilemap_set_scroll_rows(tilemap[0],32); + for (i = 0;i < 32;i++) { - tilemap_set_scrollx( tilemap[0],i, combatsc_scrollram0[i] ); + tilemap_set_scrollx(tilemap[0],i,combasc_scrollram0[i]); } + } else - for( i=0; i<32; i++ ) - { - tilemap_set_scrollx( tilemap[0],i, K007121_ctrlram[0][0] ); - } - if (!K007121_ctrlram[1][0x00] && K007121_ctrlram[1][0x01] != 8) - for( i=0; i<32; i++ ) + { + tilemap_set_scroll_rows(tilemap[0],1); + tilemap_set_scrollx(tilemap[0],0,K007121_ctrlram[0][0x00] | ((K007121_ctrlram[0][0x01] & 0x01) << 8)); + } + + if (K007121_ctrlram[1][0x01] & 0x02) + { + tilemap_set_scroll_rows(tilemap[1],32); + for (i = 0;i < 32;i++) { - tilemap_set_scrollx( tilemap[1],i, combatsc_scrollram1[i] ); + tilemap_set_scrollx(tilemap[1],i,combasc_scrollram1[i]); } + } else - for( i=0; i<32; i++ ) - { - tilemap_set_scrollx( tilemap[1],i, K007121_ctrlram[1][0] ); - } + { + tilemap_set_scroll_rows(tilemap[1],1); + tilemap_set_scrollx( tilemap[1],0,K007121_ctrlram[1][0x00] | ((K007121_ctrlram[1][0x01] & 0x01) << 8)); + } - tilemap_set_scrolly( tilemap[0],0, K007121_ctrlram[0][0x02] ); - tilemap_set_scrolly( tilemap[1],0, K007121_ctrlram[1][0x02] ); + tilemap_set_scrolly(tilemap[0],0,K007121_ctrlram[0][0x02]); + tilemap_set_scrolly(tilemap[1],0,K007121_ctrlram[1][0x02]); - tilemap_update( ALL_TILEMAPS ); + tilemap_update(ALL_TILEMAPS); if (palette_recalc()) tilemap_mark_all_pixels_dirty(ALL_TILEMAPS); - tilemap_render( ALL_TILEMAPS ); + tilemap_render(ALL_TILEMAPS); if (priority == 0) { - tilemap_draw( bitmap,tilemap[1],TILEMAP_IGNORE_TRANSPARENCY ); - draw_sprites( bitmap, private_spriteram[0], 0 ); - tilemap_draw( bitmap,tilemap[0],0 ); - draw_sprites( bitmap, private_spriteram[1], 1 ); +/* + TODO: there's a priority bug in the Mission level which isn't easy to fix. + It is an orthogonality issue: while tilemap[1],1 has priority over sprites 1, + and sprites 1 have priority over tilemap[0],1, tilemap[1] does NOT have + priority over tilemap[0]. As it is now, the damage indicator passes behind the + wall when you go through the first door, while it should of course be in front. + */ + tilemap_draw(bitmap,tilemap[1],TILEMAP_IGNORE_TRANSPARENCY|0); + tilemap_draw(bitmap,tilemap[0],0); + draw_sprites(bitmap,private_spriteram[0],0); + tilemap_draw(bitmap,tilemap[0],1); + draw_sprites(bitmap,private_spriteram[1],1); + tilemap_draw(bitmap,tilemap[1],1); } else { - tilemap_draw( bitmap,tilemap[0],TILEMAP_IGNORE_TRANSPARENCY ); - draw_sprites( bitmap, private_spriteram[0], 0 ); - tilemap_draw( bitmap,tilemap[1],0 ); - draw_sprites( bitmap, private_spriteram[1], 1 ); + tilemap_draw(bitmap,tilemap[0],TILEMAP_IGNORE_TRANSPARENCY|0); + draw_sprites(bitmap,private_spriteram[0],0); + tilemap_draw(bitmap,tilemap[0],1); + tilemap_draw(bitmap,tilemap[1],0); + draw_sprites(bitmap,private_spriteram[1],1); + tilemap_draw(bitmap,tilemap[1],1); } - tilemap_draw( bitmap,textlayer,0 ); + if (K007121_ctrlram[0][0x01] & 0x08) + { + for (i = 0;i < 32;i++) + { + tilemap_set_scrollx(textlayer,i,combasc_scrollram0[0x20+i] ? 0 : TILE_LINE_DISABLED); + tilemap_draw(bitmap,textlayer,0); + } + } + + /* chop the extreme columns if necessary */ + if (K007121_ctrlram[0][0x03] & 0x40) + { + struct rectangle clip; + + clip = Machine->drv->visible_area; + clip.max_x = clip.min_x + 7; + fillbitmap(bitmap,Machine->pens[0],&clip); + + clip = Machine->drv->visible_area; + clip.min_x = clip.max_x - 7; + fillbitmap(bitmap,Machine->pens[0],&clip); + } } @@ -488,31 +630,31 @@ static void bootleg_draw_sprites( struct osd_bitmap *bitmap, const unsigned char color = (circuit*4)*16 + (color >> 4); /* hacks to select alternate palettes */ - if(combatsc_vreg == 0x40 && (attributes & 0x40)) color += 1*16; - if(combatsc_vreg == 0x23 && (attributes & 0x02)) color += 1*16; - if(combatsc_vreg == 0x66 ) color += 2*16; +// if(combasc_vreg == 0x40 && (attributes & 0x40)) color += 1*16; +// if(combasc_vreg == 0x23 && (attributes & 0x02)) color += 1*16; +// if(combasc_vreg == 0x66 ) color += 2*16; drawgfx( bitmap, gfx, number, color, attributes & 0x10,0, /* flip */ x,y, - clip, TRANSPARENCY_PEN, 0 ); + clip, TRANSPARENCY_PEN, 15 ); } source -= 8; } } -void cmbatscb_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ) +void combascb_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ) { int i; for( i=0; i<32; i++ ) { - tilemap_set_scrollx( tilemap[0],i, combatsc_io_ram[0x040+i]+5 ); - tilemap_set_scrollx( tilemap[1],i, combatsc_io_ram[0x060+i]+3 ); + tilemap_set_scrollx( tilemap[0],i, combasc_io_ram[0x040+i]+5 ); + tilemap_set_scrollx( tilemap[1],i, combasc_io_ram[0x060+i]+3 ); } - tilemap_set_scrolly( tilemap[0],0, combatsc_io_ram[0x000] ); - tilemap_set_scrolly( tilemap[1],0, combatsc_io_ram[0x020] ); + tilemap_set_scrolly( tilemap[0],0, combasc_io_ram[0x000] ); + tilemap_set_scrolly( tilemap[1],0, combasc_io_ram[0x020] ); tilemap_update( ALL_TILEMAPS ); if (palette_recalc()) @@ -522,16 +664,16 @@ void cmbatscb_vh_screenrefresh( struct osd_bitmap *bitmap, int fullrefresh ) if (priority == 0) { tilemap_draw( bitmap,tilemap[1],TILEMAP_IGNORE_TRANSPARENCY ); - bootleg_draw_sprites( bitmap, combatsc_page[0], 0 ); + bootleg_draw_sprites( bitmap, combasc_page[0], 0 ); tilemap_draw( bitmap,tilemap[0],0 ); - bootleg_draw_sprites( bitmap, combatsc_page[1], 1 ); + bootleg_draw_sprites( bitmap, combasc_page[1], 1 ); } else { tilemap_draw( bitmap,tilemap[0],TILEMAP_IGNORE_TRANSPARENCY ); - bootleg_draw_sprites( bitmap, combatsc_page[0], 0 ); + bootleg_draw_sprites( bitmap, combasc_page[0], 0 ); tilemap_draw( bitmap,tilemap[1],0 ); - bootleg_draw_sprites( bitmap, combatsc_page[1], 1 ); + bootleg_draw_sprites( bitmap, combasc_page[1], 1 ); } tilemap_draw( bitmap,textlayer,0 ); diff --git a/src/vidhrdw/contra.c b/src/vidhrdw/contra.c index ea6aeb1d0..b49603ba8 100644 --- a/src/vidhrdw/contra.c +++ b/src/vidhrdw/contra.c @@ -71,7 +71,11 @@ static void get_fg_tile_info( int col, int row ) ((attr >> (bit0+2)) & 0x02) | ((attr >> (bit1+1)) & 0x04) | ((attr >> (bit2 )) & 0x08) | - ((attr >> (bit3-1)) & 0x10); + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); SET_TILE_INFO(0, contra_fg_vram[offs]+bank*256, ((K007121_ctrlram[0][6]&0x30)*2+16)+(attr&7) ) } @@ -88,7 +92,11 @@ static void get_bg_tile_info( int col, int row ) ((attr >> (bit0+2)) & 0x02) | ((attr >> (bit1+1)) & 0x04) | ((attr >> (bit2 )) & 0x08) | - ((attr >> (bit3-1)) & 0x10); + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[1][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[1][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); SET_TILE_INFO(1, contra_bg_vram[offs]+bank*256, ((K007121_ctrlram[1][6]&0x30)*2+16)+(attr&7) ) } @@ -144,21 +152,17 @@ void contra_bg_cram_w(int offset,int data){ } void contra_text_vram_w(int offset,int data){ - int col = offset%32; - if( col<5 ){ - if( contra_text_vram[offset] == data) return; - tilemap_mark_tile_dirty( text_tilemap, col, offset/32 ); + if (contra_text_vram[offset] != data){ + tilemap_mark_tile_dirty( text_tilemap, offset%32, offset/32 ); + contra_text_vram[offset] = data; } - contra_text_vram[offset] = data; } void contra_text_cram_w(int offset,int data){ - int col = offset%32; - if( col<5 ){ - if( contra_text_cram[offset] == data) return; - tilemap_mark_tile_dirty( text_tilemap, col, offset/32 ); + if (contra_text_cram[offset] != data){ + tilemap_mark_tile_dirty( text_tilemap, offset%32, offset/32 ); + contra_text_cram[offset] = data; } - contra_text_cram[offset] = data; } void contra_K007121_ctrl_0_w( int offset, int data ) @@ -226,7 +230,7 @@ int contra_vh_start(void){ get_text_tile_info, TILEMAP_OPAQUE, 8,8, /* tile width, tile height */ - 5,32 /* number of columns, number of rows */ + 32,32 /* number of columns, number of rows */ ); private_spriteram=malloc (0x800); @@ -238,7 +242,7 @@ int contra_vh_start(void){ tilemap_set_clip( bg_tilemap, &clip ); tilemap_set_clip( fg_tilemap, &clip ); - clip.max_x = 40; + clip.max_x = 39; clip.min_x = 0; tilemap_set_clip( text_tilemap, &clip ); @@ -259,7 +263,7 @@ void contra_vh_stop(void) static void draw_sprites( struct osd_bitmap *bitmap, int bank ) { const unsigned char *source; - int base_color = bank ? (K007121_ctrlram[1][6]&0x30)*2 : (K007121_ctrlram[0][6]&0x30)*2; + int base_color = (K007121_ctrlram[bank][6]&0x30)*2; if (bank==0) source=private_spriteram; else source=private_spriteram_2; diff --git a/src/vidhrdw/darkseal.c b/src/vidhrdw/darkseal.c index 229a2c6c3..26a28f315 100644 --- a/src/vidhrdw/darkseal.c +++ b/src/vidhrdw/darkseal.c @@ -1,6 +1,6 @@ /*************************************************************************** - Dark Seal Video emulation - Bryan McPhail, mish@tendril.force9.net + Dark Seal Video emulation - Bryan McPhail, mish@tendril.co.uk **************************************************************************** diff --git a/src/vidhrdw/dday.c b/src/vidhrdw/dday.c index f1ba3c209..3406fc309 100644 --- a/src/vidhrdw/dday.c +++ b/src/vidhrdw/dday.c @@ -17,8 +17,6 @@ static unsigned char *searchlight_image; static int searchlight_flipx; static int searchlight_enable = 0; -void dday_sound_enable(int enabled); - /* LBO */ #ifdef LSB_FIRST @@ -339,7 +337,13 @@ void dday_control_w(int offset, int data) coin_counter_w(1, data & 0x02); /* Bit 4 is sound enable */ - dday_sound_enable(data & 0x10); + if (!(data & 0x10) && (control & 0x10)) + { + AY8910_reset(0); + AY8910_reset(1); + } + + mixer_sound_enable_global_w(data & 0x10); /* Bit 6 is search light enable */ searchlight_enable = data & 0x40; diff --git a/src/vidhrdw/dec0.c b/src/vidhrdw/dec0.c index fadce7dbf..171cc8f0d 100644 --- a/src/vidhrdw/dec0.c +++ b/src/vidhrdw/dec0.c @@ -1,6 +1,6 @@ /*************************************************************************** - Dec0 Video emulation - Bryan McPhail, mish@tendril.force9.net + Dec0 Video emulation - Bryan McPhail, mish@tendril.co.uk ********************************************************************* diff --git a/src/vidhrdw/dec8.c b/src/vidhrdw/dec8.c index bcade4c6e..472d868e1 100644 --- a/src/vidhrdw/dec8.c +++ b/src/vidhrdw/dec8.c @@ -319,8 +319,8 @@ static void draw_sprites2(struct osd_bitmap *bitmap, int priority) flash=x&0x800; if (flash && (cpu_getcurrentframe() & 1)) continue; - if (priority==1 && (colour&8)) continue; - if (priority==2 && !(colour&8)) continue; + if (priority==1 && (colour&4)) continue; + if (priority==2 && !(colour&4)) continue; fx = y & 0x2000; fy = y & 0x4000; @@ -500,16 +500,15 @@ void dec8_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) scrollx=-((scroll1[0]<<8)+scroll1[1]); copyscrollbitmap(bitmap,pf1_bitmap,1,&scrollx,1,&scrolly,0,TRANSPARENCY_NONE,0); + draw_sprites2(bitmap,1); scrolly=-((scroll2[2]<<8)+scroll2[3]); scrollx=-(((scroll2[0]&1)<<8)+scroll2[1]); copyscrollbitmap(bitmap,pf2_bitmap,1,&scrollx,1,&scrolly,0,TRANSPARENCY_PEN,palette_transparent_pen); - /* Sprites */ - draw_sprites2(bitmap,0); + draw_sprites2(bitmap,2); - /* Top layer */ - draw_characters(bitmap,0x70,4); + draw_characters(bitmap,0xe0,5); } /******************************************************************************/ @@ -671,7 +670,6 @@ void gondo_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) if (palette_recalc()) memset(pf_dirty,1,0x800); - /* Playfield 2 - Foreground */ mx=-1; my=0; for (offs = 0x000;offs < 0x800; offs += 2) { diff --git a/src/vidhrdw/fastlane.c b/src/vidhrdw/fastlane.c index c42ba7016..64f4f3b9c 100644 --- a/src/vidhrdw/fastlane.c +++ b/src/vidhrdw/fastlane.c @@ -14,29 +14,45 @@ static struct tilemap *layer0, *layer1; static void get_tile_info0(int col,int row) { int tile_index = 32*row+col; - int color = fastlane_videoram1[tile_index]; - int gfxbank = ((color & 0x80) >> 7) | ((color & 0x70) >> 3) - | ((K007121_ctrlram[0][0x04] & 0x08) << 1) - | ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int attr = fastlane_videoram1[tile_index]; int code = fastlane_videoram1[tile_index + 0x400]; - - code += 256*gfxbank; - - SET_TILE_INFO(0,code,1); + int bit0 = (K007121_ctrlram[0][0x05] >> 0) & 0x03; + int bit1 = (K007121_ctrlram[0][0x05] >> 2) & 0x03; + int bit2 = (K007121_ctrlram[0][0x05] >> 4) & 0x03; + int bit3 = (K007121_ctrlram[0][0x05] >> 6) & 0x03; + int bank = ((attr & 0x80) >> 7) | + ((attr >> (bit0+2)) & 0x02) | + ((attr >> (bit1+1)) & 0x04) | + ((attr >> (bit2 )) & 0x08) | + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); + + SET_TILE_INFO(0,code+bank*256,1); } static void get_tile_info1(int col,int row) { int tile_index = 32*row+col; - int color = fastlane_videoram2[tile_index]; - int gfxbank = ((color & 0x80) >> 7) | ((color & 0x70) >> 3) - | ((K007121_ctrlram[0][0x04] & 0x08) << 1) - | ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int attr = fastlane_videoram2[tile_index]; int code = fastlane_videoram2[tile_index + 0x400]; - - code += 256*gfxbank; - - SET_TILE_INFO(0,code,0); + int bit0 = (K007121_ctrlram[0][0x05] >> 0) & 0x03; + int bit1 = (K007121_ctrlram[0][0x05] >> 2) & 0x03; + int bit2 = (K007121_ctrlram[0][0x05] >> 4) & 0x03; + int bit3 = (K007121_ctrlram[0][0x05] >> 6) & 0x03; + int bank = ((attr & 0x80) >> 7) | + ((attr >> (bit0+2)) & 0x02) | + ((attr >> (bit1+1)) & 0x04) | + ((attr >> (bit2 )) & 0x08) | + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); + + SET_TILE_INFO(0,code+bank*256,0); } /*************************************************************************** @@ -48,7 +64,7 @@ static void get_tile_info1(int col,int row) int fastlane_vh_start(void) { layer0 = tilemap_create(get_tile_info0, TILEMAP_OPAQUE, 8, 8, 32, 32); - layer1 = tilemap_create(get_tile_info1, TILEMAP_OPAQUE, 8, 8, 5, 32); + layer1 = tilemap_create(get_tile_info1, TILEMAP_OPAQUE, 8, 8, 32, 32); tilemap_set_scroll_rows( layer0, 32 ); @@ -58,7 +74,7 @@ int fastlane_vh_start(void) clip.min_x += 40; tilemap_set_clip(layer0,&clip); - clip.max_x = 40; + clip.max_x = 39; clip.min_x = 0; tilemap_set_clip(layer1,&clip); @@ -86,9 +102,7 @@ void fastlane_vram2_w(int offset,int data) { if (fastlane_videoram2[offset] != data) { - int col = offset%32; - if (col < 5) - tilemap_mark_tile_dirty(layer1, col, (offset&0x3ff)/32); + tilemap_mark_tile_dirty(layer1, offset%32, (offset&0x3ff)/32); fastlane_videoram2[offset] = data; } } diff --git a/src/vidhrdw/flkatck.c b/src/vidhrdw/flkatck.c index 3199ca006..12fd9ff4d 100644 --- a/src/vidhrdw/flkatck.c +++ b/src/vidhrdw/flkatck.c @@ -27,8 +27,19 @@ static void get_tile_info_A( int col, int row ) int offs = row*32 + col; int attr = k007121_ram[offs]; int code = k007121_ram[offs+0x400]; - int bank = ((attr & 0x80) >> 7) | ((attr & 0x10) >> 3) | - ((attr & 0x40) >> 4) | ((K007121_ctrlram[0][4] & 0x0c) << 1); + int bit0 = (K007121_ctrlram[0][0x05] >> 0) & 0x03; + int bit1 = (K007121_ctrlram[0][0x05] >> 2) & 0x03; + int bit2 = (K007121_ctrlram[0][0x05] >> 4) & 0x03; + int bit3 = (K007121_ctrlram[0][0x05] >> 6) & 0x03; + int bank = ((attr & 0x80) >> 7) | + ((attr >> (bit0+2)) & 0x02) | + ((attr >> (bit1+1)) & 0x04) | + ((attr >> (bit2 )) & 0x08) | + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); if ((attr == 0x0d) && (!(K007121_ctrlram[0][0])) && (!(K007121_ctrlram[0][2]))) bank = 0; /* this allows the game to print text @@ -106,7 +117,7 @@ int flkatck_vh_start(void) if (k007121_tilemap[0] && k007121_tilemap[1]) { struct rectangle clip = Machine->drv->visible_area; - clip.min_x += 39; + clip.min_x += 40; tilemap_set_clip(k007121_tilemap[0],&clip); clip.max_x = 39; diff --git a/src/vidhrdw/funkyjet.c b/src/vidhrdw/funkyjet.c index 29ebb5ef2..430f1b7f7 100644 --- a/src/vidhrdw/funkyjet.c +++ b/src/vidhrdw/funkyjet.c @@ -1,6 +1,6 @@ /*************************************************************************** - Funky Jet Video emulation - Bryan McPhail, mish@tendril.force9.net + Funky Jet Video emulation - Bryan McPhail, mish@tendril.co.uk Cut & paste from Super Burgertime for now! :) diff --git a/src/vidhrdw/gauntlet.c b/src/vidhrdw/gauntlet.c index 935239db9..54583cc71 100644 --- a/src/vidhrdw/gauntlet.c +++ b/src/vidhrdw/gauntlet.c @@ -76,9 +76,15 @@ int vindctr2_screen_refresh; * *************************************/ +struct mo_data +{ + struct osd_bitmap *bitmap; + UINT8 color_xor; +}; + static struct atarigen_pf_state pf_state; -static int playfield_color_base; +static UINT8 playfield_color_base; @@ -363,7 +369,6 @@ static void pf_color_callback(const struct rectangle *clip, const struct rectang { const unsigned int *usage = &Machine->gfx[0]->pen_usage[state->param[0] * 0x1000]; UINT16 *colormap = (UINT16 *)param; - int bank = state->param[0]; int x, y; for (y = tiles->min_y; y != tiles->max_y; y = (y + 1) & 63) @@ -371,7 +376,7 @@ static void pf_color_callback(const struct rectangle *clip, const struct rectang { int offs = x * 64 + y; int data = READ_WORD(&atarigen_playfieldram[offs * 2]); - int code = bank * 0x1000 + ((data & 0xfff) ^ 0x800); + int code = (data & 0xfff) ^ 0x800; int color = playfield_color_base + ((data >> 12) & 7); colormap[color] |= usage[code]; colormap[color ^ 8] |= usage[code]; @@ -434,7 +439,9 @@ static void pf_render_callback(const struct rectangle *clip, const struct rectan static void pf_overrender_callback(const struct rectangle *clip, const struct rectangle *tiles, const struct atarigen_pf_state *state, void *param) { const struct GfxElement *gfx = Machine->gfx[0]; - struct osd_bitmap *bitmap = param; + const struct mo_data *modata = param; + struct osd_bitmap *bitmap = modata->bitmap; + int color_xor = modata->color_xor; int bank = state->param[0]; int x, y; @@ -454,7 +461,7 @@ static void pf_overrender_callback(const struct rectangle *clip, const struct re int sx = (8 * x - state->hscroll) & 0x1ff; if (sx >= XDIM) sx -= 0x200; - drawgfx(bitmap, gfx, code, color ^ 8, hflip, 0, sx, sy, 0, TRANSPARENCY_THROUGH, palette_transparent_pen); + drawgfx(bitmap, gfx, code, color ^ color_xor, hflip, 0, sx, sy, 0, TRANSPARENCY_THROUGH, palette_transparent_pen); } } } @@ -556,5 +563,10 @@ static void mo_render_callback(const UINT16 *data, const struct rectangle *clip, /* overrender the playfield */ if (total_usage & 0x0002) - atarigen_pf_process(pf_overrender_callback, bitmap, &pf_clip); + { + struct mo_data modata; + modata.bitmap = bitmap; + modata.color_xor = (color == 0 && vindctr2_screen_refresh) ? 0 : 8; + atarigen_pf_process(pf_overrender_callback, &modata, &pf_clip); + } } diff --git a/src/vidhrdw/gng.c b/src/vidhrdw/gng.c index 16a24613e..dc3bdc509 100644 --- a/src/vidhrdw/gng.c +++ b/src/vidhrdw/gng.c @@ -16,6 +16,8 @@ unsigned char *gng_bgvideoram,*gng_bgcolorram; static struct tilemap *bg_tilemap,*fg_tilemap; static int flipscreen; + + /*************************************************************************** Callbacks for the TileMap code @@ -38,11 +40,14 @@ static void get_bg_tile_info( int col, int row ) tile_info.flags = TILE_FLIPYX((attr & 0x30) >> 4) | TILE_SPLIT((attr & 0x08) >> 3); } + + /*************************************************************************** Start the video hardware emulation. ***************************************************************************/ + int gng_vh_start(void) { fg_tilemap = tilemap_create( @@ -72,29 +77,37 @@ int gng_vh_start(void) return 1; } -void gng_fgvideoram_w(int offset,int data){ - if (gng_fgvideoram[offset] != data){ +void gng_fgvideoram_w(int offset,int data) +{ + if (gng_fgvideoram[offset] != data) + { gng_fgvideoram[offset] = data; tilemap_mark_tile_dirty(fg_tilemap,offset%32,offset/32); } } -void gng_fgcolorram_w(int offset,int data){ - if (gng_fgcolorram[offset] != data){ +void gng_fgcolorram_w(int offset,int data) +{ + if (gng_fgcolorram[offset] != data) + { gng_fgcolorram[offset] = data; tilemap_mark_tile_dirty(fg_tilemap,offset%32,offset/32); } } -void gng_bgvideoram_w(int offset,int data){ - if (gng_bgvideoram[offset] != data){ +void gng_bgvideoram_w(int offset,int data) +{ + if (gng_bgvideoram[offset] != data) + { gng_bgvideoram[offset] = data; tilemap_mark_tile_dirty(bg_tilemap,offset/32,offset%32); } } -void gng_bgcolorram_w(int offset,int data){ - if (gng_bgcolorram[offset] != data){ +void gng_bgcolorram_w(int offset,int data) +{ + if (gng_bgcolorram[offset] != data) + { gng_bgcolorram[offset] = data; tilemap_mark_tile_dirty(bg_tilemap,offset/32,offset%32); } @@ -102,13 +115,15 @@ void gng_bgcolorram_w(int offset,int data){ -void gng_bgscrollx_w(int offset,int data){ +void gng_bgscrollx_w(int offset,int data) +{ static unsigned char scrollx[2]; scrollx[offset] = data; tilemap_set_scrollx( bg_tilemap, 0, scrollx[0] + 256 * scrollx[1] ); } -void gng_bgscrolly_w(int offset,int data){ +void gng_bgscrolly_w(int offset,int data) +{ static unsigned char scrolly[2]; scrolly[offset] = data; tilemap_set_scrolly( bg_tilemap, 0, scrolly[0] + 256 * scrolly[1] ); @@ -122,11 +137,10 @@ void gng_flipscreen_w(int offset,int data) } + /*************************************************************************** - Draw the game screen in the given osd_bitmap. - Do NOT call osd_update_display() from this function, it will be called by - the main emulation engine. + Display refresh ***************************************************************************/ diff --git a/src/vidhrdw/gotya.c b/src/vidhrdw/gotya.c new file mode 100644 index 000000000..0dee8bf54 --- /dev/null +++ b/src/vidhrdw/gotya.c @@ -0,0 +1,212 @@ +#include "driver.h" +#include "vidhrdw/generic.h" + + +unsigned char *gotya_scroll; +unsigned char *gotya_foregroundram; + +static int scroll_bit_8,flipscreen; + + +/*************************************************************************** + + Convert the color PROMs into a more useable format. + + I'm using Pac Man resistor values + +***************************************************************************/ +void gotya_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +{ + int i; + #define TOTAL_COLORS(gfxn) (Machine->gfx[gfxn]->total_colors * Machine->gfx[gfxn]->color_granularity) + #define COLOR(gfxn,offs) (colortable[Machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) + + + for (i = 0;i < Machine->drv->total_colors;i++) + { + int bit0,bit1,bit2; + + + /* red component */ + bit0 = (*color_prom >> 0) & 0x01; + bit1 = (*color_prom >> 1) & 0x01; + bit2 = (*color_prom >> 2) & 0x01; + *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + /* green component */ + bit0 = (*color_prom >> 3) & 0x01; + bit1 = (*color_prom >> 4) & 0x01; + bit2 = (*color_prom >> 5) & 0x01; + *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + /* blue component */ + bit0 = 0; + bit1 = (*color_prom >> 6) & 0x01; + bit2 = (*color_prom >> 7) & 0x01; + *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + + color_prom++; + } + + color_prom += 0x18; + /* color_prom now points to the beginning of the lookup table */ + + /* character lookup table */ + /* sprites use the same color lookup table as characters */ + for (i = 0;i < TOTAL_COLORS(0);i++) + COLOR(0,i) = *(color_prom++) & 0x07; +} + + +void gotya_video_control_w(int offset, int data) +{ + static int last; + + /* bit 0 - scroll bit 8 + bit 1 - flip screen + bit 2 - sound disable ??? */ + + scroll_bit_8 = data & 0x01; + flipscreen = data & 0x02; + + if (flipscreen != (last & 0x02)) + { + memset(dirtybuffer, 1, videoram_size); + } + + last = data; +} + + +int gotya_vh_start(void) +{ + if ((dirtybuffer = malloc(videoram_size)) == 0) + { + return 1; + } + + /* the background area is twice as wide as the screen (actually twice as tall, */ + /* because this is a vertical game) */ + if ((tmpbitmap = osd_create_bitmap(2*256,Machine->drv->screen_height)) == 0) + { + free(dirtybuffer); + return 1; + } + + return 0; +} + + +static void draw_status_row(struct osd_bitmap *bitmap, int sx, int col) +{ + int row; + + if (flipscreen) + { + sx = 35 - sx; + } + + for (row = 29;row >= 0;row--) + { + int sy; + + if (flipscreen) + { + sy = row; + } + else + { + sy = 31 - row; + } + + drawgfx(bitmap,Machine->gfx[0], + gotya_foregroundram[row * 32 + col], + gotya_foregroundram[row * 32 + col + 0x10] & 0x0f, + flipscreen, flipscreen, + 8*sx,8*sy, + &Machine->drv->visible_area,TRANSPARENCY_NONE,0); + } +} + + +void gotya_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + int offs; + + + /* for every character in the Video RAM, check if it has been modified */ + /* since last time and update it accordingly. */ + for (offs = videoram_size - 1;offs >= 0;offs--) + { + if (dirtybuffer[offs]) + { + int sx,sy; + + + dirtybuffer[offs] = 0; + + sx = 31 - (offs % 32); + sy = 31 - ((offs & 0x03ff) / 32); + + if (flipscreen) + { + sx = 31 - sx; + sy = 31 - sy; + } + + if (offs < 0x0400) + { + sx = sx + 32; + } + + drawgfx(tmpbitmap,Machine->gfx[0], + videoram[offs], + colorram[offs] & 0x0f, + flipscreen,flipscreen, + 8*sx, 8*sy, + 0,TRANSPARENCY_NONE,0); + } + } + + + /* copy the background graphics */ + { + int scroll; + + + scroll = *gotya_scroll + (scroll_bit_8 * 256) + 16; + + copyscrollbitmap(bitmap,tmpbitmap,1,&scroll,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); + } + + + /* draw the sprites */ + for (offs = 2; offs < 0x0e; offs += 2) + { + int code,col,sx,sy; + + + code = spriteram[offs + 0x01] >> 2; + col = spriteram[offs + 0x11] & 0x0f; + sx = 256 - spriteram[offs + 0x10] + (spriteram[offs + 0x01] & 0x01) * 256; + sy = spriteram[offs + 0x00]; + + if (flipscreen) + { + sy = 240 - sy; + } + + drawgfx(bitmap,Machine->gfx[1], + code,col, + flipscreen,flipscreen, + sx,sy, + &Machine->drv->visible_area,TRANSPARENCY_PEN,0); + } + + + /* draw the status lines */ + draw_status_row(bitmap, 0, 1); + draw_status_row(bitmap, 1, 0); + draw_status_row(bitmap, 2, 2); /* these two are blank, but I dont' know if the data comes */ + draw_status_row(bitmap, 33, 13); /* from RAM or 'hardcoded' into the hardware. Likely the latter */ + draw_status_row(bitmap, 35, 14); + draw_status_row(bitmap, 34, 15); +} diff --git a/src/vidhrdw/hcastle.c b/src/vidhrdw/hcastle.c index 281438d33..475e8f43f 100644 --- a/src/vidhrdw/hcastle.c +++ b/src/vidhrdw/hcastle.c @@ -10,7 +10,7 @@ static struct osd_bitmap *pf1_bitmap; static struct osd_bitmap *pf2_bitmap; -static unsigned char *dirty_pf1,*dirty_pf2,*private_spriteram_2,*private_spriteram; +static unsigned char *dirty_pf1,*dirty_pf2; unsigned char *hcastle_pf1_videoram,*hcastle_pf2_videoram; static int gfx_bank; @@ -54,12 +54,8 @@ int hcastle_vh_start(void) dirty_pf1=malloc (0x1000); dirty_pf2=malloc (0x1000); - private_spriteram=malloc (0x800); - private_spriteram_2=malloc (0x800); memset(dirty_pf1,1,0x1000); memset(dirty_pf2,1,0x1000); - memset(private_spriteram,0,0x800); - memset(private_spriteram_2,0,0x800); return 0; } @@ -70,13 +66,10 @@ void hcastle_vh_stop(void) osd_free_bitmap(pf2_bitmap); free(dirty_pf1); free(dirty_pf2); - free(private_spriteram); - free(private_spriteram_2); } - void hcastle_pf1_video_w(int offset, int data) { hcastle_pf1_videoram[offset]=data; @@ -104,9 +97,9 @@ void hcastle_pf1_control_w(int offset,int data) if (offset==3) { if ((data&0x8)==0) - memcpy(private_spriteram,spriteram+0x800,0x800); + buffer_spriteram(spriteram+0x800,0x800); else - memcpy(private_spriteram,spriteram,0x800); + buffer_spriteram(spriteram,0x800); } K007121_ctrl_0_w(offset,data); } @@ -116,9 +109,9 @@ void hcastle_pf2_control_w(int offset,int data) if (offset==3) { if ((data&0x8)==0) - memcpy(private_spriteram_2,spriteram_2+0x800,0x800); + buffer_spriteram_2(spriteram_2+0x800,0x800); else - memcpy(private_spriteram_2,spriteram_2,0x800); + buffer_spriteram_2(spriteram_2,0x800); } K007121_ctrl_1_w(offset,data); } @@ -241,8 +234,8 @@ void hcastle_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) scrollx = -((K007121_ctrlram[1][1]<<8)+K007121_ctrlram[1][0]); copyscrollbitmap(bitmap,pf2_bitmap,1,&scrollx,1,&scrolly,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); - draw_sprites( bitmap, private_spriteram, 0 ); - draw_sprites( bitmap, private_spriteram_2, 1 ); + draw_sprites( bitmap, buffered_spriteram, 0 ); + draw_sprites( bitmap, buffered_spriteram_2, 1 ); scrolly = -K007121_ctrlram[0][2]; scrollx = -((K007121_ctrlram[0][1]<<8)+K007121_ctrlram[0][0]); @@ -258,7 +251,7 @@ void hcastle_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) scrollx = -((K007121_ctrlram[0][1]<<8)+K007121_ctrlram[0][0]); copyscrollbitmap(bitmap,pf1_bitmap,1,&scrollx,1,&scrolly,&Machine->drv->visible_area,TRANSPARENCY_PEN,palette_transparent_pen); - draw_sprites( bitmap, private_spriteram, 0 ); - draw_sprites( bitmap, private_spriteram_2, 1 ); + draw_sprites( bitmap, buffered_spriteram, 0 ); + draw_sprites( bitmap, buffered_spriteram_2, 1 ); } } diff --git a/src/vidhrdw/karnov.c b/src/vidhrdw/karnov.c index 594dbe783..035ac7211 100644 --- a/src/vidhrdw/karnov.c +++ b/src/vidhrdw/karnov.c @@ -1,6 +1,6 @@ /******************************************************************************* - Karnov - Bryan McPhail, mish@tendril.force9.net + Karnov - Bryan McPhail, mish@tendril.co.uk *******************************************************************************/ diff --git a/src/vidhrdw/konamiic.c b/src/vidhrdw/konamiic.c index a3b409103..17e8e8cca 100644 --- a/src/vidhrdw/konamiic.c +++ b/src/vidhrdw/konamiic.c @@ -27,7 +27,7 @@ Galactic Warriors GX578*1985 68000 GX400 Salamander GX587*1986 68000 GX400 WEC Le Mans 24 GX602*1986 2x68000 BAW GX604 1987 -Combat School GX611*1987 6309 007121(x2) +Combat School GX611*1987 6309 007121(x2) 007327 (palette) Rock 'n Rage / GX620*1986 6309 007342 007420 007327 (palette) Koi no Hotrock Mr Kabuki/Mr Goemon GX621*1986 Z80 005849 @@ -37,7 +37,7 @@ Flak Attack GX669*1987 6309 007121 007327 Devil World / Dark GX687*1987 2x68000 TWIN16 Adventure / Majuu no Oukoku Double Dribble GX690*1986 3x6809 005885(x2) 007327 (palette) 007452 -Kitten Kaboodle GX712 1988 +Kitten Kaboodle GX712+1988 GX400 007593 (palette) 051550 Chequered Flag GX717+1988 052001 051960 051937(x2) 051316(x2) (zoom/rotation) 051733 (protection) Fast Lane GX752*1987 6309 007121 051733 (protection) 007801 Hot Chase GX763*1988 2x68000 051316(x3) (zoom/rotation) 007634 007635 007558 007557 @@ -51,7 +51,7 @@ Super Contra GX775*1988 052001 052109 051962 051960 051937 PROM 007327 Battlantis GX777*1987 6309 007342 007420 007327 (palette) 007324 Vulcan Venture / GX785*1988 2x68000 TWIN16 Gradius 2 -City Bomber GX787+1987 68000 +City Bomber GX787+1987 68000 GX400 007593 (palette) 051550 Over Drive GX789 1990 Hyper Crash GX790 1987 Blades of Steel GX797*1987 6309 007342 007420 007327 (palette) 051733 (protection) @@ -154,14 +154,49 @@ THE FOLLOWING INFORMATION IS PRELIMINARY AND INACCURATE. DON'T RELY ON IT. 007121 ------ +This is an interesting beast. Many games use two of these in pair. +It manages sprites and two 32x32 tilemaps. The tilemaps can be joined to form +a single 64x32 one, or one of them can be moved to the side of screen, giving +a high score display suitable for vertical games. +The chip also generates clock and interrupt signals suitable for a 6809. +It uses 0x2000 bytes of RAM for the tilemaps and sprites, and an additional +0x100 bytes, maybe for scroll RAM and line buffers. The maximum addressable +ROM is 0x80000 bytes (addressed 16 bits at a time). +Two 256x4 lookup PROMs are also used to increase the color combinations. +All tilemap / sprite priority handling is done internally and the chip exports +7 bits of color code, composed of 2 bits of palette bank, 1 bit indicating tile +or sprite, and 4 bits of ROM data remapped through the PROM. + +inputs: +- address lines (A0-A13) +- data lines (DB0-DB7) +- misc interface stuff +- data from the gfx ROMs (RDL0-RDL7, RDU0-RDU7) +- data from the tile lookup PROMs (VCD0-VCD3) +- data from the sprite lookup PROMs (OCD0-OCD3) + +outputs: +- address lines for tilemap RAM (AX0-AX12) +- data lines for tilemap RAM (VO0-VO7) +- address lines for the small RAM (FA0-FA7) +- data lines for the small RAM (FD0-FD7) +- address lines for the gfx ROMs (R0-R17) +- address lines for the tile lookup PROMs (VCF0-VCF3, VCB0-VCB3) +- address lines for the sprite lookup PROMs (OCB0-OCB3, OCF0-OCF3) +- NNMI, NIRQ, NFIR, NE, NQ for the main CPU +- misc interface stuff +- color code to be output on screen (COA0-COA6) + + control registers -000: scroll x (low 8 bits) +000: scroll x (low 8 bits) 001: -------x scroll x (high bit) + ------x- enable rowscroll? (combasc) ----x--- this probably selects an alternate screen layout used in combat school where tilemap #2 is overlayed on front and doesn't scroll. - In the normal layout (used only by hcastle) the two tilemaps are - joined to form a single 64x32 scrolling tilemap. -002: scroll y + The 32 lines of the front layer can be individually turned on or + off using the second 32 bytes of scroll RAM. +002: scroll y 003: -------x bit 13 of the tile code ------x- unknown (contra) -----x-- might be sprite / tilemap priority (0 = sprites have priority) @@ -179,12 +214,17 @@ control registers gameplay and resetting it on the title screen and crosshatch. --x----- might be sprite / tilemap priority (0 = sprites have priority) (combat school, contra, haunted castle(0/1), labyrunr) - -x------ enables an extra bank of 0x40 sprites (combasc, labyrunr) + -x------ Chops away the leftmost and rightmost columns, switching the + visible area from 256 to 240 pixels. This is used by combasc on + the scrolling stages, and by labyrunr on the title screen. + At first I thought that this enabled an extra bank of 0x40 + sprites, needed by combasc, but labyrunr proves that this is not + the case x------- unknown (contra) -004: ----xx-- in flak attack, bits 11-12 of the tile code for the background layer - fast lane uses only bit 3 - -x------ unknown (combat school, flak attack) - x------- unknown (combat school, fast lane, labyrunr, flak attack) +004: ----xxxx bits 9-12 of the tile code. Only the bits enabled by the following + mask are actually used, and replace the ones selected by register + 005. + xxxx---- mask enabling the above bits 005: selects where in the attribute byte to pick bits 9-12 of the tile code, output to pins R12-R15. The bit of the attribute byte to use is the specified bit (0-3) + 3, that is one of bits 3-6. Bit 7 is hardcoded as @@ -196,11 +236,21 @@ control registers ----xx-- attribute bit to use for tile code bit 10 --xx---- attribute bit to use for tile code bit 11 xx------ attribute bit to use for tile code bit 12 -006: -------x unknown (combat school, fast lane, flak attack) - -----x-- This is set only in Flak Attack, so it seems to be the one that - selects a different layout for the sprite RAM. It might be a - "compatibility mode" with an older custom IC. - ----x--- unknown (combat school, haunted castle(0/1), labyrunr) +006: ----xxxx select additional effect for bits 3-6 of the tile attribute (the + same ones indexed by register 005). Note that an attribute bit + can therefore be used at the same time to be BOTH a tile code bit + and an additional effect. + -------x bit 3 of attribute is bit 3 of color (combasc, fastlane, flkatck) + ------x- bit 4 of attribute is tile flip X (assumption - no game uses this) + -----x-- bit 5 of attribute is tile flip Y (flkatck) + ----x--- bit 6 of attribute is tile priority over sprites (combasc, hcastle, + labyrunr) + Note that hcastle sets this bit for layer 0, and bit 6 of the + attribute is also used as bit 12 of the tile code, however that + bit is ALWAYS set thoughout the game. + combasc uses the bit inthe "graduation" scene during attract mode, + to place soldiers behind the stand. + Use in labyrunr has not been investigated yet. --xx---- palette bank (both tiles and sprites, see contra) 007: -------x nmi enable ------x- irq enable @@ -225,6 +275,7 @@ control registers ------x- MSB of x scroll 2 ---xxx-- layer 1 row/column scroll control 000 = disabled + 010 = unknown (bladestl shootout between periods) 011 = 32 columns (Blades of Steel) 101 = 256 rows (Battlantis, Rock 'n Rage) x------- enable sprite wraparound from bottom to top (see Blades of Steel @@ -338,7 +389,7 @@ address lines), and then reading it from the 051962. : 051962 and it is not hardwired to a specific tile attribute. : Note that xmen, punkshot and thndrx2 set the bit but the current : drivers don't use flip X and seem to work fine. - : bit 2 = enables tile Y flip when bit 1 of the tile attribute is set + : bit 2 = enables tile flip Y when bit 1 of the tile attribute is set 1f00 : ROM bank selector bits 0-3 = bank 2 bits 4-7 = bank 3 2000-27ff: layer FIX tilemap (code) 2800-2fff: layer A tilemap (code) @@ -786,7 +837,8 @@ void K007121_ctrl_1_w(int offset,int data) * * Flack Attack uses a different, "wider" layout with 32 bytes per sprites, * mapped as follows, and the priority order is reversed. Maybe it is a - * compatibility mode with an older custom IC. + * compatibility mode with an older custom IC. It is not known how this + * alternate layout is selected. * * 0 -> e * 1 -> f @@ -802,6 +854,7 @@ void K007121_sprites_draw(int chip,struct osd_bitmap *bitmap, const struct GfxElement *gfx = Machine->gfx[chip]; int flip_screen = K007121_flipscreen[chip]; int i,num,inc,offs[5],trans; + int is_flakatck = K007121_ctrlram[chip][0x06] & 0x04; /* WRONG!!!! */ #if 0 usrintf_showmessage("%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x %02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x", @@ -822,7 +875,7 @@ if (keyboard_pressed(KEYCODE_D)) } #endif - if (K007121_ctrlram[chip][0x06] & 0x04) /* Flak Attack */ + if (is_flakatck) { num = 0x40; inc = -0x20; @@ -838,7 +891,7 @@ if (keyboard_pressed(KEYCODE_D)) } else /* all others */ { - num = (K007121_ctrlram[chip][0x03] & 0x40) ? 0x80 : 0x40; + num = (K007121_ctrlram[chip][0x03] & 0x40) ? 0x80 : 0x40; /* WRONG!!! (needed by combasc) */ inc = 5; offs[0] = 0x00; offs[1] = 0x01; @@ -870,7 +923,7 @@ if (keyboard_pressed(KEYCODE_D)) number = number << 2; number += (sprite_bank >> 2) & 3; - if (number || !(K007121_ctrlram[chip][0x06] & 0x04)) /* Flak Attack needs this */ + if (!is_flakatck || source[0x00]) /* Flak Attack needs this */ { number += bank_base; @@ -919,10 +972,11 @@ void K007121_mark_sprites_colors(int chip, const unsigned char *source,int base_color,int bank_base) { int i,num,inc,offs[5]; + int is_flakatck = K007121_ctrlram[chip][0x06] & 0x04; /* WRONG!!!! */ unsigned short palette_map[512]; - if (K007121_ctrlram[chip][0x06] & 0x04) /* Flak Attack */ + if (is_flakatck) { num = 0x40; inc = -0x20; @@ -1163,6 +1217,7 @@ void K007342_tilemap_update(void) switch (K007342_regs[2] & 0x1c) { case 0x00: + case 0x08: /* unknown, blades of steel shootout between periods */ tilemap_set_scroll_rows(K007342_tilemap[0],1); tilemap_set_scroll_cols(K007342_tilemap[0],1); tilemap_set_scrollx(K007342_tilemap[0],0,K007342_scrollx[0]); @@ -3164,12 +3219,18 @@ switch (K053247_spriteoffsY) case 0x0071: /* simpsons flip */ offsetkludge = 0x017; break; + case 0x02f7: /* vendetta (level 4 boss) */ + case 0x02f8: /* vendetta (level 4 boss) */ + case 0x02f9: /* vendetta (level 4 boss) */ case 0x02fa: /* vendetta */ case 0x02fb: /* vendetta (fat guy jumping) */ case 0x02fc: /* vendetta (fat guy jumping) */ case 0x02fd: /* vendetta (fat guy jumping) */ case 0x02fe: /* vendetta (fat guy jumping) */ case 0x02ff: /* vendetta (fat guy jumping) */ + case 0x03f7: /* vendetta flip (level 4 boss) */ + case 0x03f8: /* vendetta flip (level 4 boss) */ + case 0x03f9: /* vendetta flip (level 4 boss) */ case 0x03fa: /* vendetta flip */ case 0x03fb: /* vendetta flip (fat guy jumping) */ case 0x03fc: /* vendetta flip (fat guy jumping) */ diff --git a/src/vidhrdw/labyrunr.c b/src/vidhrdw/labyrunr.c index 5e40871d7..961b1eed4 100644 --- a/src/vidhrdw/labyrunr.c +++ b/src/vidhrdw/labyrunr.c @@ -39,6 +39,7 @@ static void get_tile_info0(int col,int row) { int tile_index = 32*row+col; int attr = labyrunr_videoram1[tile_index]; + int code = labyrunr_videoram1[tile_index + 0x400]; int bit0 = (K007121_ctrlram[0][0x05] >> 0) & 0x03; int bit1 = (K007121_ctrlram[0][0x05] >> 2) & 0x03; int bit2 = (K007121_ctrlram[0][0x05] >> 4) & 0x03; @@ -47,8 +48,11 @@ static void get_tile_info0(int col,int row) ((attr >> (bit0+2)) & 0x02) | ((attr >> (bit1+1)) & 0x04) | ((attr >> (bit2 )) & 0x08) | - ((attr >> (bit3-1)) & 0x10); - int code = labyrunr_videoram1[tile_index + 0x400]; + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); SET_TILE_INFO(0,code+bank*256,((K007121_ctrlram[0][6]&0x30)*2+16)+(attr&7)) } @@ -57,6 +61,7 @@ static void get_tile_info1(int col,int row) { int tile_index = 32*row+col; int attr = labyrunr_videoram2[tile_index]; + int code = labyrunr_videoram2[tile_index + 0x400]; int bit0 = (K007121_ctrlram[0][0x05] >> 0) & 0x03; int bit1 = (K007121_ctrlram[0][0x05] >> 2) & 0x03; int bit2 = (K007121_ctrlram[0][0x05] >> 4) & 0x03; @@ -65,8 +70,11 @@ static void get_tile_info1(int col,int row) ((attr >> (bit0+2)) & 0x02) | ((attr >> (bit1+1)) & 0x04) | ((attr >> (bit2 )) & 0x08) | - ((attr >> (bit3-1)) & 0x10); - int code = labyrunr_videoram2[tile_index + 0x400]; + ((attr >> (bit3-1)) & 0x10) | + ((K007121_ctrlram[0][0x03] & 0x01) << 5); + int mask = (K007121_ctrlram[0][0x04] & 0xf0) >> 4; + + bank = (bank & ~(mask << 1)) | ((K007121_ctrlram[0][0x04] & mask) << 1); SET_TILE_INFO(0,code+bank*256,((K007121_ctrlram[0][6]&0x30)*2+16)+(attr&7)) } @@ -89,7 +97,7 @@ int labyrunr_vh_start(void) clip.min_x += 40; tilemap_set_clip(layer0,&clip); - clip.max_x = 40; + clip.max_x = 39; clip.min_x = 0; tilemap_set_clip(layer1,&clip); diff --git a/src/vidhrdw/lasso.c b/src/vidhrdw/lasso.c new file mode 100644 index 000000000..ff67cfce7 --- /dev/null +++ b/src/vidhrdw/lasso.c @@ -0,0 +1,98 @@ +/* vidhrdw/lasso.c */ + +#include "driver.h" +#include "vidhrdw/generic.h" + +extern unsigned char *lasso_vram; /* 0x2000 bytes for a 256x256x1 bitmap */ + +void lasso_vh_convert_color_prom( + unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +{ + int i; + for( i=0; i<0x40; i++ ){ + int data = color_prom[i]; + /* rrrgggbb - probably wrong */ + *palette++ = ((data>>0)&0x3)*(0xff/0x3); // red + *palette++ = ((data>>2)&0x7)*(0xff/0x7); // green + *palette++ = ((data>>5)&0x7)*(0xff/0x7); // blue + colortable[i] = i; + } + + /* allocate one extra entry for background color; + ** this is probably set at runtime + */ + colortable[0x40] = 0x40; + *palette++ = 0x60; + *palette++ = 0xef; + *palette++ = 0x60; +} + +static void draw_sprites( struct osd_bitmap *bitmap ){ + const struct GfxElement *gfx = Machine->gfx[1]; + struct rectangle clip = Machine->drv->visible_area; + const unsigned char *finish = spriteram; + const unsigned char *source = spriteram + 0x80 - 4; + while( source>=finish ){ + int color = source[2]; + int tile_number = source[1]; + int sy = source[0]; + int sx = source[3]; + + int flipy = (tile_number&0x80); + int flipx = (tile_number&0x40); + + drawgfx( bitmap,gfx, + tile_number&0x3f, + color, + flipx, flipy, + sx,(240-sy), + &clip,TRANSPARENCY_PEN,0); + + source-=4; + } +} + +static void draw_background( struct osd_bitmap *bitmap ){ + const struct GfxElement *gfx = Machine->gfx[0]; + const unsigned char *source = videoram; + int x,y; + + fillbitmap( bitmap, Machine->pens[0x40], NULL ); + + for( y=0; y<256; y+=8 ){ + for( x=0; x<256; x+=8 ){ + drawgfx( bitmap,gfx, + source[0], + source[0x400], /* color */ + 0,0, /* no flip */ + x,y, + NULL, /* clip */ + TRANSPARENCY_PEN,0); + + source++; + } + } +} + +static void draw_lasso( struct osd_bitmap *bitmap ){ + const unsigned char *source = lasso_vram; + int x,y,bit; + int pen = Machine->pens[0]; + for( y=0; y<256; y++ ){ + for( x=0; x<256; x+=8 ){ + int data = *source++; + for( bit=0; bit<8; bit++ ){ + if( (data<= HORZ_RES * HORZ_CHR) continue; - plot_pixel(tmpbitmap, x+xbit, y+ybit, Machine->pens[x_y_color(x+xbit,y+ybit)+12]); + plot_pixel(tmpbitmap, x+xbit, y+ybit, Machine->pens[x_y_color(x+xbit,y+ybit)+6]); } } } diff --git a/src/vidhrdw/m107.c b/src/vidhrdw/m107.c index 71e2c9046..946b44a60 100644 --- a/src/vidhrdw/m107.c +++ b/src/vidhrdw/m107.c @@ -1,6 +1,6 @@ /**************************************************************************** - Irem M107 video hardware, Bryan McPhail, mish@tendril.force9.net + Irem M107 video hardware, Bryan McPhail, mish@tendril.co.uk Close to M92 hardware, but with 4 playfields, not 3. Twice as many colours, twice as many sprites. diff --git a/src/vidhrdw/m92.c b/src/vidhrdw/m92.c index 746be0ae2..9bb728560 100644 --- a/src/vidhrdw/m92.c +++ b/src/vidhrdw/m92.c @@ -1,6 +1,6 @@ /***************************************************************************** - Irem M92 video hardware, Bryan McPhail, mish@tendril.force9.net + Irem M92 video hardware, Bryan McPhail, mish@tendril.co.uk Brief Overview: diff --git a/src/vidhrdw/madmotor.c b/src/vidhrdw/madmotor.c index 3a656e9cc..ebbf94da1 100644 --- a/src/vidhrdw/madmotor.c +++ b/src/vidhrdw/madmotor.c @@ -1,6 +1,6 @@ /*************************************************************************** - Mad Motor video emulation - Bryan McPhail, mish@tendril.force9.net + Mad Motor video emulation - Bryan McPhail, mish@tendril.co.uk Notes: Playfield 3 can change size between 512x1024 and 2048x256 diff --git a/src/vidhrdw/namcos1.c b/src/vidhrdw/namcos1.c index c34fcd0b9..ff2db4501 100644 --- a/src/vidhrdw/namcos1.c +++ b/src/vidhrdw/namcos1.c @@ -34,13 +34,13 @@ static unsigned char *namcos1_videoram; */ static unsigned char *namcos1_paletteram; /* - controllram map (s1ram 0x8000-0x9fff) + controlram map (s1ram 0x8000-0x9fff) 0000-07ff : work ram - 0800-0fef : sprite ram : 0x10 * 127 - 0ff0-0fff : display controll register - 1000-1fff : playfield controll register + 0800-0fef : sprite ram : 0x10 * 127 + 0ff0-0fff : display control register + 1000-1fff : playfield control register */ -static unsigned char *namcos1_controllram; +static unsigned char *namcos1_controlram; #define FG_OFFSET 0x7000 @@ -49,14 +49,14 @@ static unsigned char *namcos1_controllram; struct playfield { void *base; - int scroll_x; - int scroll_y; + int scroll_x; + int scroll_y; #if NAMCOS1_DIRECT_DRAW - int width; - int height; + int width; + int height; #endif struct tilemap *tilemap; - int color; + int color; }; struct playfield playfields[MAX_PLAYFIELDS]; @@ -66,8 +66,8 @@ static int namcos1_tilemap_need = 0; static int namcos1_tilemap_used; static unsigned char *char_state; -#define CHAR_BLANK 0 -#define CHAR_FULL 1 +#define CHAR_BLANK 0 +#define CHAR_FULL 1 #endif /* playfields maskdata for tilemap */ @@ -79,7 +79,7 @@ static struct gfx_object_list *objectlist; static struct gfx_object *objects; /* palette dirty information */ -static unsigned char sprite_palette_state[MAX_SPRITES]; +static unsigned char sprite_palette_state[MAX_SPRITES+1]; static unsigned char tilemap_palette_state[MAX_PLAYFIELDS]; /* per game scroll adjustment */ @@ -154,16 +154,16 @@ static void namcos1_playfield_control_w(int offs,int data) else if ( offs < 22 ) { /* bit 0-2 priority */ - /* bit 3 disable */ + /* bit 3 disable */ int whichone = offs - 16; objects[whichone].priority = data & 7; - objects[whichone].visible = (data&0xf8)? 0 : 1; + objects[whichone].visible = (data&0xf8) ? 0 : 1; #if NAMCOS1_DIRECT_DRAW if(namcos1_tilemap_used) #endif playfields[whichone].tilemap->enable = objects[whichone].visible; } - /* 22,23 unknown */ + /* 22,23 unused */ else if (offs < 24) { } @@ -268,23 +268,12 @@ static void namcos1_palette_refresh(int start,int offset,int num) } } -static void namcos1_sprite_palette_refresh(int color) -{ - if (color != 0x7f) /* 0x7f == shadow special */ - namcos1_palette_refresh(16*color, 16*color, 15); /* 15 = transparent */ -} - -static void namcos1_tile_palette_refresh(int color) -{ - namcos1_palette_refresh(128*16 + 256*color, 128*16 + 256*playfields[color].color, 256); -} - static void namcos1_spriteram_w(int offset,int data) { static const int sprite_sizemap[4] = {16,8,32,4}; int num = offset / 0x10; struct gfx_object *object = &objectlist->objects[num+MAX_PLAYFIELDS]; - unsigned char *base = &namcos1_controllram[0x0800 + num*0x10]; + unsigned char *base = &namcos1_controlram[0x0800 + num*0x10]; int sx, sy; int resize_x=0,resize_y=0; @@ -292,9 +281,9 @@ static void namcos1_spriteram_w(int offset,int data) { case 0x04: /* bit.6-7 : x size (16/8/32/4) */ - /* bit.5 : flipx */ - /* bit.3-4 : x offset */ - /* bit.0-2 : code.8-10 */ + /* bit.5 : flipx */ + /* bit.3-4 : x offset */ + /* bit.0-2 : code.8-10 */ object->width = sprite_sizemap[(data>>6)&3]; object->flipx = ((data>>5)&1) ^ flipscreen; object->left = (data&0x18) & (~(object->width-1)); @@ -319,13 +308,13 @@ static void namcos1_spriteram_w(int offset,int data) resize_x=1; break; case 0x08: - /* bit.5-7 : priority */ - /* bit.3-4 : y offset */ - /* bit.1-2 : y size (16/8/32/4) */ - /* bit.0 : flipy */ + /* bit.5-7 : priority */ + /* bit.3-4 : y offset */ + /* bit.1-2 : y size (16/8/32/4) */ + /* bit.0 : flipy */ object->priority = (data>>5)&7; object->height = sprite_sizemap[(data>>1)&3]; - object->flipy = (data&1) ^ flipscreen; + object->flipy = (data&1) ^ flipscreen; object->top = (data&0x18) & (~(object->height-1)); case 0x09: /* bit.0-7 : y draw position */ @@ -362,17 +351,17 @@ static void namcos1_spriteram_w(int offset,int data) object->dirty_flag = GFXOBJ_DIRTY_ALL; } -/* sprite,controll block write */ +/* display control block write */ /* 0-3 unknown 4-5 sprite offset x -6 flip screen -7 sprite offset y +6 flip screen +7 sprite offset y 8-15 unknown */ -static void namcos1_displaycontroll_w(int offset,int data) +static void namcos1_displaycontrol_w(int offset,int data) { - unsigned char *disp_reg = &namcos1_controllram[0xff0]; + unsigned char *disp_reg = &namcos1_controlram[0xff0]; int newflip; switch(offset) @@ -396,15 +385,17 @@ static void namcos1_displaycontroll_w(int offset,int data) sprite_fixed_sy = 239 - disp_reg[7]; break; case 0x0a: /* ?? */ - /* 00 : blazer,dspirit */ + /* 00 : blazer,dspirit,quester */ /* 40 : others */ break; - case 0x0e: /* playfields offset ?? */ - case 0x0f: - /* 0000 : dangseed,dspirit,pacmania */ - /* 00f1 : blazer */ - /* 06f8 : galaga88 */ - /* 06e7 : others */ + case 0x0e: /* ?? */ + /* 00 : blazer,dangseed,dspirit,pacmania,quester */ + /* 06 : others */ + case 0x0f: /* ?? */ + /* 00 : dangseed,dspirit,pacmania */ + /* f1 : blazer */ + /* f8 : galaga88,quester */ + /* e7 : others */ break; } #if 0 @@ -420,38 +411,35 @@ static void namcos1_displaycontroll_w(int offset,int data) #endif } -void namcos1_videocontroll_w(int offset,int data) +void namcos1_videocontrol_w(int offset,int data) { -// if(namcos1_controllram[offset] != data) -// { - namcos1_controllram[offset] = data; - /* 0000-07ff work ram */ - if(offset <= 0x7ff) - return; - /* 0800-0fef sprite ram */ - if(offset <= 0x0fef) - { - namcos1_spriteram_w(offset&0x7ff, data); - return; - } - /* 0ff0-0fff display controll ram */ - if(offset <= 0x0fff) - { - namcos1_displaycontroll_w(offset&0x0f, data); - return; - } - /* 1000-1fff controll ram */ - namcos1_playfield_control_w(offset&0xff, data); -// } + namcos1_controlram[offset] = data; + /* 0000-07ff work ram */ + if(offset <= 0x7ff) + return; + /* 0800-0fef sprite ram */ + if(offset <= 0x0fef) + { + namcos1_spriteram_w(offset&0x7ff, data); + return; + } + /* 0ff0-0fff display control ram */ + if(offset <= 0x0fff) + { + namcos1_displaycontrol_w(offset&0x0f, data); + return; + } + /* 1000-1fff control ram */ + namcos1_playfield_control_w(offset&0xff, data); } #if NAMCOS1_DIRECT_DRAW static void draw_background( struct osd_bitmap *bitmap, int layer ) { unsigned char *vid = playfields[layer].base; - int width = playfields[layer].width; - int height = playfields[layer].height; - int color = objects[layer].color; + int width = playfields[layer].width; + int height = playfields[layer].height; + int color = objects[layer].color; int scrollx = playfields[layer].scroll_x; int scrolly = playfields[layer].scroll_y; int sx,sy; @@ -459,7 +447,7 @@ static void draw_background( struct osd_bitmap *bitmap, int layer ) int ox,xx; int max_x = Machine->drv->visible_area.max_x; int max_y = Machine->drv->visible_area.max_y; - int code,trans_color; + int code; scrollx -= scrolloffsX[layer]; scrolly -= scrolloffsY[layer]; @@ -476,9 +464,9 @@ static void draw_background( struct osd_bitmap *bitmap, int layer ) width/=8; height/=8; - sx = (scrollx%8); + sx = (scrollx%8); offs_x = width - (scrollx/8); - sy = (scrolly%8); + sy = (scrolly%8); offs_y = height - (scrolly/8); if(sx>0) { @@ -503,8 +491,7 @@ static void draw_background( struct osd_bitmap *bitmap, int layer ) { ox %= width; code = vid[offs_y+ox+1] + ( ( vid[offs_y+ox] & 0x3f ) << 8 ); - trans_color = char_state[code]; - if(trans_color!=CHAR_BLANK) + if(char_state[code]!=CHAR_BLANK) { drawgfx( bitmap,Machine->gfx[1], code,color, @@ -512,8 +499,8 @@ static void draw_background( struct osd_bitmap *bitmap, int layer ) flipscreen ? max_x -7 -xx : xx, flipscreen ? max_y -7 -sy : sy, &Machine->drv->visible_area, - trans_color==CHAR_FULL ? TRANSPARENCY_NONE : TRANSPARENCY_PEN, - trans_color); + (char_state[code]==CHAR_FULL) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN, + char_state[code]); } } } @@ -636,8 +623,8 @@ int namcos1_vh_start( void ) gfx_drawmode_table[i] = DRAWMODE_SHADOW; /* set static memory points */ - namcos1_paletteram = memory_region(REGION_USER2); - namcos1_controllram = memory_region(REGION_USER2) + 0x8000; + namcos1_paletteram = memory_region(REGION_USER2); + namcos1_controlram = memory_region(REGION_USER2) + 0x8000; /* allocate videoram */ namcos1_videoram = malloc(0x8000); @@ -649,7 +636,7 @@ int namcos1_vh_start( void ) /* initialize object manager */ memset(&default_object,0,sizeof(struct gfx_object)); - default_object.transparency = TRANSPARENCY_PEN; + default_object.transparency = TRANSPARENCY_PEN; default_object.transparet_color = 15; default_object.gfx = Machine->gfx[2]; objectlist = gfxobj_create(MAX_PLAYFIELDS+MAX_SPRITES,8,&default_object); @@ -665,8 +652,8 @@ int namcos1_vh_start( void ) { /* set user draw handler */ objects[i].special_handler = ns1_draw_tilemap; - objects[i].gfx = 0; /* position calcuation don't care */ - objects[i].code = i; /* object->code == playfield layer number */ + objects[i].gfx = 0; + objects[i].code = i; objects[i].visible = 0; objects[i].color = i; } @@ -711,11 +698,11 @@ int namcos1_vh_start( void ) } namcos1_set_flipscreen(0); - /* initialize sprite,display controller */ + /* initialize sprites and display controller */ for(i=0;i<0x7ef;i++) namcos1_spriteram_w(i,0); for(i=0;i<0xf;i++) - namcos1_displaycontroll_w(i,0); + namcos1_displaycontrol_w(i,0); for(i=0;i<0xff;i++) namcos1_playfield_control_w(i,0); @@ -805,7 +792,7 @@ int namcos1_vh_start( void ) anddata &= maskbm[x]; } } - if(!ordata) char_state[c]=CHAR_BLANK; + if(!ordata) char_state[c]=CHAR_BLANK; else if(anddata) char_state[c]=CHAR_FULL; else { @@ -877,7 +864,7 @@ void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { int i; struct gfx_object *object; - unsigned short palette_map[MAX_SPRITES]; + unsigned short palette_map[MAX_SPRITES+1]; const unsigned char *remapped; /* update all tilemaps */ @@ -894,7 +881,7 @@ void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) gfxobj_update(); /* palette resource marking */ palette_init_used_colors(); - memset (palette_map, 0, sizeof (palette_map)); + memset(palette_map, 0, sizeof(palette_map)); for(object=objectlist->first_object ; object!=0 ; object=object->next) { if (object->visible) @@ -904,7 +891,7 @@ void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { /* sprite object */ if (sprite_palette_state[color]) { - namcos1_sprite_palette_refresh(color); + if (color != 0x7f) namcos1_palette_refresh(16*color, 16*color, 15); sprite_palette_state[color] = 0; } @@ -914,7 +901,7 @@ void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { /* playfield object */ if (tilemap_palette_state[color]) { - namcos1_tile_palette_refresh(color); + namcos1_palette_refresh(128*16+256*color, 128*16+256*playfields[color].color, 256); #if NAMCOS1_DIRECT_DRAW if(!namcos1_tilemap_used) { @@ -967,6 +954,6 @@ void namcos1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) tilemap_render(ALL_TILEMAPS); /* background color */ fillbitmap(bitmap,Machine->pens[BACKGROUNDCOLOR],&Machine->drv->visible_area); - /* draw objects , tilemap and sprite */ + /* draw objects (tilemaps and sprites) */ gfxobj_draw(objectlist); } diff --git a/src/vidhrdw/namcos2.c b/src/vidhrdw/namcos2.c index 985ed0c78..125648a6f 100644 --- a/src/vidhrdw/namcos2.c +++ b/src/vidhrdw/namcos2.c @@ -895,7 +895,6 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) int offset,offset0,offset2,offset4,offset6; int loop,spr_region; struct rectangle rect; - int fubar; offset=(namcos2_68k_sprite_bank_r(0)&0x000f)*(128*8); @@ -906,13 +905,13 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) * * * Offset 0,1 * * Sprite Y position D00-D08 * - * Sprite Size 16/32 D09 * CHANGED - ALWAYS 32 + * Sprite ROM Bank select D09 * DIFFERENT FROM DEFAULT SPRITES * Sprite Size Y D10-D15 * * * * Offset 2,3 * * Sprite Quadrant D00-D01 * * Sprite Number D02-D12 * - * Sprite ROM Bank select D13 * CHANGED + * Sprite Size 16/32 D13 * DIFFERENT FROM DEFAULT SPRITES * Sprite flip X D14 * * Sprite flip Y D15 * * * @@ -920,7 +919,7 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) * Sprite X position D00-D10 * * * * Offset 6,7 * - * Sprite priority D00-D02 * + * Sprite priority D00-D03 * DIFFERENT FROM DEFAULT SPRITES 4 BIT * Sprite colour index D04-D07 * * Sprite Size X D10-D15 * * * @@ -931,38 +930,23 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) offset4 = READ_WORD(&namcos2_sprite_ram[offset+(loop*8)+4]); offset6 = READ_WORD(&namcos2_sprite_ram[offset+(loop*8)+6]); -// Final lap requires this bit to be inverted, it must have a diffent meaning with -// the final lap gfx board.... - fubar=offset0&0x0200; - offset0|=0x200; - /* Fetch sprite size registers */ sizey=((offset0>>10)&0x3f)+1; sizex=(offset6>>10)&0x3f; - if((offset0&0x0200)==0) sizex>>=1; + if((offset2&0x2000)==0) sizex>>=1; - if((sizey-1) && sizex && (offset6&0x0007)==priority) + if((sizey-1) && sizex && (offset6&0x000f)==priority) { rect=Machine->drv->visible_area; sprn=(offset2>>2)&0x7ff; - spr_region=(offset2&0x2000)?GFX_OBJ2:GFX_OBJ1; + spr_region=(offset0&0x0200)?GFX_OBJ2:GFX_OBJ1; + spr_region=GFX_OBJ1; // Always fixed on Final Lap -// ypos=(0x1ff-(offset0&0x01ff))-0x50+0x02; -// xpos=(offset4&0x03ff)-0x50+0x07; - -// Kludge.... - if(fubar) + if(offset0&0x0200) { -// ypos=(((offset0&0x01ff))-0x50)&0xff; -// xpos=(offset4&0x03ff)+0x50; - -// ypos=((offset0&0x0100)?-0x100:0)+(offset0&0x00ff)+0x0100; -// xpos=((offset4&0x0200)?-0x200:0)+(offset4&0x01ff)+0x0200; - -// ypos=(((offset0&0x00ff))-0x50); ypos=((offset0&0x0100)?-0x100:0)+(offset0&0x00ff)+0xa8; // 0x70 xpos=((offset4&0x0200)?-0x200:0)+(offset4&0x01ff)+0x90; // 0x90 } @@ -972,11 +956,12 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) xpos=(offset4&0x03ff)-0x50+0x07; } + flipy=offset2&0x8000; flipx=offset2&0x4000; - scalex=((sizex<<16)/((offset0&0x0200)?0x20:0x10)); - scaley=((sizey<<16)/((offset0&0x0200)?0x20:0x10)); + scalex=((sizex<<16)/((offset2&0x2000)?0x20:0x10)); + scaley=((sizey<<16)/((offset2&0x2000)?0x20:0x10)); /* Set the clipping rect to mask off the other portion of the sprite */ rect.min_x=xpos; @@ -984,7 +969,7 @@ static void draw_sprites_finallap( struct osd_bitmap *bitmap, int priority ) rect.min_y=ypos; rect.max_y=ypos+(sizey-1); - if((offset0&0x0200)==0) + if((offset2&0x2000)==0) { if(((offset2&0x0001) && !flipx) || (!(offset2&0x0001) && flipx)) xpos-=sizex; if(((offset2&0x0002) && !flipy) || (!(offset2&0x0002) && flipy)) ypos-=sizey; @@ -1148,14 +1133,15 @@ void namcos2_vh_update_finallap(struct osd_bitmap *bitmap, int full_refresh) fillbitmap(bitmap,Machine->pens[0],&Machine->drv->visible_area); /* Render the screen */ - for(priority=0;priority<=7;priority++) + for(priority=0;priority<=15;priority++) { - if((namcos2_68k_vram_ctrl_r(0x20)&0x07)==priority && show[0]) tilemap_draw(bitmap,namcos2_tilemap0,0); - if((namcos2_68k_vram_ctrl_r(0x22)&0x07)==priority && show[1]) tilemap_draw(bitmap,namcos2_tilemap1,0); - if((namcos2_68k_vram_ctrl_r(0x24)&0x07)==priority && show[2]) tilemap_draw(bitmap,namcos2_tilemap2,0); - if((namcos2_68k_vram_ctrl_r(0x26)&0x07)==priority && show[3]) tilemap_draw(bitmap,namcos2_tilemap3,0); - if((namcos2_68k_vram_ctrl_r(0x28)&0x07)==priority && show[4]) tilemap_draw(bitmap,namcos2_tilemap4,0); - if((namcos2_68k_vram_ctrl_r(0x2a)&0x07)==priority && show[5]) tilemap_draw(bitmap,namcos2_tilemap5,0); + if((namcos2_68k_vram_ctrl_r(0x20)&0x0f)==priority && show[0]) tilemap_draw(bitmap,namcos2_tilemap0,0); + if((namcos2_68k_vram_ctrl_r(0x22)&0x0f)==priority && show[1]) tilemap_draw(bitmap,namcos2_tilemap1,0); + if((namcos2_68k_vram_ctrl_r(0x24)&0x0f)==priority && show[2]) tilemap_draw(bitmap,namcos2_tilemap2,0); + if((namcos2_68k_vram_ctrl_r(0x26)&0x0f)==priority && show[3]) tilemap_draw(bitmap,namcos2_tilemap3,0); + if((namcos2_68k_vram_ctrl_r(0x28)&0x0f)==priority && show[4]) tilemap_draw(bitmap,namcos2_tilemap4,0); + if((namcos2_68k_vram_ctrl_r(0x2a)&0x0f)==priority && show[5]) tilemap_draw(bitmap,namcos2_tilemap5,0); + /* Not sure if priority should be 0x07 or 0x0f */ /* Sprites */ draw_sprites_finallap( bitmap,priority ); diff --git a/src/vidhrdw/prehisle.c b/src/vidhrdw/prehisle.c index b12683e87..7f3350ab5 100644 --- a/src/vidhrdw/prehisle.c +++ b/src/vidhrdw/prehisle.c @@ -2,7 +2,7 @@ Prehistoric Isle video routines - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/vidhrdw/rallyx.c b/src/vidhrdw/rallyx.c index 92c0eaf06..af2368696 100644 --- a/src/vidhrdw/rallyx.c +++ b/src/vidhrdw/rallyx.c @@ -64,6 +64,9 @@ static struct rectangle radarvisibleareaflip = -- 470 ohm resistor -- RED bit 0 -- 1 kohm resistor -- RED + In Rally-X there is a 1 kohm pull-down on B only, in Locomotion the + 1 kohm pull-down is an all three RGB outputs. + ***************************************************************************/ void rallyx_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) { @@ -110,6 +113,49 @@ void rallyx_vh_convert_color_prom(unsigned char *palette, unsigned short *colort COLOR(2,i) = 16 + i; } +void locomotn_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) +{ + int i; + #define TOTAL_COLORS(gfxn) (Machine->gfx[gfxn]->total_colors * Machine->gfx[gfxn]->color_granularity) + #define COLOR(gfxn,offs) (colortable[Machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) + + + for (i = 0;i < Machine->drv->total_colors;i++) + { + int bit0,bit1,bit2; + + + /* red component */ + bit0 = (*color_prom >> 0) & 0x01; + bit1 = (*color_prom >> 1) & 0x01; + bit2 = (*color_prom >> 2) & 0x01; + *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + /* green component */ + bit0 = (*color_prom >> 3) & 0x01; + bit1 = (*color_prom >> 4) & 0x01; + bit2 = (*color_prom >> 5) & 0x01; + *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + /* blue component */ + bit0 = (*color_prom >> 6) & 0x01; + bit1 = (*color_prom >> 7) & 0x01; + *(palette++) = 0x50 * bit0 + 0xab * bit1; + + color_prom++; + } + + /* color_prom now points to the beginning of the lookup table */ + + /* character lookup table */ + /* sprites use the same color lookup table as characters */ + /* characters use colors 0-15 */ + for (i = 0;i < TOTAL_COLORS(0);i++) + COLOR(0,i) = *(color_prom++) & 0x0f; + + /* radar dots lookup table */ + /* they use colors 16-19 */ + for (i = 0;i < 4;i++) + COLOR(2,i) = 16 + i; +} /*************************************************************************** @@ -597,7 +643,7 @@ if (flipscreen) sx += 32; drawgfx(bitmap,Machine->gfx[1], ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1), - spriteram_2[offs + 1], + spriteram_2[offs + 1] & 0x3f, !flipscreen,!flipscreen, sx,sy, flipscreen ? &spritevisibleareaflip : &spritevisiblearea,TRANSPARENCY_COLOR,0); @@ -750,7 +796,7 @@ if (flipscreen) sx += 32; if (spriteram[offs] & 0x01) /* ??? */ drawgfx(bitmap,Machine->gfx[1], ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1), - spriteram_2[offs + 1], + spriteram_2[offs + 1] & 0x3f, flipx,flipy, sx,sy, &Machine->drv->visible_area,TRANSPARENCY_COLOR,0); diff --git a/src/vidhrdw/shootout.c b/src/vidhrdw/shootout.c index d94e11bd8..80acfeec8 100644 --- a/src/vidhrdw/shootout.c +++ b/src/vidhrdw/shootout.c @@ -82,6 +82,43 @@ static void get_sprite_info( void ){ } } +static void get_sprite_info2( void ){ + const struct GfxElement *gfx = Machine->gfx[1]; + const UINT8 *source = spriteram; + struct sprite *sprite = sprite_list->sprite; + int count = NUM_SPRITES; + + int attributes, flags, number; + + while( count-- ){ + flags = 0; + attributes = source[1]; + if ( attributes & 0x01 ){ /* enabled */ + flags |= SPRITE_VISIBLE; + sprite->priority = (attributes&0x08)?1:0; + sprite->x = (240 - source[2])&0xff; + sprite->y = (240 - source[0])&0xff; + + number = source[3] + ((attributes&0xc0)<<2); + if( attributes & 0x04 ) flags |= SPRITE_FLIPX; + if( attributes & 0x02 ) flags |= SPRITE_FLICKER; /* ? */ + + if( attributes & 0x10 ){ /* double height */ + number = number&(~1); + sprite->y -= 16; + sprite->total_height = 32; + } + else { + sprite->total_height = 16; + } + sprite->pen_data = gfx->gfxdata + number * gfx->char_modulo; + } + sprite->flags = flags; + sprite++; + source += 4; + } +} + static void draw_background( struct osd_bitmap *bitmap ){ const struct rectangle *clip = &Machine->drv->visible_area; int offs; @@ -136,3 +173,12 @@ void shootout_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh){ draw_foreground( bitmap ); sprite_draw( sprite_list, 0); } + +void shootouj_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh){ + get_sprite_info2(); + sprite_update(); + draw_background( bitmap ); + sprite_draw( sprite_list, 1); + draw_foreground( bitmap ); + sprite_draw( sprite_list, 0); +} diff --git a/src/vidhrdw/snk68.c b/src/vidhrdw/snk68.c index fe29cff76..30bb214a7 100644 --- a/src/vidhrdw/snk68.c +++ b/src/vidhrdw/snk68.c @@ -8,7 +8,7 @@ Seems to be controlled in same byte as flipscreen. - Emulation by Bryan McPhail, mish@tendril.force9.net + Emulation by Bryan McPhail, mish@tendril.co.uk ***************************************************************************/ diff --git a/src/vidhrdw/srumbler.c b/src/vidhrdw/srumbler.c index 08128b5c9..9f8ce051a 100644 --- a/src/vidhrdw/srumbler.c +++ b/src/vidhrdw/srumbler.c @@ -1,98 +1,65 @@ /*************************************************************************** - SPEED RUMBLER + vidhrdw.c - vidhrdw.c - - Functions to emulate the video hardware of the machine. - - Todo: - Priority tiles (should be half transparent). + Functions to emulate the video hardware of the machine. ***************************************************************************/ #include "driver.h" -#include "vidhrdw/generic.h" +extern unsigned char *spriteram; +extern int spriteram_size; -unsigned char *srumbler_backgroundram; -unsigned char *srumbler_scrolly; -unsigned char *srumbler_scrollx; +unsigned char *srumbler_backgroundram,*srumbler_foregroundram; +static struct tilemap *bg_tilemap,*fg_tilemap; +static int flipscreen; -int srumbler_backgroundram_size; -static unsigned char *bkgnd_dirty; -static struct osd_bitmap *tmpbitmap2; +/*************************************************************************** + Callbacks for the TileMap code -/* Unknown video control register */ -static int srumbler_video_control; +***************************************************************************/ + +static void get_fg_tile_info( int col, int row ) +{ + int tile_index = 2*(row+col*32); + unsigned char attr = srumbler_foregroundram[tile_index]; + SET_TILE_INFO(0,srumbler_foregroundram[tile_index + 1] + ((attr & 0x03) << 8),(attr & 0x3c) >> 2) + tile_info.flags = (attr & 0x40) ? TILE_IGNORE_TRANSPARENCY : 0; +} -/* -Currently not used. The end of level score-board should either be -transparent or the scroll tiles need to be turned off. -*/ -static int chon=1,objon=1,scrollon=1; +static void get_bg_tile_info( int col, int row ) +{ + int tile_index = 2*(row+col*64); + unsigned char attr = srumbler_backgroundram[tile_index]; + SET_TILE_INFO(1,srumbler_backgroundram[tile_index + 1] + ((attr & 0x07) << 8),(attr & 0xe0) >> 5) + tile_info.flags = TILE_SPLIT((attr & 0x10) >> 4); + if (attr & 0x08) tile_info.flags |= TILE_FLIPY; +} /*************************************************************************** - Start the video hardware emulation. + Start the video hardware emulation. ***************************************************************************/ int srumbler_vh_start(void) { - int i; - - - if (generic_vh_start() != 0) - return 1; - - if ((bkgnd_dirty = malloc(srumbler_backgroundram_size)) == 0) - { - generic_vh_stop(); - return 1; - } - memset(bkgnd_dirty,1,srumbler_backgroundram_size); - + fg_tilemap = tilemap_create(get_fg_tile_info,TILEMAP_TRANSPARENT, 8, 8,64,32); + bg_tilemap = tilemap_create(get_bg_tile_info,TILEMAP_SPLIT, 16,16,64,64); - if ((tmpbitmap2 = osd_new_bitmap(0x40*16, 0x40*16, Machine->scrbitmap->depth )) == 0) - { - free(bkgnd_dirty); - generic_vh_stop(); + if (!fg_tilemap || !bg_tilemap) return 1; - } -#define COLORTABLE_START(gfxn,color_code) Machine->drv->gfxdecodeinfo[gfxn].color_codes_start + \ - color_code * Machine->gfx[gfxn]->color_granularity -#define GFX_COLOR_CODES(gfxn) Machine->gfx[gfxn]->total_colors -#define GFX_ELEM_COLORS(gfxn) Machine->gfx[gfxn]->color_granularity + fg_tilemap->transparent_pen = 3; - palette_init_used_colors(); - /* chars */ - for (i = 0;i < GFX_COLOR_CODES(0);i++) - { - memset(&palette_used_colors[COLORTABLE_START(0,i)], - PALETTE_COLOR_USED, - GFX_ELEM_COLORS(0)); - } - /* bg tiles */ - for (i = 0;i < GFX_COLOR_CODES(1);i++) - { - memset(&palette_used_colors[COLORTABLE_START(1,i)], - PALETTE_COLOR_USED, - GFX_ELEM_COLORS(1)); - } - /* sprites */ - for (i = 0;i < GFX_COLOR_CODES(2);i++) - { - memset(&palette_used_colors[COLORTABLE_START(2,i)], - PALETTE_COLOR_USED, - GFX_ELEM_COLORS(2)); - } + bg_tilemap->transmask[0] = 0xffff; /* split type 0 is totally transparent in front half */ + bg_tilemap->transmask[1] = 0x07ff; /* split type 1 has pens 0-10 transparent in front half */ return 0; } @@ -101,231 +68,119 @@ int srumbler_vh_start(void) /*************************************************************************** - Stop the video hardware emulation. + Memory handlers ***************************************************************************/ -void srumbler_vh_stop(void) -{ -osd_free_bitmap(tmpbitmap2); - free(bkgnd_dirty); -generic_vh_stop(); -} -void srumbler_4009_w(int offset, int data) +void srumbler_foreground_w(int offset,int data) { - /* Unknown video control register */ - srumbler_video_control=data; + if (srumbler_foregroundram[offset] != data) + { + srumbler_foregroundram[offset] = data; + tilemap_mark_tile_dirty(fg_tilemap,(offset/2)/32,(offset/2)%32); + } } void srumbler_background_w(int offset,int data) { - if (srumbler_backgroundram[offset] != data) + if (srumbler_backgroundram[offset] != data) + { + srumbler_backgroundram[offset] = data; + tilemap_mark_tile_dirty(bg_tilemap,(offset/2)/64,(offset/2)%64); + } +} + + +void srumbler_4009_w(int offset, int data) { - bkgnd_dirty[offset] = 1; - srumbler_backgroundram[offset] = data; + /* bit 0 flips screen */ + flipscreen = data & 1; + tilemap_set_flip(ALL_TILEMAPS,flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); + + /* bits 4-5 used during attract mode, unknown */ + + /* bits 6-7 coin counters */ + coin_counter_w(0,data & 0x40); + coin_counter_w(1,data & 0x80); } + + +void srumbler_scroll_w(int offset,int data) +{ + static int scroll[4]; + + scroll[offset] = data; + + tilemap_set_scrollx(bg_tilemap,0,scroll[0] | (scroll[1] << 8)); + tilemap_set_scrolly(bg_tilemap,0,scroll[2] | (scroll[3] << 8)); } + /*************************************************************************** - Draw the game screen in the given osd_bitmap. - Do NOT call osd_update_display() from this function, it will be called by - the main emulation engine. + Display refresh ***************************************************************************/ -void srumbler_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +static void draw_sprites(struct osd_bitmap *bitmap) { - int scrollx, scrolly; int offs; - int sx, sy, x, y; - - if (palette_recalc()) - memset(bkgnd_dirty,1,srumbler_backgroundram_size); - - - scrollx = srumbler_scrollx[0]+256*srumbler_scrollx[1]; - scrollx &= 0x03ff; - scrolly = (srumbler_scrolly[0]+256*srumbler_scrolly[1]); - - if (scrollon) - { - offs=0; - for (sx=0; sx<0x40; sx++) - { - for (sy=0; sy<0x40; sy++) - { - /* TILES - ===== - Attribute - 0x80 Colour - 0x40 Colour - 0x20 Colour - 0x10 Tile priority - 0x08 Y flip - 0x04 Code - 0x02 Code - 0x01 Code - */ - - if (bkgnd_dirty[offs]||bkgnd_dirty[offs+1]) - { - int attr=srumbler_backgroundram[offs]; - int code=attr&0x07; - code <<= 8; - code+=srumbler_backgroundram[offs+1]; - - bkgnd_dirty[offs]=bkgnd_dirty[offs+1]=0; - - drawgfx(tmpbitmap2,Machine->gfx[1], - code, - (attr>>5), - 0, - attr&0x08, - sx*16, sy*16, - 0, TRANSPARENCY_NONE,0); - } - offs+=2; - } - } - - - /* copy the background graphics */ - { - int scrlx, scrly; - scrlx =-scrollx; - scrly=-scrolly; - copyscrollbitmap(bitmap,tmpbitmap2,1,&scrlx,1,&scrly,&Machine->drv->visible_area,TRANSPARENCY_NONE,0); - } - } - else fillbitmap(bitmap,Machine->pens[0],&Machine->drv->visible_area); - - - if (objon) - { - /* Draw the sprites. */ - for (offs = spriteram_size-4; offs>=0;offs -= 4) - { - /* SPRITES - ===== - Attribute - 0x80 Code MSB - 0x40 Code MSB - 0x20 Code MSB - 0x10 Colour - 0x08 Colour - 0x04 Colour - 0x02 y Flip - 0x01 X MSB - */ - - - int code,colour; - int attr=spriteram[offs+1]; - code = spriteram[offs]; - code += ( (attr&0xe0) << 3 ); - colour = (attr & 0x1c)>>2; - sy = spriteram[offs + 2]; - sx = spriteram[offs + 3] + 0x100 * ( attr & 0x01); - - drawgfx(bitmap,Machine->gfx[2], - code, - colour, - 0, - attr&0x02, - sx, sy, - &Machine->drv->visible_area,TRANSPARENCY_PEN,15); - } - - /* now draw high priority sprite parts */ - if( 0 )for (offs = spriteram_size-4; offs>=0;offs -= 4) - { - /* SPRITES - ===== - Attribute - 0x80 Code MSB - 0x40 Code MSB - 0x20 Code MSB - 0x10 Colour - 0x08 Colour - 0x04 Colour - 0x02 y Flip - 0x01 X MSB - */ - - - int code,colour; - int attr=spriteram[offs+1]; - code = spriteram[offs]; - code += ( (attr&0xe0) << 3 ); - colour = (attr & 0x1c)>>2; - sy = spriteram[offs + 2]; - sx = spriteram[offs + 3] + 0x100 * ( attr & 0x01); - - drawgfx(bitmap,Machine->gfx[2], - code, - colour, - 0, - attr&0x02, - sx, sy, - &Machine->drv->visible_area,TRANSPARENCY_PENS,(1<<15)|0xFF); - } - } - -/* redraw the background tiles which have priority over sprites */ - if (scrollon) - { - x=-(scrollx & 0x0f); - - for (sx=0; sx<0x18; sx++) - { - offs=(scrollx >>4)*0x80; - offs+=(scrolly>>4)*2; - offs+=sx*0x80; - offs&=0x1fff; - y=-(scrolly & 0x0f); - for (sy=0; sy<0x11; sy++) - { - int attr=srumbler_backgroundram[offs]; - if (attr & 0x10) - { - int code=attr&0x07; - code <<= 8; - code+=srumbler_backgroundram[offs+1]; - drawgfx(bitmap,Machine->gfx[1], - code, - (attr>>5), - 0, - attr&0x08, - x, y, - &Machine->drv->visible_area, - - TRANSPARENCY_PENS,0xFF ); - } - y+=16; - offs+=2; - } - x+=16; - } - } - - if (chon) + /* Draw the sprites. */ + for (offs = spriteram_size-4; offs>=0;offs -= 4) { - /* draw the frontmost playfield. They are characters, but draw them as sprites */ - for (offs = videoram_size - 2;offs >= 0;offs -= 2) + /* SPRITES + ===== + Attribute + 0x80 Code MSB + 0x40 Code MSB + 0x20 Code MSB + 0x10 Colour + 0x08 Colour + 0x04 Colour + 0x02 y Flip + 0x01 X MSB + */ + + + int code,colour,sx,sy,flipy; + int attr=spriteram[offs+1]; + code = spriteram[offs]; + code += ( (attr&0xe0) << 3 ); + colour = (attr & 0x1c)>>2; + sy = spriteram[offs + 2]; + sx = spriteram[offs + 3] + 0x100 * ( attr & 0x01); + flipy = attr & 0x02; + + if (flipscreen) { - sx = (offs/2) / 32; - sy = (offs/2) % 32; - - drawgfx(bitmap,Machine->gfx[0], - videoram[offs + 1] + ((videoram[offs] & 0x03) << 8), - (videoram[offs] & 0x3c) >> 2, - 0,0, - 8*sx,8*sy, - &Machine->drv->visible_area, - (videoram[offs] & 0x40) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,3); + sx = 496 - sx; + sy = 240 - sy; + flipy = !flipy; } + + drawgfx(bitmap,Machine->gfx[2], + code, + colour, + flipscreen,flipy, + sx, sy, + &Machine->drv->visible_area,TRANSPARENCY_PEN,15); } } + + +void srumbler_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + tilemap_update(ALL_TILEMAPS); + + if (palette_recalc()) + tilemap_mark_all_pixels_dirty(ALL_TILEMAPS); + + tilemap_render(ALL_TILEMAPS); + + tilemap_draw(bitmap,bg_tilemap,TILEMAP_BACK); + draw_sprites(bitmap); + tilemap_draw(bitmap,bg_tilemap,TILEMAP_FRONT); + tilemap_draw(bitmap,fg_tilemap,0); +} diff --git a/src/vidhrdw/stadhero.c b/src/vidhrdw/stadhero.c index 8d9cdd97a..66844f559 100644 --- a/src/vidhrdw/stadhero.c +++ b/src/vidhrdw/stadhero.c @@ -1,6 +1,6 @@ /*************************************************************************** - stadhero video emulation - Bryan McPhail, mish@tendril.force9.net + stadhero video emulation - Bryan McPhail, mish@tendril.co.uk ********************************************************************* diff --git a/src/vidhrdw/supbtime.c b/src/vidhrdw/supbtime.c index 5881f0123..ef8ca7d6b 100644 --- a/src/vidhrdw/supbtime.c +++ b/src/vidhrdw/supbtime.c @@ -1,6 +1,6 @@ /*************************************************************************** - Super Burger Time Video emulation - Bryan McPhail, mish@tendril.force9.net + Super Burger Time Video emulation - Bryan McPhail, mish@tendril.co.uk ********************************************************************* diff --git a/src/vidhrdw/toaplan2.c b/src/vidhrdw/toaplan2.c index b9f4f2e0a..72a191c67 100644 --- a/src/vidhrdw/toaplan2.c +++ b/src/vidhrdw/toaplan2.c @@ -21,7 +21,8 @@ - Teki Paki sprites seem to be three frames ahead of the tile layers. Since this driver double buffers the sprites, Teki Paki is still suffering sprite lag (Does it need an extra buffer - quite strange) - + - Batsugun, relationship between the two video controllers (priority + wise) is wrong and unknown. Video RAM address layout: @@ -90,7 +91,7 @@ Scroll Registers (hex) : 06 Sprites scroll X (X flip off) ??? 07 Sprites scroll Y (Y flip off) ??? 0E ???? Initialise Video controller at startup ???? - 0F Scroll update complete ??? using this to control sprite buffering + 0F Scroll update complete ??? (Not used in Ghox and V-Five) 80 Background scroll X (X flip on) 81 Background scroll Y (Y flip on) @@ -105,15 +106,15 @@ Scroll Registers (hex) : Scroll Register 0E writes (Video controller inits ?) from different games: -Teki-Paki | Ghox | Knuckle Bash | Pipi & Bibis | +Teki-Paki | Ghox | Knuckle Bash | Tatsujin 2 | 0003, 0002, 4000 | ????, ????, ???? | 0202, 0203, 4200 | 0003, 0002, 4000 | -Dogyuun | -0202, 0203, 4200 | -1202, 1203, 5200 | <--- Second video controller ??? +Dogyuun | Batsugun | +0202, 0203, 4200 | 0202, 0203, 4200 | +1202, 1203, 5200 | 1202, 1203, 5200 | <--- Second video controller ??? -Fix Eight | Tatsujin 2 | Snow Bros. 2 | -0202, 0203, 4200 | 0003, 0002, 4000 | 0202, 0203, 4200 | +Pipi & Bibis | Fix Eight | V-Five | Snow Bros. 2 | +0003, 0002, 4000 | 0202, 0203, 4200 | 0202, 0203, 4200 | 0202, 0203, 4200 | ***************************************************************************/ @@ -131,51 +132,52 @@ Fix Eight | Tatsujin 2 | Snow Bros. 2 | #define TOAPLAN2_SPRITE_FLIPX 0x1000 /* Sprite flip flags (for screen flip) */ #define TOAPLAN2_SPRITE_FLIPY 0x2000 -static unsigned char *bgvideoram; -static unsigned char *fgvideoram; -static unsigned char *topvideoram; -static unsigned char *spriteram_now; /* Sprites to draw this frame */ -static unsigned char *spriteram_next; /* Sprites to draw next frame */ -static unsigned char *spriteram_new; /* Sprites to add to next frame */ -static int toaplan2_unk_vram; /* Video RAM tested but not used (for Teki Paki)*/ - -static int toaplan2_scroll_reg; -static int toaplan2_voffs; -static int bg_offs; -static int fg_offs; -static int top_offs; -static int sprite_offs; -static int bg_scrollx; -static int bg_scrolly; -static int fg_scrollx; -static int fg_scrolly; -static int top_scrollx; -static int top_scrolly; -static int sprite_scrollx; -static int sprite_scrolly; +#define CPU_2_NONE 0x00 +#define CPU_2_Z80 0x5a +#define CPU_2_HD647180 0xa5 +#define CPU_2_Zx80 0xff + + +static unsigned char *bgvideoram[2]; +static unsigned char *fgvideoram[2]; +static unsigned char *topvideoram[2]; +static unsigned char *spriteram_now[2]; /* Sprites to draw this frame */ +static unsigned char *spriteram_next[2]; /* Sprites to draw next frame */ +static unsigned char *spriteram_new[2]; /* Sprites to add to next frame */ +static int toaplan2_unk_vram; /* Video RAM tested but not used (for Teki Paki)*/ + +static int toaplan2_scroll_reg[2]; +static int toaplan2_voffs[2]; +static int bg_offs[2]; +static int fg_offs[2]; +static int top_offs[2]; +static int sprite_offs[2]; +static int bg_scrollx[2]; +static int bg_scrolly[2]; +static int fg_scrollx[2]; +static int fg_scrolly[2]; +static int top_scrollx[2]; +static int top_scrolly[2]; +static int sprite_scrollx[2]; +static int sprite_scrolly[2]; #if TOAPLAN2_DEBUG -static int display_bg =1; -static int display_fg =1; -static int display_top=1; -static int displog =0; +static int display_bg[2] = { 1, 1 }; +static int display_fg[2] = { 1, 1 }; +static int display_top[2] = { 1, 1 }; +static int displog = 0; #endif -static int display_sp =1; +static int display_sp[2] = { 1, 1 }; -static int sprite_priority[16]; -static int bg_flip = 0; -static int fg_flip = 0; -static int top_flip = 0; -static int sprite_flip = 0; +static int sprite_priority[2][16]; +static int bg_flip[2] = { 0, 0 }; +static int fg_flip[2] = { 0, 0 }; +static int top_flip[2] = { 0, 0 }; +static int sprite_flip[2] = { 0, 0 }; extern int toaplan2_sub_cpu; -#define CPU_2_NONE 0x00 -#define CPU_2_Z80 0x5a -#define CPU_2_HD647180 0xa5 -#define CPU_2_UNKNOWN 0xff - -static struct tilemap *top_tilemap, *fg_tilemap, *bg_tilemap; +static struct tilemap *top_tilemap[2], *fg_tilemap[2], *bg_tilemap[2]; /*************************************************************************** @@ -184,10 +186,10 @@ static struct tilemap *top_tilemap, *fg_tilemap, *bg_tilemap; ***************************************************************************/ -static void get_top_tile_info( int col, int row ) +static void get_top0_tile_info( int col, int row ) { int color, tile_number, attrib, offset; - UINT16 *source = (UINT16 *)(topvideoram); + UINT16 *source = (UINT16 *)(topvideoram[0]); offset = ((row*64) + (col*2)) & 0x7ff; @@ -198,10 +200,10 @@ static void get_top_tile_info( int col, int row ) tile_info.priority = (attrib & 0x0f00) >> 8; } -static void get_fg_tile_info( int col, int row ) +static void get_fg0_tile_info( int col, int row ) { int color, tile_number, attrib, offset; - UINT16 *source = (UINT16 *)(fgvideoram); + UINT16 *source = (UINT16 *)(fgvideoram[0]); offset = ((row*64) + (col*2)) & 0x7ff; @@ -212,10 +214,10 @@ static void get_fg_tile_info( int col, int row ) tile_info.priority = (attrib & 0x0f00) >> 8; } -static void get_bg_tile_info( int col, int row ) +static void get_bg0_tile_info( int col, int row ) { int color, tile_number, attrib, offset; - UINT16 *source = (UINT16 *)(bgvideoram); + UINT16 *source = (UINT16 *)(bgvideoram[0]); offset = ((row*64) + (col*2)) & 0x7ff; @@ -227,380 +229,524 @@ static void get_bg_tile_info( int col, int row ) } +static void get_top1_tile_info( int col, int row ) +{ + int color, tile_number, attrib, offset; + UINT16 *source = (UINT16 *)(topvideoram[1]); + + offset = ((row*64) + (col*2)) & 0x7ff; + + attrib = source[offset]; + tile_number = source[offset+1]; + color = attrib & 0x7f; + SET_TILE_INFO(2,tile_number,color) + tile_info.priority = (attrib & 0x0f00) >> 8; +} + +static void get_fg1_tile_info( int col, int row ) +{ + int color, tile_number, attrib, offset; + UINT16 *source = (UINT16 *)(fgvideoram[1]); + + offset = ((row*64) + (col*2)) & 0x7ff; + + attrib = source[offset]; + tile_number = source[offset+1]; + color = attrib & 0x7f; + SET_TILE_INFO(2,tile_number,color) + tile_info.priority = (attrib & 0x0f00) >> 8; +} + +static void get_bg1_tile_info( int col, int row ) +{ + int color, tile_number, attrib, offset; + UINT16 *source = (UINT16 *)(bgvideoram[1]); + + offset = ((row*64) + (col*2)) & 0x7ff; + + attrib = source[offset]; + tile_number = source[offset+1]; + color = attrib & 0x7f; + SET_TILE_INFO(2,tile_number,color) + tile_info.priority = (attrib & 0x0f00) >> 8; +} + + + /*************************************************************************** Start the video hardware emulation. ***************************************************************************/ -void toaplan2_vh_stop(void) { - free(bgvideoram); - free(fgvideoram); - free(topvideoram); - free(spriteram_now); - free(spriteram_next); - free(spriteram_new); +static void toaplan2_vh_stop(int controller) +{ + free( bgvideoram[controller] ); + free( fgvideoram[controller] ); + free( topvideoram[controller] ); + free( spriteram_now[controller] ); + free( spriteram_next[controller] ); + free( spriteram_new[controller] ); +} +void toaplan2_0_vh_stop(void) +{ + toaplan2_vh_stop(0); +} +void toaplan2_1_vh_stop(void) +{ + toaplan2_vh_stop(1); + toaplan2_vh_stop(0); } -int toaplan2_vh_start(void) { - if ((spriteram_new = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) - { - return 1; - } - memset(spriteram_new,0,TOAPLAN2_SPRITERAM_SIZE); - - if ((spriteram_next = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) - { - free(spriteram_new); - return 1; - } - memset(spriteram_next,0,TOAPLAN2_SPRITERAM_SIZE); - if ((spriteram_now = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) - { - free(spriteram_next); - free(spriteram_new); - return 1; - } - memset(spriteram_now,0,TOAPLAN2_SPRITERAM_SIZE); +static int create_tilemaps_0(void) +{ + top_tilemap[0] = tilemap_create( + get_top0_tile_info, + TILEMAP_TRANSPARENT, + 16,16, + 32,32 + ); - if ((topvideoram = malloc(TOAPLAN2_TOP_VRAM_SIZE)) == 0) - { - free(spriteram_now); - free(spriteram_next); - free(spriteram_new); - return 1; - } - memset(topvideoram,0,TOAPLAN2_TOP_VRAM_SIZE); + fg_tilemap[0] = tilemap_create( + get_fg0_tile_info, + TILEMAP_TRANSPARENT, + 16,16, + 32,32 + ); - if ((fgvideoram = malloc(TOAPLAN2_FG_VRAM_SIZE)) == 0) - { - free(topvideoram); - free(spriteram_now); - free(spriteram_next); - free(spriteram_new); - return 1; - } - memset(fgvideoram,0,TOAPLAN2_FG_VRAM_SIZE); + bg_tilemap[0] = tilemap_create( + get_bg0_tile_info, + TILEMAP_TRANSPARENT, + 16,16, + 32,32 + ); - if ((bgvideoram = malloc(TOAPLAN2_BG_VRAM_SIZE)) == 0) + if (top_tilemap[0] && fg_tilemap[0] && bg_tilemap[0]) { - free(fgvideoram); - free(topvideoram); - free(spriteram_now); - free(spriteram_next); - free(spriteram_new); - return 1; + top_tilemap[0]->transparent_pen = 0; + fg_tilemap[0]->transparent_pen = 0; + bg_tilemap[0]->transparent_pen = 0; + return 0; } - memset(bgvideoram,0,TOAPLAN2_BG_VRAM_SIZE); - - top_tilemap = tilemap_create( - get_top_tile_info, + return 1; +} +static int create_tilemaps_1(void) +{ + top_tilemap[1] = tilemap_create( + get_top1_tile_info, TILEMAP_TRANSPARENT, 16,16, 32,32 ); - fg_tilemap = tilemap_create( - get_fg_tile_info, + fg_tilemap[1] = tilemap_create( + get_fg1_tile_info, TILEMAP_TRANSPARENT, 16,16, 32,32 ); - bg_tilemap = tilemap_create( - get_bg_tile_info, + bg_tilemap[1] = tilemap_create( + get_bg1_tile_info, TILEMAP_TRANSPARENT, 16,16, 32,32 ); - - if (top_tilemap && fg_tilemap && bg_tilemap) + if (top_tilemap[1] && fg_tilemap[1] && bg_tilemap[1]) { - top_tilemap->transparent_pen = 0; - fg_tilemap->transparent_pen = 0; - bg_tilemap->transparent_pen = 0; - + top_tilemap[1]->transparent_pen = 0; + fg_tilemap[1]->transparent_pen = 0; + bg_tilemap[1]->transparent_pen = 0; return 0; } - return 1; } +static int toaplan2_vh_start(int controller) +{ + static int error_level = 0; + if ((spriteram_new[controller] = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) + { + return 1; + } + memset(spriteram_new[controller],0,TOAPLAN2_SPRITERAM_SIZE); + if ((spriteram_next[controller] = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) + { + free( spriteram_new[controller] ); + return 1; + } + memset(spriteram_next[controller],0,TOAPLAN2_SPRITERAM_SIZE); -/*************************************************************************** + if ((spriteram_now[controller] = malloc(TOAPLAN2_SPRITERAM_SIZE)) == 0) + { + free( spriteram_next[controller] ); + free( spriteram_new[controller] ); + return 1; + } + memset(spriteram_now[controller],0,TOAPLAN2_SPRITERAM_SIZE); - Video I/O port hardware. + if ((topvideoram[controller] = malloc(TOAPLAN2_TOP_VRAM_SIZE)) == 0) + { + free( spriteram_now[controller] ); + free( spriteram_next[controller] ); + free( spriteram_new[controller] ); + return 1; + } + memset(topvideoram[controller],0,TOAPLAN2_TOP_VRAM_SIZE); -***************************************************************************/ + if ((fgvideoram[controller] = malloc(TOAPLAN2_FG_VRAM_SIZE)) == 0) + { + free( topvideoram[controller] ); + free( spriteram_now[controller] ); + free( spriteram_next[controller] ); + free( spriteram_new[controller] ); + return 1; + } + memset(fgvideoram[controller],0,TOAPLAN2_FG_VRAM_SIZE); + if ((bgvideoram[controller] = malloc(TOAPLAN2_BG_VRAM_SIZE)) == 0) + { + free( fgvideoram[controller] ); + free( topvideoram[controller] ); + free( spriteram_now[controller] ); + free( spriteram_next[controller] ); + free( spriteram_new[controller] ); + return 1; + } + memset(bgvideoram[controller],0,TOAPLAN2_BG_VRAM_SIZE); -int toaplan2_voffs_r(int offset) + if (controller == 0) + { + error_level |= create_tilemaps_0(); + } + if (controller == 1) + { + error_level |= create_tilemaps_1(); + } + return error_level; +} +int toaplan2_0_vh_start(void) +{ + return toaplan2_vh_start(0); +} +int toaplan2_1_vh_start(void) { - return toaplan2_voffs ; + int error_level = 0; + error_level |= toaplan2_vh_start(0); + error_level |= toaplan2_vh_start(1); + return error_level; } -void toaplan2_voffs_w(int offset, int data) + + +/*************************************************************************** + + Video I/O port hardware. + +***************************************************************************/ + +void toaplan2_voffs_w(int offset, int data, int controller) { - toaplan2_voffs = data; + toaplan2_voffs[controller] = data; /* Layers are seperated by ranges in the offset */ switch (data & 0xfc00) { case 0x0400: - case 0x0000: bg_offs = (data & 0x7ff) * 2; break; + case 0x0000: bg_offs[controller] = (data & 0x7ff) * 2; break; case 0x0c00: - case 0x0800: fg_offs = (data & 0x7ff) * 2; break; + case 0x0800: fg_offs[controller] = (data & 0x7ff) * 2; break; case 0x1400: - case 0x1000: top_offs = (data & 0x7ff) * 2; break; - case 0x1800: sprite_offs = (data & 0x3ff) * 2; break; + case 0x1000: top_offs[controller] = (data & 0x7ff) * 2; break; + case 0x1800: sprite_offs[controller] = (data & 0x3ff) * 2; break; default: if (errorlog) - fprintf(errorlog,"Hmmm, unknown video layer being selected (%08x)\n",data); + fprintf(errorlog,"Hmmm, unknown video controller %01x layer being selected (%08x)\n",controller,data); + data &= 0x1800; + if ((data & 0x1800) == 0x0000) + bg_offs[controller] = (data & 0x7ff) * 2; + if ((data & 0x1800) == 0x0800) + fg_offs[controller] = (data & 0x7ff) * 2; + if ((data & 0x1800) == 0x1000) + top_offs[controller] = (data & 0x7ff) * 2; + if ((data & 0x1800) == 0x1800) + sprite_offs[controller] = (data & 0x3ff) * 2; break; } } +void toaplan2_0_voffs_w(int offset, int data) +{ + toaplan2_voffs_w(offset, data, 0); +} +void toaplan2_1_voffs_w(int offset, int data) +{ + toaplan2_voffs_w(offset, data, 1); +} -int toaplan2_videoram_r(int offset) +int toaplan2_videoram_r(int offset, int controller) { static int video_data = 0; int videoram_offset; - switch (toaplan2_voffs & 0xfc00) + switch (toaplan2_voffs[controller] & 0xfc00) { case 0x0400: case 0x0000: - videoram_offset = bg_offs & (TOAPLAN2_BG_VRAM_SIZE-1); - video_data = READ_WORD (&bgvideoram[videoram_offset]); - bg_offs+=2; - if (bg_offs > TOAPLAN2_BG_VRAM_SIZE) + videoram_offset = bg_offs[controller] & (TOAPLAN2_BG_VRAM_SIZE-1); + video_data = READ_WORD (&bgvideoram[controller][videoram_offset]); + bg_offs[controller] += 2; + if (bg_offs[controller] > TOAPLAN2_BG_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Reading %04x from out of range BG Layer address (%08x) !!!\n",video_data,bg_offs); + fprintf(errorlog,"Reading %04x from out of range BG Layer address (%08x) Video controller %01x !!!\n",video_data,bg_offs[controller],controller); } break; case 0x0c00: case 0x0800: - videoram_offset = fg_offs & (TOAPLAN2_FG_VRAM_SIZE-1); - video_data = READ_WORD (&fgvideoram[videoram_offset]); - fg_offs+=2; - if (fg_offs > TOAPLAN2_FG_VRAM_SIZE) + videoram_offset = fg_offs[controller] & (TOAPLAN2_FG_VRAM_SIZE-1); + video_data = READ_WORD (&fgvideoram[controller][videoram_offset]); + fg_offs[controller] += 2; + if (fg_offs[controller] > TOAPLAN2_FG_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Reading %04x from out of range FG Layer address (%08x) !!!\n",video_data,fg_offs); + fprintf(errorlog,"Reading %04x from out of range FG Layer address (%08x) Video controller %01x !!!\n",video_data,fg_offs[controller],controller); } break; case 0x1400: case 0x1000: - videoram_offset = top_offs & (TOAPLAN2_TOP_VRAM_SIZE-1); - video_data = READ_WORD (&topvideoram[videoram_offset]); - top_offs+=2; - if (top_offs > TOAPLAN2_TOP_VRAM_SIZE) + videoram_offset = top_offs[controller] & (TOAPLAN2_TOP_VRAM_SIZE-1); + video_data = READ_WORD (&topvideoram[controller][videoram_offset]); + top_offs[controller] += 2; + if (top_offs[controller] > TOAPLAN2_TOP_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Reading %04x from out of range TOP Layer address (%08x) !!!\n",video_data,top_offs); + fprintf(errorlog,"Reading %04x from out of range TOP Layer address (%08x) Video controller %01x !!!\n",video_data,top_offs[controller],controller); } break; case 0x1800: - videoram_offset = sprite_offs & (TOAPLAN2_SPRITERAM_SIZE-1); - video_data = READ_WORD (&spriteram_new[videoram_offset]); - sprite_offs+=2; - if (sprite_offs > TOAPLAN2_SPRITERAM_SIZE) + videoram_offset = sprite_offs[controller] & (TOAPLAN2_SPRITERAM_SIZE-1); + video_data = READ_WORD (&spriteram_new[controller][videoram_offset]); + sprite_offs[controller] += 2; + if (sprite_offs[controller] > TOAPLAN2_SPRITERAM_SIZE) { if (errorlog) - fprintf(errorlog,"Reading %04x from out of range Sprite address (%08x) !!!\n",video_data,sprite_offs); + fprintf(errorlog,"Reading %04x from out of range Sprite address (%08x) Video controller %01x !!!\n",video_data,sprite_offs[controller],controller); } break; default: video_data = toaplan2_unk_vram; if (errorlog) - fprintf(errorlog,"Hmmm, reading %04x from unknown video layer (%08x)\n",video_data,toaplan2_voffs); + fprintf(errorlog,"Hmmm, reading %04x from unknown video layer (%08x) Video controller %01x !!!\n",video_data,toaplan2_voffs[controller],controller); break; } return video_data; } +int toaplan2_0_videoram_r(int offset) +{ + return toaplan2_videoram_r(offset, 0); +} +int toaplan2_1_videoram_r(int offset) +{ + return toaplan2_videoram_r(offset, 1); +} -void toaplan2_videoram_w(int offset, int data) +void toaplan2_videoram_w(int offset, int data, int controller) { int oldword = 0; int videoram_offset; int dirty_cell; - switch (toaplan2_voffs & 0xfc00) + switch (toaplan2_voffs[controller] & 0xfc00) { case 0x0400: case 0x0000: - videoram_offset = bg_offs & (TOAPLAN2_BG_VRAM_SIZE-1); - oldword = READ_WORD (&bgvideoram[videoram_offset]); + videoram_offset = bg_offs[controller] & (TOAPLAN2_BG_VRAM_SIZE-1); + oldword = READ_WORD (&bgvideoram[controller][videoram_offset]); if (data != oldword) { - WRITE_WORD (&bgvideoram[videoram_offset],data); - dirty_cell = (bg_offs & (TOAPLAN2_BG_VRAM_SIZE-3))/2; - tilemap_mark_tile_dirty(bg_tilemap, (dirty_cell%64)/2, dirty_cell/64); + WRITE_WORD (&bgvideoram[controller][videoram_offset],data); + dirty_cell = (bg_offs[controller] & (TOAPLAN2_BG_VRAM_SIZE-3))/2; + tilemap_mark_tile_dirty(bg_tilemap[controller], (dirty_cell%64)/2, dirty_cell/64); } - bg_offs+=2; - if (bg_offs > TOAPLAN2_BG_VRAM_SIZE) + bg_offs[controller] += 2; + if (bg_offs[controller] > TOAPLAN2_BG_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Writing %04x to out of range BG Layer address (%08x) !!!\n",data,bg_offs); + fprintf(errorlog,"Writing %04x to out of range BG Layer address (%08x) Video controller %01x !!!\n",data,bg_offs[controller],controller); } break; case 0x0c00: case 0x0800: - videoram_offset = fg_offs & (TOAPLAN2_FG_VRAM_SIZE-1); - oldword = READ_WORD (&fgvideoram[videoram_offset]); + videoram_offset = fg_offs[controller] & (TOAPLAN2_FG_VRAM_SIZE-1); + oldword = READ_WORD (&fgvideoram[controller][videoram_offset]); if (data != oldword) { - WRITE_WORD (&fgvideoram[videoram_offset],data); - dirty_cell = (fg_offs & (TOAPLAN2_FG_VRAM_SIZE-3))/2; - tilemap_mark_tile_dirty(fg_tilemap, (dirty_cell%64)/2, dirty_cell/64); + WRITE_WORD (&fgvideoram[controller][videoram_offset],data); + dirty_cell = (fg_offs[controller] & (TOAPLAN2_FG_VRAM_SIZE-3))/2; + tilemap_mark_tile_dirty(fg_tilemap[controller], (dirty_cell%64)/2, dirty_cell/64); } - fg_offs+=2; - if (fg_offs > TOAPLAN2_FG_VRAM_SIZE) + fg_offs[controller] += 2; + if (fg_offs[controller] > TOAPLAN2_FG_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Writing %04x to out of range FG Layer address (%08x) !!!\n",data,fg_offs); + fprintf(errorlog,"Writing %04x to out of range FG Layer address (%08x) Video controller %01x !!!\n",data,fg_offs[controller],controller); } break; case 0x1400: case 0x1000: - videoram_offset = top_offs & (TOAPLAN2_TOP_VRAM_SIZE-1); - oldword = READ_WORD (&topvideoram[videoram_offset]); + videoram_offset = top_offs[controller] & (TOAPLAN2_TOP_VRAM_SIZE-1); + oldword = READ_WORD (&topvideoram[controller][videoram_offset]); if (data != oldword) { - WRITE_WORD (&topvideoram[videoram_offset],data); - dirty_cell = (top_offs & (TOAPLAN2_TOP_VRAM_SIZE-3))/2; - tilemap_mark_tile_dirty(top_tilemap, (dirty_cell%64)/2, dirty_cell/64); + WRITE_WORD (&topvideoram[controller][videoram_offset],data); + dirty_cell = (top_offs[controller] & (TOAPLAN2_TOP_VRAM_SIZE-3))/2; + tilemap_mark_tile_dirty(top_tilemap[controller], (dirty_cell%64)/2, dirty_cell/64); } - top_offs+=2; - if (top_offs > TOAPLAN2_TOP_VRAM_SIZE) + top_offs[controller] += 2; + if (top_offs[controller] > TOAPLAN2_TOP_VRAM_SIZE) { if (errorlog) - fprintf(errorlog,"Writing %04x to out of range TOP Layer address (%08x) !!!\n",data,top_offs); + fprintf(errorlog,"Writing %04x to out of range TOP Layer address (%08x) Video controller %01x !!!\n",data,top_offs[controller],controller); } break; case 0x1800: - videoram_offset = sprite_offs & (TOAPLAN2_SPRITERAM_SIZE-1); - WRITE_WORD (&spriteram_new[videoram_offset],data); - sprite_offs+=2; - if (sprite_offs > TOAPLAN2_SPRITERAM_SIZE) + videoram_offset = sprite_offs[controller] & (TOAPLAN2_SPRITERAM_SIZE-1); + WRITE_WORD (&spriteram_new[controller][videoram_offset],data); + sprite_offs[controller] += 2; + if (sprite_offs[controller] > TOAPLAN2_SPRITERAM_SIZE) { if (errorlog) - fprintf(errorlog,"Writing %04x to out of range Sprite address (%08x) !!!\n",data,sprite_offs); + fprintf(errorlog,"Writing %04x to out of range Sprite address (%08x) Video controller %01x !!!\n",data,sprite_offs[controller],controller); } break; default: toaplan2_unk_vram = data; if (errorlog) - fprintf(errorlog,"Hmmm, writing %04x to unknown video layer (%08x)\n",toaplan2_unk_vram,toaplan2_voffs); + fprintf(errorlog,"Hmmm, writing %04x to unknown video layer (%08x) Video controller %01x \n",toaplan2_unk_vram,toaplan2_voffs[controller],controller); break; } } +void toaplan2_0_videoram_w(int offset, int data) +{ + toaplan2_videoram_w(offset, data, 0); +} +void toaplan2_1_videoram_w(int offset, int data) +{ + toaplan2_videoram_w(offset, data, 1); +} - -void toaplan2_scroll_reg_select_w(int offset, int data) +void toaplan2_scroll_reg_select_w(int offset, int data, int controller) { - toaplan2_scroll_reg = data; - if (toaplan2_scroll_reg & 0xffffff70) + toaplan2_scroll_reg[controller] = data; + if (toaplan2_scroll_reg[controller] & 0xffffff70) { - if (errorlog) fprintf(errorlog,"Hmmm, unknown video control register selected (%08x)\n",toaplan2_scroll_reg); + if (errorlog) fprintf(errorlog,"Hmmm, unknown video control register selected (%08x) Video controller %01x \n",toaplan2_scroll_reg[controller],controller); } } +void toaplan2_0_scroll_reg_select_w(int offset, int data) +{ + toaplan2_scroll_reg_select_w(offset, data, 0); +} +void toaplan2_1_scroll_reg_select_w(int offset, int data) +{ + toaplan2_scroll_reg_select_w(offset, data, 1); +} + -void toaplan2_scroll_reg_data_w(int offset, int data) +void toaplan2_scroll_reg_data_w(int offset, int data, int controller) { /************************************************************************/ /***** X and Y layer flips can be set independantly, so emulate it ******/ /************************************************************************/ - switch(toaplan2_scroll_reg) +// int vid_controllers = 1; + + switch(toaplan2_scroll_reg[controller]) { - case 0x00: bg_scrollx = data - 0x1d6; /* 1D6h */ - bg_flip &= (~TILEMAP_FLIPX); - tilemap_set_flip(bg_tilemap,bg_flip); - tilemap_set_scrollx(bg_tilemap,0,bg_scrollx); - break; - case 0x01: bg_scrolly = data - 0x1ef; /* 1EFh */ - bg_flip &= (~TILEMAP_FLIPY); - tilemap_set_flip(bg_tilemap,bg_flip); - tilemap_set_scrolly(bg_tilemap,0,bg_scrolly); + case 0x00: bg_scrollx[controller] = data - 0x1d6; /* 1D6h */ + bg_flip[controller] &= (~TILEMAP_FLIPX); + tilemap_set_flip(bg_tilemap[controller],bg_flip[controller]); + tilemap_set_scrollx(bg_tilemap[controller],0,bg_scrollx[controller]); break; - case 0x02: fg_scrollx = data - 0x1d8; /* 1D0h */ - fg_flip &= (~TILEMAP_FLIPX); - tilemap_set_flip(fg_tilemap,fg_flip); - tilemap_set_scrollx(fg_tilemap,0,fg_scrollx); + case 0x01: bg_scrolly[controller] = data - 0x1ef; /* 1EFh */ + bg_flip[controller] &= (~TILEMAP_FLIPY); + tilemap_set_flip(bg_tilemap[controller],bg_flip[controller]); + tilemap_set_scrolly(bg_tilemap[controller],0,bg_scrolly[controller]); break; - case 0x03: fg_scrolly = data - 0x1ef; /* 1EFh */ - fg_flip &= (~TILEMAP_FLIPY); - tilemap_set_flip(fg_tilemap,fg_flip); - tilemap_set_scrolly(fg_tilemap,0,fg_scrolly); + case 0x02: fg_scrollx[controller] = data - 0x1d8; /* 1D0h */ + fg_flip[controller] &= (~TILEMAP_FLIPX); + tilemap_set_flip(fg_tilemap[controller],fg_flip[controller]); + tilemap_set_scrollx(fg_tilemap[controller],0,fg_scrollx[controller]); break; - case 0x04: top_scrollx = data - 0x1da; /* 1DAh */ - top_flip &= (~TILEMAP_FLIPX); - tilemap_set_flip(top_tilemap,top_flip); - tilemap_set_scrollx(top_tilemap,0,top_scrollx); + case 0x03: fg_scrolly[controller] = data - 0x1ef; /* 1EFh */ + fg_flip[controller] &= (~TILEMAP_FLIPY); + tilemap_set_flip(fg_tilemap[controller],fg_flip[controller]); + tilemap_set_scrolly(fg_tilemap[controller],0,fg_scrolly[controller]); break; - case 0x05: top_scrolly = data - 0x1ef; /* 1EFh */ - top_flip &= (~TILEMAP_FLIPY); - tilemap_set_flip(top_tilemap,top_flip); - tilemap_set_scrolly(top_tilemap,0,top_scrolly); + case 0x04: top_scrollx[controller] = data - 0x1da; /* 1DAh */ + top_flip[controller] &= (~TILEMAP_FLIPX); + tilemap_set_flip(top_tilemap[controller],top_flip[controller]); + tilemap_set_scrollx(top_tilemap[controller],0,top_scrollx[controller]); break; - case 0x06: sprite_scrollx = data - 0x1cc; /* 1D4h */ - if (sprite_scrollx & 0x80000000) sprite_scrollx |= 0xfffffe00; - else sprite_scrollx &= 0x1ff; - sprite_flip &= (~TOAPLAN2_SPRITE_FLIPX); + case 0x05: top_scrolly[controller] = data - 0x1ef; /* 1EFh */ + top_flip[controller] &= (~TILEMAP_FLIPY); + tilemap_set_flip(top_tilemap[controller],top_flip[controller]); + tilemap_set_scrolly(top_tilemap[controller],0,top_scrolly[controller]); break; - case 0x07: sprite_scrolly = data - 0x1ef; /* 1F7h */ - if (sprite_scrolly & 0x80000000) sprite_scrolly |= 0xfffffe00; - else sprite_scrolly &= 0x1ff; - sprite_flip &= (~TOAPLAN2_SPRITE_FLIPY); + case 0x06: sprite_scrollx[controller] = data - 0x1cc; /* 1D4h */ + if (sprite_scrollx[controller] & 0x80000000) sprite_scrollx[controller] |= 0xfffffe00; + else sprite_scrollx[controller] &= 0x1ff; + sprite_flip[controller] &= (~TOAPLAN2_SPRITE_FLIPX); break; - case 0x80: bg_scrollx = data - 0x229; /* 169h */ - bg_flip |= TILEMAP_FLIPX; - tilemap_set_flip(bg_tilemap,bg_flip); - tilemap_set_scrollx(bg_tilemap,0,bg_scrollx); + case 0x07: sprite_scrolly[controller] = data - 0x1ef; /* 1F7h */ + if (sprite_scrolly[controller] & 0x80000000) sprite_scrolly[controller] |= 0xfffffe00; + else sprite_scrolly[controller] &= 0x1ff; + sprite_flip[controller] &= (~TOAPLAN2_SPRITE_FLIPY); break; - case 0x81: bg_scrolly = data - 0x210; /* 100h */ - bg_flip |= TILEMAP_FLIPY; - tilemap_set_flip(bg_tilemap,bg_flip); - tilemap_set_scrolly(bg_tilemap,0,bg_scrolly); + case 0x0f: break; + case 0x80: bg_scrollx[controller] = data - 0x229; /* 169h */ + bg_flip[controller] |= TILEMAP_FLIPX; + tilemap_set_flip(bg_tilemap[controller],bg_flip[controller]); + tilemap_set_scrollx(bg_tilemap[controller],0,bg_scrollx[controller]); break; - case 0x82: fg_scrollx = data - 0x227; /* 15Fh */ - fg_flip |= TILEMAP_FLIPX; - tilemap_set_flip(fg_tilemap,fg_flip); - tilemap_set_scrollx(fg_tilemap,0,fg_scrollx); + case 0x81: bg_scrolly[controller] = data - 0x210; /* 100h */ + bg_flip[controller] |= TILEMAP_FLIPY; + tilemap_set_flip(bg_tilemap[controller],bg_flip[controller]); + tilemap_set_scrolly(bg_tilemap[controller],0,bg_scrolly[controller]); break; - case 0x83: fg_scrolly = data - 0x210; /* 100h */ - fg_flip |= TILEMAP_FLIPY; - tilemap_set_flip(fg_tilemap,fg_flip); - tilemap_set_scrolly(fg_tilemap,0,fg_scrolly); + case 0x82: fg_scrollx[controller] = data - 0x227; /* 15Fh */ + fg_flip[controller] |= TILEMAP_FLIPX; + tilemap_set_flip(fg_tilemap[controller],fg_flip[controller]); + tilemap_set_scrollx(fg_tilemap[controller],0,fg_scrollx[controller]); break; - case 0x84: top_scrollx = data - 0x225; /* 165h */ - top_flip |= TILEMAP_FLIPX; - tilemap_set_flip(top_tilemap,top_flip); - tilemap_set_scrollx(top_tilemap,0,top_scrollx); + case 0x83: fg_scrolly[controller] = data - 0x210; /* 100h */ + fg_flip[controller] |= TILEMAP_FLIPY; + tilemap_set_flip(fg_tilemap[controller],fg_flip[controller]); + tilemap_set_scrolly(fg_tilemap[controller],0,fg_scrolly[controller]); break; - case 0x85: top_scrolly = data - 0x210; /* 100h */ - top_flip |= TILEMAP_FLIPY; - tilemap_set_flip(top_tilemap,top_flip); - tilemap_set_scrolly(top_tilemap,0,top_scrolly); + case 0x84: top_scrollx[controller] = data - 0x225; /* 165h */ + top_flip[controller] |= TILEMAP_FLIPX; + tilemap_set_flip(top_tilemap[controller],top_flip[controller]); + tilemap_set_scrollx(top_tilemap[controller],0,top_scrollx[controller]); break; - case 0x86: sprite_scrollx = data - 0x17b; /* 17Bh */ - if (sprite_scrollx & 0x80000000) sprite_scrollx |= 0xfffffe00; - else sprite_scrollx &= 0x1ff; - sprite_flip |= TOAPLAN2_SPRITE_FLIPX; + case 0x85: top_scrolly[controller] = data - 0x210; /* 100h */ + top_flip[controller] |= TILEMAP_FLIPY; + tilemap_set_flip(top_tilemap[controller],top_flip[controller]); + tilemap_set_scrolly(top_tilemap[controller],0,top_scrolly[controller]); break; - case 0x87: sprite_scrolly = data - 0x108; /* 108h */ - if (sprite_scrolly & 0x80000000) sprite_scrolly |= 0xfffffe00; - else sprite_scrolly &= 0x1ff; - sprite_flip |= TOAPLAN2_SPRITE_FLIPY; + case 0x86: sprite_scrollx[controller] = data - 0x17b; /* 17Bh */ + if (sprite_scrollx[controller] & 0x80000000) sprite_scrollx[controller] |= 0xfffffe00; + else sprite_scrollx[controller] &= 0x1ff; + sprite_flip[controller] |= TOAPLAN2_SPRITE_FLIPX; break; - - case 0x0f: /* shift sprite buffers */ - case 0x8f: memcpy(spriteram_now,spriteram_next,TOAPLAN2_SPRITERAM_SIZE); - memcpy(spriteram_next,spriteram_new,TOAPLAN2_SPRITERAM_SIZE); + case 0x87: sprite_scrolly[controller] = data - 0x108; /* 108h */ + if (sprite_scrolly[controller] & 0x80000000) sprite_scrolly[controller] |= 0xfffffe00; + else sprite_scrolly[controller] &= 0x1ff; + sprite_flip[controller] |= TOAPLAN2_SPRITE_FLIPY; break; + case 0x8f: break; case 0x0e: /******* Initialise video controller register ? *******/ if ((toaplan2_sub_cpu == CPU_2_Z80) && (data == 3)) @@ -610,113 +756,239 @@ void toaplan2_scroll_reg_data_w(int offset, int data) YM3812_sh_reset(); } default: if (errorlog) - fprintf(errorlog,"Hmmm, writing %08x to unknown video control register (%08x)\n",data ,toaplan2_scroll_reg); + fprintf(errorlog,"Hmmm, writing %08x to unknown video control register (%08x) Video controller %01x !!!\n",data ,toaplan2_scroll_reg[controller],controller); break; } #if TOAPLAN2_DEBUG + + if (spriteram_now[1] && spriteram_next[1] && spriteram_new[1] + && top_tilemap[1] && fg_tilemap[1] && bg_tilemap[1]) + { + vid_controllers = 2; + } + if ( keyboard_pressed(KEYCODE_L) ) { while (keyboard_pressed(KEYCODE_L)) ; - display_sp += 1; - display_sp &= 1; + display_sp[0] += 1; + display_sp[0] &= 1; } if ( keyboard_pressed(KEYCODE_K) ) { while (keyboard_pressed(KEYCODE_K)) ; - display_top += 1; - display_top &= 1; - tilemap_set_enable(top_tilemap, display_top); + display_top[0] += 1; + display_top[0] &= 1; + tilemap_set_enable(top_tilemap[0], display_top[0]); } if ( keyboard_pressed(KEYCODE_J) ) { while (keyboard_pressed(KEYCODE_J)) ; - display_fg += 1; - display_fg &= 1; - tilemap_set_enable(fg_tilemap, display_fg); + display_fg[0] += 1; + display_fg[0] &= 1; + tilemap_set_enable(fg_tilemap[0], display_fg[0]); } if ( keyboard_pressed(KEYCODE_H) ) { while (keyboard_pressed(KEYCODE_H)) ; - display_bg += 1; - display_bg &= 1; - tilemap_set_enable(bg_tilemap, display_bg); + display_bg[0] += 1; + display_bg[0] &= 1; + tilemap_set_enable(bg_tilemap[0], display_bg[0]); + } + if (vid_controllers == 2) + { + if ( keyboard_pressed(KEYCODE_O) ) + { + while (keyboard_pressed(KEYCODE_O)) ; + display_sp[1] += 1; + display_sp[1] &= 1; + } + if ( keyboard_pressed(KEYCODE_I) ) + { + while (keyboard_pressed(KEYCODE_I)) ; + display_top[1] += 1; + display_top[1] &= 1; + tilemap_set_enable(top_tilemap[1], display_top[1]); + } + if ( keyboard_pressed(KEYCODE_U) ) + { + while (keyboard_pressed(KEYCODE_U)) ; + display_fg[1] += 1; + display_fg[1] &= 1; + tilemap_set_enable(fg_tilemap[1], display_fg[1]); + } + if ( keyboard_pressed(KEYCODE_Y) ) + { + while (keyboard_pressed(KEYCODE_Y)) ; + display_bg[1] += 1; + display_bg[1] &= 1; + tilemap_set_enable(bg_tilemap[1], display_bg[1]); + } } #endif } +void toaplan2_0_scroll_reg_data_w(int offset, int data) +{ + toaplan2_scroll_reg_data_w(offset, data, 0); +} +void toaplan2_1_scroll_reg_data_w(int offset, int data) +{ + toaplan2_scroll_reg_data_w(offset, data, 1); +} #if TOAPLAN2_DEBUG void toaplan2_log_vram(void) { - int sprite_voffs, tile_voffs; + int sprite_voffs, tile_voffs, vid_controllers = 1; + + if (spriteram_now[1] && spriteram_next[1] && spriteram_new[1] + && top_tilemap[1] && fg_tilemap[1] && bg_tilemap[1]) + { + vid_controllers = 2; + } if ( keyboard_pressed(KEYCODE_M) ) { - UINT16 *source = (UINT16 *)(spriteram_now); - UINT16 *source1 = (UINT16 *)(spriteram_next); - UINT16 *source2 = (UINT16 *)(spriteram_new); + UINT16 *source_now0 = (UINT16 *)(spriteram_now[0]); + UINT16 *source_next0 = (UINT16 *)(spriteram_next[0]); + UINT16 *source_new0 = (UINT16 *)(spriteram_new[0]); + UINT16 *source_now1; + UINT16 *source_next1; + UINT16 *source_new1; + + int schar[3],sattr[3],sxpos[3],sypos[3]; + + if (vid_controllers == 2) + { + source_now1 = (UINT16 *)(spriteram_now[1]); + source_next1 = (UINT16 *)(spriteram_next[1]); + source_new1 = (UINT16 *)(spriteram_new[1]); + } while (keyboard_pressed(KEYCODE_M)) ; if (errorlog) fprintf (errorlog, "Scrolls BG-X BG-Y FG-X FG-Y TOP-X TOP-Y Sprite-X Sprite-Y\n"); - if (errorlog) fprintf (errorlog, "------> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx,bg_scrolly,fg_scrollx,fg_scrolly,top_scrollx,top_scrolly,sprite_scrollx, sprite_scrolly); + if (errorlog) fprintf (errorlog, "---0--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[0],bg_scrolly[0],fg_scrollx[0],fg_scrolly[0],top_scrollx[0],top_scrolly[0],sprite_scrollx[0], sprite_scrolly[0]); + if (vid_controllers == 2) + { + if (errorlog) fprintf (errorlog, "---1--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[1],bg_scrolly[1],fg_scrollx[1],fg_scrolly[1],top_scrollx[1],top_scrolly[1],sprite_scrollx[1], sprite_scrolly[1]); + } for ( sprite_voffs = 0; sprite_voffs < (TOAPLAN2_SPRITERAM_SIZE/2); sprite_voffs+=4 ) { - int tchar,tattr,txpos,typos; - tattr = source[sprite_voffs]; - tchar = source[sprite_voffs + 1]; - txpos = source[sprite_voffs + 2]; - typos = source[sprite_voffs + 3]; - if (errorlog) fprintf (errorlog, "Current SPoffs:%04x Attr=%04x Sprite=%04x Xpos=%04x Ypos=%04x\n", sprite_voffs, tattr, tchar, txpos, typos); - tattr = source1[sprite_voffs]; - tchar = source1[sprite_voffs + 1]; - txpos = source1[sprite_voffs + 2]; - typos = source1[sprite_voffs + 3]; - if (errorlog) fprintf (errorlog, "Next SPoffs:%04x Attr=%04x Sprite=%04x Xpos=%04x Ypos=%04x\n", sprite_voffs, tattr, tchar, txpos, typos); - tattr = source2[sprite_voffs]; - tchar = source2[sprite_voffs + 1]; - txpos = source2[sprite_voffs + 2]; - typos = source2[sprite_voffs + 3]; - if (errorlog) fprintf (errorlog, "New SPoffs:%04x Attr=%04x Sprite=%04x Xpos=%04x Ypos=%04x\n", sprite_voffs, tattr, tchar, txpos, typos); + sattr[0] = source_now0[sprite_voffs]; + schar[0] = source_now0[sprite_voffs + 1]; + sxpos[0] = source_now0[sprite_voffs + 2]; + sypos[0] = source_now0[sprite_voffs + 3]; + sattr[1] = source_next0[sprite_voffs]; + schar[1] = source_next0[sprite_voffs + 1]; + sxpos[1] = source_next0[sprite_voffs + 2]; + sypos[1] = source_next0[sprite_voffs + 3]; + sattr[2] = source_new0[sprite_voffs]; + schar[2] = source_new0[sprite_voffs + 1]; + sxpos[2] = source_new0[sprite_voffs + 2]; + sypos[2] = source_new0[sprite_voffs + 3]; + if (errorlog) fprintf (errorlog, "SPoffs Sprt Attr Xpos Ypos Sprt Attr Xpos Ypos Sprt Attr Xpos Ypos\n"); + if (errorlog) fprintf (errorlog, "0:%03x now:%04x %04x %04x %04x nxt:%04x %04x %04x %04x new:%04x %04x %04x %04x\n",sprite_voffs, + schar[0], sattr[0],sxpos[0], sypos[0], + schar[1], sattr[1],sxpos[1], sypos[1], + schar[2], sattr[2],sxpos[2], sypos[2]); + if (vid_controllers == 2) + { + sattr[0] = source_now1[sprite_voffs]; + schar[0] = source_now1[sprite_voffs + 1]; + sxpos[0] = source_now1[sprite_voffs + 2]; + sypos[0] = source_now1[sprite_voffs + 3]; + sattr[1] = source_next1[sprite_voffs]; + schar[1] = source_next1[sprite_voffs + 1]; + sxpos[1] = source_next1[sprite_voffs + 2]; + sypos[1] = source_next1[sprite_voffs + 3]; + sattr[2] = source_new1[sprite_voffs]; + schar[2] = source_new1[sprite_voffs + 1]; + sxpos[2] = source_new1[sprite_voffs + 2]; + sypos[2] = source_new1[sprite_voffs + 3]; + if (errorlog) fprintf (errorlog, "1:%03x now:%04x %04x %04x %04x nxt:%04x %04x %04x %04x new:%04x %04x %04x %04x\n",sprite_voffs, + schar[0], sattr[0],sxpos[0], sypos[0], + schar[1], sattr[1],sxpos[1], sypos[1], + schar[2], sattr[2],sxpos[2], sypos[2]); + } } } if ( keyboard_pressed(KEYCODE_N) ) { + int tchar[2], tattr[2]; while (keyboard_pressed(KEYCODE_N)) ; if (errorlog) fprintf (errorlog, "Scrolls BG-X BG-Y FG-X FG-Y TOP-X TOP-Y Sprite-X Sprite-Y\n"); - if (errorlog) fprintf (errorlog, "------> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx,bg_scrolly,fg_scrollx,fg_scrolly,top_scrollx,top_scrolly,sprite_scrollx, sprite_scrolly); + if (errorlog) fprintf (errorlog, "---0--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[0],bg_scrolly[0],fg_scrollx[0],fg_scrolly[0],top_scrollx[0],top_scrolly[0],sprite_scrollx[0], sprite_scrolly[0]); + if (vid_controllers == 2) + { + if (errorlog) fprintf (errorlog, "---1--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[1],bg_scrolly[1],fg_scrollx[1],fg_scrolly[1],top_scrollx[1],top_scrolly[1],sprite_scrollx[1], sprite_scrolly[1]); + } for ( tile_voffs = 0; tile_voffs < TOAPLAN2_TOP_VRAM_SIZE; tile_voffs+=4 ) { - int tattr,tchar; - tchar = READ_WORD (&topvideoram[tile_voffs + 2]); - tattr = READ_WORD (&topvideoram[tile_voffs]); - if (errorlog) fprintf (errorlog, "TXoffs:%08x Tile:%04x Attr:%04x\n", tile_voffs/2, tchar, tattr); + tchar[0] = READ_WORD (&topvideoram[0][tile_voffs + 2]); + tattr[0] = READ_WORD (&topvideoram[0][tile_voffs]); + if (vid_controllers == 2) + { + tchar[1] = READ_WORD (&topvideoram[1][tile_voffs + 2]); + tattr[1] = READ_WORD (&topvideoram[1][tile_voffs]); + if (errorlog) fprintf (errorlog, "TXoffs:%04x Tile0:%04x Attr0:%04x Tile1:%04x Attr1:%04x\n", tile_voffs/2, tchar[0], tattr[0], tchar[1], tattr[1]); + } + else + { + if (errorlog) fprintf (errorlog, "TXoffs:%04x Tile0:%04x Attr0:%04x\n", tile_voffs/2, tchar[0], tattr[0]); + } } } if ( keyboard_pressed(KEYCODE_B) ) { + int tchar[2], tattr[2]; while (keyboard_pressed(KEYCODE_B)) ; if (errorlog) fprintf (errorlog, "Scrolls BG-X BG-Y FG-X FG-Y TOP-X TOP-Y Sprite-X Sprite-Y\n"); - if (errorlog) fprintf (errorlog, "------> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx,bg_scrolly,fg_scrollx,fg_scrolly,top_scrollx,top_scrolly,sprite_scrollx, sprite_scrolly); + if (errorlog) fprintf (errorlog, "---0--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[0],bg_scrolly[0],fg_scrollx[0],fg_scrolly[0],top_scrollx[0],top_scrolly[0],sprite_scrollx[0], sprite_scrolly[0]); + if (vid_controllers == 2) + { + if (errorlog) fprintf (errorlog, "---1--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[1],bg_scrolly[1],fg_scrollx[1],fg_scrolly[1],top_scrollx[1],top_scrolly[1],sprite_scrollx[1], sprite_scrolly[1]); + } for ( tile_voffs = 0; tile_voffs < TOAPLAN2_FG_VRAM_SIZE; tile_voffs+=4 ) { - int tattr,tchar; - tchar = READ_WORD (&fgvideoram[tile_voffs + 2]); - tattr = READ_WORD (&fgvideoram[tile_voffs]); - if (errorlog) fprintf (errorlog, "FGoffs:%08x tile:%04x Attr:%04x\n", tile_voffs/2, tchar, tattr); + tchar[0] = READ_WORD (&fgvideoram[0][tile_voffs + 2]); + tattr[0] = READ_WORD (&fgvideoram[0][tile_voffs]); + if (vid_controllers == 2) + { + tchar[1] = READ_WORD (&fgvideoram[1][tile_voffs + 2]); + tattr[1] = READ_WORD (&fgvideoram[1][tile_voffs]); + if (errorlog) fprintf (errorlog, "FGoffs:%04x Tile0:%04x Attr0:%04x Tile1:%04x Attr1:%04x\n", tile_voffs/2, tchar[0], tattr[0], tchar[1], tattr[1]); + } + else + { + if (errorlog) fprintf (errorlog, "FGoffs:%04x Tile0:%04x Attr0:%04x\n", tile_voffs/2, tchar[0], tattr[0]); + } } } if ( keyboard_pressed(KEYCODE_V) ) { + int tchar[2], tattr[2]; while (keyboard_pressed(KEYCODE_V)) ; if (errorlog) fprintf (errorlog, "Scrolls BG-X BG-Y FG-X FG-Y TOP-X TOP-Y Sprite-X Sprite-Y\n"); - if (errorlog) fprintf (errorlog, "------> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx,bg_scrolly,fg_scrollx,fg_scrolly,top_scrollx,top_scrolly,sprite_scrollx, sprite_scrolly); + if (errorlog) fprintf (errorlog, "---0--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[0],bg_scrolly[0],fg_scrollx[0],fg_scrolly[0],top_scrollx[0],top_scrolly[0],sprite_scrollx[0], sprite_scrolly[0]); + if (vid_controllers == 2) + { + if (errorlog) fprintf (errorlog, "---1--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[1],bg_scrolly[1],fg_scrollx[1],fg_scrolly[1],top_scrollx[1],top_scrolly[1],sprite_scrollx[1], sprite_scrolly[1]); + } for ( tile_voffs = 0; tile_voffs < TOAPLAN2_BG_VRAM_SIZE; tile_voffs+=4 ) { - int tattr,tchar; - tchar = READ_WORD (&bgvideoram[tile_voffs + 2]); - tattr = READ_WORD (&bgvideoram[tile_voffs]); - if (errorlog) fprintf (errorlog, "BGoffs:%08x Tile:%04x Attr:%04x\n", tile_voffs/2, tchar, tattr); + tchar[0] = READ_WORD (&bgvideoram[0][tile_voffs + 2]); + tattr[0] = READ_WORD (&bgvideoram[0][tile_voffs]); + if (vid_controllers == 2) + { + tchar[1] = READ_WORD (&bgvideoram[1][tile_voffs + 2]); + tattr[1] = READ_WORD (&bgvideoram[1][tile_voffs]); + if (errorlog) fprintf (errorlog, "BGoffs:%04x Tile0:%04x Attr0:%04x Tile1:%04x Attr1:%04x\n", tile_voffs/2, tchar[0], tattr[0], tchar[1], tattr[1]); + } + else + { + if (errorlog) fprintf (errorlog, "BGoffs:%04x Tile0:%04x Attr0:%04x\n", tile_voffs/2, tchar[0], tattr[0]); + } } } @@ -734,7 +1006,11 @@ void toaplan2_log_vram(void) if (displog) { if (errorlog) fprintf (errorlog, "Scrolls BG-X BG-Y FG-X FG-Y TOP-X TOP-Y Sprite-X Sprite-Y\n"); - if (errorlog) fprintf (errorlog, "------> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx,bg_scrolly,fg_scrollx,fg_scrolly,top_scrollx,top_scrolly,sprite_scrollx, sprite_scrolly); + if (errorlog) fprintf (errorlog, "---0--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[0],bg_scrolly[0],fg_scrollx[0],fg_scrolly[0],top_scrollx[0],top_scrolly[0],sprite_scrollx[0], sprite_scrolly[0]); + if (vid_controllers == 2) + { + if (errorlog) fprintf (errorlog, "---1--> %04x %04x %04x %04x %04x %04x %04x %04x\n", bg_scrollx[1],bg_scrolly[1],fg_scrollx[1],fg_scrolly[1],top_scrollx[1],top_scrolly[1],sprite_scrollx[1], sprite_scrolly[1]); + } } } #endif @@ -743,15 +1019,15 @@ void toaplan2_log_vram(void) Sprite Handlers ***************************************************************************/ -static void mark_sprite_colors(void) +static void mark_sprite_colors(int controller) { int offs, attrib, sprite, color, i, pal_base; int sprite_sizex, sprite_sizey, temp_x, temp_y; int colmask[64]; - UINT16 *source = (UINT16 *)(spriteram_now); + UINT16 *source = (UINT16 *)(spriteram_now[controller]); - pal_base = Machine->drv->gfxdecodeinfo[1].color_codes_start; + pal_base = Machine->drv->gfxdecodeinfo[ ((controller*2)+1) ].color_codes_start; for(i=0; i < 64; i++) colmask[i] = 0; @@ -759,10 +1035,11 @@ static void mark_sprite_colors(void) { attrib = source[offs]; sprite = source[offs + 1] | ((attrib & 3) << 16); + sprite %= Machine->gfx[ ((controller*2)+1) ]->total_elements; if (attrib & 0x8000) { /* While we're here, mark all priorities used */ - sprite_priority[((attrib & 0x0f00) >> 8)] = display_sp; + sprite_priority[controller][((attrib & 0x0f00) >> 8)] = display_sp[controller]; color = (attrib >> 2) & 0x3f; sprite_sizex = (source[offs + 2] & 0x0f) + 1; @@ -772,7 +1049,7 @@ static void mark_sprite_colors(void) { for (temp_x = 0; temp_x < sprite_sizex; temp_x++) { - colmask[color] |= Machine->gfx[1]->pen_usage[sprite]; + colmask[color] |= Machine->gfx[ ((controller*2)+1) ]->pen_usage[sprite]; sprite++ ; } } @@ -793,12 +1070,12 @@ static void mark_sprite_colors(void) -static void draw_sprites( struct osd_bitmap *bitmap, int priority_to_display ) +static void draw_sprites( struct osd_bitmap *bitmap, int controller, int priority_to_display ) { - const struct GfxElement *gfx = Machine->gfx[1]; + const struct GfxElement *gfx = Machine->gfx[ ((controller*2)+1) ]; const struct rectangle *clip = &Machine->drv->visible_area; - UINT16 *source = (UINT16 *)(spriteram_now); + UINT16 *source = (UINT16 *)(spriteram_now[controller]); int offs; for (offs = 0; offs < (TOAPLAN2_SPRITERAM_SIZE/2); offs += 4) @@ -819,8 +1096,8 @@ static void draw_sprites( struct osd_bitmap *bitmap, int priority_to_display ) sprite_sizey = ((source[offs + 3] & 0x0f) + 1) * 8; /****** find position to display sprite ******/ - sx_base = (source[offs + 2] >> 7) - sprite_scrollx; - sy_base = (source[offs + 3] >> 7) - sprite_scrolly; + sx_base = (source[offs + 2] >> 7) - sprite_scrollx[controller]; + sy_base = (source[offs + 3] >> 7) - sprite_scrolly[controller]; flipx = attrib & TOAPLAN2_SPRITE_FLIPX; flipy = attrib & TOAPLAN2_SPRITE_FLIPY; @@ -847,17 +1124,17 @@ static void draw_sprites( struct osd_bitmap *bitmap, int priority_to_display ) } /****** flip the sprite layer in any active X or Y flip ******/ - if (sprite_flip) + if (sprite_flip[controller]) { - if (sprite_flip & TOAPLAN2_SPRITE_FLIPX) + if (sprite_flip[controller] & TOAPLAN2_SPRITE_FLIPX) sx_base = 320 - sx_base; - if (sprite_flip & TOAPLAN2_SPRITE_FLIPY) + if (sprite_flip[controller] & TOAPLAN2_SPRITE_FLIPY) sy_base = 240 - sy_base; } /****** cancel flip, if it and sprite layer flip are active ******/ - flipx = (flipx ^ (sprite_flip & TOAPLAN2_SPRITE_FLIPX)); - flipy = (flipy ^ (sprite_flip & TOAPLAN2_SPRITE_FLIPY)); + flipx = (flipx ^ (sprite_flip[controller] & TOAPLAN2_SPRITE_FLIPX)); + flipy = (flipy ^ (sprite_flip[controller] & TOAPLAN2_SPRITE_FLIPY)); for (temp_y = 0; temp_y < sprite_sizey; temp_y += 8) { @@ -884,18 +1161,49 @@ static void draw_sprites( struct osd_bitmap *bitmap, int priority_to_display ) /*************************************************************************** Draw the game screen in the given osd_bitmap. - Do NOT call osd_update_display() from this function, it will be called by - the main emulation engine. ***************************************************************************/ +void toaplan2_0_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + int priority; + + for (priority = 0; priority < 16; priority++) + sprite_priority[0][priority] = 0; /* Clear priorities used list */ + +#if TOAPLAN2_DEBUG + if (errorlog) toaplan2_log_vram(); +#endif + + tilemap_update(ALL_TILEMAPS); + + palette_init_used_colors(); + mark_sprite_colors(0); /* Also mark priorities used */ + + if (palette_recalc()) tilemap_mark_all_pixels_dirty(ALL_TILEMAPS); + + tilemap_render(ALL_TILEMAPS); + + fillbitmap(bitmap,palette_transparent_pen,&Machine->drv->visible_area); -void toaplan2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) + for (priority = 0; priority < 16; priority++) + { + tilemap_draw(bitmap,bg_tilemap[0],priority); + tilemap_draw(bitmap,fg_tilemap[0],priority); + tilemap_draw(bitmap,top_tilemap[0],priority); + if (sprite_priority[0][priority]) + draw_sprites(bitmap,0,priority); + } +} +void toaplan2_1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) { int priority; for (priority = 0; priority < 16; priority++) - sprite_priority[priority] = 0; /* Clear priorities used list */ + { + sprite_priority[0][priority] = 0; /* Clear priorities used list */ + sprite_priority[1][priority] = 0; /* Clear priorities used list */ + } #if TOAPLAN2_DEBUG if (errorlog) toaplan2_log_vram(); @@ -904,7 +1212,8 @@ void toaplan2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) tilemap_update(ALL_TILEMAPS); palette_init_used_colors(); - mark_sprite_colors(); /* Also mark priorities used */ + mark_sprite_colors(0); /* Also mark priorities used */ + mark_sprite_colors(1); /* Also mark priorities used */ if (palette_recalc()) tilemap_mark_all_pixels_dirty(ALL_TILEMAPS); @@ -914,11 +1223,78 @@ void toaplan2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) for (priority = 0; priority < 16; priority++) { - tilemap_draw(bitmap,bg_tilemap,priority); - tilemap_draw(bitmap,fg_tilemap,priority); - tilemap_draw(bitmap,top_tilemap,priority); - if (sprite_priority[priority]) - draw_sprites(bitmap,priority); + tilemap_draw(bitmap,bg_tilemap[1],priority); + tilemap_draw(bitmap,fg_tilemap[1],priority); + tilemap_draw(bitmap,top_tilemap[1],priority); + if (sprite_priority[1][priority]) + draw_sprites(bitmap,1,priority); + } + for (priority = 0; priority < 16; priority++) + { + tilemap_draw(bitmap,bg_tilemap[0],priority); + tilemap_draw(bitmap,fg_tilemap[0],priority); + tilemap_draw(bitmap,top_tilemap[0],priority); + if (sprite_priority[0][priority]) + draw_sprites(bitmap,0,priority); } } +void batsugun_1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) +{ + int priority; + + for (priority = 0; priority < 16; priority++) + { + sprite_priority[0][priority] = 0; /* Clear priorities used list */ + sprite_priority[1][priority] = 0; /* Clear priorities used list */ + } + +#if TOAPLAN2_DEBUG + if (errorlog) toaplan2_log_vram(); +#endif + + tilemap_update(ALL_TILEMAPS); + + palette_init_used_colors(); + mark_sprite_colors(0); /* Also mark priorities used */ + mark_sprite_colors(1); /* Also mark priorities used */ + + if (palette_recalc()) tilemap_mark_all_pixels_dirty(ALL_TILEMAPS); + + tilemap_render(ALL_TILEMAPS); + + fillbitmap(bitmap,palette_transparent_pen,&Machine->drv->visible_area); + + for (priority = 0; priority < 16; priority++) + { + tilemap_draw(bitmap,bg_tilemap[1],priority); + tilemap_draw(bitmap,bg_tilemap[0],priority); + tilemap_draw(bitmap,fg_tilemap[1],priority); + tilemap_draw(bitmap,top_tilemap[1],priority); + if (sprite_priority[1][priority]) + draw_sprites(bitmap,1,priority); + } + for (priority = 0; priority < 16; priority++) + { + tilemap_draw(bitmap,fg_tilemap[0],priority); + tilemap_draw(bitmap,top_tilemap[0],priority); + if (sprite_priority[0][priority]) + draw_sprites(bitmap,0,priority); + } +} + + +void toaplan2_0_eof_callback(void) +{ + /** Shift sprite RAM buffers *** Used to fix sprite lag **/ + memcpy(spriteram_now[0],spriteram_next[0],TOAPLAN2_SPRITERAM_SIZE); + memcpy(spriteram_next[0],spriteram_new[0],TOAPLAN2_SPRITERAM_SIZE); +} +void toaplan2_1_eof_callback(void) +{ + /** Shift sprite RAM buffers *** Used to fix sprite lag **/ + memcpy(spriteram_now[0],spriteram_next[0],TOAPLAN2_SPRITERAM_SIZE); + memcpy(spriteram_next[0],spriteram_new[0],TOAPLAN2_SPRITERAM_SIZE); + memcpy(spriteram_now[1],spriteram_next[1],TOAPLAN2_SPRITERAM_SIZE); + memcpy(spriteram_next[1],spriteram_new[1],TOAPLAN2_SPRITERAM_SIZE); +} diff --git a/src/vidhrdw/tumblep.c b/src/vidhrdw/tumblep.c index 67dcf865e..92518e8a8 100644 --- a/src/vidhrdw/tumblep.c +++ b/src/vidhrdw/tumblep.c @@ -1,6 +1,6 @@ /*************************************************************************** - Tumblepop Video emulation - Bryan McPhail, mish@tendril.force9.net + Tumblepop Video emulation - Bryan McPhail, mish@tendril.co.uk ********************************************************************* diff --git a/src/vidhrdw/vaportra.c b/src/vidhrdw/vaportra.c index 9b5b59f93..4effa0342 100644 --- a/src/vidhrdw/vaportra.c +++ b/src/vidhrdw/vaportra.c @@ -1,6 +1,6 @@ /*************************************************************************** - Vapour Trail Video emulation - Bryan McPhail, mish@tendril.force9.net + Vapour Trail Video emulation - Bryan McPhail, mish@tendril.co.uk **************************************************************************** diff --git a/src/vidhrdw/vector.c b/src/vidhrdw/vector.c index f7ee489a4..63906428d 100644 --- a/src/vidhrdw/vector.c +++ b/src/vidhrdw/vector.c @@ -55,7 +55,7 @@ static int vector_scale_x; /* scaling to screen */ static int vector_scale_y; /* scaling to screen */ static float gamma_correction = 1.2; -static float intensity_correction = 1.0; +static float intensity_correction = 1.5; /* The vectices are buffered here */ typedef struct diff --git a/src/vidhrdw/vindictr.c b/src/vidhrdw/vindictr.c index 1cc3b1755..8b1f81be5 100644 --- a/src/vidhrdw/vindictr.c +++ b/src/vidhrdw/vindictr.c @@ -59,15 +59,18 @@ #define YDIM (YCHARS*8) -#define DEBUG_VIDEO 0 - - /************************************* * * Statics * *************************************/ +struct mo_data +{ + struct osd_bitmap *bitmap; + UINT8 color_xor; +}; + static struct atarigen_pf_state pf_state; @@ -86,10 +89,6 @@ static void pf_render_callback(const struct rectangle *clip, const struct rectan static void mo_color_callback(const UINT16 *data, const struct rectangle *clip, void *param); static void mo_render_callback(const UINT16 *data, const struct rectangle *clip, void *param); -#if DEBUG_VIDEO -static int debug(void); -#endif - /************************************* @@ -252,10 +251,6 @@ void vindictr_scanline_update(int scanline) void vindictr_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) { -#if DEBUG_VIDEO - int xorval = debug(); -#endif - /* update the palette, and mark things dirty */ if (update_palette()) memset(atarigen_pf_dirty, 0xff, atarigen_playfieldram_size / 2); @@ -452,7 +447,9 @@ static void pf_render_callback(const struct rectangle *clip, const struct rectan static void pf_overrender_callback(const struct rectangle *clip, const struct rectangle *tiles, const struct atarigen_pf_state *state, void *param) { const struct GfxElement *gfx = Machine->gfx[0]; - struct osd_bitmap *bitmap = param; + const struct mo_data *modata = param; + struct osd_bitmap *bitmap = modata->bitmap; + int color_xor = modata->color_xor; int bank = state->param[0]; int x, y; @@ -466,13 +463,13 @@ static void pf_overrender_callback(const struct rectangle *clip, const struct re { int offs = x * 64 + y; int data = READ_WORD(&atarigen_playfieldram[offs * 2]); - int color = (16 + ((data >> 11) & 14)) ^ 1; + int color = 16 + ((data >> 11) & 14); int code = bank * 0x1000 + (data & 0xfff); int hflip = data & 0x8000; int sx = (8 * x - state->hscroll) & 0x1ff; if (sx >= XDIM) sx -= 0x200; - drawgfx(bitmap, gfx, code, color, hflip, 0, sx, sy, 0, TRANSPARENCY_THROUGH, palette_transparent_pen); + drawgfx(bitmap, gfx, code, color ^ color_xor, hflip, 0, sx, sy, 0, TRANSPARENCY_THROUGH, palette_transparent_pen); } } } @@ -574,110 +571,10 @@ static void mo_render_callback(const UINT16 *data, const struct rectangle *clip, /* overrender the playfield */ if (total_usage & 0x0002) - atarigen_pf_process(pf_overrender_callback, bitmap, &pf_clip); -} - - - -/************************************* - * - * Debugging - * - *************************************/ - -#if DEBUG_VIDEO - -static void mo_print(const UINT16 *data, const struct rectangle *clip, void *param) -{ - int code = data[0] & 0x7fff; - int hsize = ((data[2] >> 3) & 7) + 1; - int vsize = (data[2] & 7) + 1; - int xpos = -pf_state.hscroll + (data[1] >> 7); - int ypos = -pf_state.vscroll - (data[2] >> 7) - vsize * 8; - int color = data[1] & 15; - int hflip = data[2] & 0x0040; - - FILE *f = (FILE *)param; - fprintf(f, "P=%04X X=%03X Y=%03X SIZE=%Xx%X COL=%X FLIP=%X -- DATA=%04X %04X %04X %04X\n", - code, xpos, ypos, hsize, vsize, color, hflip >> 6, data[0], data[1], data[2], data[3]); -} - -static int debug(void) -{ - int hidebank = -1; - - if (keyboard_pressed(KEYCODE_Q)) hidebank = 0; - if (keyboard_pressed(KEYCODE_W)) hidebank = 1; - if (keyboard_pressed(KEYCODE_E)) hidebank = 2; - if (keyboard_pressed(KEYCODE_R)) hidebank = 3; - if (keyboard_pressed(KEYCODE_T)) hidebank = 4; - if (keyboard_pressed(KEYCODE_Y)) hidebank = 5; - if (keyboard_pressed(KEYCODE_U)) hidebank = 6; - if (keyboard_pressed(KEYCODE_I)) hidebank = 7; - - if (keyboard_pressed(KEYCODE_A)) hidebank = 8; - if (keyboard_pressed(KEYCODE_S)) hidebank = 9; - if (keyboard_pressed(KEYCODE_D)) hidebank = 10; - if (keyboard_pressed(KEYCODE_F)) hidebank = 11; - if (keyboard_pressed(KEYCODE_G)) hidebank = 12; - if (keyboard_pressed(KEYCODE_H)) hidebank = 13; - if (keyboard_pressed(KEYCODE_J)) hidebank = 14; - if (keyboard_pressed(KEYCODE_K)) hidebank = 15; - - if (keyboard_pressed(KEYCODE_9)) { - static int count; - char name[50]; - FILE *f; - int i; - - while (keyboard_pressed(KEYCODE_9)) { } - - sprintf(name, "Dump %d", ++count); - f = fopen(name, "wt"); - - fprintf(f, "\n\nPalette RAM:\n"); - - for (i = 0x000; i < 0x800; i++) - { - fprintf(f, "%04X ", READ_WORD(&paletteram[i*2])); - if ((i & 15) == 15) fprintf(f, "\n"); - if ((i & 255) == 255) fprintf(f, "\n"); - } - - fprintf(f, "\n\nMotion Objects (drawn)\n"); - atarigen_mo_process(mo_print, f); - - fprintf(f, "\n\nMotion Objects\n"); - for (i = 0; i < 0x400; i++) - { - fprintf(f, " Object %02X: P=%04X Y=%04X L=%04X X=%04X\n", - i, - READ_WORD(&atarigen_spriteram[i*8+0]), - READ_WORD(&atarigen_spriteram[i*8+2]), - READ_WORD(&atarigen_spriteram[i*8+4]), - READ_WORD(&atarigen_spriteram[i*8+6]) - ); - } - - fprintf(f, "\n\nPlayfield dump\n"); - for (i = 0; i < atarigen_playfieldram_size / 2; i++) - { - fprintf(f, "%04X ", READ_WORD(&atarigen_playfieldram[i*2])); - if ((i & 63) == 63) fprintf(f, "\n"); - } - - fprintf(f, "\n\nAlpha dump\n"); - for (i = 0; i < atarigen_alpharam_size / 2; i++) - { - fprintf(f, "%04X ", READ_WORD(&atarigen_alpharam[i*2])); - if ((i & 63) == 63) fprintf(f, "\n"); - } - - fclose(f); + struct mo_data modata; + modata.bitmap = bitmap; + modata.color_xor = (color == 0) ? 0 : 1; + atarigen_pf_process(pf_overrender_callback, &modata, &pf_clip); } - - return hidebank; } - -#endif diff --git a/src/vidhrdw/z80bw.c b/src/vidhrdw/z80bw.c deleted file mode 100644 index 4bbd7d8d5..000000000 --- a/src/vidhrdw/z80bw.c +++ /dev/null @@ -1,175 +0,0 @@ -/*************************************************************************** - - z80bw.c - - Functions to emulate the video hardware of the machine. - -modified 02-06-98 HJB copied from 8080bw.c and changed to plot_8_pixel - -***************************************************************************/ - -#include "driver.h" -#include "vidhrdw/generic.h" - - -static int flipscreen; -static int screen_flipped; -static int screen_red; -static int palette_modified; - - -void z80bw_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom) -{ - screen_red = 0; - palette_modified = 1; -} - - -static void set_palette(void) -{ - int i; - - - for (i = 0;i < Machine->drv->total_colors;i++) - { - int r,g,b; - - if (screen_red) - { - r = 0xff; - g = 0x00; - b = 0x00; - } - else - { - r = ((i & 4) >> 2) * 0xff; - g = ((i & 2) >> 1) * 0xff; - b = ((i & 1) >> 0) * 0xff; - } - - palette_change_color(i,r,g,b); - } -} - - -void z80bw_flipscreen_w(int data) -{ - flipscreen = (readinputport(0) & 0x01) ? data : 0; - screen_flipped = 1; -} - - -void z80bw_screen_red_w(int data) -{ - screen_red = data; - palette_modified = 1; -} - - -static void z80bw_plot_pixel(int x, int y, int col) -{ - if (flipscreen) - { - x = 255-x; - y = 223-y; - } - - plot_pixel(Machine->scrbitmap,x,y,Machine->pens[col]); -} - - -void astinvad_videoram_w (int offset,int data) -{ - int i; - UINT8 x,y; - - videoram[offset] = data; - - y = offset / 32; - x = 8 * (offset % 32); - - for (i = 0; i < 8; i++) - { - int col = 0; - - if (data & 0x01) - { - if (flipscreen) - col = memory_region(REGION_PROMS)[((y+32)/8)*32+(x/8)] >> 4; - else - col = memory_region(REGION_PROMS)[(31-y/8)*32+(31-x/8)] & 0x0f; - } - - z80bw_plot_pixel(x, y, col); - - x++; - data >>= 1; - } -} - -void spaceint_videoram_w (int offset,int data) /* LT 23-12-1998 */ /*--WIP--*/ -{ - int i; - UINT8 x,y; - videoram[offset] = data; - - y = 8 * (offset / 256); - x = offset % 256; - - for (i = 0; i < 8; i++) - { - int col = 0; - - if (data & 0x01) - { - /* this is wrong */ - col = memory_region(REGION_PROMS)[(y/16)+16*((x+16)/32)]; - } - - z80bw_plot_pixel(x, y, col); - - y++; - data >>= 1; - } -} - -/*************************************************************************** - - Draw the game screen in the given osd_bitmap. - Do NOT call osd_update_display() from this function, it will be called by - the main emulation engine. - -***************************************************************************/ -static void common_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh, - void (*videoram_w_proc)(int, int)) -{ - if (palette_modified) - { - set_palette(); - palette_modified = 0; - } - - if (palette_recalc() || full_refresh || screen_flipped) - { - int offs; - - /* redraw bitmap */ - - for (offs = 0; offs < videoram_size; offs++) - { - videoram_w_proc(offs, videoram[offs]); - } - - screen_flipped = 0; - } -} - -void astinvad_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) -{ - common_vh_screenrefresh(bitmap, full_refresh, astinvad_videoram_w); -} - -void spaceint_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh) -{ - common_vh_screenrefresh(bitmap, full_refresh, spaceint_videoram_w); -} diff --git a/sta/dir.txt b/sta/dir.txt deleted file mode 100644 index e21635456..000000000 --- a/sta/dir.txt +++ /dev/null @@ -1 +0,0 @@ -States will be stored here (not USED in MESS). \ No newline at end of file diff --git a/whatsnew.txt b/whatsnew.txt index 3f91e41a7..a7ddb986a 100644 --- a/whatsnew.txt +++ b/whatsnew.txt @@ -1,3 +1,91 @@ +0.36 RELEASE CANDIDATE 2 + + +New games supported: +-------------------- + +Got-Ya [Zsolt Vasvari] +Desert Gun [Zsolt Vasvari] +Shuffleboard [Zsolt Vasvari] +Beraboh Man [Keith Wilkins, Vernon C. Brooks] +World Stadium [Vernon C. Brooks] +World Stadium '89 [Vernon C. Brooks] +Puzzle Club [Vernon C. Brooks] +Kyukai Douchuuki [Vernon C. Brooks] +Lasso [Phil Stroffolino] +Ghox [Quench] +V-Five [Brian A. Troha] +Dogyuun [Quench] +Batsugun [Quench] + + +New clones supported: +--------------------- + +Cobra Command (World) +Hyper Sports Special (= 88 Games) +Cosmic Alien (set 2) +Kangaroo (Sun) +Act-Fancer (World revision 2) +Shoot Out (Japan and Korean bootleg) +Asteroids (bootleg) +Rompers (old) +Crime Fighters (2 players) +Bosconian (new version) + + +These drivers have improved GRAPHICS: +------------------------------------- + +- Correct colors in Space Invaders Part II, Lunar Rescue and Balloon Bomber, + colors should also be close in Space Chaser (minus the "green lane" effect) + and Rolling Crash/Moon Base. [Zsolt Vasvari] + + +These drivers have new or improved SOUND: +----------------------------------------- + +- Rewritten sound emulation in Phoenix, samples are no longer used. [Juergen + Buchmueller] + +- Fixed volume control in the MCR games. [Aaron Giles] + + +Other drivers changes: +---------------------- + +- Emulated the protection in Combat School. [Nicola Salmoria] + +- Fixed Vindicators 1&2 colors. [Aaron Giles] + +- Won the first grand prix of the season. [Micheal Schumacher] + + +Changes to the main program: +---------------------------- + +- [DOS] Modified the SEAL audio library so it outputs real 16-bit samples + instead of truncating the least significant 8 bits. [Jarek Burczynski] + +- [DOS] There are now two options for Hot Rod key mapping, -hotrod and + -hotrodse. The latter remaps NeoGeo games to use the lower row of buttons. + + +Source: +------- + +- There's a new game flag GAME_NO_COCKTAIL to mark drivers that don't support + screen flip, please use it because gamelist.txt is now generated + automatically and this is the only way to know whether a driver supports + it or not. + +- TMS36XX emulation (Phoenix, Pleiads, Naughty Boy, Pop Flamer, Monster + Bash). [Juergen Buchmueller] + + +========================================================================== + + 0.36 RELEASE CANDIDATE 1 A few drivers which didn't strictly fit MAME's purpose have been removed. @@ -76,8 +164,6 @@ These drivers have improved GRAPHICS: These drivers have new or improved SOUND: ----------------------------------------- -- New samples in Asteroids/Asteroids Deluxe. [Jarek Parchanski] - - Samples are no longer needed in Stratovox, Battle Zone, Red Baron, Asteroids. [Juergen Buchmueller]