Files
jak-project/goal_src/jak3/engine/debug/sampler.gc
Hat Kid cfe3ec9229 decomp3: cam-debug, hover-nav-edit, pilot-recorder (#4203)
Should be the last remaining files aside from `anim-tester` which we
already have a better replacement for.
2026-04-09 06:27:00 +02:00

49 lines
1.2 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: sampler.gc
;; name in dgo: sampler
;; dgos: GAME
;; og:ignore-form:install-handler 9 timer0-handler
;; DECOMP BEGINS
;; this file is debug only
(declare-file (debug))
(define *sampler-mem* (the-as pointer #f))
(define *sampler-compare* (the-as uint 1))
(define *sampler-count* 0)
;; ERROR: function was not converted to expressions. Cannot decompile.
;; og:preserve-this
; (set! (-> (the-as timer-bank #x10000000) mode) (new 'static 'timer-mode))
(defun-debug sampler-start ()
(set! (-> (the-as timer-bank #x10000000) mode) (new 'static 'timer-mode))
(set! (-> (the-as timer-bank #x10000000) count) (the-as uint 0))
(set! (-> (the-as timer-bank #x10000000) comp) *sampler-compare*)
(if (not *sampler-mem*)
(set! *sampler-mem* (malloc 'debug #x1000000))
)
(when (nonzero? *sampler-mem*)
(mem-set32! *sampler-mem* #x400000 0)
(set! (-> (the-as timer-bank #x10000000) mode)
(new 'static 'timer-mode :clks (timer-clock-selection busclk/256) :zret #x1 :cue #x1 :cmpe #x1 :equf #x1)
)
(set! *sampler-count* 0)
0
)
(none)
)
(defun-debug sampler-stop ()
(set! (-> (the-as timer-bank #x10000000) mode) (new 'static 'timer-mode))
0
(none)
)