Skip to content

Commit

Permalink
Fix map 4 games randomly crashing
Browse files Browse the repository at this point in the history
Commented code in `stepdebug.c`

by nibbles27
  • Loading branch information
RocketRobz committed Sep 16, 2023
1 parent b6b5b30 commit 4c3605b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions arm9/source/stepdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void shex(unsigned char *p,int d,int n) {


void stepdebug()
{
{/*
static int framecount = 0;
static int line, keys, oldkeys, opcount = 0;
unsigned int i, count;
Expand Down Expand Up @@ -106,7 +106,18 @@ void stepdebug()
shex8(ptbuf + 128 + 3*i, ((__memmap_tbl[i] - __rombase) >> 13) + i);
}

count = pstep - stepinfo;
if(count > 18 * 4)
count = 18 * 4;
for(i = 0; i < count; i++) {
shex(ptbuf + 192 + i*8, stepinfo[i] >> 12, 3);
if(stepinfo[i] & 0x100) {
*(ptbuf + 192 + i * 8 + 4) = 'w';
} else {
*(ptbuf + 192 + i * 8 + 4) = 'r';
}
shex(ptbuf + 197 + i*8, stepinfo[i], 1);
}
consoletext(0, ptbuf, 0);
//memset( ptbuf + 192 + count * 8, 32, (18 * 4 - count) * 8);
Expand All @@ -126,5 +137,5 @@ void stepdebug()
}
while(1);
oldkeys = keys;
//pstep = stepinfo;
//pstep = stepinfo;*/
}

0 comments on commit 4c3605b

Please sign in to comment.