Un-ignored: the dev drive is the ground truth the restoration and emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio content). Kept in-repo for the pod-owner community. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
120 lines
1.9 KiB
Scheme
120 lines
1.9 KiB
Scheme
|
|
//{{{ setpixelsize
|
|
//
|
|
// Set pixel width - 00 == 8 bits
|
|
// 01 == 16
|
|
// 10 == 32
|
|
//
|
|
//
|
|
|
|
PSRMASK = 0x00c0
|
|
|
|
.globl _setpixelsize
|
|
_setpixelsize::
|
|
|
|
ld.c psr,r31
|
|
andnoth PSRMASK,r31,r31
|
|
shl 22,r16,r16
|
|
or r16,r31,r31
|
|
st.c r31,psr
|
|
bri r1
|
|
or r31, r0, r16
|
|
|
|
//}}}
|
|
|
|
//{{{ getpixelsize
|
|
//
|
|
// Set pixel width - 00 == 8 bits
|
|
// 01 == 16
|
|
// 10 == 32
|
|
//
|
|
//
|
|
|
|
PSRMASKALL = 0x00c0
|
|
|
|
.globl _getpixelsize
|
|
_getpixelsize::
|
|
|
|
ld.c psr,r31
|
|
andh PSRMASKALL,r31,r31
|
|
bri r1
|
|
shr 22,r31,r16
|
|
|
|
//}}}
|
|
|
|
//{{{ setdirectmode
|
|
|
|
|
|
.globl _setdirectmode
|
|
_setdirectmode::
|
|
|
|
ld.c dirbase,r31
|
|
and -2,r31,r31
|
|
st.c r31,dirbase
|
|
|
|
bri r1
|
|
nop
|
|
|
|
//}}}
|
|
|
|
//{{{ clear store
|
|
|
|
//
|
|
// Clear Store
|
|
//
|
|
// assumes .quad aligned data
|
|
//
|
|
|
|
.globl _clear_store
|
|
_clear_store::
|
|
|
|
ixfr r17,f16
|
|
ixfr r17,f17
|
|
ixfr r17,f18
|
|
ixfr r17,f19
|
|
|
|
adds -16,r18,r18
|
|
adds -16,r0,r19 // loop increment
|
|
bla r19,r18,init_loop
|
|
addu -16,r16,r16 // adjust address for autoincrement
|
|
|
|
init_loop:
|
|
|
|
bla r19,r18,init_loop
|
|
fst.q f16,16(r16)++
|
|
|
|
bri r1
|
|
nop
|
|
//}}}
|
|
|
|
//{{{ thrash
|
|
|
|
//
|
|
// thrash
|
|
//
|
|
//
|
|
// thrash (loation, times)
|
|
//
|
|
//
|
|
|
|
.globl _thrash
|
|
_thrash::
|
|
|
|
adds -1, r0, r18
|
|
|
|
ixfr r18,f8
|
|
bla r18,r17,thrash_loop
|
|
nop
|
|
|
|
thrash_loop:
|
|
|
|
fld.l r0(r16),f8
|
|
bla r18,r17,thrash_loop
|
|
fst.l f8,r0(r16)
|
|
|
|
bri r1
|
|
nop
|
|
//}}}
|
|
|
|
|