someone2639 c366e0122a Format the Repo (#3)
* set build options

* remove COMPARE and MDOERN_* switches

* remove tools makefile

* AR patching is gone too since we want a fullly decomped version

* AR is modern

* remove cwd changes

* edit my own tool to fix compile errors

* compile files generated with my own tool instead of the originals

* inline modern_gcc makefile

* port mips toolchain detection logic

* add util.mk for find-command

* remove forced AR order and strip/mdebug removal commands

* add -mabi=32 to as flags

* formatting changes

* add clang format files

* formatting changes

* make libgultra CI work

* install mips gcc too

* add format check tools

* Add formatting to CI

* Add CI (#4)

* make libgultra CI work

* install mips gcc too

* remove make setup

---------

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

* we don't use clang-tidy

* use 120 width for formatting

* a

* address clang-tidy messing up

* test

* align consecutive macros and declarations

* only align macros for now

* SpaceAfterCStyleCast: false

* format headers too

* remove cast space switch because its false by default

* pointers on left

* AlignConsecutiveBitFields: true

* install clang-format and clang-tidy on gh actions

* and clang-tools

* show diff in format check tool

* make CI work

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
πŸ™
2025-02-17 22:56:09 -05:00
2025-02-17 22:56:09 -05:00
2024-02-23 21:20:09 -08:00
2025-02-17 22:56:09 -05:00
2025-02-17 22:56:09 -05:00
2025-02-17 22:56:09 -05:00
2025-02-17 22:56:09 -05:00
2024-02-23 21:20:09 -08:00
2025-02-17 22:56:09 -05:00
2024-11-29 01:40:28 +09:00

ultralib

Reverse engineering of libultra

Compatibility

Currently this repo supports building the following versions:

IDO / GCC libultra.a / libgultra.a libultra_d.a / libgultra_d.a libultra_rom.a / libgultra_rom.a
2.0E ❌ / N/A ❌ / N/A ❌ / N/A
2.0F ❌ / N/A ❌ / N/A ❌ / N/A
2.0G ❌ / N/A ❌ / N/A ❌ / N/A
2.0H N/A / ❌ N/A / ❌ N/A / ❌
2.0I βœ”οΈ / βœ”οΈ ❌ / βœ”οΈ βœ”οΈ / βœ”οΈ
2.0I_patch ❌ / ❌ ❌ / ❌ ❌ / ❌
2.0J βœ”οΈ / βœ”οΈ ❌ / βœ”οΈ βœ”οΈ / βœ”οΈ
2.0K βœ”οΈ / βœ”οΈ ❌ / βœ”οΈ βœ”οΈ / βœ”οΈ
2.0L βœ”οΈ / βœ”οΈ ❌ / βœ”οΈ βœ”οΈ / βœ”οΈ
ique_v1.5 ❌ ❌ ❌

Preparation

After cloning the repo, put a copy of the target archive(s) in their correct version folder in base/. For example, if your target archive is libgultra_rom.a 2.0L then you'd place it in base/L/. If you will be building without a target archive by setting COMPARE=0 then you can skip this step.

Build dependencies

The build process requires the following packages:

  • build-essential
  • python3
  • binutils-mips-linux-gnu (libultra* only)

Under Debian / Ubunutu you can install them with the following commands:

sudo apt update
sudo apt install build-essential python3

If building any libultra you can install binutils-mips-linux-gnu with:

sudo apt install binutils-mips-linux-gnu

Building

Run make setup with the proper flags set followed by make with optional jobs. For example, if building the 2.0L PC archive you'd do the following:

  • make VERSION=L TARGET=libgultra_rom setup
  • make VERSION=L TARGET=libgultra_rom

Every target flag combination requires separate a setup command.

If building without an target archive, than you can use COMPARE=0 like the the following:

  • make VERSION=L TARGET=libgultra_rom COMPARE=0 setup
  • make VERSION=L TARGET=libgultra_rom COMPARE=0

note that running setup without COMPARE=0 and no archive will result in an error, and only needs to be run once instead of per target flag combination

If building for use with modern linkers, than you can use MODERN_LD=1 like the following:

  • make VERSION=L TARGET=libgultra_rom MODERN_LD=1 setup
  • make VERSION=L TARGET=libgultra_rom MODERN_LD=1

note that running with MODERN_LD=1 will automatically set COMPARE=0.

It is also possible to build archives using modern gcc by using MODERN_GCC=1 like the following:

  • make VERSION=L TARGET=libgultra_rom MODERN_GCC=1

note that running with MODERN_GCC=1 will automatically set COMPARE=0 and MODERN_LD=0.

Description
No description provided
Readme 3.3 MiB
Languages
C 93%
Assembly 5.4%
Python 0.8%
Makefile 0.8%