explicitly specify colorbuffer register

This commit is contained in:
Connor Olding 2018-09-28 10:53:26 +02:00
parent bcc219de11
commit 0c85f76835
2 changed files with 3 additions and 4 deletions

View File

@ -124,7 +124,6 @@ WriteDList:
sh t9, MAT_ZZ(t8)
or a0, s0, r0
or a1, s1, r0
// init
gPipeSync()
@ -140,7 +139,7 @@ WriteDList:
gClearZImage(WIDTH, HEIGHT, VIDEO_Z_IMAGE)
gPipeSync()
WriteCB(G_SETCIMB_UPPER_WORD | (WIDTH - 1))
WriteCB(G_SETCIMB_UPPER_WORD | (WIDTH - 1), s1)
if HICOLOR {
gSetFillColor(0x444444FF) // dark gray

View File

@ -56,11 +56,11 @@ if {dpos} >= 0x2000 {
}
}
macro WriteCB(evaluate L) {
macro WriteCB(evaluate L, reg) {
lui t0, ({L} >> 16) & 0xFFFF
ori t0, {L} & 0xFFFF
sw t0, {dpos}+0(a0)
sw a1, {dpos}+4(a0)
sw {reg}, {dpos}+4(a0)
global evaluate dpos({dpos}+8)
if {dpos} >= 0x2000 {
addiu a0, 0x2000