📄 dec0.c
字号:
8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
16*16
};
static struct GfxDecodeInfo gfxdecodeinfo[] =
{
{ 1, 0x000000, &charlayout, 0, 16 }, /* Characters 8x8 */
{ 1, 0x020000, &tilelayout, 512, 16 }, /* Tiles 16x16 */
{ 1, 0x0a0000, &tilelayout, 768, 16 }, /* Tiles 16x16 */
{ 1, 0x120000, &tilelayout, 256, 16 }, /* Sprites 16x16 */
{ -1 } /* end of array */
};
static struct GfxDecodeInfo midres_gfxdecodeinfo[] =
{
{ 1, 0x000000, &charlayout, 256, 16 }, /* Characters 8x8 */
{ 1, 0x020000, &tilelayout, 512, 16 }, /* Tiles 16x16 */
{ 1, 0x0a0000, &tilelayout, 768, 16 }, /* Tiles 16x16 */
{ 1, 0x120000, &tilelayout, 0, 16 }, /* Sprites 16x16 */
{ -1 } /* end of array */
};
/******************************************************************************/
static void sound_irq(void)
{
cpu_cause_interrupt(1,M6502_INT_IRQ);
}
static struct YM2203interface ym2203_interface =
{
1,
1500000, /* 1.50 MHz */
{ YM2203_VOL(140,255) },
{ 0 },
{ 0 },
{ 0 },
{ 0 }
};
static struct YM3812interface ym3812_interface =
{
1, /* 1 chip (no more supported) */
3250000, /* 3.25 MHz ? (hand tuned) */
{ 255 }, /* (not supported) */
sound_irq,
};
static struct OKIM6295interface okim6295_interface =
{
1, /* 1 chip */
8000, /* 8000Hz frequency */
3, /* memory region 3 */
{ 255 }
};
static struct ADPCMinterface adpcm_interface =
{
1, /* 1 chip */
8000, /* 8000Hz playback */
3, /* memory region 3 */
0, /* init function */
{ 255 }
};
/******************************************************************************/
static struct MachineDriver hbarrel_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
dec0_readmem,dec0_writemem,0,0,
m68_level6_irq,1 /* VBL, level 5 interrupts from i8751 */
},
{
CPU_M6502 | CPU_AUDIO_CPU,
900000,
2,
dec0_s_readmem,dec0_s_writemem,0,0,
ignore_interrupt,0
}
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
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,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
dec0_vh_start,
dec0_vh_stop,
hbarrel_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_YM2203,
&ym2203_interface
},
{
SOUND_YM3812,
&ym3812_interface
},
{
SOUND_OKIM6295,
&okim6295_interface
}
}
};
static struct MachineDriver baddudes_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
dec0_readmem,dec0_writemem,0,0,
m68_level6_irq,1 /* VBL, level 5 interrupts from i8751 */
},
{
CPU_M6502 | CPU_AUDIO_CPU,
1250000,
2,
dec0_s_readmem,dec0_s_writemem,0,0,
ignore_interrupt,0
}
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
0,
/* video hardware */
32*8, 64*8, { 0*8, 32*8-1, 1*8, 31*8-1 },
gfxdecodeinfo,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
dec0_vh_start,
dec0_vh_stop,
dec0_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_YM2203,
&ym2203_interface
},
{
SOUND_YM3812,
&ym3812_interface
},
{
SOUND_OKIM6295,
&okim6295_interface
}
}
};
static struct MachineDriver robocop_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
dec0_readmem,dec0_writemem,0,0,
m68_level6_irq,1 /* VBL */
},
{
CPU_M6502 | CPU_AUDIO_CPU,
1250000,
2,
dec0_s_readmem,dec0_s_writemem,0,0,
ignore_interrupt,0
}
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
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,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
dec0_vh_start,
dec0_vh_stop,
robocop_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_YM2203,
&ym2203_interface
},
{
SOUND_YM3812,
&ym3812_interface
},
{
SOUND_OKIM6295,
&okim6295_interface
}
}
};
static struct MachineDriver hippodrm_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
dec0_readmem,dec0_writemem,0,0,
m68_level6_irq,1 /* VBL */
},
{
CPU_M6502 | CPU_AUDIO_CPU,
1200000,
2,
dec0_s_readmem,dec0_s_writemem,0,0,
ignore_interrupt,0
},
#if 0
{
CPU_M6502,
1000000,
4,
hippo_sub_readmem,hippo_sub_writemem,0,0,
ignore_interrupt,0
}
#endif
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
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,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
dec0_vh_start,
dec0_vh_stop,
hippodrm_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_YM2203,
&ym2203_interface
},
{
SOUND_YM3812,
&ym3812_interface
},
{
SOUND_OKIM6295,
&okim6295_interface
}
}
};
static struct MachineDriver midres_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
midres_readmem,midres_writemem,0,0,
m68_level6_irq,1 /* VBL */
},
#if 0
{
CPU_M6502 | CPU_AUDIO_CPU,
1000000,
2,
dec1_s_readmem,dec1_s_writemem,0,0,
ignore_interrupt,0
}
#endif
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
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 },
midres_gfxdecodeinfo,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
dec0_vh_start,
dec0_vh_stop,
midres_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_ADPCM,
&adpcm_interface
},
{
SOUND_YM3812,
&ym3812_interface
}
}
};
static struct MachineDriver slyspy_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000,
0,
slyspy_readmem,slyspy_writemem,0,0,
m68_level6_irq,1 /* VBL */
},
#if 0
{
CPU_M6502 | CPU_AUDIO_CPU,
1000000,
2,
dec1_s_readmem,dec1_s_writemem,0,0,
interrupt,1
}
#endif
},
57, 1536, /* frames per second, vblank duration taken from Burger Time */
1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
0,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -