Cleanups; turn some functions static

This commit is contained in:
twinaphex
2021-06-06 02:02:46 +02:00
parent 8331b3c425
commit 658ef18d2e

View File

@@ -224,10 +224,13 @@ static struct BADINF BadROMImages[] =
#include "ines-bad.h" #include "ines-bad.h"
}; };
void CheckBad(uint64 md5partial) { static void CheckBad(uint64 md5partial)
{
int32 x = 0; int32 x = 0;
while (BadROMImages[x].name) { while (BadROMImages[x].name)
if (BadROMImages[x].md5partial == md5partial) { {
if (BadROMImages[x].md5partial == md5partial)
{
FCEU_PrintError("The copy game you have loaded, \"%s\", is bad, and will not work properly in FCE Ultra.", BadROMImages[x].name); FCEU_PrintError("The copy game you have loaded, \"%s\", is bad, and will not work properly in FCE Ultra.", BadROMImages[x].name);
return; return;
} }
@@ -247,22 +250,23 @@ struct CHINF {
int32 extra; int32 extra;
}; };
static void CheckHInfo(void) { static void CheckHInfo(void)
{
#define DEFAULT (-1) #define DEFAULT (-1)
#define NOEXTRA (-1) #define NOEXTRA (-1)
/* used for mirroring special overrides */ /* used for mirroring special overrides */
#define MI_4 2 /* forced 4-screen mirroring */ #define MI_4 2 /* forced 4-screen mirroring */
#define DFAULT8 8 /* anything but hard-wired (4-screen) mirroring, mapper-controlled */ #define DFAULT8 8 /* anything but hard-wired (4-screen) mirroring, mapper-controlled */
/* tv system/region */ /* tv system/region */
#define PAL 1 #define PAL 1
#define MULTI 2 #define MULTI 2
#define DENDY 3 #define DENDY 3
static struct CHINF moo[] = static struct CHINF moo[] =
{ {
#include "ines-correct.h" #include "ines-correct.h"
}; };
int32 tofix = 0, x; int32 tofix = 0, x;
uint64 partialmd5 = 0; uint64 partialmd5 = 0;
@@ -804,13 +808,15 @@ INES_BOARD_BEGIN()
INES_BOARD( "LH53", 535, LH53_Init ) INES_BOARD( "LH53", 535, LH53_Init )
INES_BOARD_END() INES_BOARD_END()
static uint32 get_ines_version(void) { static uint32 get_ines_version(void)
{
if ((head.ROM_type2 & 0x0C) == 0x08) if ((head.ROM_type2 & 0x0C) == 0x08)
return 1; return 1;
return 0; return 0;
} }
static uint32 get_ines_mapper_id(void) { static uint32 get_ines_mapper_id(void)
{
/* If byte 7 AND $0C = $08, and the size taking into account byte 9 does not exceed the actual size of the ROM image, then NES 2.0. /* If byte 7 AND $0C = $08, and the size taking into account byte 9 does not exceed the actual size of the ROM image, then NES 2.0.
* If byte 7 AND $0C = $00, and bytes 12-15 are all 0, then iNES. * If byte 7 AND $0C = $00, and bytes 12-15 are all 0, then iNES.
* Otherwise, archaic iNES. - nesdev*/ * Otherwise, archaic iNES. - nesdev*/