📄 exidy.c
字号:
osd_fread(f,&RAM[0x0380],5+6*5);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void venture_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
/* 5 bytes for score order, 6 bytes per score/initials */
osd_fwrite(f,&RAM[0x0380],5+6*5);
osd_fclose(f);
}
}
static int pepper2_hiload(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
static int firsttime;
/* the high score table is intialized to all 0, so first of all */
/* we dirty it, then we wait for it to be cleared again */
if (firsttime == 0)
{
memset(&RAM[0x0360],0xff,5+6*5); /* high score */
firsttime = 1;
}
/* check if the hi score table has already been initialized */
if ((memcmp(&RAM[0x0365],"\x00\x07\x65",3) == 0) &&
(memcmp(&RAM[0x0380],"\x15\x20\x11",3) == 0))
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x0360],5+6*5);
osd_fclose(f);
}
firsttime = 0;
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void pepper2_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
/* 5 bytes for score order, 6 bytes per score/initials */
osd_fwrite(f,&RAM[0x0360],5+6*5);
osd_fclose(f);
}
}
static int targ_hiload(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
/* check if the hi score table has already been initialized */
if (memcmp(&RAM[0x00AE],"\x00\x10",2) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x00AE],2);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void targ_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
osd_fwrite(f,&RAM[0x00AE],2);
osd_fclose(f);
}
}
static int fax_hiload(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
static int firsttime;
/* the high score table is intialized to all 0, so first of all */
/* we dirty it, then we wait for it to be cleared again */
if (firsttime == 0)
{
memset(&RAM[0x02b4],0xff,7*50); /* high score */
firsttime = 1;
}
if (memcmp(&RAM[0x0360],"\x00\x00\x00",3) == 0 && memcmp(&RAM[0x040f],"\x00\x00\x00",3) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x02B4],7*50);
osd_fclose(f);
}
firsttime =0;
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void fax_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
/* 7 characters per hi score, 50 hi scores */
osd_fwrite(f,&RAM[0x02B4],7*50);
osd_fclose(f);
}
}
static int sidetrac_hiload(void)
{
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
static int firsttime;
/* the high score table is intialized to all 0, so first of all */
/* we dirty it, then we wait for it to be cleared again */
if (firsttime == 0)
{
memset(&RAM[0x000a],0xff,8); /* high score */
firsttime = 1;
}
/* Check for high score init. */
if (memcmp(&RAM[0x000f],"\x00\x00",2) == 0 && memcmp(&RAM[0x000a],"\x00\x00",2) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x000f],2);
osd_fclose(f);
}
firsttime = 0;
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void sidetrac_hisave(void)
{
void *f;
unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
{
osd_fwrite(f,&RAM[0x000f],2);
osd_fclose(f);
}
}
/***************************************************************************
Game Driver
***************************************************************************/
struct GameDriver sidetrac_driver =
{
__FILE__,
0,
"sidetrac",
"Side Track",
"1979",
"Exidy",
"Marc LaFontaine\nBrian Levine\nMike Balfour",
0,
&targ_machine_driver,
0,
sidetrac_rom,
0, 0,
targ_sample_names,
0,
sidetrac_input_ports,
0, sidetrac_palette, sidetrac_colortable,
ORIENTATION_DEFAULT,
sidetrac_hiload, sidetrac_hisave
};
struct GameDriver targ_driver =
{
__FILE__,
0,
"targ",
"Targ",
"1980",
"Exidy",
"Neil Bradley (hardware info)\nDan Boris (adaptation of Venture driver)",
0,
&targ_machine_driver,
0,
targ_rom,
0, 0,
targ_sample_names,
0,
targ_input_ports,
0, targ_palette, colortable,
ORIENTATION_DEFAULT,
targ_hiload,targ_hisave
};
struct GameDriver spectar_driver =
{
__FILE__,
0,
"spectar",
"Spectar (revision 3)",
"1980",
"Exidy",
"Neil Bradley (hardware info)\nDan Boris (adaptation of Venture driver)",
0,
&targ_machine_driver,
0,
spectar_rom,
0, 0,
targ_sample_names,
0,
spectar_input_ports,
0, spectar_palette, colortable,
ORIENTATION_DEFAULT,
targ_hiload,targ_hisave
};
struct GameDriver spectar1_driver =
{
__FILE__,
&spectar_driver,
"spectar1",
"Spectar (revision 1?)",
"1980",
"Exidy",
"Neil Bradley (hardware info)\nDan Boris (adaptation of Venture driver)",
0,
&targ_machine_driver,
0,
spectar1_rom,
0, 0,
targ_sample_names,
0,
spectar_input_ports,
0, spectar_palette, colortable,
ORIENTATION_DEFAULT,
targ_hiload,targ_hisave
};
struct GameDriver mtrap_driver =
{
__FILE__,
0,
"mtrap",
"Mouse Trap",
"1981",
"Exidy",
"Marc LaFontaine\nBrian Levine\nMike Balfour\nMarco Cassili",
0,
&machine_driver,
0,
mtrap_rom,
0, 0,
0,
0, /* sound_prom */
mtrap_input_ports,
0, palette, colortable,
ORIENTATION_DEFAULT,
mtrap_hiload,mtrap_hisave
};
struct GameDriver venture_driver =
{
__FILE__,
0,
"venture",
"Venture (set 1)",
"1981",
"Exidy",
"Marc LaFontaine\nNicola Salmoria\nBrian Levine\nMike Balfour\nBryan Smith (hardware info)",
0,
&venture_machine_driver,
0,
venture_rom,
0, 0,
0,
0, /* sound_prom */
venture_input_ports,
0, palette, colortable,
ORIENTATION_DEFAULT,
venture_hiload,venture_hisave
};
struct GameDriver venture2_driver =
{
__FILE__,
&venture_driver,
"venture2",
"Venture (set 2)",
"1981",
"Exidy",
"Marc LaFontaine\nNicola Salmoria\nBrian Levine\nMike Balfour\nBryan Smith (hardware info)",
0,
&venture_machine_driver,
0,
venture2_rom,
0, 0,
0,
0, /* sound_prom */
venture_input_ports,
0, palette, colortable,
ORIENTATION_DEFAULT,
venture_hiload,venture_hisave
};
struct GameDriver venture4_driver =
{
__FILE__,
&venture_driver,
"venture4",
"Venture (version 4)",
"1981",
"Exidy",
"Marc LaFontaine\nNicola Salmoria\nBrian Levine\nMike Balfour\nBryan Smith (hardware info)",
0,
&venture_machine_driver,
0,
venture4_rom,
0, 0,
0,
0, /* sound_prom */
venture_input_ports,
0, palette, colortable,
ORIENTATION_DEFAULT,
venture_hiload,venture_hisave
};
struct GameDriver pepper2_driver =
{
__FILE__,
0,
"pepper2",
"Pepper II",
"1982",
"Exidy",
"Marc LaFontaine\nBrian Levine\nMike Balfour",
0,
&pepper2_machine_driver,
0,
pepper2_rom,
0, 0,
0,
0, /* sound_prom */
pepper2_input_ports,
0, palette, pepper2_colortable,
ORIENTATION_DEFAULT,
pepper2_hiload,pepper2_hisave
};
struct GameDriver hardhat_driver =
{
__FILE__,
0,
"hardhat",
"Hard Hat",
"1982",
"Exidy",
"Marc LaFontaine\nBrian Levine\nMike Balfour",
0,
&pepper2_machine_driver,
0,
hardhat_rom,
0, 0,
0,
0, /* sound_prom */
pepper2_input_ports,
0, palette, pepper2_colortable,
ORIENTATION_DEFAULT,
pepper2_hiload,pepper2_hisave
};
struct GameDriver fax_driver =
{
__FILE__,
0,
"fax",
"Fax",
"1983",
"Exidy",
"Marc LaFontaine\nBrian Levine\nMike Balfour",
0,
&fax_machine_driver,
0,
fax_rom,
0, 0,
0,
0, /* sound_prom */
fax_input_ports,
0, palette, pepper2_colortable,
ORIENTATION_DEFAULT,
fax_hiload,fax_hisave
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -