Compare commits

...

1 Commits

Author SHA1 Message Date
coah
b2dcf13c43 Describe existing MetroTRK trap entries as sized functions 2026-10-02 03:36:30 -05:00
2 changed files with 38 additions and 25 deletions

View File

@@ -13802,10 +13802,10 @@ __ieee754_sqrt = .text:0x8160CD34; // type:function size:0x248
nan = .text:0x8160CF7C; // type:function size:0x4
sqrt = .text:0x8160CF80; // type:function size:0x4
GetTRKConnected = .text:0x8160CF84; // type:function size:0x10
TRKAccessFile = .text:0x8160CFA0; // type:function
TRKOpenFile = .text:0x8160CFA8; // type:function
TRKCloseFile = .text:0x8160CFB0; // type:function
TRKPositionFile = .text:0x8160CFB8; // type:function
TRKAccessFile = .text:0x8160CFA0; // type:function size:0x8
TRKOpenFile = .text:0x8160CFA8; // type:function size:0x8
TRKCloseFile = .text:0x8160CFB0; // type:function size:0x8
TRKPositionFile = .text:0x8160CFB8; // type:function size:0x8
__TRK_write_console = .text:0x8160CFC0; // type:function size:0xBC
__read_console = .text:0x8160D07C; // type:function size:0xBC
EnableMetroTRKInterrupts = .text:0x8160D138; // type:function size:0x20

View File

@@ -1,32 +1,45 @@
// Yes, versions other than 4.3U align by 8.
#if defined(VERSION_43U)
#pragma function_align 32
#else
#pragma function_align 8
#endif // VERSION_43U
#endif
#include <TRK_Hollywood_Revolution.h>
#pragma force_active on
// Encapsulating function to get the file to align properly
asm void __targsupp() {
// clang-format off
#ifdef __MWERKS__
// clang-format off
asm DSIOResult TRKAccessFile(MessageCommandID cmd, unsigned int handle, int* count, unsigned char* buffer) {
#ifdef __MWERKS__
nofralloc
entry TRKAccessFile
twi 31, r0, 0
blr
entry TRKOpenFile
twi 31, r0, 0
blr
entry TRKCloseFile
twi 31, r0, 0
blr
entry TRKPositionFile
twi 31, r0, 0
blr
#endif // __MWERKS__
// clang-format on
twi 31, r0, 0
blr
#endif
}
#pragma function_align 8
asm DSIOResult TRKOpenFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
asm DSIOResult TRKCloseFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
asm DSIOResult TRKPositionFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
// clang-format on