mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 03:01:50 +01:00
corrected peripheral support display in rominfo.c
This commit is contained in:
parent
217ca8de3f
commit
1bb58b69b9
2
Makefile
2
Makefile
@ -26,7 +26,7 @@ INCLUDES := source source/m68k source/cpu source/sound \
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
|
MACHDEP = -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
|
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
|
||||||
-DGENESIS_HACKS="1" \
|
-DNGC="1" -DGENESIS_HACKS="1" \
|
||||||
|
|
||||||
LDFLAGS = $(MACHDEP) -mogc -Wl,-Map,$(notdir $@).map -Wl,--cref
|
LDFLAGS = $(MACHDEP) -mogc -Wl,-Map,$(notdir $@).map -Wl,--cref
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ int getcompany ()
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
void getrominfo (char *romheader)
|
void getrominfo (char *romheader)
|
||||||
{
|
{
|
||||||
int i;
|
int i,j;
|
||||||
|
|
||||||
memset (&rominfo, 0, sizeof (ROMINFO));
|
memset (&rominfo, 0, sizeof (ROMINFO));
|
||||||
|
|
||||||
@ -251,9 +251,8 @@ void getrominfo (char *romheader)
|
|||||||
peripherals = 0;
|
peripherals = 0;
|
||||||
|
|
||||||
for (i = 0; i < 14; i++)
|
for (i = 0; i < 14; i++)
|
||||||
{
|
for (j=0; j < 14; j++)
|
||||||
if (rominfo.io_support[i] == peripheralinfo[i].pID[0]) peripherals |= (1 << i);
|
if (rominfo.io_support[i] == peripheralinfo[j].pID[0]) peripherals |= (1 << j);
|
||||||
}
|
|
||||||
|
|
||||||
if (peripherals & P6BUTTONS) pad_type = DEVICE_6BUTTON;
|
if (peripherals & P6BUTTONS) pad_type = DEVICE_6BUTTON;
|
||||||
else pad_type = DEVICE_3BUTTON;
|
else pad_type = DEVICE_3BUTTON;
|
||||||
@ -283,6 +282,7 @@ void showrominfo ()
|
|||||||
char msg[128];
|
char msg[128];
|
||||||
short p;
|
short p;
|
||||||
signed char a;
|
signed char a;
|
||||||
|
char pName[14][21];
|
||||||
uint16 realchecksum = GetRealChecksum (((uint8 *) cart_rom) + 0x200, genromsize - 0x200);
|
uint16 realchecksum = GetRealChecksum (((uint8 *) cart_rom) + 0x200, genromsize - 0x200);
|
||||||
|
|
||||||
quit = 0;
|
quit = 0;
|
||||||
@ -295,7 +295,11 @@ void showrominfo ()
|
|||||||
max = 14;
|
max = 14;
|
||||||
for (i = 0; i < 14; i++)
|
for (i = 0; i < 14; i++)
|
||||||
{
|
{
|
||||||
if ((char) rominfo.io_support[i] == peripheralinfo[i].pID[0]) max ++;
|
if (peripherals & (1 << i))
|
||||||
|
{
|
||||||
|
sprintf(pName[max-14],"%s", peripheralinfo[i].pName);
|
||||||
|
max ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -361,7 +365,7 @@ void showrominfo ()
|
|||||||
else if (region_code == REGION_JAPAN_PAL) sprintf (msg, "Region - %s (JPAL)", rominfo.country);
|
else if (region_code == REGION_JAPAN_PAL) sprintf (msg, "Region - %s (JPAL)", rominfo.country);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sprintf (msg, "Supports - %s", peripheralinfo[i+j-14].pName);
|
sprintf (msg, "Supports - %s", pName[i+j-14]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <gccore.h>
|
#include <gccore.h>
|
||||||
#include <ogcsys.h>
|
#include <ogcsys.h>
|
||||||
#include <sdcard.h>
|
#include <sdcard.h>
|
||||||
|
#include <gcaram.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user