Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Nov 11, 2023
1 parent 17f12e1 commit 401a407
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
11 changes: 5 additions & 6 deletions src/cart.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ uint32 CHRmask8[32];

int geniestage = 0;

int modcon;
static int modcon;

uint8 genieval[3];
uint8 geniech[3];
static uint8 genieval[3];
static uint8 geniech[3];

uint32 genieaddr[3];
static uint32 genieaddr[3];

static INLINE void setpageptr(int s, uint32 A, uint8 *p, int ram) {
uint32 AB = A >> 11;
Expand All @@ -104,9 +104,8 @@ void ResetCartMapping(void) {
PRGptr[x] = CHRptr[x] = 0;
PRGsize[x] = CHRsize[x] = 0;
}
for (x = 0; x < 8; x++) {
for (x = 0; x < 8; x++)
MMC5SPRVPage[x] = MMC5BGVPage[x] = VPageR[x] = nothing - 0x400 * x;
}
}

void SetupCartPRGMapping(int chip, uint8 *p, uint32 size, int ram) {
Expand Down
13 changes: 0 additions & 13 deletions src/cheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,6 @@ int FCEUI_DecodePAR(const char *str, uint16 *a, uint8 *v, int *c, int *type) {
sscanf(str, "%02x%02x%02x%02x", boo, boo + 1, boo + 2, boo + 3);

*c = -1;

/* 2020-08-31
* Why is the top code set as default on non-debug runtime when
* bottom code is what works for PAR?
*/
/* if (1) {
*a = (boo[3] << 8) | (boo[2] + 0x7F);
*v = 0;
} else {
*v = boo[3];
*a = boo[2] | (boo[1] << 8);
} */

*v = boo[3];
*a = boo[2] | (boo[1] << 8);

Expand Down
5 changes: 0 additions & 5 deletions src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ int FCEU_fgetc(FCEUFILE *fp)
return EOF;
}

uint64 FCEU_ftell(FCEUFILE *fp)
{
return fp->fp->location;
}

uint64 FCEU_fgetsize(FCEUFILE *fp)
{
return fp->fp->size;
Expand Down
1 change: 0 additions & 1 deletion src/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ FCEUFILE *FCEU_fopen(const char *path, const uint8 *buffer, size_t bufsize);
int FCEU_fclose(FCEUFILE*);
uint64 FCEU_fread(void *ptr, size_t size, size_t nmemb, FCEUFILE*);
int FCEU_fseek(FCEUFILE*, long offset, int whence);
uint64 FCEU_ftell(FCEUFILE*);
int FCEU_read32le(uint32 *Bufo, FCEUFILE*);
int FCEU_fgetc(FCEUFILE*);
uint64 FCEU_fgetsize(FCEUFILE*);
Expand Down

0 comments on commit 401a407

Please sign in to comment.