📄 srumbler.c
字号:
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]=
{
{0x08000,0x09000,0x3c000,0x3d000,0x3e000,0x3f000,0x0b000,0x0e000,0x0f000},
{0x08000,0x09000,0x30000,0x31000,0x32000,0x33000,0x0b000,0x0e000,0x0f000},
{0x08000,0x09000,0x34000,0x35000,0x36000,0x37000,0x0b000,0x0e000,0x0f000},
{0x08000,0x09000,0x38000,0x39000,0x3a000,0x3b000,0x0b000,0x0e000,0x0f000},
{0x08000,0x09000,0x3c000,0x3d000,0x0a000,0x16000,0x0b000,0x0e000,0x0f000},
{0x00000,0x01000,0x02000,0x03000,0x04000,0x05000,0x06000,0x07000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x10000,0x11000,0x06000,0x07000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x12000,0x13000,0x14000,0x15000,0x17000},
{0x18000,0x19000,0x1a000,0x1b000,0x1c000,0x1d000,0x1e000,0x1f000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x20000,0x21000,0x22000,0x23000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x24000,0x25000,0x26000,0x27000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x28000,0x29000,0x2a000,0x2b000,0x17000},
{0x00000,0x01000,0x02000,0x03000,0x2c000,0x2d000,0x2e000,0x2f000,0x17000},
/* Empty pages, kept to simplify the paging formula in the machine driver */
{0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff},
{0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff},
{0xfffff,0xfffff,0xfffff,0xfffff,0xfffff, 0xfffff, 0xfffff, 0xfffff, 0xfffff}
};
static void srumbler_init_machine(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 = Machine->memory_region[Machine->drv->cpu[0].memory_region];
unsigned char *pROM = Machine->memory_region[3];
/* Set optimization flags for M6809 */
m6809_Flags = M6809_FAST_NONE;
/* 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);
}
}
}
}
static struct YM2203interface ym2203_interface =
{
2, /* 2 chips */
2000000, /* 2.0 MHz (? hand tuned to match the real board) */
{ YM2203_VOL(60,20), YM2203_VOL(60,20) },
{ 0 },
{ 0 },
{ 0 },
{ 0 }
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6809,
1500000, /* 1.5 Mhz (?) */
0,
readmem,writemem,0,0,
srumbler_interrupt,2
},
{
CPU_Z80 | CPU_AUDIO_CPU,
3000000, /* 3 Mhz ??? */
2, /* memory region #2 */
sound_readmem,sound_writemem,0,0,
interrupt,4
}
},
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 */
srumbler_init_machine,
/* video hardware */
64*8, 32*8, { 10*8, (64-10)*8-1, 1*8, 31*8-1 },
gfxdecodeinfo,
384, 384,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
srumbler_vh_start,
srumbler_vh_stop,
srumbler_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_YM2203,
&ym2203_interface
}
}
};
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( srumbler_rom )
ROM_REGION(0x10000+0x9000*16) /* 64k for code + banked ROM images */
/* empty, will be filled later */
ROM_REGION_DISPOSE(0x90000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "6g_sr10.bin", 0x00000, 0x4000, 0xadabe271 ) /* characters */
ROM_LOAD( "11a_sr11.bin", 0x10000, 0x8000, 0x5fa042ba ) /* tiles */
ROM_LOAD( "13a_sr12.bin", 0x18000, 0x8000, 0xa2db64af )
ROM_LOAD( "14a_sr13.bin", 0x20000, 0x8000, 0xf1df5499 )
ROM_LOAD( "15a_sr14.bin", 0x28000, 0x8000, 0xb22b31b3 )
ROM_LOAD( "11c_sr15.bin", 0x30000, 0x8000, 0xca3a3af3 )
ROM_LOAD( "13c_sr16.bin", 0x38000, 0x8000, 0xc49a4a11 )
ROM_LOAD( "14c_sr17.bin", 0x40000, 0x8000, 0xaa80aaab )
ROM_LOAD( "15c_sr18.bin", 0x48000, 0x8000, 0xce67868e )
ROM_LOAD( "15e_sr20.bin", 0x50000, 0x8000, 0x3924c861 ) /* sprites */
ROM_LOAD( "14e_sr19.bin", 0x58000, 0x8000, 0xff8f9129 )
ROM_LOAD( "15f_sr22.bin", 0x60000, 0x8000, 0xab64161c )
ROM_LOAD( "14f_sr21.bin", 0x68000, 0x8000, 0xfd64bcd1 )
ROM_LOAD( "15h_sr24.bin", 0x70000, 0x8000, 0xc972af3e )
ROM_LOAD( "14h_sr23.bin", 0x78000, 0x8000, 0x8c9abf57 )
ROM_LOAD( "15j_sr26.bin", 0x80000, 0x8000, 0xd4f1732f )
ROM_LOAD( "14j_sr25.bin", 0x88000, 0x8000, 0xd2a4ea4f )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "2f_sr05.bin", 0x0000, 0x8000, 0x0177cebe )
ROM_REGION(0x40000) /* Paged ROMs */
ROM_LOAD( "14e_sr04.bin", 0x00000, 0x08000, 0xa68ce89c ) /* RC4 */
ROM_LOAD( "13e_sr03.bin", 0x08000, 0x08000, 0x87bda812 ) /* RC3 */
ROM_LOAD( "12e_sr02.bin", 0x10000, 0x08000, 0xd8609cca ) /* RC2 */
ROM_LOAD( "11e_sr01.bin", 0x18000, 0x08000, 0x27ec4776 ) /* RC1 */
ROM_LOAD( "14f_sr09.bin", 0x20000, 0x08000, 0x2146101d ) /* RC9 */
ROM_LOAD( "13f_sr08.bin", 0x28000, 0x08000, 0x838369a6 ) /* RC8 */
ROM_LOAD( "12f_sr07.bin", 0x30000, 0x08000, 0xde785076 ) /* RC7 */
ROM_LOAD( "11f_sr06.bin", 0x38000, 0x08000, 0xa70f4fd4 ) /* RC6 */
ROM_REGION(0x0300) /* Proms (not used for now.. Transparency???) */
ROM_LOAD( "63s141.12a", 0x00000, 0x00100, 0x8421786f )
ROM_LOAD( "63s141.13a", 0x00100, 0x00100, 0x6048583f )
ROM_LOAD( "63s141.8j", 0x00200, 0x00100, 0x1a89a7ff )
ROM_END
ROM_START( srumblr2_rom )
ROM_REGION(0x10000+0x9000*16) /* 64k for code + banked ROM images */
/* empty, will be filled later */
ROM_REGION_DISPOSE(0x90000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "6g_sr10.bin", 0x00000, 0x4000, 0xadabe271 ) /* characters */
ROM_LOAD( "11a_sr11.bin", 0x10000, 0x8000, 0x5fa042ba ) /* tiles */
ROM_LOAD( "13a_sr12.bin", 0x18000, 0x8000, 0xa2db64af )
ROM_LOAD( "14a_sr13.bin", 0x20000, 0x8000, 0xf1df5499 )
ROM_LOAD( "15a_sr14.bin", 0x28000, 0x8000, 0xb22b31b3 )
ROM_LOAD( "11c_sr15.bin", 0x30000, 0x8000, 0xca3a3af3 )
ROM_LOAD( "13c_sr16.bin", 0x38000, 0x8000, 0xc49a4a11 )
ROM_LOAD( "14c_sr17.bin", 0x40000, 0x8000, 0xaa80aaab )
ROM_LOAD( "15c_sr18.bin", 0x48000, 0x8000, 0xce67868e )
ROM_LOAD( "15e_sr20.bin", 0x50000, 0x8000, 0x3924c861 ) /* sprites */
ROM_LOAD( "14e_sr19.bin", 0x58000, 0x8000, 0xff8f9129 )
ROM_LOAD( "15f_sr22.bin", 0x60000, 0x8000, 0xab64161c )
ROM_LOAD( "14f_sr21.bin", 0x68000, 0x8000, 0xfd64bcd1 )
ROM_LOAD( "15h_sr24.bin", 0x70000, 0x8000, 0xc972af3e )
ROM_LOAD( "14h_sr23.bin", 0x78000, 0x8000, 0x8c9abf57 )
ROM_LOAD( "15j_sr26.bin", 0x80000, 0x8000, 0xd4f1732f )
ROM_LOAD( "14j_sr25.bin", 0x88000, 0x8000, 0xd2a4ea4f )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "rc05.2f", 0x0000, 0x8000, 0xea04fa07 ) /* AUDIO (different) */
ROM_REGION(0x40000) /* Paged ROMs */
ROM_LOAD( "14e_sr04.bin", 0x00000, 0x08000, 0xa68ce89c ) /* RC4 */
ROM_LOAD( "rc03.13e", 0x08000, 0x08000, 0xe82f78d4 ) /* RC3 (different) */
ROM_LOAD( "rc02.12e", 0x10000, 0x08000, 0x009a62d8 ) /* RC2 (different) */
ROM_LOAD( "rc01.11e", 0x18000, 0x08000, 0x2ac48d1d ) /* RC1 (different) */
ROM_LOAD( "rc09.14f", 0x20000, 0x08000, 0x64f23e72 ) /* RC9 (different) */
ROM_LOAD( "rc08.13f", 0x28000, 0x08000, 0x74c71007 ) /* RC8 (different) */
ROM_LOAD( "12f_sr07.bin", 0x30000, 0x08000, 0xde785076 ) /* RC7 */
ROM_LOAD( "11f_sr06.bin", 0x38000, 0x08000, 0xa70f4fd4 ) /* RC6 */
ROM_REGION(0x0300) /* Proms (not used for now.. Transparency???) */
ROM_LOAD( "63s141.12a", 0x00000, 0x00100, 0x8421786f )
ROM_LOAD( "63s141.13a", 0x00100, 0x00100, 0x6048583f )
ROM_LOAD( "63s141.8j", 0x00200, 0x00100, 0x1a89a7ff )
ROM_END
struct GameDriver srumbler_driver =
{
__FILE__,
0,
"srumbler",
"Speed Rumbler (set 1)",
"1986",
"Capcom",
"Paul Leaman",
0,
&machine_driver,
0,
srumbler_rom,
0,
0,0,
0, /* sound_prom */
input_ports,
NULL, 0, 0,
ORIENTATION_ROTATE_270,
NULL, NULL
};
struct GameDriver srumblr2_driver =
{
__FILE__,
&srumbler_driver,
"srumblr2",
"Speed Rumbler (set 2)",
"1986",
"Capcom",
"Paul Leaman",
0,
&machine_driver,
0,
srumblr2_rom,
0,
0,0,
0, /* sound_prom */
input_ports,
NULL, 0, 0,
ORIENTATION_ROTATE_270,
NULL, NULL
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -