diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index 1305d937..c1c1640a 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -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 diff --git a/libs/MetroTRK/src/Export/targsupp.c b/libs/MetroTRK/src/Export/targsupp.c index d0fe54d3..fd43894c 100644 --- a/libs/MetroTRK/src/Export/targsupp.c +++ b/libs/MetroTRK/src/Export/targsupp.c @@ -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 #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