Skip to main content

decomp-h

source

Types


decomp-work

decomp-work: structuresource
Fields
buffer0: uint8
buffer1: uint8
indices: uint16
temp-indices: uint16

decomp

source

Types


huf-dictionary-node

huf-dictionary-node: structuresource
Fields
zero: uint16
one: uint16

Functions


unpack-comp-huf

unpack-comp-huf(dst: pointer, src: pointer, arg2: uint, dict: huf-dictionary-node) => nonesource
Unpack data compressed with huffman encoding.

unpack-comp-rle

unpack-comp-rle(out: pointer, in: pointer) => nonesource
Unpack run-length-encoded data. Has sections of repeated values, then normally copied.

file-io

source

Types


file-info

file-info: basicsource
Fields
type: type
file-type: symbol
file-name: basic
major-version: uint32
minor-version: uint32
maya-file-name: basic
tool-debug: basic
mdb-file-name: basic

file-stream

file-stream: basicsource
Fields
type: type
flags: uint32
mode: symbol
name: string
file: uint32

Functions


file-info-correct-version?

file-info-correct-version?(info: file-info, kind: file-kind, version-override: int) => symbolsource
Check if the version and kind in the info is valid. The version-override can specify a
non-default version, or set to 0 for the default version

file-stream-read-string

file-stream-read-string(stream: file-stream, str: string) => stringsource
Fill a string with data from a file stream.
Note: this function does not work.

make-file-name

make-file-name(kind: file-kind, name: string, art-group-version: int, arg3: symbol) => stringsource
Get a file name to open a file with the given kind and name.
The art-group-version argument can be used to override the version
of the art-group. Set it to 0 or less to use the default version
Similar to MakeFileName in C.
Note: file type enum is different between C and GOAL.
File versions should match those in versions.h.
Uses a single *file-temp-string* buffer, shared with make-vfile-name.
arg3 is unused.

make-vfile-name

make-vfile-name(kind: file-kind, name: string) => stringsource
Make virtual? file name. This makes a name that the kernel knows how to
handle in a specific way. This function is not used.

Variables


*file-temp-string*

*file-temp-string*: stringsource

ART_GROUP_FILE_VERSION

ART_GROUP_FILE_VERSION: unknownsource

LEVEL_BT_FILE_VERSION

LEVEL_BT_FILE_VERSION: unknownsource

LEVEL_VS_FILE_VERSION

LEVEL_VS_FILE_VERSION: unknownsource

SCE_SEEK_CUR

SCE_SEEK_CUR: unknownsource

SCE_SEEK_END

SCE_SEEK_END: unknownsource

SCE_SEEK_SET

SCE_SEEK_SET: unknownsource

TPAGE_FILE_VERSION

TPAGE_FILE_VERSION: unknownsource

TX_FILE_VERSION

TX_FILE_VERSION: unknownsource

load-dgo

source

Types


dgo-header

dgo-header: structuresource
Fields
length: uint32
rootname: uint8
data: uint8

load-chunk-msg

load-chunk-msg: structuresource
Fields
rsvd: uint16
result: load-msg-result
address: pointer
section: uint32
maxlen: uint32
id: uint32
basename: uint8

load-dgo-msg

load-dgo-msg: structuresource
Fields
rsvd: uint16
result: load-msg-result
b1: pointer
b2: pointer
bt: pointer
name: uint128
name-chars: uint8
address: uint32

Functions


destroy-mem

destroy-mem(arg0: pointer, arg1: pointer) => nonesource
Overwrite memory from arg0 to arg1

dgo-load-begin

dgo-load-begin(name: string, buffer1: pointer, buffer2: pointer, buffer-top: pointer) => load-dgo-msgsource
Send a DGO load RPC!

dgo-load-cancel

dgo-load-cancel() => nonesource
Send a command to the IOP to cancel loading a DGO.
NOTE: this _might_ stall for a long time (multiple frames)
if you call it while an object is currently being loaded.
I believe this is only good to call if you do it after
dgo-load-get-next and before dgo-load-continue

dgo-load-continue

dgo-load-continue(buffer-top: pointer) => intsource
Send a command to to the IOP to continue loading a DGO

dgo-load-get-next

dgo-load-get-next(last-object: pointer) => pointersource
Check if the currently loading object is done.
Will set the last-object flag depending on if there is more.
Returns #f if it hasn't loaded yet and the address otherwise
dgo-load-link(obj-file: dgo-header, heap: kheap, print-login: symbol, last-object: symbol) => symbolsource
Begin linking an object from a DGO.
The obj-file argument should be the thing returned from dgo-load-get-next

find-temp-buffer

find-temp-buffer(size: int) => pointersource
A terrible function to find some temporary space in the DMA system.
It is unused, thankfully

str-ambient-play

str-ambient-play(name: string) => nonesource
Queue a command to do something

str-ambient-stop

str-ambient-stop(name: string) => nonesource

str-load

str-load(name: string, chunk-id: int, address: pointer, len: int) => symbolsource
Begin a streaming load if possible!
We must be able to grab the lock, and no streaming load in progress.
Return if we actually start the load.

str-load-cancel

str-load-cancel() => nonesource
Cancel a str load. This doesn't actually tell the OVERLORD to stop, it just frees the lock.

str-load-status

str-load-status(length-out: pointer) => symbolsource
Check the status of the str load.
The 'busy status indicates it is still going
The 'error status indicates the load failed.
The 'complete status means the load is finished, and length-out contains the loaded length.

str-play-async

str-play-async(name: string, id: sound-id) => nonesource
Queue a play cmd to do... something?
Locks the queue, doesn't check other locks

str-play-kick

str-play-kick() => nonesource
Call str RPC if we aren't busy

str-play-queue

str-play-queue(name: string) => nonesource
Queue a command to do something

str-play-stop

str-play-stop(name: string) => nonesource
Queue command to stop playing.

Variables


*dgo-name*

*dgo-name*: stringsource

*dgo-time*

*dgo-time*: time-framesource

*load-str-lock*

*load-str-lock*: symbolsource

*load-str-rpc*

*load-str-rpc*: rpc-buffer-pairsource

*play-str-rpc*

*play-str-rpc*: rpc-buffer-pairsource

*que-str-lock*

*que-str-lock*: symbolsource

loader-h

source

Types


external-art-buffer

external-art-buffer: basicsource
Fields
type: type
index: int32
other: external-art-buffer
status: symbol
locked?: symbol
frame-lock: symbol
heap: kheap
pending-load-file: string
pending-load-file-part: int32
pending-load-file-owner: handle
pending-load-file-priority: float
load-file: string
load-file-part: int32
load-file-owner: handle
load-file-priority: float
buf: pointer
len: int32
art-group: art-group
Methods
set-pending-file(obj: external-art-buffer, arg0: string, arg1: int, arg2: handle, arg3: float) => intsource
Request a new file to be loaded into this buffer.
update(obj: external-art-buffer) => intsource
Update this buffer.
inactive?(obj: external-art-buffer) => symbolsource
Is this buffer inactive?
file-status(obj: external-art-buffer, name: string, part: int) => symbolsource
Get the status of a file in the buffer. #f = file is not present.
link-file(obj: external-art-buffer, ag: art-group) => art-groupsource
Link the art-group and set it to this buffer's art group.
unlink-file(obj: external-art-buffer, ag: art-group) => intsource
Unlink the art-group and remove this buffer's art group.
unlock!(obj: external-art-buffer) => symbolsource
Unlock this buffer.

external-art-control

