📄 btime.c
字号:
0, \
GAMENAME##_vh_start, \
GAMENAME##_vh_stop, \
GAMENAME##_vh_screenrefresh, \
\
/* sound hardware */ \
0,0,0,0, \
{ \
{ \
SOUND_AY8910, \
&ay8910_interface \
} \
} \
}
MACHINE_DRIVER(btime, 1500000, btime_irq_interrupt, nmi_interrupt, btime_gfxdecodeinfo, 16);
MACHINE_DRIVER(cookrace, 1500000, btime_nmi_interrupt, nmi_interrupt, cookrace_gfxdecodeinfo, 16);
EGGS_MACHINE_DRIVER(eggs, 1500000, interrupt, nmi_interrupt, lnc_gfxdecodeinfo, 8);
MACHINE_DRIVER(lnc, 1500000, btime_nmi_interrupt, lnc_sound_interrupt, lnc_gfxdecodeinfo, 8);
MACHINE_DRIVER(bnj, 750000, btime_nmi_interrupt, nmi_interrupt, bnj_gfxdecodeinfo, 16);
MACHINE_DRIVER(zoar, 1500000, zoar_irq_interrupt, nmi_interrupt, zoar_gfxdecodeinfo, 64);
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( btime_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "ab05a1.12b", 0xb000, 0x1000, 0x0a98b230 )
ROM_LOAD( "ab04.9b", 0xc000, 0x1000, 0x797e5f75 )
ROM_LOAD( "ab06.13b", 0xd000, 0x1000, 0xc77f3f64 )
ROM_LOAD( "ab05.10b", 0xe000, 0x1000, 0xb0d3640f )
ROM_LOAD( "ab07.15b", 0xf000, 0x1000, 0xa142f862 )
ROM_REGION_DISPOSE(0x7800) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "ab8.13k", 0x0000, 0x1000, 0x70b35bbe ) /* charset #1 */
ROM_LOAD( "ab9.15k", 0x1000, 0x1000, 0x8dec15e6 )
ROM_LOAD( "ab10.10k", 0x2000, 0x1000, 0x854a872a )
ROM_LOAD( "ab11.12k", 0x3000, 0x1000, 0xd4848014 )
ROM_LOAD( "ab12.7k", 0x4000, 0x1000, 0x6c79f79f )
ROM_LOAD( "ab13.9k", 0x5000, 0x1000, 0xac01042f )
ROM_LOAD( "ab02.4b", 0x6000, 0x0800, 0xb8ef56c3 ) /* charset #2 */
ROM_LOAD( "ab01.3b", 0x6800, 0x0800, 0x25b49078 )
ROM_LOAD( "ab00.1b", 0x7000, 0x0800, 0xc7a14485 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "ab14.12h", 0xf000, 0x1000, 0xf55e5211 )
ROM_REGION(0x0800) /* background graphics */
ROM_LOAD( "ab03.6b", 0x0000, 0x0800, 0xd26bc1f3 )
ROM_END
ROM_START( btimea_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "aa04.9b", 0xc000, 0x1000, 0xa041e25b )
ROM_LOAD( "aa06.13b", 0xd000, 0x1000, 0xb4ba400d )
ROM_LOAD( "aa05.10b", 0xe000, 0x1000, 0x8005bffa )
ROM_LOAD( "aa07.15b", 0xf000, 0x1000, 0x086440ad )
ROM_REGION_DISPOSE(0x7800) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "aa8.13k", 0x0000, 0x1000, 0x8650c788 ) /* charset #1 */
ROM_LOAD( "ab9.15k", 0x1000, 0x1000, 0x8dec15e6 )
ROM_LOAD( "ab10.10k", 0x2000, 0x1000, 0x854a872a )
ROM_LOAD( "ab11.12k", 0x3000, 0x1000, 0xd4848014 )
ROM_LOAD( "aa12.7k", 0x4000, 0x1000, 0xc4617243 )
ROM_LOAD( "ab13.9k", 0x5000, 0x1000, 0xac01042f )
ROM_LOAD( "ab02.4b", 0x6000, 0x0800, 0xb8ef56c3 ) /* charset #2 */
ROM_LOAD( "ab01.3b", 0x6800, 0x0800, 0x25b49078 )
ROM_LOAD( "ab00.1b", 0x7000, 0x0800, 0xc7a14485 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "ab14.12h", 0xf000, 0x1000, 0xf55e5211 )
ROM_REGION(0x0800) /* background graphics */
ROM_LOAD( "ab03.6b", 0x0000, 0x0800, 0xd26bc1f3 )
ROM_END
ROM_START( cookrace_rom )
ROM_REGION(0x10000) /* 64k for code */
/* code is in the range 0500-3fff, encrypted */
ROM_LOAD( "inc.1", 0x0000, 0x2000, 0x68759d32 )
ROM_LOAD( "inc.2", 0x2000, 0x2000, 0xbe7d72d1 )
ROM_REGION_DISPOSE(0x7800) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "inc.9", 0x0000, 0x2000, 0xd0d94477 ) /* charset #1 */
ROM_LOAD( "inc.8", 0x2000, 0x2000, 0x1104f497 )
ROM_LOAD( "inc.7", 0x4000, 0x2000, 0xa1a0d5a6 )
ROM_LOAD( "inc.5", 0x6000, 0x0800, 0x611c686f ) /* garbage?? */
ROM_CONTINUE( 0x6000, 0x0800 ) /* charset #2 */
ROM_LOAD( "inc.4", 0x6800, 0x0800, 0x7742e771 ) /* garbage?? */
ROM_CONTINUE( 0x6800, 0x0800 )
ROM_LOAD( "inc.3", 0x7000, 0x0800, 0x28609a75 ) /* garbage?? */
ROM_CONTINUE( 0x7000, 0x0800 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "inc.6", 0x0000, 0x1000, 0x6b8e0272 ) /* starts at 0000, not f000; 0000-01ff is RAM */
ROM_RELOAD( 0xf000, 0x1000 ) /* for the reset/interrupt vectors */
ROM_REGION(0x0020)
ROM_LOAD( "hamburge.clr", 0x0000, 0x0020, 0xc2348c1d )
ROM_END
static void cookrace_decode(void)
{
int A;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
for (A = 0;A < 0x4000;A++)
ROM[A] = (RAM[A] & 0x9f) | ((RAM[A] & 0x20) << 1) | ((RAM[A] & 0x40) >> 1);
/* fill in the reset/interrupt vectors */
ROM[0xfff9] = 0x40;
RAM[0xfffa] = 0x00;
RAM[0xfffb] = 0x05;
RAM[0xfffc] = 0x03;
RAM[0xfffd] = 0x05;
RAM[0xfffe] = 0xF9;
RAM[0xffff] = 0xFF;
}
ROM_START( eggs_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "e14.bin", 0x3000, 0x1000, 0x4e216f9d )
ROM_LOAD( "d14.bin", 0x4000, 0x1000, 0x4edb267f )
ROM_LOAD( "c14.bin", 0x5000, 0x1000, 0x15a5c48c )
ROM_LOAD( "b14.bin", 0x6000, 0x1000, 0x5c11c00e )
ROM_LOAD( "a14.bin", 0x7000, 0x1000, 0x953faf07 )
ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
ROM_REGION_DISPOSE(0x6000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "g12.bin", 0x0000, 0x1000, 0x679f8af7 )
ROM_LOAD( "g10.bin", 0x1000, 0x1000, 0x5b58d3b5 )
ROM_LOAD( "h12.bin", 0x2000, 0x1000, 0x9562836d )
ROM_LOAD( "h10.bin", 0x3000, 0x1000, 0x3cfb3a8e )
ROM_LOAD( "j12.bin", 0x4000, 0x1000, 0xce4a2e46 )
ROM_LOAD( "j10.bin", 0x5000, 0x1000, 0xa1bcaffc )
ROM_REGION(0x0020) /* color PROM */
ROM_LOAD( "screggco.c6", 0x0000, 0x0020, 0xff23bdd6 )
ROM_END
ROM_START( scregg_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "scregg.e14", 0x3000, 0x1000, 0x29226d77 )
ROM_LOAD( "scregg.d14", 0x4000, 0x1000, 0xeb143880 )
ROM_LOAD( "scregg.c14", 0x5000, 0x1000, 0x4455f262 )
ROM_LOAD( "scregg.b14", 0x6000, 0x1000, 0x044ac5d2 )
ROM_LOAD( "scregg.a14", 0x7000, 0x1000, 0xb5a0814a )
ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
ROM_REGION_DISPOSE(0x6000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "scregg.g12", 0x0000, 0x1000, 0xff3c2894 )
ROM_LOAD( "scregg.g10", 0x1000, 0x1000, 0x9c20214a )
ROM_LOAD( "scregg.h12", 0x2000, 0x1000, 0x8454f4b2 )
ROM_LOAD( "scregg.h10", 0x3000, 0x1000, 0x72bd89ee )
ROM_LOAD( "scregg.j12", 0x4000, 0x1000, 0xa485c10c )
ROM_LOAD( "scregg.j10", 0x5000, 0x1000, 0x1fd4e539 )
ROM_REGION(0x0020) /* color PROM */
ROM_LOAD( "screggco.c6", 0x0000, 0x0020, 0xff23bdd6 )
ROM_END
/* There is a flyer with a screen shot for Lock'n'Chase at:
http://www.gamearchive.com/flyers/video/taito/locknchase_f.jpg */
ROM_START( lnc_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "s3-3d", 0xc000, 0x1000, 0x1ab4f2c2 )
ROM_LOAD( "s2-3c", 0xd000, 0x1000, 0x5e46b789 )
ROM_LOAD( "s1-3b", 0xe000, 0x1000, 0x1308a32e )
ROM_LOAD( "s0-3a", 0xf000, 0x1000, 0xbeb4b1fc )
ROM_REGION_DISPOSE(0x6000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "s8-15l", 0x0000, 0x1000, 0x672a92d0 )
ROM_LOAD( "s9-15m", 0x1000, 0x1000, 0x87c8ee9a )
ROM_LOAD( "s6-13l", 0x2000, 0x1000, 0xd21e2a57 )
ROM_LOAD( "s7-13m", 0x3000, 0x1000, 0xc4f247cd )
ROM_LOAD( "s4-11l", 0x4000, 0x1000, 0xa2162a9e )
ROM_LOAD( "s5-11m", 0x5000, 0x1000, 0x12f1c2db )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "sa-1h", 0xf000, 0x1000, 0x379387ec )
ROM_REGION(0x0040) /* PROMs */
ROM_LOAD( "sc-5m", 0x0000, 0x0020, 0x2a976ebe ) /* palette */
ROM_LOAD( "sb-4c", 0x0020, 0x0020, 0xa29b4204 ) /* RAS/CAS logic - not used */
ROM_END
ROM_START( bnj_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "bnj12b.bin", 0xa000, 0x2000, 0xba3e3801 )
ROM_LOAD( "bnj12c.bin", 0xc000, 0x2000, 0xfb3a2cdd )
ROM_LOAD( "bnj12d.bin", 0xe000, 0x2000, 0xb88bc99e )
ROM_REGION_DISPOSE(0x8000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "bnj4h.bin", 0x0000, 0x2000, 0x5824e6fb )
ROM_LOAD( "bnj4f.bin", 0x2000, 0x2000, 0x6c31d77a )
ROM_LOAD( "bnj4e.bin", 0x4000, 0x2000, 0xb864d082 )
ROM_LOAD( "bnj10e.bin", 0x6000, 0x1000, 0xf4e9eb49 )
ROM_LOAD( "bnj10f.bin", 0x7000, 0x1000, 0xa9ffacb4 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "bnj6c.bin", 0xf000, 0x1000, 0x8c02f662 )
ROM_END
ROM_START( brubber_rom )
ROM_REGION(0x10000) /* 64k for code */
/* a000-bfff space for the service ROM */
ROM_LOAD( "brubber.12c", 0xc000, 0x2000, 0xb5279c70 )
ROM_LOAD( "brubber.12d", 0xe000, 0x2000, 0xb2ce51f5 )
ROM_REGION_DISPOSE(0x8000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "bnj4h.bin", 0x0000, 0x2000, 0x5824e6fb )
ROM_LOAD( "bnj4f.bin", 0x2000, 0x2000, 0x6c31d77a )
ROM_LOAD( "bnj4e.bin", 0x4000, 0x2000, 0xb864d082 )
ROM_LOAD( "bnj10e.bin", 0x6000, 0x1000, 0xf4e9eb49 )
ROM_LOAD( "bnj10f.bin", 0x7000, 0x1000, 0xa9ffacb4 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "bnj6c.bin", 0xf000, 0x1000, 0x8c02f662 )
ROM_END
ROM_START( caractn_rom )
ROM_REGION(0x10000) /* 64k for code */
/* a000-bfff space for the service ROM */
ROM_LOAD( "brubber.12c", 0xc000, 0x2000, 0xb5279c70 )
ROM_LOAD( "caractn.a6", 0xe000, 0x2000, 0x1d6957c4 )
ROM_REGION_DISPOSE(0x8000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "caractn.a2", 0x0000, 0x2000, 0x51dcc111 )
ROM_LOAD( "caractn.a1", 0x2000, 0x2000, 0x9789f639 )
ROM_LOAD( "caractn.a0", 0x4000, 0x2000, 0xbf3ea732 )
ROM_LOAD( "bnj10e.bin", 0x6000, 0x1000, 0xf4e9eb49 )
ROM_LOAD( "bnj10f.bin", 0x7000, 0x1000, 0xa9ffacb4 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "bnj6c.bin", 0xf000, 0x1000, 0x8c02f662 )
ROM_END
ROM_START( zoar_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "zoar15", 0xd000, 0x1000, 0x1f0cfdb7 )
ROM_LOAD( "zoar16", 0xe000, 0x1000, 0x7685999c )
ROM_LOAD( "zoar17", 0xf000, 0x1000, 0x619ea867 )
ROM_REGION_DISPOSE(0xa800) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "zoar06", 0x0000, 0x1000, 0x07638c71 )
ROM_LOAD( "zoar07", 0x1000, 0x1000, 0xf4710f25 )
ROM_LOAD( "zoar03", 0x2000, 0x1000, 0x77b7df14 )
ROM_LOAD( "zoar04", 0x3000, 0x1000, 0x9be786de )
ROM_LOAD( "zoar00", 0x4000, 0x1000, 0xfd2dcb64 )
ROM_LOAD( "zoar01", 0x5000, 0x1000, 0x74d3ca48 )
ROM_LOAD( "zoar12", 0x6000, 0x0800, 0xed317e40 )
ROM_LOAD( "zoar11", 0x6800, 0x0800, 0xdcdad357 )
ROM_LOAD( "zoar10", 0x7000, 0x0800, 0xaa8bcab8 )
ROM_LOAD( "zoar08", 0x7800, 0x1000, 0x9a148551 )
ROM_LOAD( "zoar05", 0x8800, 0x1000, 0x05dc6b09 )
ROM_LOAD( "zoar02", 0x9800, 0x1000, 0xd8c3c122 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "zoar09", 0xf000, 0x1000, 0x18d96ff1 )
ROM_REGION(0x1000) /* background graphics */
ROM_LOAD( "zoar13", 0x0000, 0x1000, 0x8fefa960 )
ROM_REGION(0x40)
ROM_LOAD( "z20-1l", 0x0000, 0x0020, 0xa63f0a07 )
ROM_LOAD( "z21-1l", 0x0020, 0x0020, 0x5e1e5788 )
ROM_END
static void btime_decode(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
/* For now, just copy the RAM array over to ROM. Decryption will happen */
/* at run time, since the CPU applies the decryption only if the previous */
/* instruction did a memory write. */
memcpy(ROM,RAM,0x10000);
}
static void zoar_decode(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
memset(&RAM[0xd50a],0xea,8);
/* For now, just copy the RAM array over to ROM. Decryption will happen */
/* at run time, since the CPU applies the decryption only if the previous */
/* instruction did a memory write. */
memcpy(ROM,RAM,0x10000);
}
static void lnc_decode (void)
{
static int encrypttable[] = { 0x00, 0x10, 0x40, 0x50, 0x20, 0x30, 0x60, 0x70,
0x80, 0x90, 0xc0, 0xd0, 0xa0, 0xb0, 0xe0, 0xf0};
int A;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
for (A = 0;A < 0x10000;A++)
{
/*
* The encryption is dead simple. Just swap bits 5 & 6 for opcodes
* only.
*/
ROM[A] = (RAM[A] & 0x0f) | encrypttable[RAM[A] >> 4];
}
}
static int btime_hiload(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
/* check if the hi score table has already been initialized */
if (memcmp(&RAM[0x0036],"\x00\x80\x02",3) == 0 &&
memcmp(&RAM[0x0042],"\x50\x48\00",3) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x0036],6*6);
RAM[0x0033] = RAM[0x0036];
RAM[0x0034] = RAM[0x0037];
RAM[0x0035] = RAM[0x0038];
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void btime_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
osd_fwrite(f,&RAM[0x0036],6*6);
osd_fclose(f);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -