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

124 commits

Author SHA1 Message Date
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
Tharo
3670a48aee
Some GCC flags improvements (#1903)
* Some GCC flags improvements

* Move -fno-reorder-blocks -fno-zero-initialized-in-bss to assets only

* Add -fno-PIC since some gcc versions use -fPIC as default

* Enable builtin functions on gcc, with appropriate changes to missing_gcc_functions.c
  and ultra64/libc.h

* Move -fno-merge-constants -mno-explicit-relocs -mno-split-addresses to overlays only
  as they are only needed there for reloc reasons

* Remove unneeded casts in missing_gcc_functions.c

* Change gcc assets flags handling
2024-02-29 15:11:54 -05:00
Tharo
7f64ace8f0
RNG doc (#1892)
* RNG doc

* Add some missing note qualifiers in comments

* code_800FD970 -> rand in Makefile and disasm CSVs
2024-02-26 22:21:25 -05:00
Dragorn421
1ba2d6d0f9
Rework disassembly: out of makefile, separate sections, relocs (#1728)
* Rework disassembly: out of makefile, separate sections, relocs

* another nice print

* fix type hints for python 3.8 dinosaurs

* reencode from utf-8 to euc-jp (iconv) before assemble

* Add "include guards" to macro.inc

* For producing the expected file object files, assemble sections together instead of linking together the individually assembled sections

* review

* fixup

* require spimdisasm >=1.21.0

* remove assembling sections individually (for now)

* uppercase encoding names (standard)
2024-02-12 20:20:25 -05:00
cadmic
d2a1abf8df
Diff .data size, .bss size, and .rodata contents in retail_progress.py (#1706)
* Use iconv to convert strings to EUC-JP for reassembly

* Compare .data size, .bss size, and .rodata contents in retail_progress.py

* Show data diffs in summary for humans

* Use multiprocessing to very significantly speed up retail_progress.py summary

* Remove intermediate function

* Make sigint less jank

* Hide the evidence

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

* add --not-ok to only print not-OK files in summary

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-02-09 08:30:32 -05:00
Dragorn421
9da4e17c8f
Split msgdis from extract_assets (#1723)
* split msgdis from extract_assets

* move import
2024-02-05 20:40:31 -05:00
cadmic
54ffd50fa2
Extract ROM segments from gc-eu-mq (take 2) (#1709)
* Extract ROM segments from gc-eu-mq (take 2)

* Apply suggestions from code review

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

* Typo

* dma_{start,names} -> dmadata_{start,names}

* Restore dest

* Don't assume rom location == vrom location

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-02-04 22:59:09 -05:00
cadmic
d674dad3da
Match compression for gc-eu-mq (#1704)
* Improve compression

* Format

* Typo

* Use Python assignment expression in tools/dmadata.py

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

* Review decompress_baserom.py

* Replace DEFINE_DEBUG_SCENE with CPP defines

* Pass is_zlib_compressed instead of version

* Reword NOLOAD comment in write_compress_ranges

* Remove redundant comment

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-02-03 23:59:19 +01:00
Derek Hensley
5785c7adfb
Move roms to build folder (#1651)
* Move built roms to build directory, along with rename map and linker script

* PR review

* sym_info fix

* Revert docs/tutorial/data.md change
2024-02-02 16:34:20 -05:00
Dragorn421
64dd475a3a
[Faster CI] Make CI not run CC_CHECK (#1686)
* Make CI not run CC_CHECK

* I put it on the wrong step bruh

* Introduce RUN_CC_CHECK instead (like MM)
2024-02-01 15:08:45 -05:00
Derek Hensley
77c9c97ff9
Overlay_Relocate and Overlay_Load retail OK (#1662)
* Overlay_Relocate OK

* Overlay_Load

* format

* PR + better match for Overlay_Load
2024-01-30 19:30:27 -05:00
cadmic
9816f62129
Define OOT_DEBUG=0 in retail builds (#1658)
* Define OOT_DEBUG=0 in retail builds

* Fix ifndef

* Replace VI_MODE_EDITOR_INACTIVE

* Revert "Replace VI_MODE_EDITOR_INACTIVE"

This reverts commit f7c4cae7c3.

* Replace VI_MODE_EDITOR_INACTIVE, take 2

* Revert EnBom_Draw
2024-01-30 13:54:38 -05:00
cadmic
68b41d6b0d
Refactor Makefile variables to use DEBUG (#1657) 2024-01-29 12:20:54 -05:00
cadmic
0f11f2f166
Tweak OPTFLAGS for some files for retail (#1647) 2024-01-29 10:36:41 -05:00
cadmic
98a3238822
Set up disassembly for gc-eu-mq (#1613)
* Disassemble gc-eu-mq

* Add script to report progress with matching

* Fix whitespace

* Change T|None to typing.Optional[T]

* Use typing.List

* More type annotations fixes for old Python versions

* Fix type errors

* More type annotations

* Use typing.Iterator

* Use $(PYTHON) for disassembly

* Don't use grouped targets to support very old Make versions

* Docs: suggest checking MM, mention virtualenv, clarify about expected/

* Update sym_info.py

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

* Sync functions.txt

* Start banned symbol range at 0x10000000

* Also ban symbols from 0xC0000000-0xFFFFFFFF

* Unban IPL symbols

* Fix first_diff.py

* Sync z_collision_check functions.txt

* Ban 0xA0 symbols too

* Touch .disasm sentinel file

* Copy -jN comment in docs

* diff.py flags: remove -3, add -s

* Update docs/retail_versions.md

Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>

* Comment that segments are still from the Debug ROM

* Revert "diff.py flags: remove -3, add -s"

This reverts commit bfaae66c1d.

* Apply suggestions from code review

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

* Remove #ifdef example

* Reformat Python files with black

* Add copyright notice to new Python files

* Add TODOs to Makefile

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-01-28 18:09:03 +01:00