Skip to content

Commit

Permalink
Merge pull request #122 from RevoSucks/shifting
Browse files Browse the repository at this point in the history
mostly stable shifting; some minor stuff in battle is still unstable
  • Loading branch information
RevoSucks authored Sep 6, 2024
2 parents bcc8200 + 50d3362 commit 2a4766d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* 6MB depending on osMemSize, which is really strange as it should be using the whole
* 8MB of the expansion pak.
*/
extern u8 gPool[1];
extern u8 gPool[];

extern Gfx* gDisplayListHead;

Expand Down
4 changes: 2 additions & 2 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ gSoftResetLineNum = 0x800A7300;
gSoftResetRed = 0x800A7308;
gSoftResetGreen = 0x800A730C;
gSoftResetBlue = 0x800A7310;
gControllers = 0x800A7320; //defined:true
gControllers = 0x800A7320; //defined:true size:0x90
fragment1_ROM_START = 0x7F980; // defined:true
fragment1_misc_yay0_ROM_START = 0xADC80; // defined:true
fragment2_ROM_START = 0x107FA0; // defined:true
Expand Down Expand Up @@ -232,7 +232,7 @@ _79AFB0_ROM_START = 0x79AFB0; // defined:true
_79AFB0_ROM_END = 0x79B8F0; // defined:true
D_86002B84 = 0x86002B84; // size:3
D_86002B88 = 0x86002B88; // size:3
F3DEX2_bin = 0x80066090;
_binary_assets_us_F3DEX2_bin_start = 0x80066090; // defined:true
F3DEX2_data_bin = 0x8007E650;
D_87A01178 = 0x87A01178;
D_87A01180 = 0x87A01180;
Expand Down
4 changes: 2 additions & 2 deletions src/dp_intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ extern struct UnkArray4 D_8008474C;

extern s32 D_80068B70;

extern u64 F3DEX2_bin[];
extern u64 _binary_assets_us_F3DEX2_bin_start[];
extern u64 F3DEX2_data_bin[]; // F3DEX2_data.bin
extern u64 D_80084860[0x1];
extern u64 D_80085870[0x1];
Expand Down Expand Up @@ -110,7 +110,7 @@ void func_80001380(struct UnkStruct80001380* arg0) {
arg0->task.t.flags = 0;
arg0->task.t.ucode_boot = D_80084760;
arg0->task.t.ucode_boot_size = 0x100;
arg0->task.t.ucode = F3DEX2_bin;
arg0->task.t.ucode = _binary_assets_us_F3DEX2_bin_start;
arg0->task.t.ucode_data = F3DEX2_data_bin;
arg0->task.t.ucode_size = 0x1000;
arg0->task.t.ucode_data_size = 0x800;
Expand Down
2 changes: 1 addition & 1 deletion src/heap.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "global.h"

u8 gPool[1]; // unk determinate size.
u8 gPool[0x80600000-0x80100000]; // unk determinate size. Large generic size to compile.
14 changes: 9 additions & 5 deletions yamls/us/rom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,15 @@
- [0x66B50, lib, libultra, sethwinterrupt]

#- [0x66BC0, asm]
- [0x66BC0, bin]
- [0x66C90, bin, F3DEX2]
- [0x68020, bin] # rest of rom part 1
- [0x66BC0, data]
- [0x66C90, data, F3DEX2]
- [0x68020, data, unk_F3DEX2_68020]
- [0x68C80, data, unk_F3DEX2_68C80]

# .data is somewhere in here
# .data
- [0x69770, data, rom_data_69770] # dp_intro
- [0x69790, .data, util]
- [0x697A0, bin, rom_data_697A0]
- [0x697A0, data, rom_data_697A0]
- [0x697B0, .data, 6BC0]
- [0x697C0, .data, stage_loader]
- [0x6A1B0, .data, crash_screen]
Expand Down Expand Up @@ -488,6 +490,7 @@
bss_size: 0x0 # This heap extends to the end of RAM.
start: 0x7F980
vram: 0x80104BB0
follows_vram: text
subsegments:
# .bss
- {vram: 0x80104BB0, type: .bss, name: heap}
Expand Down Expand Up @@ -2424,6 +2427,7 @@
- [0x79AFB0, bin]
- [0x79B8F0]


# rest of ROM.. part 2. This area and beyond NEEDS to be hard-aligned to this address.
# for the ROM to be shiftable, we need a way to fix this area beyond here to this address and for the prior area
# to be filled with FFs instead of being binned. TODO: Make it shift
Expand Down

0 comments on commit 2a4766d

Please sign in to comment.