Commit Graph

160 Commits

Author SHA1 Message Date
Tharo 43a3ad88dc
Handwritten asm build prep, add handwritten asm for the code segment (#1807)
* Convert entry.s to IDO, use objcopy instead of ipl3.s and audio/lib/stack.s, add handwritten asm for the code segment

* Fix disasm, review comments

* Other suggestions
2025-07-31 13:00:42 -04:00
Derek Hensley 13d92a413b
Misc Fixes (#1809)
* EnAn MsgScriptCallback

* Version check

* Write .extracted-assets.json to outputDir

* Fix m2ctx

* Fix boot_functions.csv
2025-05-25 19:10:03 -07:00
Derek Hensley 530e6d7fe7
Seperate baserom segments dir from output dir (#1802) 2025-05-24 09:58:06 -04:00
Tharo a4056abd3c
Split RSP files (#1806) 2025-04-11 21:17:26 -07:00
Dragorn421 679ae89099
Macroify MML opcodes (#1798)
* Macroify MML opcodes

* format

* sync w/ oot: shorten macro names, -DMML_VERSION in Makefile
2025-02-23 06:41:05 -08:00
Derek Hensley 61961fb938
Remove asm-processor in favor of preprocess.sh (#1760)
* Remove asm-processor in favor of preprocess.sh

* Remove duplicate CMD_F

* preprocess_pragmas gitignore

* Mac fixes

* Macos + clang as cc check fixes

* Need quotes for paths with spaces

* Fix bss
2025-02-21 18:02:19 -08:00
Derek Hensley 1241a8ca5c
Move spec to spec folder (#1790) 2025-02-02 13:37:38 -08:00
Tharo 84a89c8f46
GCC Compiler Support (#1791)
* GCC Compiler Support

* Update mkldscript
2025-02-02 13:15:55 -08:00
Sirius902 89b7bb0d71
Fix /bin/bash -> /usr/bin/env bash (#1793) 2025-01-29 21:16:26 -08:00
Derek Hensley c767f49455
Extract Incbins (#1776)
* extract incbins infastructure

* rspboot incbin

* rsptext incbin

* rspdata incbin

* aspMainStack incbin

* ipl3 incbin
2025-01-27 13:15:16 -03:00
Tharo 37e5653755
Add makefile rule to build sample blobs out of assets/ (#1787) 2025-01-20 09:53:59 -08:00
Tharo 06b06ab507
Check in makerom files (#1758)
* Check in makerom files

* Fix disasm for asm files in src
2024-12-22 15:48:13 -08:00
Tharo 5a9c2871ed
Move gAudioTatumInit and gAudioHeapInitSizes to their own file, using data-with-rodata instead of const qualifiers (#1771)
* Do not qualify gAudioHeapInitSizes with const under AVOID_UB

* Move gAudioTatumInit and gAudioHeapInitSizes to their own file, move data to rodata

* Space
2024-12-21 12:41:28 +11:00
Anghelo Carvajal f8fe09531f
Port over macOS fix
Co-authored-by: cadmic <cadmic24@gmail.com>
2024-12-17 08:05:59 -08:00
Derek Hensley 9e2ef99d2e
Ports over OoT's version config (#1750)
* Port over version_config from OoT

* extract_text

* remove need for calling by python modules

* Remove extract audio comment

* Newline

* pyyaml
2024-12-13 18:54:39 -08:00
Tharo fc8d1165c8
[Audio 9/9] Loose ends (#1755)
* [Audio 9/9] Loose ends

* Fix sampleconv memset bug

* Doc updates from oot
2024-12-13 16:27:45 -08:00
Dragorn421 fcc5cf828d
libu64 (#1705)
* libu64

* libu64 -O2

* Add libu64.md
2024-11-07 17:27:19 -08:00
Derek Hensley f946162a89
Extract assets to extracted (#1708) 2024-10-15 22:41:48 +11:00
Derek Hensley 0514d963d9
Port over OoT's new text pipeline (#1685)
* Port OoT's new msgdis and msgenc

* format

* Remove item_ids try block

* Update assets/text/charmap.txt

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

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-10-12 21:03:44 -03:00
Derek Hensley 7a1e106a9b
Divy out mkdir some more in the makefile (#1701) 2024-09-30 08:03:11 -03:00
Dragorn421 495b9adeea
promote some cc_check warnings to errors (#1687) 2024-09-27 09:35:29 -03:00
Derek Hensley 5c6310306f
Remove include_data_with_rodata spec hack by incremental link of z_game_over (#1691) 2024-09-19 18:22:39 -07:00
Tharo d14e1ac1df
[Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays (#1679)
* [Audio 8/?] Check-in handwritten sequences, build sequences, automate various sfx arrays

* Fix whitespace in aseq.h

* Suggested changes, adjust some MML syntax and add more instruction descriptions

* Special case progress script (#9)

* Hack progress script

* Small adjustment to text fileSectionFixer

* Add the dir of the input .seq file to the list of includes to sequence assembling so that assembler-level includes like .include or .incbin work intuitively

* Remove old comment that was missed before

* aseq.h tweaks

* Review suggestions, aseq.h adjustments

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-09-15 15:26:32 -07:00
Derek Hensley b9ea1c19ab
Remove assets from automatic includes (#1683) 2024-09-10 15:16:56 -03:00
Derek Hensley d925976c82
Small Misc Tooling (#1668)
* Move .extracted_assets.json to extracted folder

* .options.mk

* Move extract assets to tools folder

* .make_options.mk

* gitignore as well

* Remove duplicate import
2024-09-06 13:01:55 -04:00
Dragorn421 e111552e73
Cleanup: Pass all paths to tools rather than tools constructing them (#1669)
* Pass all paths to tools rather than tools constructing them

* review

* fix
2024-09-04 18:07:41 -07:00
Tharo 7210cfac2f
[Audio 6/?] Build Soundfonts and the Soundfont Table (#1675)
* [Audio 6/?] Build Soundfonts and the Soundfont Table

* Fix bss

* Maybe fix warnings

* Improve lots of error messages

* Suggested changes from OoT PR

* Suggested changes

* 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
2024-08-27 18:09:48 -07:00
Tharo 98d9571f51
[Audio 5/?] Build the Samplebank Table (#1674)
* [Audio 5/?] Build the Samplebank Table

* OoT suggested changes

* Fix format specifier

* Moved linker_scripts files used in final linker to linker_scripts/final

* Populate OTHER_DIRS with linker_scripts subdirs

* Unhide the partial link command
2024-08-17 17:02:57 -04:00
Tharo 7209abbec2
[Audio 4/?] Build Samplebanks, match Audiotable (#1672)
* [Audio 4/?] Build Samplebanks, match Audiotable

* 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

* Try fix mkdir from clean

* Try fix 2
2024-08-14 17:55:45 -07:00
Tharo b286111666
[Audio 3/?] Set up building samples (#1671)
* [Audio 3/?] Set up building samples

* AIFF -> SAMPLE
2024-08-11 11:41:38 -04:00
Tharo 6c4896d947
[Audio 1/?] Extract Samplebanks and Soundfonts to XML (#1666)
* [Audio 1/?] Extract Samplebanks and Soundfonts to XML

* Remove config.py in view of using config yamls for addresses in the future, implement suggested changes from OoT review

* Remove some commented out dead code, adjust setup-audio in makefile

* Move audio extraction from setup to assets in makefile
2024-08-08 14:11:38 +10:00
Derek Hensley 803ff1fb15
Another General Cleanup (#1651)
* add z64player.h include to z_player.c

* NULL check in func_80AEE374

* Couple formating things

* parameter R_PICTO_PHOTO_STATE

* Remove COLPOLY_NORMAL_FRAC

* DynaPolyActor_Init transformFlags

* Float in ObjDriftice_Init

* aspMainStack

* Add gbi defines to m2ctx

* Add GBI_DEFINES to COMMON_DEFINES in makefile instead of duplicating it

* Add version to build include for m2ctx

* Invadepoh includes

* Sort calc_bss includes like makefile
2024-07-13 14:15:12 -04:00
Tharo 3682a13ec5
Format gbi.h, move ucode defines to makefile (#1650)
* Format gbi.h, move ucode defines to makefile, correct usage of gDPSetDither

* UCODE_DEFS -> GBI_DEFINES, add GBI_DOWHILE toggle

* Define GBI_DOWHILE for bss calculations

* Makefile thing
2024-06-23 12:51:44 -04:00
Derek Hensley f26e77ba40
More General Cleanup (#1638)
* LINKER_FILES in makefile

* COLPOLY_GET_NORMAL

* math header

* libc

* M_PI for cosf and sinf files

* MAXFLOAT

* Revert "MAXFLOAT"

This reverts commit 96b75ffaa8.

* Remove SHT_MINV

* SHRT_MAX

* Add M_PI

* Angle macros

* f suffix

* Format
2024-06-03 14:33:03 -04:00
Derek Hensley 659e2b5088
Use `gcc -E` for `cpp` (#1639)
* Fix cpp for macs?

* Add comment

* Move cppflags with cpp
2024-05-26 20:01:31 -07:00
Derek Hensley a3a7b551ed
various makefile adjustments (#1635) 2024-05-19 10:43:14 -07:00
Anghelo Carvajal a04f1b8e05
Change tooling for better elf correctness (#1632)
* Add addresses for makerom and boot segments

* Mark entrypoint as the entry of the elf

* Add extra labels to macro.inc

* Use dlabel, jlabel and endlabel in disassembly

* Make jlabel global

* git subrepo pull tools/asm-processor

subrepo:
  subdir:   "tools/asm-processor"
  merged:   "92b9ec72f"
upstream:
  origin:   "git@github.com:simonlindholm/asm-processor.git"
  branch:   "main"
  commit:   "92b9ec72f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Use `dlabel`s for non-functions in .text

* Add linker asserts

* Move framebuffer_lo to before the makerom segment to avoid `dot moved backwards` warnings

* fix

* Improve assert message

* fix

* Third fix

* Fix four

* Move undefined_syms to linker_script folder

* Make second linker script file to avoid abusing undefined_syms

* Update Makefile

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

* Rename to extra.ld

* Use entrypoint symbol on ROM header

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2024-05-17 06:41:23 -07:00
Derek Hensley de69d62800
New Romheader format (#1628) 2024-05-17 09:00:45 -04:00
Derek Hensley 471d86f530
Build Sync (#1600)
* Rename outputs

* Makefile target renames

* Add run target

* yeet z64compress

* venv

* baserom_uncompressed -> baserom-decompressed

* input rom name to baserom.z64

* Add BUILD_DIR makefile variable

* Move built roms to build dir

* Move baserom to baseroms folder

* Add version to map file name

* Makefile cleanup

* Rename ldscript to include version

* Multiversion build

* n64-us version name

* Remove venv as dependency of setup

* Readme wording

* extract_baserom.py suggestion

* Readd checksums

* Make .venv work with windows

* missed an endif

* Cleaner windows venv implementation

* Remove duplciate process

* Build process steps

* Move make_options back

* Fix schedule build directory

* Fix schedule includes

* Makefile NON_MATCHING check -> != 0

* OOT 1704 changes

* Small cleanups

* Missed 1 thing

* UNSET -> SYMS

* Update extract_baserom.py

* dmadata.py

* Small cleanup

* dmadata_start

* Format

* dmadata files

* Fix makefile comment

* Jenkins report fix

* extracted dir

* Python dependencies order in readme
2024-04-06 11:07:58 -07:00
Derek Hensley 250be53cde
Add Shift-JIS support for some voice and message files (#1500)
* z_message iconv

* voicecheckword iconv

* format

* TODO

* voice_external iconv

* Missed a few in message

* Use shiftjis_conv instead

* space comment in message_nes

* Use chars for cases

* Add ending single quote check as well

* table comments

* No look up table

* align makefile tools
2024-03-31 20:24:06 -07:00
Anghelo Carvajal 5db52cfd39
A higher level language for schedule scripts (#1462)
* schedule script

* start something

* tokenize

* make a tree

* start to emit macros

* start to handle args

* handle branch targets

* cleanup a bit

* script to convert the current schedule scripts to the new language

* Add schedule compilation to Makefile

* Fix bug on compiler if the script doesn't have an extra empty line

* Allow to have `else`s without braces

* convert a lot of schedules

* door

* en_tk

* fix some checks being the wrong way around

* borkens

* door borken schedules

* kafei schedule

* postman schedule

* Implement `if_since_time_*` command

* Allow `if`s to not have an `else`

* Implement some debugging options

* fix another one from door

* D_808675D0

* door D_8086775C

* don't print else if there isn't one

* start supporting labels

* rewrite comment handling

* add branch support

* emit debugging information

* postman and one door

* the remaining scripts

* add tokens for the non _s/_l versions

* meh

* Add built schedules

* Remove _s/_l suffixes from almost every command

* TokenProperties

* Move macros and length into TokenProperties

* move short and long to TokenType

* rename member

* some cleanups

* fatalError

* Write various notes on the compiler

* more errors and comments

* debug flags

* Move the built schedules to the build folder

* manually cleanup control flow of many schedule scripts

* cleanup postman schedule

* start write up

* write more stuff

* write a little more

* Start writing about the commands

* 2 more commands

* more

* almost everything, except returns

* hopefully finish documenting the commands

* cleanup

* formal grammar

* Table of contents

* typo

* Rename schc.py

* remove todo

* Warn if a if_before_time/if_since_time is negated

* Add colors to warnings and errors

* delete rebuild schedules script

* version

* Apply suggestions from code review

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

* suggestions on md file

* compiler review

* invented is invented

* ScheduleScript typedef

* fix

* Convert Anju's schedule to the new format

* simplify anju's schedule

* forgot to remove `_s`/`_l`

* bss

* Rework schc to allow multiple scripts per file

* Migrate all the schedules to the new format

* update language specification

* Update docs/schedule_scripting_language.md

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update docs/schedule_scripting_language.md

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-02-01 09:50:32 -03:00
Anghelo Carvajal 2c600ddd3d
Build tools rework (#1542)
* yeet libyaz0

* replace elf2rom

* makeyar.py

* some cleanup

* Yeet unused tools

* format scripts

* Review

* review

* Rework checksummer.py to modify input file instead
2024-01-31 14:52:07 +11:00
Derek Hensley fe6494187e
Text Extraction + some Message Docs (#1530)
* Some Decoder WIPs

* Improvements

* POC

* Fix bss

* another newline

* Staff OK

* Cleanup + fix progress script

* script cleanup

* Some docs

* makefile

* Extract text from extract_assets.py

* More docs

* Even more docs

* Other message assets

* Small cleanups

* Clean up decoders/encoders

* Message_SetupLoadItemIcon -> Message_DecodeHeader

* Some more docs

* Remove mkdmadata

* Fade Skippable

* More cmd docs

* 1 left

* Last notes

* HS_TIMER -> HS_TIME

* More general docs

* Format

* Note the charmap conversion for buttons in message_data_fmt_nes.h

* Remove trailing whitespace

* Small fixes

* PR
2024-01-19 21:16:57 -03:00
Derek Hensley 6412ddad50
General Cleanup (#1529)
* Cleanup

* vi define cleanup

* kdebugserver

* osmotor

* Remove sqrtf.c

* Move osFlash out of libultra

* PadUtils_Destroy

* BOOT_ADDRESS_ULTRA

* Fault

* Format

* viconfig.h

* More small cleanups

* gfx cleanup

* Format

* Forgot to save

* variables.h

* dListTable -> dListSides

* Fix header includes
2024-01-15 10:03:13 +11:00
Derek Hensley 1611c22212
Dmadata Migration (#1526)
* Matching dmatable

* Generate NON_MATCHING dmadata

* Clean up dmamgr

* Format

* Ignore tools/buildtools/mkdmadata

* Warnings

* Use SYMS flag instead of segment name

* PR + more notes

* PR cleanups
2024-01-14 13:04:53 -03:00
louist103 697e73f995
Allow the mips tool chain to be picked via command argument (#1532)
* makefile change

* move variable
2024-01-14 12:48:07 -03:00
Anghelo Carvajal 7649cd309a
Organize `libc` and `libm` files (#1499)
* memmove

* strcpy

* strcmp

* memset

* fmodf

* fix some missing includes

* Remove libc header dependencies on libultra

* fix

* review
2023-11-28 13:01:14 +11:00
Anghelo Carvajal 6dd1600936
Organize `libc64` files (#1492)
* Move qrand to libc64

* use an union to avoid type punning

* __osMalloc

* math64.c

* fixed_point.h

* sleep

* aprintf.h

* sprintf

* malloc

* use original names on aprintf.c and malloc.c

* qrand cleanup pass

* use original names of sleep.c

* og names for sprintf

* more cleanup

* format

* fixes

* whoops

* use ARRAY_COUNT again

* comment

* Use `fu`

* forgot this one

* review

* fix

* sneak a tiny cleanup
2023-11-27 12:01:42 +11:00
Anghelo Carvajal f276d2b0e6
Enable `-Wint-conversion` warning (#1266)
* fixing some warnings

* more pointer fixing

* Use `-Wno-int-conversion` on audio files

* more progress

* fix

* more pointer fixes

* kinda progress

* Fix remaining casts

* Format

* fix merge

* fix warnings

* fix parameter

* use SEGMENT_ROM_START_OFFSET a bit more

* format

* fix audio warnings

* some more fixes

* fix en_go

* review

* review

* whoops, missing cast

* review

* review

* ->data

* format

* review

* fix

* asPtr

* fix

* Update src/code/sched.c

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

* review

* fix in EnDnh

* improve format

* engo

* format

* fix

* format

* Update include/z64.h

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

* TexturePtr

* fix warnings

* fix warnings

* format

* fix

* review

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2023-11-02 10:07:38 +11:00
Anghelo Carvajal c3b19739c6
`map_grand_static` and `map_i_static` (#1443)
* update makeyar.c

* xmls

* commit c files

* remove paddings and update the spec

* Tell ZAPD to not generate C files for the 2 problematic XMLs

* Rename symbols to follow style

* cleanup the generated files a bit

* comment on makeyar

* fix distclean deleting the `assets/c/` files

* actually fix distclean
2023-10-26 21:07:13 +11:00