Import parameters.s from ultralib and cleanup undefined syms, fix accidental change in makefile

This commit is contained in:
Mr-Wiseguy 2024-08-30 22:01:08 -04:00
parent fd89ad5560
commit 87f630370e
5 changed files with 38 additions and 17 deletions

View File

@ -34,7 +34,7 @@ CC := ido/ido5.3_recomp/cc
CPP := cpp
GCC := $(CROSS)gcc
AS := $(CROSS)as
LD := LD_LIBRARY_PATH=../../papermario ../../papermario/mips-linux-gnu-ld.bfd -b elf32-tradbigmips
LD := $(CROSS)ld -b elf32-tradbigmips
OBJDUMP := $(CROSS)objdump
OBJCOPY := $(CROSS)objcopy
PYTHON := python3
@ -166,7 +166,7 @@ OPT_FLAGS := -O2
MIPSBIT := -mips2
ASFLAGS := -EB -mtune=vr4300 -march=vr4300 -mabi=32 -I include
GCC_ASFLAGS := -c -x assembler-with-cpp -mabi=32 -ffreestanding -mtune=vr4300 -march=vr4300 -mfix4300 -G 0 -O -mno-shared -fno-PIC -mno-abicalls
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T undefined_syms.libultra.txt
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T manual_syms.txt
BINOFLAGS := -I binary -O elf32-tradbigmips
### Rules ###

View File

@ -0,0 +1,17 @@
#include "PR/R4300.h"
#include "sys/asm.h"
#include "sys/regdef.h"
.text
ABS(leoBootID, 0x800001a0)
ABS(osTvType, 0x80000300)
ABS(osRomType, 0x80000304)
ABS(osRomBase, 0x80000308)
ABS(osResetType, 0x8000030c)
ABS(osCicId, 0x80000310)
ABS(osVersion, 0x80000314)
ABS(osMemSize, 0x80000318)
ABS(osAppNMIBuffer, 0x8000031c)
.space 0x60
/* padded to 0x60 in the object file */

17
asm/ultra/parameters.s Normal file
View File

@ -0,0 +1,17 @@
#include "PR/R4300.h"
#include "sys/asm.h"
#include "sys/regdef.h"
.text
ABS(leoBootID, 0x800001a0)
ABS(osTvType, 0x80000300)
ABS(osRomType, 0x80000304)
ABS(osRomBase, 0x80000308)
ABS(osResetType, 0x8000030c)
ABS(osCicId, 0x80000310)
ABS(osVersion, 0x80000314)
ABS(osMemSize, 0x80000318)
ABS(osAppNMIBuffer, 0x8000031c)
.space 0x60
/* padded to 0x60 in the object file */

View File

@ -65,7 +65,7 @@ segments:
- [0x3870, hasm, maptlbrdb]
- [0x38D0, c, done/pirawread]
- [0x3930, c, done/ll]
- [0x3BF0, bin, padding3BF0] # Empty space
- [0x3BF0, hasm, ultra/parameters]
- [0x3C50, c, done/virtualtophysical]
- [0x3CD0, c, done/si]
- [0x3D00, c, done/thread]
@ -237,7 +237,7 @@ segments:
- [0xF3F820, c, gu/sinf] #DONE
- [0xF3F9E0, c, audio/cents2ratio] #DONE
- [0xF3FA30, c, audio/heapinit] #DONE
- [0xF3FA70, asm, padding] # 0x60 bytes of zeroes?
- [0xF3FA70, hasm, ultra/parameters] #DONE
- [0xF3FAD0, c, os/createmesgqueue] #DONE
- [0xF3FB00, c, io/aisetfreq] #DONE
- [0xF3FC60, c, audio/sl] #DONE

View File

@ -1,10 +1,3 @@
/* Fixed-address libultra symbols */
osTvType = 0x80000300;
osRomBase = 0x80000308;
osResetType = 0x8000030C;
osCicId = 0x80000310;
osAppNMIBuffer = 0x8000031C;
/* Microcode renames to match ucode.h names */
n_aspMainTextStart = _binary_bin_core1_n_aspMain_text_bin_start;
n_aspMainTextEnd = _binary_bin_core1_n_aspMain_text_bin_end;
@ -30,12 +23,6 @@ gOverlayTable = 0x803FFE10;
D_803A5D00 = 0x803A5D00; /* framebuffers */
/* Renames for the boot segment */
boot_osTvType = osTvType;
boot_osRomBase = osRomBase;
boot_osResetType = osResetType;
boot_osCicId = osCicId;
boot_osAppNMIBuffer = osAppNMIBuffer;
boot_D_8002D500 = D_8002D500;
boot_core1_VRAM = core1_VRAM;
boot_D_803FBE00 = D_803FBE00;