Skip to content

Commit

Permalink
Change Debug Colors setting to be clearer for all languages
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Aug 17, 2021
1 parent c43f188 commit 443b756
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion ee_core/include/ee_core.h
Expand Up @@ -87,7 +87,7 @@ extern int EnablePadEmuOp;
extern int PadEmuSettings;
#endif

extern int DisableDebug;
extern int EnableDebug;
#define GS_BGCOLOUR *((volatile unsigned long int *)0x120000E0)

extern int *gCheatList; // Store hooks/codes addr+val pairs
Expand Down
4 changes: 2 additions & 2 deletions ee_core/src/asm.S
Expand Up @@ -55,7 +55,7 @@

/* loader.h */
.extern g_compat_mask
.extern DisableDebug
.extern EnableDebug

/* padhook.c */
.extern Install_PadOpen_Hook
Expand Down Expand Up @@ -210,7 +210,7 @@ Hook_SifSetReg:
bne $v0, $zero, 3f
nop

lw $v0, DisableDebug
lw $v0, EnableDebug
bne $v0, $zero, 2f
nop

Expand Down
8 changes: 4 additions & 4 deletions ee_core/src/iopmgr.c
Expand Up @@ -145,7 +145,7 @@ static void ResetIopSpecial(const char *args, unsigned int arglen)
int New_Reset_Iop(const char *arg, int arglen)
{
DPRINTF("New_Reset_Iop start!\n");
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFF00FF; // Purple

SifInitRpc(0);
Expand All @@ -166,12 +166,12 @@ int New_Reset_Iop(const char *arg, int arglen)
sbv_patch_enable_lmb();

ResetIopSpecial(NULL, 0);
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x00A5FF; // Orange

if (arglen > 0) {
ResetIopSpecial(&arg[10], arglen - 10);
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x00FFFF; // Yellow
}

Expand Down Expand Up @@ -199,7 +199,7 @@ int New_Reset_Iop(const char *arg, int arglen)
if (set_reg_disabled)
set_reg_hook = 4;

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x000000; // Black

return 1;
Expand Down
10 changes: 5 additions & 5 deletions ee_core/src/main.c
Expand Up @@ -37,7 +37,7 @@ int EnableCheatOp;
int EnablePadEmuOp;
int PadEmuSettings;
#endif
int DisableDebug;
int EnableDebug;
int *gCheatList; // Store hooks/codes addr+val pairs

static int eecoreInit(int argc, char **argv)
Expand All @@ -64,10 +64,10 @@ static int eecoreInit(int argc, char **argv)
DPRINTF("Game Mode = %d\n", GameMode);

p = _strtok(NULL, " ");
DisableDebug = 0;
EnableDebug = 0;
if (!_strncmp(p, "1", 1)) {
DisableDebug = 1;
DPRINTF("Debug Colors disabled\n");
EnableDebug = 1;
DPRINTF("Debug Colors enabled\n");
}

p = _strtok(NULL, " ");
Expand Down Expand Up @@ -153,7 +153,7 @@ static int eecoreInit(int argc, char **argv)
DPRINTF("Installing Kernel Hooks...\n");
Install_Kernel_Hooks();

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xff0000; // Blue

SifExitRpc();
Expand Down
36 changes: 18 additions & 18 deletions ee_core/src/padhook.c
Expand Up @@ -64,19 +64,19 @@ static void t_loadElf(void)
char *argv[2];
t_ExecData elf;

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x80FF00; // Blue Green

// Init RPC & CMD
SifInitRpc(0);

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x000080; // Dark Red

// Apply Sbv patches
sbv_patch_disable_prefix_check();

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFF8000; // Blue sky

// Load basic modules
Expand Down Expand Up @@ -115,14 +115,14 @@ static void t_loadElf(void)
FlushCache(0);
FlushCache(2);

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x0080FF; // Orange

// Execute BOOT.ELF
ExecPS2((void *)elf.epc, (void *)elf.gp, 1, argv);
}

if (!DisableDebug) {
if (EnableDebug) {
GS_BGCOLOUR = 0x0000FF; // Red
delay(5);
}
Expand All @@ -142,7 +142,7 @@ static void IGR_Thread(void *arg)

DPRINTF("IGR thread woken up!\n");

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFFFFFF; // White

// Re-Init RPC & CMD
Expand All @@ -155,12 +155,12 @@ static void IGR_Thread(void *arg)
#endif
) {

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFF8000; // Blue sky

oplIGRShutdown(0);

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x0000FF; // Red

// Reset IO Processor
Expand Down Expand Up @@ -193,27 +193,27 @@ static void IGR_Thread(void *arg)
}

