Commit Graph

44 Commits

Author SHA1 Message Date
icogn b88cb8cdc0
Update clang-format-check.sh and make executable (#156)
* Update clang-format-check.sh and make executable

* Make executable

Co-authored-by: Isaac <iico7no2@gmail.com>
2021-10-15 00:01:58 +02:00
lepelog bf6c517051 speedup tp.py progress 2021-10-04 21:53:48 +02:00
Julgodis bf12ea7a11 Removed JUtility.h and added './tp format' 2021-09-26 12:11:21 +02:00
Jonathan Wase 800047a854
JKRThread & JKRThreadSwitch (#147)
* OK __ct__15JKRThreadSwitchFP7JKRHeap

* OK createManager__15JKRThreadSwitchFP7JKRHeap

* OK enter__15JKRThreadSwitchFP9JKRThreadi

* OK callback__15JKRThreadSwitchFP8OSThreadP8OSThread

* OK draw__15JKRThreadSwitchFP14JKRThreadName_P10JUTConsole

* OK draw__15JKRThreadSwitchFP14JKRThreadName_

* OK __dt__15JKRThreadSwitchFv

* JKRThread.cpp cleanup

* Fixed tp.py and libelf, changed JUT_ASSERT macro and removed unused .s files.

* Changed JKRThread access specifiers

Co-authored-by: Julgodis <>
2021-09-24 11:13:23 -04:00
Erin Moon f6df420a61
prevent a ./tp progress crash when no rels are built (#142)
calculate_progress() would attempt to print a rel completion percentage
even when no rels were found. the total size of the rels would thus be
zero, resulting in a ZeroDivisionError. instead, we simply print
em-dashes in the summary columns if no rels were found.
2021-08-21 20:42:58 +02:00
lepelog 38eca47ad5
__sinit_d_com_inf_game_cpp OK (#140)
* mass mng header

* d_cc_d start

* c_cc_d ok

* tmp commit

* almost, reordering of vtable functions

* progress

* more progress

* cleanup, still non matching

* mark all of d_cc_d as nonmatching to OK

* c_cc_s

* c_cc_s OK

* d_cc_mass_s OK

* cleanup

* gameinfo __sinit, not OK

* a bit of cleanup

* format

* remove asm

Co-authored-by: lepelog <lepelog@users.noreply.github.com>
2021-08-16 20:59:00 -04:00
Pheenoh 8c2a3ae7ea add make assets target 2021-06-13 19:47:12 -04:00
Pheenoh a26a9eda24 add asset extract script 2021-06-13 19:07:06 -04:00
Jasper St. Pierre 462d71cbef
Makefile fixes / JUTNameTab (#129)
* Makefile: Fix issues with iconv causing it to break under devkitPro / msys

The version of iconv included in devkitPro does not have a -o option,
so replace it with normal shell redirection. Also, SHIFT-JIS does not
have a mapping for ~, so output the Windows CP932 variant instead,
which does. See:
https://en.wikipedia.org/wiki/Tilde#Unicode_and_Shift_JIS_encoding_of_wave_dash
https://en.wikipedia.org/wiki/Code_page_932_(Microsoft_Windows)#Single-byte_character_differences

* Update diff configuration

-Bbinary doesn't seem to work with my copy of
bjdump (it says it can't decode unknown architecture)

Cheese things by using expected/ instead of having
the user place things manually.

* JUTNameTab

* J3DPacket / J3DDrawBuffer

* format

Co-authored-by: lepelog <lepelog@users.noreply.github.com>
2021-05-10 11:54:07 -04:00
lepelog 3b7364d481
Add requirements.txt with all necessary python dependencies and update README (#127)
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-05-02 14:49:51 -04:00
TakaRikka 2f4904dae2
move d_a_itembase_static / d_a_item_static / Z2StatusMgr (#123)
* move d_a_itembase_static

* move d_a_item_static

* moved Z2StatusMgr

* clang

* fixes

* clang?

* move d_save

* move d_meter2_info

* some d_meter2_info fixes

* move most d_a_player

* move d_bg_s stuff

* move c_cc_s stuff

* move d_cc stuff

* move d_attention / d_event / d_stage
2021-05-02 13:13:14 -04:00
Julgodis 3e8554bd51 RELs progress 2021-04-10 22:32:02 +02:00
Julgodis 0ad6ebe7b4 moved strings + decompile simple store functions 2021-04-10 07:02:38 +02:00
Julgodis 2661db6aaa auto decompile more functions 2021-04-08 21:05:48 +02:00
Julgodis a23a106399 demangle data-symbols 2021-04-08 01:47:05 +02:00
Julgodis dca1d2a1c0 detect more floats/doubles, including from relocations 2021-04-07 09:16:47 +02:00
Julgodis ed1ee30dd2 building RELs 2021-04-06 18:00:35 +02:00
Julgodis f6464a61ce __sinit and progress script update 2021-04-01 02:07:58 +02:00
Julgodis b999714187 .dead section fix 2021-03-31 23:22:38 +02:00
Julgodis 88eb7be90c removed double references and fixed float generation 2021-03-30 01:31:36 +02:00
Julgodis 815c1a2039 clang-format 2021-03-29 00:10:25 +02:00
Julgodis d244b7cb0d dol2asm OK 2021-03-28 22:49:05 +02:00
lepelog 88eb837a9c
fpc symbol names (#119)
* fpcCtIt_filter_JudgeInLayer

* dStage_roomControl_c::getZoneNo

* fix fpc symbol names

* format

* mUnk0 -> mLayerID

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-03-28 14:07:21 -04:00
lepelog e08abacc1d
change sdahack to use la instruction (#114)
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-02-12 19:50:24 -05:00
Pheenoh b595f0d0bf
fix clang-format check (#110) 2021-01-31 20:55:56 -05:00
jdflyer f1924e91f4
d_kyeff, d_kyeff2, m_Do_printf, and m_Do_graphic (#109)
* Split d_kyeff

* Partially matched d_kyeff

* split d_kyeff2

* Match d_kyeff2

* split m_Do_printf

* m_Do_printf partially matched

* hotfix and clang-format

* split m_Do_graphic

* rename symbols in m_Do_graphic

* Match a few functions in m_Do_graphic

* Fix Merge Errors

* Delete sh.exe.stackdump

* Update OSReportInit
2021-01-31 20:03:38 -05:00
Julgodis b8c7b9ce3b fix padding 2021-01-29 23:17:11 +01:00
Julgodis 77adc39ffe removed dependencies and fixed usage text 2021-01-29 23:01:11 +01:00
Julgodis 7cc16872fc added option for frameworkF.map 2021-01-29 22:52:35 +01:00
Julgodis 4442f8e1dd cleanup of python script 2021-01-29 22:52:35 +01:00
Julgodis cf4bf3fc53 replace symbols with string literals and python script 2021-01-29 22:52:35 +01:00
lepelog d301beca77
change split.py to output extern vars/functions into generate CPP (#98)
* change split.py to output extern vars/functions into generate CPP
also change demangling to use short type names

* don't take files for extern funcs/vars anymore

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-25 14:09:55 -05:00
Erin Moon a072e71c33
Z2AudioLib misc decomp (#75)
* Z2SoundHandles: decomp portions

* start decomping: Z2SpeechMgr2, Z2SoundHandles

* Z2SoundHandles::stopAllSounds(): ok

* Z2SoundHandles::getHandleUserData(): ok

* Z2SoundInfo: header

* Z2SoundObjBase::framework(): ok

* Z2SoundObjBase::Z2SoundObjBase(), Z2SoundObjBase::init(): ok

* Z2SoundObjBase::~Z2SoundObjBase(): ok

* Z2SoundObjBase::stopOK(): ok

* Z2SoundObjBase::stopOK, incomplete Z2SoundObjBase::dispose()

* clang-format

* Z2SoundObjBase::dispose(): ok

* JAISound::operator->(): null assert

* JAIAudience: stub

* Z2SoundObject::{init, deleteObject, isAlive}: ok

* Z2SeMgr: elaborate struct (and decl JAISoundHandles to support this)

* start subclassing Z2SoundObjBase; nonmatching Z2SoundObjSimple::init()

* Z2SeMGr::{incrCrowdSize, decrCrowdSize}: ok

* Z2MultiSeMgr::resetMultiSePos(): ok

* Z2WolfHowlMgr.h: decls

* Z2SoundStarter: move to decls and fix postprocess.py symbol pass

* Z2AudioArcLoader: decls

* Z2SoundObjMgr: ok some fns
- deleteEnemyAll()
- isTwilightBattle()
- setGhostEnemyState()

additionally elaborates parts of the Z2Creature hierarchy

* delete unused .s files and add tool to find them (only runs on linux)

* run clang-format

* postprocess.py: comment out debugging

* add python step to ok-check workflow

* address review comments

* address review comments

Co-authored-by: notyourav <65437533+notyourav@users.noreply.github.com>

Co-authored-by: Pheenoh <pheenoh@gmail.com>
Co-authored-by: notyourav <65437533+notyourav@users.noreply.github.com>
2021-01-21 23:16:51 -05:00
Jonathan Wase 82d5e0f796
JKRAram and JKRAramStream (#80)
* before __register_global_object

* JKRThread::sThreadList, JKRHeap::sSystemHeap, etc.

* cleanup and started on JKRDvdArchive

* before changing JKRCompression

* more JKRDvdArchive, abs, and memset

* fixed JKRArchive::setExpandSize split

* JKRArchive::sCurrentDirID, JKRDvdFile::sDvdList, and matching JKRDvdFile constructors

* problems

* merge fixes and formatting

* updated clang version in clang-format-all to version 10

* Added OSPhysicalToCached and struct for global memory

* remove useless __attribute__

* changed from defines and macros to const variable and function

* changed FLAG_HAS to FLAG_ON

* JKRAram, linking problems

* fix JKRAram

* remove nonmatching stuff

* renamed static data

* more static class members

* JKRAramStream OK

* formatting

Co-authored-by: Julgodis <>
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-09 20:15:52 -05:00
lepelog 689d83dd23
Move and type PSVEC and PSMTX funcs and follow includes in functions.h (#68)
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-05 12:32:20 -05:00
Erin Moon 5c23199fe2
close-to-matching mDoCPd_c::convert() (#61) 2021-01-04 10:37:08 -05:00
Jonathan Wase 423fdadc32
JKRDecomp OK (#58)
* JKRDecomp OK

* clang-format tool

* JKRThread cleanup and fixed suggestions

Co-authored-by: Julgodis <>
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-03 16:19:54 -05:00
Erin Moon 052119c7a7
a new tool: splitter (#39)
* splitter: v0.1

* basic demangle stuff

* splitter: v0.2

- add from, to options to select line range in .s to process
- infer referred labels from both loads and stores
- dump our own function labels in addition to externs into functions.h,
  to provide forward declarations for labels that other functions might
  use.
- fix off-by-one which was eating the last instruction of some functions

* splitter: v0.3

merged a bunch of work lepelog did, including:
- demangling support
- better function identification
- automatic FORCEACTIVE

and did a little bit of cleanup

* splitter: improve sda hack and format

* splitter: fix comment_out(), patch GQR references

* splitter: some speed optimizations

* remove debug print

* splitter: forceactive options

* refactor demangler, add support for more operators and more mangling symbols

* array and member (still one non working case)

* fix some operands in demangler

* make parents for funcs_out

* splitter: fix off-by-one in last line of last function in some .s files

Co-authored-by: lepelog <lepelog@users.noreply.github.com>
Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-02 02:22:57 -05:00
jdflyer e42d44e6cb
M_do_controller_pad split and partially matched (#36)
* m_Do_controller_pad split

* Attempt to match and match mDoCPd_c::recalibrate

* Fix Merge Errors

* clang-format

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-02 02:02:19 -05:00
unknown a0304f5917
rm asm-differ 2020-12-06 20:47:05 -05:00
unknown cbd06e5668
add d_meter2_info methods, addBottleNum OK, getBombNum OK, isLetterReadFlag OK 2020-12-06 20:46:16 -05:00
Jonathan Wase ac6b191dc1
Improved handling of virtual inheritance. (#7)
* new system for handling vtables

* commented out non-matching JKRDisposer::~JKDisposer()

* removed artificial vtables and matched simple virtual-call functions

* better text on nonmatching functions

* reverted asmdiff.sh

* attempt 2

* Spelling

* banner and .gitignore for vtable artifacts

* move virtual function to the correct class

* remove unnecessary casts
2020-12-01 15:18:01 -05:00
Thar0 1b91cd8d66 Allow building with wsl and remove objcopy hack with appropriate change to elf2dol 2020-08-30 01:16:07 +01:00
unknown c5e2415773 ok 2020-08-29 17:54:55 -04:00