external-art-control: basicsource
Fields
type: type
buffer: external-art-buffer
rec: spool-anim
spool-lock: handle
reserve-buffer: external-art-buffer
reserve-buffer-count: int32
active-stream: string
preload-stream: spool-anim
last-preload-stream: spool-anim
end-pad: uint32
Methods
update(obj: external-art-control, debug-print: symbol) => intsource
Update this external-art-control. This validates the spool buffers, sorts the spools and queues the highest priority one, and does some other things.
If debug-print, also prints some text to the display console
clear-rec(obj: external-art-control) => intsource
Clears the recent spool anims from the art control.
spool-push(obj: external-art-control, name: string, part: int, proc: process, priority: float) => intsource
Push a spool-anim to the spool array. There are only space for three, and only the three highest priority spool anims will be kept. (lowest priority = top)
file-status(obj: external-art-control, name: string, part: int) => symbolsource
Get the status of a file in this art control. #f = file not found
reserve-alloc(obj: external-art-control) => kheapsource
Reserve a buffer!
reserve-free(obj: external-art-control, arg0: kheap) => intsource
Free the reserved buffer!
none-reserved?(obj: external-art-control) => symbolsource
are there any reserved buffers?
try-preload-stream(obj: external-art-control, arg0: string, arg1: int, arg2: process, arg3: float) => intsource
Set a new stream to be preloaded, if appropriate.

load-dir

load-dir: basicsource
Fields
type: type
lev: level
string-array: array
data-array: array
Methods
load-to-heap-by-name(obj: load-dir-art-group, art-name: string, do-reload: symbol, heap: kheap, version: int) => art-groupsource
Load the art with the given name to the heap and return the art.
Won't load a thing if it's already loaded, unless you set do-reload.
This is intended for debug only.
set-loaded-art(obj: load-dir-art-group, arg0: art-group) => art-groupsource
Add some already loaded art to the load-dir.

load-dir-art-group

load-dir-art-group: load-dirsource
Fields
type: type
lev: level
string-array: array
data-array: array
art-group-array: array

spool-anim

spool-anim: basicsource
Fields
type: type
name: string
buf1: external-art-buffer
index: int32
buf2: external-art-buffer
parts: int32
priority: float
owner: handle
command-list: pair

Variables


SPOOL_HEAP_SIZE

SPOOL_HEAP_SIZE: unknownsource

SPOOL_PRIORITY_HIGH

SPOOL_PRIORITY_HIGH: unknownsource

SPOOL_PRIORITY_HIGHEST

SPOOL_PRIORITY_HIGHEST: unknownsource

SPOOL_PRIORITY_LOWEST

SPOOL_PRIORITY_LOWEST: unknownsource

SPOOL_PRIORITY_RECALC

SPOOL_PRIORITY_RECALC: unknownsource

loader

source

Functions


art-group-load-check

art-group-load-check(arg0: string, arg1: kheap, arg2: int) => art-groupsource
Load and check an art-group file. this only runs if we're using debug memory.

art-load

art-load(arg0: string, arg1: kheap) => artsource
Load an art file. Unused.

drawable-load

drawable-load(arg0: drawable, arg1: kheap) => drawablesource
Load a drawable file. Unused.

ja-abort-spooled-anim

ja-abort-spooled-anim(arg0: spool-anim, arg1: art-joint-anim, arg2: int) => intsource

ja-play-spooled-anim

ja-play-spooled-anim(arg0: spool-anim, arg1: art-joint-anim, arg2: art-joint-anim, arg3: function) => intsource

Variables


*preload-spool-anims*

*preload-spool-anims*: symbolsource

ramdisk

source

Types


ramdisk-rpc-fill

ramdisk-rpc-fill: structuresource
Fields
rsvd1: int32
ee-id: int32
rsvd2: int32
filename: uint128

ramdisk-rpc-load

ramdisk-rpc-load: structuresource
Fields
rsvd: int32
ee-id: int32
offset: uint32
length: uint32

ramdisk-rpc-load-to-ee

ramdisk-rpc-load-to-ee: structuresource
Fields
rsvd: int32
addr: int32
offset: int32
length: int32
filename: uint128

Functions


ramdisk-load

ramdisk-load(file-id: int, offset: uint, length: uint, buffer: pointer) => intsource
Helper to grab load from ramdisk to ee

ramdisk-sync

ramdisk-sync() => nonesource
Wait for ramdisk RPC to complete.

Variables


*current-ramdisk-id*

*current-ramdisk-id*: intsource

*ramdisk-rpc*

*ramdisk-rpc*: rpc-buffer-pairsource

RAMDISK_RPC_FILL_FNO

RAMDISK_RPC_FILL_FNO: unknownsource