decomp: the majority of navigate and rolling-lightning-mole (#741)

* decomp: Add texture-upload to ref tests

* maybe 50% done?

* 5 functions to go!

* decomp: stuck in `navigate`

* work-around fp issue

* some cleanup and label casts

* working on supporting asm instructions -- this is currently WRONG

* support ASM operations

* fixes for asm op support

* decomp: finish the vast majority of `navigate`

* format

* update test though i think this suggests a regression!

* decomp: cleanup some more of navigate

* decomp: finish `rolling-lightning-mole`

* revert `r0` handling for `pcpyud` and `pextuw`

* update ref tests

* lint

* fix a failing test

* help

* navigate mostly works now, with some potential bugs

* remove my debugging logs

* update ref tests

* review feedback cleanup

* these are all likely fine

* can't get the crab to chase me anymore

* the crab is back
This commit is contained in:
Tyler Wilding
2022-01-18 01:14:47 -05:00
committed by GitHub
parent f8fa95f9bf
commit 142961a747
70 changed files with 11764 additions and 909 deletions
+2 -2
View File
@@ -944,7 +944,7 @@
(ja-post)
(when (logtest? (-> self flags) (anim-tester-flags fanimt4))
(draw-joint-spheres self)
(dummy-10 (-> self skel) (the-as symbol *stdcon*))
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
)
)
(none)
@@ -2497,7 +2497,7 @@
)
(logclear! (-> self flags) (anim-tester-flags fanimt1))
(when (!= *master-mode* 'menu)
(dummy-10 (-> self skel) (the-as symbol *stdcon*))
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
(add-debug-x
#t
(bucket-id debug-draw1)
+9 -9
View File
@@ -395,9 +395,9 @@
(set! (-> arg2 w) 1.0)
(set! (-> arg3 w) 1.0)
(set! (-> arg4 w) 1.0)
(when (and (transform-point-qword! (the-as vector4w (-> s5-0 quad)) arg2)
(transform-point-qword! (the-as vector4w (&-> s5-0 quad 1)) arg3)
(transform-point-qword! (the-as vector4w (&-> s5-0 quad 2)) arg4)
(when (and (transform-point-qword! (the-as vector4w (-> s5-0 vector)) arg2)
(transform-point-qword! (-> s5-0 vector 1) arg3)
(transform-point-qword! (-> s5-0 vector 2) arg4)
)
(let* ((v1-9 (-> *display* frames (-> *display* on-screen) frame debug-buf))
(a2-1 (-> v1-9 base))
@@ -445,12 +445,12 @@
(let* ((a1-21 v1-9)
(a3-5 (the-as (inline-array vector4w-3) (-> a1-21 base)))
)
(set! (-> a3-5 0 quad 0) (-> s4-0 quad 0))
(set! (-> a3-5 0 quad 1) (-> s5-0 quad 0))
(set! (-> a3-5 0 quad 2) (-> s4-0 quad 0))
(set! (-> a3-5 1 quad 0) (-> (&-> s5-0 quad 1) 0))
(set! (-> a3-5 1 quad 1) (-> s4-0 quad 0))
(set! (-> a3-5 1 quad 2) (-> (&-> s5-0 quad 2) 0))
(set! (-> a3-5 0 vector 0 quad) (-> s4-0 vector 0 quad))
(set! (-> a3-5 0 vector 1 quad) (-> s5-0 vector 0 quad))
(set! (-> a3-5 0 vector 2 quad) (-> s4-0 vector 0 quad))
(set! (-> a3-5 1 vector 0 quad) (-> s5-0 vector 1 quad))
(set! (-> a3-5 1 vector 1 quad) (-> s4-0 vector 0 quad))
(set! (-> a3-5 1 vector 2 quad) (-> s5-0 vector 2 quad))
(set! (-> a1-21 base) (&+ (the-as pointer a3-5) 96))
)
(let ((a1-25 (/ (the-as int (+ (&- (the-as pointer -16) (the-as uint a0-9)) (the-as int (-> v1-9 base)))) 16)))
+5 -6
View File
@@ -127,15 +127,14 @@
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
;; WARN: Unsupported inline assembly instruction kind - [sync.p]
(defmethod reset! perf-stat ((obj perf-stat))
(local-vars (r0-0 none))
(let ((v1-0 (-> obj ctrl)))
(+! (-> obj count) 1)
(b! (zero? v1-0) cfg-2 :delay (nop!))
(.mtc0 Perf r0-0)
(.mtc0 Perf r0)
(.sync.l)
(.sync.p)
(.mtpc pcr0 r0-0)
(.mtpc pcr1 r0-0)
(.mtpc pcr0 r0)
(.mtpc pcr1 r0)
(.sync.l)
(.sync.p)
(.mtc0 Perf v1-0)
@@ -155,9 +154,9 @@
;; WARN: Unsupported inline assembly instruction kind - [mfpc v1, pcr0]
;; WARN: Unsupported inline assembly instruction kind - [mfpc v1, pcr1]
(defmethod read! perf-stat ((obj perf-stat))
(local-vars (r0-0 none) (v1-1 int) (v1-3 int))
(local-vars (v1-1 int) (v1-3 int))
(b! (zero? (-> obj ctrl)) cfg-2 :delay (nop!))
(.mtc0 Perf r0-0)
(.mtc0 Perf r0)
(.sync.l)
(.sync.p)
(.mfpc v1-1 pcr0)