📄 rainbow.c
字号:
static struct GfxLayout spritelayout1 =
{
8,8, /* 8*8 sprites */
16384, /* 16384 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 8, 12, 0, 4, 24, 28, 16, 20 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every sprite takes 16 consecutive bytes */
};
static struct GfxLayout spritelayout2 =
{
16,16, /* 16*16 sprites */
4096, /* 1024 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 8, 12, 0, 4, 24, 28, 16, 20, 40, 44, 32, 36, 56, 60, 48, 52 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
128*8 /* every sprite takes 64 consecutive bytes */
};
static struct GfxLayout spritelayout3 =
{
16,16, /* 16*16 sprites */
1024, /* 1024 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{
0, 4, 0x10000*8+0 ,0x10000*8+4,
8+0, 8+4, 0x10000*8+8+0, 0x10000*8+8+4,
16+0, 16+4, 0x10000*8+16+0, 0x10000*8+16+4,
24+0, 24+4, 0x10000*8+24+0, 0x10000*8+24+4
},
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
64*8 /* every sprite takes 64 consecutive bytes */
};
static struct GfxDecodeInfo rainbowe_gfxdecodeinfo[] =
{
{ 1, 0x000000, &spritelayout1, 0, 0x80 }, /* sprites 8x8 */
{ 1, 0x080000, &spritelayout2, 0, 0x80 }, /* sprites 16x16 */
{ 1, 0x100000, &spritelayout3, 0, 0x80 },/* sprites 16x16 (What For ?) */
{ -1 } /* end of array */
};
/* There are 5120 sprites, as indeed there are in Rainbow Island */
/* However, it looks like the hardware will only ever select up */
/* to 4096 - so what are the others for ? */
/* */
/* Incidentally, sprite roms need all bits reversing, as colours */
/* are mapped back to front from the pattern used by Rainbow! */
static struct GfxLayout jumping_tilelayout =
{
8,8, /* 8*8 sprites */
16384, /* 16384 sprites */
4, /* 4 bits per pixel */
{ 0, 0x20000*8, 0x40000*8, 0x60000*8 },
{ 0, 1, 2, 3, 4, 5, 6, 7 },
{ 0, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8*8 /* every sprite takes 8 consecutive bytes */
};
static struct GfxLayout jumping_spritelayout =
{
16,16, /* 16*16 sprites */
5120, /* 5120 sprites */
4, /* 4 bits per pixel */
{ 0x78000*8,0x50000*8,0x28000*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, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
32*8 /* every sprite takes 32 consecutive bytes */
};
static struct GfxDecodeInfo jumping_gfxdecodeinfo[] =
{
{ 1, 0x000000, &jumping_tilelayout, 0, 0x80 }, /* sprites 8x8 */
{ 1, 0x080000, &jumping_spritelayout, 0, 0x80 }, /* sprites 16x16 */
{ -1 } /* end of array */
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
8000000, /* 8 Mhz */
0,
rainbow_readmem,rainbow_writemem,0,0,
rainbow_interrupt,1
},
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
1, /* 1 CPU slices per frame - no sound CPU yet! */
0,
/* video hardware */
40*8, 32*8, { 0*8, 40*8-1, 1*8, 31*8-1 },
rainbowe_gfxdecodeinfo,
2048, 2048,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
rastan_vh_start,
rastan_vh_stop,
rainbow_vh_screenrefresh,
/* sound hardware */
0,
0,
0,
0
};
static struct MachineDriver jumping_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
8000000, /* 8 Mhz */
0,
jumping_readmem,jumping_writemem,0,0,
rainbow_interrupt,1
},
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
1, /* 1 CPU slices per frame - no sound CPU yet! */
0,
/* video hardware */
40*8, 32*8, { 0*8, 40*8-1, 1*8, 31*8-1 },
jumping_gfxdecodeinfo,
2048, 2048,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
rastan_vh_start,
rastan_vh_stop,
jumping_vh_screenrefresh,
/* sound hardware */
0,
0,
0,
0
};
ROM_START( rainbow_rom )
ROM_REGION(0x80000) /* 8*64k for 68000 code */
ROM_LOAD_EVEN( "b22-10", 0x00000, 0x10000, 0x3b013495 )
ROM_LOAD_ODD ( "b22-11", 0x00000, 0x10000, 0x80041a3d )
ROM_LOAD_EVEN( "b22-08", 0x20000, 0x10000, 0x962fb845 )
ROM_LOAD_ODD ( "b22-09", 0x20000, 0x10000, 0xf43efa27 )
ROM_LOAD_EVEN( "ri_m03.rom", 0x40000, 0x20000, 0x3ebb0fb8 )
ROM_LOAD_ODD ( "ri_m04.rom", 0x40000, 0x20000, 0x91625e7f )
ROM_REGION_DISPOSE(0x120000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "ri_m01.rom", 0x000000, 0x80000, 0xb76c9168 ) /* 8x8 gfx */
ROM_LOAD( "ri_m02.rom", 0x080000, 0x80000, 0x1b87ecf0 ) /* sprites */
ROM_LOAD( "b22-13", 0x100000, 0x10000, 0x2fda099f )
ROM_LOAD( "b22-12", 0x110000, 0x10000, 0x67a76dc6 )
#if 0
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "b22-14", 0x0000, 0x10000, 0x0 )
#endif
ROM_END
ROM_START( rainbowe_rom )
ROM_REGION(0x80000) /* 8*64k for 68000 code */
ROM_LOAD_EVEN( "ri_01.rom", 0x00000, 0x10000, 0x50690880 )
ROM_LOAD_ODD ( "ri_02.rom", 0x00000, 0x10000, 0x4dead71f )
ROM_LOAD_EVEN( "ri_03.rom", 0x20000, 0x10000, 0x4a4cb785 )
ROM_LOAD_ODD ( "ri_04.rom", 0x20000, 0x10000, 0x4caa53bd )
ROM_LOAD_EVEN( "ri_m03.rom", 0x40000, 0x20000, 0x3ebb0fb8 )
ROM_LOAD_ODD ( "ri_m04.rom", 0x40000, 0x20000, 0x91625e7f )
ROM_REGION_DISPOSE(0x120000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "ri_m01.rom", 0x000000, 0x80000, 0xb76c9168 ) /* 8x8 gfx */
ROM_LOAD( "ri_m02.rom", 0x080000, 0x80000, 0x1b87ecf0 ) /* sprites */
ROM_LOAD( "b22-13", 0x100000, 0x10000, 0x2fda099f )
ROM_LOAD( "b22-12", 0x110000, 0x10000, 0x67a76dc6 )
#if 0
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "b22-14", 0x0000, 0x10000, 0x0 )
#endif
ROM_END
static void jumping_sprite_decode(void)
{
/* Sprite colour map is reversed - switch to normal */
int Count;
for(Count=0x118000;Count>=0x80000;Count--) Machine->memory_region[1][Count]^=0xFF;
}
ROM_START( jumping_rom )
ROM_REGION(0xA0000) /* 8*64k for code, 64k*2 for protection chip */
ROM_LOAD_EVEN( "jb1_h4", 0x00000, 0x10000, 0x3fab6b31 )
ROM_LOAD_ODD ( "jb1_h8", 0x00000, 0x10000, 0x8c878827 )
ROM_LOAD_EVEN( "jb1_i4", 0x20000, 0x10000, 0x443492cf )
ROM_LOAD_ODD ( "jb1_i8", 0x20000, 0x10000, 0xed33bae1 )
ROM_LOAD_EVEN( "ri_m03.rom", 0x40000, 0x20000, 0x3ebb0fb8 )
ROM_LOAD_ODD ( "ri_m04.rom", 0x40000, 0x20000, 0x91625e7f )
ROM_LOAD_ODD ( "jb1_f89", 0x80000, 0x10000, 0x0810d327 ) /* Dump of C-Chip? */
ROM_REGION_DISPOSE(0x120000) /* Graphics */
ROM_LOAD( "jb2_ic8", 0x00000, 0x10000, 0x65b76309 ) /* 8x8 characters */
ROM_LOAD( "jb2_ic7", 0x10000, 0x10000, 0x43a94283 )
ROM_LOAD( "jb2_ic10", 0x20000, 0x10000, 0xe61933fb )
ROM_LOAD( "jb2_ic9", 0x30000, 0x10000, 0xed031eb2 )
ROM_LOAD( "jb2_ic12", 0x40000, 0x10000, 0x312700ca )
ROM_LOAD( "jb2_ic11", 0x50000, 0x10000, 0xde3b0b88 )
ROM_LOAD( "jb2_ic14", 0x60000, 0x10000, 0x9fdc6c8e )
ROM_LOAD( "jb2_ic13", 0x70000, 0x10000, 0x06226492 )
ROM_LOAD( "jb2_ic62", 0x80000, 0x10000, 0x8548db6c ) /* 16x16 sprites */
ROM_LOAD( "jb2_ic61", 0x90000, 0x10000, 0x37c5923b )
ROM_LOAD( "jb2_ic60", 0xA0000, 0x08000, 0x662a2f1e )
ROM_LOAD( "jb2_ic78", 0xA8000, 0x10000, 0x925865e1 )
ROM_LOAD( "jb2_ic77", 0xB8000, 0x10000, 0xb09695d1 )
ROM_LOAD( "jb2_ic76", 0xC8000, 0x08000, 0x41937743 )
ROM_LOAD( "jb2_ic93", 0xD0000, 0x10000, 0xf644eeab )
ROM_LOAD( "jb2_ic92", 0xE0000, 0x10000, 0x3fbccd33 )
ROM_LOAD( "jb2_ic91", 0xF0000, 0x08000, 0xd886c014 )
ROM_LOAD( "jb2_i121", 0xF8000, 0x10000, 0x93df1e4d )
ROM_LOAD( "jb2_i120", 0x108000, 0x10000, 0x7c4e893b )
ROM_LOAD( "jb2_i119", 0x118000, 0x08000, 0x7e1d58d8 )
#if 0
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "jb1_cd67", 0x0000, 0x10000, 0x0 )
#endif
ROM_END
struct GameDriver rainbow_driver =
{
__FILE__,
0,
"rainbow",
"Rainbow Islands",
"1987",
"Taito",
"Richard Bush (Raine & Info)\nMike Coates (MAME driver)",
GAME_NOT_WORKING,
&machine_driver,
0,
rainbow_rom,
0, 0,
0,
0, /* sound_prom */
rainbow_input_ports,
0, 0, 0, /* colors, palette, colortable */
ORIENTATION_DEFAULT,
0, 0
};
struct GameDriver rainbowe_driver =
{
__FILE__,
&rainbow_driver,
"rainbowe",
"Rainbow Islands (Extra)",
"1988",
"Taito",
"Richard Bush (Raine & Info)\nMike Coates (MAME driver)",
GAME_NOT_WORKING,
&machine_driver,
0,
rainbowe_rom,
0, 0,
0,
0, /* sound_prom */
rainbow_input_ports,
0, 0, 0, /* colors, palette, colortable */
ORIENTATION_DEFAULT,
0, 0
};
struct GameDriver jumping_driver =
{
__FILE__,
&rainbow_driver,
"jumping",
"Jumping",
"1989",
"bootleg",
"Richard Bush (Raine & Info)\nMike Coates (MAME driver)",
0,
&jumping_machine_driver,
0,
jumping_rom,
jumping_sprite_decode, 0,
0,
0, /* sound_prom */
jumping_input_ports,
0, 0, 0, /* colors, palette, colortable */
ORIENTATION_DEFAULT,
0, 0
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -