114 Commits
Author SHA1 Message Date
Oliver Bell bde11f1f03 document mp_finish 2026-05-14 19:11:49 +01:00
Oliver Bell 0b412b575f de-duplicate shared samples 2026-05-10 15:39:39 +01:00
Oliver Bell 0199c9305b sa1 ports in ci, update readme, remove ps2 folder (#264) 2026-05-07 22:01:41 +01:00
Oliver Bell 6dae6451ed sa1: use sa2 makefile, fix port 2026-05-04 02:09:00 +01:00
Oliver Bell cc2110e85d Move SA1 to root
* name some engine globals (gSpriteTransform*)
* move the whole sa1 directory to the root
2026-05-02 23:39:11 +01:00
Oliver Bell d485fedd3a split backgrounds from camera.c and merge sa1 and sa2 camera.c 2026-04-26 18:23:08 +01:00
Oliver Bell 9bbcf20ec5 sa1: match finish handler, reference more shared from sa2 2026-04-11 23:38:27 +01:00
Oliver Bell 6801ab7bde sa1: migrate more source to root 2026-04-08 18:06:59 +01:00
Oliver Bell d355f290fe more changes for sa1 sa2 merge
- Migrate specific game headers into their own folders
- Remove headers from sa1 codebase which can be referenced from sa2
2026-04-07 23:06:16 +01:00
Oliver Bell eca97cd122 sa2: fix ps2 build 2026-04-03 14:30:05 +01:00
Oliver Bell c1de9a3a13 sa2: migrate data into sa2 sub directory 2026-04-03 09:47:08 +01:00
Oliver Bell 4f00252d7d reuse graphics makefile, more cleanup 2026-03-28 08:18:26 +00:00
Oliver Bell f18e445007 remove sa1 tools 2026-03-28 07:52:30 +00:00
Oliver Bell 763812acc3 use libagbsyscall for all builds (#249) 2026-03-25 10:52:35 +00:00
JaceCear 9da592bb8e Make palettes format-independent, and other improvments (#242)
* Remove unused RED|GREEN|BLUE_VALUE macros

* preproc: Add basic support for loading .pal files directly via INCPAL()

* Some potential boss_8 render fixes and misc. stuff

* Use INCPAL macro in src/data/sprite_animation.c (but that file's is unused rn?)

* Fix non-main-Makefiles not using preproc properly

* Remove all INCBIN(.gbapal) uses with INCPAL(.pal) in ./src

* Move gSpritePalettes to C

* Rename palette to time_display_singlepak.pal

* Remove obj_palettes.inc

* Use ColorRaw for known palettes

* Fix time_display match

* Rename palette to sound_test_bg.pal

* Add comment and scratch to sub_80236C8

* Use PALETTE_LEN_4BPP

* Document a vocal sample name. Thanks 'Asal (in Harmony)' for letting us know!

* Document palette names in /graphics

* Fix boss palette names

* Renmae to sBoss7Palettes

* Some Boss 7 documentation

* Add ShredWindowsGarbage to win32

* Make PLTT a Color[] in non-vanilla builds

* Make Tilemap use INCPAL
2026-03-17 23:00:00 +00:00
Oliver Bell 59706b53c1 Create PSP and PS2 ports, switch to gpsp renderer, optimise audio (#235)
- Update software renderer to the gpsp renderer (fast enough to render on slow hardware)
- Convert audio emulation to fixed point (since float is slower on these systems)
- Add PSP as a target for SDL
- Add PS2 as its own target, though it's still using software rendering

Thanks to @kikugrave for adding the initial psp boilerplate and inspiring me to finally finish the ps2 port!
2026-03-04 02:10:03 +00:00
JaceCear 293787148b More SA1 alignment (#230)
* SA1 alignment

* Rename SpriteBase::spriteX -> meX

* Rename FLAGS_10 -> FLAGS_EXECUTE_VBLANK_CALLBACKS

* Align task.h with SA3

* Align core.c more with SA3

* Align core.c data with SA3

* Align task.h with SA1

* Align more with SA3

* Align task.h with SA1

* Align task.h with SA3

* Align task.c with SA1|SA3

* Align core.c with SA3

* Align EngineMainLoop with SA3

* Align core.c with SA3

* Some tools alignment with SA1

* Align Makefile with SA1

* Make BG_PLTT and OBJ_PLTT u16*

* Align with SA3

* Make BG_PLTT|OBJ_PLTT accessible as an array. Fix erroneous #if.

* Address USE_SA2_TASK_SYSTEM use from commit comments
2025-12-19 16:32:46 +01:00
Oliver Bell 4f7a8e1232 beta: match beta rom 2025-09-21 15:59:17 +01:00
Oliver Bell 776d203252 vc: start vc match 2025-09-17 00:58:46 +01:00
JaceCear 64bd7a996c Various background rendering fixes for Action Stages. (#216)
* Fix Hot Crater BG wrap at bottom of screen

* Remove CV2PDB

* Fix Music Plant BG wrap at bottom of screen

* Fix Ice Paradise BG wrap at bottom of screen

* Fix Sky Canyon background rendering at bottom of screen

* Adjust Sky Canyon background rendering

* Remove purple background effect in Techno Base in non-vanilla targets

* Fix Egg Utopia (Outside) background rendering at bottom of screen

* Fix garbage memory getting displayed in Sky Canyon

* Minor documentation
2025-08-18 22:13:07 +01:00
Oliver Bell 64620d9a5d collect_rings: setup songs for sa2 copy 2025-06-17 00:23:57 +01:00
Oliver Bell a50397b821 collect_rings: more splitting 2025-05-20 21:18:35 +01:00
Oliver Bell 4babb9afe8 fix build 2025-05-19 10:59:17 +01:00
Oliver Bell 4ba7a11101 document m4a in collect rings, rework collect rings make file for root source referencing 2025-05-19 01:18:49 +01:00
Oliver Bell 199c5020f5 document the rally championship rom 2025-02-13 20:40:45 +00:00
Oliver Bell 7bf4860079 match Task_801951C 2025-02-12 01:11:46 +00:00
Oliver Bell dbfadea0ea fix make ctx.c 2025-02-09 21:27:49 +00:00
JaceCear dfc8b5ef6c Keep consistency between SA1 and SA2 (#201)
* Align .gitignore with SA1

* Small adjustments for Makefile parity

* Document gMPRingCollectWins

* Rename gUnknown_030054F8 -> gNumSingleplayerCharacters

* Add note from pret

* Minor improvements in stage.c

* Align Task_GameStage with SA1

* Fix type of gUnknown_0300543C

* Align HandleLifeLost with SA1

* Rename sub_80299FC -> DestroyPlayerTasks

* Rename sub_801B68C -> DestroyStageTasks
2025-02-08 00:05:43 +00:00
Oliver Bell b4f0acff62 add automated TAS execution in CI (#202)
* add macos builds to CI
* Remove devkitpro instructions
2025-02-04 23:53:29 +00:00
Oliver Bell 1ec87f4337 simplify tidy 2025-01-30 15:49:35 +00:00
Oliver Bell 55a73a6e6d migrate to new scaninc, remove unused deps, fix make tidy 2025-01-30 01:11:49 +00:00
Oliver Bell d5294aafb9 switch to pre-processor for genctx, move some scripts 2025-01-23 17:06:16 +00:00
Oliver Bell fbe407a074 fix the rest of special stage, improvements to sdl rendering 2025-01-19 20:08:45 +00:00
Oliver Bell cf4d8ecaed refactor makefile and fix path issues with spaces in pwd (#188) 2025-01-15 21:11:22 +00:00
JaceCear 2a0cb85533 (WIP) First initial groundwork implementation of OpenGL backend (#183)
* Fix nullpointer crash in stage intro, when starting the Extra Boss stage

* Add first NOT-WORKING (WIP) pass on OpenGL renderer in win32

* Address #ifdef comment

* Fix capitalization
2025-01-12 00:44:30 +01:00
Oliver Bell 58e515ee45 remove level editor from tools build 2025-01-06 23:44:08 +00:00
Oliver Bell 78ade1816b some bug fixes and better instructions 2025-01-06 22:27:47 +00:00
JaceCear 57376092f0 Various RAM map documentation and alignment with SA3 (#175)
* Various documentation and alignment with SA3

* Extract input_recorder.c .data section from core.c, as in SA3

* Align multi_sio.c with SA3

* Document parameters of DisplaySprites

* Document centerOffsetX/Y in DisplaySprites

* Only display copyright note

* Split GAME_ and ENGINE_ macros

* Use ENGINE macros in core.c

* Rename game<->engine interface procedures

* Remove searching in /src for header files in genctx.py

* Fix global.h<->config.h dependency in genctx.py

* Only enable Task logging in debug versions

* Fix uses of DEBUG, remove TEST_GFX_POINTERS because current gfx copy implementation already makes it redundant

* Use 64bit as default target in Win SDL

* Align some files with sa1 and sa3

* Align sprite.c and other files closer with sa1 and sa3

* Various documentation

* Some dodumentation and cleanup from SA1 core.c integration

* Rename sa1_leftovers/ -> sa1_sa2_shared/

* Put gEwramHeap into ewram_data section
2024-12-28 21:12:56 +01:00
JaceCearandOliver Bell 1f8bee518d Implement m4a for PC (#166)
* Refactor m4a for better names
* Bring in m4a PC backend code
* Update songs data to work on 64bit
* Move m4a to it's own folder
* Add linker map to sdl build

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-10-28 11:07:36 +00:00
Oliver Bell 59162a153a fix make tools race condition again 2024-10-19 16:00:39 +01:00
Oliver Bell deedab5a88 fix issues with shared tools makefiles 2024-10-19 12:50:54 +01:00
Oliver Bell d91060c9f5 stop if make tools fails 2024-10-18 19:48:25 +01:00
Oliver Bell 325b55d280 change makefile so that we dont need agbcc for the sdl build (#163)
* change makefile so that we dont need agbcc for the sdl build

* fix makefile

* fix build
2024-10-18 20:24:07 +02:00
Oliver Bell 18cd42721f README fixes, potential fix to GFX compilation, fix make tools with -j from main makefile 2024-10-18 17:32:31 +01:00
1bc34d0ac8 Move Animation data to C, fix native sdl build (#157)
* Remove and move comments to the correct procedures

* Fix regular SDL compilation

* Move animation data from Asm to C

* Layout the anim macros in a common way. Add Big Endian support to them (I think?)

* add CI for sdl objs, fix some of the build on linux

* make native macos work

---------

Co-authored-by: bitten2up <bitten2up@courvix.com>
Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-10-10 01:07:04 +01:00
JaceCear 8fdd433a2b Some matching improvements, documentation and make fixes (#151)
* Some cleanup for sub_802DF18, but still non-matching

* Almost match sub_802E278, down to one add instr

* Some grind variable documentation

* Fix some of the logic in sub_801EE64

* Some general documentation

* Document Bouncy Bar tasks and fix compilation

* Some documentation in rotating handle

* Fix standalone compile/link

* Add standalone build CI

* Fix copy-paste of Q_24_8

* Align whitespace

* Potential random crash fix

* Add some DMA doc to standalone

* Remove old nonmatch ASM and add SDL comment

* Cleanup and #ifdef fix in player.c
2024-07-28 23:25:50 +02:00
JaceCear cd970ffda0 Minor adjustments for stage select (#149)
* Minor adjustments for stage select

* Document RenderText

* Remove old, unused tilesets. Add debug_text tileset
2024-07-12 20:58:34 +02:00
JaceCear 564b3b876c More matches, Sprite.unk10 -> .frameFlags, Sprite.unk1A -> .oamFlags (#148)
* Match sub_802966C, fixing some control issues

* Some additions to Task_CreateStageUnknownTask

* Make CreateCharacterSelectionScreen scratch more recent

* Cleanup

* boss_run.s data -> boss_run.c

* Merge boss_run and boss_8

* Rename BOSS_8_ARM_ -> ARM_, since it's a local macro, anyway

* Remove boss_run from ldscript

* Remove data stubs

* Inline StageInit_SetMusic as was probably the case originally

* Some documentation

* Minor documentation

* Sprite.unk10 -> .frameFlags

* Sprite.unk1A -> .oamFlags

* Formatter...

* Set all Sprite.oamFlags values using SPRITE_OAM_ORDER macro

* Minor documentation

* Get logic of sub_8004860 to match the game closer, but ASM percentage is worse.

* Fix big parts of sub_8004860's logic, still not matching very well

* Rename sub_8004860 -> TransformSprite

* Minor cleanup

* Add potential fix for tile copying

* Reorder DMA offsets

* Add SDL fullscreen (Alt+Return)

* Formatter

* SPRITE_MAYBE_SWITCH_ANIM -> SPRITE_INIT_ANIM_IF_CHANGED

* Add graphics queue macros

* Reorder for compiler flags

* Add GFX Queue macros and logging

* Reformulate task logging

* Reorder compiler flags

* Minor boss8 cleanup

* Use new DMA layout

* Replace Div and Mod calls with macros

* Minor cleanup

* Add EXTENDED_OAM (WIP)

* Camera.unk38|.unk3C -> .dx|.dy

* Split logging output

* Fix syntax error
2024-07-03 01:07:19 +01:00
JaceCearandOliver Bell fcbaf7b7c1 Boss 9 (#146)
* Move Boss_9 data to C

* sRGB_080D8E20 hex -> dec

* First pass on CreateTrueArea53Boss

* Move CreateTrueArea53Boss into non-matching

* Rename remaining MoveBossPositionFuncs

* Move TrueArea53BossMove into non-match

* Match Task_EggmanKidnapsVanilla

* Match Task_TrueArea53BossMain

* Match sub_804D8E0

* Match Task_804D9DC

* Match Task_804DB34

* More Boss 9 progress

* Make upper bound in PseudoRandBetween() exclusive, since many calls suggest this being the original pattern

* Match sub_804E078

* Move sub_804E15C into non-matching

* Start sub_804E4CC

* Move sub_804E4CC into non-match

* Match sub_804E66C

* Match sub_804E74C

* Match sub_804E974

* Move sub_804F1EC into non-matching

* Match sub_804F47C

* Match sub_804F5BC

* More progress

* Move sub_804F850 into non-matching

* Match sub_804FD58

* Match sub_804FE24, sub_804FEFC and sub_804FF9C

* Move sub_8050030 and sub_8050104 into non-matching

* Temporarily move sub_8050104 and sub_80501D4 into non-matching

* Almost match sub_8050958

* Remove boss_9.s

* Remove old stubs

* Minor cleanup and fix crash in Zone 3's background

* Add missing pointer refs in CreateTrueArea53Boss

* Almost match sub_80505B8 (basically on-par with sub_80501D4

* Ollie matched sub_80501D4 and sub_80505B8

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Tilemap unknown_stars -> music_plant_moving_stars

* Add DEBUG macro

* Progress on CreateTrueArea53Boss

* Some fixes for CreateTrueArea53Boss

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-06-19 12:37:24 +02:00
Oliver Bell b035c69cce finish boss 7 data 2024-05-27 08:21:46 +08:00