1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-15 06:06:04 +00:00
Commit graph

138 commits

Author SHA1 Message Date
Dragorn421
e833011ccd
Cleanup: Pass all paths to tools rather than tools constructing them (#2017)
* Pass all paths to tools rather than tools constructing them

* fix: make --baserom-segments required

* sync with mm reviews

* --version everywhere
2024-09-05 03:49:16 +09:00
cadmic
c6d7cc7697
[ntsc-1.2] Match __osMalloc.c and code_800FC620.c (new/delete) (#2106)
* Match __osMalloc

* Match src/code/code_800FC620.c (new/delete)

* Wrap versions-specific files in ifdefs to fix compilation

* Fix bss

* Remove {FAULT,RAND,OSMALLOC}_VERSION in favor of PLATFORM_N64

* Fix __osMalloc data splits, add unused strings

* __osMalloc.h -> osMalloc.h

* Fix merge
2024-09-04 11:10:14 +02:00
cadmic
6e5ea8c7aa
[ntsc-1.2] Update spec for boot and code (#2114)
* Update spec for boot and code

* Fix merge
2024-09-04 00:30:23 -04:00
Derek Hensley
3e200769f1
[ntsc-1.2] LoadFragment2 OK (#2118)
* [ntsc-1.2] LoadFragment2 OK

* Add insight about bssSize
2024-09-03 19:19:13 -04:00
cadmic
2152d1df2d
[ntsc-1.2] Import libleo from Decompollaborate/n64dd (#2104)
* Create stack.h for STACK/STACK_TOP

* Import libleo from Decompollaborate/n64dd

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>

* Use (unsigned) int when in mdebug

* Apply suggestions from code review

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Use && in leocmdex.c

* Use proper names for character tables, revert sNonKanjiIndices

* Fix incorrect OSMesg casts

* Use LEO_ERROR_GOOD even where docs say 0

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Remove "Presumably" comment

* Whitespace

* Remove redundant (debug-only) returns

---------

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-09-03 15:30:14 -04:00
cadmic
a63f0a63b5
Move driverominit and sprintf to src/boot/ (#2105) 2024-08-29 16:34:18 -04:00
cadmic
7079005c83
[ntsc-1.2] Match N64 libultra (#2081)
* Match N64 libultra

* INITIALIZE_FUNC -> OSINITIALIZE_FUNC

* Document osGetIntMask

* Refer readers of osGetIntMask to osSetIntMask comment

* Whitelist new static functions in disasm unksyms check
2024-08-28 21:30:36 -04:00
Dragorn421
68818044db
[ntsc-1.2] Decompile fault.c (#2046)
* wip decomp ntsc-1.2 fault.c

* more ntsc-1.2 fault.c

* decompiled fault_v1.c

* name fault_v1 functions, wip

* try to clean up build system (two versions of the fault system coexisting)

* cleanup

* cleanup2

* fix build gc-eu-mq-dbg

* match 2 more, ty anon

* matched

* review

* more review

* fixup spec

* `(uintptr_t)ptr op int` instead of `ptr op (type*)int`

* move fault.h out of global headers, properly include fault.h and versions.h

* compile all fault_*.c files regardless of version by overriding FAULT_VERSION

* n64 FaultMgr.framebuffer s32 -> u16*

* FaultMgr.framebuffer -> FaultMgr.fb

* make gc FaultMgr.fb u16* (yes, thats everything)

* bss

* fix Fault_Printf return type

* noop FaultDrawer_SetFontColor, FaultDrawer_SetCharPad in fault_n64

* fault_color_ stuff is only for fault_gc

* rm empty line in makefile

* I guess `D_80105A90_unknown` is `[sg]TotalAllocFailures`

* bss

* `Fault_WaitInput` -> `Fault_WaitForInput`

* use named fault funcs in pointers array

* FAULT_OOT{N64,GC} -> FAULT_{N64,GC}

* Apply suggestions from code review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* review, sync fault_{gc,n64}

* Apply `FPCSR_CE` suggestions from code review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
2024-08-28 09:38:42 +02:00
Tharo
aa97586659
[Audio 6/?] Build Soundfonts and the Soundfont Table (#2056)
* [Audio 6/?] Build Soundfonts and the Soundfont Table

* Improve lots of error messages

* First suggested changes

* Make audio build debugging more friendly

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Some fixes from MM review

* Make soundfont_table.h generation depend on the samplebank xmls since they are read, report from which soundfont the invalid pointer indirect warning originates from

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-27 21:09:59 -04:00
cadmic
3795574878
Add all N64 version defines (#2095)
* Add all N64 ROMs to versions.h

* Remove OOT_ prefix from version defines

* Make it pretty
2024-08-26 11:43:59 -04:00
cadmic
c38adc1036
Add NO_SQRTF_INTRINSIC for z_rumble.c and audio/general.c (#2067) 2024-08-23 03:11:41 -04:00
cadmic
ec70295357
Move non-libultra libc functions to src/libc/ (#2055)
* Move non-libultra libc functions to src/libc/

* Add explicit nops in delay slots

* Don't rely on CPP expanding undefined macros to 0

* Delete old Makefile rules

* Fix type of memset()
2024-08-20 01:15:24 -04:00
Dragorn421
6bc6cedaf8
[ntsc-1.2] Match boot_main.c, logutils.c, z_locale.c (text) (#2053)
* Match boot_main.c, logutils.c, z_locale.c (text)

* review

* review 2
2024-08-19 16:17:41 -04:00
cadmic
f5fd8daffb
Use incremental link for z_message/z_game_over data shenanigans (#2051)
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-19 18:16:04 +02:00
Tharo
ba5574be6d
[Audio 5/?] Build the Samplebank Table (#2044) 2024-08-17 17:42:15 -04:00
Tharo
d3b9ba17da
[Audio 4/?] Build Samplebanks, match Audiotable (#2032)
* [Audio 4/?] Build Samplebanks, match Audiotable

* Fix some makefile formatting

* Add missing scope in MARK chunk handling

* Add comment to generate asm file when buffer bug data is emitted, remove duplicate CC4 definition

* Adjust comment

* SBCFLAGS

* Remove unnecessary comments on notes_lut

* Split build directories creation command into several to avoid it becoming too long

* objcopy -j -> --only-section

* Fix mkdir warning when extracted/VERSION/assets doesn't exist
2024-08-14 20:54:31 -04:00
Dragorn421
c8ec6042e1
checksums for ntsc 1.2 JP and US, accept both as baserom (#2030) 2024-08-14 18:53:39 -04:00
Dragorn421
91a534cbc9
Rewrite preprocess.py with bash and C (#2035)
* add C preprocess_pragmas and Bash preprocess

* "line return" -> newline

* align tools sources

* fix: handle files that are not newline-terminated

* use a temp directory with a same-basename file instead of a temp file

* macos compat

* remove debug code
2024-08-14 04:05:36 -04:00
Tharo
fc79632df8
[Audio 3/?] Set up building samples (#2024)
* [Audio 3/?] Set up building samples

* AIFF -> SAMPLE
2024-08-11 17:41:33 +02:00
cadmic
8366b8731e
Set up build system and disassembly for ntsc-1.2 (#2021)
* Set up build system for ntsc-1.2

* Set up disassembly for ntsc-1.2

* Add all unnamed functions to functions.txt

* Update docs/retail_versions.md for ntsc-1.2

* Format

* Update docs/retail_versions.md

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Remove mention of US

* OOT_N64 -> PLATFORM_N64, OOT_GC -> PLATFORM_GC

* Move mtxutil to libultra/gu

* Fix libultra/io bss splits

* Fix merge

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-11 06:20:43 -04:00
cadmic
d495436190
Match remaining GC retail versions (#2019)
* Match the remaining GC retail versions

* Fix BSS ordering for existing versions

* Disable clang-format for #pragma increment_block_number

* sramResetCode -> sSramResetCode

* Replace 0xFF3F with or-ing all buttons together

* Revert "Disable clang-format for #pragma increment_block_number"

This reverts commit 406b6d26c9.

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-09 20:58:46 -04:00
cadmic
1021c482af
gc-us OK (#2018)
Match BSS order and delete disassembly data
2024-08-08 03:26:48 -04:00
Tharo
29acf96db2
[Audio 1/?] Extract Samplebanks and Soundfonts to XML (#2008)
* [Audio 1/?] Extract Samplebanks and Soundfonts to XML

* Remove config.py and use the version yamls for addresses, other suggested changes

* Adjust setup-audio

* Remove some commented out dead code (MM review)
2024-08-08 00:11:39 -04:00
fig02
6a8c556bdb
Add make_options.mk (#2016)
* make-options.mk

* fix file name

* Make more settings overwritable with .make_options.mk and group them together

* PAL -> EU

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-08-06 13:32:34 -04:00
cadmic
0da402b9de
Automate fixing BSS ordering (#2009)
* Automate fixing BSS ordering

* Typo

* Some cleanups

* Move pragma check after printing BSS info

* Some proofreading

* multiprocessing, require version, some colors

* Tweak output

* Black + mypy

* Move logging and sys.exit out of helper functions

* Use stdout instead of stderr in fix_bss.py

* Add suggestion to conflicting offsets error

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Remove var = list[T]()

* Improve error handling

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Add error if no pointers to BSS

* Add comment about process_file_worker

* Only print updates if stdout is a tty

* Use new binary-search-esque candidate generation algorithm

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Add Wikipedia link

* More comment tweaks

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-02 20:31:15 -04:00
Tharo
8ee485d2e7
Create build directories for committed assets (#2007) 2024-07-29 17:16:53 -04:00
cadmic
0db9e7275f
Fix Makefile performance regression with OOT_VERSION define (#2006) 2024-07-29 15:57:35 -04:00
cadmic
ec5068c58d
Introduce OOT_VERSION and OOT_REGION defines for build info and ROM header (#2003)
* Use version defines for build info and ROM header

* Use existing REGION_ defines for OOT_REGION instead
2024-07-28 00:46:55 -04:00
cadmic
5515aa1705
Configure incbins in version config instead of using the Debug ROM (#2005)
* Run CPP for data/*.s

* Configure incbins in version config instead of using the Debug ROM
2024-07-28 00:24:13 -04:00
Tharo
7244cd62a5
Restore makefile rules for building asset files out of the assets directory (#2002)
* Re-add makefile rules for building asset files out of the assets directory

* Fix ASSET_FILES_OUT
2024-07-23 18:47:00 -04:00
Tharo
c1341224f9
Promote the warnings implicit-int, int-conversion, incompatible-pointer-types to errors (#1995) 2024-07-18 12:58:59 -04:00
cadmic
bf3339a16d
Set up build system and disassembly for gc-us (#1982)
* Build gc-us

* Set up gc-us disassembly

* Don't disasm unchanged overlays

* Fix gc-eu-mq BSS

* romalign link_animetion for NTSC

* Explicitly set CPP defines to 0/1

* Add #ifs to segment_symbols.h

* Add sButtonTextures now

* Fix message _SHIFTL usage

* Don't ifdef LANGUAGE_MAX
2024-07-06 21:38:31 +02:00
Tharo
baf1e8c174
Reworked text extraction + add JP text extraction (#1980)
* Reworked text extraction + add JP text extraction

* Format

* Suggested changes

* Correct address for gc-us sJpnMessageEntryTable

Co-authored-by: cadmic <cadmic24@gmail.com>

---------

Co-authored-by: cadmic <cadmic24@gmail.com>
2024-07-02 22:42:52 -04:00
Dragorn421
264581ff3f
CCCHECK: Add -Werror=implicit-function-declaration (#1979) 2024-06-27 06:39:28 -04:00
cadmic
1b0e35c89a
Extract NTSC assets for gc-us (#1973)
* Extract NTSC assets for gc-us

* Extract kanji

https://github.com/zeldaret/mm/pull/1536

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: emilybrooks <emilybrooksemilybrooks@gmail.com>

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: emilybrooks <emilybrooksemilybrooks@gmail.com>
2024-06-26 06:22:26 -04:00
cadmic
9def6f4d0d
Set up multiversion assets with ZAPD and match gc-eu (#1967)
* Add ZAPD hack to deal with extracted/VERSION/ in include paths

* Extract assets to extracted/VERSION

* Add ZAPD flags to override virtual address / start offset / end offset

* Configure offsets for code and overlay assets

* Reorganize ZAPD configs

* Match gc-eu-mq

* Match gc-eu

* Remove old asset dirs during distclean

* Revert "Remove old asset dirs during distclean"

This reverts commit fc8027a75f.

* make zapd addresses globals int64_t so they can store uint32_t addresses and -1

* slight cleanup extract_assets.py

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "0285e11f0"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "0285e11f0"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-06-24 15:22:39 +02:00
Tharo
52e7483392
Sync gbi.h with MM, move ucode defines to makefile (#1968)
* Sync gbi.h with MM, move ucode defines to makefile, use GBI_DEBUG instead of OOT_DEBUG

* UCODE_DEFS -> GBI_DEFINES, add GBI_DOWHILE toggle
2024-06-22 08:49:07 -04:00
cadmic
0ddd64fd6c
Introduce version-specific YAML config (#1957) 2024-06-20 22:26:32 -04:00
cadmic
8b6a6e6778
Run CC_CHECK with the correct CPP defines (#1963)
* Run CC_CHECK with the correct CPP defines

* Add "CPP_DEFINES ?="
2024-06-20 18:26:01 -04:00
mzxrules
8d83727429
Experiment: remove global.h dependency from sys_math, sys_math3d, z_lib (#1956)
* split sys_math, sys_math3d, z_lib from global.h

* suggestions

* forgot this

* more math stuff

* nit fix

* re-add ichain.h

* resolve tharo's comments
2024-06-19 00:00:23 -04:00
cadmic
4de56c44ac
Add gc-eu-mq to CI (#1943)
* Add gc-eu-mq to CI

* Give up on scripting

* Revert quotes changes
2024-04-20 00:12:26 -04:00
cadmic
d59ca6cea2
Set up gc-eu and match all code (#1938)
* Set up gc-eu and match all code

* Format

* Mark gc-eu-mq as WIP until it builds OK

* Move original/MQ map mark data to separate files

* Add #includes to .inc.c files to help out VS Code

* Use #if in spec instead of .inc.c files
2024-04-15 13:36:29 -04:00
cadmic
f643499462
Match retail BSS ordering (#1927)
* Match retail BSS ordering

* Revert moving some global variables to headers

* Adjust block numbers after header changes

* Fix debug build

* Overlay bss ordering

* Fix BSS ordering after header changes

* gc-eu-mq OK

* Implement preprocessor for #pragma increment_block_number

* Transfer usage comment from reencode.sh

* Use temporary directory instead of temporary file

* Move ColChkMassType back
2024-04-14 23:51:32 +02:00
cadmic
93642f97bc
Use gcc -E instead of cpp to fix macOS build (#1935)
* Use `gcc -E` instead of `cpp` to fix macOS build

* -xc++ -> -xc
2024-03-29 11:03:28 -04:00
cadmic
bf37ad1368
Move baserom segments to extracted/ (#1916)
* Move baserom segments to extracted/

* Add old baserom segments dir back to .gitignore

* Rename segments/ -> baserom/
2024-03-04 19:06:26 -05:00
cadmic
b9d1fe50cc
Make distclean delete build artifacts for all versions (#1909) 2024-03-04 18:26:04 +01:00
cadmic
0407594107
Hacks for building nes_font_static and nes_message_data_static with gc-eu-mq (#1721)
* Hack nes_font_static and nes_message_data_static

* Make hardcoded config a bit more consistent

* Put debug ROM first

* Reword comment

* Move nes_font_static hack to spec

* Restore extracted/gc-eu-mq
2024-03-02 16:05:15 -05:00
Dragorn421
ff81e2a891
Build fixups: build gc-eu-mq with extracted/dbg, remove asmproc pragmas (#1911)
* Remove asmproc recurse (somehow these two survived)

* Use `extracted/gc-eu-mq-dbg` anyway for gc-eu-mq
2024-03-02 12:47:10 -05:00
Dragorn421
a6f646dc65
Introduce extracted/VERSION, with text extracted there (#1730)
* Introduce assets/_extracted/VERSION, with text extracted there

* move to `extracted/text/`

* Update gitignore s

* rework args for msgenc.py

* put mkdir with others, until theyre all moved at once

* move 0xFFFC back to being extracted, making it use specific macro `DEFINE_MESSAGE_NES` to handle its special behavior

* prettier gitignore

* Move messages 0xFFFC, 0xFFFD to committed message_data.h
2024-03-01 22:09:57 -05:00
Dragorn421
bdee3d33b4
No longer use asm-processor (#1824)
* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "b3bfa14cf"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "b3bfa14cf"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"

* use CS_FLOAT

* update csdis

* update committed csdata

* finish updating csdis.py

* add script to reextract committed csdata

* dont use asm-processor, use iconv for reencoding utf8 to eucjp

* remove asm-processor csdata usage remnants

* --cs-float hex

* delete tempfile at end of reencode.sh (may want to rm even if compilation fails though?)

* comment reencode.sh

* comment CMD_F

* do not break permuter guessing compile command, by not reencode.sh-wrapping compilation under PERMUTER (thanks anghelo)

* fix the permuter fix

* pad -> sBssDummyNeg1

* reencode.sh: rm tempfile on script exit (including on error)

* renumber sBssDummy vars in zcolchk from 0

* Revert "--cs-float hex"

This reverts commit 85267dc348.

* Revert BSS changes

* Add linemarker to reencoded files for better error message

* fix audio/general.c bss

* make reencode.sh work on macOS

* touch up csdis, csdis_re

---------

Co-authored-by: cadmic <cadmic24@gmail.com>
2024-03-01 16:12:22 -05:00