Skip to content

Commit

Permalink
format and fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Oct 14, 2024
1 parent aa1a174 commit 3129e68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions ee_core/include/ee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ enum GAME_MODE {
};

extern int EnableDebug;
extern void BlinkColour(u8 x, u32 colour, u8 forever);
#define GS_BGCOLOUR *((volatile unsigned long int *)0x120000E0)
#define DBGCOL(color, type, description) GS_BGCOLOUR = color // this wrapper macro only serves the purpose of allowing us to grep from outside for documentation
#define BGCOLND(color) GS_BGCOLOUR = color // same as DBGCOL() but this one is not passed to debug color documentation. used for blinking or setting screen to black wich usually means nothing
Expand Down
14 changes: 7 additions & 7 deletions ee_core/src/igs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void FastDelay(int count)
}
}

static void BlinkColour(u8 x, u32 colour, u8 forever)
void BlinkColour(u8 x, u32 colour, u8 forever)
{
u8 i;
do {
Expand Down Expand Up @@ -73,12 +73,12 @@ static u32 FindEmptyArea(u32 start, u32 end, u32 emptysize)

if (counter == emptysize) {
result = (u32)addr - emptysize;
result = (((result) >> 4) << 4); // It must be 16-bytes aligned
DBGCOL_BLNK(2, 0x00FF00, false, IGS, "FindEmptyArea(): Found"); // FOUND => Double Green :-)
result = (((result) >> 4) << 4); // It must be 16-bytes aligned
DBGCOL_BLNK(2, 0x00FF00, false, IGS, "FindEmptyArea(): Found"); // FOUND => Double Green :-)
} else {
// result = 0x00100000; // 1st. possible workaround: Use the ingame area (Typically starts on "0x00100000"). It must be 16-bytes aligned
result = ((0x01F32568 - emptysize - 16) >> 4) << 4; // 2nd. possible workaround: Himem area ("0x01F32568" taken from PS2LINK hi-mem). It must be 16-bytes aligned
DBGCOL_BLNK(2, 0x0066FF, false, IGS, "FindEmptyArea(): Not found"); // Double Orange :-(
result = ((0x01F32568 - emptysize - 16) >> 4) << 4; // 2nd. possible workaround: Himem area ("0x01F32568" taken from PS2LINK hi-mem). It must be 16-bytes aligned
DBGCOL_BLNK(2, 0x0066FF, false, IGS, "FindEmptyArea(): Not found"); // Double Orange :-(
}

return result;
Expand Down Expand Up @@ -612,7 +612,7 @@ static u8 SaveBitmapFile(u16 width, u16 height, u8 pixel_size, void *buffer, u8

// Sequential numbering feature
while (1) {
if (Number == 255) // 255 screenshots per-game should be enough? lol
if (Number == 255) // 255 screenshots per-game should be enough? lol
DBGCOL_BLNK(6, 0x0000FF, true, IGS, "SaveBitmapFile(): Number == 255"); // Red
Number++;
_strcpy(PathFilenameExtension, "mc1:/");
Expand Down Expand Up @@ -675,7 +675,7 @@ static u8 SaveBitmapFile(u16 width, u16 height, u8 pixel_size, void *buffer, u8
ret = fioWrite(file_handle, addr, lenght);
if (ret != lenght)
DBGCOL_BLNK(5, 0x0000FF, true, IGS, "SaveBitmapFile(): FILEIO write error"); // Red
if (intffmd == 3) { // Interlace Mode, FRAME Mode (Read every line)
if (intffmd == 3) { // Interlace Mode, FRAME Mode (Read every line)
ret = fioWrite(file_handle, addr, lenght);
if (ret != lenght)
DBGCOL_BLNK(5, 0x0000FF, true, IGS, "SaveBitmapFile(): FILEIO write error"); // Red
Expand Down
4 changes: 2 additions & 2 deletions ee_core/src/padhook.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ static void IGR_Thread(void *arg)
) {

if (EnableDebug)
DBGCOL(0xFF8000, IGR, "oplIGRShutdown()");
DBGCOL(0xFF8000, IGR, "oplIGRShutdown()");

oplIGRShutdown(0);

if (EnableDebug)
DBGCOL(0x0000FF, IGR, "Reset IOP");
DBGCOL(0x0000FF, IGR, "Reset IOP");

// Reset IO Processor
while (!Reset_Iop("", 0)) {
Expand Down

0 comments on commit 3129e68

Please sign in to comment.