mirror of
https://github.com/open-goal/jak-project
synced 2026-05-25 15:25:31 -04:00
f123bf368a
* temp: commit what i have so far decomp: Fix nonempty_intersection impl for MSVC Debugging use-case docs: Add info on getting ASan builds running on Visual Studio w/o exceptions * decomp: initial rlet implementation * decomp: cleanup pass of vector-rewrite stage * decomp: Commit in-progress vector.gc, shortcomings are TODO commented * decomp: More cleanup, rename from being `vector` instr specific Fundamentally, this process can be used for re-writing ANY inline-asm instruction * decomp: Support 4th arg ACC instructions * decomp: Final pass of vector.gc before implementing last instructions * decomp: Better warnings when hitting unimplemented instructs * compiler: Implement inverse-sqrt and mov.vf * decomp: Final manual pass over vector.gc, documented gaps * decomp: Finish decompiling what currently is possible in vector.gc * decomp: Fix Variable -> RegisterAccess conflict * decomp: codacy lint * Address review feedback * Address feedback part 2 * Resolve build failures
4.9 KiB
4.9 KiB
KERNEL
gcommon: Done
vec4sprint/inpsect unimplemented (believed not working in GOAL either)array'sprint/inspectwill not work onuint128orint128. These are believed to be unused, and also don't work in GOAL.quad-copy!is an optimized assembly memory copy that was rewritten. It should have identical behavior, but may be slow. In the future, we could improve the performance if it's used a lot.valid?uses some inline assembly to check if a pointer is inside the symbol table, rewritten.- Lots of important memory constants should be defined here.
gstring-h: Done
- This file generates no code.
gkernel-h: Done
- The types
cpu-threadandcatch-framehave a slightly different layout in OpenGOAL to back up x86-64 registers
gkernel:
- Many changes for x86-64/OpenGOAL
- A few bugs in the game related to
process-treevs(pointer process-tree). change-brotheris totally wrong, unused, and left out.
pskernel: Done
- Unimplemented in OpenGOAL. Seems to be debugging hooks into the PS2's kernel. Error strings indicate that there should have been a second related file included that actually contained the debugging handlers, but this file is not present.
gstring: Done
string->intdoesn't handle negative numbers correctly. This appears to be a bug in the original version.
dgo-h: Done
- Just type definitions. These don't seem to match the version of DGO files found in the game, so maybe this is outdated? Also GOAL never sees DGOs, they are always processed on the IOP.
gstate: Done
- Doing a
gofrom a non-main thread of the process that is changing state is implemented a tiny bit differently. I don't think it should matter.
ENGINE
types-h: Done
- Just some bitfield types.
vu1-macros: Done
- Empty
math: Done
- The VU random generator has been rewritten, it used the PS2's (very bad) random hardware
- The "31 bit" integer random generator was rewritten, it used very strange inline assembly.
vector-h: Done
- Has some very simple, manually rewritten VU functions
gravity-h: Done
- Empty
bounding-box-h: Done
matrix-h: Done
matrix-copy!is a good example of where the OpenGOAL compiler's register allocator does poorly.
quaternion-h: Done
- No comments
euler-h: Done
- Uses boxed arrays
transform-h: Done
- No comments
geometry-h: Done
- No comments
trigonometry-h: Done
- Empty
transformq-h: waiting on stack stuff
- Needs stack stuff
bounding-box: asm
matrix: asm
transform: asm
quaternion: asm
euler: asm
geometry: asm
trigonometry: Done
sincos!andsincos-rad!have a bug where cosine is slightly off
gsound-h: Done
timer-h: Done
timer-initremoved for PC port.
timer: Decompiled, probably needs porting
- Has functions for accessing PS2 timers, needs to be ported to PC. All the logic for stopwatches etc is decopmiled, just the timer reads/writes need to be modified.
vif-h: Done
dma-h: Done
- DMA sync disabled by default.
video-h: Done
vu1-user-h: Done
dma: Done
dma-initializedisabled on PC.- Plan is to modify things at a higher level than this for the PC graphics system, most of these functions are non-functional on the PC.
ultimate-memcpymay need to be modified, or we can just swap out code to use the non-ultimateversion ofmemcpy.
dma-buffer: Done
- The sends won't work on PC, but it should let you build the buffer...
dma-bucket: Done
- Could clean up some bitfield access, should probably add some features to the compiler to help here.
dma-disasm: In progress
- Unused, but possibly useful debugging utilities for printing DMA chains.
- Needs stack stuff to do the last two functions
- Needs static data disassembler for a lookup table.
pad: Done
gs: Done
- Missing bitfields
display-h: Done
vector: asm
- Largely decompiled successfully and compiles!
- Functions are currently undocumented and still with rough variable names
- Some functions are currently failing to decompile:
rand-vu-sphere-point!vector-deg-lerp-clamp!vector=
- Some functions are currently skipped due to instructions not being supported.
- These instructions are:
sphere<-vector+r!sphere<-vector!vector-deg-diffvector-degmodvector-degfvector-degivector4-lerp-clamp!vector-normalize-copy!
- The affects functions are:
LQSQPSLLWPSUBWPSRAW
- These instructions are:
- Some functions are currently skipped because of missing functionality:
- The method gpr->fpr of type int could not be found.
spheres-overlap?vector-normalize-ret-len!
- The method gpr->fpr of type int could not be found.
fileio: Done
loader-h: Done
- Good one for playing with inlined basics.