Skip to content

100% Match / Linked Dolphin SDK#736

Open
zcanann wants to merge 3 commits into
bfbbdecomp:mainfrom
zcanann:pr/sdk
Open

100% Match / Linked Dolphin SDK#736
zcanann wants to merge 3 commits into
bfbbdecomp:mainfrom
zcanann:pr/sdk

Conversation

@zcanann

@zcanann zcanann commented Apr 19, 2026

Copy link
Copy Markdown

Process for creating this PR, agent assisted:

  • Pulled in about ~10 decomp projects with good SDK progress
  • Created python scripts to signature match our incomplete SDK code against games with similar SDKs
  • Relentlessly copy the code from similar games until it matched and linked.
  • Internet searches were NOT used in this. Only existing decomp projects (TP, TWW, MP4, Pikmin 2, etc)

@github-actions

Copy link
Copy Markdown

main/dolphin/src/os/OS

Section From To Bytes
.text 99.99% 100.00% +/-0
Function From To Bytes
OSInit 99.96% 100.00% +/-0

main/dolphin/src/os/OSThread

Section From To Bytes
.text 99.99% 100.00% +/-0
Function From To Bytes
__OSThreadInit 99.94% 100.00% +/-0

main/dolphin/src/os/init/__start

Section From To Bytes
.init 0.00% 100.00% +768
Function From To Bytes
__check_pad3 0.00% 100.00% +64
__set_debug_bba 0.00% 100.00% +12
__get_debug_bba 0.00% 100.00% +8
__start 0.00% 100.00% +348
__init_registers 0.00% 100.00% +144
__init_data 0.00% 100.00% +192

main/dolphin/src/os/init/__ppc_eabi_init

Section From To Bytes
.init 0.00% 100.00% +88
Function From To Bytes
__init_hardware 0.00% 100.00% +36
__flush_cache 0.00% 100.00% +52

Comment thread src/dolphin/src/os/OS.c

extern u8 __ArenaHi[];
extern u8 __ArenaLo[];
extern u8 __ArenaHi[] AT_ADDRESS(0x81800000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address should not be hardcoded. It gets pulled from the linker script.

Comment thread src/dolphin/src/os/OS.c
extern u8 __ArenaHi[];
extern u8 __ArenaLo[];
extern u8 __ArenaHi[] AT_ADDRESS(0x81800000);
extern u8 __ArenaLo[] AT_ADDRESS(0x803D9A60);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address should not be hardcoded. It gets pulled from the linker script.

}

extern u8 _stack_addr[];
extern u8 _stack_addr[] AT_ADDRESS(0x803D8A50);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address should not be hardcoded. It gets pulled from the linker script.

Comment thread src/dolphin/src/os/OS.c
"<< Dolphin SDK - OS\trelease build: Apr 17 2003 12:33:06 (0x2301) >>";
// needs to be "<< Dolphin SDK - DSP\trelease build: Apr 17 2003 12:34:16 (0x2301) >>"?
extern char _db_stack_end[];
extern char _db_stack_end[] AT_ADDRESS(0x803D8A50);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address should not be hardcoded. It gets pulled from the linker script.

Comment thread include/dol2asm.h

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?
Using __declspec regularly is perfectly fine for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants