📄 liberatr.c
字号:
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_VBLANK )
PORT_START /* IN2 - Game Option switches DSW @ D4 on PCB */
PORT_DIPNAME( 0x03, 0x00, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x03, "8" )
PORT_DIPNAME( 0x0C, 0x04, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "15000" )
PORT_DIPSETTING( 0x04, "20000" )
PORT_DIPSETTING( 0x08, "25000" )
PORT_DIPSETTING( 0x0C, "30000" )
PORT_DIPNAME( 0x30, 0x00, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "Easy" )
PORT_DIPSETTING( 0x00, "Normal" )
PORT_DIPSETTING( 0x20, "Hard" )
PORT_DIPSETTING( 0x30, "???" )
PORT_DIPNAME( 0x40, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_START /* IN3 - Pricing Option switches DSW @ A4 on PCB */
PORT_DIPNAME( 0x03, 0x02, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x03, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x02, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x01, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x00, "Free Play" )
PORT_DIPNAME( 0x0c, 0x00, "Right Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x04, "*4" )
PORT_DIPSETTING ( 0x08, "*5" )
PORT_DIPSETTING ( 0x0c, "*6" )
PORT_DIPNAME( 0x10, 0x00, "Left Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x10, "*2" )
/* TODO: verify the following settings */
PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "None" )
PORT_DIPSETTING ( 0x80, "1 each 5" )
PORT_DIPSETTING ( 0x40, "1 each 4 (+Demo)" )
PORT_DIPSETTING ( 0xa0, "1 each 3" )
PORT_DIPSETTING ( 0x60, "2 each 4 (+Demo)" )
PORT_DIPSETTING ( 0x20, "1 each 2" )
PORT_DIPSETTING ( 0xc0, "Freeze Mode" )
PORT_DIPSETTING ( 0xe0, "Freeze Mode" )
PORT_START /* IN4 - FAKE - overlaps IN0 in the HW */
PORT_ANALOG ( 0x0f, 0x0, IPT_TRACKBALL_X , 100, 7, 0, 0)
PORT_START /* IN5 - FAKE - overlaps IN0 in the HW */
PORT_ANALOG ( 0x0f, 0x0, IPT_TRACKBALL_Y , 100, 7, 0, 0)
INPUT_PORTS_END
static struct POKEYinterface pokey_interface =
{
2, /* 2 chips */
FREQ_17_APPROX, /* 1.7 Mhz */
100,
POKEY_DEFAULT_GAIN,
NO_CLIP,
/* The 8 pot handlers */
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
/* The allpot handler */
{ input_port_3_r, input_port_2_r }
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6502, /* cpu_type */
1250000, /* cpu_clock (Hz) */
0, /* number of CPU memory region (allocated by loadroms()) */
readmem,writemem,
0,0, /* port_read, port_write */
liberator_interrupt, 4 /* interrupt(), ints / frame */
}
}, /* MachineCPU[] */
60, /* frames_per_second */
DEFAULT_REAL_60HZ_VBLANK_DURATION,
1, /* cpu_slices_per_frame */
liberator_init_machine, /* init_machine fcn */
/* video hardware */
#if LIB_ASPECTRATIO_342x256
342, 256, /* scrn wd,ht */
{ 0, 342-1, 0, 256-1 }, /* visible area {minx, maxx, miny, maxy} */
#else
512, 384, /* scrn wd,ht */
{ 0, 512-1, 0, 384-1 }, /* visible area {minx, maxx, miny, maxy} */
#endif
0, /* GfxDecodeInfo */
32, /* total_colors */
0, /* length in bytes of the color lookup table (3*total_colors bytes) */
0, /* vh_convert_color_prom() */
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE, /* video_attributes */
0, /* vh_init() */
liberator_vh_start, /* vh_start() */
liberator_vh_stop, /* vh_stop() */
liberator_vh_screenrefresh, /* vh_update() */
/* sound hardware */
0,0,0,0,
{
{
SOUND_POKEY,
&pokey_interface
}
}
};
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( liberator_rom )
ROM_REGION(0x10000) /* 64k for code and data */
/* note: the Planet Picture ROMs are not in the address space of the
processor on the real board, but it is convenient to allow
the built-in routines to load the files into memory. */
ROM_LOAD( "136012.110", 0x0000, 0x1000, 0x6eb11221 ) /* Planet Picture ROM */
ROM_LOAD( "136012.107", 0x1000, 0x1000, 0x8a616a63 ) /* Planet Picture ROM */
ROM_LOAD( "136012.108", 0x2000, 0x1000, 0x3f8e4cf6 ) /* Planet Picture ROM */
ROM_LOAD( "136012.109", 0x3000, 0x1000, 0xdda0c0ef ) /* Planet Picture ROM */
ROM_LOAD( "136012.206", 0x8000, 0x1000, 0x1a0cb4a0 ) /* code ROM */
ROM_LOAD( "136012.205", 0x9000, 0x1000, 0x2f071920 ) /* code ROM */
ROM_LOAD( "136012.204", 0xa000, 0x1000, 0xbcc91827 ) /* code ROM */
ROM_LOAD( "136012.203", 0xb000, 0x1000, 0xb558c3d4 ) /* code ROM */
ROM_LOAD( "136012.202", 0xc000, 0x1000, 0x569ba7ea ) /* code ROM */
ROM_LOAD( "136012.201", 0xd000, 0x1000, 0xd12cd6d0 ) /* code ROM */
ROM_LOAD( "136012.200", 0xe000, 0x1000, 0x1e98d21a ) /* code ROM */
ROM_RELOAD( 0xf000, 0x1000 ) /* for interrupt vectors */
ROM_END
struct GameDriver liberatr_driver =
{
__FILE__,
0,
"liberatr", /* name */
"Liberator", /* description */
"1982",
"Atari",
"Paul Winkler", /* credits */
0,
&machine_driver, /* MachineDriver */
0,
liberator_rom, /* RomModule */
0, 0, /* ROM decoding fcn's */
0, /* sound sample names */
0, /* sound_prom */
input_ports, /* NewInputPort * */
0, 0, 0, /* color_prom, palette,colortable */
ORIENTATION_DEFAULT,/* monitor orientation */
atari_vg_earom_load,atari_vg_earom_save
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -