mslsupp.o 100%

This commit is contained in:
shibbo 2024-04-08 20:30:37 -04:00
parent 46f742fdac
commit 200c14d407
8 changed files with 84 additions and 10 deletions

View File

@ -43,7 +43,7 @@ def main(compile_non_matching, use_ninja, clean_ninja, link):
includes = f"-i {msl_path} " includes = f"-i {msl_path} "
flags += includes flags += includes
default_compiler_path = pathlib.Path("../../Compilers/Wii/1.7/") default_compiler_path = pathlib.Path("../../Compilers/Wii/1.1/")
compiler_exceptions = { compiler_exceptions = {
#"source\JSystem\JKernel\JKRHeap.cpp": pathlib.Path("GC/1.2.5/") #"source\JSystem\JKernel\JKRHeap.cpp": pathlib.Path("GC/1.2.5/")

View File

@ -90,8 +90,8 @@ TRKTargetAccessMemory,targimpl.o,TRK_Hollywood_Revolution.a,true
TRKValidMemory32,targimpl.o,TRK_Hollywood_Revolution.a,false TRKValidMemory32,targimpl.o,TRK_Hollywood_Revolution.a,false
TRKSaveExtended1Block,mpc_7xx_603e.o,TRK_Hollywood_Revolution.a,false TRKSaveExtended1Block,mpc_7xx_603e.o,TRK_Hollywood_Revolution.a,false
TRKRestoreExtended1Block,mpc_7xx_603e.o,TRK_Hollywood_Revolution.a,false TRKRestoreExtended1Block,mpc_7xx_603e.o,TRK_Hollywood_Revolution.a,false
__TRK_write_console,mslsupp.o,TRK_Hollywood_Revolution.a,false __TRK_write_console,mslsupp.o,TRK_Hollywood_Revolution.a,true
__read_console,mslsupp.o,TRK_Hollywood_Revolution.a,false __read_console,mslsupp.o,TRK_Hollywood_Revolution.a,true
InitMetroTRK,dolphin_trk.o,TRK_Hollywood_Revolution.a,false InitMetroTRK,dolphin_trk.o,TRK_Hollywood_Revolution.a,false
InitMetroTRK_BBA,dolphin_trk.o,TRK_Hollywood_Revolution.a,false InitMetroTRK_BBA,dolphin_trk.o,TRK_Hollywood_Revolution.a,false
TRKInitializeTarget,dolphin_trk.o,TRK_Hollywood_Revolution.a,false TRKInitializeTarget,dolphin_trk.o,TRK_Hollywood_Revolution.a,false

1 Symbol Name Object File Library Archive Matching
90 TRKValidMemory32 targimpl.o TRK_Hollywood_Revolution.a false
91 TRKSaveExtended1Block mpc_7xx_603e.o TRK_Hollywood_Revolution.a false
92 TRKRestoreExtended1Block mpc_7xx_603e.o TRK_Hollywood_Revolution.a false
93 __TRK_write_console mslsupp.o TRK_Hollywood_Revolution.a false true
94 __read_console mslsupp.o TRK_Hollywood_Revolution.a false true
95 InitMetroTRK dolphin_trk.o TRK_Hollywood_Revolution.a false
96 InitMetroTRK_BBA dolphin_trk.o TRK_Hollywood_Revolution.a false
97 TRKInitializeTarget dolphin_trk.o TRK_Hollywood_Revolution.a false

View File

@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "MetroTRK", "label": "MetroTRK",
"message": "50.089%", "message": "51.776%",
"color": "blue" "color": "blue"
} }

View File

@ -1,3 +1,3 @@
| Library | Percentage | | Library | Percentage |
| ------------- | ------------- | | ------------- | ------------- |
| [TRK_Hollywood_Revolution](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/TRK_Hollywood_Revolution.md) | 50.0897343862168% | | [TRK_Hollywood_Revolution](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/TRK_Hollywood_Revolution.md) | 51.776740847092604% |

View File

