📄 qix.c
字号:
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START /* IN1 */
PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_SERVICE, "Test Advance", OSD_KEY_F1, IP_JOY_DEFAULT, 0)
PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Test Next line", OSD_KEY_F2, IP_JOY_DEFAULT, 0)
PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Test Slew Up", OSD_KEY_F5, IP_JOY_DEFAULT, 0)
PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_SERVICE, "Test Slew Down", OSD_KEY_F6, IP_JOY_DEFAULT, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) /* Coin switch */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
INPUT_PORTS_END
INPUT_PORTS_START( sdungeon_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_8WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_8WAY )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_8WAY )
PORT_START /* IN1 */
PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_SERVICE, "Test Advance", OSD_KEY_F1, IP_JOY_DEFAULT, 0)
PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Test Next line", OSD_KEY_F2, IP_JOY_DEFAULT, 0)
PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Test Slew Up", OSD_KEY_F5, IP_JOY_DEFAULT, 0)
PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_SERVICE, "Test Slew Down", OSD_KEY_F6, IP_JOY_DEFAULT, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) /* Coin switch */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
PORT_START /* Game PIA 2 Port B */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
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 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
INPUT_PORTS_START( zoo_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 2 - not used */
PORT_START /* IN1 */
PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, "Advance Test", OSD_KEY_F1, IP_JOY_NONE, 0 )
PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Advance Sub-Test", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_SERVICE, "Slew Up", OSD_KEY_F5, IP_JOY_NONE, 0 )
PORT_BITX(0x08, IP_ACTIVE_HIGH, IPT_SERVICE, "Slew Down", OSD_KEY_F6, IP_JOY_NONE, 0 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* coin switch ? */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT )
PORT_START /* Game PIA 3 Port A -- Player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 2 - not used */
INPUT_PORTS_END
static struct DACinterface dac_interface =
{
1,
{ 100 }
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6809,
1250000, /* 1.25 MHz */
0, /* memory region */
readmem, /* MemoryReadAddress */
writemem, /* MemoryWriteAddress */
0, /* IOReadPort */
0, /* IOWritePort */
interrupt,
1
},
{
CPU_M6809,
1250000, /* 1.25 MHz */
1, /* memory region #1 */
readmem_video, writemem_video, 0, 0,
ignore_interrupt,
1
},
{
CPU_M6802 | CPU_AUDIO_CPU,
3680000/4, /* 0.92 MHz */
2, /* memory region #2 */
readmem_sound, writemem_sound, 0, 0,
ignore_interrupt,
1
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
60, /* 60 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
qix_init_machine, /* init machine routine */ /* JB 970526 */
/* video hardware */
256, 256, /* screen_width, screen_height */
{ 0, 255, 8, 247 }, /* struct rectangle visible_area - just a guess */
0, /* GfxDecodeInfo * */
256, /* total colors */
0, /* color table length */
0, /* convert color prom routine */
VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE|VIDEO_SUPPORTS_DIRTY,
0, /* vh_init routine */
qix_vh_start, /* vh_start routine */
qix_vh_stop, /* vh_stop routine */
qix_vh_screenrefresh, /* vh_update routine */
/* sound hardware */
0,0,0,0,
{
{
SOUND_DAC,
&dac_interface
}
}
};
static struct MachineDriver mcu_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6809,
1250000, /* 1.25 MHz */
0, /* memory region */
readmem, /* MemoryReadAddress */
writemem, /* MemoryWriteAddress */
0, /* IOReadPort */
0, /* IOWritePort */
interrupt,
1
},
{
CPU_M6809,
1250000, /* 1.25 MHz */
1, /* memory region #1 */
readmem_video, writemem_video, 0, 0,
ignore_interrupt,
1
},
{
CPU_M6802 | CPU_AUDIO_CPU,
3680000/4, /* 0.92 MHz */
2, /* memory region #2 */
readmem_sound, writemem_sound, 0, 0,
ignore_interrupt,
1
},
{
CPU_M68705,
4000000, /* 4 MHz */
3, /* memory region #3 */
mcu_readmem,mcu_writemem,0,0,
ignore_interrupt,1 /* No periodic interrupt */
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
60, /* 60 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
withmcu_init_machine, /* init machine routine */ /* JB 970526 */
/* video hardware */
256, 256, /* screen_width, screen_height */
{ 0, 255, 8, 247 }, /* struct rectangle visible_area - just a guess */
0, /* GfxDecodeInfo * */
256, /* total colors */
0, /* color table length */
0, /* convert color prom routine */
VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE|VIDEO_SUPPORTS_DIRTY,
0, /* vh_init routine */
qix_vh_start, /* vh_start routine */
qix_vh_stop, /* vh_stop routine */
qix_vh_screenrefresh, /* vh_update routine */
/* sound hardware */
0,0,0,0,
{
{
SOUND_DAC,
&dac_interface
}
}
};
static struct MachineDriver zoo_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6809,
1250000, /* 1.25 MHz */
0, /* memory region */
zoo_readmem, /* MemoryReadAddress */
zoo_writemem, /* MemoryWriteAddress */
0, /* IOReadPort */
0, /* IOWritePort */
interrupt, /* interrupt routine */
1 /* interrupts per frame */
},
{
CPU_M6809,
1250000, /* 1.25 MHz */
1, /* memory region #1 */
zoo_readmem_video, zoo_writemem_video, 0, 0,
ignore_interrupt,
1
},
{
CPU_M6802 | CPU_AUDIO_CPU,
3680000/4, /* 0.92 MHz */
2, /* memory region #2 */
zoo_readmem_sound, zoo_writemem_sound, 0, 0,
ignore_interrupt,
1
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
60, /* 60 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
zoo_init_machine, /* init machine routine */
/* video hardware */
256, 256, /* screen_width, screen_height */
{ 0, 255, 8, 247 }, /* struct rectangle visible_area - just a guess */
0, /* GfxDecodeInfo * */
256, /* total colors */
0, /* color table length */
0, /* convert color prom routine */
VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE|VIDEO_SUPPORTS_DIRTY,
0, /* vh_init routine */
qix_vh_start, /* vh_start routine */
qix_vh_stop, /* vh_stop routine */
qix_vh_screenrefresh, /* vh_update routine */
/* sound hardware */
0,0,0,0,
{
{
SOUND_DAC,
&dac_interface
}
}
};
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( qix_rom )
ROM_REGION(0x10000) /* 64k for code for the first CPU (Data) */
ROM_LOAD( "u12", 0xC000, 0x800, 0xaad35508 )
ROM_LOAD( "u13", 0xC800, 0x800, 0x46c13504 )
ROM_LOAD( "u14", 0xD000, 0x800, 0x5115e896 )
ROM_LOAD( "u15", 0xD800, 0x800, 0xccd52a1b )
ROM_LOAD( "u16", 0xE000, 0x800, 0xcd1c36ee )
ROM_LOAD( "u17", 0xE800, 0x800, 0x1acb682d )
ROM_LOAD( "u18", 0xF000, 0x800, 0xde77728b )
ROM_LOAD( "u19", 0xF800, 0x800, 0xc0994776 )
ROM_REGION(0x10000) /* 64k for code for the second CPU (Video) */
ROM_LOAD( "u4", 0xC800, 0x800, 0x5b906a09 )
ROM_LOAD( "u5", 0xD000, 0x800, 0x254a3587 )
ROM_LOAD( "u6", 0xD800, 0x800, 0xace30389 )
ROM_LOAD( "u7", 0xE000, 0x800, 0x8ebcfa7c )
ROM_LOAD( "u8", 0xE800, 0x800, 0xb8a3c8f9 )
ROM_LOAD( "u9", 0xF000, 0x800, 0x26cbcd55 )
ROM_LOAD( "u10", 0xF800, 0x800, 0x568be942 )
ROM_REGION(0x10000) /* 64k for code for the third CPU (sound) */
ROM_LOAD( "u27", 0xF800, 0x800, 0xf3782bd0 )
ROM_END
ROM_START( qix2_rom )
ROM_REGION(0x10000) /* 64k for code for the first CPU (Data) */
ROM_LOAD( "u12.rmb", 0xC000, 0x800, 0x484280fd )
ROM_LOAD( "u13.rmb", 0xC800, 0x800, 0x3d089fcb )
ROM_LOAD( "u14.rmb", 0xD000, 0x800, 0x362123a9 )
ROM_LOAD( "u15.rmb", 0xD800, 0x800, 0x60f3913d )
ROM_LOAD( "u16.rmb", 0xE000, 0x800, 0xcc139e34 )
ROM_LOAD( "u17.rmb", 0xE800, 0x800, 0xcf31dc49 )
ROM_LOAD( "u18.rmb", 0xF000, 0x800, 0x1f91ed7a )
ROM_LOAD( "u19.rmb", 0xF800, 0x800, 0x68e8d5a6 )
ROM_REGION(0x10000) /* 64k for code for the second CPU (Video) */
ROM_LOAD( "u3.rmb", 0xC000, 0x800, 0x19cebaca )
ROM_LOAD( "u4.rmb", 0xC800, 0x800, 0x6cfb4185 )
ROM_LOAD( "u5.rmb", 0xD000, 0x800, 0x948f53f3 )
ROM_LOAD( "u6.rmb", 0xD800, 0x800, 0x8630120e )
ROM_LOAD( "u7.rmb", 0xE000, 0x800, 0xbad037c9 )
ROM_LOAD( "u8.rmb", 0xE800, 0x800, 0x3159bc00 )
ROM_LOAD( "u9.rmb", 0xF000, 0x800, 0xe80e9b1d )
ROM_LOAD( "u10.rmb", 0xF800, 0x800, 0x9a55d360 )
ROM_REGION(0x10000) /* 64k for code for the third CPU (sound) */
ROM_LOAD( "u27.rmb", 0xF800, 0x800, 0xf3782bd0 )
ROM_END
ROM_START( sdungeon_rom )
ROM_REGION(0x10000) /* 64k for code for the first CPU (Data) */
ROM_LOAD( "sd14.u14", 0xA000, 0x1000, 0x7024b55a )
ROM_LOAD( "sd15.u15", 0xB000, 0x1000, 0xa3ac9040 )
ROM_LOAD( "sd16.u16", 0xC000, 0x1000, 0xcc20b580 )
ROM_LOAD( "sd17.u17", 0xD000, 0x1000, 0x4663e4b8 )
ROM_LOAD( "sd18.u18", 0xE000, 0x1000, 0x7ef1ffc0 )
ROM_LOAD( "sd19.u19", 0xF000, 0x1000, 0x7b20b7ac )
ROM_REGION(0x12000) /* 64k for code + 2 ROM banks for the second CPU (Video) */
ROM_LOAD( "sd05.u5", 0x0A000, 0x1000, 0x0b2bf48e )
ROM_LOAD( "sd06.u6", 0x0B000, 0x1000, 0xf86db512 )
ROM_LOAD( "sd07.u7", 0x0C000, 0x1000, 0x7b796831 )
ROM_LOAD( "sd08.u8", 0x0D000, 0x1000, 0x5fbe7068 )
ROM_LOAD( "sd09.u9", 0x0E000, 0x1000, 0x89bc51ea )
ROM_LOAD( "sd10.u10", 0x0F000, 0x1000, 0x754de734 )
ROM_REGION(0x10000) /* 64k for code for the third CPU (sound) */
ROM_LOAD( "sd26.u26", 0xF000, 0x0800, 0x3df8630d )
ROM_LOAD( "sd27.u27", 0xF800, 0x0800, 0x0386f351 )
ROM_REGION(0x0800) /* 8k for the 68705 microcontroller (currently not emulated) */
ROM_LOAD( "sd101", 0x0000, 0x0800, 0xe255af9a )
ROM_END
ROM_START( zookeep_rom )
ROM_REGION(0x10000) /* 64k for code for the first CPU (Data) */
ROM_LOAD( "zb12", 0x8000, 0x1000, 0x17c02aa2 )
ROM_LOAD( "za13", 0x9000, 0x1000, 0xeebd5248 )
ROM_LOAD( "za14", 0xA000, 0x1000, 0xfab43297 )
ROM_LOAD( "za15", 0xB000, 0x1000, 0xef8cd67c )
ROM_LOAD( "za16", 0xC000, 0x1000, 0xccfc15bc )
ROM_LOAD( "za17", 0xD000, 0x1000, 0x358013f4 )
ROM_LOAD( "za18", 0xE000, 0x1000, 0x37886afe )
ROM_LOAD( "za19", 0xF000, 0x1000, 0xbbfb30d9 )
ROM_REGION(0x12000) /* 64k for code + 2 ROM banks for the second CPU (Video) */
ROM_LOAD( "za5", 0x0A000, 0x1000, 0xdc0c3cbd )
ROM_LOAD( "za3", 0x10000, 0x1000, 0xcc4d0aee )
ROM_LOAD( "za6", 0x0B000, 0x1000, 0x27c787dd )
ROM_LOAD( "za4", 0x11000, 0x1000, 0xec3b10b1 )
ROM_LOAD( "za7", 0x0C000, 0x1000, 0x1479f480 )
ROM_LOAD( "za8", 0x0D000, 0x1000, 0x4c96cdb2 )
ROM_LOAD( "za9", 0x0E000, 0x1000, 0xa4f7d9e0 )
ROM_LOAD( "za10", 0x0F000, 0x1000, 0x05df1a5a )
ROM_REGION(0x10000) /* 64k for code for the third CPU (sound) */
ROM_LOAD( "za25", 0xD000, 0x1000, 0x779b8558 )
ROM_LOAD( "za26", 0xE000, 0x1000, 0x60a810ce )
ROM_LOAD( "za27", 0xF000, 0x1000, 0x99ed424e )
ROM_REGION(0x0800) /* 8k for the 68705 microcontroller (currently not emulated) */
ROM_LOAD( "za_coin.bin", 0x0000, 0x0800, 0x364d3557 )
ROM_END
ROM_START( zookeepa_rom )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -