mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
bugfix for ARM asm sprite rendering
This commit is contained in:
parent
3c6da92ba0
commit
672b29e658
2 changed files with 4 additions and 4 deletions
|
@ -1243,7 +1243,7 @@ static void DrawAllSprites(unsigned char *sprited, int prio, int sh,
|
||||||
struct PicoEState *est)
|
struct PicoEState *est)
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
int cnt, w = sprited[2];
|
int cnt, w;
|
||||||
|
|
||||||
cnt = sprited[0] & 0x7f;
|
cnt = sprited[0] & 0x7f;
|
||||||
if (cnt == 0) return;
|
if (cnt == 0) return;
|
||||||
|
|
|
@ -1169,7 +1169,9 @@ DrawSprite:
|
||||||
mov r2, r0, lsl #24
|
mov r2, r0, lsl #24
|
||||||
cmp r0, #0xff
|
cmp r0, #0xff
|
||||||
ldmeqfd sp!, {r1,r3-r11,pc} @ end of list
|
ldmeqfd sp!, {r1,r3-r11,pc} @ end of list
|
||||||
eor r2, r2, r4, lsl #30
|
eors r2, r2, r4, lsl #30
|
||||||
|
bic r2, r4, #0xff000000
|
||||||
|
str r2, [sp]
|
||||||
bmi DrawSprite @ wrong priority
|
bmi DrawSprite @ wrong priority
|
||||||
ldr r1, [r7, #OFS_EST_HighPreSpr]
|
ldr r1, [r7, #OFS_EST_HighPreSpr]
|
||||||
and r0, r0, #0x7f
|
and r0, r0, #0x7f
|
||||||
|
@ -1210,8 +1212,6 @@ DrawSprite:
|
||||||
add r6, r6, #1 @ inc now
|
add r6, r6, #1 @ inc now
|
||||||
cmp r4, #0x1000000 @ check width of last sprite
|
cmp r4, #0x1000000 @ check width of last sprite
|
||||||
movhs r6, r4, lsr #24
|
movhs r6, r4, lsr #24
|
||||||
bichs r4, r4, #0xff000000
|
|
||||||
strhs r4, [sp]
|
|
||||||
|
|
||||||
@ cache some stuff to avoid mem access
|
@ cache some stuff to avoid mem access
|
||||||
mov r5, r5, lsl #4 @ delta<<=4; // Delta of address
|
mov r5, r5, lsl #4 @ delta<<=4; // Delta of address
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue