From eac2357fafe6ed29407e583aee71834c36a0319f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 18 Aug 2017 07:07:29 +0200 Subject: [PATCH] Attempt two to fix PSP --- pico/draw.c | 3 ++- pico/draw_amips.s | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pico/draw.c b/pico/draw.c index bccb4d0..4c96a9a 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -35,7 +35,8 @@ int (*PicoScanBegin)(unsigned int num) = NULL; int (*PicoScanEnd) (unsigned int num) = NULL; static unsigned char DefHighCol[8+320+8]; -unsigned char *HighColBase = DefHighCol; +unsigned char *HighCol = DefHighCol; +static unsigned char *HighColBase = DefHighCol; static int HighColIncrement; static unsigned int DefOutBuff[320*2/2]; diff --git a/pico/draw_amips.s b/pico/draw_amips.s index 0fa729e..fa7906e 100644 --- a/pico/draw_amips.s +++ b/pico/draw_amips.s @@ -117,11 +117,11 @@ amips_clut_loop6: .macro TileEndCode xori $t8, $t9, 0xff beqz $t8, tile11111111 # common case - lui $v1, %hi(HighColBase) + lui $v1, %hi(HighCol) lui $t8, %hi(TileTable) ins $t8, $t9, 2, 8 lw $t8, %lo(TileTable)($t8) - lw $v1, %lo(HighColBase)($v1) + lw $v1, %lo(HighCol)($v1) jr $t8 addu $a0, $v1 .endm @@ -158,8 +158,8 @@ TileFlip: SingleColor: - lui $t9, %hi(HighColBase) - lw $t9, %lo(HighColBase)($t9) + lui $t9, %hi(HighCol) + lw $t9, %lo(HighCol)($t9) andi $t0, $a1, 0xf or $t0, $t0, $a2 addu $a0, $t9 @@ -178,7 +178,7 @@ TileEmpty: or $v0, $0, 1 # empty tile tile11111111: - lw $v1, %lo(HighColBase)($v1) + lw $v1, %lo(HighCol)($v1) or $t0, $t0, $a2 addu $a0, $v1 sb $t0, 0($a0) -- 2.39.2