Compare commits

...

869 Commits

Author SHA1 Message Date
Arceveti
bb021faa50 Merge branch 'develop/2.1.0-new-crash-screen' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2025-11-26 02:00:10 -08:00
Arceveti
1046348009 Update readme 2025-03-31 14:15:39 -07:00
Arceveti
3a86f80570 Improve mapPacker.py 2025-03-31 14:15:30 -07:00
Arceveti
c57b286b7a Fix warnings 2025-03-31 14:13:50 -07:00
Arceveti
4e6b809140 Add set_segment and get/set_segment_rom_addr 2025-03-31 14:13:35 -07:00
arthurtilly
2a1d69e15d Merge branch 'develop/3.0.0' of https://github.com/HackerN64/HackerSM64 into develop/2.1.0-new-crash-screen 2024-09-09 21:51:38 +12:00
Gregory Heskett
f40a69ab8c Merge branch 'master' into develop/3.0.0 2024-09-04 23:28:32 -04:00
Reonu
3f1f7f41be Add Arthurtilly to the CODEOWNERS file (#821)
* Add Arthurtilly to the CODEOWNERS file

* Update CODEOWNERS file to list each global owner on the same line

This should (allegedly) fix the issues of only the last entry being treated as an owner for reviews.

* Remove thecozies from CODEOWNERS file :(

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-09-04 23:24:02 -04:00
Denis Kopyrin
bf70500b4d Merge pull request #825 from Lilaa3/fast64-repo-settings
Add Fast64 repo settings file (fast64.json)
2024-09-05 07:51:25 +08:00
Lila
27fedee76f Update fast64.json 2024-09-04 10:38:21 +01:00
Lila
a918785a92 Aglab requested change 2024-08-25 19:26:57 +01:00
Lila
10720ea056 Fall back on fast64 default draw layers 2024-08-24 13:05:36 +01:00
Lila
8dc47095e2 Add repo settings file
Allows fast64 to know a repo's ideal settings as soon as decomp path is picked.
Settings are the default except for:
Matstack is on
Microcode is set to EX2
Force Extended RAM is off because hackersm64 already has it enabled by default
Refresh is set to Refresh 13
2024-08-19 15:44:53 +01:00
Gregory Heskett
797bb63f1a Merge branch 'master' into develop/3.0.0 2024-07-03 23:51:06 -04:00
Gregory Heskett
9ef945296b HackerSM64 Release: v2.3.0
Merge pull request #815 from HackerN64/develop/2.3.0
2024-07-03 23:05:21 -04:00
Gregory Heskett
e1c00d4bef HackerSM64 v2.3.0 2024-07-03 22:50:27 -04:00
Reonu
aacf2c5e6d Add more audio banks and add some occasional mappings for audio macros (#777)
* Add more audio banks and add some occasional mappings for audio macros

* Remove config define for extra sound banks

---------

Co-authored-by: gheskett <gheskett@gmail.com>
2024-07-03 22:50:27 -04:00
Gregory Heskett
4500ffb579 Bugfix: assemble_sound.py build corruption issues (#813) 2024-07-03 22:50:27 -04:00
Gregory Heskett
a6782e6912 Fix seg faulting issue with MinGW build system, most likely caused by use of execl (#812) 2024-07-03 22:50:27 -04:00
Denis Kopyrin
750ba10cb1 Fixed audiofile warnings properly (#814)
* Revert "Fixed audiofile warnings (#811)"

This reverts commit 500507509b.

* Fixed audiofile warnings properly
2024-07-03 22:50:01 -04:00
Denis Kopyrin
500507509b Fixed audiofile warnings (#811) 2024-07-01 21:53:54 -04:00
Gregory Heskett
7381e35db4 Bugfix: Surfaces not able to be placed at the beginning of a partition (#805)
* Bugfix: Surfaces not able to be placed at the beginning of a partition

* Replace clear_spacial_partition calls with a bzero
2024-07-01 21:48:26 -04:00
Gregory Heskett
6a3e7e7a87 Bugfix: Missed purging of debug box flags that no longer exist in Puppycam (#804) 2024-07-01 21:47:38 -04:00
Gregory Heskett
9adb8c6de8 EASIER_LONG_JUMPS: only long jump with A+Z while running (#801)
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2024-07-01 21:47:15 -04:00
Gregory Heskett
03ba81b5e3 Improve DEATH_ON_EXIT_COURSE define (#808) 2024-07-01 21:46:46 -04:00
Gregory Heskett
98b6231216 Pressing L in debug fly mode heals Mario (#809) 2024-07-01 21:46:12 -04:00
Denis Kopyrin
252a900b91 Added support for windows MinGW build (#800) 2024-07-01 21:45:36 -04:00
Denis Kopyrin
92822c6412 fixlights: added support for ripgrep (#802) 2024-07-01 21:44:54 -04:00
1ted59
0221d4ddf0 Fix spawned coins not being collectible until after the peak of their arc (#806)
If a spawned coin lands on the same frame it hits the peak of its arc, it will never have vertical speed < 0, so it will never be collectible.

Making this also set the coin to tangible if it has 0 speed fixes this issue.
2024-06-14 16:16:10 -04:00
Arceveti
80083b89a4 "sureAddr" naming consistency 2024-06-05 18:55:14 -07:00
Arceveti
f1bc0f6b62 disasm/pseudoC updates 2024-06-03 16:11:10 -07:00
Arceveti
947c0783c0 Add static asserts for struct/union sizes 2024-06-03 16:07:38 -07:00
Arceveti
8d2f0831a7 Add all builtins to builtins.h 2024-06-03 15:59:16 -07:00
Gregory Heskett
dcd58b2aad Restart music upon set_background_music() call if BETTER_REVERB preset changes (#797) 2024-06-01 10:55:58 -04:00
Arceveti
f7ff1b85c2 Turn off VI special features on crash (saves 1-2ms on console and fixes coverage issue on ares) + update README + some other stuff 2024-05-30 17:18:28 -07:00
Arceveti
1f156d958b reginspect stuff 2024-05-23 20:21:15 -07:00
Arceveti
790fcda14c Add "unreachable" after FORCE_CRASH() 2024-05-22 16:36:43 -07:00
Arceveti
95d80a5f81 Better double buffering (fixes Parallel screenshot flickering) 2024-05-22 16:35:12 -07:00
Denis Kopyrin
7ffa9a3bd7 Fixed fixlights.py compile error on python 3.12 (#798)
* Fixed fixlights.py compile error on python 3.12

* Fixed assemble_sound.py compile error on python 3.12
2024-05-22 13:48:24 -04:00
Arceveti
295d61ba82 Update stack trace page + other fixes 2024-05-21 17:11:42 -07:00
lolbinarycat
dbba4871e1 Add mips64-none-elf- to automatically detected prefixes (#799)
Co-authored-by: binarycat <binarycat@envs.net>
2024-05-18 02:11:10 -04:00
Arceveti
26eb1b896b Small changes 2024-05-17 14:49:49 -07:00
Arceveti
caf253ede8 Stack trace rewrite (now actually works properly) 2024-05-17 14:49:22 -07:00
Arceveti
0682d4f744 Cache op names + other stuff 2024-05-14 18:53:17 -07:00
Arceveti
74888eaee3 Fix trap instruction param in pseudo C 2024-05-12 03:18:48 -07:00
Arceveti
e7417af534 Add subiu and dsubiu pseudoinstructions 2024-05-12 01:00:45 -07:00
Arceveti
deeed7e493 Improve pseudo C comments 2024-05-11 18:26:33 -07:00
Arceveti
583b2ce455 Pseudo C code improvements 2024-05-11 18:08:01 -07:00
Arceveti
a6b4c33a9a Fix disasm pseudo C flickering by forcing 30 FPS (?) 2024-05-11 16:11:08 -07:00
Arceveti
74771e6d77 Disasm pseudo C code mode 2024-05-10 01:59:29 -07:00
Arceveti
056706c81b Only use 2 framebuffers + some small fixes 2024-05-10 01:50:39 -07:00
Arceveti
3a5b9507a9 Merge branch 'develop/2.3.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-05-08 19:20:17 -07:00
Arceveti
cebdb3e604 Print extra registers on summary for certain instructions 2024-05-08 18:16:59 -07:00
Arceveti
71c999b5b8 Move disasm reg buffer to disasm file 2024-05-08 17:44:16 -07:00
Arceveti
6f779c188e Add option to try to parse non-.text data as instructions 2024-05-08 16:39:51 -07:00
Arceveti
71c9293a83 Even better count factor timing adjustment 2024-05-08 01:11:47 -07:00
Arceveti
e0820c42db disasm improvements 2024-05-07 14:44:28 -07:00
Arceveti
33aef53fa6 Better count factor timing adjustment 2024-05-07 00:27:37 -07:00
Arceveti
6ee3659e5f thread pri 0 while waiting but pri appmax-1 after crash + mapPacker.py variables 2024-05-06 23:54:33 -07:00
Arceveti
ca31ea4195 Add count factor and adjust some timings accordingly 2024-05-06 16:59:16 -07:00
Arceveti
f59c34315d Move register info defines to the files they're used in 2024-05-06 00:05:39 -07:00
Arceveti
3483ca10d4 Highlight sp and badvaddr on memory page 2024-05-06 00:04:25 -07:00
Arceveti
42f6a73ef5 Handle watchpoint exceptions 2024-05-05 15:29:59 -07:00
Arceveti
d111ee8d15 Use local variable for LLBit check 2024-05-05 00:01:09 -07:00
Arceveti
3696dc8de3 Add LLBit register info 2024-05-04 23:55:33 -07:00
Arceveti
7e11ab79d6 Check if valid ram addr in memory page symbols mode 2024-05-04 23:54:37 -07:00
Gregory Heskett
520a6f3aed Bugfix: Blue coin duplication (#787)
Blue coins can be collected more than once if collected on the final frame of the switch timer when BLUE_COIN_SWITCH_RETRY is enabled. Fixing this on its own isn't enough though, as the blue coin switch also doesn't check for whether that coin was collected when it resets.
2024-05-03 01:54:43 -04:00
Arceveti
74006f7f8a Memory page f32 mode (aligned) 2024-05-01 23:01:14 -07:00
Arceveti
12dec742b7 Better disasm branch arrow fill buffer trigger 2024-05-01 16:54:28 -07:00
Arceveti
45a74a34f7 Move attributes to attributes.h 2024-05-01 16:07:28 -07:00
bicyclesoda
4d260f6885 Use G_TF_POINT on 3D billboard numbers (#791)
This matches the HUD filtering and just looks better IMO.
2024-04-30 23:19:20 -04:00
Gregory Heskett
aedae64e8b Remove destination warp node requirement (#788)
Also add assertions for common warp crashes and remove the hardcoded get_mario_spawn_type table size
2024-04-30 23:10:58 -04:00
Arceveti
e101238ea5 insn_db fixes 2024-04-30 16:05:44 -07:00
Arceveti
676e4ec290 Add new UNF rdb thread id 2024-04-30 13:57:22 -07:00
Arceveti
2ed4517f49 enum typedef consistency 2024-04-29 23:40:32 -07:00
Arceveti
6ae348e026 Add hardcoded segments to segments page + move segment data to new files 2024-04-29 18:42:59 -07:00
Arceveti
0dd54396f5 Clean up segment_symbols.h 2024-04-29 16:48:32 -07:00
bicyclesoda
f3e1496d29 Change test emulator from mupen64plus to parallel-launcher (#790)
* mupen64plus -> parallel-launcher

* Add WSL support

* Update Makefile

make it work
2024-04-29 16:42:13 -07:00
Arceveti
d060bc781c Draw footer on crashed page + some null checks 2024-04-29 15:18:34 -07:00
Arceveti
7cca77e5c1 Only calculate text scroll speed once 2024-04-29 14:32:54 -07:00
Arceveti
dec76acdcd Move warp node asserts + add assert for null music dynamics + update readme 2024-04-29 02:00:42 -07:00
Arceveti
f106513156 show start and size instead of range on segments page 2024-04-28 21:10:30 -07:00
Arceveti
c734dbbba5 Reduce size of disasm instruction database by half 2024-04-28 17:08:39 -07:00
Arceveti
6e7e79b804 Update readme + reduce stack trace buffer size 2024-04-28 17:07:36 -07:00
Arceveti
e05be1a739 More space for symbols on thread registers page 2024-04-26 02:35:39 -07:00
Arceveti
eac8af8156 Print an additional character of symbols on memory page + osWritebackDCacheAll on interfaces page 2024-04-26 02:19:07 -07:00
Arceveti
d37ac917dc Smooth text scrolling 2024-04-26 01:52:11 -07:00
Arceveti
e6c3e7163c Add symbols mode to memory view 2024-04-25 18:37:15 -07:00
Arceveti
2abd2b56c8 Clean up some debug map ifdefs 2024-04-25 18:00:35 -07:00
Arceveti
e775e71337 Stack trace cleanup + Add HI_OF_/LO_OF_ macros 2024-04-25 17:41:26 -07:00
Arceveti
11229d7654 Move reginspect bit decode data to reginspect_bits.inc.c + clean up reginspect header 2024-04-25 00:52:15 -07:00
Arceveti
c4bdda30aa Improve register order on registers page + improve description printing on reginspect 2024-04-24 19:33:27 -07:00
Arceveti
2a59b3f195 Move instruction data to insn_db.inc.c 2024-04-24 19:11:08 -07:00
Arceveti
93b65314e6 Merge branch 'develop/2.3.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-04-24 18:57:05 -07:00
Arceveti
3da6bca4cd Improve reginspect pointer detection 2024-04-24 16:58:42 -07:00
Arceveti
4101f499f0 Fix macro/define name in assert conditions + mark code after asserts as unreachable 2024-04-24 15:33:37 -07:00
Arceveti
d57901dd08 Draw registers page sections from list + get_reg_val null checks 2024-04-24 15:13:49 -07:00
Arceveti
dd3031500b Add mention of L/R to switch page in the summary page instruction text 2024-04-23 21:47:34 -07:00
Arceveti
3e24de5b24 C0 config reginspect decoded bits + sureAddr in reg info 2024-04-23 18:48:08 -07:00
Arceveti
dfd6a4c638 Fix build 2024-04-23 16:05:11 -07:00
Arceveti
49186ef8d2 Some C0 register bit mask defines 2024-04-23 15:58:55 -07:00
Arceveti
386064eea0 Move reg bit defines from reginspect to reg_bits.h 2024-04-23 15:04:12 -07:00
Arceveti
6daa911485 CP2.inc.c and CP3.inc.c consistency 2024-04-23 14:55:41 -07:00
Arceveti
a5713cabdb Rename 'registers' folder to 'register_data' 2024-04-23 14:53:12 -07:00
Arceveti
2b5050f4b4 add 'checkThread' arg to get_reg_val 2024-04-23 14:50:45 -07:00
Arceveti
1e8b6f59cd Add cs_draw_custom_5x5_glyph (unused for now) 2024-04-23 14:42:04 -07:00
Arceveti
55b1f5bd10 sRegDesc_Default extern 2024-04-23 14:02:23 -07:00
Arceveti
f7e315f595 Fix register data .inc.c includes 2024-04-23 14:01:06 -07:00
Arceveti
b9e234981f Rename reg bits commands + fix typos 2024-04-22 19:58:03 -07:00
Arceveti
9b4da37d15 Some reginspect bit decoding 2024-04-22 19:48:46 -07:00
Arceveti
23f67fd76b Add f3dex3 check to about page 2024-04-22 19:45:36 -07:00
Arceveti
ac1641e9e9 Cleaner microcode name define 2024-04-22 15:23:23 -07:00
Arceveti
31596548ec Reginspect for interface registers 2024-04-22 15:18:37 -07:00
Arceveti
30ab8cc197 MapSymbolIndex typedef + fix build warnings 2024-04-22 15:00:08 -07:00
Arceveti
29c12a8e68 Fix symbol dividers crash + make the setting work + allow scrolling into physical addresses 2024-04-22 14:51:06 -07:00
Arceveti
9f21629bff Improve viewable/scrollable memory boundary defines 2024-04-21 20:17:28 -07:00
arthurtilly
0005bbbd6a Save up to 130KB of RAM at literally zero cost (#786) 2024-04-21 20:40:47 -04:00
Gregory Heskett
e494069b0a Add support for a user-defined config_local.h file (#785)
This allows hack collaborators to toggle debug features such as TEST_LEVEL without the need of pushing it up and negatively impacting other hack contributors. This is also useful for general HackerSM54 development, since it may be desirable to have PUPPYPRINT_DEBUG enabled by default or to not have to worry about pushing config defines up to a development branch that risk getting merged later on.

To use, simply create a new config_local.h file and place it in the config folder. Add #pragma once to the top of the file and add all the defines you wish! If you wish for something to be undefined when it's enabled by default, simply use #undef as opposed to a commented out #define. Use a combination of #undef and #define if you wish to change an existing value of a define. This local configuration will be completely ignored if DISABLE_ALL is being used in config_debug.h.

Regarding HackerSM64 Development: All feature developers are still responsible for making sure their features work in all scenarios regardless of whatever they have toggled in this file by default. This config file may be convenient but it is not an excuse to not properly test your changes!
2024-04-21 20:38:07 -04:00
Arceveti
508ab498b7 Rename 'TO_STRING' and 'TO_STRING2' to 'STRINGIFY' and 'EXPAND_AND_STRINGIFY' 2024-04-21 15:11:11 -07:00
Arceveti
36bd5b35aa Add build.c + add commit hash to build info + small changes 2024-04-21 15:07:16 -07:00
arthurtilly
f852ff4359 Platform Displacement 2.1 (#776) 2024-04-22 09:14:12 +12:00
Gregory Heskett
2ae3426957 Change compression type to yay0 and ignore .inc.c files in most directories (#784)
rnc1 has noticeably slower load times in vanilla than yay0 does. gzip and mio0 are pretty useless and can be yeeted from the repo, but that's not part of this PR's scope.
2024-04-21 17:13:47 -04:00
Arceveti
d7e87eab82 Small changes 2024-04-21 01:54:12 -07:00
Arceveti
41591bc9a3 Clean up reginspect decoded bits printing 2024-04-21 01:16:29 -07:00
Arceveti
64d31e2194 Various cleanup 2024-04-21 01:15:05 -07:00
Arceveti
1a064613f9 Registers rewrite 2024-04-20 20:21:45 -07:00
Arceveti
32e9216f17 Add to builtins.h + custom message if running code in non-code segment 2024-04-20 20:00:59 -07:00
Arceveti
1b89b37782 Print badvaddr on EXC_MOD 2024-04-18 18:29:51 -07:00
Arceveti
0e46aaf5b0 Allow moving cursor while reginspect is open + improve register page lists + print binary data on reginspect 2024-04-18 17:56:27 -07:00
Arceveti
1f7d4dfeb8 Print badvaddr to summary page for TLB or address exceptions 2024-04-18 17:54:21 -07:00
Arceveti
f529732d1d Actually fix safe memory reads 2024-04-18 17:52:52 -07:00
Arceveti
33b402529f Include assert.h in macros.h 2024-04-18 17:47:57 -07:00
Arceveti
5cd024e20f Fix RDB description 2024-04-17 17:39:21 -07:00
Arceveti
4227fd6e76 Add c standard version to compiler section on about page 2024-04-17 15:29:31 -07:00
Arceveti
6f00f3dd1b Use __func__ to get current function name for asserts instead of using inline asm and debug symbols 2024-04-17 15:28:08 -07:00
Arceveti
f1a5e0c984 Hi Arthur 2024-04-17 00:21:10 -07:00
Arceveti
656de5a982 Add interface registers page 2024-04-17 00:09:21 -07:00
Arceveti
5e478e9ff9 Update asm.h 2024-04-17 00:09:10 -07:00
Arceveti
d3527d381d Improve reginspect 2024-04-17 00:01:47 -07:00
Arceveti
dd46bb36f4 Fix safe memoey read for physical addresses 2024-04-16 23:59:02 -07:00
Arceveti
cc36e58787 Add CLZ/CTZ/POPCOUNT macros 2024-04-16 23:56:06 -07:00
Arceveti
025758bf45 Improve segment symbols 2024-04-15 14:23:20 -07:00
Arceveti
aa05f32f02 fix typo 2024-04-15 14:22:53 -07:00
Reonu
ca937d23ee Label unlabelled audio func (func_80321080 to stop_secondary_music) (#782) 2024-04-15 01:59:54 +01:00
Arceveti
4c7d142c95 Add asserts for some common crashes + specific "level" and "rcp" assert types 2024-04-11 20:32:52 -07:00
Arceveti
fc05a4591f Fix typo in symbol_is_function 2024-04-11 17:16:07 -07:00
Arceveti
2985bd738c Fix denorm/NaN text color on reginspect 2024-04-11 16:25:51 -07:00
Reonu
e32b0ea960 fix fast64 exports due to macro objects removal (#780)
Fast64 exports dummy macro object data even if you don't use macro objects in your level. This change allows HackerSM64 to compile even with Fast64 doing cringe.
2024-04-11 15:29:13 +01:00
Arceveti
ab76c58b13 Use faster darken drawing in all draw funcs 2024-04-10 18:58:33 -07:00
Arceveti
541486f09d Combine cs_draw_rect/cs_draw_dark_rect/cs_draw_outline + optimize rectangle scissor box + documentation 2024-04-10 18:36:36 -07:00
Arceveti
ff87e48bba Fix unsafe data read when searching for branch offsets. 2024-04-10 18:30:07 -07:00
Arceveti
f887a16c53 Improve asserts + reginspect bool strings 2024-04-10 03:01:11 -07:00
Arceveti
c4495e07c7 Reginspect print both 32 and 64 bit values 2024-04-09 18:26:49 -07:00
Arceveti
9bd60910c1 Add segments page 2024-04-08 00:46:40 -07:00
Arceveti
4578af8fe2 Fix build warning 2024-04-07 19:01:43 -07:00
Arceveti
ff484b9e1e Clean up some segment stuff 2024-04-07 18:58:30 -07:00
Arceveti
4b438e6849 Add sSegmentROMTable without breaking Fast64 exporting + strings for what's loaded in a segment 2024-04-07 03:14:53 -07:00
Arceveti
889c385e44 Put crash screen in its own rom segment and add sSegmentSizes 2024-04-07 00:17:38 -07:00
Arceveti
99bc22f371 Improve printing of unknown map symbol sizes 2024-04-06 21:38:56 -07:00
Arceveti
0530f1d878 Improve some debug map ifdefs 2024-04-06 18:58:01 -07:00
Arceveti
1137ae59e7 Rename "MAP VIEW" to "MAP SYMBOLS" 2024-04-06 18:26:58 -07:00
Arceveti
482dedb880 Improve reginspect 2024-04-06 03:05:14 -07:00
Arceveti
d18d05791e More refactoring + PRIds 2024-04-05 22:04:23 -07:00
Arceveti
4feb3e4725 float format info for lwc1/ldc1/swc1/sdc1 2024-04-05 04:00:57 -07:00
Arceveti
2f932084f3 Various refactors 2024-04-05 01:45:07 -07:00
Arceveti
64a61b11f7 Improve memory page dividers + pointer jumps 2024-04-02 17:11:29 -07:00
Arceveti
8aa47f482a Improve fallback memory strings 2024-04-02 17:10:38 -07:00
Arceveti
9dd84cef64 Add symbol dividers to memory page + improve on disasm page 2024-04-01 23:58:54 -07:00
Arceveti
7458d40170 Fix typo 2024-03-31 13:39:25 -07:00
Arceveti
20f049ee23 Add assert for missing source warp node 2024-03-31 13:37:01 -07:00
Arceveti
82ac27feca Add get_segment_name 2024-03-31 00:15:17 -07:00
Arceveti
8acb8a877a Make a couple asserts clearer 2024-03-31 00:05:04 -07:00
Arceveti
0013305359 Update some comments + remove a redundant fname check. 2024-03-30 15:12:27 -07:00
Arceveti
e5d9a299aa Fix missing includes for asserts 2024-03-30 00:44:36 -07:00
Arceveti
8e21df185c Better print buffers + move RCP assert info to the asserts in main.h 2024-03-29 20:40:46 -07:00
Arceveti
332373222f Add binary and color display modes to memory page 2024-03-29 14:39:10 -07:00
Arceveti
7b9151a23e even more summary page stuff 2024-03-29 00:15:18 -07:00
Arceveti
86bee5a893 summary page stuff 2024-03-28 16:55:39 -07:00
Arceveti
4ca081b2d7 Revert assert message color 2024-03-28 14:33:45 -07:00
Arceveti
77e10fb22d Redesign summary page again + refactoring 2024-03-28 02:56:41 -07:00
Arceveti
88a8a7e4fc Fix capital "N" in font 2024-03-27 18:09:39 -07:00
Arceveti
db354040d3 Add special registers + RCP crash handling + various refactoring 2024-03-26 19:38:54 -07:00
Arceveti
baf031c49b Fix floats being incorrect in hex mode on registers page 2024-03-25 15:36:52 -07:00
Arceveti
b4984fae7c Summary page layout + some refactoring 2024-03-25 15:28:55 -07:00
Arceveti
08801aac5e cs_draw_triangle optimization 2024-03-25 00:56:59 -07:00
Arceveti
8f4e601985 Fix print_as_binary + print binary data on II exception + fix map page init + update readme 2024-03-24 18:06:21 -07:00
Arceveti
a12c875de0 Update readme 2024-03-24 15:04:42 -07:00
Arceveti
63a0f63cdb Fix thread queue looping after second crash screen crash 2024-03-24 15:01:36 -07:00
Arceveti
3f11385abd Add option for symbol name headers in disasm 2024-03-23 22:02:21 -07:00
Arceveti
5a4be032ce cs_main refactoring 2024-03-23 19:36:25 -07:00
Arceveti
e5c3b2a5de Update readme + some comments 2024-03-23 00:25:58 -07:00
Arceveti
3a3a28ce62 Thread name fallback on map symbol name 2024-03-22 21:07:09 -07:00
Arceveti
7dc1579f1e Fix "debug_assert" UNF conflict (renamed the UNF version) 2024-03-22 21:06:32 -07:00
Arceveti
8bb90e67bd Remove remaining threads page stuff 2024-03-22 14:22:02 -07:00
Arceveti
dfcb3aaf21 Move threads to dropdown on registers page + add stuff to readme + lots of other stuff 2024-03-22 13:59:56 -07:00
Arceveti
dde8d558a9 some stuff 2024-03-21 16:47:01 -07:00
Arceveti
01abdacbc5 Rename 'popup_address_select' files to 'popup_address' + add page names to readme 2024-03-21 15:55:46 -07:00
Arceveti
cce0b0bd6c Change in makefile (was unstaged) 2024-03-21 15:48:23 -07:00
Arceveti
6390757f87 Move thread entry draw to cs_draw and use on regs page + add commented gLastCSSelectedAddress + add readme 2024-03-21 15:45:28 -07:00
Arceveti
181a1e90b9 Optimizations to reduce branch arrow buffer size 2024-03-21 04:06:04 -07:00
Arceveti
c25267c1d1 Don't store branch arrow colors in buffer + increase buffer size 2024-03-21 03:28:45 -07:00
Arceveti
d3d1231828 more various stuff 2024-03-21 02:26:36 -07:00
Arceveti
97ffebd9ea Add support for odd numbered float registers (f64 can generate code that uses them) 2024-03-20 17:57:56 -07:00
Arceveti
98c0f9f8ff Add hex prefix to disasm code fields 2024-03-20 17:11:57 -07:00
Arceveti
58937233b4 Print code fields in disasm for exception causing instructions 2024-03-20 16:54:05 -07:00
Arceveti
aa79f92e69 Change "crash_" file prefix to "cs_" 2024-03-20 15:12:30 -07:00
Arceveti
2f0a5b4443 Output map data rom sizes to debug_map.txt (like goddard.txt) 2024-03-20 02:16:42 -07:00
Arceveti
eb8fb7b09f Use binary symbol search for disasm branch arrows 2024-03-20 02:12:22 -07:00
Arceveti
383b1bcf8c Some stuff 2024-03-19 20:12:21 -07:00
Arceveti
4d914821fd move rgba16_blend to crash_draw 2024-03-19 18:45:22 -07:00
Arceveti
2242953143 color for unknown disasm rows + name unknown thread 2024-03-19 18:41:32 -07:00
Arceveti
31caf7bdd4 Jump to pointer location from reginspect 2024-03-19 18:15:41 -07:00
Arceveti
76e8810443 Add binary search for map symbols + add translucent divider between symbols in disasm. 2024-03-19 18:01:50 -07:00
Arceveti
4ebcfbcada improve two descriptions 2024-03-19 16:08:42 -07:00
Arceveti
c9572d424f Show data at pointers in reginspect 2024-03-19 16:03:59 -07:00
Arceveti
b8e4995eed Add cause register to registers page 2024-03-19 15:19:33 -07:00
Arceveti
b3e0116fa2 rename home page to summary and popup_register to popup_reginspect 2024-03-19 14:05:23 -07:00
Arceveti
1b9fd899c2 Status and FPCSR decode bits with reginspect 2024-03-19 04:13:33 -07:00
Arceveti
932f5f132d VERSION.txt for crash screen 2024-03-19 00:43:57 -07:00
Arceveti
11139957e4 Add console processor id to about page 2024-03-19 00:40:36 -07:00
Arceveti
68e4593f43 Registers page horizontal wrapping 2024-03-19 00:37:35 -07:00
Arceveti
79480b02c4 some float and registers stuff 2024-03-18 23:41:22 -07:00
Arceveti
f07b721b88 Move cs_reinitialize_pagesto crash_pages 2024-03-18 23:21:30 -07:00
Arceveti
c7d2e359a5 Fix UNF thread IDs in enum + improve some comments 2024-03-18 22:56:34 -07:00
arthurtilly
219f4683f7 ASCII/UTF-8 Text and Full Multilang Support (#775)
Co-authored-by: Axollyon <20480418+Axollyon@users.noreply.github.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Arceveti <arceveti@gmail.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-03-18 21:22:04 +00:00
Arceveti
e84457b94a Add selection cursor and register inspection to registers page (unfinished) + improve symbol name printing 2024-03-17 18:48:30 -07:00
Arceveti
8b7cd1e21c Fix some struct/union definition formats 2024-03-17 16:09:36 -07:00
Arceveti
dd641c5fca Reegisters page fixes + add DIV_CEIL 2024-03-17 15:52:28 -07:00
Arceveti
731e7ed645 Allow changing the crash screen's inspected thread + page ordering 2024-03-16 19:17:00 -07:00
Arceveti
58520582a3 Streamline settings groups 2024-03-16 18:28:58 -07:00
Arceveti
6c160d12bb Change page ordering + improe CSPage enum 2024-03-16 18:12:09 -07:00
Arceveti
eb75175de8 Use osMemSize for ram size in about page + auto buffer size 2024-03-16 17:44:14 -07:00
Arceveti
4edf643935 Add threads page 2024-03-16 17:43:37 -07:00
Arceveti
73afcaff66 enum ThreadID documentation 2024-03-16 01:52:01 -07:00
Arceveti
0a79b285a8 Fix typo + add get thread state and flags str funcs + fix page select not initializing pages 2024-03-16 01:35:34 -07:00
Arceveti
332eeb90f1 Determine thread 0 thread names by priority 2024-03-16 00:38:33 -07:00
Arceveti
ba956c842c Add gInspectThread + add UNF thread IDs 2024-03-15 23:41:27 -07:00
Arceveti
ad14c804c7 Add memory region names + read doubleword aligned function 2024-03-15 16:25:01 -07:00
Arceveti
05a60aec88 Improve some setting names 2024-03-15 03:51:16 -07:00
Arceveti
f64216ac04 Fix crash screen crashes not having thread descriptions 2024-03-15 03:50:22 -07:00
Arceveti
06fcf3e9ed Don't open controls popup when reviving a page 2024-03-15 03:48:46 -07:00
Arceveti
6ced7d9982 Fix wrong/duplicate registers on registers page + add cs_print_symbol_unknown 2024-03-15 03:21:56 -07:00
Arceveti
7fcc7fcdd3 Don't close popup on page revive + some null checks 2024-03-15 03:01:45 -07:00
Arceveti
4d2f3ba339 Add setting for address select preview symbol + fix memory page name on settings page 2024-03-15 00:34:29 -07:00
Arceveti
f92f00f489 A+B+START to attempt to revive crashed page 2024-03-15 00:33:06 -07:00
Arceveti
a4c6dfe260 Settings persist on subsequent crashes 2024-03-15 00:32:09 -07:00
Arceveti
04cc7a88fa Fix about page long long info buffers not appearing on subsequent crashes 2024-03-15 00:31:32 -07:00
Arceveti
36ab9f4fef About page list gfx pool as number of commands instead of hex 2024-03-14 19:45:47 -07:00
Arceveti
3adb40ef68 Add recent pages to lists 2024-03-14 19:15:19 -07:00
Arceveti
4a3f15358f Add asterisk to settings group header if one of its entries is changed from default 2024-03-14 18:47:03 -07:00
Arceveti
3548308dfa Move goddard entry position in about page 2024-03-14 15:25:41 -07:00
Arceveti
e72833d926 More about page improvements + crash_descriptions.c reordering 2024-03-14 15:20:34 -07:00
Arceveti
b8e90ee895 Add goddard size to about page 2024-03-14 14:10:35 -07:00
Arceveti
f5b5ab7c78 UNF intellisense + include libpl + small formatting change 2024-03-14 02:25:56 -07:00
Arceveti
080b107de0 Show thread number and name on registers page 2024-03-13 23:22:31 -07:00
Arceveti
1993ee44ed Adjust pc for delay slot 2024-03-13 18:37:58 -07:00
Arceveti
bfe447d809 Separate float register format detection from coprocessor number 2024-03-13 18:09:27 -07:00
Arceveti
a247e82264 Use osSyncPrintf for UNF prints 2024-03-13 14:32:16 -07:00
Arceveti
1d209d49d8 cs_print_f32 improvement 2024-03-13 14:30:32 -07:00
Arceveti
1d856d0fed Name hex strings in _Litob.c 2024-03-13 14:02:28 -07:00
Arceveti
2164f33663 Don't print duplicate registers on home page + add output indices for pseudoinstructions 2024-03-13 03:54:21 -07:00
Arceveti
92fa246fd9 Fix last row of registers not printing + small changes 2024-03-13 03:41:47 -07:00
Arceveti
c50a8b64a7 Fix about page UNF print + make scrollbars clearer + formatting 2024-03-13 03:18:47 -07:00
Arceveti
f72a46b65b About page rewrite 2024-03-13 02:22:42 -07:00
Arceveti
f36a0d55d6 Add option to include non-RDRAM symbols in mapPacker.py + add map symbol data to about page 2024-03-12 16:49:37 -07:00
Arceveti
d853b0fd14 Fix some settings 2024-03-12 02:18:03 -07:00
Arceveti
fea5499380 Don't print output registers on home screen 2024-03-11 21:26:24 -07:00
Arceveti
d0455b32c9 Various changes, mostly just refactors 2024-03-11 20:43:24 -07:00
Arceveti
d8e71ffd43 Rename enum 'FloatError' to 'FloatErrorType' 2024-03-11 16:55:25 -07:00
Arceveti
9c95b352a5 Improve FPE error handling + fix float register handling + improve float printing + add crash_descriptions.c 2024-03-11 16:53:01 -07:00
Arceveti
e305485460 More about page entries 2024-03-11 04:03:24 -07:00
Arceveti
3c7f84db53 util folder 2024-03-11 03:29:00 -07:00
Arceveti
9409607bd8 Move popups to folder 2024-03-11 03:16:49 -07:00
Arceveti
745531bd79 Remove unused field in register struct 2024-03-11 03:00:43 -07:00
Arceveti
408344c79a Add libdragon crash description heuristics + fix asserts/fpcsr on home page 2024-03-11 02:59:46 -07:00
Arceveti
a22945adee Shrink page select + popup outlines 2024-03-11 02:55:09 -07:00
Arceveti
291ae6c337 Add control description for page select menu 2024-03-11 02:04:33 -07:00
Arceveti
f43a2f5152 More registers improvements 2024-03-11 00:54:29 -07:00
Arceveti
c55f97eefe Improve register handling 2024-03-11 00:35:48 -07:00
Arceveti
18dfc3032c More about page changes 2024-03-09 16:20:24 -08:00
Arceveti
6ae514b8f4 Fix some about page issues 2024-03-09 16:01:04 -08:00
Arceveti
d3053bfbf8 Fix build with UNF + update BITFLAG_BOOL comment 2024-03-09 15:04:57 -08:00
Arceveti
7a4ba53652 Make entire about page scrollable 2024-03-09 14:50:14 -08:00
Arceveti
80a214675e extended extended bounds entries + gfx pool + goddard 2024-03-09 01:11:04 -08:00
Arceveti
9385a5b235 Add a few libpl entries to about page + scrollable about page 2024-03-09 00:32:12 -08:00
Arceveti
51d1571777 Add variables 2024-03-08 21:33:49 -08:00
Arceveti
6ae62c5d88 Skip libpl entries on about page if libpl is not supported 2024-03-08 21:33:22 -08:00
Arceveti
4ef30f9171 Fix libpl version entry 2024-03-08 21:24:48 -08:00
Arceveti
2cdce77c14 Improve about page 2024-03-08 21:22:26 -08:00
Arceveti
29eac8e7d8 Add libpl header include in page_about.c 2024-03-08 17:54:18 -08:00
Arceveti
195873630e Fix libpl build 2024-03-08 13:59:20 -08:00
Arceveti
2bde0a315f Add libpl version detection to about page + small changes 2024-03-08 13:58:16 -08:00
Arceveti
d88e073776 Press L+R to open page select popup 2024-03-07 18:45:11 -08:00
Arceveti
61244d0e41 Add registers.c + print relevant registers on home screen 2024-03-07 18:12:04 -08:00
Arceveti
274f70190b Add BG opacity setting 2024-03-07 17:56:23 -08:00
Arceveti
674e259d02 Actually fix build with UNF disabled 2024-03-07 16:38:59 -08:00
Arceveti
abf829bc04 Show disasm of pc on home page 2024-03-06 18:44:29 -08:00
Arceveti
6245c005b5 Add assert_address + print function where assert happened 2024-03-06 18:22:11 -08:00
Arceveti
b4c0e82ca6 Merge branch 'develop/2.3.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-03-06 17:06:47 -08:00
Arceveti
e551a346e5 Fix about page UNF crash + fix previous assert persisting on crash screen crash 2024-03-06 17:06:25 -08:00
Arceveti
3d658e5b08 Add gRomSize + Improve about screen 2024-03-06 16:41:45 -08:00
Matt Pharoah
7353db562c Merge pull request #774 from mpharoah/mpharoah/update-libpl
Update libpl
2024-03-06 17:28:42 -05:00
Matt Pharoah
82e0fdf391 Update libpl 2024-03-06 09:10:09 -05:00
Arceveti
5b334398da Fix build without UNF 2024-03-05 19:33:25 -08:00
Arceveti
7c7b67de5b Rename context page to registers 2024-03-05 19:33:16 -08:00
Arceveti
55f82d7cfe Use better blue for assert file name and line number 2024-03-05 19:18:35 -08:00
Arceveti
727b9e30e7 Allow changing page with L/R while controls box is open 2024-03-05 19:16:01 -08:00
Arceveti
92698b87fe Add settings to hide address ranges + formatting 2024-03-05 18:27:35 -08:00
Arceveti
5775936be9 Header redesign + add home page 2024-03-05 17:00:32 -08:00
Arceveti
031983274e Add Null SP task debug assert 2024-03-05 16:57:11 -08:00
Arceveti
802a36aa24 Update about page 2024-03-05 02:18:33 -08:00
Arceveti
d54b9a0ba0 Add about page 2024-03-04 17:52:28 -08:00
Arceveti
c69d2897d0 Add debug_is_initialized 2024-03-04 17:51:58 -08:00
Arceveti
3558411e33 Fix OS_MAJOR_VERSION 2024-03-04 17:49:16 -08:00
Arceveti
5665285c13 Check for debug_initialized in debug_printf 2024-03-04 16:00:42 -08:00
Arceveti
bf638f7ee6 Rename 'CONT_DESC_CYCLE_DRAW' to 'CONT_DESC_HIDE_CRASH_SCREEN' + move HackerSM64_version_txt to crash_main.c 2024-03-04 16:00:22 -08:00
Arceveti
fc363e7bd5 Add setting for drawing L/R arrows 2024-03-04 14:53:05 -08:00
Arceveti
cc94ad7db0 Only enable UNF on console. 2024-03-04 14:49:11 -08:00
Arceveti
526aefec43 Move assembly macros out of macros.h and main.c and into asm.h 2024-03-04 14:42:19 -08:00
Arceveti
7f6dafefaa Undo removing CAUSE from UNF print 2024-03-04 14:31:45 -08:00
Arceveti
f128d85066 Reorder context page thread, func, cause 2024-03-04 14:27:54 -08:00
Arceveti
a1027500c8 Add L/R triangles + fix UNF ifdefs + add BITFLAG_BOOL 2024-03-03 14:41:32 -08:00
Arceveti
15e72f14df Context page improvements + context UNF print + print current page on crash + add struct member macros + more 2024-03-02 21:00:30 -08:00
Arceveti
12c89466b2 Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-03-02 19:58:51 -08:00
Arceveti
5ff7daa2b3 Replace 'TARGET' with existing 'TARGET_STRING' 2024-03-02 18:10:19 -08:00
Gregory Heskett
14140887dd Merge pull request #773 from HackerN64/merge-2.2.0-into-3.0.0
Merge 2.2.0 into 3.0.0
2024-03-02 11:07:12 -05:00
Gregory Heskett
d29a552813 Merge branch 'master' into merge-2.2.0-into-3.0.0 2024-03-02 10:43:33 -05:00
Gregory Heskett
3e5d14e650 Merge pull request #772 from HackerN64/develop/2.2.0
Release: HackerSM64 2.2.0
2024-03-02 08:16:09 -05:00
Gregory Heskett
197d8074e3 Vanilla bugfix: obj_init_animation referencing o instead of obj 2024-03-01 17:47:05 -05:00
Gregory Heskett
c5d9f535ee HackerSM64 v2.2.0 2024-03-01 17:03:30 -05:00
Gregory Heskett
8257f77c57 A few various Puppyprint bugfixes (#770) 2024-03-01 17:00:46 -05:00
Arceveti
be2d8acf00 Fix wrong format in color_presets.h 2024-03-01 12:02:40 -08:00
Arceveti
c50e04a27a Disasm UNF print 2024-03-01 12:01:49 -08:00
Arceveti
dacb3a9723 Ifdef comments + map page UNF 2024-03-01 11:22:55 -08:00
Arceveti
88fad9df91 Logs UNF print + print formatting 2024-02-29 18:29:59 -08:00
Arceveti
7803a31c0a Use LOG_MESSAGE_SIZE instead of sizeof 2024-02-29 17:41:40 -08:00
Arceveti
1e106fe2e7 RAM view UNF print 2024-02-29 17:05:58 -08:00
Arceveti
00c703282a Stack trace unf print 2024-02-29 16:43:24 -08:00
Arceveti
d43732c814 Add UNF print control description + print_page_unf + basic stack trace page print 2024-02-29 16:20:13 -08:00
arthurtilly
78747e9836 Toggle the default status of a few defines to avoid confusing new people (#740)
* define toggles

* disable blue preview
2024-02-29 19:03:43 -05:00
arthurtilly
c96118bcd8 Fix objects using throwmatrix having incorrect rotation when paused (#769)
* throwmatrix fix

* ok fixed it and removed some cringe matching

* happy bitch
2024-02-29 19:03:08 -05:00
Arceveti
9f4dc00e00 Add support for UNF print current page 2024-02-29 15:28:44 -08:00
Gregory Heskett
4c8233fe6a Fix automatic libpl cloning (#771) 2024-02-27 10:29:47 -05:00
Arceveti
25f18ac2ff Some documentation 2024-02-25 16:57:34 -08:00
Arceveti
689abe4d46 Add comment for amount of ROM space taken up by debug map 2024-02-25 14:08:52 -08:00
Arceveti
25a2cf1a62 Merge branch 'develop/2.2.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-02-25 02:51:26 -08:00
Arceveti
3650bbfdc4 Improve a few uses of asserts 2024-02-25 01:20:15 -08:00
Arceveti
64df05fc4b Crash screen thread stack define name 2024-02-25 01:19:56 -08:00
Arceveti
ee09cdda9e Fix typo + revert define toggle 2024-02-25 01:05:03 -08:00
Gregory Heskett
524e35c974 Add -falign-functions=32 to makefile flags (#745)
Seemingly provides minor performance benefit and should more importantly reduce perf lotto substantially (hopefully)
2024-02-22 00:38:19 -05:00
Arceveti
3370b02513 Rename "HackerSM64_version" incbin to "HackerSM64_version_txt" 2024-02-19 17:11:45 -08:00
Matt Pharoah
fc5ffa7438 Update libpl (#767)
* Update libpl

* Update libpl again

* would you believe its another libpl update
2024-02-16 12:45:29 -05:00
Arceveti
0c1bbed7c8 Fix gSetCrashAddress 2024-02-14 16:28:03 -08:00
Arceveti
7f50491a52 DEBUG_ASSERTF usage 2024-02-14 13:59:43 -08:00
Arceveti
68f82f7559 Merge branch 'develop/2.2.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2024-02-14 01:36:11 -08:00
arthurtilly
d07e6383f6 Fixed bugs relating to objects dying in lava (#766)
• Changed the generic object death function to now also check that an object has landed and is over lava before killing it. Previously it would die instantly if it was above lava which resulted in objects randomly dying above lava

• Also changed the same function to kill a non-buoyant and killable object (e.g. goombas) right when it touches water. Previously it would slowly sink to the bottom and then instantly die upon touching the floor underwater which is strange.

• Changed where lava checks are done so they are done in the same place as other object flag checks. This avoids bugs where e.g. objects die when touching the edge of a platform that is over lava, because the ground flags are updated, then the object's floor is updated to be over the lava, and then the lava move flags are updated causing the object to think it is over lava and touching ground at the same time (making it die)

• Fixed the coin flicker define for regular non-bully coins because apparently it just never worked and no-one noticed? Only the coins that come from bullies worked with this define and I guess people only ever tested coins in lava with bullies. I rewrote the coin behavior to be a little closer to the bully one. I think in the future the two types of moving coins could easily be merged into one object, they don't act visibly different at all.

Tested the PR with a lot of goombas being dropped into lava/water and also this stuff is in Mario Builder so I've been testing it there too. Feel free to test more.
2024-02-09 21:07:31 -05:00
Gregory Heskett
1de4b9144b Fix floating point crash with pitch bend table + various audio optimizations (#746)
* Move audio TTLs to improve dcache

Saves over 100us even when audio is idle

* Improve additional audio runtime by reducing some unnecessary float math

* Pause channel/layer processing on sfx channels when idle

* Fix possible floating point UB/crash with gPitchBendFrequencyScale
2024-02-04 02:29:38 -05:00
YoshiMilkman
88c2cdb0a0 Fix wall sidling with negative speed (#762) 2024-02-02 22:52:10 -05:00
Gregory Heskett
3a5a2f14dd Missed a comma 2024-02-02 22:27:48 -05:00
Gregory Heskett
b9ba17a4d6 Add libpl submodule (#753)
* Add libpl submodule

* Clone libpl submodule automatically while building (if enabled)
2024-02-02 22:08:34 -05:00
Gregory Heskett
4af18b6fc9 Merge pull request #758 from HackerN64/master
Merge HackerSM64 2.1.3 release into 3.0.0
2024-01-31 01:23:26 -05:00
Gregory Heskett
5064fcfb69 Merge pull request #757 from HackerN64/master
Merge HackerSM64 2.1.3 release into 2.2.0
2024-01-31 01:23:18 -05:00
Gregory Heskett
05bbe16e29 HackerSM64 Release: 2.1.3
* Preserve vanilla reverb downsampling behavior whenever BETTER_REVERB isn't in use (#727)

* Disable unrelated buttons controlling S&Q menu and pausing (#728)

* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL (#731)

* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL

* Dockerfile: Use modern syntax for mounting

* Add gcc-mips-linux-gnu to dockerfile

* Add DEBUG_ASSERTIONS define and enable it by default (#730)

* Add relevant model ID asserts to level script load commands (#722)

Co-authored-by: someone2639 <someone2639@gmail.com>

* Define changes for transitions, two bug fixes (#739)

* Fixed one or two bugs, cleaned up a few things, put every non vanilla styled change into POLISHED_TRANSITIONS

And renamed set_and_reset_transition_fade_timer

* Undid the renaming of set_and_reset_transition_fade_timer as suggested

* Fix silhouette occlusion layers rendering twice (#748)

* Fix Boo's Accelerating Upwards During Textbox (Vanilla Bug) (#742)

* Add assert for beginning geo layout command (#738)

* geo layout assert

* new idea

* Change assert message, add crash screen newline support, and change debug safeguards

* Fix weird text on Project64 GLideN64 (#715)

* Update version to 2.1.3 (#754)

* Fix rumble Issues (#756)

* Missed important use of thread6 stack define

* Fix build issues with rumble

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: Denis Kopyrin <aglab3@gmail.com>
Co-authored-by: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
Co-authored-by: Lilaa3 <87947656+Lilaa3@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: 1ted59 <24933689+1ted59@users.noreply.github.com>
Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2024-01-27 12:45:43 -05:00
Gregory Heskett
9cf3753d6e Update version to 2.1.3 (#754) 2024-01-27 12:39:03 -05:00
Gregory Heskett
325ee7c5ec Fix rumble Issues (#756)
* Missed important use of thread6 stack define

* Fix build issues with rumble
2024-01-27 12:39:03 -05:00
DNVIC
bf924a8ec3 Added a define for slope fix (#749)
* implemented a form of slope fix

* fixed the slope fix to not allow for hyper cheese

* implemented gheskett's suggestions

* Added space between comment and define

Co-authored-by: Gregory Heskett <gheskett@gmail.com>

---------

Co-authored-by: dnvic <business@dnvic.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-01-21 14:11:32 -05:00
iProgramInCpp
c39b289441 * Fix weird text on Project64 GLideN64 (#715)
Included in the PR will be a list of comparisons.

This does two things:
1. Restores the `dl_ia_text_tex_settings` from the original Super Mario 64. Not sure why this was changed.
2. Changes the S coordinate of two vertices from `vertex_ia8_char` from 480 to 512. This is an error from the original game.
2024-01-21 13:42:50 -05:00
arthurtilly
5ba00edf20 Add assert for beginning geo layout command (#738)
* geo layout assert

* new idea

* Change assert message, add crash screen newline support, and change debug safeguards

---------

Co-authored-by: Gregory Heskett <gheskett@gmail.com>
2024-01-21 13:38:00 -05:00
1ted59
15a81037ef Fix Boo's Accelerating Upwards During Textbox (Vanilla Bug) (#742)
If a `Go On A Ghost Hunt` Boo is killed while it has a gravity of -1 (at the bottom of its oscillation), and does not hit a wall, it will keep the same negative gravity and continue moving until the textbox is closed. Boo Y speed isn't capped in this scenario, so the constant -1 gravity leads to the boo moving upwards at an increasing rate.

This leads to issues in `boo_act_4`. The distance eventually increases to a point where the boo object is too far to be returned in `cur_obj_nearest_object_with_behavior`. 

This can have 2 buggy effects:

- the wrong dialog box being brought up if the textbox is delayed (easiest to do by hanging on a ledge).
- the puzzle solved jingle being played incorrectly if you wait in the textbox long enough

This doesn't actually cause issues with King Boo, it just brings up the wrong text box. King Boo spawning is unaffected by this bug.

The fix is to stop the boo after the death animation has finished playing, stopping the boo from accelerating upwards. I don't believe this to cause any other issues (the boo is already dead after all!)

Thanks to Kyman for finding this bug.
2024-01-20 13:07:45 -05:00
Arceveti
b2707990f2 Fix silhouette occlusion layers rendering twice (#748) 2024-01-01 18:44:41 -05:00
Gregory Heskett
1d7a690361 Optimize BETTER_REVERB lightweight by an additional ~20% CPU, while also cutting memory requirements for it by ~30% (#744) 2023-12-30 23:22:05 -05:00
Lilaa3
08f0e3efa4 Define changes for transitions, two bug fixes (#739)
* Fixed one or two bugs, cleaned up a few things, put every non vanilla styled change into POLISHED_TRANSITIONS

And renamed set_and_reset_transition_fade_timer

* Undid the renaming of set_and_reset_transition_fade_timer as suggested
2023-12-29 18:32:19 -05:00
arthurtilly
6148582f5e remove puppylights (#736) 2023-12-16 23:26:31 -05:00
Gregory Heskett
913cda93b8 Audio cleanup checkpoint: Large portion of synthesis.c taken care of + occasional audio optimizations (#710) 2023-12-15 23:57:19 -05:00
someone2639
d7c840b8f1 Cache master displaylist on "hot" code paths (#724)
* add displaylist macros

* implement displaylist macro in memory.c

* API update

* implement displaylist macro on all 'hot' code paths

* Remove the macro entirely

* rename tmpDL

* remove the other two macros

* catch the last 2 missing statements

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-15 23:56:40 -05:00
arthurtilly
b73d8dd178 Math util cleanup (#566)
* math util cleanup

* clean up min/max 3 and also distance and angle functions

* improve pipelining and make macros safe

* macros safer and cleaned approaches

* fix build

* made sure puppycam builds (and fixed unused var warnings)

* added 32 bit mins and maxs
2023-12-15 23:44:06 -05:00
Arceveti
edfde1ec8a Merge branch 'develop/2.2.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-12-15 14:47:10 -08:00
arthurtilly
9fc928ed70 Remove OBJECTS_REJ and clean up core render func (By Fazana) (#735)
* crowd pleaser

* Fix debug boxes

* fix comments

* renamed temp graphics head to be consistent

---------

Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com>
2023-12-15 08:48:32 -05:00
someone2639
76dae5e8dd Add file select skip define (#723)
* add config define to skip file select

* implement file select skip

* Add more coverage to the skip file select tweak

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-14 23:27:50 -05:00
someone2639
7df16608a7 Add relevant model ID asserts to level script load commands (#722)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-12-14 23:26:43 -05:00
arthurtilly
1646702393 shorten call_native command (#733) 2023-12-14 23:24:35 -05:00
arthurtilly
dcfcf50a80 wall fix (#734) 2023-12-14 23:24:03 -05:00
Gregory Heskett
4f2c48c733 Add DEBUG_ASSERTIONS define and enable it by default (#730) 2023-12-11 01:58:30 -05:00
MisterSheeple
72f8ea130f Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL (#731)
* Update Dockerfile to Ubuntu 22.04 as 18.04 is EOL

* Dockerfile: Use modern syntax for mounting

* Add gcc-mips-linux-gnu to dockerfile
2023-12-10 22:40:34 -05:00
Denis Kopyrin
36c98b6cd1 Disable unrelated buttons controlling S&Q menu and pausing (#728) 2023-12-10 02:28:08 -05:00
arthurtilly
db2a739b8a Remove macro objects and free up bparam3 (#558)
* BoB, WF, JRB, CCM

* HMC and LLL

* SSL

* DDD to RR

* bowser courses

* overworld

* all stages done

* remove macro object code

* fix bparam3 and respawn info

* rename script_func_locals to be unique

* Remove level_misc_macros

* formatting changes :)

* added some enums for respawn info

---------

Co-authored-by: Arceveti <arceveti@gmail.com>
2023-11-28 15:36:33 -05:00
Gregory Heskett
78cc957d31 Preserve vanilla reverb downsampling behavior whenever BETTER_REVERB isn't in use (#727) 2023-10-31 18:23:15 -04:00
Arceveti
a9cfd6211f Formatting changes 2023-10-15 20:18:49 -07:00
Arceveti
4198e5464c Reduce number of memory reads done per frame on memory view page 2023-10-15 20:04:47 -07:00
Arceveti
1391afe696 Small improvement to context page 2023-10-15 19:15:59 -07:00
Arceveti
5f53d965f4 Move enums from memory_read.c into memory_read.h 2023-10-15 19:00:27 -07:00
Arceveti
f9237c3fa5 Fix build when INCLUDE_DEBUG_MAP is not defined 2023-10-15 15:40:54 -07:00
Arceveti
7b036e1eff Don't use array index as thread ID in sThreadIDNames 2023-10-15 15:08:41 -07:00
Arceveti
a0dacfaea4 Add thread name strings 2023-10-07 01:49:14 -07:00
Arceveti
dc0073e646 Fix tab char counting 2023-10-07 01:48:40 -07:00
Arceveti
7bd9803878 Rename 'PAGE_LOG' to 'PAGE_LOGS' 2023-10-06 15:25:58 -07:00
Arceveti
4831380b5e Fix crash screen's crash screen + Only start on logs page during assert if assert message exists + some refactoring 2023-09-30 14:26:48 -07:00
Arceveti
23f2d5fdec Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-30 13:39:25 -07:00
Arceveti
57f581d6a1 Fix FORCE_CRASH not working on most emulators + remove FRAMEBUFFER_SIZE define 2023-09-30 13:39:00 -07:00
Arceveti
637603fadf More formatting 2023-09-28 15:06:01 -07:00
Arceveti
b423f68efc More renames + comment cs_draw_line 2023-09-28 14:47:01 -07:00
Arceveti
81eff9049d formatting changes :) 2023-09-27 19:37:58 -07:00
Arceveti
7e9fd41791 Remove HACKERSM64_VERSION define 2023-09-27 15:07:19 -07:00
Arceveti
bb73ec3488 Change popup box functionality 2023-09-27 15:04:32 -07:00
thecozies
7de18d10fc Merge pull request #714 from HackerN64/develop/2.1.2
Release: v2.1.2
2023-09-27 16:54:38 -05:00
Arceveti
9056a1061b Merge branch 'develop/2.1.2' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-27 14:42:28 -07:00
Gregory Heskett
01c3f20c6f v2.1.2 2023-09-27 11:13:53 -05:00
thecozies
38f25d2b83 rename flips src dir (#711) 2023-09-27 11:55:14 -04:00
someone2639
48bea33052 spawn lakitu at the origin (#712)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-27 11:54:00 -04:00
Arceveti
ec385f7cb8 Add INCBIN + get version number string from VERSION.txt 2023-09-27 01:37:27 -07:00
Arceveti
1a3953868a Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-26 20:10:40 -07:00
thecozies
b8f770ae48 Release/2.1.1 (#709)
* removed extraneous mat stack index decrement in geo_process_camera (#708)

* Fixed typo in FCR enums (#707)

* v2.1.1

---------

Co-authored-by: Matt Pharoah <mtpharoah@gmail.com>
2023-09-26 14:05:46 -04:00
Arceveti
6ede47f4cc Merge branch 'master' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-25 17:37:33 -07:00
thecozies
31d46d4479 Merge pull request #692 from HackerN64/develop/2.1.0
Release/2.1.0
2023-09-25 18:40:02 -05:00
thecozies
5d45c1d46f v2.1.0 2023-09-25 18:22:46 -05:00
Arceveti
fea0858ee0 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-25 16:12:06 -07:00
thecozies
37093031da Cpp support (#705)
* remove unused typedefs

* support for building c++ files
2023-09-25 14:41:51 -05:00
Lilaa3
af3b538ed9 Remove sharp transitions (#702)
* Cannon render mode fix

Slipped past me.

* Removed sharp transitions

I like the idea but it really isn´t vanilla and causes issues.
Might be worth revisiting but for now lets just get rid of it.

* fixes

Missing render mode set for transitions, reduced display list alloc for cannon
tested more this time
2023-09-25 08:26:31 -05:00
Gregory Heskett
e5bcf95703 Fix camera issues with NON_STOP_STARS (#700)
* Fix camera issues with NON_STOP_STARS

* Throw early return into stardance cutscene instead
2023-09-23 16:40:07 -05:00
Lilaa3
c39fb6f333 Small texture type fix for the cannon (#696)
* Small texture type fix for transitions

* Moved texture type define above other declarations
2023-09-23 17:32:21 -04:00
thecozies
ed1465247a Merge pull request #695 from gheskett/remove-puppylights
Remove Puppylights define from config file
2023-09-23 15:26:37 -05:00
thecozies
b6ba2b58ad Merge pull request #698 from HackerN64/perspective_fov_scale
remap scale with fov and avoid copy when world scale is 1
2023-09-23 15:13:41 -05:00
thecozies
b1ef06fcd1 remap scale with fov and avoid copy when world scale is 1 2023-09-23 15:05:30 -05:00
Gregory Heskett
3545b4658c Remove Puppylights define from config file, since it doesn't work anymore 2023-09-23 00:35:48 -04:00
Arceveti
0ce3bb0fa3 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-22 15:31:50 -07:00
thecozies
00b4475427 Merge pull request #694 from Arceveti/develop/2.1.0-four-controllers-base
Fix controller type checking (GCN false positive)
2023-09-22 17:18:31 -05:00
Arceveti
bf1cd9091f Fix controller type checking (GCN false positive) 2023-09-22 15:12:55 -07:00
thecozies
cd2e639206 Merge pull request #595 from Arceveti/develop/2.1.0-four-controllers-base
4 controllers support + osContCh optimization
2023-09-22 16:56:23 -05:00
Arceveti
4397811b92 Simplify controller type checking + fix controller swapping 2023-09-22 14:47:07 -07:00
Arceveti
c890838b24 Fix controllers on ports other than 0 2023-09-22 14:25:20 -07:00
thecozies
5f8c17ca74 Merge pull request #693 from thecozies/revert_frustratio
added USE_FRUSTRATIO2 define
2023-09-22 14:15:31 -05:00
thecozies
ff953bea63 added USE_FRUSTRATIO2 define 2023-09-22 13:16:34 -05:00
thecozies
f29fe44135 Merge pull request #691 from HackerN64/develop/2.1.0_pull_master
Develop/2.1.0 pull master
2023-09-22 12:41:56 -05:00
thecozies
48fed9878e Merge branch 'master' of github.com:HackerN64/HackerSM64 into develop/2.1.0_pull_master 2023-09-22 12:38:53 -05:00
Matt Pharoah
c9533d18ff Future proof console check (closes #663) (#690) 2023-09-22 13:09:32 -04:00
someone2639
544fcaf038 remove dependency on script exec permissions (#683)
* make fixlights.py and make_version.sh independent of exec perms

* add mips64-elf-ld warning

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-22 13:06:39 -04:00
Matt Pharoah
3a312e101c Improved WiiVC check to avoid false positives & added functions to read and manipulate fcr31 (#669)
* Added functions to access and manipulate the fcr31 register

* Improved WiiVC emulator check to avoid false positives

* Updated comments

* Moved float.h to include directory
2023-09-22 13:05:53 -04:00
someone2639
42cbaed631 Track whether the RCP hang timer has started to prevent double setting (#689)
* Track whether the RCP hang timer has started to prevent double setting

* removed single letter struct field

* remove debug lines

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-22 08:35:17 -05:00
Gregory Heskett
e61bf8fbc1 Fix STAR_DANCE_USES_STARS_MODEL define (#688) 2023-09-21 14:23:03 -05:00
thecozies
60bb21693b fix tile scrolled light materials (#687) 2023-09-21 14:13:58 -05:00
Gregory Heskett
da3a7e826a Add missing JRB vanilla level check (#685) 2023-09-20 00:29:19 -04:00
Gregory Heskett
a64be21db8 Added config option for previewable blue coins (#507)
* Added config option for previewable blue coins

* Clean up previewable blue coin implementation to only be a couple lines

---------

Co-authored-by: Colin Tong <tongcolin@live.ca>
2023-09-18 18:21:39 -04:00
Lilaa3
44b48ffacd Important Culling Fixes (#666)
* Culling fix

Precison of half fov horizontal being equal to or above 2 leads to many issues. using 1.5 would break rt64 and other emulators with ultra widescreen.
Vertical culling will be disabled by default until 3.0

* Improved emu checks and naming

* Comment changes

* Small typo fix
2023-09-18 09:18:35 -05:00
thecozies
c3f300be9f Wiseguy's fixed raycast traversal (#681)
* wiseguy's fixed raycast traversal

* Use while (TRUE) { for the sake of repo consistency
2023-09-18 08:40:37 -05:00
thecozies
63ddb28641 only set rooms while in a new room (#682) 2023-09-18 09:36:53 -04:00
thecozies
0a7e44de0e restore mips-n64 (#680) 2023-09-18 09:18:03 -04:00
Gregory Heskett
ab0cebab7a Rotate envmaps to be consistent with vanilla (#636)
* Start work on envmap rotation stuff

* n64graphic envmap rotation working

* Add comment to rotation function

* Fix DLs of non 32x32 env maps, fix envmap rotation

* fix metal flying vanish cap

* fix metal mario's medium poly butt

* new asset version for flipped env maps

* added missing env textures to extract script

* restore asset_needs_update

* Skip asset_needs_update calls if local version matches new version

* removed the goddard textures from envmap rotation

---------

Co-authored-by: mineqwerty <mineqwerty25@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-09-18 09:10:56 -04:00
Gregory Heskett
8a83359ed1 Add functional changes to inertia to support only specific directions specified in the config (#671)
* Add functional changes to inertia to support only specific directions specified in the config (needs cleanup)

* Reduce number of inertia defines

* Update Platform Displacement 2 define description

* comment adjustments
2023-09-18 07:17:31 -05:00
Arceveti
973eec3c93 Merge branch 'develop/2.1.0' of https://github.com/Arceveti/HackerSM64 into develop/2.1.0-four-controllers-base 2023-09-17 19:46:42 -07:00
someone2639
db85886294 Global folder integration for all features that need a baserom (#677)
* Look for shared baserom directory using XDG_DATA_DIR instead of polluting the home directory

* move global baserom folder detection to a new file that the makefile can use

* ignore __pycache__ in tools

* edit make patch to use global baserom detector

* Extract jp/sh/eu from global folder too

* genericize asset extraction for all versions

* force at least US to extract

---------

Co-authored-by: Matt Pharoah <mtpharoah@gmail.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-09-17 21:54:37 -04:00
Gregory Heskett
620b7cdded Fix typo describing BETTER_REVERB parameters (#678) 2023-09-17 14:37:08 -04:00
Matt Pharoah
c21fd01977 Look for shared baserom directory using XDG_DATA_DIR instead of polluting the home directory (#670) 2023-09-17 11:00:18 -04:00
Arceveti
271cf7f1ae Improve unaligned data reads 2023-09-12 13:20:18 -07:00
Arceveti
8377fd9ea3 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-12 12:59:16 -07:00
Arceveti
7f40c65039 insn_disasm formatting + small optimizations 2023-09-12 12:58:24 -07:00
CowQuack
90d313b4e2 fixed fading warps not downwarping (#675) 2023-09-12 14:44:21 -04:00
Arceveti
2eef28099b Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-11 14:32:07 -07:00
Arceveti
8f9c1856a7 Add make rebuildtools (#674) 2023-09-11 17:15:22 -04:00
Arceveti
cf3e0894f9 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-11 13:54:21 -07:00
Gregory Heskett
ca4757639e Bugfix: Selecting headset audio and then disabling stereo headset effects define leads to game crash in sound select (#672)
* Bugfix: Selecting headset audio and then disabling stereo headset effects define leads to game crash in sound select

* More involved modifications
2023-09-11 12:06:37 -04:00
Arceveti
96e822a140 UNF compatibility + print on crash 2023-09-10 15:41:36 -07:00
Arceveti
fc231ea9f4 Context page string get refactor 2023-09-10 15:26:27 -07:00
Arceveti
71daa02763 Various documentation + formatting 2023-09-10 13:59:09 -07:00
Arceveti
1338223f7e Improve disasm selection box 2023-09-09 19:30:45 -07:00
Arceveti
38fb684dcb Better null terminators for insn_db arrays + update documentation 2023-09-09 19:30:36 -07:00
Arceveti
ae0010c929 More get_insn optimization 2023-09-09 19:20:15 -07:00
Arceveti
954a5af142 get_insn optimization 2023-09-09 19:10:59 -07:00
Arceveti
5e4b05986a Further get_insn_type_and_list cleanup 2023-09-09 15:08:31 -07:00
Arceveti
6d9d7a9b91 Clean up get_insn_type_and_list 2023-09-09 14:47:05 -07:00
Arceveti
337272b532 control list name consistency 2023-09-09 14:35:48 -07:00
Arceveti
a7c82230e0 Fix insn_disasm coprocessor subtype accuracy + documentation 2023-09-07 17:14:06 -07:00
Arceveti
216fca53ed Function name consistency + some documentation 2023-09-06 13:53:47 -07:00
Arceveti
8105fde1f5 Updates from main input branch 2023-09-06 13:15:29 -07:00
Arceveti
50b4ebf051 Merge branch 'develop/2.1.0' of https://github.com/HackerN64/HackerSM64 into develop/2.1.0-four-controllers-base 2023-09-05 12:57:54 -07:00
Arceveti
f56f7b828d Remove unused crash_main.c includes + assert formatting 2023-09-05 12:49:21 -07:00
Arceveti
972c8c035f Split settings data into groups 2023-09-05 12:36:59 -07:00
Arceveti
79cd81f864 Clean up settings prints + context page as start page 2023-09-02 13:53:52 -07:00
Arceveti
e342f8d176 Add 'CRASH_SCREEN_START_PAGE' define + fix build warning 2023-09-02 13:38:39 -07:00
Arceveti
99e9e362d3 Assert fixes 2023-09-02 13:29:58 -07:00
Arceveti
dc5bd6a8bf Improve UNF ifdef in thread3_main 2023-09-02 13:24:36 -07:00
Arceveti
cc3f1f6f2f Fix vc_check.h include 2023-09-02 13:20:05 -07:00
Arceveti
c437424cd8 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-09-01 18:02:04 -07:00
Arceveti
42633dc59e Clean up crash_screen_thread_entry 2023-09-01 17:53:16 -07:00
Matt Pharoah
d105eff491 Fixed broken build (#668) 2023-09-01 15:08:24 -04:00
CowQuack
90a9e978cc Fix the stationary action and ledgegrab downwarps when pushed off a ledge, and added a special downwarp for grabbing Bowser (#664)
* fix stationary/ledge downwarp, special bowser case

* Comment clarity

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-08-30 21:53:04 -04:00
FConnuli
d13f0cb2fc Create compile_flags.txt (#653)
Added compile_flags.txt for the clangd lsp to work for the project
2023-08-29 18:08:45 -04:00
someone2639
683bb80c72 file purge + extract_assets revamp (#644)
* remove gen_asset_list (frozen)

* move format.sh

* remove rasm2armips (decompilation helper)

* remove patch_libmalloc (IDO exclusive)

* remove unnecessary sha1's and makefile definitions

* remove libultra math script (IDO exclusive)

* remove patch_elf_32bit

* actually remove bitwidth tool

* remove the need for all the sha1 files

* extract_assets can now find a baserom named anything

* added error handling and some more graceful error handling

* formatting the error message

* more relevant error info

* add a check for a roms folder

* fix gitignore to prevent patch_elf from being re-committed

* naming clarity; change to baseroms/; feedback addressed

* skip rom verification if assets have been extracted

* changes addressed

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-08-29 09:06:41 -05:00
Lilaa3
5e9f8c7ee0 Improved transitions (#642)
* Improved transitions

Code quality improvements.
Shape transitions now all scale down to 0 instead of 16 (mario and bowser).
Ease in was added which leads to far smoother transitions.
HD_TRANSITIONS define added, makes use of the tex edge render mode to deliver smooth transition textures.
lerpf was added to math utils.

* Cleaner textures, rounding only during vertex creation

* Another attempt

* cozies naming suggestion

* Improvements and suggestions

SHARP_TRANSITION_TEXTURES is now off by default (I still think the textures for it could be improved).
lerpf, to_smoothstop, smoothstart, smoothstop and smoothstep have all been added.
make_vertex has been inlined.
make_simple_vertex has been added (colourless vertex).
Transition colors (and canon colors) are now defined using primative colour instead of setting individual vertices color´s.
Transition´s now use smoothstep (ease-in-out) instead of ease out only.
Naming has been improved.

* Proper function inling and removal of GBI_FLOATS variant of make_vertex and make_simple_vertex

* More requested changes

* Accidental final new line removal fixed

* Comment about pop in fix.

* Comment fix

The issue with writing comments for stuff is when you want to change code later on.
2023-08-29 08:57:32 -05:00
Gregory Heskett
1e0498ba68 Fix Puppyprint compiler warning (#661)
lol
2023-08-29 09:11:50 -04:00
Fazana
ca0e373a2c remove decompression heap (#660) 2023-08-29 07:55:21 -05:00
Gregory Heskett
1fd8930881 Remove singular version ifdef from sounds.h (#655)
Makes tooling more difficult but also just hard to look at
2023-08-29 07:49:40 -05:00
Matt Pharoah
febcb71ea3 Added emulator detection (#651)
* Added emulator detection

* Fixed missing assignments

* Disable interrupts around the count factor test

* Added more comments to emutest

* Changed PJ64 enum values so the versions work as a bitfield

* Updated README

* Fixed comments

* Updated enum values so you can safely AND and OR all emulator version flags together

* Remove redundant gIsConsole, gIsVC, and gCacheEmulated global variables

* Changed console check to be more future proof against Ares

* Use assembly file instead of casting to a function pointer

* Moved round_double_to_float back to its own compilation unit

* Moved the ParallelN64 check before the Ares check for better future-proofing

* Align pj64_get_count_factor_asm with cache lines... not that it actually matters for pj64

* Adjusted some comments

* Made emulator check thread-safe on emulators that emulate PI timings

* Added gIsConsole macro for backwards compatibility

* Added cen64 to INSTANT_INPUT_BLACKLIST

* Updated comment
2023-08-28 18:03:26 -04:00
Arceveti
64c5c4cb9f Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-08-23 17:14:09 -07:00
Gregory Heskett
0138b8ea53 Revert dialogue scrolling to behave like vanilla (#658) 2023-08-23 17:11:42 -07:00
Arceveti
bcfa6a1803 Move CSPage structs to page files 2023-08-23 15:47:45 -07:00
Arceveti
48cdefded7 Update comment 2023-08-23 15:36:53 -07:00
Arceveti
6fa027485d Various refactors 2023-08-23 15:27:17 -07:00
Arceveti
14ad9afb8b Move 'name' member of CSPage to the beginning 2023-08-23 14:52:45 -07:00
Arceveti
e197e87881 Improve struct typedefs 2023-08-23 14:49:26 -07:00
Arceveti
a59a944e27 Add settings for map view page 2023-08-22 15:43:49 -07:00
Arceveti
50cfd18b21 Add show/hide settings for stack address and offset in stack page 2023-08-22 14:59:30 -07:00
Arceveti
cbaacbf168 Add setting for log index numbers 2023-08-22 14:46:42 -07:00
Arceveti
b6ca9ff68d Add expand/collapse all for settings 2023-08-22 14:13:35 -07:00
Arceveti
a6700b4558 static char buffer for print 2023-08-22 12:02:26 -07:00
Arceveti
cb0718ccbd Various formatting 2023-08-21 21:03:29 -07:00
Arceveti
d0050caabe Fix disasm branch arrows + fix typo 2023-08-21 21:02:35 -07:00
Arceveti
cd2dce570c more crash_controls.c cleanup + address_select.h formatting 2023-08-19 20:13:58 -07:00
Arceveti
1b7c28b4ba update_crash_screen_page cleanup 2023-08-19 20:05:46 -07:00
Arceveti
4cf6c28459 move non-default setting asterisk 2023-08-19 19:58:39 -07:00
Arceveti
616bed1f10 Header formatting + insn format string fix 2023-08-19 19:58:32 -07:00
Arceveti
643c275291 Add gCSWordWrapXLimit + formatting 2023-08-17 11:40:45 -07:00
Arceveti
584e7293ca Red assert highlight 2023-08-16 20:24:07 -07:00
Arceveti
88e9d3b08c Update assert print in log page 2023-08-16 14:46:24 -07:00
Arceveti
d9fed14bb1 Use ASSERTF for crash_screen_print_impl buffer size check 2023-08-16 14:24:06 -07:00
Arceveti
e2f248c74c Add __n64Assert_Condition + Replace assert args with ERRORF, ASSERTF, and DEBUG_ASSERTF macros + move write_to_buf to printf.h 2023-08-16 14:21:45 -07:00
Arceveti
e158586d7e Add assert args + assert.c/assert.h 2023-08-15 23:04:19 -07:00
Arceveti
ffbaf89181 Add tab support 2023-08-15 20:25:29 -07:00
Arceveti
251bc0e96e Combine assert and log pages 2023-08-15 16:21:45 -07:00
Arceveti
399d5365e3 Add current symbol name setting for memory page 2023-08-14 19:46:37 -07:00
Arceveti
cdcafa68b8 Clamp settings scroll when section is collapsed 2023-08-14 15:36:42 -07:00
Arceveti
7faf7185da Clean up disasm branch arrow head drawing 2023-08-14 14:27:06 -07:00
Arceveti
32aa26d2d7 Add setting for current symbol name in disasm 2023-08-14 13:54:07 -07:00
Arceveti
072421b26d Replace triangle functions with a cropped diamond shape 2023-08-14 13:09:11 -07:00
Arceveti
0131f78d28 Add config_crash.h 2023-08-12 18:45:46 -07:00
Arceveti
cedee53da0 Move controls lists + some renames 2023-08-12 18:40:26 -07:00
Arceveti
b1b19eb8b6 Move non-default setting asterisk 2023-08-12 18:19:13 -07:00
Arceveti
216da323eb Fix disasm branch arrows sometimes appearing outside of code sections + fix typo 2023-08-12 16:50:22 -07:00
Arceveti
5276c65032 Fix includes 2023-08-12 16:40:25 -07:00
Arceveti
c10dbc2392 Move settings functionality into its own file + crash_types.h cleanup 2023-08-12 15:51:15 -07:00
Arceveti
83eef2b61a Make settings section headers collapsible 2023-08-12 15:43:15 -07:00
Arceveti
a26c4b5684 Add settings section headers 2023-08-12 15:43:07 -07:00
Arceveti
034306db48 Clean up settings defaults in INCLUDE_DEBUG_MAP ifderfs 2023-08-10 21:45:27 -07:00
Arceveti
9a2908de7d Add settings for cursor direction hold wait frames and analog deadzone 2023-08-10 21:27:36 -07:00
Arceveti
74fe1868fc Add option to parse context register symbol names 2023-08-10 20:06:14 -07:00
Arceveti
78a48e1bf9 Use tc->sp for the first sCSFunctionStackBuffer entry 2023-08-10 19:57:17 -07:00
Arceveti
14dad6050e Wrap selection for stack trace and settings pages + use sp for currfunc stack address 2023-08-10 17:44:57 -07:00
Arceveti
ac3c5814dd Composite controller 2023-08-09 15:40:26 -07:00
Arceveti
7ddee27fdc Implement "SELECTION" mode for disasm branch arrows 2023-08-08 22:00:30 -07:00
Arceveti
9847040002 Settings fixes + INCLUDE_DEBUG_MAP ifdef fixes 2023-08-08 21:31:58 -07:00
Arceveti
bab96a8e54 Add reset to defaults + fix hiding crash screen with Z + change setting controls description + add WRAP macro 2023-08-08 14:19:31 -07:00
Arceveti
84cb6e18ab Print asterisk if setting has been changed from default 2023-08-08 13:15:27 -07:00
Arceveti
e04847837f Add option to print disasm branches as addresses + formatting 2023-08-08 12:48:19 -07:00
Arceveti
f362a46ace Optimize PrintBuffer memory usage + add ColorRGBA32 union 2023-08-07 16:22:00 -07:00
Arceveti
8e4950d2d1 Add <> arrows to settings 2023-08-07 14:31:29 -07:00
Arceveti
84c6b218b4 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-08-07 13:54:41 -07:00
Fazana
d0e5bf665b Bugfix: Puppyprint question mark (#654) 2023-08-01 12:48:00 -04:00
Arceveti
bb869b66c8 Update colors + settings order 2023-07-26 13:11:41 -07:00
Arceveti
b4dfa5cf8e Fix print scroll speed 0 2023-07-24 13:47:48 -07:00
Arceveti
66fc5def65 Add setting for pseudoinstructions + color fixes 2023-07-24 11:38:38 -07:00
Arceveti
ed75f79ba4 Move handle_input to input.h for easier merging later 2023-07-24 00:06:14 -07:00
Arceveti
76ea4f3735 Rename "game_input.h" to "input.h" to match input branch 2023-07-23 23:56:42 -07:00
Arceveti
f9493e48f3 Add disasm immediate format setting + crash_screen_draw_row_selection_box 2023-07-23 18:40:44 -07:00
Arceveti
e5b7a4742a Add settings page 2023-07-23 13:24:47 -07:00
Arceveti
a772d74b2c Rename page file names 2023-07-21 13:28:06 -07:00
Arceveti
5a9cca4958 Add index numbers to puppyprint log page 2023-07-21 13:17:28 -07:00
Arceveti
83392dce36 Update mapPacker.py comments & struct 2023-07-21 12:26:16 -07:00
Arceveti
738adebb22 Fix draw scissor box preventing hiding framebuffer 2023-07-21 01:18:32 -07:00
Arceveti
6bd6af41f0 Remove unused line 2023-07-20 18:24:07 -07:00
Arceveti
9552922ab2 Assert page improvements + print buffer bounds assert 2023-07-18 16:34:01 -07:00
Arceveti
372653b025 Fix stack trace on subsequent crash screens 2023-07-18 16:32:30 -07:00
Arceveti
9c913667b3 Update the map view page if the selected symbol changed on a different page 2023-07-18 16:30:43 -07:00
Arceveti
c77efff76a Add draw scissor box 2023-07-18 16:29:35 -07:00
Arceveti
0cab90c88a Fix map parser 2023-07-18 13:04:20 -07:00
Arceveti
6755d1e795 Swap stack trace and map view pages + some fixes 2023-07-17 18:05:45 -07:00
Arceveti
307330336f Rename "crash_screen" files to "crash_main" + add placeholder settings page files 2023-07-13 18:41:52 -07:00
Arceveti
3dab43c478 Refactor map symbol searching + change "entry" to "symbol" 2023-07-13 18:34:34 -07:00
Arceveti
ea3a203601 Add parse error code to map entry format 2023-07-13 13:21:22 -07:00
Arceveti
5128f35d6c memory_read functions for specific sizes 2023-07-13 12:51:30 -07:00
Arceveti
7cc11f645a Signed ints for crash screen draw 2023-07-13 12:48:59 -07:00
Arceveti
f33b1c8df5 Fix mapPacker.py + add type to map data 2023-07-13 12:36:08 -07:00
Arceveti
0d5c78d3b3 Various formatting/refactoring 2023-07-13 12:31:20 -07:00
Arceveti
f88e09018a Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-07-12 21:18:14 -07:00
Lilaa3
7c32cf8b63 Dynamic collision fixes + actual OR_LONG (#648)
* Dynamic collision fixes + actual OR_LONG

Dynamic collision will now check Mario´s vertical distance seperately, this is done to implement a check for when mario is above an object, in which case the collision distance is expanded by 2000 units to avoid shadows not appearing.
Or long works correctly now, replaces the behaviour command NOP_1.

* Micro optimzation

Avoids sqrtf by using the squared lateral distance and squaring the the collision distance for the comparison.

* Requested changes

* minor change

* Re ordering

* How
2023-06-29 17:25:54 -05:00
Gregory Heskett
4dc17a32a2 Slice BETTER_REVERB memory requirements in half (#649)
which also improves performance by almost 10%
2023-06-29 10:09:32 -04:00
Gregory Heskett
37787dffc9 Add SET_ECHO level script command + minor BETTER_REVERB refactoring (#591)
* Add SET_ECHO level script command + minor BETTER_REVERB refactoring

* Add Puppyprint debug page for trying out different BETTER_REVERB presets and configurations

Also fix a missing Puppyprint enum that was causing issues

* Modify Puppyprint BETTER_REVERB page + other minor improvements

* Swap order of RSP commands to allow reverb downsampling to sound more similar to that of without downsampling
2023-06-28 15:15:38 -04:00
someone2639
e2cf2d5119 IPL3 documentation; undefined_syms.txt finally deleted (#545)
* yeet undefined_syms; IPL3 documentation; theoretical addition of checksum skip and initial DMA length/location change

* another comment about how to set dma len

* comment is now correct in ultratypes

* do the rename

* remove insinuations that ipl3 can be modified

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-26 12:35:52 -05:00
someone2639
1eba347c07 replace abs with c macro; replace round with asm extern function (#647)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:57:21 -04:00
someone2639
13b8339560 pack including static symbols using 'nm' (#646)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:56:43 -04:00
someone2639
823101164d import new flips + flags (#645)
Co-authored-by: someone2639 <someone2639@gmail.com>
2023-06-25 23:12:04 -04:00
Lilaa3
16e55ad952 Culling improvements + GRAPH_RENDER_INVISIBLE check change (#590)
* Culling improvements + earlier GRAPH_RENDER_INVISIBLE check

GRAPH_RENDER_INVISIBLE is now checked during geo_process_object before any uncessesary transformation is applied to
the object, translation is still calculated for sound even if the object is invisible.
Half fov is now computed during geo_process_perspective.
Vertical culling has been added (only when bellow the screen to prevent shadow´s being culled).
Emulators have basically infinite culling aspect ratio to prevent early culling with widescreen viewport hacks.
Default culling radius is now a define.
This was written by both me and Kaze Emanuar, he provided the suggestion to use absf and informed me of
integer division being remarkably slow (although it´s only used once during geo_process_perspective).

* Badly placed new line (major fix)

* integer

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

* parenthesis

doesn´t affect order of operation, just for code quality

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

* uncessary whitespace

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-23 10:06:24 -05:00
Gregory Heskett
73fad6195d Bugfix: fix profiler freeze (hopefully) (#640) 2023-06-20 20:24:20 -05:00
someone2639
8240262c07 Update S2DEX Text Engine to latest version; fix build issues (#532)
Now its just part of HackerSM64 entirely, and HackerSM64 will be the source of all changes (as long as said changes can reasonably apply to homebrew games)
2023-06-17 16:51:03 -04:00
Reonu
fffebd1065 add death on exit course define (#564)
if the define is enabled, exiting course is the same as dying (warps to failure warp node)
2023-06-16 20:57:33 -04:00
Gregory Heskett
7f08d3d963 Revert floor sorting optimizations (#639)
They cause some weird collision bugs, and are thus not worth keeping until properly investigated.
2023-06-13 12:57:33 -04:00
Fazana
5764ae0ece Puppy Camera for 2.1 (#554) 2023-06-09 11:13:57 -04:00
CowQuack
4c9a91c2be Improved the extended inst names and added missing (#634)
* Improved the extended inst names and added missing

* Added percussion loop and renamed cowbell
2023-06-07 15:56:56 -04:00
Gregory Heskett
8f6fde697f Disable Stereo Headset Effects and stub out all known code references via define (#633)
* Disable stereoheadseteffects and stub out all known code references via define

By effect this also completely removes Headset sound options from the game config, as it serves no purpose whatsoever compared to stereo.
Because it's stubbed out everywhere rather than only the necessary locations to prevent it, this should boost audio runtime slightly for everything, not just the stuff that actively used it.

* Rename DISABLE_HEADSET_STEREO_EFFECTS to ENABLE_HEADSET_STEREO_EFFECTS

* Reorganize and reduce audio Note struct

* Add performance to define description

* Rename ENABLE_HEADSET_STEREO_EFFECTS to ENABLE_STEREO_HEADSET_EFFECTS
2023-06-07 13:58:59 -04:00
CowQuack
0c7f44a51a Merge pull request #629 from HackerN64/develop/2.1.0-red-coin-count-increase
Develop/2.1.0 red coin count increase
2023-06-07 12:42:09 -04:00
CowQuack
91af40e72a Update src/game/behaviors/red_coin.inc.c
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-07 12:26:27 -04:00
CowQuack
7cdb0764a5 le comment
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2023-06-07 12:24:20 -04:00
Fazana
57f7338e6a Change puppyprint log function calls to defines (#632) 2023-06-07 07:58:22 -04:00
Gregory Heskett
42cf450ba8 Increase size/configurability of volume ramping tables (#623)
Vanilla's ramping table sounds absolutely horrendous, most noticeably when it comes to slow volume fade-ins/outs. By default, precision has been increased by 4x vanilla US, which overall has an insignificant impact on performance. This is still half as precise as EU's volume ramping table, that's about the point where additional memory and performance aspects are impacted more significantly.
2023-06-07 06:46:25 -04:00
Gregory Heskett
50b023ef21 Allow envelopes with delay values of 0 on init (#625)
This allows sounds to start instantly without any fade-in. Using new soundbanks with delay values of 0 will not compile with base decomp, but old decomp-compliant soundbanks will work with this commit.
2023-06-07 06:46:12 -04:00
mineqwerty
3fc7b50488 Readme red coin star clarity 2023-06-05 19:33:04 -04:00
mineqwerty
d1c56b60a3 fixed spawning bug with level red coin stars 2023-06-05 18:28:13 -04:00
CowQuack
dde6e7da1a condition that forces level reload on exit course (#630)
* condition that forces level reload on exit course

* Changed exit course to use a specific warp flag
2023-06-05 17:26:28 -05:00
Gregory Heskett
81c0a8ae61 Improve BETTER_REVERB runtime by about 15-20% overall (#619)
Refactored everything to be more memory efficient and execute fewer function calls than prior

Also accidentally discovered a significant bug with the audio modes always being forced to stereo so this is definitely 2.1 scope lmao
2023-06-05 17:09:03 -05:00
Arceveti
580fd45079 Use FillRectangle for shade_screen (#611) 2023-06-05 17:06:37 -05:00
thecozies
351f6f8961 added make_patch and flips (#628) 2023-06-05 17:02:58 -05:00
thecozies
aabad79e46 removed denorm col tri in wdw (#631) 2023-06-05 17:54:03 -04:00
mineqwerty
ea818c2ec0 added support for multi area red coin stars in bp2 2023-06-05 16:37:39 -04:00
mineqwerty
daf53f85aa fixed nitpicks and dialog trigger number 2023-06-05 10:59:44 -04:00
mineqwerty
c4441e8ee6 forgot to cap red coins in the menu 2023-06-04 22:34:16 -04:00
mineqwerty
af53a42b0b pause screen red coins 2023-06-04 22:29:37 -04:00
mineqwerty
0d14f6bb58 revert testing changes 2023-06-04 21:21:45 -04:00
mineqwerty
f80acbbefc testing changes 2023-06-04 21:20:39 -04:00
mineqwerty
62772067d5 added support for up to 99 red coins in an area 2023-06-04 21:19:51 -04:00
Gregory Heskett
e9054a6b6b Bugfix: Enabling silhouettes with OBJECTS_REJ disabled does not compile (#627) 2023-05-12 02:47:25 -04:00
thecozies
34b97c9249 v2.0.9 2023-05-11 09:13:42 -04:00
thecozies
23e01e712b copied new unf usb lib 2023-05-11 09:13:42 -04:00
thecozies
a34c2f4cb0 Aligned gfx buffers to 32 2023-05-11 09:13:42 -04:00
Gregory Heskett
b6d83b3291 Merge pull request #624 from HackerN64/v2.0.9
Release/2.0.9
2023-05-10 19:24:01 -04:00
thecozies
9717d89fb8 v2.0.9 2023-05-09 17:19:16 -04:00
someone2639
38e9b08695 Fix builds on Make 4.4 (#588)
* Fix builds on Make 4.4

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-05-09 17:19:16 -04:00
Arceveti
b641981515 Rename 'gCrashAddress' to 'gSetCrashAddress' 2023-05-07 15:38:12 -04:00
Gregory Heskett
f795173176 Start samples at full velocity when using envelopes that start with a delay of 1 (#576)
* Start samples at full velocity when using envelopes that start with a delay of 1

This can help eliminate sample artifacting that happens during a transition between a sudden fade-in into normal volume. It's not completely eliminated due to some processing weirdness, but it's a massive improvement.

* Fix vanilla issue causing misalignment when samples are initialized and played back with low attack values

NOW the artifacting is actually gone for real

* Improve artifacting bugfix

The first solution would've honestly been satisfactory, but this one seems to be slightly more accurate while actually removing code rather than adding it
2023-05-05 18:10:26 -04:00
thecozies
312496d769 copied new unf usb lib 2023-05-05 11:18:42 -05:00
thecozies
d68233a1c0 Aligned gfx buffers to 32 2023-05-05 11:16:57 -05:00
Arceveti
cf5f130552 Improve char/uchar usage 2023-05-01 12:43:09 -04:00
Arceveti
82bd9f6f8d Formatting changes 2023-05-01 11:24:43 -04:00
Arceveti
6b7a0236ab Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-04-30 22:29:54 -04:00
Arceveti
01d001fb31 Add Map Viewer page 2023-04-30 22:29:03 -04:00
Arceveti
5ab8373c1d Improve stack trace display 2023-04-30 22:26:58 -04:00
Arceveti
04fadbd19a print_crash_screen_header cleanup 2023-04-30 22:25:19 -04:00
Arceveti
d5d38e7dde Add crash_screen_print_map_name 2023-04-30 21:50:22 -04:00
Arceveti
de6bc0a5cb Properly validate addresses before reading 2023-04-30 19:36:59 -04:00
Arceveti
dff9b61bb3 Improve address select wrapping 2023-04-30 19:22:50 -04:00
Arceveti
1ee74151a3 Fix build 2023-04-30 19:16:15 -04:00
Arceveti
a838b47a63 Fix scroll bar 2023-04-30 19:15:37 -04:00
Arceveti
884cd68ed9 Loop changes + better scroll bounds 2023-04-30 19:05:46 -04:00
Arceveti
6db53fc31c Add gEnablePseudoinstructions 2023-04-30 18:52:58 -04:00
Arceveti
2ed18924a4 Add memory typedefs 2023-04-30 18:51:41 -04:00
Arceveti
1806cfee21 Fix disasm arrows appearing a frame late when switching page 2023-04-28 22:36:50 -04:00
Arceveti
b0ef240c80 Catch SP Break + code segment checks + some refactoring 2023-04-27 12:02:05 -04:00
Arceveti
700649737d Add size estimations to map data 2023-04-27 11:48:33 -04:00
Arceveti
e249c44530 Make number of map entries global + headless_dma cleanup 2023-04-27 11:42:36 -04:00
Arceveti
a925a4d4c5 Fix map data DMA overwriting some game code 2023-04-27 11:31:54 -04:00
Gregory Heskett
93b5832d8c Bugfix: Klepto holding transparent star doesn't spawn star (#622) 2023-04-20 20:40:25 -05:00
Gregory Heskett
6317475853 Bugfix (Kind of): Fix incorrect comments for the sound IDs defined in sounds.h (#609)
Not ultra important for decomp but otherwise makes binary hacking a massive pain when referencing sounds here
2023-04-19 17:03:49 -04:00
Gregory Heskett
7348ba8976 Clear all references to every object's oFloor each frame when using with dynamic collision (#616) 2023-04-19 17:00:26 -04:00
Arceveti
4ba1994913 Jump from stack trace selection 2023-04-19 14:50:37 -04:00
Arceveti
35203c2ca7 Use asm macros for asm functions 2023-04-19 14:39:52 -04:00
Arceveti
657527b000 Add ALIGNFLOOR macro 2023-04-19 14:35:33 -04:00
Arceveti
2a5a701d1f + ram viewer 2023-04-18 17:11:07 -04:00
Arceveti
222031b98c Optimizations 2023-04-18 17:09:58 -04:00
Arceveti
cb5e5663aa Stack trace improvements 2023-04-18 15:34:35 -04:00
Arceveti
3782fa6896 Fix FPCSR print 2023-04-18 15:32:40 -04:00
Arceveti
ca5c378878 Fix disasm commas + improve branch arrow spacing 2023-04-17 12:23:59 -04:00
Arceveti
68c2ad987a Fix map_parser 2023-04-16 20:28:01 -04:00
Arceveti
e84ce50d66 Use a single crashed thread pointer + combine some print functions + add crash_types.h 2023-04-16 20:25:30 -04:00
Arceveti
4abe16b641 Directly use global instead of arg for thread pointers in draw functions 2023-04-16 12:39:13 -04:00
Arceveti
8fb56aac6b Some refactoring + consistent global variable naming 2023-04-15 21:48:17 -04:00
Arceveti
937e3d6e1c Make crash_scren_print return number of chars instead of lines 2023-04-15 15:54:36 -04:00
Arceveti
f6ded6ce2d Move crash screen thread IDs up to 1000 2023-04-15 15:20:49 -04:00
Arceveti
e05fbec26b Remove crash screen crashed image 2023-04-15 14:38:43 -04:00
Arceveti
7d931468cc Fix NUM_CRASH_SCREEN_BUFFERS define 2023-04-15 14:24:36 -04:00
Arceveti
ee7ad98fea Infinitely recursive crash screens 2023-04-15 14:23:11 -04:00
Arceveti
beafe009b6 crash screen refactoring 2023-04-15 14:20:50 -04:00
Arceveti
e3345e5029 Reduce crash screen stack size 2023-04-15 14:05:01 -04:00
Arceveti
ae7f005ce7 Add CSDrawDarkRectDarken enum + some clenaup 2023-04-15 14:02:55 -04:00
Arceveti
f85dbda6fd Add init funcs + gCrashScreens array 2023-04-14 16:58:07 -04:00
Arceveti
5abe1938d6 Don't use unique encoding for crash screen font 2023-04-14 16:22:13 -04:00
Arceveti
1f171b13db more crash screen refactoring 2023-04-14 15:38:11 -04:00
Arceveti
17a245b5b7 More cleanup 2023-04-11 12:41:09 -04:00
Arceveti
2101259a87 More map_parser cleanup 2023-04-10 14:04:13 -04:00
Arceveti
e45c8311ee Fix build when KEEP_MARIO_HEAD is disabled 2023-04-10 10:02:59 -04:00
Arceveti
b8ef92f94e insn_disasm changes + add LI pseudoinstruction + fix MM crash 2023-04-10 09:59:56 -04:00
Arceveti
fb8ed57dad Add NEVER_INLINE + Add macros to cause specific exceptions 2023-04-10 09:55:46 -04:00
Arceveti
2be64da75c Add symbols for all .text sections to map_parser 2023-04-10 09:54:44 -04:00
Arceveti
d85cb9071e More pseudoinstructions + fix get_branch_target_from_addr crash 2023-04-07 21:43:24 -04:00
Arceveti
5ccf1e32dd Fix cop1_fmt_to_char 2023-04-07 19:27:20 -04:00
Arceveti
b35b9908de disasm fixes + pointer formatting changes 2023-04-07 19:08:00 -04:00
Arceveti
980f5f5376 Rewrite disasm insn checking and param formatting 2023-04-04 21:00:08 -04:00
Arceveti
3edeb7504f Async disasm branch arrow search + more refactoring 2023-03-31 16:33:48 -04:00
Arceveti
8bf457f117 split crash screen pages into separate files 2023-03-30 20:33:17 -04:00
Arceveti
a95e0c6a32 major print cleanup 2023-03-30 15:22:43 -04:00
Arceveti
7e9dbd845d crash_screen_print refactoring 2023-03-28 15:29:15 -04:00
Arceveti
6d7dd94ac5 crash_screen_print formatting 2023-03-28 13:32:00 -04:00
Arceveti
441a1e2a0c Crash screen changes + insn_disasm struct refactor 2023-03-27 18:40:05 -04:00
Arceveti
9e50c0a5c7 Fix build 2023-03-27 18:39:32 -04:00
Arceveti
e439d23672 crash screen print/draw changes 2023-03-27 18:34:53 -04:00
Arceveti
cbdf37df6d map_parser.c formatting 2023-03-27 18:33:59 -04:00
Arceveti
8cf89d8af0 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-03-27 18:27:31 -04:00
Arceveti
18d8c51e3d Prevent transition looping fix (#608) 2023-03-21 12:25:19 -04:00
Arceveti
dd74c24780 Fix sControlsDescriptions 2023-03-17 13:48:48 -04:00
Arceveti
16f1dc41b4 Merge branch 'develop/2.1.0' of https://github.com/Arceveti/HackerSM64 into develop/2.1.0-four-controllers-base 2023-03-17 12:20:28 -04:00
Arceveti
04c4fddbe8 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-03-17 12:16:39 -04:00
Arceveti
51fb2d9e93 Make only shells from boxes despawn + cleanup exclamation_box.inc.c (#604)
Fixes #583 and cleans up exclamation_box.inc.c so that it doesn't loop through the entire contents list
2023-03-17 12:07:04 -04:00
Arceveti
171f377412 Fix rooms and doors (#601)
* Fix rooms and doors

* Update object_helpers.c

* Update object_list_processor.h

* Update object_list_processor.c

* Fix formatting

* Revert a formatting

* Clean up geo_switch_area

* Clean up geo_switch_area (more)

* Move TransitionRoomData struct

* Revert star door collision check optimization

* Move load_object_collision_model and bhv_door_rendering_loop back out of star_door.inc.c

* Combine metal door model IDs

* Revert metal door sound fixes
2023-03-17 12:05:57 -04:00
Arceveti
f7bdca7533 Fix end cake screen crash & flickering (#606) 2023-03-17 12:03:58 -04:00
Gregory Heskett
851ba192f6 Add lightweight configuration settings to BETTER_REVERB (#602)
* Add light configuration settings to BETTER_REVERB

This can reduce runtime demand down to ~75% of the standard demand, at the cost of the configurability of generally more advanced parameters

* Reformat the BETTER_REVERB preset entries to be easier to look at

* :peterVOID:

* haha lol formatting change definitely related to reverb yes this isn't unwarranted at all lmao hehe hoho
2023-03-15 10:52:05 -04:00
thecozies
c09103d456 Invert skip room proc obj (#605)
* Invert functionality of obj room proc to be opt-in

* Fixed comment for enabling profiler
2023-03-15 10:49:07 -04:00
Fazana
17498e081d 2.1.0 Puppyprint Changes (#362)
* Puppyprint text size

* Update puppyprint.c

* Revert broken render_multi_image changes

* revert multi image tweak

parallel momento

* Update puppyprint debug colors to work with new hexadecimal system

* Puppyprint color reversion to currEnv + some bugfixes

* Remove a pointless color array

* Add forgotten comment

* i can type yes definitely

* Fix some puppyprint formatting edge cases

* Missed one last puppyprint edge case

* Additional strLen check

* Variable length fix + command ignoring strlen

* type changes

* Update puppyprint.c

* Box clamping

* Revamped profiling, fixed right alignment

* Update puppycam2.c

* Deferred printing

* Update puppyprint.c

* Fixed negatives being stupid

* Puppyprint Memory view rework

* Update level_script.c

* tweaks

* Fix new line spacing with different scales

also small bit of optimisation

* Spacing fixes

* Lightweight text option

* puppyprint debug now using light text where applicable

* Update puppyprint.c

* Update puppyprint.c

* level select menu

* merge profilers into one WIP

* Fully ascii compliant

* Finishing touches hopefully

* Update puppyprint.c

* new font

* vanilla font

* o

* Update hud.c

* last kerning fixes

* Requested changes

* requested changes

* fix the j

* requested changes

* change ur clothes

* Update surface_collision.c

* requested changes

* Update puppyprint.h

* Update camera.c

* .

* Update puppyprint.c

* Update puppyprint.c

* Update puppyprint.c

* fix J

* font

* font system rework

* ia4 outline font

* pain

* fix deferred printing

* fix format change

* Add audio profiling to Puppyprint Debug

* Optimize audio profiling substantially

* Minor audio optimizations

* requested changes

* oops accidentally commited 6 lmfao

* Update game_init.c

* Update puppyprint.c

* Update puppyprint.c

* Improve Puppyprint deferred prints

This is safer, more readable, and more runtime efficient all in the same package

* change return type

* fix building with profiler only

* Update profiling.c

* fix upscaled texture rectangles from multi image

---------

Co-authored-by: gheskett <gheskett@gmail.com>
2023-03-12 12:29:08 -04:00
Fazana
f85b0c6946 I think github are gonna give me badges for all these PR's (#597)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo

* Update segment2.c

* Update model.inc.c
2023-03-10 10:20:55 -05:00
Fazana
a3eaccedd4 Frustratio funny fix part 3 (#596)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo

* Update segment2.c
2023-03-10 10:04:01 -05:00
Fazana
ef38abb1c0 Frustratio funny fix 2 (#593)
* Update game_init.c

* fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo fuck you nintendo
2023-03-09 22:39:26 -05:00
Arceveti
97f7e78175 Fix gControllers 2023-03-09 16:06:53 -05:00
Arceveti
397e687a6c Add MAX_NUM_PLAYERS 2023-03-09 16:02:48 -05:00
Arceveti
169e9cff2e Support using 4 controllers at once 2023-03-09 14:29:25 -05:00
Fazana
c76c5824e3 Update game_init.c (#592) 2023-03-08 14:34:43 +00:00
Arceveti
4a68be5bed Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-03-07 13:48:56 -05:00
Gregory Heskett
81e1cb38da Bugfix: Fix reference to missing function (#589) 2023-03-07 00:32:19 -05:00
someone2639
8d8812ab1b Fix builds on Make 4.4 (#588)
* Fix builds on Make 4.4

* oops

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2023-03-06 23:19:15 -05:00
Gregory Heskett
4c67e48456 Add define for wiping save data if existing save data from vanilla or another hack exists (#579) 2023-03-06 20:53:08 -05:00
axollyon
be753ae220 Small improvements to object loading within rooms (#580)
* Small improvements to object loading within rooms
* Only check if Mario is in the same room as the object once
* Implement object render distance within rooms (from thecozies)

* Remove sLevelsWithRooms (also from thecozies)
Honestly surprised this wasn't already in Hacker

* Remove comment for sLevelsWithRooms in config_game

* Make compatible with the painting objects PR
Move room detection to get_room_at_pos (from Arceveti)

* address enum comment
2023-03-06 20:49:39 -05:00
Arceveti
36751d85be Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-02-10 21:48:00 -05:00
Arceveti
337dac828f Update macros.h + allow ALIGN macros to be used anywhere (#574)
* Update macros.h + allow ALIGN macros to be used anywhere

* Fix wrong alignment in synthesis_sh.c

* Revert bitmask in VIRTUAL_TO_PHYSICAL macro
2023-01-31 15:50:19 -05:00
Gregory Heskett
1fadb78632 Prevent UB that can happen when using more than 64 total soundbanks (#575) 2023-01-29 14:29:39 -05:00
Arceveti
5962e27b86 formatting changes :) 2023-01-26 18:43:22 -05:00
Arceveti
21df519211 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-01-26 12:48:16 -05:00
Gregory Heskett
52a7aedaf4 Replace debug libultra builds with their ido counterparts (#572)
* Replace debug libultra builds with their ido counterparts

This is necessary because GameCube controllers apparently rely on the IDO build, also the release build is IDO anyway

* Remove fallthrough warnings from usb/debug.c

* remove need for debug libultra with unf and use lib define in ld

Co-authored-by: thecozies <collinpferguson@gmail.com>
2023-01-26 09:03:07 -06:00
Arceveti
d7d7b9058a Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2023-01-26 02:58:26 -05:00
Gregory Heskett
7fdb5af8fd Add support for preset options to be used with BETTER_REVERB (#508)
* Bugfix: BETTER_REVERB starts before buffers are ready

* Add support for preset options to be used with BETTER_REVERB

* Some BETTER_REVERB cleanup

* The funny whoops

* Address suggested level script change

* Bugfix: useReverb crashes when disabled

* Allow window size override for vanilla-esque BETTER_REVERB presets

* Remove unnecessary downsampling limit check

* Fix up a few things + some slight reformatting

* Add light documentation to the BETTER_REVERB parameters

* Adjust BETTER_REVERB preset types to make more sense

* Reset BETTER_REVERB data buffer to be unallocated when not in use

* Properly disable BETTER_REVERB when disabling all reverb processing

* Remove an unnecessary BETTER_REVERB ifdef

* Remove D_80332108

* Revise BETTER_REVERB config description
2023-01-24 09:22:49 -05:00
Gregory Heskett
d702f188c6 Bugfix: Stack sizes moved to main.h (#573)
Crash screen does not enjoy importing buffers/buffers.h
2023-01-24 09:19:53 -05:00
Fazana
35dffd9b4e Random epic tweaks (#568)
* various tweaks to tackle redundancy

* Update collision.inc.c

* inline the function

* fix surface denorms

* oops forgot to remove a comment that I just proved false lol

* stack asserts

* Update main.c

* Update main.c

* fix bug plural s

* Update main.c

* comment
2023-01-24 02:13:49 +00:00
Gregory Heskett
dc71aef024 Vibrato optimizations (#530)
Optimize vibrato to even exceed vanilla's implementation, all without restricting usability from the current implementation. This should save up to about 1ms of audio runtime.
2023-01-20 17:45:53 -05:00
Gregory Heskett
65d29dc337 Increase max number of concurrent layers and channels (#527)
At worst, this eats up a few KB of memory. Runtime difference should be negligible when the extra data is not being used.
2023-01-20 10:31:30 -05:00
Reonu
683ac0b2bf Added (emu-only) RCVI hack. (#425)
* Added emu-only RCVI hack

* newline moment

* Changed the value to *20

hi arthur

* RCVI hack compiler warning

* Revise BETTER_REVERB comments to better reflect RCVI hack's existence

* Fix potentially confusing comment

* More BETTER_REVERB typos :peterVOID:

* Address requested PR changes for RCVI Hack

Co-authored-by: gheskett <gheskett@gmail.com>
2023-01-20 09:36:19 -05:00
arthurtilly
818da65ae6 Fix huge stack allocation in surface loading functions (#569) 2023-01-20 01:06:06 -05:00
Arceveti
7551748a35 Remove GRAPH_NODE_TYPE_FUNCTIONAL define & restore functionality using an alternative method. (#557)
Fixes Mirror Mario and similar things.
2023-01-20 00:59:18 -05:00
Arceveti
9d8ab7f783 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-12-13 19:32:09 -05:00
Arceveti
b8e442b44c Use GCC extensions for some arrays 2022-12-13 19:32:03 -05:00
someone2639
9bec16d2f0 rendering_graph_node layer table updated with gcc extensions for legibility (#467)
* rendering_graph_node layer table updated with gcc extensions for legibility

* side effect removed

Co-authored-by: someone2639 <someone2639@gmail.com>
2022-12-13 15:55:31 -05:00
Arceveti
8fcbeee377 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-12-12 15:12:42 -05:00
Arceveti
8043823cce Merge master/2.0.8 into 2.1.0 (#551)
* Imminent fixes for bugs found on master branch (#512)

* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

* Update version to 2.0.4 (#515)

* HackerSM64 2.0.5 (#517)

* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Update VERSION.txt (#534)

* HackerSM64 2.0.6 (#539)

* revert random_u16 to be a u16 (#538)

* Added safety gcc math flags (#537)

* removed useless compilation flags that could cause performance loss

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>

* Update VERSION.txt

HackerSM64 2.0.6

* Add GCC opt flag to suppress warnings

* v2.0.7

* 2.0.8 (fix more compiler warnings) (#543)

* fix Waddress in mario_step.c

* fix Winfinite-recursion in unused dynlist_proc function

* in fact remove the offending function entirely

* fix warnings in RNC decompress functions

* update version

* fix version in VERSION.txt

premature on my part, will update it to 2.0.10 next time

Co-authored-by: someone2639 <someone2639@gmail.com>

Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: axollyon <20480418+axollyon@users.noreply.github.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: someone2639 <someone2639@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
2022-12-12 14:40:55 -05:00
Arceveti
fc78712e07 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-12-10 15:33:35 -05:00
Arceveti
f04a3ab624 Make JRB mist and DDD objects act-specific. (#393)
* Add JRB_ACT_SPECIFIC_MIST and DDD_ACT_SPECIFIC_OBJECTS

* Disable the act-specific defines by default

* Make act-specific objects/mist non-optional

* Update JRB mist comment

* Act-specific whirlpools + fix act 6 objects

* Initialize gCurrActNum + revert formatting change

* Use -1 for ALL_ACTS

* Revert ALL_ACTS line
2022-12-10 15:25:53 -05:00
Arceveti
2b43a72cc4 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-12-10 00:48:32 -05:00
Gregory Heskett
d028d6ea7d Bugfix: Save & Quit crashes game (#548) 2022-12-08 10:41:50 -05:00
someone2639
7ef2077353 2.0.8 (fix more compiler warnings) (#543)
* fix Waddress in mario_step.c

* fix Winfinite-recursion in unused dynlist_proc function

* in fact remove the offending function entirely

* fix warnings in RNC decompress functions

* update version

* fix version in VERSION.txt

premature on my part, will update it to 2.0.10 next time

Co-authored-by: someone2639 <someone2639@gmail.com>
2022-12-06 21:41:55 +01:00
Arceveti
44cc20df2e Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-12-06 15:16:56 -05:00
Arceveti
66a8f1bd1c Use ARRAY_COUNT for sFpcsrDesc loop in crash_screen_print_fpcsr 2022-12-06 15:16:49 -05:00
Reonu
22b3c9ba08 Fix 100 coin stars spawning inside ceilings + being able to spawn multiple 100 coin stars (#541)
* Going below 100 coins and getting 100 coins again will no longer result in multiple 100 coin stars spawning

* 100 coin stars can no longer clip into ceilings

* Renamed set_home_to_mario to spawned_star_set_target_above_mario since it's a more descriptive name of what it does
2022-12-06 18:44:16 +01:00
Reonu
a15db3c56b 2.0.7 (fix compiler warnings) (#542)
2.0.7
2022-12-05 16:28:01 +01:00
thecozies
e87dfa74d8 v2.0.7 2022-12-05 08:39:28 -06:00
thecozies
e3e1aa02ac Add GCC opt flag to suppress warnings 2022-12-05 08:38:41 -06:00
axollyon
d3d2bb9247 Update VERSION.txt
HackerSM64 2.0.6
2022-12-04 11:50:20 +01:00
Gregory Heskett
dc1a824ce9 HackerSM64 2.0.6 (#539)
* revert random_u16 to be a u16 (#538)

* Added safety gcc math flags (#537)

* removed useless compilation flags that could cause performance loss

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>
2022-12-04 23:05:59 +13:00
Arceveti
2c42334034 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-11-28 15:16:34 -05:00
Arceveti
1098ea95ea Merge master/2.0.5 into 2.1.0 (#536)
* Imminent fixes for bugs found on master branch (#512)

* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

* Update version to 2.0.4 (#515)

* HackerSM64 2.0.5 (#517)

* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Update VERSION.txt (#534)

Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: axollyon <20480418+axollyon@users.noreply.github.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
2022-11-28 15:06:34 -05:00
axollyon
efd4e3f9dc Update VERSION.txt (#534) 2022-11-24 02:46:09 +01:00
Gregory Heskett
b1146308a7 HackerSM64 2.0.5 (#517)
* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
2022-11-24 09:57:44 +13:00
Arceveti
ed4c509b7e Fix alert_rcp_hung_up error 2022-11-08 15:58:08 -08:00
Reonu
86841a3385 Add super slippery surface type (#422)
* Added super slippery surface·

* fix requested changes

* add comment for forcing mario to belly slide

* hi arthur

* society

* adress nitpick

Co-authored-by: aglab2 <aglab3@gmail.com>
2022-11-08 17:08:45 +01:00
Arceveti
3dfb0b3c36 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-11-07 18:58:30 -08:00
Arceveti
81359dcb99 Add 'SET_CRASH_ADDR' and 'FORCE_CRASH_AT_ADDR' 2022-11-03 04:03:36 -07:00
Gregory Heskett
12b91fe73c Disable DISABLE_ALL (#528)
Because literally who is gonna make a hack without ever using any debug features?
2022-11-03 08:54:04 +01:00
Gregory Heskett
a42bd9bc2e Implemented native Gamecube controller support and corresponding emulator hint in ROM header (#505)
* Implemented native Gamecube controller support and corresponding emulator hint in ROM header

* Added X and Y buttons to VALID_BUTTONS in sm64.h

* Added workaround in controller type detection for mupen bug

* read GC controllers from port 2

* L to Z logic for GC controller uses a threshold

* Changed threshold for L trig to around 33%

Changed threshold based on feedback

* Added gGamecubeControllerPort

* fixed wrong check

* Bugfix: Game crashes when less than 2 controllers are connected

* Suppress compiler warnings

* Bugfix: button swapping still takes place on non-GC controllers

* Wrap port 2 stuff in console check

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* GC console check

* Funny emulator crash moment

* block comment moment

* Added centering for the gamecube controller, support reset command (#511)

* Added centering for the gamecube controller, support reset command

* Use struct 'ControllerCenters' for 'gGamecubeControllerCenters'

* Store gamecube controller centers per controller

* Clamp GC controller stick values to s8

* the

formatting changes

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: Denis Kopyrin <aglab3@gmail.com>
2022-11-03 08:52:19 +01:00
Reonu
a784c180a8 Wrap boulder room check under vanilla specific level checks (#521) 2022-11-03 00:36:59 +01:00
Gregory Heskett
987f76190f Bugfix: RCP has gone loud because SOMEONE didn't look at their compiler output (#526) 2022-11-03 12:35:04 +13:00
Reonu
088dbbdd2b Make warp surfaces use the force parameter if set (#525) 2022-11-03 00:25:24 +01:00
arthurtilly
ab94fd7f63 Make objects not run their code if the room they are in isn't loaded. (#502) 2022-11-03 11:35:47 +13:00
Gregory Heskett
d7d0364682 Add define to disable pitch shifting of Mario sound effects (#522)
* Add define to disable pitch shifting of Mario sound effects

* Point new voice sequence macros to existing ones

* Remove pitch shifting sequence macros from peach sounds
2022-11-02 17:24:39 -05:00
Reonu
38d3c82860 Merge pull request #469 from someone2639/rcp_hung
add scheduler entry for when RCP locks up (addresses #344)
2022-11-02 20:14:48 +01:00
axollyon
b8e22f2fbd Update version to 2.0.4 (#515) 2022-10-27 01:17:08 -04:00
arthurtilly
1a71619f47 Imminent fixes for bugs found on master branch (#512)
* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR
2022-10-26 19:12:29 +13:00
Denis Kopyrin
a7a637eb10 Disable cache emulation checks for VC (#509)
* Disable cache emulation checks for VC

* Get rid of unnecessary gIsVC initialization
2022-10-19 20:57:53 -05:00
Gregory Heskett
fc6a6055d9 Bugfix: WF stationary platforms given static collision despite being able to delete themselves (#510)
Resulted in a memory leak and stale object referencing that impacted Mario's positioning
2022-10-19 12:38:58 -04:00
Arceveti
c1011eea4e move funny crash sound to its own function 2022-10-07 16:29:10 -07:00
Arceveti
9a0e519fd5 do while 0 for color copy and FORCE_CRASH macros 2022-10-07 16:00:01 -07:00
Gregory Heskett
6291c77a18 Convert oBehParams to be unsigned, and fix GLOBAL_STAR_IDS to support more than 128 stars (#503) 2022-10-04 22:56:10 -05:00
Arceveti
68cd80d86e Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-10-04 12:40:54 -07:00
Gregory Heskett
68f09d34ea Bugfix: Reset mario's room when switching areas (#504)
Mario's room sometimes is not reset when warping between different areas, generally when warping from one area with rooms to another without them. This can cause things like doors to not render properly.
2022-10-03 18:06:53 -05:00
Arceveti
aa5f9e28b7 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-09-30 16:46:03 -07:00
Arceveti
806ff241bd Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-09-29 15:06:00 -07:00
Arceveti
05bcbe79e3 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-09-28 21:11:53 -07:00
Arceveti
dffb09ff97 Fix asserts 2022-09-28 21:11:03 -07:00
Arceveti
8be4e566a4 Small formatting fix in colors.h 2022-09-28 13:31:24 -07:00
Arceveti
459026cd66 Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-09-28 13:29:29 -07:00
someone2639
4ae3a431bc Use the error macro for rcp hang 2022-09-21 20:36:39 -04:00
Arceveti
61fd664e8a Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-08-15 23:22:37 -07:00
Arceveti
c7eb78760f Improve macro order 2022-08-15 23:21:40 -07:00
Arceveti
d4edb36154 Make the middle part of the lowercase "z" diagonal in crash screen font 2022-08-07 01:34:07 -07:00
Arceveti
e7b7dfcd00 Disasm shows binary values when sShowRamAsAscii is on 2022-08-07 01:32:53 -07:00
Arceveti
fbc01c9dae insn_disasm formatting improvements 2022-08-07 01:32:02 -07:00
Arceveti
b983ac4091 insn_db alignment 2022-08-06 17:25:57 -07:00
Arceveti
470ea3c253 Use color macros in draw_crashed_image_i4 2022-08-06 17:15:00 -07:00
Arceveti
d325a3695f Fix address select wrapping + add IS_IN_RAM, GET_HEX_DIGIT, SET_HEX_DIGIT macros 2022-08-06 00:36:38 -07:00
Arceveti
c779bf3cf1 Add precise crash screen cursor controls 2022-08-05 20:56:50 -07:00
Arceveti
9f412b4a9c crash_screen_print optimization 2022-08-05 20:55:17 -07:00
Arceveti
3a65319b1c Add DISASM_INCLUDE_ALL_INSTRUCTIONS 2022-08-05 12:30:44 -07:00
Arceveti
6d431c7d50 Fix function name consistency + Show selected instruction's branch arrow when INCLUDE_DEBUG_MAP is disabled 2022-08-05 11:49:56 -07:00
Arceveti
3108c530a5 Fix build warnings/errors when INCLUDE_DEBUG_MAP is disabled 2022-08-05 11:17:01 -07:00
Arceveti
8efb50b881 Move some macros to proper header files 2022-08-04 23:39:27 -07:00
Arceveti
0f5aa4754f Rewrite crash screen text formatting system + split crash screen draw & print functions into separate files 2022-08-04 23:33:51 -07:00
Arceveti
71e4b2b6ee Add char macros 2022-08-04 15:52:44 -07:00
Arceveti
8a62662e59 Add localized horizontal function name scrolling for large function names 2022-08-04 15:51:09 -07:00
Arceveti
bba0774fcc formatting 2022-08-04 15:45:14 -07:00
Arceveti
57b6b1ee87 Fix broken coverage on crash screen game screenshot + close controls box when crash screen is not drawn 2022-08-03 23:28:04 -07:00
Arceveti
d4bb8a8713 Allow switching pages when controls box is open 2022-08-03 17:56:19 -07:00
Arceveti
be9578122e Merge branch 'develop/2.1.0' of https://github.com/Reonu/HackerSM64 into develop/2.1.0-new-crash-screen 2022-08-03 17:43:52 -07:00
Arceveti
c5489aa73f Add controls popup for individual pages 2022-08-03 16:59:29 -07:00
Arceveti
cac14fded0 Use Z to cycle between drawing crash screen & background instead of using both Z and START 2022-08-03 14:51:34 -07:00
Arceveti
d78ca2e28a Merge ADDR_IS_KNOWN macro into is_in_code_segment + add PARAM_SDT 2022-08-03 14:49:43 -07:00
Arceveti
a2510e8b95 Rename fields in MapEntry struct 2022-08-03 13:50:05 -07:00
Arceveti
5e2374772e Add ADDR_IS_KNOWN macro 2022-08-03 13:15:19 -07:00
Arceveti
786e605b6a Small crash_screen_fill_branch_buffer optimization 2022-08-03 01:19:54 -07:00
Arceveti
6a11d8c014 Jump to address target defaults to branch/jump target of selected line 2022-08-03 00:45:18 -07:00
Arceveti
52a5d81e95 Disasm instruction descriptions 2022-08-02 20:44:48 -07:00
Arceveti
48dd449804 Rename static crash screen arrays with 's' prefix 2022-08-02 20:44:02 -07:00
Arceveti
8b7c8149b9 Press B to close address selection box 2022-08-02 01:03:36 -07:00
Arceveti
a6077a8c6d Add selection cursor to RAM viewer and disasm pages of the crash screen 2022-08-01 22:22:06 -07:00
Arceveti
765261df53 Rename 'sHideCrashScreen' to 'sDrawBackground' 2022-08-01 19:38:37 -07:00
Arceveti
76215ff60f static const crash screen font 2022-08-01 18:23:40 -07:00
Arceveti
fec9b171c1 Add get_insn_type 2022-08-01 15:43:17 -07:00
Arceveti
77392653d7 Improve insn_db ordering + rename 'is_branch' to 'get_branch_offset' + document registerMaps + formatting 2022-08-01 15:41:05 -07:00
Arceveti
0d06f83a97 Combine parse_map and parse_map_return 2022-08-01 13:56:19 -07:00
Arceveti
a4eafb3f07 Add 'sDisasmColors' 2022-08-01 11:39:26 -07:00
Arceveti
4d55eb65f8 Highlight pc in ram viewer 2022-07-31 22:54:40 -07:00
Arceveti
d2a7994ae0 Rename 'sAddressSelect' to 'sAddressSelectTarget' 2022-07-31 21:57:49 -07:00
Arceveti
9a307bd8ec Reduce disasm arrow line overlap 2022-07-31 21:54:56 -07:00
Arceveti
ec57b5b0c0 Fix disasm arrows disappearing when partially off screen (again) 2022-07-31 21:26:50 -07:00
Arceveti
650ddbadb1 Fix stacktrace + includes 2022-07-31 20:52:23 -07:00
Arceveti
c410f227b5 unsigned char glyph 2022-07-31 17:46:07 -07:00
Arceveti
677dfa1c60 Add crash_screen.h, insn_disasm.h, and map_parser.h 2022-07-31 16:53:59 -07:00
Arceveti
12b46e9674 Add disasm branch arrow buffer 2022-07-31 15:19:07 -07:00
Arceveti
043cf0cb9c Signed branch offsets use '+' for positive values 2022-07-31 15:09:01 -07:00
Arceveti
3d7bf5530e Fix downward branch arrows disappearing when offscreen in disasm 2022-07-31 13:47:13 -07:00
Arceveti
6b62aa7fd3 Display disasm branch arrows for the entire function 2022-07-31 03:17:26 -07:00
Arceveti
f7504f8ef3 Add crash_screen_draw_horizontal_triangle 2022-07-31 02:06:28 -07:00
Arceveti
3b083e1cd3 Move crash screen to its own folder 2022-07-31 01:14:33 -07:00
Arceveti
18d30203c5 Formatting consistency + fix color array + re-add not generated instructions as comments 2022-07-30 23:15:43 -07:00
arthurtilly
d1f1d92fa6 add back instructions i fucked up 2022-07-31 18:04:14 +12:00
arthurtilly
ec723239fd Do funny merge 2022-07-31 17:47:41 +12:00
arthurtilly
d833e56e6c add branch arrows to disasm 2022-07-31 17:30:58 +12:00
Arceveti
a441e82187 Fix color_presets.h 2022-07-30 22:09:16 -07:00
Arceveti
2d330c6450 Rename 'arbitraryParam' to 'paramType' 2022-07-30 22:08:09 -07:00
Arceveti
2106504422 Add parse_map_exact + show current function in disasm + comment out mips instructions that don't generate + toggle ascii on disasm 2022-07-30 17:29:18 -07:00
arthurtilly
b667148867 fix offset bug and prevent branch instructions from trying to get a function name 2022-07-31 10:52:44 +12:00
Arceveti
3470182152 Update insn_disasm + add remaining MIPS III instructions 2022-07-30 03:06:08 -07:00
Arceveti
864f2d24dc Fix typo in color name 2022-07-29 21:56:22 -07:00
Arceveti
95e446b558 Update crash screen font 2022-07-29 16:12:38 -07:00
Arceveti
0fe2a5aef0 CRASH_SCREEN_CRASH_SCREEN does not require make clean 2022-07-29 16:10:01 -07:00
Arceveti
502cc8e7da Replace MAP_PARSER_ADDRESS checks with INCLUDE_DEBUG_MAP ifdefs 2022-07-29 16:04:41 -07:00
Arceveti
6722916458 Add sCrashScreenWordWrap 2022-07-29 03:10:49 -07:00
Arceveti
6a398d1932 Crash screen formatting/refactoring 2022-07-29 02:49:12 -07:00
Arceveti
35d58fb9dd document some controls + rename text parsing funcs 2022-07-28 22:29:36 -07:00
Arceveti
ce87512ffe Triple buffer crash screen 2022-07-28 18:29:27 -07:00
Arceveti
4949cf93b3 Rename 'sDrawFrameBuffer' to 'sHideCrashScreen' 2022-07-28 16:33:51 -07:00
Arceveti
eff5e606e6 Improve macros.h ordering 2022-07-27 21:29:07 -07:00
Arceveti
d46a40b2e5 Use bcopy for framebuffer copy 2022-07-27 21:24:24 -07:00
Arceveti
11302f103c Add crash_screen_draw_dark_rect for crash screen background 2022-07-27 16:06:58 -07:00
Arceveti
6e38226afc Optimize copy_framebuffer 2022-07-27 16:03:07 -07:00
Arceveti
91cf3eb5df Use color format constant defines in rgba16_blend + remove lerp_u16 from colors.c 2022-07-27 15:19:31 -07:00
Arceveti
cd8d02c3df Crash screen optimizations + formatting 2022-07-27 02:52:44 -07:00
Arceveti
357090674f Add crash_screen_draw_line + log page name 2022-07-26 22:01:04 -07:00
Arceveti
5b21951af6 Make crash screen draw functions use RGBA32 2022-07-26 20:50:49 -07:00
Arceveti
893cca4b09 Update color_presets.h + use color presets for all crash screen colors + some formatting 2022-07-26 20:37:03 -07:00
someone2639
93fd414035 add scheduler entry for when RCP locks up 2022-07-26 20:56:17 -04:00
Arceveti
1d0a56bbbd Add address jump to disasm page + page name colors 2022-07-26 13:59:48 -07:00
Arceveti
c2c9ed09b1 Add proper color blending to crash screen 2022-07-26 02:16:34 -07:00
Arceveti
58b363ab34 Allow carriage returns to work as newlines 2022-07-25 19:36:44 -07:00
Arceveti
fd78707fe2 Fix crash screen crashing when switching pages while scrolling 2022-07-25 17:56:10 -07:00
Arceveti
40ab0f2175 Actually fix crash screen text wrap 2022-07-25 17:50:26 -07:00
Arceveti
f7777d5e47 Increase width of the base of the '1' in crash screen font 2022-07-25 17:40:21 -07:00
Arceveti
94f3e196bd Fix crash screen word wrap + use proper data types in crash screen related files 2022-07-25 17:38:45 -07:00
Arceveti
42c4ec2b40 Add text wrapping to crash screen 2022-07-25 15:41:59 -07:00
Arceveti
380bff4d1a Add new crash screen to readme credits 2022-07-24 22:39:59 -07:00
Arceveti
17ae3304f1 Make newlines work in crash_screen_print + default to assert page if the crash was caused by an assert 2022-07-24 22:38:01 -07:00
Arceveti
068f6ceb18 Add working assert macros ASSERT and DEBUG_ASSERT 2022-07-24 22:36:37 -07:00
Arceveti
b84367b526 Move crash screen page checks to update_crash_screen_page 2022-07-24 02:14:45 -07:00
Arceveti
848b97794f Improve crash screen RAM viewer address selection box 2022-07-24 02:05:01 -07:00
Arceveti
ac2fee17e2 Fix crash screen font image 2022-07-24 01:43:04 -07:00
Arceveti
5f25a73928 Add extended ASCII characters to crash screen font 2022-07-24 01:29:24 -07:00
Arceveti
3ef7c6d15e Add escape for '@' in crash_screen_print 2022-07-24 00:52:55 -07:00
Arceveti
7f178a4aaa Add diagonal line to zero in crash screen font 2022-07-24 00:42:04 -07:00
Arceveti
e1abc9106b Add RAM viewer to crash screen + Improve crash screen input handling 2022-07-23 23:29:54 -07:00
Arceveti
a2c73f4a8a Increase base width of '1' in crash screen font 2022-07-18 21:04:49 -07:00
Arceveti
6eb6f78a2a Update crash screen 2022-07-17 21:42:02 -07:00
657 changed files with 55625 additions and 22641 deletions

7
.gitignore vendored
View File

@@ -38,6 +38,9 @@
# datadump
/tools/ddump/*
# python cache in tools/
/tools/__pycache__/*
# Text editor remnants
*.swp
.vscode/*
@@ -1351,7 +1354,6 @@ textures/cave/hmc_textures.0A000.rgba16.png
textures/cave/hmc_textures.0A800.rgba16.png
textures/cave/hmc_textures.0B800.ia16.png
textures/cave/hmc_textures.0C000.ia16.png
textures/crash_screen/crash_screen_font.ia1.png
textures/effect/bubble.06048.rgba16.png
textures/effect/flower.00008.rgba16.png
textures/effect/flower.00808.rgba16.png
@@ -2146,3 +2148,6 @@ lib/libs2d_engine.a
# :Zone_Identifier files
*Zone.Identifier
# user-specific config file
include/config/config_local.h

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "lib/libpl"]
path = lib/libpl
url = https://gitlab.com/parallel-launcher/libpl.git

View File

@@ -26,12 +26,14 @@
"VERSION_US=1",
"F3DEX_GBI_2=1",
"F3DZEX_NON_GBI_2=1",
"F3DEX_GBI_SHARED=1"
"F3DEX_GBI_SHARED=1",
"LIBPL=1",
"UNF=1"
],
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-x64"
"intelliSenseMode": "linux-gcc-x86"
}
],
"version": 4

View File

@@ -2,9 +2,7 @@
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in the repo.
* @Reonu
* @thecozies
* @gheskett
* @Reonu @gheskett @arthurtilly
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners

View File

@@ -1,17 +1,18 @@
FROM ubuntu:18.04 as build
FROM ubuntu:22.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
bsdmainutils \
bsdextrautils \
build-essential \
gcc-mips-linux-gnu \
libcapstone-dev \
pkgconf \
python3
RUN mkdir /sm64
WORKDIR /sm64
ENV PATH="/sm64/tools:${PATH}"
RUN mkdir /hackersm64
WORKDIR /hackersm64
ENV PATH="/hackersm64/tools:${PATH}"
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=us -j4\n' \
'see https://github.com/n64decomp/sm64/blob/master/README.md for advanced usage'
CMD echo 'Usage: docker run --rm -v ${PWD}:/hackersm64 hackersm64 make VERSION=us -j4\n' \
'See https://github.com/HackerN64/HackerSM64/blob/master/README.md for more information'

259
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,8 @@ ACTOR_GROUPS := \
LEVEL_FILES := $(addsuffix leveldata,$(LEVEL_DIRS))
LEVEL_ELF_FILES := $(foreach level_dir,$(LEVEL_DIRS),$(BUILD_DIR)/levels/$(level_dir)leveldata.elf)
SEG_FILES := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.elf) \
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.elf) \
@@ -241,9 +243,11 @@ $(BUILD_DIR)/bin/machine.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000
# EU segment 19 translations
$(BUILD_DIR)/bin/eu/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_jp.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/translation_es.elf: SEGMENT_ADDRESS := 0x19000000
# --------------------------------------
# Skybox Rules
@@ -260,11 +264,11 @@ $(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000
# --------------------------------------
# intro and ipl3 textures are not compressed
INTRO_RAW_FILES := $(wildcard $(TEXTURE_DIR)/intro_raw/*.png)
INTRO_RAW_FILES := $(wildcard $(TEXTURE_DIR)/intro_raw/*.png)
$(BUILD_DIR)/src/goddard/renderer.o: $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(INTRO_RAW_FILES)))
IPL3_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/ipl3_raw/*.png)
IPL3_RAW_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%,$(IPL3_TEXTURE_FILES)))
CRASH_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/crash_custom/*.png)
CRASH_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/crash_screen/*.png)
CRASH_TEXTURE_C_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(CRASH_TEXTURE_FILES)))

View File

@@ -14,28 +14,28 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **ArcticJaguar725**: Most audio configuration and layout changes, colored ia4 text, floombas, various bugfixes, and more
- **CowQuack**: Adjustable skybox sizes, area-specific skybox function
- **thecozies**: Water surface types, general maintenance, and time
- **MrComit**: General use object defines, JUMP_KICK_FIX, LEDGE_GRABS_CHECK_SLOPE_ANGLE
- **MrComit**: General use object defines, JUMP_KICK_FIX
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: Platform Displacement 2
- **Arthurtilly**: ASCII / UTF-8 support, Multilang, Platform Displacement 2
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
- **Reonu**: Starting the project + widescreen, reonucam, various defines for hacker QoL, and a custom Spanish (Spain) translation of the game.
- **JoshDuMan**: Decomp guy, general assistance
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter
- **Arceveti**: Naming unknown symbols, new crash screen, silhouette, shadow optimizations, breath meter, 4 controller support, implementations of rounded corners, slope fix, exposed ceiling fix, other bugfixes
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimisations, instant input patch, cake screen fix, segmented code support, and various optimizations/fixes
- **Kaze**: Graph node optimisations, automatic optimal collision distance
- **Pyro Jay**: Texture improvements, repo banner art, some QoL stuff
- **CrashOveride**: creating the [ultrasm64](https://github.com/CrashOveride95/ultrasm64) repo
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds, emulator detector
- **anonymous_moose**: porting falco's extended bounds to decomp
- **tuxlovesyou**: `LOAD_MIO0_TEXTURE` macro and moral support
- **devwizard**: the PJ64 pre-v3.0 detection part of the emulator detector
Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
**Lighting Engine by Wiseguy**
- Lighting Engine is available on a separate branch ([base/lighting-engine](https://github.com/Reonu/HackerSM64/tree/base/lighting-engine)). Instructions on how to use it are in the readme of that branch.
- Alternatively, the main repo has `Puppylights` available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at `puppylights.c` to find out how to use it.
**Puppycam**
- Puppycam is available on the master branch now, you can toggle it in `config/config_camera.h`. *
@@ -61,7 +61,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Toggle to disable fall damage and the fall damage sound *
- Nonstop stars *
- Removed course-specific camera processing *
- You can increase the number of frames that you have to perform a firsty *
- Ability to set Mario's movement speed when hanging from a ceiling *
- Tighter hanging controls (Mario will face the direction of the analog stick directly while hanging from a ceiling) *
- reonucam3: custom camera by Reonu. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
@@ -83,14 +82,14 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Many general use defines for object struct members, meant for use in custom object behaviors. Check `include/object_fields.h` for more info on this. (By MrComit)
- Included `actors/group0.c` in `behavior_data.c`
- The internal ROM name is now set with a define in `config/config_rom.h` to make it simpler
- There is a `gIsConsole` variable that is 1 when running on console and 0 when running on emulator. This way you can wrap your code in a console check.
- There is a `gEmulator` variable to detect console or specific emulators and emulator versions
- Expanded audio heap allows for a larger concurrent note count and the importing of more m64 sequences and sound banks (By ArcticJaguar725) *
- You can set a test level in `config/config_debug.h` in order to boot straight into it, so you can quickly test the level you're working on. *
- Allow all surfaces in the game to have a `force` parameter. Activating this doesn't REQUIRE you to set `force` for every surface: If you don't set, it will default to 0x0000 rather than crashing. Increases RAM usage of collision. *
- The clown font includes the entire English alphabet.
- Colored ia4 text support. Format: `"@XXXXXXXX[YOUR TEXT]@--------"` (By ArcticJaguar725)
- Example Text: `"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"`
- NOTE: It is not mandatory to reset the text color with `"@--------"`, but text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset.
- Colored ia4 text support. Format: `"@XXXXXX[YOUR TEXT]@--------"` (By Arthurtilly)
- Example Text: `"@FF0000RED @00FF00GREEN @0000FFBLUE @FFFFFFWHITE"`
- NOTE: Text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset. The text will use gDialogTextAlpha as the alpha value when changing the color.
- Toggle visiblity of collision surfaces and object hitboxes with Visual Surface Debug. `config/config_debug.h` has VISUAL_DEBUG which can be turned on to enable this feature.
- Workaround for infinite death loops caused by using the wrong warp type for death warps. Mario's HP will be restored when being warped to any warp if (and only if) he was warped while dead. *
@@ -106,7 +105,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
**Neat Misc. Changes:**
- Instant Input patch by Wiseguy (Removes all input lag caused by plugins supporting framebuffer)
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gIsConsole` variable to check for console when doing your framebuffer effects.
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gEmulator` variable to check for console when doing your framebuffer effects.
- Widescreen (16:9) support toggleable by pressing `L` in the pause menu. *
- S2DEX engine by someone2639! To use it, compile with `make TEXT_ENGINE=s2dex_text_engine` or just set `TEXT_ENGINE` to `s2dex_text_engine` in the makefile.
- ia8 (64x64) coins, the vanilla coin texture is upgraded to accomodate. *
@@ -122,7 +121,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen.
- More info in `puppyprint.c`
- Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details.
- Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn.
# UltraSM64
- This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH).
@@ -136,7 +135,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- It has been patched with someone2639's shiftable segments patch
- Wiseguy's instant input patch has been added to allow for less input lag on emulation (Does not affect console)
This does mean that any framebuffer effects will have to be done on buffer 0 if targeting emulators
- Automatic console and emulator detection: Use the `gIsConsole` variable to wrap your code in an emulator check.
- Automatic console and emulator detection: Use the `gEmulator` variable to wrap your code in an emulator check.
- Separate defines for emulator and console black border height.
- Getting HVQM FMV support to work with the game is WIP.

View File

@@ -1 +1 @@
v2.0.3
v2.3.0

View File

@@ -27,6 +27,6 @@
#include "sparkle_animation/model.inc.c"
#ifdef S2DEX_TEXT_ENGINE
#include "src/s2d_engine/config.h"
#include "src/s2d_engine/s2d_config.h"
#include FONT_C_FILE
#endif

View File

@@ -368,8 +368,8 @@ const Gfx mario_metal_butt[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_butt_dl),
@@ -966,8 +966,8 @@ const Gfx mario_metal_left_thigh[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_left_thigh_dl),
@@ -3249,8 +3249,8 @@ const Gfx mario_metal_medium_poly_butt[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_medium_poly_butt_dl),
@@ -3638,8 +3638,8 @@ const Gfx mario_metal_medium_poly_left_thigh[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_medium_poly_left_thigh_dl),
@@ -4128,8 +4128,8 @@ const Gfx mario_metal_low_poly_butt[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_low_poly_butt_dl),
@@ -4373,8 +4373,8 @@ const Gfx mario_metal_low_poly_left_thigh[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_low_poly_left_thigh_dl),
@@ -6608,8 +6608,8 @@ const Gfx mario_metal_cap_unused_dl[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_cap_unused_m_logo_dl),
@@ -6787,7 +6787,7 @@ const Gfx mario_metal_cap_wings_transparent[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN | G_CULL_BACK | G_SHADING_SMOOTH),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPEndDisplayList(),
};

View File

@@ -271,8 +271,8 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_cap_seg3_dl_03022B30),
@@ -281,7 +281,7 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetEnvColor(255, 255, 255, 255),
gsSPEndDisplayList(),
@@ -365,14 +365,8 @@ const Gfx mario_cap_seg3_dl_03023298[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301CF50),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)),
gsDPPipeSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x7f7f7fff),
gsSPDisplayList(mario_cap_seg3_dl_03022B30),

View File

@@ -160,8 +160,8 @@ const Gfx water_ring_seg6_dl_06013AC0[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE),
gsDPLoadTextureBlock(water_ring_seg6_texture_06012380, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x1800, 0x07C0, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(water_ring_seg6_texture_06012380, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPTexture(0x07C0, 0x1800, 0, G_TX_RENDERTILE, G_ON),
gsSPLightColor(LIGHT_1, 0xffffffff),
gsSPLightColor(LIGHT_2, 0x3f3f3fff),
gsSPVertex(water_ring_seg6_vertex_06013380, 16, 0),
@@ -212,6 +212,6 @@ const Gfx water_ring_seg6_dl_06013AC0[] = {
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF),
gsSPTexture(0x07C0, 0x0F80, 0, G_TX_RENDERTILE, G_OFF),
gsSPEndDisplayList(),
};

View File

@@ -1,17 +1,11 @@
.include "macros.inc"
.section .data
.balign 16
glabel gMapEntries
glabel gMapSymbols
.incbin "bin/addr.bin"
glabel gMapEntryEnd
glabel gMapSymbolsEnd
.balign 16
glabel gMapStrings
.incbin "bin/name.bin"
glabel gMapStringsEnd
.balign 16
glabel gMapEntrySize
.word (gMapEntryEnd - gMapEntries) / 4
glabel gMapStringSize
.word (gMapStringsEnd - gMapStrings)

11
asm/emux.s Normal file
View File

@@ -0,0 +1,11 @@
// Detect if the emux emulator extension is supported
// https://hackmd.io/@rasky/r1k7na6Jn
.include "macros.inc"
.section .text, "ax"
.set noreorder
glabel emux_detect
or $v0, $0, $0
jr $ra
tne $v0, $v0, 0x0

69
asm/fcr31.s Normal file
View File

@@ -0,0 +1,69 @@
.include "macros.inc"
.section .text, "ax"
.set noreorder
.set noat
glabel fcr_get_rounding_mode
cfc1 $v0, $31
jr $ra
andi $v0, 0x3
glabel fcr_set_rounding_mode
cfc1 $t0, $31
xor $at, $t0, $a0
andi $at, $at, 0x3
xor $at, $at, $t0
jr $ra
ctc1 $at, $31
glabel fcr_get_enabled_exceptions
cfc1 $v0, $31
srl $v0, $v0, 7
jr $ra
andi $v0, $v0, 0x1f
glabel fcr_set_enabled_exceptions
cfc1 $t0, $31
sll $a0, $a0, 7
xor $at, $t0, $a0
andi $at, $at, 0xf80
xor $at, $at, $t0
jr $ra
ctc1 $at, $31
glabel fcr_enable_exceptions
cfc1 $at, $31
andi $a0, $a0, 0x1f
sll $a0, $a0, 7
or $at, $at, $a0
jr $ra
ctc1 $at, $31
glabel fcr_disable_exceptions
cfc1 $at, $31
andi $a0, $a0, 0x1f
sll $a0, $a0, 7
or $at, $at, $a0
subu $at, $at, $a0
jr $ra
ctc1 $at, $31
glabel fcr_get_cause
cfc1 $v0, $31
srl $v0, $v0, 12
jr $ra
andi $v0, $v0, 0x3f
glabel fcr_get_flags
cfc1 $v0, $31
srl $v0, $v0, 2
jr $ra
andi $v0, $v0, 0x1f
glabel fcr_clear_flags
cfc1 $t0, $31
xor $at, $t0, $0
andi $at, $at, 0x7c
xor $at, $at, $t0
jr $ra
ctc1 $at, $31

View File

@@ -4,24 +4,39 @@
.set gp=64
#include "macros.inc"
#undef _LANGUAGE_C
#include <PR/rcp.h>
#define PHYS_TO_CART(addr) ((addr) | 0xB0000000)
.set CART_ENTRYPOINT, 0x00000008
.set CART_CHECKSUM0, 0x00000010
.set CART_CHECKSUM1, 0x00000014
// initial DMEM state
.set SP_DMEM_UNK0, 0x040004C0
.set SP_DMEM_UNK1, 0x04000774
// Used for documentation; changing these can and will break your ROM!
.set INITIAL_DMA_LEN, 0x00100000
.set INITIAL_DMA_ROMPOS, 0x1000
// 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
// 0xA4000000-0xA4000FFF: RSP DMEM
// 0xA4000000-0xA400003F: ROM header
.section .text, "ax"
// 0xA4000040-0xA4000B6F: IPL3
// IPL3 entry point jumped to from IPL2
glabel ipl3_entry // 0xA4000040
mtc0 $zero, $13
mtc0 $zero, $9
mtc0 $zero, $11
lui $t0, %hi(RI_MODE_REG)
addiu $t0, %lo(RI_MODE_REG)
lw $t1, 0xc($t0)
.ent ipl3_entry
mtc0 $zero, C0_CAUSE
mtc0 $zero, C0_COUNT
mtc0 $zero, C0_COMPARE
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
lw $t1, %lo(RI_SELECT_REG)($t0)
bnez $t1, .LA4000410
nop
addiu $sp, $sp, -0x18
@@ -30,24 +45,24 @@ glabel ipl3_entry // 0xA4000040
sw $s5, 8($sp)
sw $s6, 0xc($sp)
sw $s7, 0x10($sp)
lui $t0, %hi(RI_MODE_REG)
addiu $t0, %lo(RI_MODE_REG)
lui $t2, (0xa3f80000 >> 16)
lui $t3, (0xa3f00000 >> 16)
lui $t4, %hi(MI_MODE_REG)
addiu $t4, %lo(MI_MODE_REG)
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
lui $t2, %hi(PHYS_TO_K1(RDRAM_BASE_REG + 0x80000))
lui $t3, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $t4, %hi(PHYS_TO_K1(MI_BASE_REG))
addiu $t4, %lo(PHYS_TO_K1(MI_BASE_REG))
ori $t1, $zero, 64
sw $t1, 4($t0)
sw $t1, %lo(MI_VERSION_REG)($t0)
li $s1, 8000
.LA400009C:
nop
addi $s1, $s1, -1
bnez $s1, .LA400009C
nop
sw $zero, 8($t0)
ori $t1, $zero, 20
sw $t1, 0xc($t0)
sw $zero, ($t0)
sw $zero, %lo(RI_CURRENT_LOAD_REG)($t0)
ori $t1, $zero, 0x14
sw $t1, %lo(RI_SELECT_REG)($t0)
sw $zero, %lo(RI_MODE_REG)($t0)
li $s1, 4
.LA40000C0:
nop
@@ -55,34 +70,34 @@ glabel ipl3_entry // 0xA4000040
bnez $s1, .LA40000C0
nop
ori $t1, $zero, 14
sw $t1, ($t0)
sw $t1, %lo(RI_MODE_REG)($t0)
li $s1, 32
.LA40000DC:
addi $s1, $s1, -1
bnez $s1, .LA40000DC
ori $t1, $zero, 271
sw $t1, ($t4)
ori $t1, $zero, (MI_SET_INIT | 0xF)
sw $t1, %lo(MI_MODE_REG)($t4)
lui $t1, (0x18082838 >> 16)
ori $t1, (0x18082838 & 0xFFFF)
sw $t1, 0x8($t2)
sw $zero, 0x14($t2)
sw $t1, %lo(RDRAM_DELAY_REG)($t2)
sw $zero, %lo(RDRAM_REF_ROW_REG)($t2)
lui $t1, 0x8000
sw $t1, 0x4($t2)
sw $t1, %lo(RDRAM_DEVICE_ID_REG)($t2)
move $t5, $zero
move $t6, $zero
lui $t7, (0xA3F00000 >> 16)
lui $t7, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
move $t8, $zero
lui $t9, (0xA3F00000 >> 16)
lui $t9, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $s6, (0xA0000000 >> 16)
move $s7, $zero
lui $a2, (0xA3F00000 >> 16)
lui $a2, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $a3, (0xA0000000 >> 16)
move $s2, $zero
lui $s4, (0xA0000000 >> 16)
addiu $sp, $sp, -0x48
move $fp, $sp
lui $s0, %hi(MI_VERSION_REG)
lw $s0, %lo(MI_VERSION_REG)($s0)
lui $s0, %hi(PHYS_TO_K1(MI_VERSION_REG))
lw $s0, %lo(PHYS_TO_K1(MI_VERSION_REG))($s0)
lui $s1, (0x01010101 >> 16)
addiu $s1, (0x01010101 & 0xFFFF)
bne $s0, $s1, .LA4000160
@@ -103,14 +118,14 @@ glabel ipl3_entry // 0xA4000040
nop
sw $v0, ($sp)
li $t1, 8192
sw $t1, ($t4)
lw $t3, ($t7)
sw $t1, %lo(MI_MODE_REG)($t4)
lw $t3, %lo(RDRAM_CONFIG_REG)($t7)
lui $t0, 0xf0ff
and $t3, $t3, $t0
sw $t3, 4($sp)
addi $sp, $sp, 8
li $t1, 4096
sw $t1, ($t4)
sw $t1, %lo(MI_MODE_REG)($t4)
lui $t0, 0xb019
bne $t3, $t0, .LA40001E0
nop
@@ -130,11 +145,11 @@ glabel ipl3_entry // 0xA4000040
add $s4, $s4, $t0
.LA40001E8:
li $t0, 8192
sw $t0, ($t4)
lw $t1, 0x24($t7)
lw $k0, ($t7)
sw $t0, %lo(MI_MODE_REG)($t4)
lw $t1, %lo(RDRAM_DEVICE_MANUF_REG)($t7)
lw $k0, %lo(RDRAM_CONFIG_REG)($t7)
li $t0, 4096
sw $t0, ($t4)
sw $t0, %lo(MI_MODE_REG)($t4)
andi $t1, $t1, 0xffff
li $t0, 1280
bne $t1, $t0, .LA4000230
@@ -162,9 +177,9 @@ glabel ipl3_entry // 0xA4000040
nop
.LA400025C:
li $t0, 0xc4000000
sw $t0, 0xc($t2)
sw $t0, %lo(RDRAM_MODE_REG)($t2)
li $t0, 0x80000000
sw $t0, 0x4($t2)
sw $t0, %lo(RDRAM_DEVICE_ID_REG)($t2)
move $sp, $fp
move $v1, $zero
.LA4000274:
@@ -232,7 +247,7 @@ glabel ipl3_entry // 0xA4000040
slt $t0, $v1, $t5
bnez $t0, .LA4000274
nop
lui $t2, %hi(RI_REFRESH_REG)
lui $t2, %hi(PHYS_TO_K1(RI_BASE_REG))
sll $s2, $s2, 0x13
lui $t1, (0x00063634 >> 16)
ori $t1, (0x00063634 & 0xFFFF)
@@ -253,8 +268,8 @@ glabel ipl3_entry // 0xA4000040
lw $s6, 0xc($sp)
lw $s7, 0x10($sp)
addiu $sp, $sp, 0x18
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, $t0, %lo(EXCEPTION_TLB_MISS)
lui $t0, %hi(UT_VEC)
addiu $t0, $t0, %lo(UT_VEC)
addiu $t1, $t0, 0x4000
addiu $t1, $t1, -0x20
mtc0 $zero, $28
@@ -264,8 +279,8 @@ glabel ipl3_entry // 0xA4000040
sltu $at, $t0, $t1
bnez $at, .LA40003D8
addiu $t0, $t0, 0x20
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
addiu $t1, $t0, 0x2000
addiu $t1, $t1, -0x10
.LA40003F8:
@@ -276,8 +291,8 @@ glabel ipl3_entry // 0xA4000040
b .LA4000458
nop
.LA4000410:
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
addiu $t1, $t0, 0x4000
addiu $t1, $t1, -0x20
mtc0 $zero, $28
@@ -287,8 +302,8 @@ glabel ipl3_entry // 0xA4000040
sltu $at, $t0, $t1
bnez $at, .LA4000428
addiu $t0, $t0, 0x20
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
addiu $t1, $t0, 0x2000
addiu $t1, $t1, -0x10
.LA4000448:
@@ -297,16 +312,16 @@ glabel ipl3_entry // 0xA4000040
bnez $at, .LA4000448
addiu $t0, $t0, 0x10
.LA4000458:
lui $t2, %hi(SP_DMEM)
addiu $t2, $t2, %lo(SP_DMEM)
lui $t2, %hi(PHYS_TO_K1(SP_DMEM_START))
addiu $t2, $t2, %lo(PHYS_TO_K1(SP_DMEM_START))
lui $t3, 0xfff0
lui $t1, 0x0010
and $t2, $t2, $t3
lui $t0, %hi(SP_DMEM_UNK0)
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_UNK0))
addiu $t1, -1
lui $t3, %hi(SP_DMEM_UNK1)
addiu $t0, %lo(SP_DMEM_UNK0)
addiu $t3, %lo(SP_DMEM_UNK1)
lui $t3, %hi(PHYS_TO_K1(SP_DMEM_UNK1))
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_UNK0))
addiu $t3, %lo(PHYS_TO_K1(SP_DMEM_UNK1))
and $t0, $t0, $t1
and $t3, $t3, $t1
lui $t1, 0xa000
@@ -320,32 +335,32 @@ glabel ipl3_entry // 0xA4000040
addiu $t1, $t1, 4
bnez $at, .LA4000498
sw $t5, -4($t1)
lui $t4, %hi(EXCEPTION_TLB_MISS)
addiu $t4, %lo(EXCEPTION_TLB_MISS)
lui $t4, %hi(UT_VEC)
addiu $t4, %lo(UT_VEC)
jr $t4
nop
lui $t3, %hi(D_B0000008)
lw $t1, %lo(D_B0000008)($t3)
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
lui $t2, (0x1FFFFFFF >> 16)
ori $t2, (0x1FFFFFFF & 0xFFFF)
lui $at, %hi(PI_DRAM_ADDR_REG)
lui $at, %hi(PHYS_TO_K1(PI_DRAM_ADDR_REG))
and $t1, $t1, $t2
sw $t1, %lo(PI_DRAM_ADDR_REG)($at)
lui $t0, %hi(PI_STATUS_REG)
sw $t1, %lo(PHYS_TO_K1(PI_DRAM_ADDR_REG))($at)
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
.LA40004D0:
lw $t0, %lo(PI_STATUS_REG)($t0)
andi $t0, $t0, 2
lw $t0, %lo(PHYS_TO_K1(PI_STATUS_REG))($t0)
andi $t0, $t0, PI_STATUS_IO_BUSY
bnezl $t0, .LA40004D0
lui $t0, %hi(PI_STATUS_REG)
li $t0, 0x1000
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
li $t0, INITIAL_DMA_ROMPOS
add $t0, $t0, $t3
and $t0, $t0, $t2
lui $at, %hi(PI_CART_ADDR_REG)
sw $t0, %lo(PI_CART_ADDR_REG)($at)
lui $t2, 0x0010
addiu $t2, 0xFFFF
lui $at, %hi(PI_WR_LEN_REG)
sw $t2, %lo(PI_WR_LEN_REG)($at)
lui $at, %hi(PHYS_TO_K1(PI_CART_ADDR_REG))
sw $t0, %lo(PHYS_TO_K1(PI_CART_ADDR_REG))($at)
li $t2, INITIAL_DMA_LEN
addiu $t2, -1
lui $at, %hi(PHYS_TO_K1(PI_WR_LEN_REG))
sw $t2, %lo(PHYS_TO_K1(PI_WR_LEN_REG))($at)
.LA4000514:
nop
@@ -376,13 +391,13 @@ glabel ipl3_entry // 0xA4000040
nop
nop
nop
lui $t3, %hi(PI_STATUS_REG)
lw $t3, %lo(PI_STATUS_REG)($t3)
lui $t3, %hi(PHYS_TO_K1(PI_STATUS_REG))
lw $t3, %lo(PHYS_TO_K1(PI_STATUS_REG))($t3)
andi $t3, $t3, 0x1
bnez $t3, .LA4000514
nop
lui $t3, %hi(D_B0000008)
lw $a0, %lo(D_B0000008)($t3)
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $a0, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
move $a1, $s6
lui $at, (0x5D588B65 >> 16)
ori $at, (0x5D588B65 & 0xFFFF)
@@ -436,52 +451,54 @@ glabel ipl3_entry // 0xA4000040
xor $a3, $t6, $t3
xor $t8, $s0, $a2
xor $s0, $t8, $t4
lui $t3, %hi(D_B0000010)
lw $t0, %lo(D_B0000010)($t3)
// verifies checksum
lui $t3, %hi(PHYS_TO_CART(CART_CHECKSUM0))
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM0))($t3)
bne $a3, $t0, halt
nop
lw $t0, %lo(D_B0000014)($t3)
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM1))($t3)
bne $s0, $t0, halt
nop
bal func_A4000690
nop
// In a permanent loop that cannot be exited.
halt:
bal halt
nop
func_A4000690:
lui $t1, %hi(SP_PC)
lw $t1, %lo(SP_PC)($t1)
lui $t1, %hi(PHYS_TO_K1(SP_PC_REG))
lw $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
lw $s0, 0x14($sp)
lw $ra, 0x1c($sp)
beqz $t1, .LA40006BC
addiu $sp, $sp, 0x20
li $t2, 65
lui $at, %hi(SP_STATUS_REG)
sw $t2, %lo(SP_STATUS_REG)($at)
lui $at, %hi(SP_PC)
sw $zero, %lo(SP_PC)($at)
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
sw $t2, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(SP_PC_REG))
sw $zero, %lo(PHYS_TO_K1(SP_PC_REG))($at)
.LA40006BC:
lui $t3, (0x00AAAAAE >> 16)
ori $t3, (0x00AAAAAE & 0xFFFF)
lui $at, %hi(SP_STATUS_REG)
sw $t3, %lo(SP_STATUS_REG)($at)
lui $at, %hi(MI_INTR_MASK_REG)
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
sw $t3, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
li $t0, 1365
sw $t0, %lo(MI_INTR_MASK_REG)($at)
lui $at, %hi(SI_STATUS_REG)
sw $zero, %lo(SI_STATUS_REG)($at)
lui $at, %hi(AI_STATUS_REG)
sw $zero, %lo(AI_STATUS_REG)($at)
lui $at, %hi(MI_MODE_REG)
sw $t0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
sw $zero, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(MI_BASE_REG))
li $t1, 2048
sw $t1, %lo(MI_MODE_REG)($at)
sw $t1, %lo(PHYS_TO_K1(MI_BASE_REG))($at)
li $t1, 2
lui $at, %hi(PI_STATUS_REG)
lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
lui $t0, (0xA0000300 >> 16)
ori $t0, (0xA0000300 & 0xFFFF)
sw $t1, %lo(PI_STATUS_REG)($at)
sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
sw $s7, 0x14($t0)
sw $s5, 0xc($t0)
sw $s3, 0x4($t0)
@@ -495,22 +512,22 @@ func_A4000690:
addiu $t1, $t1, 0
.LA4000730:
sw $t1, 0x8($t0)
lui $t0, %hi(SP_DMEM)
addiu $t0, %lo(SP_DMEM)
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_START))
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_START))
addi $t1, $t0, 0x1000
.LA4000740:
addiu $t0, $t0, 4
bne $t0, $t1, .LA4000740
sw $zero, -4($t0)
lui $t0, %hi(SP_IMEM)
addiu $t0, %lo(SP_IMEM)
lui $t0, %hi(PHYS_TO_K1(SP_IMEM_START))
addiu $t0, %lo(PHYS_TO_K1(SP_IMEM_START))
addi $t1, $t0, 0x1000
.LA4000758:
addiu $t0, $t0, 4
bne $t0, $t1, .LA4000758
sw $zero, -4($t0)
lui $t3, %hi(D_B0000008)
lw $t1, %lo(D_B0000008)($t3)
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
jr $t1
nop
nop
@@ -747,8 +764,8 @@ func_A4000A40:
li $k1, 1
bne $a1, $k1, .LA4000AC0
sw $t7, ($s5)
lui $k0, %hi(MI_MODE_REG)
sw $zero, %lo(MI_MODE_REG)($k0)
lui $k0, %hi(PHYS_TO_K1(MI_BASE_REG))
sw $zero, %lo(PHYS_TO_K1(MI_BASE_REG))($k0)
.LA4000AC0:
lw $ra, 0x1c($sp)
addiu $sp, $sp, 0x28
@@ -759,12 +776,12 @@ func_A4000AD0:
addiu $sp, $sp, -0x28
sw $ra, 0x1c($sp)
li $k0, 0x2000
lui $k1, %hi(MI_MODE_REG)
sw $k0, %lo(MI_MODE_REG)($k1)
lui $k1, %hi(PHYS_TO_K1(MI_BASE_REG))
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
move $fp, $zero
lw $fp, ($s5)
li $k0, 0x1000
sw $k0, %lo(MI_MODE_REG)($k1)
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
li $k1, 0x40
and $k1, $k1, $fp
srl $k1, $k1, 6
@@ -797,6 +814,8 @@ func_A4000AD0:
nop
nop
.end ipl3_entry
// 0xA4000B70-0xA4000FFF: IPL3 Font
glabel ipl3_font
.incbin "textures/ipl3_raw/ipl3_font_00.ia1"

View File

@@ -1,6 +1,8 @@
.include "macros.inc"
.section .data
glabel __n64Assert_Condition
.skip 4
glabel __n64Assert_Filename
.skip 4
glabel __n64Assert_LineNum
@@ -11,9 +13,10 @@ glabel __n64Assert_Message
.section .text
glabel __n64Assert
sw $a0, __n64Assert_Filename
sw $a1, __n64Assert_LineNum
sw $a2, __n64Assert_Message
sw $a0, __n64Assert_Condition
sw $a1, __n64Assert_Filename
sw $a2, __n64Assert_LineNum
sw $a3, __n64Assert_Message
syscall
nop

View File

@@ -0,0 +1,16 @@
// Used as part of emulator detection. The dynarec core of PJ64 4.0 only updates
// the COUNT register in between recompiled functions, so this will return 0 on
// PJ64 4.0 dynarec, but will instead return the count factor on other versions.
.include "macros.inc"
.section .text, "ax"
.set noreorder
.balign 32
glabel pj64_get_count_factor_asm
mfc0 $t0, $9 // $9 is the COUNT register
NOP
mfc0 $t1, $9
subu $v0, $t1, $t0
jr $ra
srl $v0, $v0, 1

View File

@@ -15,9 +15,14 @@
.word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */
.ascii INTERNAL_ROM_NAME /* Internal ROM name */
#if defined(EMU_DEFAULT_TO_GCN)
/* Advanced homebrew ROM header bytes: https://n64brew.dev/wiki/ROM_Header#Advanced_Homebrew_ROM_Header */
.word 0x82000000
#else
.word 0x00000000 /* Unknown */
#endif
.word 0x0000004E /* Cartridge */
#if defined(EEP4K)
#if defined(EEP4K) && !defined(EMU_DEFAULT_TO_GCN)
.ascii "SM" /* Cartridge ID */
#else
.ascii "ED" /* Cartridge ID */

Some files were not shown because too many files have changed in this diff Show More