@ -25,7 +25,7 @@
| string_TRK.o | 100.0% | 1 / 1 | 100.0% | :white_check_mark: | string_TRK.o | 100.0% | 1 / 1 | 100.0% | :white_check_mark:
| targimpl.o | 89.88023952095809% | 27 / 28 | 96.42857142857143% | :eight_pointed_black_star: | targimpl.o | 89.88023952095809% | 27 / 28 | 96.42857142857143% | :eight_pointed_black_star:
| mpc_7xx_603e.o | 0.0% | 0 / 2 | 0.0% | :x: | mpc_7xx_603e.o | 0.0% | 0 / 2 | 0.0% | :x:
| mslsupp.o | 0.0% | 0 / 2 | 0.0% | :x: | mslsupp.o | 100.0% | 2 / 2 | 100.0% | :white_check_mark:
| dolphin_trk.o | 0.0% | 0 / 6 | 0.0% | :x: | dolphin_trk.o | 0.0% | 0 / 6 | 0.0% | :x:
| main_TRK.o | 0.0% | 0 / 1 | 0.0% | :x: | main_TRK.o | 0.0% | 0 / 1 | 0.0% | :x:
| dolphin_trk_glue.o | 28.289473684210524% | 6 / 13 | 46.15384615384615% | :eight_pointed_black_star: | dolphin_trk_glue.o | 28.289473684210524% | 6 / 13 | 46.15384615384615% | :eight_pointed_black_star:
@ -216,8 +216,8 @@
# mslsupp.o # mslsupp.o
| Symbol | Decompiled? | | Symbol | Decompiled? |
| ------------- | ------------- | | ------------- | ------------- |
| __TRK_write_console | :x: | | __TRK_write_console | :white_check_mark: |
| __read_console | :x: | | __read_console | :white_check_mark: |
# dolphin_trk.o # dolphin_trk.o

View File

@ -0,0 +1,9 @@
#ifndef MSLSUPP_H
#define MSLSUPP_H
#include "TRK_Types.h"
typedef void* __ref_con;
typedef s32 IOError;
#endif // MSLSUPP_H

View File

@ -19,4 +19,10 @@ typedef enum MemoryAccessOptions
kDebuggerMemory kDebuggerMemory
} MemoryAccessOptions; } MemoryAccessOptions;
typedef enum ValidMemoryOptions
{
kValidMemoryReadable,
kValidMemoryWriteable
} ValidMemoryOptions;
#endif // TARGIMPL_PPC_H #endif // TARGIMPL_PPC_H

View File

@ -1,5 +1,64 @@
#include <size_t.h> #include <size_t.h>
#include "portable/mslsupp.h"
#include "TRK_Types.h"
int __TRK_write_console(unsigned long handle, unsigned char *buffer, size_t* count, void *proc) { inline IOError __access_file(u32 handle, u8 *buffer,
return 0; size_t *count, __ref_con ref_con, u8 read);
IOError __read_file(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con);
/* it will not inline __write_file but it matches otherwise */
static IOError __TRK_write_console(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con) {
if ((GetUseSerialIO() & 0xFF) == 0) {
return 1;
}
return __write_file(1, buffer, count, ref_con);
}
IOError __read_file(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con) {
return __access_file(handle, buffer, count, ref_con, 0xD1);
}
inline IOError __write_file(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con) {
return __access_file(handle, buffer, count, ref_con, 0xD0);
}
/* these ar*/
inline IOError __access_file(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con, u8 read) {
u8 err;
u32 local_count;
if (GetTRKConnected() == 0) {
return 1;
}
local_count = (u32)*count;
err = TRKAccessFile((u8)(read), (u32)handle, &local_count, (u8 *)buffer);
*count = (size_t)local_count;
switch (err) {
case 0:
err = 0;
break;
case 2:
err = 2;
break;
default:
err = 1;
break;
}
return err;
}
/* there are odd issues going on with __read_file but I don't care enough to figure out what. it matches otherwise */
IOError __read_console(u32 handle, u8 *buffer, size_t *count, __ref_con ref_con) {
if ((GetUseSerialIO() & 0xFF) == 0) {
return 1;
}
return __read_file(0, buffer, count, ref_con);
} }