mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 22:29:53 +00:00
[jak3] A few early files (#3330)
types-h, vu1-macros, gsound-h, dma-h, video-h, vu1-user-h, profile-h The `gsound-h` is very simple, but the rest have decent docs and all the macros we had from jak 2. So far, barely any differences! (there's a few in gsound-h)
This commit is contained in:
parent
3dc27e37e5
commit
b130c2f439
File diff suppressed because it is too large
Load Diff
@ -5,5 +5,242 @@
|
||||
;; name in dgo: dma-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defenum dma-tag-id
|
||||
:bitfield #f
|
||||
:type uint8
|
||||
(refe 0) ;; addr=ADDR, ends after this transfer
|
||||
(cnt 1) ;; addr=after tag, next-tag=after data
|
||||
(next 2) ;; addr=after tag, next-tag=ADDR
|
||||
(ref 3) ;; addr=ADDR, next-tag=after tag
|
||||
(refs 4) ;; ref, but stall controled
|
||||
(call 5) ;;
|
||||
(ret 6) ;;
|
||||
(end 7) ;; next, but ends.
|
||||
)
|
||||
|
||||
;; all these have mask (only applies to unpacks) and interrupt not set.
|
||||
(defenum vif-cmd
|
||||
:bitfield #f
|
||||
:type uint8
|
||||
(nop 0) ;; no-op, can still have irq set.
|
||||
(stcycl 1) ;; set write recycle register
|
||||
(offset 2) ;; set offset register
|
||||
(base 3) ;; set base register
|
||||
(itop 4) ;; set data pointer register (itops)
|
||||
(stmod 5) ;; set mode register
|
||||
(mskpath3 6) ;; set path 3 mask
|
||||
(mark 7) ;; set mark register
|
||||
(pc-port 8) ;; special tag for PC Port data.
|
||||
(flushe 16) ;; wait for end of microprogram
|
||||
(flush 17) ;; wait for end of microprogram and transfer (path1/path2)
|
||||
(flusha 19) ;; wait for end of microprogram and transfer (path1/path2/path3)
|
||||
(mscal 20) ;; activate microprogram (call)
|
||||
(mscalf 21) ;; flushe and activate (call)
|
||||
(mscnt 23) ;; activate microprogram (continue)
|
||||
(stmask 32) ;; set MASK register.
|
||||
(strow 48) ;; set filling data
|
||||
(stcol 49) ;; set filling data
|
||||
(mpg 74) ;; transfer microprogram
|
||||
(direct 80) ;; straight to GIF.
|
||||
(directhl 81)
|
||||
(unpack-s-32 96)
|
||||
(unpack-s-16 97)
|
||||
(unpack-s-8 98)
|
||||
;; 99 is invllid
|
||||
(unpack-v2-32 100)
|
||||
(unpack-v2-16 101)
|
||||
(unpack-v2-8 102)
|
||||
;; 103 is invalid
|
||||
(unpack-v3-32 104)
|
||||
(unpack-v3-16 105)
|
||||
(unpack-v3-8 106)
|
||||
;; 107 is invalid
|
||||
(unpack-v4-32 108)
|
||||
(unpack-v4-16 109)
|
||||
(unpack-v4-8 110)
|
||||
(unpack-v4-5 111)
|
||||
(cmd-mask 239) ;; not sure what this is.
|
||||
)
|
||||
|
||||
;; this makes a copy of the above type, but uses a uint32.
|
||||
(defenum vif-cmd-32
|
||||
:bitfield #f
|
||||
:type uint32
|
||||
:copy-entries vif-cmd
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype dma-chcr (uint32)
|
||||
"Memory mapped DMA channel control register. Typically used to start and check on DMA transfer."
|
||||
((dir uint8 :offset 0 :size 1)
|
||||
(mod uint8 :offset 2 :size 2)
|
||||
(asp uint8 :offset 4 :size 2)
|
||||
(tte uint8 :offset 6 :size 1)
|
||||
(tie uint8 :offset 7 :size 1)
|
||||
(str uint8 :offset 8 :size 1)
|
||||
(tag uint16 :offset 16 :size 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank (structure)
|
||||
"Bank of memory mapped DMA registers for a single channel. Used to control DMA."
|
||||
((chcr dma-chcr :offset 0)
|
||||
(madr uint32 :offset 16)
|
||||
(qwc uint32 :offset 32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-source (dma-bank)
|
||||
"DMA channel registers for a DMA channel supporting source-chain."
|
||||
((tadr uint32 :offset 48)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-vif (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel with call/ret stack."
|
||||
((as0 uint32 :offset 64)
|
||||
(as1 uint32 :offset 80)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-spr (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel supporting scratchpad transfer."
|
||||
((sadr uint32 :offset 128)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-ctrl (uint32)
|
||||
"Main DMA control register, shared for all channels."
|
||||
((dmae uint8 :offset 0 :size 1)
|
||||
(rele uint8 :offset 1 :size 1)
|
||||
(mfd uint8 :offset 2 :size 2)
|
||||
(sts uint8 :offset 4 :size 2)
|
||||
(std uint8 :offset 6 :size 2)
|
||||
(rcyc uint8 :offset 8 :size 3)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-enable (uint32)
|
||||
((cpnd uint8 :offset 16 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-sqwc (uint32)
|
||||
((sqwc uint8 :offset 0 :size 8)
|
||||
(tqwc uint8 :offset 16 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-bank-control (structure)
|
||||
"Memory mapping for shared DMA registers."
|
||||
((ctrl dma-ctrl :offset 0)
|
||||
(stat uint32 :offset 16)
|
||||
(pcr uint32 :offset 32)
|
||||
(sqwc dma-sqwc :offset 48)
|
||||
(rbsr uint32 :offset 64)
|
||||
(rbor uint32 :offset 80)
|
||||
(stadr uint32 :offset 96)
|
||||
(enabler uint32 :offset 5408)
|
||||
(enablew uint32 :offset 5520)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vu-code-block (basic)
|
||||
"Unused type for some VU code. vu-function is used instead."
|
||||
((name basic)
|
||||
(code uint32)
|
||||
(size int32)
|
||||
(dest-address uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vu-stat (uint64)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype dma-tag (uint64)
|
||||
"The 64-bit tag used by the DMA system."
|
||||
((qwc uint16 :offset 0 :size 16)
|
||||
(pce uint8 :offset 26 :size 2)
|
||||
(id dma-tag-id :offset 28 :size 3)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(addr uint32 :offset 32 :size 31)
|
||||
(spr uint8 :offset 63 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bucket (structure)
|
||||
"A linked list of DMA data, typically all in the same category. Used to organize the full DMA chain."
|
||||
((tag dma-tag)
|
||||
(last (pointer dma-tag))
|
||||
(dummy uint32)
|
||||
(next uint32 :offset 4)
|
||||
(clear uint64 :overlay-at last)
|
||||
(vif0 uint32 :overlay-at last)
|
||||
(vif1 uint32 :overlay-at dummy)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vif-mask (uint32)
|
||||
((m0 uint8 :offset 0 :size 2)
|
||||
(m1 uint8 :offset 2 :size 2)
|
||||
(m2 uint8 :offset 4 :size 2)
|
||||
(m3 uint8 :offset 6 :size 2)
|
||||
(m4 uint8 :offset 8 :size 2)
|
||||
(m5 uint8 :offset 10 :size 2)
|
||||
(m6 uint8 :offset 12 :size 2)
|
||||
(m7 uint8 :offset 14 :size 2)
|
||||
(m8 uint8 :offset 16 :size 2)
|
||||
(m9 uint8 :offset 18 :size 2)
|
||||
(m10 uint8 :offset 20 :size 2)
|
||||
(m11 uint8 :offset 22 :size 2)
|
||||
(m12 uint8 :offset 24 :size 2)
|
||||
(m13 uint8 :offset 26 :size 2)
|
||||
(m14 uint8 :offset 28 :size 2)
|
||||
(m15 uint8 :offset 30 :size 2)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-stcycl-imm (uint16)
|
||||
"The imm field of a VIF code using STCYCL, which adjusts the pattern for storing data."
|
||||
((cl uint8 :offset 0 :size 8)
|
||||
(wl uint8 :offset 8 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-unpack-imm (uint16)
|
||||
"The imm field of a VIF code using UNPACK, which transfers data to VU memory."
|
||||
((addr uint16 :offset 0 :size 10)
|
||||
(usn uint8 :offset 14 :size 1)
|
||||
(flg uint8 :offset 15 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-tag (uint32)
|
||||
"A tag consumed by the VIF, which accepts DMA data."
|
||||
((imm uint16 :offset 0 :size 16)
|
||||
(num uint8 :offset 16 :size 8)
|
||||
(cmd vif-cmd :offset 24 :size 7)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(msk uint8 :offset 28 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
@ -7,3 +7,30 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype video-params (structure)
|
||||
"Parameters for the framebuffer."
|
||||
((set-video-mode symbol)
|
||||
(reset-video-mode symbol)
|
||||
(display-fbp int32)
|
||||
(relative-x-scale float :offset 16)
|
||||
(display-dx int32)
|
||||
(display-dy int32)
|
||||
(display-sy int32)
|
||||
(relative-x-scale-reciprical float)
|
||||
(screen-pages-high int32)
|
||||
(smode2 uint64)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *video-params* (new 'static 'video-params
|
||||
:set-video-mode #f
|
||||
:reset-video-mode #f
|
||||
:display-fbp #xa4
|
||||
:relative-x-scale 1.0
|
||||
:display-dy 8
|
||||
:display-sy #xe0
|
||||
:relative-x-scale-reciprical 1.0
|
||||
:screen-pages-high 13
|
||||
)
|
||||
)
|
||||
|
@ -5,5 +5,40 @@
|
||||
;; name in dgo: vu1-user-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defenum tpage-category
|
||||
:type int8
|
||||
)
|
||||
|
||||
(defenum bucket-id
|
||||
:type int32
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype dma-foreground-sink (basic)
|
||||
"A specification for where a foreground renderer should output its DMA data."
|
||||
((bucket bucket-id)
|
||||
(foreground-texture-page tpage-category)
|
||||
(foreground-texture-level int8)
|
||||
(foreground-output-bucket int8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-bucket-state (structure)
|
||||
"The state of buffers for the generic renderer.
|
||||
When generating generic DMA data, you must know the previous state
|
||||
of the VU's memory to properly double-buffer the input and output data."
|
||||
((gifbuf-adr uint32)
|
||||
(inbuf-adr uint32)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-dma-foreground-sink (dma-foreground-sink)
|
||||
"A specification for where a foreground generic renderer should output DMA data,
|
||||
and the state of the VU memory buffers at the end of the bucket."
|
||||
((state generic-bucket-state :inline)
|
||||
)
|
||||
)
|
||||
|
@ -5,5 +5,249 @@
|
||||
;; name in dgo: vu1-macros
|
||||
;; dgos: GAME
|
||||
|
||||
#|@file
|
||||
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
|
||||
|#
|
||||
|
||||
(defmacro vu-clip (vfr cf)
|
||||
"Returns the result of VCLIP.
|
||||
NOTE: this implementation is pretty inefficient.
|
||||
If this ends up used a lot, it's probably worth rewriting.
|
||||
"
|
||||
`(let ((vec (new 'stack 'vector))
|
||||
(flag ,cf)
|
||||
)
|
||||
(.svf vec ,vfr)
|
||||
(let* ((w-plus (fabs (-> vec w)))
|
||||
(w-minus (- 0.0 w-plus))
|
||||
)
|
||||
;; CF = CF << 6
|
||||
(set! flag (logand #xffffff (shl flag 6)))
|
||||
|
||||
(when (> (-> vec x) w-plus)
|
||||
(logior! flag 1)
|
||||
)
|
||||
(when (< (-> vec x) w-minus)
|
||||
(logior! flag 2)
|
||||
)
|
||||
(when (> (-> vec y) w-plus)
|
||||
(logior! flag 4)
|
||||
)
|
||||
(when (< (-> vec y) w-minus)
|
||||
(logior! flag 8)
|
||||
)
|
||||
(when (> (-> vec z) w-plus)
|
||||
(logior! flag 16)
|
||||
)
|
||||
(when (< (-> vec z) w-minus)
|
||||
(logior! flag 32)
|
||||
)
|
||||
)
|
||||
flag
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro vftoi4.xyzw (dst src)
|
||||
"convert to 28.4 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(set! temp 16.0)
|
||||
(.mul.x.vf temp ,src temp)
|
||||
(.ftoi.vf ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro vftoi12.xyzw (dst src)
|
||||
"convert to 20.12 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(set! temp 4096.0)
|
||||
(.mul.x.vf temp ,src temp)
|
||||
(.ftoi.vf ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro vftoi15.xyzw (dst src)
|
||||
"convert to 17.15 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(set! temp 32768.0)
|
||||
(.mul.x.vf temp ,src temp)
|
||||
(.ftoi.vf ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro vitof4.xyzw (dst src)
|
||||
"convert from a 28.4 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(.itof.vf ,dst ,src)
|
||||
(set! temp 0.0625)
|
||||
(.mul.x.vf ,dst ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro vitof12.xyzw (dst src)
|
||||
"convert from a 20.12 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(.itof.vf ,dst ,src)
|
||||
(set! temp 0.000244140625)
|
||||
(.mul.x.vf ,dst ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro vitof15.xyzw (dst src)
|
||||
"convert from a 17.15 integer. This does the multiply while the number is still
|
||||
a float. This will have issues for very large floats, but it seems like this
|
||||
is how PCSX2 does it as well, so maybe it's right?
|
||||
NOTE: this is the only version of the instruction used in Jak 1, so we
|
||||
don't need to worry about masks."
|
||||
|
||||
`(begin
|
||||
(rlet ((temp :class vf))
|
||||
(.itof.vf ,dst ,src)
|
||||
(set! temp 0.000030517578125)
|
||||
(.mul.x.vf ,dst ,dst temp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; In the original game, they sometimes stashed some values in vf registers across function calls.
|
||||
;; In OpenGOAL, we don't have a one-to-one mapping of vf's to x86 hardware registers, so we need
|
||||
;; to manually backup and restore these.
|
||||
|
||||
;; it's used in a few places:
|
||||
;; - init-for-transforms sets up register for doing world -> screen transformations. only used for debug cam drawing
|
||||
;; - set-background-regs! sets up registers for background drawing and runs a VU0 program to premultiply some stuff
|
||||
;; - bsp also does a similar thing, but doesn't run the VU0 program
|
||||
|
||||
(deftype transform-regs (structure)
|
||||
;; Eventually we might want to actually name some of these fields to be more comprehensible?
|
||||
(;; vf0 not included!
|
||||
(vf1 uint128)
|
||||
(vf2 uint128)
|
||||
(vf3 uint128)
|
||||
(vf4 uint128)
|
||||
(vf5 uint128)
|
||||
(vf6 uint128)
|
||||
(vf7 uint128)
|
||||
(vf8 uint128)
|
||||
(vf9 uint128)
|
||||
(vf10 uint128)
|
||||
(vf11 uint128)
|
||||
(vf12 uint128)
|
||||
(vf13 uint128)
|
||||
(vf14 uint128)
|
||||
(vf15 uint128)
|
||||
(vf16 uint128)
|
||||
(vf17 uint128)
|
||||
(vf18 uint128)
|
||||
(vf19 uint128)
|
||||
(vf20 uint128)
|
||||
(vf21 uint128)
|
||||
(vf22 uint128)
|
||||
(vf23 uint128)
|
||||
(vf24 uint128)
|
||||
(vf25 uint128)
|
||||
(vf26 uint128)
|
||||
(vf27 uint128)
|
||||
(vf28 uint128)
|
||||
(vf29 uint128)
|
||||
(vf30 uint128)
|
||||
(vf31 uint128)
|
||||
)
|
||||
)
|
||||
|
||||
(define *transform-regs* (new 'static 'transform-regs))
|
||||
|
||||
|
||||
(defmacro with-vf0 (&rest body)
|
||||
"Macro for using the ps2-style vf0 register."
|
||||
|
||||
`(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
,@body
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro load-vf (reg)
|
||||
"Load a vf from the preserved vf registers"
|
||||
`(.lvf ,reg (&-> *transform-regs* ,reg))
|
||||
)
|
||||
|
||||
(defmacro save-vf (reg)
|
||||
"Save a vf to the preserved vf registers"
|
||||
`(.svf (&-> *transform-regs* ,reg) ,reg)
|
||||
)
|
||||
|
||||
(defmacro with-vf (regs &key (rw 'read) &rest body)
|
||||
"Macro for using the specified ps2-style vf registers. These are preserved in *transform-regs*
|
||||
Each register name in regs must be a valid vf register name. vf0 CANNOT be used! Use with-vf0 for that instead.
|
||||
rw specifies the read/write mode:
|
||||
'read means the registers will be read from the preserved registers. This is the default
|
||||
'write means the registers will be written to the preserved registers at the end
|
||||
'readwrite (or 'rw) means both
|
||||
#f means neither, turning this into a fancy macro around rlet."
|
||||
|
||||
`(rlet (,@(apply (lambda (x) `(,x :class vf)) regs))
|
||||
|
||||
,@(if (or (eq? rw ''read) (eq? rw ''readwrite) (eq? rw ''rw))
|
||||
(apply (lambda (y)
|
||||
`(load-vf ,y)
|
||||
) regs)
|
||||
'()
|
||||
)
|
||||
|
||||
,@body
|
||||
|
||||
;; this will mess up the return value!
|
||||
,@(if (or (eq? rw ''write) (eq? rw ''readwrite) (eq? rw ''rw))
|
||||
(apply (lambda (y)
|
||||
`(save-vf ,y)
|
||||
) regs)
|
||||
'()
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
@ -5,5 +5,333 @@
|
||||
;; name in dgo: gsound-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defenum sound-command
|
||||
:type uint16
|
||||
)
|
||||
|
||||
(defenum sound-group
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
)
|
||||
|
||||
(defenum sound-mask
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
)
|
||||
|
||||
(defenum stream-status
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype sound-stream-name (structure)
|
||||
((name uint8 48)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-id (uint32)
|
||||
()
|
||||
(:methods
|
||||
(unknown () none)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype sound-bank-id (uint32)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype sound-name (uint128)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype sound-rpc-cmd (structure)
|
||||
((rsvd1 uint16)
|
||||
(command uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-play-params (structure)
|
||||
((mask uint16)
|
||||
(pitch-mod int16)
|
||||
(bend int16)
|
||||
(fo-min int16)
|
||||
(fo-max int16)
|
||||
(fo-curve int8)
|
||||
(priority int8)
|
||||
(volume int32)
|
||||
(trans int32 3)
|
||||
(group uint8)
|
||||
(reg uint8 3)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-bank-cmd (sound-rpc-cmd)
|
||||
((bank-name sound-name)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-test-cmd (sound-rpc-cmd)
|
||||
((ee-addr pointer)
|
||||
(param0 uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-sound-cmd (sound-rpc-cmd)
|
||||
((id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-group-cmd (sound-rpc-cmd)
|
||||
((group uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-load-bank (sound-rpc-bank-cmd)
|
||||
((ee-addr pointer)
|
||||
(mode uint32)
|
||||
(priority uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-load-music (sound-rpc-bank-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-unload-bank (sound-rpc-bank-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-play (sound-rpc-sound-cmd)
|
||||
((name sound-name)
|
||||
(params sound-play-params :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-pause-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-stop-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-continue-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-param (sound-rpc-sound-cmd)
|
||||
((params sound-play-params :inline)
|
||||
(auto-time int32)
|
||||
(auto-from int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-master-volume (sound-rpc-group-cmd)
|
||||
((volume int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-pause-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-stop-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-continue-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-cancel-dgo (sound-rpc-group-cmd)
|
||||
((id uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-get-irx-version (sound-rpc-cmd)
|
||||
((major uint32)
|
||||
(minor uint32)
|
||||
(ee-addr pointer)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-language (sound-rpc-cmd)
|
||||
((lang uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-stereo-mode (sound-rpc-cmd)
|
||||
((mode int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-reverb (sound-rpc-cmd)
|
||||
((core uint8)
|
||||
(reverb int32)
|
||||
(left uint32)
|
||||
(right uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-ear-trans (sound-rpc-cmd)
|
||||
((ear-trans1 int32 3)
|
||||
(ear-trans0 int32 3)
|
||||
(cam-trans int32 3)
|
||||
(cam-forward int32 3)
|
||||
(cam-left int32 3)
|
||||
(cam-scale int32)
|
||||
(cam-inverted int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-flava (sound-rpc-cmd)
|
||||
((flava uint8)
|
||||
(excitement uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-midi-reg (sound-rpc-cmd)
|
||||
((reg int32)
|
||||
(value int16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-shutdown (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-set-fps (sound-rpc-cmd)
|
||||
((fps uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-list-sounds (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-unload-music (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-rpc-union (structure)
|
||||
((data uint32 20)
|
||||
(load-bank sound-rpc-load-bank :overlay-at (-> data 0))
|
||||
(unload-bank sound-rpc-unload-bank :overlay-at (-> data 0))
|
||||
(play sound-rpc-play :overlay-at (-> data 0))
|
||||
(pause-sound sound-rpc-pause-sound :overlay-at (-> data 0))
|
||||
(stop-sound sound-rpc-stop-sound :overlay-at (-> data 0))
|
||||
(continue-sound sound-rpc-continue-sound :overlay-at (-> data 0))
|
||||
(set-param sound-rpc-set-param :overlay-at (-> data 0))
|
||||
(set-master-volume sound-rpc-set-master-volume :overlay-at (-> data 0))
|
||||
(pause-group sound-rpc-pause-group :overlay-at (-> data 0))
|
||||
(stop-group sound-rpc-stop-group :overlay-at (-> data 0))
|
||||
(continue-group sound-rpc-continue-group :overlay-at (-> data 0))
|
||||
(get-irx-version sound-rpc-get-irx-version :overlay-at (-> data 0))
|
||||
(set-language sound-rpc-set-language :overlay-at (-> data 0))
|
||||
(set-reverb sound-rpc-set-reverb :overlay-at (-> data 0))
|
||||
(set-ear-trans sound-rpc-set-ear-trans :overlay-at (-> data 0))
|
||||
(set-flava sound-rpc-set-flava :overlay-at (-> data 0))
|
||||
(set-midi-reg sound-rpc-set-midi-reg :overlay-at (-> data 0))
|
||||
(set-fps sound-rpc-set-fps :overlay-at (-> data 0))
|
||||
(shutdown sound-rpc-shutdown :overlay-at (-> data 0))
|
||||
(list-sounds sound-rpc-list-sounds :overlay-at (-> data 0))
|
||||
(unload-music sound-rpc-unload-music :overlay-at (-> data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-spec (basic)
|
||||
((mask sound-mask)
|
||||
(num float)
|
||||
(group sound-group)
|
||||
(reg uint8 3)
|
||||
(sound-name-char uint8 16)
|
||||
(sound-name sound-name :overlay-at (-> sound-name-char 0))
|
||||
(trans int32 4)
|
||||
(volume int32)
|
||||
(pitch-mod int32)
|
||||
(bend int32)
|
||||
(fo-min int16)
|
||||
(fo-max int16)
|
||||
(fo-curve int8)
|
||||
(priority int8)
|
||||
(auto-time int32)
|
||||
(auto-from int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sound-bank-state (structure)
|
||||
((name basic)
|
||||
(mode uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *current-sound-id* (the-as sound-id #x10000))
|
||||
|
||||
(deftype ambient-sound (basic)
|
||||
((spec sound-spec)
|
||||
(playing-id sound-id)
|
||||
(trans vector :inline)
|
||||
(name uint128)
|
||||
(play-time uint64)
|
||||
(time-base uint64)
|
||||
(time-random uint64)
|
||||
(volume int32)
|
||||
(pitch int32)
|
||||
(falloff-near int32)
|
||||
(falloff-far int32)
|
||||
(falloff-mode int32)
|
||||
(params (pointer float))
|
||||
(param-count int32)
|
||||
(entity entity)
|
||||
(sound-count int32)
|
||||
(sound-state int32)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(ambient-sound-method-9 () none)
|
||||
(ambient-sound-method-10 () none)
|
||||
(ambient-sound-method-11 () none)
|
||||
(ambient-sound-method-12 () none)
|
||||
(ambient-sound-method-13 () none)
|
||||
(ambient-sound-method-14 () none)
|
||||
(ambient-sound-method-15 () none)
|
||||
(ambient-sound-method-16 () none)
|
||||
)
|
||||
)
|
||||
|
@ -5,5 +5,138 @@
|
||||
;; name in dgo: profile-h
|
||||
;; dgos: GAME
|
||||
|
||||
(declare-type dma-buffer structure)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype profile-segment (structure)
|
||||
"Confusingly, this has two uses. Either a single event, or a summary of all events within a category."
|
||||
((name symbol)
|
||||
(start-time int16)
|
||||
(end-time int16)
|
||||
(count uint8)
|
||||
(vu-count uint8)
|
||||
(depth uint16)
|
||||
(color rgba)
|
||||
(code-time uint16 :overlay-at start-time)
|
||||
(vu-time uint16 :overlay-at end-time)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype profile-collapse (structure)
|
||||
"An array of 'summaries'. Each entry in data is a summary of all events within a category."
|
||||
((count int32)
|
||||
(data profile-segment 48 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype profile-segment-array (basic)
|
||||
"All profiling data for a frame, stored as a tree of events. There is one for the VU, and one for the EE."
|
||||
((count int16)
|
||||
(depth int8)
|
||||
(max-depth int8)
|
||||
(base-time int16)
|
||||
(segment profile-segment 9)
|
||||
(data profile-segment 1024 :inline)
|
||||
)
|
||||
(:methods
|
||||
(get-total-time (_type_) int)
|
||||
(start-frame! (_type_) none)
|
||||
(start-segment! (_type_ symbol rgba) none)
|
||||
(end-segment! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype profile-array (structure)
|
||||
"The EE and VU profilers, and the drawing code."
|
||||
((data profile-segment-array 2)
|
||||
)
|
||||
(:methods
|
||||
(postprocess-data! (_type_) none)
|
||||
(draw-bars! (_type_ dma-buffer int) none)
|
||||
(draw-text! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod get-total-time ((this profile-segment-array))
|
||||
"Get the duration of the top-level event (typically, the whole frame)"
|
||||
(- (-> this data 0 end-time) (-> this data 0 start-time))
|
||||
)
|
||||
|
||||
(deftype profile-spec (structure)
|
||||
"Specification for a profile category."
|
||||
((name basic)
|
||||
(color rgba)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *profile-gap-color* (new 'static 'rgba :r #x30 :g #x30 :b #x30 :a #x80))
|
||||
|
||||
(define *profile-all-color* (new 'static 'rgba :r #x55 :g #x55 :b #x55 :a #x80))
|
||||
|
||||
(define *profile-blit-color* (new 'static 'rgba :r #x20 :g #x20 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-sky-color* (new 'static 'rgba :r #x20 :g #x80 :b #x20 :a #x80))
|
||||
|
||||
(define *profile-ocean-color* (new 'static 'rgba :r #x20 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-hfrag-color* (new 'static 'rgba :r #x80 :g #x20 :b #x20 :a #x80))
|
||||
|
||||
(define *profile-tfrag-color* (new 'static 'rgba :r #x80 :g #x20 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-texture-color* (new 'static 'rgba :r #x80 :g #x80 :b #x20 :a #x80))
|
||||
|
||||
(define *profile-tie-color* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-generic-color* (new 'static 'rgba :r #x70 :g #x70 :a #x80))
|
||||
|
||||
(define *profile-merc-color* (new 'static 'rgba :r #x70 :b #x70 :a #x80))
|
||||
|
||||
(define *profile-shrubbery-color* (new 'static 'rgba :r #x70 :a #x80))
|
||||
|
||||
(define *profile-particle-color* (new 'static 'rgba :g #x70 :b #x70 :a #x80))
|
||||
|
||||
(define *profile-debug-color* (new 'static 'rgba :g #x70 :a #x80))
|
||||
|
||||
(define *profile-other-color* (new 'static 'rgba :g #x70 :b #x70 :a #x80))
|
||||
|
||||
(define *profile-joints-color* (new 'static 'rgba :r #x70 :g #x70 :b #x20 :a #x80))
|
||||
|
||||
(define *profile-draw-hook-color* (new 'static 'rgba :r #x20 :g #x70 :b #x70 :a #x80))
|
||||
|
||||
(define *profile-background-color* (new 'static 'rgba :r #x60 :g #x60 :b #x40 :a #x80))
|
||||
|
||||
(define *profile-foreground-color* (new 'static 'rgba :r #x40 :g #x60 :b #x60 :a #x80))
|
||||
|
||||
(define *profile-bones-color* (new 'static 'rgba :r #x20 :g #x80 :b #x60 :a #x80))
|
||||
|
||||
(define *profile-actors-color* (new 'static 'rgba :r #x80 :g #x10 :b #x70 :a #x80))
|
||||
|
||||
(define *profile-collide-color* (new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-nav-color* (new 'static 'rgba :r #x38 :g #x48 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-camera-color* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *profile-gs-sync-color* (new 'static 'rgba :r #x70 :g #x70 :b #x70 :a #x80))
|
||||
|
||||
(when *debug-segment*
|
||||
(define *profile-array* (new 'debug 'profile-array))
|
||||
|
||||
(set! (-> *profile-array* data 0) (new 'debug 'profile-segment-array))
|
||||
|
||||
(set! (-> *profile-array* data 1) (new 'debug 'profile-segment-array))
|
||||
|
||||
(define *profile-collapse* (new 'debug 'profile-collapse))
|
||||
|
||||
(define *profile-interrupt-segment* (-> *profile-array* data 1))
|
||||
|
||||
(define *profile-interrupt-start* #f)
|
||||
|
||||
)
|
||||
|
@ -5,5 +5,128 @@
|
||||
;; name in dgo: types-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defmacro s.w! (location value)
|
||||
"Utility macro to store a 32-bit value at a given address. Performs _no_ type checking."
|
||||
`(set! (-> (the-as (pointer uint32) ,location) 0) (the-as uint32 ,value))
|
||||
)
|
||||
|
||||
(defmacro l.wu (location)
|
||||
"Load an unsigned 32-bit value from a given address. Performs _no_ type checking."
|
||||
`(-> (the-as (pointer uint32) ,location) 0)
|
||||
)
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Common Units
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; in-game durations, distances, and rotations are stored in special formats.
|
||||
;; these macros/constants convert from literals to the correct format.
|
||||
;; for example, (meters 4.0) will give you a distance representing 4 in-game meters.
|
||||
|
||||
;; meters are stored as (usually) a float, scaled by 4096.
|
||||
;; this gives you reasonable accuracy as an integer.
|
||||
(defglobalconstant METER_LENGTH 4096.0)
|
||||
|
||||
(defmacro meters (x)
|
||||
"Convert number to meters.
|
||||
If the input is a constant float or integer, the result will be a
|
||||
compile time constant float. Otherwise, it will not be constant.
|
||||
Returns float."
|
||||
|
||||
;; we don't have enough constant propagation for the compiler to figure this out.
|
||||
(cond
|
||||
((float? x)
|
||||
(* METER_LENGTH x)
|
||||
)
|
||||
((integer? x)
|
||||
(* METER_LENGTH x)
|
||||
)
|
||||
(#t
|
||||
`(* METER_LENGTH ,x)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; rotations are stored in 65,536ths of a full rotation.
|
||||
;; like with meters, you get a reasonable accuracy as an integer.
|
||||
;; additionally, it is a power-of-two, so wrapping rotations can be done
|
||||
;; quickly by converting to an int, masking, and back to float
|
||||
(defglobalconstant DEGREES_PER_ROT 65536.0)
|
||||
|
||||
;; this was deg in GOAL
|
||||
(defmacro degrees (x)
|
||||
"Convert number to degrees unit.
|
||||
Will keep a constant float/int constant."
|
||||
(cond
|
||||
((or (float? x) (integer? x))
|
||||
(* DEGREES_PER_ROT (/ (+ 0.0 x) 360.0))
|
||||
)
|
||||
(#t
|
||||
`(* (/ (the float ,x) 360.0)
|
||||
DEGREES_PER_ROT
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro fsec (x)
|
||||
"Convert number to seconds unit.
|
||||
Returns float."
|
||||
(cond
|
||||
((or (integer? x) (float? x))
|
||||
(* 1.0 TICKS_PER_SECOND x)
|
||||
)
|
||||
(#t
|
||||
`(* 1.0 TICKS_PER_SECOND ,x)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype basic-reserved (basic)
|
||||
()
|
||||
(:methods
|
||||
(basic-reserved-method-9 () none)
|
||||
(basic-reserved-method-10 () none)
|
||||
(basic-reserved-method-11 () none)
|
||||
(basic-reserved-method-12 () none)
|
||||
(basic-reserved-method-13 () none)
|
||||
(basic-reserved-method-14 () none)
|
||||
(basic-reserved-method-15 () none)
|
||||
(basic-reserved-method-16 () none)
|
||||
(basic-reserved-method-17 () none)
|
||||
(basic-reserved-method-18 () none)
|
||||
(basic-reserved-method-19 () none)
|
||||
(basic-reserved-method-20 () none)
|
||||
(basic-reserved-method-21 () none)
|
||||
(basic-reserved-method-22 () none)
|
||||
(basic-reserved-method-23 () none)
|
||||
(basic-reserved-method-24 () none)
|
||||
(basic-reserved-method-25 () none)
|
||||
(basic-reserved-method-26 () none)
|
||||
(basic-reserved-method-27 () none)
|
||||
(basic-reserved-method-28 () none)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype part-id (uint32)
|
||||
()
|
||||
)
|
||||
|
||||
;; og:preserve-this
|
||||
;; unused, and not supported in the compiler, since the linker would need to link to the type object, which
|
||||
;; means the type needs to be allocated, and we'd need to know the number of methods.
|
||||
;; technically, the compiler does support this through the `(type-ref sage-finalboss :method-count 53)` feature,
|
||||
;; but it seems like too much work to support this in the decompiler for an array that's not even used...
|
||||
; (new 'static 'boxed-array :type type
|
||||
; pilot-info
|
||||
; flut-info
|
||||
; mech-info
|
||||
; turret-info
|
||||
; indax-info
|
||||
; tube-info
|
||||
; race-mesh
|
||||
; )
|
360
test/decompiler/reference/jak3/engine/dma/dma-h_REF.gc
generated
vendored
Normal file
360
test/decompiler/reference/jak3/engine/dma/dma-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,360 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type dma-chcr
|
||||
(deftype dma-chcr (uint32)
|
||||
"Memory mapped DMA channel control register. Typically used to start and check on DMA transfer."
|
||||
((dir uint8 :offset 0 :size 1)
|
||||
(mod uint8 :offset 2 :size 2)
|
||||
(asp uint8 :offset 4 :size 2)
|
||||
(tte uint8 :offset 6 :size 1)
|
||||
(tie uint8 :offset 7 :size 1)
|
||||
(str uint8 :offset 8 :size 1)
|
||||
(tag uint16 :offset 16 :size 16)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-chcr
|
||||
(defmethod inspect ((this dma-chcr))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-chcr)
|
||||
(format #t "~1Tdir: ~D~%" (-> this dir))
|
||||
(format #t "~1Tmod: ~D~%" (-> this mod))
|
||||
(format #t "~1Tasp: ~D~%" (-> this asp))
|
||||
(format #t "~1Ttte: ~D~%" (-> this tte))
|
||||
(format #t "~1Ttie: ~D~%" (-> this tie))
|
||||
(format #t "~1Tstr: ~D~%" (-> this str))
|
||||
(format #t "~1Ttag: #x~X~%" (-> this tag))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-bank
|
||||
(deftype dma-bank (structure)
|
||||
"Bank of memory mapped DMA registers for a single channel. Used to control DMA."
|
||||
((chcr dma-chcr :offset 0)
|
||||
(madr uint32 :offset 16)
|
||||
(qwc uint32 :offset 32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bank
|
||||
(defmethod inspect ((this dma-bank))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bank)
|
||||
(format #t "~1Tchcr: #x~X~%" (-> this chcr))
|
||||
(format #t "~1Tmadr: #x~X~%" (-> this madr))
|
||||
(format #t "~1Tqwc: #x~X~%" (-> this qwc))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-bank-source
|
||||
(deftype dma-bank-source (dma-bank)
|
||||
"DMA channel registers for a DMA channel supporting source-chain."
|
||||
((tadr uint32 :offset 48)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bank-source
|
||||
(defmethod inspect ((this dma-bank-source))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bank-source)
|
||||
(format #t "~1Tchcr: #x~X~%" (-> this chcr))
|
||||
(format #t "~1Tmadr: #x~X~%" (-> this madr))
|
||||
(format #t "~1Tqwc: #x~X~%" (-> this qwc))
|
||||
(format #t "~1Ttadr: #x~X~%" (-> this tadr))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-bank-vif
|
||||
(deftype dma-bank-vif (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel with call/ret stack."
|
||||
((as0 uint32 :offset 64)
|
||||
(as1 uint32 :offset 80)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bank-vif
|
||||
(defmethod inspect ((this dma-bank-vif))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bank-vif)
|
||||
(format #t "~1Tchcr: #x~X~%" (-> this chcr))
|
||||
(format #t "~1Tmadr: #x~X~%" (-> this madr))
|
||||
(format #t "~1Tqwc: #x~X~%" (-> this qwc))
|
||||
(format #t "~1Ttadr: #x~X~%" (-> this tadr))
|
||||
(format #t "~1Tas0: #x~X~%" (-> this as0))
|
||||
(format #t "~1Tas1: #x~X~%" (-> this as1))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-bank-spr
|
||||
(deftype dma-bank-spr (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel supporting scratchpad transfer."
|
||||
((sadr uint32 :offset 128)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bank-spr
|
||||
(defmethod inspect ((this dma-bank-spr))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bank-spr)
|
||||
(format #t "~1Tchcr: #x~X~%" (-> this chcr))
|
||||
(format #t "~1Tmadr: #x~X~%" (-> this madr))
|
||||
(format #t "~1Tqwc: #x~X~%" (-> this qwc))
|
||||
(format #t "~1Ttadr: #x~X~%" (-> this tadr))
|
||||
(format #t "~1Tsadr: #x~X~%" (-> this sadr))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-ctrl
|
||||
(deftype dma-ctrl (uint32)
|
||||
"Main DMA control register, shared for all channels."
|
||||
((dmae uint8 :offset 0 :size 1)
|
||||
(rele uint8 :offset 1 :size 1)
|
||||
(mfd uint8 :offset 2 :size 2)
|
||||
(sts uint8 :offset 4 :size 2)
|
||||
(std uint8 :offset 6 :size 2)
|
||||
(rcyc uint8 :offset 8 :size 3)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type dma-enable
|
||||
(deftype dma-enable (uint32)
|
||||
((cpnd uint8 :offset 16 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type dma-sqwc
|
||||
(deftype dma-sqwc (uint32)
|
||||
((sqwc uint8 :offset 0 :size 8)
|
||||
(tqwc uint8 :offset 16 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type dma-bank-control
|
||||
(deftype dma-bank-control (structure)
|
||||
"Memory mapping for shared DMA registers."
|
||||
((ctrl dma-ctrl :offset 0)
|
||||
(stat uint32 :offset 16)
|
||||
(pcr uint32 :offset 32)
|
||||
(sqwc dma-sqwc :offset 48)
|
||||
(rbsr uint32 :offset 64)
|
||||
(rbor uint32 :offset 80)
|
||||
(stadr uint32 :offset 96)
|
||||
(enabler uint32 :offset 5408)
|
||||
(enablew uint32 :offset 5520)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bank-control
|
||||
(defmethod inspect ((this dma-bank-control))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bank-control)
|
||||
(format #t "~1Tctrl: #x~X~%" (-> this ctrl))
|
||||
(format #t "~1Tstat: #x~X~%" (-> this stat))
|
||||
(format #t "~1Tpcr: #x~X~%" (-> this pcr))
|
||||
(format #t "~1Tsqwc: #x~X~%" (-> this sqwc))
|
||||
(format #t "~1Trbsr: #x~X~%" (-> this rbsr))
|
||||
(format #t "~1Trbor: #x~X~%" (-> this rbor))
|
||||
(format #t "~1Tstadr: #x~X~%" (-> this stadr))
|
||||
(format #t "~1Tenabler: ~D~%" (-> this enabler))
|
||||
(format #t "~1Tenablew: ~D~%" (-> this enablew))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type vu-code-block
|
||||
(deftype vu-code-block (basic)
|
||||
"Unused type for some VU code. vu-function is used instead."
|
||||
((name basic)
|
||||
(code uint32)
|
||||
(size int32)
|
||||
(dest-address uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vu-code-block
|
||||
(defmethod inspect ((this vu-code-block))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tname: ~A~%" (-> this name))
|
||||
(format #t "~1Tcode: #x~X~%" (-> this code))
|
||||
(format #t "~1Tsize: ~D~%" (-> this size))
|
||||
(format #t "~1Tdest-address: ~D~%" (-> this dest-address))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type vu-stat
|
||||
(deftype vu-stat (uint64)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition of type dma-tag
|
||||
(deftype dma-tag (uint64)
|
||||
"The 64-bit tag used by the DMA system."
|
||||
((qwc uint16 :offset 0 :size 16)
|
||||
(pce uint8 :offset 26 :size 2)
|
||||
(id dma-tag-id :offset 28 :size 3)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(addr uint32 :offset 32 :size 31)
|
||||
(spr uint8 :offset 63 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-tag
|
||||
(defmethod inspect ((this dma-tag))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-tag)
|
||||
(format #t "~1Tqwc: ~D~%" (-> this qwc))
|
||||
(format #t "~1Tpce: ~D~%" (-> this pce))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(format #t "~1Tirq: ~D~%" (-> this irq))
|
||||
(format #t "~1Taddr: #x~X~%" (-> this addr))
|
||||
(format #t "~1Tspr: ~D~%" (-> this spr))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type dma-bucket
|
||||
(deftype dma-bucket (structure)
|
||||
"A linked list of DMA data, typically all in the same category. Used to organize the full DMA chain."
|
||||
((tag dma-tag)
|
||||
(last (pointer dma-tag))
|
||||
(dummy uint32)
|
||||
(next uint32 :offset 4)
|
||||
(clear uint64 :overlay-at last)
|
||||
(vif0 uint32 :overlay-at last)
|
||||
(vif1 uint32 :overlay-at dummy)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-bucket
|
||||
(defmethod inspect ((this dma-bucket))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'dma-bucket)
|
||||
(format #t "~1Ttag: ~D~%" (-> this tag))
|
||||
(format #t "~1Tlast: #x~X~%" (-> this last))
|
||||
(format #t "~1Tdummy: ~D~%" (-> this dummy))
|
||||
(format #t "~1Tnext: #x~X~%" (-> this next))
|
||||
(format #t "~1Tclear: ~D~%" (-> this clear))
|
||||
(format #t "~1Tvif0: ~D~%" (-> this last))
|
||||
(format #t "~1Tvif1: ~D~%" (-> this dummy))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type vif-mask
|
||||
(deftype vif-mask (uint32)
|
||||
((m0 uint8 :offset 0 :size 2)
|
||||
(m1 uint8 :offset 2 :size 2)
|
||||
(m2 uint8 :offset 4 :size 2)
|
||||
(m3 uint8 :offset 6 :size 2)
|
||||
(m4 uint8 :offset 8 :size 2)
|
||||
(m5 uint8 :offset 10 :size 2)
|
||||
(m6 uint8 :offset 12 :size 2)
|
||||
(m7 uint8 :offset 14 :size 2)
|
||||
(m8 uint8 :offset 16 :size 2)
|
||||
(m9 uint8 :offset 18 :size 2)
|
||||
(m10 uint8 :offset 20 :size 2)
|
||||
(m11 uint8 :offset 22 :size 2)
|
||||
(m12 uint8 :offset 24 :size 2)
|
||||
(m13 uint8 :offset 26 :size 2)
|
||||
(m14 uint8 :offset 28 :size 2)
|
||||
(m15 uint8 :offset 30 :size 2)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type vif-stcycl-imm
|
||||
(deftype vif-stcycl-imm (uint16)
|
||||
"The imm field of a VIF code using STCYCL, which adjusts the pattern for storing data."
|
||||
((cl uint8 :offset 0 :size 8)
|
||||
(wl uint8 :offset 8 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type vif-unpack-imm
|
||||
(deftype vif-unpack-imm (uint16)
|
||||
"The imm field of a VIF code using UNPACK, which transfers data to VU memory."
|
||||
((addr uint16 :offset 0 :size 10)
|
||||
(usn uint8 :offset 14 :size 1)
|
||||
(flg uint8 :offset 15 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type vif-tag
|
||||
(deftype vif-tag (uint32)
|
||||
"A tag consumed by the VIF, which accepts DMA data."
|
||||
((imm uint16 :offset 0 :size 16)
|
||||
(num uint8 :offset 16 :size 8)
|
||||
(cmd vif-cmd :offset 24 :size 7)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(msk uint8 :offset 28 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vif-tag
|
||||
(defmethod inspect ((this vif-tag))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'vif-tag)
|
||||
(format #t "~1Timm: #x~X~%" (-> this imm))
|
||||
(format #t "~1Tnum: ~D~%" (-> this num))
|
||||
(format #t "~1Tcmd: #x~X~%" (-> this cmd))
|
||||
(format #t "~1Tmsk: ~D~%" (-> this msk))
|
||||
(format #t "~1Tirq: ~D~%" (-> this irq))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for function dma-sync-fast
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function dma-send-no-scratch
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function dma-sync-with-count
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function dma-count-until-done
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
59
test/decompiler/reference/jak3/engine/gfx/hw/video-h_REF.gc
generated
vendored
Normal file
59
test/decompiler/reference/jak3/engine/gfx/hw/video-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type video-params
|
||||
(deftype video-params (structure)
|
||||
"Parameters for the framebuffer."
|
||||
((set-video-mode symbol)
|
||||
(reset-video-mode symbol)
|
||||
(display-fbp int32)
|
||||
(relative-x-scale float :offset 16)
|
||||
(display-dx int32)
|
||||
(display-dy int32)
|
||||
(display-sy int32)
|
||||
(relative-x-scale-reciprical float)
|
||||
(screen-pages-high int32)
|
||||
(smode2 uint64)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type video-params
|
||||
(defmethod inspect ((this video-params))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'video-params)
|
||||
(format #t "~1Tset-video-mode: ~A~%" (-> this set-video-mode))
|
||||
(format #t "~1Treset-video-mode: ~A~%" (-> this reset-video-mode))
|
||||
(format #t "~1Tdisplay-fbp: ~D~%" (-> this display-fbp))
|
||||
(format #t "~1Trelative-x-scale: ~f~%" (-> this relative-x-scale))
|
||||
(format #t "~1Tdisplay-dx: ~D~%" (-> this display-dx))
|
||||
(format #t "~1Tdisplay-dy: ~D~%" (-> this display-dy))
|
||||
(format #t "~1Tdisplay-sy: ~D~%" (-> this display-sy))
|
||||
(format #t "~1Trelative-x-scale-reciprical: ~f~%" (-> this relative-x-scale-reciprical))
|
||||
(format #t "~1Tscreen-pages-high: ~D~%" (-> this screen-pages-high))
|
||||
(format #t "~1Tsmode2: ~D~%" (-> this smode2))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *video-params*, type video-params
|
||||
(define *video-params* (new 'static 'video-params
|
||||
:set-video-mode #f
|
||||
:reset-video-mode #f
|
||||
:display-fbp #xa4
|
||||
:relative-x-scale 1.0
|
||||
:display-dy 8
|
||||
:display-sy #xe0
|
||||
:relative-x-scale-reciprical 1.0
|
||||
:screen-pages-high 13
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
82
test/decompiler/reference/jak3/engine/gfx/vu1-user-h_REF.gc
generated
vendored
Normal file
82
test/decompiler/reference/jak3/engine/gfx/vu1-user-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type dma-foreground-sink
|
||||
(deftype dma-foreground-sink (basic)
|
||||
"A specification for where a foreground renderer should output its DMA data."
|
||||
((bucket bucket-id)
|
||||
(foreground-texture-page tpage-category)
|
||||
(foreground-texture-level int8)
|
||||
(foreground-output-bucket int8)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type dma-foreground-sink
|
||||
(defmethod inspect ((this dma-foreground-sink))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tbucket: ~D~%" (-> this bucket))
|
||||
(format #t "~1Tforeground-texture-page: ~D~%" (-> this foreground-texture-page))
|
||||
(format #t "~1Tforeground-texture-level: ~D~%" (-> this foreground-texture-level))
|
||||
(format #t "~1Tforeground-output-bucket: ~D~%" (-> this foreground-output-bucket))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type generic-bucket-state
|
||||
(deftype generic-bucket-state (structure)
|
||||
"The state of buffers for the generic renderer.
|
||||
When generating generic DMA data, you must know the previous state
|
||||
of the VU's memory to properly double-buffer the input and output data."
|
||||
((gifbuf-adr uint32)
|
||||
(inbuf-adr uint32)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
;; definition for method 3 of type generic-bucket-state
|
||||
(defmethod inspect ((this generic-bucket-state))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'generic-bucket-state)
|
||||
(format #t "~1Tgifbuf-adr: ~D~%" (-> this gifbuf-adr))
|
||||
(format #t "~1Tinbuf-adr: ~D~%" (-> this inbuf-adr))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type generic-dma-foreground-sink
|
||||
(deftype generic-dma-foreground-sink (dma-foreground-sink)
|
||||
"A specification for where a foreground generic renderer should output DMA data,
|
||||
and the state of the VU memory buffers at the end of the bucket."
|
||||
((state generic-bucket-state :inline)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type generic-dma-foreground-sink
|
||||
(defmethod inspect ((this generic-dma-foreground-sink))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tbucket: ~D~%" (-> this bucket))
|
||||
(format #t "~1Tforeground-texture-page: ~D~%" (-> this foreground-texture-page))
|
||||
(format #t "~1Tforeground-texture-level: ~D~%" (-> this foreground-texture-level))
|
||||
(format #t "~1Tforeground-output-bucket: ~D~%" (-> this foreground-output-bucket))
|
||||
(format #t "~1Tstate: #<generic-bucket-state @ #x~X>~%" (-> this state))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
245
test/decompiler/reference/jak3/engine/util/profile-h_REF.gc
generated
vendored
Normal file
245
test/decompiler/reference/jak3/engine/util/profile-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,245 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type profile-segment
|
||||
(deftype profile-segment (structure)
|
||||
"Confusingly, this has two uses. Either a single event, or a summary of all events within a category."
|
||||
((name symbol)
|
||||
(start-time int16)
|
||||
(end-time int16)
|
||||
(count uint8)
|
||||
(vu-count uint8)
|
||||
(depth uint16)
|
||||
(color rgba)
|
||||
(code-time uint16 :overlay-at start-time)
|
||||
(vu-time uint16 :overlay-at end-time)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
;; definition for method 3 of type profile-segment
|
||||
(defmethod inspect ((this profile-segment))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'profile-segment)
|
||||
(format #t "~1Tname: ~A~%" (-> this name))
|
||||
(format #t "~1Tstart-time: ~D~%" (-> this start-time))
|
||||
(format #t "~1Tend-time: ~D~%" (-> this end-time))
|
||||
(format #t "~1Tcount: ~D~%" (-> this count))
|
||||
(format #t "~1Tvu-count: ~D~%" (-> this vu-count))
|
||||
(format #t "~1Tdepth: ~D~%" (-> this depth))
|
||||
(format #t "~1Tcolor: #x~X~%" (-> this color))
|
||||
(format #t "~1Tcode-time: ~D~%" (-> this code-time))
|
||||
(format #t "~1Tvu-time: ~D~%" (-> this vu-time))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type profile-collapse
|
||||
(deftype profile-collapse (structure)
|
||||
"An array of 'summaries'. Each entry in data is a summary of all events within a category."
|
||||
((count int32)
|
||||
(data profile-segment 48 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type profile-collapse
|
||||
(defmethod inspect ((this profile-collapse))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'profile-collapse)
|
||||
(format #t "~1Tcount: ~D~%" (-> this count))
|
||||
(format #t "~1Tdata[48] @ #x~X~%" (-> this data))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type profile-segment-array
|
||||
(deftype profile-segment-array (basic)
|
||||
"All profiling data for a frame, stored as a tree of events. There is one for the VU, and one for the EE."
|
||||
((count int16)
|
||||
(depth int8)
|
||||
(max-depth int8)
|
||||
(base-time int16)
|
||||
(segment profile-segment 9)
|
||||
(data profile-segment 1024 :inline)
|
||||
)
|
||||
(:methods
|
||||
(get-total-time (_type_) int)
|
||||
(start-frame! (_type_) none)
|
||||
(start-segment! (_type_ symbol rgba) none)
|
||||
(end-segment! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type profile-segment-array
|
||||
(defmethod inspect ((this profile-segment-array))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tcount: ~D~%" (-> this count))
|
||||
(format #t "~1Tdepth: ~D~%" (-> this depth))
|
||||
(format #t "~1Tmax-depth: ~D~%" (-> this max-depth))
|
||||
(format #t "~1Tbase-time: ~D~%" (-> this base-time))
|
||||
(format #t "~1Tsegment[9] @ #x~X~%" (-> this segment))
|
||||
(format #t "~1Tdata[1024] @ #x~X~%" (-> this data))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type profile-array
|
||||
(deftype profile-array (structure)
|
||||
"The EE and VU profilers, and the drawing code."
|
||||
((data profile-segment-array 2)
|
||||
)
|
||||
(:methods
|
||||
(postprocess-data! (_type_) none)
|
||||
(draw-bars! (_type_ dma-buffer int) none)
|
||||
(draw-text! (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type profile-array
|
||||
(defmethod inspect ((this profile-array))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'profile-array)
|
||||
(format #t "~1Tdata[2] @ #x~X~%" (-> this data))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 9 of type profile-segment-array
|
||||
(defmethod get-total-time ((this profile-segment-array))
|
||||
"Get the duration of the top-level event (typically, the whole frame)"
|
||||
(- (-> this data 0 end-time) (-> this data 0 start-time))
|
||||
)
|
||||
|
||||
;; definition of type profile-spec
|
||||
(deftype profile-spec (structure)
|
||||
"Specification for a profile category."
|
||||
((name basic)
|
||||
(color rgba)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type profile-spec
|
||||
(defmethod inspect ((this profile-spec))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'profile-spec)
|
||||
(format #t "~1Tname: ~A~%" (-> this name))
|
||||
(format #t "~1Tcolor: ~D~%" (-> this color))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *profile-gap-color*, type rgba
|
||||
(define *profile-gap-color* (new 'static 'rgba :r #x30 :g #x30 :b #x30 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-all-color*, type rgba
|
||||
(define *profile-all-color* (new 'static 'rgba :r #x55 :g #x55 :b #x55 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-blit-color*, type rgba
|
||||
(define *profile-blit-color* (new 'static 'rgba :r #x20 :g #x20 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-sky-color*, type rgba
|
||||
(define *profile-sky-color* (new 'static 'rgba :r #x20 :g #x80 :b #x20 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-ocean-color*, type rgba
|
||||
(define *profile-ocean-color* (new 'static 'rgba :r #x20 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-hfrag-color*, type rgba
|
||||
(define *profile-hfrag-color* (new 'static 'rgba :r #x80 :g #x20 :b #x20 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-tfrag-color*, type rgba
|
||||
(define *profile-tfrag-color* (new 'static 'rgba :r #x80 :g #x20 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-texture-color*, type rgba
|
||||
(define *profile-texture-color* (new 'static 'rgba :r #x80 :g #x80 :b #x20 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-tie-color*, type rgba
|
||||
(define *profile-tie-color* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-generic-color*, type rgba
|
||||
(define *profile-generic-color* (new 'static 'rgba :r #x70 :g #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-merc-color*, type rgba
|
||||
(define *profile-merc-color* (new 'static 'rgba :r #x70 :b #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-shrubbery-color*, type rgba
|
||||
(define *profile-shrubbery-color* (new 'static 'rgba :r #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-particle-color*, type rgba
|
||||
(define *profile-particle-color* (new 'static 'rgba :g #x70 :b #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-debug-color*, type rgba
|
||||
(define *profile-debug-color* (new 'static 'rgba :g #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-other-color*, type rgba
|
||||
(define *profile-other-color* (new 'static 'rgba :g #x70 :b #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-joints-color*, type rgba
|
||||
(define *profile-joints-color* (new 'static 'rgba :r #x70 :g #x70 :b #x20 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-draw-hook-color*, type rgba
|
||||
(define *profile-draw-hook-color* (new 'static 'rgba :r #x20 :g #x70 :b #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-background-color*, type rgba
|
||||
(define *profile-background-color* (new 'static 'rgba :r #x60 :g #x60 :b #x40 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-foreground-color*, type rgba
|
||||
(define *profile-foreground-color* (new 'static 'rgba :r #x40 :g #x60 :b #x60 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-bones-color*, type rgba
|
||||
(define *profile-bones-color* (new 'static 'rgba :r #x20 :g #x80 :b #x60 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-actors-color*, type rgba
|
||||
(define *profile-actors-color* (new 'static 'rgba :r #x80 :g #x10 :b #x70 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-collide-color*, type rgba
|
||||
(define *profile-collide-color* (new 'static 'rgba :r #x80 :g #x40 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-nav-color*, type rgba
|
||||
(define *profile-nav-color* (new 'static 'rgba :r #x38 :g #x48 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-camera-color*, type rgba
|
||||
(define *profile-camera-color* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
;; definition for symbol *profile-gs-sync-color*, type rgba
|
||||
(define *profile-gs-sync-color* (new 'static 'rgba :r #x70 :g #x70 :b #x70 :a #x80))
|
||||
|
||||
;; this part is debug only
|
||||
(when *debug-segment*
|
||||
;; definition for symbol *profile-array*, type profile-array
|
||||
(define *profile-array* (new 'debug 'profile-array))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *profile-array* data 0) (new 'debug 'profile-segment-array))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *profile-array* data 1) (new 'debug 'profile-segment-array))
|
||||
|
||||
;; definition for symbol *profile-collapse*, type profile-collapse
|
||||
(define *profile-collapse* (new 'debug 'profile-collapse))
|
||||
|
||||
;; definition for symbol *profile-interrupt-segment*, type profile-segment-array
|
||||
(define *profile-interrupt-segment* (-> *profile-array* data 1))
|
||||
|
||||
;; definition for symbol *profile-interrupt-start*, type symbol
|
||||
(define *profile-interrupt-start* #f)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
59
test/decompiler/reference/jak3/engine/util/types-h_REF.gc
generated
vendored
Normal file
59
test/decompiler/reference/jak3/engine/util/types-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type basic-reserved
|
||||
(deftype basic-reserved (basic)
|
||||
()
|
||||
(:methods
|
||||
(basic-reserved-method-9 () none)
|
||||
(basic-reserved-method-10 () none)
|
||||
(basic-reserved-method-11 () none)
|
||||
(basic-reserved-method-12 () none)
|
||||
(basic-reserved-method-13 () none)
|
||||
(basic-reserved-method-14 () none)
|
||||
(basic-reserved-method-15 () none)
|
||||
(basic-reserved-method-16 () none)
|
||||
(basic-reserved-method-17 () none)
|
||||
(basic-reserved-method-18 () none)
|
||||
(basic-reserved-method-19 () none)
|
||||
(basic-reserved-method-20 () none)
|
||||
(basic-reserved-method-21 () none)
|
||||
(basic-reserved-method-22 () none)
|
||||
(basic-reserved-method-23 () none)
|
||||
(basic-reserved-method-24 () none)
|
||||
(basic-reserved-method-25 () none)
|
||||
(basic-reserved-method-26 () none)
|
||||
(basic-reserved-method-27 () none)
|
||||
(basic-reserved-method-28 () none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type basic-reserved
|
||||
(defmethod inspect ((this basic-reserved))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type part-id
|
||||
(deftype part-id (uint32)
|
||||
()
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(new 'static 'boxed-array :type type
|
||||
pilot-info
|
||||
flut-info
|
||||
mech-info
|
||||
turret-info
|
||||
indax-info
|
||||
tube-info
|
||||
race-mesh
|
||||
)
|
||||
|
||||
|
||||
|
892
test/decompiler/reference/jak3/sound/gsound-h_REF.gc
generated
vendored
Normal file
892
test/decompiler/reference/jak3/sound/gsound-h_REF.gc
generated
vendored
Normal file
@ -0,0 +1,892 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type sound-stream-name
|
||||
(deftype sound-stream-name (structure)
|
||||
((name uint8 48)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-stream-name
|
||||
(defmethod inspect ((this sound-stream-name))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-stream-name)
|
||||
(format #t "~1Tname[48] @ #x~X~%" (-> this name))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-id
|
||||
(deftype sound-id (uint32)
|
||||
()
|
||||
(:methods
|
||||
(unknown () none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type sound-bank-id
|
||||
(deftype sound-bank-id (uint32)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition of type sound-name
|
||||
(deftype sound-name (uint128)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-cmd
|
||||
(deftype sound-rpc-cmd (structure)
|
||||
((rsvd1 uint16)
|
||||
(command uint16)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-cmd
|
||||
(defmethod inspect ((this sound-rpc-cmd))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-cmd)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-play-params
|
||||
(deftype sound-play-params (structure)
|
||||
((mask uint16)
|
||||
(pitch-mod int16)
|
||||
(bend int16)
|
||||
(fo-min int16)
|
||||
(fo-max int16)
|
||||
(fo-curve int8)
|
||||
(priority int8)
|
||||
(volume int32)
|
||||
(trans int32 3)
|
||||
(group uint8)
|
||||
(reg uint8 3)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-play-params
|
||||
(defmethod inspect ((this sound-play-params))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-play-params)
|
||||
(format #t "~1Tmask: ~D~%" (-> this mask))
|
||||
(format #t "~1Tpitch-mod: ~D~%" (-> this pitch-mod))
|
||||
(format #t "~1Tbend: ~D~%" (-> this bend))
|
||||
(format #t "~1Tfo-min: ~D~%" (-> this fo-min))
|
||||
(format #t "~1Tfo-max: ~D~%" (-> this fo-max))
|
||||
(format #t "~1Tfo-curve: ~D~%" (-> this fo-curve))
|
||||
(format #t "~1Tpriority: ~D~%" (-> this priority))
|
||||
(format #t "~1Tvolume: ~D~%" (-> this volume))
|
||||
(format #t "~1Ttrans[3] @ #x~X~%" (-> this trans))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(format #t "~1Treg[3] @ #x~X~%" (-> this reg))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-bank-cmd
|
||||
(deftype sound-rpc-bank-cmd (sound-rpc-cmd)
|
||||
((bank-name sound-name)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-bank-cmd
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-rpc-bank-cmd))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-bank-cmd)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tbank-name: ~D~%" (-> this bank-name))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-test-cmd
|
||||
(deftype sound-rpc-test-cmd (sound-rpc-cmd)
|
||||
((ee-addr pointer)
|
||||
(param0 uint16)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-test-cmd
|
||||
(defmethod inspect ((this sound-rpc-test-cmd))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-test-cmd)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tee-addr: ~D~%" (-> this ee-addr))
|
||||
(format #t "~1Tparam0: ~D~%" (-> this param0))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-sound-cmd
|
||||
(deftype sound-rpc-sound-cmd (sound-rpc-cmd)
|
||||
((id sound-id)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-sound-cmd
|
||||
(defmethod inspect ((this sound-rpc-sound-cmd))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-sound-cmd)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-group-cmd
|
||||
(deftype sound-rpc-group-cmd (sound-rpc-cmd)
|
||||
((group uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-group-cmd
|
||||
(defmethod inspect ((this sound-rpc-group-cmd))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-group-cmd)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-load-bank
|
||||
(deftype sound-rpc-load-bank (sound-rpc-bank-cmd)
|
||||
((ee-addr pointer)
|
||||
(mode uint32)
|
||||
(priority uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-load-bank
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-rpc-load-bank))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-load-bank)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tbank-name: ~D~%" (-> this bank-name))
|
||||
(format #t "~1Tee-addr: ~D~%" (-> this ee-addr))
|
||||
(format #t "~1Tmode: ~D~%" (-> this mode))
|
||||
(format #t "~1Tpriority: ~D~%" (-> this priority))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-load-music
|
||||
(deftype sound-rpc-load-music (sound-rpc-bank-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-load-music
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-rpc-load-music))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-load-music)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tbank-name: ~D~%" (-> this bank-name))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-unload-bank
|
||||
(deftype sound-rpc-unload-bank (sound-rpc-bank-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-unload-bank
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-rpc-unload-bank))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-unload-bank)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tbank-name: ~D~%" (-> this bank-name))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-play
|
||||
(deftype sound-rpc-play (sound-rpc-sound-cmd)
|
||||
((name sound-name)
|
||||
(params sound-play-params :inline)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-play
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-rpc-play))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-play)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(format #t "~1Tname: ~D~%" (-> this name))
|
||||
(format #t "~1Tparams: #<sound-play-params @ #x~X>~%" (-> this params))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-pause-sound
|
||||
(deftype sound-rpc-pause-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-pause-sound
|
||||
(defmethod inspect ((this sound-rpc-pause-sound))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-pause-sound)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-stop-sound
|
||||
(deftype sound-rpc-stop-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-stop-sound
|
||||
(defmethod inspect ((this sound-rpc-stop-sound))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-stop-sound)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-continue-sound
|
||||
(deftype sound-rpc-continue-sound (sound-rpc-sound-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-continue-sound
|
||||
(defmethod inspect ((this sound-rpc-continue-sound))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-continue-sound)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-param
|
||||
(deftype sound-rpc-set-param (sound-rpc-sound-cmd)
|
||||
((params sound-play-params :inline)
|
||||
(auto-time int32)
|
||||
(auto-from int32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-param
|
||||
(defmethod inspect ((this sound-rpc-set-param))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-param)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(format #t "~1Tparams: #<sound-play-params @ #x~X>~%" (-> this params))
|
||||
(format #t "~1Tauto-time: ~D~%" (-> this auto-time))
|
||||
(format #t "~1Tauto-from: ~D~%" (-> this auto-from))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-master-volume
|
||||
(deftype sound-rpc-set-master-volume (sound-rpc-group-cmd)
|
||||
((volume int32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-master-volume
|
||||
(defmethod inspect ((this sound-rpc-set-master-volume))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-master-volume)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(format #t "~1Tvolume: ~D~%" (-> this volume))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-pause-group
|
||||
(deftype sound-rpc-pause-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-pause-group
|
||||
(defmethod inspect ((this sound-rpc-pause-group))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-pause-group)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-stop-group
|
||||
(deftype sound-rpc-stop-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-stop-group
|
||||
(defmethod inspect ((this sound-rpc-stop-group))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-stop-group)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-continue-group
|
||||
(deftype sound-rpc-continue-group (sound-rpc-group-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-continue-group
|
||||
(defmethod inspect ((this sound-rpc-continue-group))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-continue-group)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-cancel-dgo
|
||||
(deftype sound-rpc-cancel-dgo (sound-rpc-group-cmd)
|
||||
((id uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-cancel-dgo
|
||||
(defmethod inspect ((this sound-rpc-cancel-dgo))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-cancel-dgo)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(format #t "~1Tid: ~D~%" (-> this id))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-get-irx-version
|
||||
(deftype sound-rpc-get-irx-version (sound-rpc-cmd)
|
||||
((major uint32)
|
||||
(minor uint32)
|
||||
(ee-addr pointer)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-get-irx-version
|
||||
(defmethod inspect ((this sound-rpc-get-irx-version))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-get-irx-version)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tmajor: ~D~%" (-> this major))
|
||||
(format #t "~1Tminor: ~D~%" (-> this minor))
|
||||
(format #t "~1Tee-addr: ~D~%" (-> this ee-addr))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-language
|
||||
(deftype sound-rpc-set-language (sound-rpc-cmd)
|
||||
((lang uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-language
|
||||
(defmethod inspect ((this sound-rpc-set-language))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-language)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tlang: ~D~%" (-> this lang))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-stereo-mode
|
||||
(deftype sound-rpc-set-stereo-mode (sound-rpc-cmd)
|
||||
((mode int32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-stereo-mode
|
||||
(defmethod inspect ((this sound-rpc-set-stereo-mode))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-stereo-mode)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tmode: ~D~%" (-> this mode))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-reverb
|
||||
(deftype sound-rpc-set-reverb (sound-rpc-cmd)
|
||||
((core uint8)
|
||||
(reverb int32)
|
||||
(left uint32)
|
||||
(right uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-reverb
|
||||
(defmethod inspect ((this sound-rpc-set-reverb))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-reverb)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tcore: ~D~%" (-> this core))
|
||||
(format #t "~1Treverb: ~D~%" (-> this reverb))
|
||||
(format #t "~1Tleft: ~D~%" (-> this left))
|
||||
(format #t "~1Tright: ~D~%" (-> this right))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-ear-trans
|
||||
(deftype sound-rpc-set-ear-trans (sound-rpc-cmd)
|
||||
((ear-trans1 int32 3)
|
||||
(ear-trans0 int32 3)
|
||||
(cam-trans int32 3)
|
||||
(cam-forward int32 3)
|
||||
(cam-left int32 3)
|
||||
(cam-scale int32)
|
||||
(cam-inverted int32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-ear-trans
|
||||
(defmethod inspect ((this sound-rpc-set-ear-trans))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-ear-trans)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tear-trans1[3] @ #x~X~%" (-> this ear-trans1))
|
||||
(format #t "~1Tear-trans0[3] @ #x~X~%" (-> this ear-trans0))
|
||||
(format #t "~1Tcam-trans[3] @ #x~X~%" (-> this cam-trans))
|
||||
(format #t "~1Tcam-forward[3] @ #x~X~%" (-> this cam-forward))
|
||||
(format #t "~1Tcam-left[3] @ #x~X~%" (-> this cam-left))
|
||||
(format #t "~1Tcam-scale: ~D~%" (-> this cam-scale))
|
||||
(format #t "~1Tcam-inverted: ~D~%" (-> this cam-inverted))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-flava
|
||||
(deftype sound-rpc-set-flava (sound-rpc-cmd)
|
||||
((flava uint8)
|
||||
(excitement uint8)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-flava
|
||||
(defmethod inspect ((this sound-rpc-set-flava))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-flava)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tflava: ~D~%" (-> this flava))
|
||||
(format #t "~1Texcitement: ~D~%" (-> this excitement))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-midi-reg
|
||||
(deftype sound-rpc-set-midi-reg (sound-rpc-cmd)
|
||||
((reg int32)
|
||||
(value int16)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-midi-reg
|
||||
(defmethod inspect ((this sound-rpc-set-midi-reg))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-midi-reg)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Treg: ~D~%" (-> this reg))
|
||||
(format #t "~1Tvalue: ~D~%" (-> this value))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-shutdown
|
||||
(deftype sound-rpc-shutdown (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-shutdown
|
||||
(defmethod inspect ((this sound-rpc-shutdown))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-shutdown)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-set-fps
|
||||
(deftype sound-rpc-set-fps (sound-rpc-cmd)
|
||||
((fps uint8)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-set-fps
|
||||
(defmethod inspect ((this sound-rpc-set-fps))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-set-fps)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(format #t "~1Tfps: ~D~%" (-> this fps))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-list-sounds
|
||||
(deftype sound-rpc-list-sounds (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-list-sounds
|
||||
(defmethod inspect ((this sound-rpc-list-sounds))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-list-sounds)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-unload-music
|
||||
(deftype sound-rpc-unload-music (sound-rpc-cmd)
|
||||
()
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-unload-music
|
||||
(defmethod inspect ((this sound-rpc-unload-music))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-unload-music)
|
||||
(format #t "~1Trsvd1: ~D~%" (-> this rsvd1))
|
||||
(format #t "~1Tcommand: ~D~%" (-> this command))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-rpc-union
|
||||
(deftype sound-rpc-union (structure)
|
||||
((data uint32 20)
|
||||
(load-bank sound-rpc-load-bank :overlay-at (-> data 0))
|
||||
(unload-bank sound-rpc-unload-bank :overlay-at (-> data 0))
|
||||
(play sound-rpc-play :overlay-at (-> data 0))
|
||||
(pause-sound sound-rpc-pause-sound :overlay-at (-> data 0))
|
||||
(stop-sound sound-rpc-stop-sound :overlay-at (-> data 0))
|
||||
(continue-sound sound-rpc-continue-sound :overlay-at (-> data 0))
|
||||
(set-param sound-rpc-set-param :overlay-at (-> data 0))
|
||||
(set-master-volume sound-rpc-set-master-volume :overlay-at (-> data 0))
|
||||
(pause-group sound-rpc-pause-group :overlay-at (-> data 0))
|
||||
(stop-group sound-rpc-stop-group :overlay-at (-> data 0))
|
||||
(continue-group sound-rpc-continue-group :overlay-at (-> data 0))
|
||||
(get-irx-version sound-rpc-get-irx-version :overlay-at (-> data 0))
|
||||
(set-language sound-rpc-set-language :overlay-at (-> data 0))
|
||||
(set-reverb sound-rpc-set-reverb :overlay-at (-> data 0))
|
||||
(set-ear-trans sound-rpc-set-ear-trans :overlay-at (-> data 0))
|
||||
(set-flava sound-rpc-set-flava :overlay-at (-> data 0))
|
||||
(set-midi-reg sound-rpc-set-midi-reg :overlay-at (-> data 0))
|
||||
(set-fps sound-rpc-set-fps :overlay-at (-> data 0))
|
||||
(shutdown sound-rpc-shutdown :overlay-at (-> data 0))
|
||||
(list-sounds sound-rpc-list-sounds :overlay-at (-> data 0))
|
||||
(unload-music sound-rpc-unload-music :overlay-at (-> data 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-rpc-union
|
||||
(defmethod inspect ((this sound-rpc-union))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-rpc-union)
|
||||
(format #t "~1Tdata[20] @ #x~X~%" (-> this data))
|
||||
(format #t "~1Tload-bank: #<sound-rpc-load-bank @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tunload-bank: #<sound-rpc-unload-bank @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tplay: #<sound-rpc-play @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tpause-sound: #<sound-rpc-pause-sound @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tstop-sound: #<sound-rpc-stop-sound @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tcontinue-sound: #<sound-rpc-continue-sound @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-param: #<sound-rpc-set-param @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-master-volume: #<sound-rpc-set-master-volume @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tpause-group: #<sound-rpc-pause-group @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tstop-group: #<sound-rpc-stop-group @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tcontinue-group: #<sound-rpc-continue-group @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tget-irx-version: #<sound-rpc-get-irx-version @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-language: #<sound-rpc-set-language @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-reverb: #<sound-rpc-set-reverb @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-ear-trans: #<sound-rpc-set-ear-trans @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-flava: #<sound-rpc-set-flava @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-midi-reg: #<sound-rpc-set-midi-reg @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tset-fps: #<sound-rpc-set-fps @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tshutdown: #<sound-rpc-shutdown @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tlist-sounds: #<sound-rpc-list-sounds @ #x~X>~%" (-> this load-bank))
|
||||
(format #t "~1Tunload-music: #<sound-rpc-unload-music @ #x~X>~%" (-> this load-bank))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-spec
|
||||
(deftype sound-spec (basic)
|
||||
((mask sound-mask)
|
||||
(num float)
|
||||
(group sound-group)
|
||||
(reg uint8 3)
|
||||
(sound-name-char uint8 16)
|
||||
(sound-name sound-name :overlay-at (-> sound-name-char 0))
|
||||
(trans int32 4)
|
||||
(volume int32)
|
||||
(pitch-mod int32)
|
||||
(bend int32)
|
||||
(fo-min int16)
|
||||
(fo-max int16)
|
||||
(fo-curve int8)
|
||||
(priority int8)
|
||||
(auto-time int32)
|
||||
(auto-from int32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-spec
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this sound-spec))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tmask: ~D~%" (-> this mask))
|
||||
(format #t "~1Tnum: ~f~%" (-> this num))
|
||||
(format #t "~1Tgroup: ~D~%" (-> this group))
|
||||
(format #t "~1Treg[3] @ #x~X~%" (-> this reg))
|
||||
(format #t "~1Tsound-name-char: ~g~%" (-> this sound-name-char))
|
||||
(format #t "~1Tsound-name: ~D~%" (-> this sound-name))
|
||||
(format #t "~1Ttrans[4] @ #x~X~%" (-> this trans))
|
||||
(format #t "~1Tvolume: ~D~%" (-> this volume))
|
||||
(format #t "~1Tpitch-mod: ~D~%" (-> this pitch-mod))
|
||||
(format #t "~1Tbend: ~D~%" (-> this bend))
|
||||
(format #t "~1Tfo-min: ~D~%" (-> this fo-min))
|
||||
(format #t "~1Tfo-max: ~D~%" (-> this fo-max))
|
||||
(format #t "~1Tfo-curve: ~D~%" (-> this fo-curve))
|
||||
(format #t "~1Tpriority: ~D~%" (-> this priority))
|
||||
(format #t "~1Tauto-time: ~D~%" (-> this auto-time))
|
||||
(format #t "~1Tauto-from: ~D~%" (-> this auto-from))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition of type sound-bank-state
|
||||
(deftype sound-bank-state (structure)
|
||||
((name basic)
|
||||
(mode uint32)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sound-bank-state
|
||||
(defmethod inspect ((this sound-bank-state))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this 'sound-bank-state)
|
||||
(format #t "~1Tname: ~A~%" (-> this name))
|
||||
(format #t "~1Tmode: ~D~%" (-> this mode))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for symbol *current-sound-id*, type sound-id
|
||||
(define *current-sound-id* (the-as sound-id #x10000))
|
||||
|
||||
;; definition of type ambient-sound
|
||||
(deftype ambient-sound (basic)
|
||||
((spec sound-spec)
|
||||
(playing-id sound-id)
|
||||
(trans vector :inline)
|
||||
(name uint128)
|
||||
(play-time uint64)
|
||||
(time-base uint64)
|
||||
(time-random uint64)
|
||||
(volume int32)
|
||||
(pitch int32)
|
||||
(falloff-near int32)
|
||||
(falloff-far int32)
|
||||
(falloff-mode int32)
|
||||
(params (pointer float))
|
||||
(param-count int32)
|
||||
(entity entity)
|
||||
(sound-count int32)
|
||||
(sound-state int32)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(ambient-sound-method-9 () none)
|
||||
(ambient-sound-method-10 () none)
|
||||
(ambient-sound-method-11 () none)
|
||||
(ambient-sound-method-12 () none)
|
||||
(ambient-sound-method-13 () none)
|
||||
(ambient-sound-method-14 () none)
|
||||
(ambient-sound-method-15 () none)
|
||||
(ambient-sound-method-16 () none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type ambient-sound
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod inspect ((this ambient-sound))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~1Tspec: ~A~%" (-> this spec))
|
||||
(format #t "~1Tplaying-id: ~D~%" (-> this playing-id))
|
||||
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
|
||||
(format #t "~1Tname: ~D~%" (-> this name))
|
||||
(format #t "~1Tplay-time: ~D~%" (-> this play-time))
|
||||
(format #t "~1Ttime-base: ~D~%" (-> this time-base))
|
||||
(format #t "~1Ttime-random: ~D~%" (-> this time-random))
|
||||
(format #t "~1Tvolume: ~D~%" (-> this volume))
|
||||
(format #t "~1Tpitch: ~D~%" (-> this pitch))
|
||||
(format #t "~1Tfalloff-near: ~D~%" (-> this falloff-near))
|
||||
(format #t "~1Tfalloff-far: ~D~%" (-> this falloff-far))
|
||||
(format #t "~1Tfalloff-mode: ~D~%" (-> this falloff-mode))
|
||||
(format #t "~1Tparams: #x~X~%" (-> this params))
|
||||
(format #t "~1Tparam-count: ~D~%" (-> this param-count))
|
||||
(format #t "~1Tentity: ~A~%" (-> this entity))
|
||||
(format #t "~1Tsound-count: ~D~%" (-> this sound-count))
|
||||
(format #t "~1Tsound-state: ~D~%" (-> this sound-state))
|
||||
(label cfg-4)
|
||||
this
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,9 @@
|
||||
"CGO/GAME.CGO"
|
||||
],
|
||||
|
||||
"skip_compile_files": [],
|
||||
"skip_compile_files": [
|
||||
"types-h" // weird array of types.
|
||||
],
|
||||
|
||||
"skip_compile_functions": [
|
||||
// gcommon
|
||||
|
Loading…
Reference in New Issue
Block a user