Skip to content

Commit cf60af2

Browse files
KooShnoosnailspeed3
authored andcommitted
configure host_system
1 parent e647778 commit cf60af2

File tree

8 files changed

+55
-310
lines changed

8 files changed

+55
-310
lines changed

config/RMCP01/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# See config.example.yml for documentation.
21
object_base: orig/RMCP01
32
object: sys/main.dol
43
hash: ac7d72448630ade7655fc8bc5fd7a6543cb53a49
54
symbols: config/RMCP01/symbols.txt
65
splits: config/RMCP01/splits.txt
7-
# Change this to match the linker verison.
8-
# See config.example.yml for a list.
96
mw_comment_version: 14
107

118
modules:

config/RMCP01/splits.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ ppc_eabi_exception_handlers.c:
2222
__mem.c:
2323
.init start:0x80005F34 end:0x80006068
2424

25-
SystemResource.o:
25+
SystemResource.cpp:
2626
.text start:0x80007F50 end:0x80007F7C
2727
.rodata start:0x80245010 end:0x802450B0
2828

29-
RKSystem.o:
29+
RKSystem.cpp:
3030
.text start:0x80008E84 end:0x80009BC0
3131
.ctors start:0x80244DE4 end:0x80244DE8
3232
.rodata start:0x80245938 end:0x80245A18

configure.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@
206206
"-DREVOKART",
207207
"-func_align 4",
208208
# "-sym dwarf-2",
209+
210+
"-i ./include",
211+
"-i ./src",
212+
"-i lib/MSL/include",
213+
"-i lib", # just for now, individual include directories for each lib is tidier
214+
209215
]
210216

211217
# Debug flags
@@ -221,6 +227,15 @@
221227
"-inline auto",
222228
]
223229

230+
# HostSys flags
231+
cflags_host_sys = [
232+
*cflags_base,
233+
"-ipa file",
234+
"-rostr",
235+
"-str noreuse",
236+
"-use_lmw_stmw=on",
237+
]
238+
224239
# MSL flags
225240
cflags_msl = [
226241
*cflags_base,
@@ -291,10 +306,6 @@
291306
"-lang=c++",
292307
"-pragma \"legacy_struct_alignment on\"",
293308

294-
" -i lib/MSL/include "
295-
" -i lib " # just for now, individual include directories for each lib is tidier
296-
" -i ./include -i ./src ",
297-
298309
"-DREL",
299310
]
300311

