Skip to content

Commit

Permalink
Merge pull request #226 from fjtrujy/improveSCEGUInit
Browse files Browse the repository at this point in the history
Use the same GU Init as official doc
  • Loading branch information
fjtrujy authored Aug 12, 2024
2 parents 0b50f4c + a04e1a7 commit 7519d6d
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 260 deletions.
10 changes: 5 additions & 5 deletions src/gu/guInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ typedef enum GECommand
/* Texture buffer width 7 */
TEX_BUF_WIDTH7 = 0xaf,

/* CLUT address */
CLUT_ADDR = 0xb0,
/* CLUT address upper */
CLUT_ADDR_UPPER = 0xb1,
/* CLUT buffer pointer */
CLUT_BUF_PTR = 0xb0,
/* CLUT buffer width */
CLUT_BUF_WIDTH = 0xb1,

/* Transfer source */
TRANSFER_SRC = 0xb2,
Expand Down Expand Up @@ -503,7 +503,7 @@ typedef enum GECommand
/* Texture format */
TEX_FORMAT = 0xc3,
/* Load CLUT */
LOAD_CLUT = 0xc4,
CLUT_LOAD = 0xc4,
/* CLUT format */
CLUT_FORMAT = 0xc5,
/* Texture filter */
Expand Down
6 changes: 3 additions & 3 deletions src/gu/sceGuClutLoad.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

void sceGuClutLoad(int num_blocks, const void *cbp)
{
sendCommandi(CLUT_ADDR, ((unsigned int)cbp) & 0xffffff);
sendCommandi(CLUT_ADDR_UPPER, (((unsigned int)cbp) >> 8) & 0xf0000);
sendCommandi(LOAD_CLUT, num_blocks);
sendCommandi(CLUT_BUF_PTR, ((unsigned int)cbp) & 0xffffff);
sendCommandi(CLUT_BUF_WIDTH, (((unsigned int)cbp) >> 8) & 0xf0000);
sendCommandi(CLUT_LOAD, num_blocks);
}
Loading

0 comments on commit 7519d6d

Please sign in to comment.