File tree Expand file tree Collapse file tree 5 files changed +28
-2
lines changed Expand file tree Collapse file tree 5 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include < cstdint>
4
+
5
+ namespace gc ::os {
6
+
7
+ extern " C" {
8
+
9
+ extern uint32_t OSBusClock;
10
+
11
+ }
12
+
13
+ }
Original file line number Diff line number Diff line change
1
+ // os
2
+ // data
3
+ 800000F8:OSBusClock
4
+
1
5
// __mem.c
2
6
800050B4:memset
3
7
// 800050E4:__fill_mem
Original file line number Diff line number Diff line change
1
+ // os
2
+ // data
3
+ 800000F8:OSBusClock
4
+
1
5
// __mem.c
2
6
800050B4:memset
3
7
// 800050E4:__fill_mem
Original file line number Diff line number Diff line change
1
+ // os
2
+ // data
3
+ 800000F8:OSBusClock
4
+
1
5
// __mem.c
2
6
800050B4:memset
3
7
// 800050E4:__fill_mem
Original file line number Diff line number Diff line change 3
3
#include " commonfunctions.h"
4
4
#include " menufunctions.h"
5
5
6
+ #include < gc/os.h>
6
7
#include < ttyd/system.h>
7
8
8
9
#include < cstdio>
@@ -118,8 +119,8 @@ const char *getValueString(int32_t slot)
118
119
}
119
120
case time:
120
121
{
121
- uint32_t * ConsoleBusSpeed = reinterpret_cast < uint32_t *>( 0x800000F8 ) ;
122
- uint32_t TimeBase = * ConsoleBusSpeed / 4 ;
122
+ uint32_t ConsoleBusSpeed = gc::os::OSBusClock ;
123
+ uint32_t TimeBase = ConsoleBusSpeed / 4 ;
123
124
uint32_t FPS = getCurrentFPS ();
124
125
125
126
int64_t CurrentTime = *reinterpret_cast <int64_t *>(Address) / (TimeBase / FPS);
You can’t perform that action at this time.
0 commit comments