Types
mc-file-info: structuresource
Fields
present: int32
blind-data: float
blind-data-int8: int8
level-index: int32
fuel-cell-count: float
money-count: float
buzzer-count: float
completion-percentage: float
minute: uint8
hour: uint8
week: uint8
day: uint8
month: uint8
year: uint8
mc-handle: int32source
mc-slot-info: structuresource
Fields
handle: int32
known: int32
formatted: int32
inited: int32
last-file: int32
mem-required: int32
mem-actual: int32
file: mc-file-info
Functions
mc-sync() => intsource
Block here, waiting for the memory card to finish being read/written.
Note - this will freeze the entire game, so this should not be used
outside of debugging.
Note - this will freeze the entire game, so this should not be used
outside of debugging.
show-mc-info(dma-buf: dma-buffer) => nonesource
Print mc info to the screen.
Types
cpad-info: hw-cpadsource
Fields
type: type
valid: uint8
status: uint8
button0: uint16
rightx: uint8
righty: uint8
leftx: uint8
lefty: uint8
abutton: uint8
dummy: uint8
number: int32
cpad-file: int32
button0-abs: pad-buttons
button0-shadow-abs: pad-buttons
button0-rel: pad-buttons
stick0-dir: float
stick0-speed: float
new-pad: int32
state: int32
align: uint8
direct: uint8
buzz-val: uint8
buzz-time: time-frame
buzz: basic
buzz-act: int32
change-time: time-frame
hw-cpad: basicsource
Fields
type: type
valid: uint8
status: uint8
button0: uint16
rightx: uint8
righty: uint8
leftx: uint8
lefty: uint8
abutton: uint8
dummy: uint8
Functions
analog-input(in: int, offset: float, center-val: float, max-val: float, out-range: float) => floatsource
Convert integer input from pad into a float between -out-range and +out-range.
The offset is applied directly to the input.
The center val is the expected value for 0, after applying offset.
The max val is the expected value with the stick pushed all the way
The offset is applied directly to the input.
The center val is the expected value for 0, after applying offset.
The max val is the expected value with the stick pushed all the way
buzz-stop!(idx: int) => nonesource
Set the buzz to 0 on both vibration motors of the given cpad.
cpad-invalid!(pad: cpad-info) => cpad-infosource
Reset all data in a cpad-info
cpad-set-buzz!(pad: cpad-info, buzz-idx: int, buzz-amount: int, duration: time-frame) => nonesource
Turn on vibration motor 'buzz-idx' for duration, at magnitude buzz-amount.
service-cpads() => cpad-listsource
Read from cpads and update vibration
Variables
*cheat-mode*: symbolsource
*cpad-debug*: symbolsource
STICK_DEADZONE: unknownsource
Types
rpc-buffer: basicsource
Fields
type: type
elt-size: uint32
elt-count: uint32
elt-used: uint32
busy: basic
base: pointer
data: uint8
rpc-buffer-pair: basicsource
Fields
type: type
buffer: rpc-buffer
current: rpc-buffer
last-recv-buffer: pointer
rpc-port: int32
Methods
call(obj: rpc-buffer-pair, fno: uint, recv-buff: pointer, recv-size: uint) => intsource
Call an RPC. This is an async RPC. Use check-busy or sync to see if it's done.
add-element(obj: rpc-buffer-pair) => pointersource
Add an element, and return a pointer to the element.
If we are out of elements, flush by doing an RPC call.
DANGER: this uses all arguments of 0. If you want something else, flush it yourself.
If we're RPC 0 and we do this auto-flush, print a warning.
If we are out of elements, flush by doing an RPC call.
DANGER: this uses all arguments of 0. If you want something else, flush it yourself.
If we're RPC 0 and we do this auto-flush, print a warning.
decrement-elt-used(obj: rpc-buffer-pair) => intsource
If elt-used > 0, decrease it by one.
sync(obj: rpc-buffer-pair, print-stall-warning: symbol) => intsource
Wait for the in progress RPC to complete.
check-busy(obj: rpc-buffer-pair) => symbolsource
Is the currently running RPC still busy?
pop-last-received(obj: rpc-buffer-pair) => pointersource
Variables
RPC-LOAD-STR: unknownsource
RPC-PLAY-STR: unknownsource
RPC-RAMDISK: unknownsource
RPC-SOUND-LOADER: unknownsource
RPC-SOUND-PLAYER: unknownsource
Types
profile-bar: basicsource
Fields
type: type
profile-frame-count: int32
cache-time: time-frame
data: profile-frame
Methods
get-last-frame-time-stamp(obj: profile-bar) => uintsource
Returns the timestamp of the last (non-remaining) frame on the profiler bar.
reset(obj: profile-bar) => _type_source
Clear all blocks from the profile bar. Adds the start block
add-frame(obj: profile-bar, name: symbol, color: rgba) => profile-framesource
Add a block to the profile bar. Looks at the timer to determine the current time.
add-end-frame(obj: profile-bar, name: symbol, color: rgba) => profile-framesource
Finish the frame.
draw(obj: profile-bar, buf: dma-buffer, bar-pos: int) => floatsource
Draw the bar! The bar pos shouldn't be changed.
stopwatch: basicsource
timer-bank: structuresource
timer-hold-bank: timer-banksource
timer-mode: uint32source
Functions
timer-init(timer: timer-bank, mode: timer-mode) => intsource
Initiate a timer, start counting at a rate of 1 every 256 bus clocks (BUSCLK: ~147.456MHz).
Variables
TIMER0_BANK: unknownsource
TIMER1_BANK: unknownsource
TIMER2_BANK: unknownsource
TIMER3_BANK: unknownsource
Functions
disable-irq() => nonesource
Disable all interrupts. Has no effect on PC Port
enable-irq() => nonesource
Enable all interrupts. Has no effect on PC Port.
stopwatch-begin(obj: stopwatch) => intsource
Begin a stopwatch level, and starts it if it hasn't yet
stopwatch-elapsed-seconds(obj: stopwatch) => floatsource
Returns the elapsed time so far (in seconds) of a stopwatch
stopwatch-elapsed-ticks(obj: stopwatch) => time-framesource
Returns the elapsed time so far (in clock cycles) of a stopwatch
stopwatch-end(obj: stopwatch) => nonesource
End a stopwatch level. Stops the stopwatch if it's back to level zero.
There is no guard against ending a stopwatch too many times, and a negative level
will cause errors!
There is no guard against ending a stopwatch too many times, and a negative level
will cause errors!
stopwatch-init(obj: stopwatch) => intsource
Init a stopwatch
stopwatch-reset(obj: stopwatch) => intsource
Restart a stopwatch's times
stopwatch-start(obj: stopwatch) => intsource
Start a stopwatch from scratch
stopwatch-stop(obj: stopwatch) => nonesource
Fully stop a stopwatch and save its elapsed time
timer-count(timer: timer-bank) => uintsource
Return a timer's counter value
timer-reset(timer: timer-bank) => nonesource
Reset a timer's counter to zero