Types
display: basicsource
Fields
type: type
display-env0: display-env
display-env1: display-env
display-env2: display-env
gif-tag0: gs-gif-tag
draw0: draw-env
gif-tag1: gs-gif-tag
draw1: draw-env
gif-tag2: gs-gif-tag
draw2: draw-env
on-screen: int32
last-screen: int32
frames: virtual-frame
bg-clear-color: rgba
real-frame-counter: time-frame
base-frame-counter: time-frame
game-frame-counter: time-frame
integral-frame-counter: time-frame
real-integral-frame-counter: time-frame
actual-frame-counter: time-frame
real-actual-frame-counter: time-frame
part-frame-counter: time-frame
old-real-frame-counter: time-frame
old-base-frame-counter: time-frame
old-game-frame-counter: time-frame
old-integral-frame-counter: time-frame
old-real-integral-frame-counter: time-frame
old-actual-frame-counter: time-frame
old-real-actual-frame-counter: time-frame
old-part-frame-counter: time-frame
time-ratio: float
seconds-per-frame: float
frames-per-second: float
time-factor: float
time-adjust-ratio: float
Methods
set-time-ratios(obj: display, slowdown: float) => floatsource
Set the time ratios for the current game speed. For example, set slowdown = 1.0 if the game
is running at full speed or slowdown = 2.0 if the game is running at half speed.
display-env: structuresource
display-frame: basicsource
Fields
type: type
calc-buf: dma-buffer
vu1-buf: dma-buffer
debug-buf: dma-buffer
global-buf: dma-buffer
bucket-group: inline-array
buffer: dma-buffer
profile-bar: profile-bar
run-time: int64
draw-env: structuresource
Fields
frame1: gs-frame
frame1addr: gs-reg64
zbuf1: gs-zbuf
zbuf1addr: gs-reg64
xyoffset1: gs-xy-offset
xyoffset1addr: gs-reg64
scissor1: gs-scissor
scissor1addr: gs-reg64
prmodecont: gs-prmode-cont
prmodecontaddr: gs-reg64
colclamp: gs-color-clamp
colclampaddr: gs-reg64
dthe: gs-dthe
dtheaddr: gs-reg64
test1: gs-test
test1addr: gs-reg64
virtual-frame: structuresource
Functions
put-draw-env(packet: pointer) => nonesource
Begin DMA transfer to the GIF/GS to send a draw env packet.
The length of the transfer is taken from the nloop field of the tag.
Variables
*post-draw-hook*: functionsource
*pre-draw-hook*: functionsource
Functions
allocate-dma-buffers(arg0: display) => displaysource
Allocate the main DMA buffers!
draw-quad2d(buf: dma-buffer, context: draw-context) => nonesource
Draw a quad that fills the entire context
draw-sprite2d-xy(buf: dma-buffer, x: int, y: int, w: int, h: int, color: rgba) => nonesource
Draw a sprite primitive with the given color and dimensions.
get-current-time() => time-framesource
Get the in game time. This advances when the game is unpaused.
This increases at the same rate for PAL/NTSC and if the game is lagging.
get-integral-current-time() => time-framesource
Get the game time as a number of frames. This advances at different rates for PAL/NTSC.
This counts the number of actual vsyncs done by the PS2, including ones that are missed due to lag.
put-display-alpha-env(arg0: display-env) => nonesource
Set display1 and dspfb1 directly, right now.
This is unused.
reset-display-gs-state(disp: display, dma-buf: dma-buffer, oddeven: int) => displaysource
Set the gs state back to something reasonable
screen-gradient(arg0: dma-buffer, arg1: rgba, arg2: rgba, arg3: rgba, arg4: rgba) => nonesource
Fill the screen with a sprite with the given colors.
set-display(disp: display, psm: int, w: int, h: int, ztest: int, zpsm: int) => displaysource
Set up the entire display structure, both draw and display envs
set-display-env(env: display-env, psm: int, width: int, height: int, dx: int, dy: int, fbp: int) => display-envsource
Set the commonly used parameters of a display env.
psm: texture format
width/height: dimensions of the framebuffer
dx/dy: location on the TV screen
fpb: the framebuffer.
set-display-gs-state(dma-buf: dma-buffer, fbp: int, scx: int, scy: int, fb-msk: int, psm: int) => dma-buffersource
Set various gs state registers
set-display-gs-state-offset(dma-buf: dma-buffer, fbp: int, width: int, height: int, fb-msk: int, psm: int, off-x: int, off-y: int) => dma-buffersource
Set various gs state registers
set-display2(disp: display, psm: int, w: int, h: int, ztest: int, zpsm: int) => displaysource
Set the display and draw envs only. This assumes you have already done a set-display and you just need to update the video mode.
set-draw-env(env: draw-env, psm: int, width: int, height: int, ztest: int, zpsm: int, fbp: int) => draw-envsource
Set parameters of the draw env
set-draw-env-offset(env: draw-env, x: int, y: int, arg3: int) => draw-envsource
Set the drawing offset (origin of the WCS).
The input x and y should be in pixels to the center of the scissoring area
The width/height of the window are taken from the scissoring settings.
It is assumed that scax0 and scay0 are set to 0.
To center things in the usual way, call with 2048, 2048, even/odd
vif1-handler-debug() => nonesource
Variables
*profile-h*: intsource
*profile-ticks*: symbolsource
*profile-w*: intsource
*profile-x*: intsource
*profile-y*: intsource
DISPLAY_FPS_RATIO: unknownsource
const DMA_BUFFER_DEBUG_SIZE: unknownsource
const DMA_BUFFER_GLOBAL_SIZE: unknownsource
Types
draw-context: basicsource
gif-bank: structuresource
gif-cnt: uint32source
gif-ctrl: uint32source
gif-mode: uint32source
gif-p3cnt: uint32source
gif-p3tag: uint32source
gif-packet: basicsource
gif-stat: uint32source
gif-tag: uint128source
gif-tag-count: uint32source
gif-tag-prim: uint32source
gif-tag-regs: uint64source
gif-tag64: uint64source
gs-alpha: uint64source
gs-bank: structuresource
Fields
pmode: gs-pmode
smode2: gs-smode2
dspfb1: gs-display-fb
display1: gs-display
dspfb2: gs-display-fb
display2: gs-display
extbuf: uint64
extdata: uint64
extwrite: uint64
bgcolor: gs-bgcolor
csr: gs-csr
imr: uint64
busdir: uint64
gs-bgcolor: uint64source
gs-bitbltbuf: uint64source
gs-clamp: uint64source
gs-color-clamp: uint64source
gs-csr: uint64source
gs-display: uint64source
gs-display-fb: uint64source
gs-dthe: uint64source
gs-fog: uint64source
gs-fogcol: uint64source
gs-frame: uint64source
gs-gif-tag: structuresource
gs-miptbp: uint64source
gs-pmode: uint64source
gs-prim: uint64source
gs-prmode-cont: uint64source
gs-rgbaq: uint64source
gs-scissor: uint64source
gs-smode2: uint64source
gs-st: uint64source
gs-test: uint64source
gs-tex0: uint64source
gs-tex1: uint64source
gs-texa: uint64source
gs-texclut: uint64source
gs-trxdir: uint64source
gs-trxpos: uint64source
gs-trxreg: uint64source
gs-uv: uint64source
gs-xy-offset: uint64source
gs-xyz: uint64source
gs-xyzf: uint64source
gs-zbuf: uint64source
Functions
add-reg-gif-packet(packet: gif-packet, reg-idx: int, reg-val: int) => nonesource
Add a register to the packet
close-gif-packet(arg0: gif-packet, eop: int) => gif-packetsource
Finish adding registers.
default-buffer-init(buff: dma-buffer) => nonesource
Set some GS registers back to default values. Ends with a ret dma-tag.
This is intended to live in its own separate dma-buffer and not be added
to the global buffer. Calling this will reset this dma-buffer.
draw-context-set-xy(arg0: draw-context, x: int, y: int) => nonesource
Set the origin of the draw context, scaling by relative-y-scale as needed.
open-gif-packet(arg0: gif-packet) => gif-packetsource
Initialize an existing gif-packet for 0 registers
psm->string(arg0: gs-psm) => stringsource
Get the name of a texture format.
psm-page-height(arg0: gs-psm) => intsource
Convert texture format to some type of page height