if (EnableGSMOp) {
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x00FF00; // Green
DPRINTF("Stopping GSM...\n");
DisableGSM();
}

if (EnableCheatOp) {
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFF0000; // Blue
DPRINTF("Stopping PS2RD Cheat Engine...\n");
DisableCheats();
}

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x00FFFF; // Yellow

while (!SifIopSync()) {
;
}

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0xFF80FF; // Pink

// Init RPC & CMD
Expand All @@ -222,7 +222,7 @@ static void IGR_Thread(void *arg)
LoadFileInit();
sbv_patch_enable_lmb();

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x800000; // Dark Blue

// Reset SPU - do it after the IOP reboot, so nothing will compete with the EE for it.
Expand All @@ -233,7 +233,7 @@ static void IGR_Thread(void *arg)
InGameScreenshot();
#endif

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x008000; // Dark Green

// Exit services
Expand All @@ -243,7 +243,7 @@ static void IGR_Thread(void *arg)

IGR_Exit(0);
} else {
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x0000FF; // Red

// If combo is R3 + L3, Poweroff PS2
Expand Down Expand Up @@ -528,7 +528,7 @@ int Install_PadOpen_Hook(u32 mem_start, u32 mem_end, int mode)
ptr = (u32 *)mem_start;
while (ptr) {
// Purple while PadOpen pattern search
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x800080; // Purple

mem_size = mem_end - (u32)ptr;
Expand All @@ -540,7 +540,7 @@ int Install_PadOpen_Hook(u32 mem_start, u32 mem_end, int mode)
found = 1;

// Green while PadOpen patches
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x008000; // Dark green

// Save original PadOpen function
Expand Down Expand Up @@ -655,7 +655,7 @@ int Install_PadOpen_Hook(u32 mem_start, u32 mem_end, int mode)
}

// Done
if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x000000; // Black

return patched;
Expand Down
2 changes: 1 addition & 1 deletion ee_core/src/syshook.c
Expand Up @@ -84,7 +84,7 @@ void sysLoadElf(char *filename, int argc, char **argv)

DPRINTF("t_loadElf: elf path = '%s'\n", filename);

if (!DisableDebug)
if (EnableDebug)
GS_BGCOLOUR = 0x00ff00; // Green

DPRINTF("t_loadElf: cleaning user memory...");
Expand Down
4 changes: 2 additions & 2 deletions include/opl.h
Expand Up @@ -159,8 +159,8 @@ extern int gPadEmuSettings;
extern int gScrollSpeed;
// Exit path
extern char gExitPath[32];
// Disable Debug Colors
extern int gDisableDebug;
// Enable Debug Colors
extern int gEnableDebug;

extern int gPS2Logo;

Expand Down
2 changes: 1 addition & 1 deletion lng/lang_English.lng
Expand Up @@ -73,7 +73,7 @@ Please wait.
Error while loading the Game ID.
Automatic Sorting
Error loading the language file.
Disable Debug Colors
Debug Colors
No controller detected, waiting...
Enable Cover Art
Widescreen
Expand Down
6 changes: 3 additions & 3 deletions src/gui.c
Expand Up @@ -458,7 +458,7 @@ void guiShowConfig()
diaSetEnum(diaConfig, CFG_ETHMODE, deviceModes);
diaSetEnum(diaConfig, CFG_APPMODE, deviceModes);

diaSetInt(diaConfig, CFG_DEBUG, gDisableDebug);
diaSetInt(diaConfig, CFG_DEBUG, gEnableDebug);
diaSetInt(diaConfig, CFG_PS2LOGO, gPS2Logo);
diaSetInt(diaConfig, CFG_HDDGAMELISTCACHE, gHDDGameListCache);
diaSetString(diaConfig, CFG_EXITTO, gExitPath);
Expand All @@ -480,7 +480,7 @@ void guiShowConfig()

int ret = diaExecuteDialog(diaConfig, -1, 1, &guiUpdater);
if (ret) {
diaGetInt(diaConfig, CFG_DEBUG, &gDisableDebug);
diaGetInt(diaConfig, CFG_DEBUG, &gEnableDebug);
diaGetInt(diaConfig, CFG_PS2LOGO, &gPS2Logo);
diaGetInt(diaConfig, CFG_HDDGAMELISTCACHE, &gHDDGameListCache);
diaGetString(diaConfig, CFG_EXITTO, gExitPath, sizeof(gExitPath));
Expand Down Expand Up @@ -1364,7 +1364,7 @@ static void guiDrawOverlays()
}

// BLURT output
// if (!gDisableDebug)
// if (gEnableDebug)
// fntRenderString(gTheme->fonts[0], 0, screenHeight - 24, ALIGN_NONE, 0, 0, blurttext, GS_SETREG_RGBA(255, 255, 0, 128));
}