@@ -341,6 +352,17 @@ def MatchingFor(*versions):
341352
config.warn_missing_config = True
342353
config.warn_missing_source = False
343354
config.libs = [
355+
{
356+
"lib": "HostSys",
357+
"mw_version": "Wii/0x4201_127",
358+
"cflags": cflags_host_sys,
359+
"progress_category": "game",
360+
"src_dir": "src/host_system",
361+
"objects": [
362+
Object(NonMatching, "SystemResource.cpp"),
363+
Object(NonMatching, "RKSystem.cpp"),
364+
],
365+
},
344366
{
345367
"lib": "Runtime.PPCEABI.H",
346368
"mw_version": config.linker_version,

include/decomp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
#include <rk_types.h>
44

5-
#ifdef __CWCC__
6-
75
#define UNKNOWN_FUNCTION(...)
86
#define UNKNOWN_DATA(...)
97

8+
#ifdef __CWCC__
9+
10+
1011
#pragma section RW "flow_check"
1112
#define SECTION_FLOW_CHECK __declspec(section "flow_check")
1213
#define MARK_FLOW_CHECK(start) \

lib/egg/core/eggSystem.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55

66
#pragma once
77

8-
#include <rk_types.h>
8+
#include <egg/core/eggController.hpp>
9+
#include <egg/core/eggDvdFile.hpp>
10+
#include <egg/core/eggGraphicsFifo.hpp>
11+
#include <egg/core/eggXfb.hpp>
912

1013
#include <decomp.h>
1114

1215
#include <rvl/dvd.h>
16+
#include <rvl/gx.h>
1317
#include <rvl/sc.h>
1418

15-
struct GXRenderModeObj;
19+
extern void Exception_create(int, int, int, EGG::Heap*, int);
1620

1721
namespace EGG {
1822

lib/rvl/kpad/kpad.h

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -66,56 +66,16 @@ typedef struct KPADUnifiedWpadStatus {
6666
u8 padding;
6767
} KPADUnifiedWpadStatus;
6868

69-
// PAL: 0x801950a0..0x801950b4
70-
UNKNOWN_FUNCTION(KPADSetFSStickClamp);
71-
// PAL: 0x801950b4..0x801950d0
72-
UNKNOWN_FUNCTION(KPADSetPosParam);
73-
// PAL: 0x801950d0..0x80195124
74-
UNKNOWN_FUNCTION(KPADSetHoriParam);
75-
// PAL: 0x80195124..0x801952f8
76-
UNKNOWN_FUNCTION(reset_kpad);
77-
// PAL: 0x801952f8..0x8019548c
78-
UNKNOWN_FUNCTION(calc_button_repeat);
79-
// PAL: 0x8019548c..0x80195540
80-
UNKNOWN_FUNCTION(calc_acc);
81-
// PAL: 0x80195540..0x801956d4
82-
UNKNOWN_FUNCTION(calc_acc_horizon);
83-
// PAL: 0x801956d4..0x801957f8
84-
UNKNOWN_FUNCTION(calc_acc_vertical);
85-
// PAL: 0x801957f8..0x80195c60
86-
UNKNOWN_FUNCTION(read_kpad_acc);
87-
// PAL: 0x80195c60..0x80195e48
88-
UNKNOWN_FUNCTION(select_2obj_first);
89-
// PAL: 0x80195e48..0x80196070
90-
UNKNOWN_FUNCTION(select_2obj_continue);
91-
// PAL: 0x80196070..0x80196224
92-
UNKNOWN_FUNCTION(select_1obj_first);
93-
// PAL: 0x80196224..0x80196398
94-
UNKNOWN_FUNCTION(select_1obj_continue);
95-
// PAL: 0x80196398..0x80196964
96-
UNKNOWN_FUNCTION(calc_dpd_variable);
97-
// PAL: 0x80196964..0x80196dbc
98-
UNKNOWN_FUNCTION(read_kpad_dpd);
99-
// PAL: 0x80196dbc..0x80196ee4
100-
UNKNOWN_FUNCTION(clamp_stick_circle);
101-
// PAL: 0x80196ee4..0x80197108
102-
UNKNOWN_FUNCTION(clamp_stick_cross);
103-
// PAL: 0x80197108..0x80197380
104-
UNKNOWN_FUNCTION(read_kpad_stick);
105-
// PAL: 0x80197380..0x80197aac
106-
UNKNOWN_FUNCTION(KPADRead);
107-
// PAL: 0x80197aac..0x80197da0
108-
UNKNOWN_FUNCTION(KPADInit);
109-
// PAL: 0x80197da0..0x80197dbc
110-
UNKNOWN_FUNCTION(KPADDisableDPD);
111-
// PAL: 0x80197dbc..0x80197dd8
112-
UNKNOWN_FUNCTION(KPADEnableDPD);
113-
// PAL: 0x80197dd8..0x801980b0
114-
UNKNOWN_FUNCTION(KPADiSamplingCallback);
115-
// PAL: 0x801980b0..0x8019812c
116-
UNKNOWN_FUNCTION(KPADiControlDpdCallback);
117-
// PAL: 0x8019812c..0x801981ec
118-
UNKNOWN_FUNCTION(KPADGetUnifiedWpadStatus);
69+
void KPADInit();
70+
71+
void KPADSetBtnRepeat(s32, f32, f32);
72+
void KPADSetSensorHeight(s32, f32);
73+
void KPADSetPosParam(s32, f64, f64);
74+
void KPADSetHoriParam(s32, f64, f64);
75+
void KPADSetDistParam(s32, f64, f64);
76+
77+
void KPADReset(void);
78+
s32 KPADRead(s32, KPADStatus [], u32);
11979

12080
#ifdef __cplusplus
12181
}

0 commit comments

Comments
 (0)