Merge pull request #264 from retro-wertz/dips2
add vsuni and nwc dipswitch and minor fixes
This commit is contained in:
@@ -63,4 +63,5 @@ endif
|
|||||||
|
|
||||||
SOURCES_C += \
|
SOURCES_C += \
|
||||||
$(CORE_DIR)/ines.c \
|
$(CORE_DIR)/ines.c \
|
||||||
$(CORE_DIR)/unif.c $(CORE_DIR)/x6502.c
|
$(CORE_DIR)/unif.c $(CORE_DIR)/x6502.c \
|
||||||
|
$(CORE_DIR)/drivers/libretro/dipswitch.c
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ else
|
|||||||
WARNING_DEFINES = -Wno-write-strings
|
WARNING_DEFINES = -Wno-write-strings
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(COREDEFINES) $(fpic) $(WARNING_DEFINES) $(DEFINES) $(ENDIANNESS_DEFINES)
|
CFLAGS += $(fpic) $(WARNING_DEFINES) $(DEFINES) $(ENDIANNESS_DEFINES)
|
||||||
LDFLAGS += $(LIBM)
|
LDFLAGS += $(LIBM)
|
||||||
|
|
||||||
ifeq ($(platform), psp1)
|
ifeq ($(platform), psp1)
|
||||||
|
|||||||
@@ -201,12 +201,12 @@ static int DetectMMC1WRAMSize(uint32 crc32) {
|
|||||||
|
|
||||||
static uint32 NWCIRQCount;
|
static uint32 NWCIRQCount;
|
||||||
static uint8 NWCRec;
|
static uint8 NWCRec;
|
||||||
#define NWCDIP 0xE
|
static int32 nwcdip = 0x4;
|
||||||
|
|
||||||
static void NWCIRQHook(int a) {
|
static void NWCIRQHook(int a) {
|
||||||
if (!(NWCRec & 0x10)) {
|
if (!(NWCRec & 0x10)) {
|
||||||
NWCIRQCount += a;
|
NWCIRQCount += a;
|
||||||
if ((NWCIRQCount | (NWCDIP << 25)) >= 0x3e000000) {
|
if (NWCIRQCount >= (0x20000000 | (nwcdip << 25))) {
|
||||||
NWCIRQCount = 0;
|
NWCIRQCount = 0;
|
||||||
X6502_IRQBegin(FCEU_IQEXT);
|
X6502_IRQBegin(FCEU_IQEXT);
|
||||||
}
|
}
|
||||||
@@ -236,6 +236,11 @@ static void NWCPRGHook(uint32 A, uint8 V) {
|
|||||||
static void NWCPower(void) {
|
static void NWCPower(void) {
|
||||||
GenMMC1Power();
|
GenMMC1Power();
|
||||||
setchr8r(0, 0);
|
setchr8r(0, 0);
|
||||||
|
nwcdip = (int32)GameInfo->cspecial;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void NWCReset(void) {
|
||||||
|
nwcdip = (int32)GameInfo->cspecial;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mapper105_Init(CartInfo *info) {
|
void Mapper105_Init(CartInfo *info) {
|
||||||
@@ -244,6 +249,7 @@ void Mapper105_Init(CartInfo *info) {
|
|||||||
MMC1PRGHook16 = NWCPRGHook;
|
MMC1PRGHook16 = NWCPRGHook;
|
||||||
MapIRQHook = NWCIRQHook;
|
MapIRQHook = NWCIRQHook;
|
||||||
info->Power = NWCPower;
|
info->Power = NWCPower;
|
||||||
|
info->Reset = NWCReset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GenMMC1Power(void) {
|
static void GenMMC1Power(void) {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ typedef struct {
|
|||||||
uint32 SaveGameLen[4]; /* How much memory to save/load. */
|
uint32 SaveGameLen[4]; /* How much memory to save/load. */
|
||||||
|
|
||||||
/* Set by iNES/UNIF loading code. */
|
/* Set by iNES/UNIF loading code. */
|
||||||
|
int mapper; /* mapper used */
|
||||||
int mirror; /* As set in the header or chunk.
|
int mirror; /* As set in the header or chunk.
|
||||||
* iNES/UNIF specific. Intended
|
* iNES/UNIF specific. Intended
|
||||||
* to help support games like "Karnov"
|
* to help support games like "Karnov"
|
||||||
|
|||||||
1525
src/drivers/libretro/dipswitch.c
Normal file
1525
src/drivers/libretro/dipswitch.c
Normal file
File diff suppressed because it is too large
Load Diff
11
src/drivers/libretro/dipswitch.h
Normal file
11
src/drivers/libretro/dipswitch.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef __VSUNI_DIPSWITCH__
|
||||||
|
#define __VSUNI_DIPSWITCH__
|
||||||
|
|
||||||
|
#include <libretro.h>
|
||||||
|
|
||||||
|
void set_dipswitch_variables(unsigned *index, struct retro_variable vars[]);
|
||||||
|
void update_dipswitch(void);
|
||||||
|
|
||||||
|
extern retro_environment_t environ_cb;
|
||||||
|
|
||||||
|
#endif /* __VSUNI_DIPSWITCH__ */
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "libretro-common/include/streams/memory_stream.h"
|
#include "libretro-common/include/streams/memory_stream.h"
|
||||||
|
#include "dipswitch.h"
|
||||||
|
|
||||||
#define MAX_PLAYERS 4 /* max supported players */
|
#define MAX_PLAYERS 4 /* max supported players */
|
||||||
#define MAX_PORTS 2 /* max controller ports,
|
#define MAX_PORTS 2 /* max controller ports,
|
||||||
@@ -63,7 +64,7 @@ static retro_video_refresh_t video_cb = NULL;
|
|||||||
static retro_input_poll_t poll_cb = NULL;
|
static retro_input_poll_t poll_cb = NULL;
|
||||||
static retro_input_state_t input_cb = NULL;
|
static retro_input_state_t input_cb = NULL;
|
||||||
static retro_audio_sample_batch_t audio_batch_cb = NULL;
|
static retro_audio_sample_batch_t audio_batch_cb = NULL;
|
||||||
static retro_environment_t environ_cb = NULL;
|
retro_environment_t environ_cb = NULL;
|
||||||
#ifdef PSP
|
#ifdef PSP
|
||||||
static bool use_overscan;
|
static bool use_overscan;
|
||||||
#else
|
#else
|
||||||
@@ -133,6 +134,7 @@ extern uint8 *XBuf;
|
|||||||
extern CartInfo iNESCart;
|
extern CartInfo iNESCart;
|
||||||
extern CartInfo UNIFCart;
|
extern CartInfo UNIFCart;
|
||||||
extern int show_crosshair;
|
extern int show_crosshair;
|
||||||
|
extern int option_ramstate;
|
||||||
|
|
||||||
/* emulator-specific callback functions */
|
/* emulator-specific callback functions */
|
||||||
|
|
||||||
@@ -687,7 +689,7 @@ static unsigned fc_to_libretro(int d)
|
|||||||
|
|
||||||
void retro_set_controller_port_device(unsigned port, unsigned device)
|
void retro_set_controller_port_device(unsigned port, unsigned device)
|
||||||
{
|
{
|
||||||
if ((port < 5) && (input_type[port] != device))
|
if (port < 5)
|
||||||
{
|
{
|
||||||
if (port < 2) /* player 1-2 */
|
if (port < 2) /* player 1-2 */
|
||||||
{
|
{
|
||||||
@@ -737,7 +739,7 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void retro_set_environment(retro_environment_t cb)
|
static void set_variables(void)
|
||||||
{
|
{
|
||||||
static const struct retro_variable vars[] = {
|
static const struct retro_variable vars[] = {
|
||||||
{ "fceumm_region", "Region Override; Auto|NTSC|PAL|Dendy" },
|
{ "fceumm_region", "Region Override; Auto|NTSC|PAL|Dendy" },
|
||||||
@@ -767,9 +769,39 @@ void retro_set_environment(retro_environment_t cb)
|
|||||||
{ "fceumm_show_crosshair", "Show Crosshair; enabled|disabled" },
|
{ "fceumm_show_crosshair", "Show Crosshair; enabled|disabled" },
|
||||||
{ "fceumm_overclocking", "Overclocking; disabled|2x-Postrender|2x-VBlank" },
|
{ "fceumm_overclocking", "Overclocking; disabled|2x-Postrender|2x-VBlank" },
|
||||||
{ "fceumm_ramstate", "RAM power up state (Restart); fill $ff|fill $00|random" },
|
{ "fceumm_ramstate", "RAM power up state (Restart); fill $ff|fill $00|random" },
|
||||||
{ NULL, NULL },
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct retro_variable vars_empty = { NULL, NULL };
|
||||||
|
static struct retro_variable retro_vars[32];
|
||||||
|
unsigned i = 0, index_core = 0;
|
||||||
|
|
||||||
|
while (vars[index_core].key != NULL)
|
||||||
|
{
|
||||||
|
retro_vars[index_core].key = vars[index_core].key;
|
||||||
|
retro_vars[index_core].value = vars[index_core].value;
|
||||||
|
index_core++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* append dipswitches to core options if available */
|
||||||
|
set_dipswitch_variables(&index_core, &retro_vars[0]);
|
||||||
|
|
||||||
|
/* NULL terminate */
|
||||||
|
retro_vars[index_core] = vars_empty;
|
||||||
|
environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)retro_vars);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
/* list core options */
|
||||||
|
i = 0;
|
||||||
|
while (retro_vars[i].key) {
|
||||||
|
FCEU_printf(" { '%s', '%s' }\n", retro_vars[i].key, retro_vars[i].value);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void retro_set_environment(retro_environment_t cb)
|
||||||
|
{
|
||||||
static const struct retro_controller_description pads1[] = {
|
static const struct retro_controller_description pads1[] = {
|
||||||
{ "Auto", RETRO_DEVICE_AUTO },
|
{ "Auto", RETRO_DEVICE_AUTO },
|
||||||
{ "Gamepad", RETRO_DEVICE_GAMEPAD },
|
{ "Gamepad", RETRO_DEVICE_GAMEPAD },
|
||||||
@@ -816,8 +848,7 @@ void retro_set_environment(retro_environment_t cb)
|
|||||||
};
|
};
|
||||||
|
|
||||||
environ_cb = cb;
|
environ_cb = cb;
|
||||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
environ_cb(RETRO_ENVIRONMENT_SET_CONTROLLER_INFO, (void*)ports);
|
||||||
cb(RETRO_ENVIRONMENT_SET_CONTROLLER_INFO, (void*)ports);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void retro_get_system_info(struct retro_system_info *info)
|
void retro_get_system_info(struct retro_system_info *info)
|
||||||
@@ -1035,6 +1066,18 @@ static void check_variables(bool startup)
|
|||||||
char key[256];
|
char key[256];
|
||||||
int i, enable_apu;
|
int i, enable_apu;
|
||||||
|
|
||||||
|
var.key = "fceumm_ramstate";
|
||||||
|
|
||||||
|
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||||
|
{
|
||||||
|
if (!strcmp(var.value, "random"))
|
||||||
|
option_ramstate = 2;
|
||||||
|
else if (!strcmp(var.value, "fill $00"))
|
||||||
|
option_ramstate = 1;
|
||||||
|
else
|
||||||
|
option_ramstate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var.key = "fceumm_palette";
|
var.key = "fceumm_palette";
|
||||||
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||||
@@ -1202,8 +1245,6 @@ static void check_variables(bool startup)
|
|||||||
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||||
{
|
{
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
turbo_enabler[0] = 0;
|
turbo_enabler[0] = 0;
|
||||||
turbo_enabler[1] = 0;
|
turbo_enabler[1] = 0;
|
||||||
|
|
||||||
@@ -1319,6 +1360,7 @@ static void check_variables(bool startup)
|
|||||||
set_apu_channels(0xff);
|
set_apu_channels(0xff);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
update_dipswitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mzx = 0, mzy = 0;
|
static int mzx = 0, mzy = 0;
|
||||||
@@ -1971,7 +2013,6 @@ static char slash = '/';
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern uint32_t iNESGameCRC32;
|
extern uint32_t iNESGameCRC32;
|
||||||
extern int option_ramstate;
|
|
||||||
|
|
||||||
bool retro_load_game(const struct retro_game_info *game)
|
bool retro_load_game(const struct retro_game_info *game)
|
||||||
{
|
{
|
||||||
@@ -2034,7 +2075,6 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
|
|
||||||
struct retro_memory_descriptor descs[64];
|
struct retro_memory_descriptor descs[64];
|
||||||
struct retro_memory_map mmaps;
|
struct retro_memory_map mmaps;
|
||||||
struct retro_variable var = {0};
|
|
||||||
|
|
||||||
if (!game)
|
if (!game)
|
||||||
return false;
|
return false;
|
||||||
@@ -2053,20 +2093,6 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
* when loading another rom causing save state size change. */
|
* when loading another rom causing save state size change. */
|
||||||
serialize_size = 0;
|
serialize_size = 0;
|
||||||
|
|
||||||
var.value = 0;
|
|
||||||
var.key = "fceumm_ramstate";
|
|
||||||
|
|
||||||
/* set this variable before calling PowerNES() */
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
|
||||||
{
|
|
||||||
if (!strcmp(var.value, "random"))
|
|
||||||
option_ramstate = 2;
|
|
||||||
else if (!strcmp(var.value, "fill $00"))
|
|
||||||
option_ramstate = 1;
|
|
||||||
else
|
|
||||||
option_ramstate = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
PowerNES();
|
PowerNES();
|
||||||
check_system_specs();
|
check_system_specs();
|
||||||
#if defined(_3DS)
|
#if defined(_3DS)
|
||||||
@@ -2103,7 +2129,7 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
|
|
||||||
for (i = 0; i < MAX_PORTS; i++) {
|
for (i = 0; i < MAX_PORTS; i++) {
|
||||||
FCEUI_SetInput(i, SI_GAMEPAD, &JSReturn, 0);
|
FCEUI_SetInput(i, SI_GAMEPAD, &JSReturn, 0);
|
||||||
input_type[i] == RETRO_DEVICE_JOYPAD;
|
input_type[i] = RETRO_DEVICE_JOYPAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
external_palette_exist = ipalette;
|
external_palette_exist = ipalette;
|
||||||
@@ -2113,9 +2139,10 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
is_PAL = retro_get_region(); /* Save current loaded region info */
|
is_PAL = retro_get_region(); /* Save current loaded region info */
|
||||||
|
|
||||||
retro_set_custom_palette();
|
retro_set_custom_palette();
|
||||||
|
|
||||||
FCEUD_SoundToggle();
|
FCEUD_SoundToggle();
|
||||||
|
set_variables();
|
||||||
check_variables(true);
|
check_variables(true);
|
||||||
|
PowerNES();
|
||||||
|
|
||||||
FCEUI_DisableFourScore(1);
|
FCEUI_DisableFourScore(1);
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ typedef struct {
|
|||||||
uint8 MD5[16];
|
uint8 MD5[16];
|
||||||
int soundrate; /* For Ogg Vorbis expansion sound wacky support. 0 for default. */
|
int soundrate; /* For Ogg Vorbis expansion sound wacky support. 0 for default. */
|
||||||
int soundchan; /* Number of sound channels. */
|
int soundchan; /* Number of sound channels. */
|
||||||
|
int gameid; /* VS game id for per-game settings e.g. dip switches */
|
||||||
} FCEUGI;
|
} FCEUGI;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -792,6 +792,7 @@ int iNESLoad(const char *name, FCEUFILE *fp) {
|
|||||||
|
|
||||||
if (!iNES_Init(MapperNo))
|
if (!iNES_Init(MapperNo))
|
||||||
FCEU_PrintError("iNES mapper #%d is not supported at all.", MapperNo);
|
FCEU_PrintError("iNES mapper #%d is not supported at all.", MapperNo);
|
||||||
|
iNESCart.mapper = MapperNo;
|
||||||
|
|
||||||
GameInterface = iNESGI;
|
GameInterface = iNESGI;
|
||||||
FCEU_printf("\n");
|
FCEU_printf("\n");
|
||||||
|
|||||||
88
src/vsuni.c
88
src/vsuni.c
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *name;
|
char *name;
|
||||||
|
int gameid;
|
||||||
uint64 md5partial;
|
uint64 md5partial;
|
||||||
int mapper;
|
int mapper;
|
||||||
int mirroring;
|
int mirroring;
|
||||||
@@ -245,48 +246,45 @@ RC2C05-04:
|
|||||||
|
|
||||||
VSUNIENTRY VSUniGames[] =
|
VSUNIENTRY VSUniGames[] =
|
||||||
{
|
{
|
||||||
{ "Baseball", 0x691d4200ea42be45LL, 99, 2, RP2C04_0001, 0 },
|
{ "Baseball", VS_BASEBALL, 0x691d4200ea42be45LL, 99, 2, RP2C04_0001, 0 },
|
||||||
{ "Battle City", 0x8540949d74c4d0ebLL, 99, 2, RP2C04_0001, 0 },
|
{ "Battle City", VS_BATTLECITY, 0x8540949d74c4d0ebLL, 99, 2, RP2C04_0001, 0 },
|
||||||
{ "Battle City(Bootleg)", 0x8093cbe7137ac031LL, 99, 2, RP2C04_0001, 0 },
|
{ "Battle City(Bootleg)", VS_BATTLECITY, 0x8093cbe7137ac031LL, 99, 2, RP2C04_0001, 0 },
|
||||||
|
{ "Clu Clu Land", VS_CLUCLULAND, 0x1b8123218f62b1eeLL, 99, 2, RP2C04_0004, IOPTION_SWAPDIRAB },
|
||||||
{ "Clu Clu Land", 0x1b8123218f62b1eeLL, 99, 2, RP2C04_0004, IOPTION_SWAPDIRAB },
|
{ "Dr Mario", VS_DRMARIO, 0xe1af09c477dc0081LL, 1, 0, RP2C04_0003, IOPTION_SWAPDIRAB },
|
||||||
{ "Dr Mario", 0xe1af09c477dc0081LL, 1, 0, RP2C04_0003, IOPTION_SWAPDIRAB },
|
{ "Duck Hunt", VS_DUCKHUNT, 0x47735d1e5f1205bbLL, 99, 2, RCP2C03B, IOPTION_GUN },
|
||||||
{ "Duck Hunt", 0x47735d1e5f1205bbLL, 99, 2, RCP2C03B, IOPTION_GUN },
|
{ "Excitebike", VS_EXITEBIKE, 0x3dcd1401bcafde77LL, 99, 2, RP2C04_0003, 0 },
|
||||||
{ "Excitebike", 0x3dcd1401bcafde77LL, 99, 2, RP2C04_0003, 0 },
|
{ "Excitebike (J)", VS_EXITEBIKE, 0x7ea51c9d007375f0LL, 99, 2, RP2C04_0004, 0 },
|
||||||
{ "Excitebike (J)", 0x7ea51c9d007375f0LL, 99, 2, RP2C04_0004, 0 },
|
{ "Freedom Force", VS_FREEDOMFORCE, 0xed96436bd1b5e688LL, 4, 0, RP2C04_0001, IOPTION_GUN }, /* Wrong color in game select screen? */
|
||||||
{ "Freedom Force", 0xed96436bd1b5e688LL, 4, 0, RP2C04_0001, IOPTION_GUN }, /* Wrong color in game select screen? */
|
{ "Stroke and Match Golf", VS_STROKEANDMATCHGOLF, 0x612325606e82bc66LL, 99, 2, RP2C04_0002, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x01 },
|
||||||
{ "Stroke and Match Golf", 0x612325606e82bc66LL, 99, 2, RP2C04_0002, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x01 },
|
{ "Goonies", VS_GOONIES, 0xb4032d694e1d2733LL, 151, 1, RP2C04_0003, 0 },
|
||||||
|
{ "Gradius", VS_GRADIUS, 0x50687ae63bdad976LL, 151, 1, RP2C04_0001, IOPTION_SWAPDIRAB },
|
||||||
{ "Goonies", 0xb4032d694e1d2733LL, 151, 1, RP2C04_0003, 0 },
|
{ "Gumshoe", VS_GUMSHOE, 0x87161f8ee37758d3LL, 99, 2, RC2C05_03, IOPTION_GUN },
|
||||||
{ "Gradius", 0x50687ae63bdad976LL, 151, 1, RP2C04_0001, IOPTION_SWAPDIRAB },
|
{ "Gumshoe", VS_GUMSHOE, 0xb8500780bf69ce29LL, 99, 2, RC2C05_03, IOPTION_GUN },
|
||||||
{ "Gumshoe", 0x87161f8ee37758d3LL, 99, 2, RC2C05_03, IOPTION_GUN },
|
{ "Gumshoe", VS_GUMSHOE, 0xa6bf132ba11d0a8cLL, 99, 2, RC2C05_03, IOPTION_GUN }, /* Gumshoe (VS).nes added: 2017-9-5*/
|
||||||
{ "Gumshoe", 0xb8500780bf69ce29LL, 99, 2, RC2C05_03, IOPTION_GUN },
|
{ "Hogan's Alley", VS_HOGANSALLEY, 0xd78b7f0bb621fb45LL, 99, 2, RP2C04_0001, IOPTION_GUN },
|
||||||
{ "Gumshoe", 0xa6bf132ba11d0a8cLL, 99, 2, RC2C05_03, IOPTION_GUN }, /* Gumshoe (VS).nes added: 2017-9-5*/
|
{ "Ice Climber", VS_ICECLIMBER, 0xd21e999513435e2aLL, 99, 2, RP2C04_0004, IOPTION_SWAPDIRAB },
|
||||||
{ "Hogan's Alley", 0xd78b7f0bb621fb45LL, 99, 2, RP2C04_0001, IOPTION_GUN },
|
{ "Ladies Golf", VS_LADIESGOLF, 0x781b24be57ef6785LL, 99, 2, RP2C04_0002, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x1 },
|
||||||
{ "Ice Climber", 0xd21e999513435e2aLL, 99, 2, RP2C04_0004, IOPTION_SWAPDIRAB },
|
{ "Mach Rider", VS_MACHRIDER, 0x015672618af06441LL, 99, 2, RP2C04_0002, 0 },
|
||||||
{ "Ladies Golf", 0x781b24be57ef6785LL, 99, 2, RP2C04_0002, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x1 },
|
{ "Mach Rider (J)", VS_MACHRIDER, 0xa625afb399811a8aLL, 99, 2, RP2C04_0001, 0 },
|
||||||
|
{ "Mighty Bomb Jack", VS_MIGHTYBOMBJACK, 0xe6a89f4873fac37bLL, 0, 2, RC2C05_02, 0 },
|
||||||
{ "Mach Rider", 0x015672618af06441LL, 99, 2, RP2C04_0002, 0 },
|
{ "Ninja Jajamaru Kun", VS_JAJAMARU, 0xb26a2c31474099c0LL, 99, 2, RC2C05_01, IOPTION_SWAPDIRAB },
|
||||||
{ "Mach Rider (J)", 0xa625afb399811a8aLL, 99, 2, RP2C04_0001, 0 },
|
{ "Pinball", VS_PINBALL, 0xc5f49d3de7f2e9b8LL, 99, 2, RP2C04_0001, IOPTION_PREDIP, 0x01 },
|
||||||
{ "Mighty Bomb Jack", 0xe6a89f4873fac37bLL, 0, 2, RC2C05_02, 0 },
|
{ "Pinball (J)", VS_PINBALL, 0x66ab1a3828cc901cLL, 99, 2, RCP2C03B, IOPTION_PREDIP, 0x1 },
|
||||||
{ "Ninja Jajamaru Kun", 0xb26a2c31474099c0LL, 99, 2, RC2C05_01, IOPTION_SWAPDIRAB },
|
{ "Platoon", VS_PLATOON, 0x160f237351c19f1fLL, 68, 1, RP2C04_0001, 0 },
|
||||||
{ "Pinball", 0xc5f49d3de7f2e9b8LL, 99, 2, RP2C04_0001, IOPTION_PREDIP, 0x01 },
|
{ "RBI Baseball", VS_RBIBASEBALL, 0x6a02d345812938afLL, 4, 1, RP2C04_0001, IOPTION_SWAPDIRAB },
|
||||||
{ "Pinball (J)", 0x66ab1a3828cc901cLL, 99, 2, RCP2C03B, IOPTION_PREDIP, 0x1 },
|
{ "Soccer", VS_SOCCER, 0xd4e7a9058780eda3LL, 99, 2, RP2C04_0003, IOPTION_SWAPDIRAB },
|
||||||
{ "Platoon", 0x160f237351c19f1fLL, 68, 1, RP2C04_0001, 0 },
|
{ "Star Luster", VS_STARLUSTER, 0x8360e134b316d94cLL, 99, 2, RCP2C03B, 0 },
|
||||||
{ "RBI Baseball", 0x6a02d345812938afLL, 4, 1, RP2C04_0001, IOPTION_SWAPDIRAB },
|
{ "Stroke and Match Golf (J)", VS_STROKEANDMATCHGOLF, 0x869bb83e02509747LL, 99, 2, RCP2C03B, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x1 },
|
||||||
{ "Soccer", 0xd4e7a9058780eda3LL, 99, 2, RP2C04_0003, IOPTION_SWAPDIRAB },
|
{ "Super Sky Kid", VS_SUPERSKYKID, 0x78d04c1dd4ec0101LL, 4, 1, RCP2C03B, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x20 },
|
||||||
{ "Star Luster", 0x8360e134b316d94cLL, 99, 2, RCP2C03B, 0 },
|
{ "Super Xevious", VS_SUPERXEVIOUS, 0x2d396247cf58f9faLL, 206, 0, RP2C04_0001, 0 },
|
||||||
{ "Stroke and Match Golf (J)", 0x869bb83e02509747LL, 99, 2, RCP2C03B, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x1 },
|
{ "Tetris", VS_TETRIS, 0x531a5e8eea4ce157LL, 99, 2, RCP2C03B, IOPTION_PREDIP, 0x20 },
|
||||||
{ "Super Sky Kid", 0x78d04c1dd4ec0101LL, 4, 1, RCP2C03B, IOPTION_SWAPDIRAB | IOPTION_PREDIP, 0x20 },
|
{ "Top Gun", VS_TOPGUN, 0xf1dea36e6a7b531dLL, 2, 0, RC2C05_04, 0 },
|
||||||
|
{ "VS Castlevania", VS_CASTLEVANIA, 0x92fd6909c81305b9LL, 2, 1, RP2C04_0002, 0 },
|
||||||
{ "Super Xevious", 0x2d396247cf58f9faLL, 206, 0, RP2C04_0001, 0 },
|
{ "VS Slalom", VS_SLALOM, 0x4889b5a50a623215LL, 0, 1, RP2C04_0002, 0 },
|
||||||
{ "Tetris", 0x531a5e8eea4ce157LL, 99, 2, RCP2C03B, IOPTION_PREDIP, 0x20 },
|
{ "VS Super Mario Bros", VS_SMB, 0x39d8cfa788e20b6cLL, 99, 2, RP2C04_0004, 0 },
|
||||||
{ "Top Gun", 0xf1dea36e6a7b531dLL, 2, 0, RC2C05_04, 0 },
|
{ "VS Super Mario Bros [a1]", VS_SMB, 0xfc182e5aefbce14dLL, 99, 2, RP2C04_0004, 0 },
|
||||||
{ "VS Castlevania", 0x92fd6909c81305b9LL, 2, 1, RP2C04_0002, 0 },
|
{ "VS TKO Boxing", VS_TKOBOXING, 0x6e1ee06171d8ce3aLL, 206, 1, RP2C04_0003, IOPTION_PREDIP, 0x00 },
|
||||||
{ "VS Slalom", 0x4889b5a50a623215LL, 0, 1, RP2C04_0002, 0 },
|
{ "VS TKO Boxing [a1]", VS_TKOBOXING, 0xa1c694ce147bc1edLL, 206, 1, RP2C04_0003, IOPTION_PREDIP, 0x00 },
|
||||||
{ "VS Super Mario Bros", 0x39d8cfa788e20b6cLL, 99, 2, RP2C04_0004, 0 },
|
|
||||||
{ "VS Super Mario Bros [a1]", 0xfc182e5aefbce14dLL, 99, 2, RP2C04_0004, 0 },
|
|
||||||
{ "VS TKO Boxing", 0x6e1ee06171d8ce3aLL, 4, 1, RP2C04_0003, IOPTION_PREDIP, 0x00 },
|
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -302,14 +300,18 @@ void FCEU_VSUniCheck(uint64 md5partial, int *MapperNo, uint8 *Mirroring) {
|
|||||||
GameInfo->type = GIT_VSUNI;
|
GameInfo->type = GIT_VSUNI;
|
||||||
GameInfo->cspecial = SIS_VSUNISYSTEM;
|
GameInfo->cspecial = SIS_VSUNISYSTEM;
|
||||||
GameInfo->inputfc = SIFC_NONE;
|
GameInfo->inputfc = SIFC_NONE;
|
||||||
|
GameInfo->gameid = vs->gameid;
|
||||||
curppu = vs->ppu;
|
curppu = vs->ppu;
|
||||||
curmd5 = md5partial;
|
curmd5 = md5partial;
|
||||||
|
|
||||||
|
FCEU_printf(" System: VS-UniSystem\n");
|
||||||
|
FCEU_printf(" Name: %s\n", vs->name);
|
||||||
|
|
||||||
secptr = 0;
|
secptr = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
static int64 tko = 0x6e1ee06171d8ce3aULL, rbi = 0x6a02d345812938afULL;
|
static int64 tko = 0x6e1ee06171d8ce3aULL, rbi = 0x6a02d345812938afULL;
|
||||||
if (md5partial == tko)
|
if (vs->gameid & VS_TKOBOXING)
|
||||||
secptr = secdata[0];
|
secptr = secdata[0];
|
||||||
if (md5partial == rbi)
|
if (md5partial == rbi)
|
||||||
secptr = secdata[1];
|
secptr = secdata[1];
|
||||||
|
|||||||
33
src/vsuni.h
33
src/vsuni.h
@@ -9,4 +9,37 @@ void FCEU_VSUniToggleDIP(int); /* For movies and netplay */
|
|||||||
void FCEU_VSUniCoin(void);
|
void FCEU_VSUniCoin(void);
|
||||||
void FCEU_VSUniSwap(uint8 *j0, uint8 *j1);
|
void FCEU_VSUniSwap(uint8 *j0, uint8 *j1);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
VS_BASEBALL = 1,
|
||||||
|
VS_BATTLECITY,
|
||||||
|
VS_CASTLEVANIA,
|
||||||
|
VS_CLUCLULAND,
|
||||||
|
VS_DRMARIO,
|
||||||
|
VS_DUCKHUNT,
|
||||||
|
VS_EXITEBIKE,
|
||||||
|
VS_FREEDOMFORCE,
|
||||||
|
VS_GOONIES,
|
||||||
|
VS_GRADIUS,
|
||||||
|
VS_GUMSHOE,
|
||||||
|
VS_HOGANSALLEY,
|
||||||
|
VS_ICECLIMBER,
|
||||||
|
VS_JAJAMARU,
|
||||||
|
VS_LADIESGOLF,
|
||||||
|
VS_MACHRIDER,
|
||||||
|
VS_MIGHTYBOMBJACK,
|
||||||
|
VS_PINBALL,
|
||||||
|
VS_PLATOON,
|
||||||
|
VS_RBIBASEBALL,
|
||||||
|
VS_SLALOM,
|
||||||
|
VS_SMB,
|
||||||
|
VS_SOCCER,
|
||||||
|
VS_STARLUSTER,
|
||||||
|
VS_STROKEANDMATCHGOLF,
|
||||||
|
VS_SUPERSKYKID,
|
||||||
|
VS_SUPERXEVIOUS,
|
||||||
|
VS_TETRIS,
|
||||||
|
VS_TKOBOXING,
|
||||||
|
VS_TOPGUN
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user