Expand Down
2 changes: 1 addition & 1 deletion src/lang.c
Expand Up @@ -60,7 +60,7 @@ static char *internalEnglish[LANG_STR_COUNT] = {
"Error while loading the Game ID.",
"Automatic Sorting",
"Error loading the language file.",
"Disable Debug Colors",
"Debug Colors",
"No controller detected, waiting...",
"Enable Cover Art",
"Widescreen",
Expand Down
8 changes: 4 additions & 4 deletions src/opl.c
Expand Up @@ -173,7 +173,7 @@ int gPadEmuSettings;
#endif
int gScrollSpeed;
char gExitPath[32];
int gDisableDebug;
int gEnableDebug;
int gPS2Logo;
int gDefaultDevice;
int gEnableWrite;
Expand Down Expand Up @@ -837,7 +837,7 @@ static void _loadConfig()
if (configGetInt(configOPL, CONFIG_OPL_SWAP_SEL_BUTTON, &value))
gSelectButton = value == 0 ? KEY_CIRCLE : KEY_CROSS;

configGetInt(configOPL, CONFIG_OPL_DISABLE_DEBUG, &gDisableDebug);
configGetInt(configOPL, CONFIG_OPL_DISABLE_DEBUG, &gEnableDebug);
configGetInt(configOPL, CONFIG_OPL_PS2LOGO, &gPS2Logo);
configGetInt(configOPL, CONFIG_OPL_HDD_GAME_LIST_CACHE, &gHDDGameListCache);
configGetStrCopy(configOPL, CONFIG_OPL_EXIT_PATH, gExitPath, sizeof(gExitPath));
Expand Down Expand Up @@ -988,7 +988,7 @@ static void _saveConfig()
configSetInt(configOPL, CONFIG_OPL_XOFF, gXOff);
configSetInt(configOPL, CONFIG_OPL_YOFF, gYOff);
configSetInt(configOPL, CONFIG_OPL_OVERSCAN, gOverscan);
configSetInt(configOPL, CONFIG_OPL_DISABLE_DEBUG, gDisableDebug);
configSetInt(configOPL, CONFIG_OPL_DISABLE_DEBUG, gEnableDebug);
configSetInt(configOPL, CONFIG_OPL_PS2LOGO, gPS2Logo);
configSetInt(configOPL, CONFIG_OPL_HDD_GAME_LIST_CACHE, gHDDGameListCache);
configSetStr(configOPL, CONFIG_OPL_EXIT_PATH, gExitPath);
Expand Down Expand Up @@ -1576,7 +1576,7 @@ static void setDefaults(void)
gDefaultDevice = APP_MODE;
gAutosort = 1;
gAutoRefresh = 0;
gDisableDebug = 1;
gEnableDebug = 0;
gPS2Logo = 0;
gHDDGameListCache = 0;
gEnableWrite = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/system.c
Expand Up @@ -803,7 +803,7 @@ void sysLaunchLoaderElf(const char *filename, const char *mode_str, int size_cdv

argc = 0;
sprintf(config_str, "%s %d %s %d %u.%u.%u.%u %u.%u.%u.%u %u.%u.%u.%u %d %u %d" PADEMU_SPECIFIER,
mode_str, gDisableDebug, gExitPath, gHDDSpindown,
mode_str, gEnableDebug, gExitPath, gHDDSpindown,
local_ip_address[0], local_ip_address[1], local_ip_address[2], local_ip_address[3],
local_netmask[0], local_netmask[1], local_netmask[2], local_netmask[3],
local_gateway[0], local_gateway[1], local_gateway[2], local_gateway[3],
Expand Down
6 changes: 3 additions & 3 deletions src/util.c
Expand Up @@ -538,14 +538,14 @@ int CheckPS2Logo(int fd, u32 lba)
} else {
strcat(text, "don't match!");
}
if (!gDisableDebug)
if (gEnableDebug)
guiWarning(text, 12);
} else {
if (!gDisableDebug)
if (gEnableDebug)
guiWarning("Not a valid PS2 Logo first byte!", 12);
}
} else {
if (!gDisableDebug)
if (gEnableDebug)
guiWarning("Error reading first 12 disc sectors (PS2 Logo)!", 25);
}
return ValidPS2Logo;
Expand Down

0 comments on commit 443b756

Please sign in to comment.