mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
more debug information when RPC buffers exhaust (#3490)
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
(defconstant RPC-LOAD-STR 4) ;; called STR in IOP code
|
||||
(defconstant RPC-PLAY-STR 5) ;; called PLAY in IOP code
|
||||
|
||||
(defun-extern sound-buffer-dump int)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; an RPC buffer is a container of elements to send to the IOP.
|
||||
@@ -208,8 +210,9 @@
|
||||
(when (zero? (-> this rpc-port))
|
||||
;; if we're RPC 0, this is evidently a situation to warn about.
|
||||
(format 0 "WARNING: too many sound commands queued~%")
|
||||
;;(sound-buffer-dump)
|
||||
(sound-buffer-dump) ;; og:preserve-this added for debugging
|
||||
)
|
||||
(format 0 "WARNING: flushing RPC port #~D~%" (-> this rpc-port)) ;; og:preserve-this
|
||||
;; otherwise we just flush
|
||||
;; seems kinda dangerous. these could be the wrong parameters...
|
||||
(call this (the-as uint 0) (the-as pointer 0) (the-as uint 0))
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
(command (-> cmd command))
|
||||
)
|
||||
(if (= command (sound-command play))
|
||||
(format #t "~D ~A ~G~%" i a3-0 (-> cmd name))
|
||||
(format #t "~D ~A ~G~%" i a3-0 (&-> cmd name)) ;; og:preserve-this it's meant to point to the name i guess...
|
||||
(format #t "~D ~A~%" i a3-0)
|
||||
)
|
||||
)
|
||||
@@ -246,7 +246,6 @@
|
||||
((not (is-cd-in?))
|
||||
(if (or (not *progress-process*)
|
||||
(!= (-> *progress-process* 0 display-state) (progress-screen no-disc)))
|
||||
|
||||
(activate-progress *dproc* (progress-screen no-disc))
|
||||
)
|
||||
)
|
||||
@@ -254,7 +253,6 @@
|
||||
((not (is-cd-good?))
|
||||
(if (or (not *progress-process*)
|
||||
(!= (-> *progress-process* 0 display-state) (progress-screen bad-disc)))
|
||||
|
||||
(activate-progress *dproc* (progress-screen bad-disc))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: rpc-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(defun-extern sound-buffer-dump int)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype rpc-buffer (basic)
|
||||
@@ -168,9 +170,12 @@
|
||||
(defmethod add-element ((this rpc-buffer-pair))
|
||||
(let ((v1-0 (-> this current)))
|
||||
(when (= (-> v1-0 elt-used) (-> v1-0 elt-count))
|
||||
(if (zero? (-> this rpc-port))
|
||||
(when (zero? (-> this rpc-port))
|
||||
;; if we're RPC 0, this is evidently a situation to warn about.
|
||||
(format 0 "WARNING: too many sound commands queued~%")
|
||||
(sound-buffer-dump) ;; og:preserve-this added for debugging
|
||||
)
|
||||
(format 0 "WARNING: flushing RPC port #~D~%" (-> this rpc-port)) ;; og:preserve-this
|
||||
(call this (the-as uint 0) (the-as pointer 0) (the-as uint 0))
|
||||
(set! v1-0 (-> this current))
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: rpc-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defun-extern sound-buffer-dump int)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype rpc-buffer (basic)
|
||||
@@ -176,9 +178,12 @@ the other is being read/written by overlord."
|
||||
"Add an element. If the buffer is full, flush it!"
|
||||
(let ((v1-0 (-> this current)))
|
||||
(when (= (-> v1-0 elt-used) (-> v1-0 elt-count))
|
||||
(if (zero? (-> this rpc-port))
|
||||
(when (zero? (-> this rpc-port))
|
||||
;; if we're RPC 0, this is evidently a situation to warn about.
|
||||
(format 0 "WARNING: too many sound commands queued~%")
|
||||
(sound-buffer-dump) ;; og:preserve-this added for debugging
|
||||
)
|
||||
(format 0 "WARNING: flushing RPC port #~D~%" (-> this rpc-port)) ;; og:preserve-this
|
||||
(call this (the-as uint 0) (the-as pointer 0) (the-as uint 0))
|
||||
(set! v1-0 (-> this current))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user