Types
mc-file-info: structuresource
Fields
present: int32
blind-data: float
blind-data-int8: int8
level-index: int32
gem-count: float
skill-count: float
completion-percentage: float
minute: uint8
hour: uint8
week: uint8
day: uint8
month: uint8
year: uint8
game-time0: uint32
game-time1: uint32
secrets: uint32
features: uint32
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
show-mc-info(arg0: dma-buffer) => nonesource
Expand description
Interface for game controllers.
the *cpad-list* contains both game controllers.
Use the service-cpads functions once per frame to update the data and vibration control
The cpad-set-buzz! function can be used for vibration.
the *cpad-list* contains both game controllers.
Use the service-cpads functions once per frame to update the data and vibration control
The cpad-set-buzz! function can be used for vibration.
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-pause-val: uint8
buzz-pause-time: uint8
buzz-time: time-frame
buzz: basic
buzz-act: int32
change-time: time-frame
old-rightx: uint8
old-righty: uint8
old-leftx: uint8
old-lefty: uint8
Methods
adjust-to-screen-flip(obj: cpad-info) => intsource
hw-cpad: basicsource
Fields
type: type
valid: uint8
status: uint8
button0: uint16
rightx: uint8
righty: uint8
leftx: uint8
lefty: uint8
abutton: uint8
dummy: uint8
mouse-info: basicsource
Fields
type: type
active: symbol
cursor: basic
valid: symbol
id: uint8
status: uint16
button0: uint16
deltax: int8
deltay: int8
wheel: uint8
change-time: time-frame
button0-abs: uint32
button0-shadow-abs: uint32
button0-rel: uint32
pos: vector
posx: float
posy: float
oldposx: float
oldposy: float
speedx: float
speedy: float
scf-time: structuresource
Functions
analog-input(arg0: int, arg1: float, arg2: float, arg3: float, arg4: 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!(arg0: int) => nonesource
Set the buzz to 0 on both vibration motors of the given cpad.
cpad-invalid!(arg0: cpad-info) => cpad-infosource
Reset all data in a cpad-info
cpad-set-buzz!(arg0: cpad-info, arg1: int, arg2: int, arg3: 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
service-mouse() => nonesource
Update the mouse, and draw the cursor.
Variables
*cheat-mode*: symbolsource
*cpad-debug*: symbolsource
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, arg0: uint, arg1: pointer, arg2: uint) => intsource
add-element(obj: rpc-buffer-pair) => pointersource
decrement-elt-used(obj: rpc-buffer-pair) => intsource
sync(obj: rpc-buffer-pair, arg0: symbol) => intsource
check-busy(obj: rpc-buffer-pair) => symbolsource
pop-last-received(obj: rpc-buffer-pair) => pointersource
Expand description
There are two sources for timing:
- EE TIMER1, used for the frame profiler. There are 9765 counts of this per frame. It gets reset in drawable.
- The "stopwatch" system, used for reading the CPU clock cycle counter, at 300 MHz (32-bit)
- EE TIMER1, used for the frame profiler. There are 9765 counts of this per frame. It gets reset in drawable.
- The "stopwatch" system, used for reading the CPU clock cycle counter, at 300 MHz (32-bit)
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(arg0: timer-bank) => uintsource
Return a timer's counter value
Variables
COP0_STATUS_IE: unknownsource
EE_SECONDS_PER_TICK: unknownsource
Expand description
Types related to VIF: the PS2's Vector Interface.
Each of VU0 and VU1 has a VIF which is used to sent/receive data.
The VIFs are controller by registers and fed data using DMA
the vif registers defined here are used extremely rarely, usually they are sent DMA
(during gameplay, everything is synchronized by DMA, so code generally does not know when
it is safe to mess with VIF registers.)
Each of VU0 and VU1 has a VIF which is used to sent/receive data.
The VIFs are controller by registers and fed data using DMA
the vif registers defined here are used extremely rarely, usually they are sent DMA
(during gameplay, everything is synchronized by DMA, so code generally does not know when
it is safe to mess with VIF registers.)
vif-bank: structuresource
vif-err: uint32source
vif-fbrst: uint32source
vif-stat: uint32source
Variables
Expand description
this file has no code, just macros for vector-unit stuff.
in OpenGOAL we're also using this for VU0 macros to help with VU0 operations that are not
directly implemented by the OpenGOAL compiler
in OpenGOAL we're also using this for VU0 macros to help with VU0 operations that are not
directly implemented by the OpenGOAL compiler