-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathN64ModernRuntime.patch
463 lines (434 loc) · 18.3 KB
/
N64ModernRuntime.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
diff --git a/librecomp/include/librecomp/game.hpp b/librecomp/include/librecomp/game.hpp
index 37bab29..236b94b 100644
--- a/librecomp/include/librecomp/game.hpp
+++ b/librecomp/include/librecomp/game.hpp
@@ -20,6 +20,7 @@ namespace recomp {
struct GameEntry {
uint64_t rom_hash;
+ uint64_t decompressed_rom_hash;
std::string internal_name;
std::u8string game_id;
std::string mod_game_id;
diff --git a/librecomp/include/librecomp/overlays.hpp b/librecomp/include/librecomp/overlays.hpp
index bb1bd9f..ecc87c0 100644
--- a/librecomp/include/librecomp/overlays.hpp
+++ b/librecomp/include/librecomp/overlays.hpp
@@ -42,5 +42,7 @@ namespace recomp {
extern "C" void load_overlays(uint32_t rom, int32_t ram_addr, uint32_t size);
extern "C" void unload_overlays(int32_t ram_addr, uint32_t size);
+extern "C" void map_tlb_overlays(uint32_t tlb_index, int32_t even_phys_addr, int32_t odd_phys_addr, int32_t kuseg_addr, uint32_t page_size);
+extern "C" void unmap_tlb_overlays(uint32_t tlb_index);
#endif
diff --git a/librecomp/src/ai.cpp b/librecomp/src/ai.cpp
index 0195f2b..bc9b93a 100644
--- a/librecomp/src/ai.cpp
+++ b/librecomp/src/ai.cpp
@@ -9,8 +9,8 @@
extern "C" void osAiSetFrequency_recomp(uint8_t* rdram, recomp_context* ctx) {
uint32_t freq = ctx->r4;
// This makes actual audio frequency more accurate to console, but may not be desirable
- //uint32_t dacRate = (uint32_t)(((float)VI_NTSC_CLOCK / freq) + 0.5f);
- //freq = VI_NTSC_CLOCK / dacRate;
+ uint32_t dacRate = (uint32_t)(((float)VI_NTSC_CLOCK / freq) + 0.5f);
+ freq = VI_NTSC_CLOCK / dacRate;
ctx->r2 = freq;
ultramodern::set_audio_frequency(freq);
}
diff --git a/librecomp/src/overlays.cpp b/librecomp/src/overlays.cpp
index ffd7d5f..3063e60 100644
--- a/librecomp/src/overlays.cpp
+++ b/librecomp/src/overlays.cpp
@@ -40,6 +40,20 @@ static std::unordered_map<std::string, size_t> base_events;
extern "C" {
int32_t* section_addresses = nullptr;
+uint32_t* section_sizes = nullptr;
+
+#define TLB_ENTRY_COUNT 32
+
+typedef struct TLBEntry TLBEntry;
+struct TLBEntry {
+ uint8_t valid;
+ uint64_t kuseg_start_addr;
+ uint64_t kuseg_end_addr;
+ uint64_t kseg0_start_addr;
+ uint64_t kseg0_end_addr;
+};
+
+TLBEntry tlb_entries[TLB_ENTRY_COUNT];
}
void recomp::overlays::register_overlays(const overlay_section_table_data_t& sections, const overlays_by_index_t& overlays) {
@@ -126,6 +140,11 @@ void load_overlay(size_t section_table_index, int32_t ram) {
loaded_sections.emplace_back(ram, section_table_index);
section_addresses[section.index] = ram;
+ section_sizes[section.index] = section.size;
+}
+
+void map_tlb_overlay(size_t section_table_index, int32_t kuseg_addr, uint32_t tlb_index) {
+ // ...
}
static void load_special_overlay(const SectionTableEntry& section, int32_t ram) {
@@ -237,9 +256,62 @@ extern "C" void unload_overlays(int32_t ram_addr, uint32_t size) {
}
}
+extern "C" void map_tlb_overlays(uint32_t tlb_index, int32_t even_phys_addr, int32_t odd_phys_addr, int32_t kuseg_addr, uint32_t page_size) {
+ int32_t even_kseg0_addr = even_phys_addr | 0x80000000;
+ int32_t odd_kseg0_addr = odd_phys_addr | 0x80000000; // TODO: Ignoring the odd page address for now...
+
+ // Account for both the even and odd pages.
+ page_size *= 2;
+
+ for (const auto& loaded_section : loaded_sections) {
+ const SectionTableEntry& section = sections_info.code_sections[loaded_section.section_table_index];
+ int32_t offset_into_section = even_kseg0_addr - loaded_section.loaded_ram_addr;
+ int32_t loaded_ram_end_addr = loaded_section.loaded_ram_addr + section_sizes[loaded_section.section_table_index];
+ int32_t kseg0_end_addr = even_kseg0_addr + (page_size - 1);
+
+ // Align the end of the loaded region to the next page boundary.
+ loaded_ram_end_addr = (loaded_ram_end_addr + (page_size - 1)) & ~(page_size - 1);
+
+ // Check if the section falls within the TLB entry range.
+ if (even_kseg0_addr >= loaded_section.loaded_ram_addr && even_kseg0_addr <= loaded_ram_end_addr) {
+ for (size_t function_index = 0; function_index < section.num_funcs; function_index++) {
+ const FuncEntry& func = section.funcs[function_index];
+ int32_t func_kseg0_addr = loaded_section.loaded_ram_addr + func.offset;
+
+ // Check if the function falls within the TLB entry range.
+ if (func_kseg0_addr >= even_kseg0_addr && func_kseg0_addr <= kseg0_end_addr) {
+ func_map[kuseg_addr + func.offset - offset_into_section] = func.func;
+ }
+ }
+
+ // Update the TLB entry to include the section.
+ tlb_entries[tlb_index].valid = 1;
+ tlb_entries[tlb_index].kuseg_start_addr = kuseg_addr;
+ tlb_entries[tlb_index].kuseg_end_addr = kuseg_addr + (page_size - 1);
+ tlb_entries[tlb_index].kseg0_start_addr = loaded_section.loaded_ram_addr;
+ tlb_entries[tlb_index].kseg0_end_addr = loaded_ram_end_addr;
+ }
+ }
+}
+
+extern "C" void unmap_tlb_overlays(uint32_t tlb_index) {
+ // Invalidate the TLB entry.
+ tlb_entries[tlb_index].valid = 0;
+
+ // Clear the function map of any functions that were within the range of the TLB entry.
+ for (auto it = func_map.begin(); it != func_map.end();) {
+ if (it->first >= (int32_t)tlb_entries[tlb_index].kuseg_start_addr && it->first <= (int32_t)tlb_entries[tlb_index].kuseg_end_addr) {
+ it = func_map.erase(it);
+ } else {
+ ++it;
+ }
+ }
+}
+
void recomp::overlays::init_overlays() {
func_map.clear();
section_addresses = (int32_t *)calloc(sections_info.total_num_sections, sizeof(int32_t));
+ section_sizes = (uint32_t *)calloc(sections_info.total_num_sections, sizeof(uint32_t));
// Sort the executable sections by rom address
std::sort(§ions_info.code_sections[0], §ions_info.code_sections[sections_info.num_code_sections],
diff --git a/librecomp/src/pak.cpp b/librecomp/src/pak.cpp
index 0be1513..d826cde 100644
--- a/librecomp/src/pak.cpp
+++ b/librecomp/src/pak.cpp
@@ -4,48 +4,97 @@
#include "recomp.h"
#include "helpers.hpp"
+void save_write(RDRAM_ARG PTR(void) rdram_address, uint32_t offset, uint32_t count);
+void save_read(RDRAM_ARG PTR(void) rdram_address, uint32_t offset, uint32_t count);
+
+extern "C" void osPfsInit_recomp(uint8_t* rdram, recomp_context* ctx) {
+ ctx->r2 = 0; // PFS_OK
+}
+
extern "C" void osPfsInitPak_recomp(uint8_t * rdram, recomp_context* ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsFreeBlocks_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsAllocateFile_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsDeleteFile_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ ctx->r2 = 5; // PFS_ERR_INVALID
}
extern "C" void osPfsFileState_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ PTR(OSPfs) pfs = _arg<0, PTR(OSPfs)>(rdram, ctx);
+ s32 file_no = _arg<1, s32>(rdram, ctx);
+ PTR(void) state = _arg<2, PTR(void)>(rdram, ctx);
+
+ // Only the first file is valid.
+ if (file_no == 0) {
+ MEM_W(0, state) = 0x1000; // file_size
+ MEM_W(4, state) = 0x4E473545; // game_code
+ MEM_H(8, state) = 0x4A; // company_code
+
+ for (s32 i = 0; i < 4; i++) {
+ MEM_B(10 + i, state) = 0; // ext_name
+ }
+
+ for (s32 i = 0; i < 16; i++) {
+ MEM_B(14 + i, state) = 0; // game_name
+ }
+
+ ctx->r2 = 0;
+ } else {
+ ctx->r2 = 5; // PFS_ERR_INVALID
+ }
}
extern "C" void osPfsFindFile_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ MEM_W(20, ctx->r29) = 0;
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsReadWriteFile_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ PTR(OSPfs) pfs = _arg<0, PTR(OSPfs)>(rdram, ctx);
+ s32 file_no = _arg<1, s32>(rdram, ctx);
+ u8 flag = _arg<2, u8>(rdram, ctx);
+ s32 offset = _arg<3, s32>(rdram, ctx);
+ s32 size_in_bytes = MEM_W(16, ctx->r29);
+ PTR(u8) data = MEM_W(20, ctx->r29);
+
+ assert(file_no == 0);
+
+ if (flag == 0) {
+ save_read(rdram, data, offset, size_in_bytes);
+ } else if (flag == 1) {
+ save_write(rdram, data, offset, size_in_bytes);
+ }
+
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsChecker_recomp(uint8_t * rdram, recomp_context * ctx) {
- ctx->r2 = 1; // PFS_ERR_NOPACK
+ ctx->r2 = 0; // PFS_OK
+}
+
+extern "C" void osPfsIsPlug_recomp(uint8_t* rdram, recomp_context* ctx) {
+ MEM_B(0, ctx->r5) = 1;
+ ctx->r2 = 0; // PFS_OK
}
extern "C" void osPfsNumFiles_recomp(uint8_t * rdram, recomp_context * ctx) {
s32* max_files = _arg<1, s32*>(rdram, ctx);
s32* files_used = _arg<2, s32*>(rdram, ctx);
- *max_files = 0;
- *files_used = 0;
+ *max_files = 1;
+ *files_used = 1;
- _return<s32>(ctx, 1); // PFS_ERR_NOPACK
+ _return<s32>(ctx, 0); // PFS_OK
}
extern "C" void osPfsRepairId_recomp(uint8_t * rdram, recomp_context * ctx) {
- _return<s32>(ctx, 1); // PFS_ERR_NOPACK
+ _return<s32>(ctx, 0); // PFS_OK
}
diff --git a/librecomp/src/recomp.cpp b/librecomp/src/recomp.cpp
index 562d382..b9d088a 100644
--- a/librecomp/src/recomp.cpp
+++ b/librecomp/src/recomp.cpp
@@ -148,7 +148,7 @@ bool write_file(const std::filesystem::path& path, const std::vector<uint8_t>& d
bool check_stored_rom(const recomp::GameEntry& game_entry) {
std::vector stored_rom_data = read_file(config_path / game_entry.stored_filename());
- if (!check_hash(stored_rom_data, game_entry.rom_hash)) {
+ if (!check_hash(stored_rom_data, game_entry.decompressed_rom_hash)) {
// Incorrect hash, remove the stored ROM file if it exists.
std::filesystem::remove(config_path / game_entry.stored_filename());
return false;
@@ -180,7 +180,7 @@ bool recomp::load_stored_rom(std::u8string& game_id) {
std::vector<uint8_t> stored_rom_data = read_file(config_path / find_it->second.stored_filename());
- if (!check_hash(stored_rom_data, find_it->second.rom_hash)) {
+ if (!check_hash(stored_rom_data, find_it->second.decompressed_rom_hash)) {
// The ROM no longer has the right hash, delete it.
std::filesystem::remove(config_path / find_it->second.stored_filename());
return false;
@@ -308,6 +308,138 @@ void byteswap_data(std::vector<uint8_t>& rom_data, size_t index_xor) {
}
}
+#define COMMAND_SLIDING_WINDOW_COPY_END 0x7F
+#define COMMAND_SLIDING_WINDOW_COPY_LENGTH_MASK 0x7C
+#define COMMAND_SLIDING_WINDOW_COPY_OFFSET_FIRST_BYTE_MASK 0x03
+#define COMMAND_SLIDING_WINDOW_COPY_OFFSET_MAX_MASK 0x3FF
+
+#define COMMAND_RAW_COPY_END 0x9F
+#define COMMAND_RAW_COPY_LENGTH_MASK 0x1F
+
+#define COMMAND_RLE_WRITE_SHORT_ANY_VALUE_END 0xDF
+#define COMMAND_RLE_WRITE_SHORT_ANY_VALUE_LENGTH_MASK 0x1F
+
+#define COMMAND_RLE_WRITE_SHORT_ZERO_END 0xFE
+#define COMMAND_RLE_WRITE_SHORT_ZERO_LENGTH_MASK 0x1F
+
+#define COMMAND_RLE_WRITE_LONG_ZERO 0xFF
+#define COMMAND_RLE_WRITE_LONG_ZERO_LENGTH_MASK 0xFF
+
+#define SWAP16(x) ((uint16_t)(x) << 8 | (uint16_t)(x) >> 8)
+
+#define SWAP32(x) ((uint32_t)(x) >> 24 | ((uint32_t)(x) & 0x00FF0000) >> 8 | \
+ ((uint32_t)(x) & 0x0000FF00) << 8 | (uint32_t)(x) << 24)
+
+#define SWAP64(x) ((uint64_t)(x) << 56 | ((uint64_t)(x) & 0xFF00ULL) << 40 | \
+ ((uint64_t)(x) & 0xFF0000ULL) << 24 | ((uint64_t)(x) & 0xFF000000ULL) << 8 | \
+ ((uint64_t)(x) >> 8 & 0xFF000000ULL) | ((uint64_t)(x) >> 24 & 0xFF0000ULL) | \
+ ((uint64_t)(x) >> 40 & 0xFF00ULL) | ((uint64_t)(x) >> 56 & 0xFFULL))
+
+size_t decompress_file(const uint8_t *input_buffer, uint8_t *output_buffer, size_t input_size) {
+ size_t input_offset = 4;
+ size_t output_offset = 0;
+
+ uint32_t compressed_size = SWAP32(*(uint32_t *)input_buffer);
+ if (compressed_size > input_size) {
+ return 0;
+ }
+
+ while (input_offset < compressed_size) {
+ uint8_t command = input_buffer[input_offset++];
+
+ if (command <= COMMAND_SLIDING_WINDOW_COPY_END) {
+ uint8_t length = (command & COMMAND_SLIDING_WINDOW_COPY_LENGTH_MASK) >> 2;
+ u16 offset_first_byte = (command & COMMAND_SLIDING_WINDOW_COPY_OFFSET_FIRST_BYTE_MASK) << 8;
+ uint8_t offset_second_byte = input_buffer[input_offset++];
+ u16 offset = (offset_first_byte | offset_second_byte) & COMMAND_SLIDING_WINDOW_COPY_OFFSET_MAX_MASK;
+
+ // Add 2 to get the actual length since 2 is the minimum length.
+ length += 2;
+
+ for (size_t i = 0; i < length; i++) {
+ output_buffer[output_offset] = output_buffer[output_offset - offset];
+ output_offset++;
+ }
+ } else if (command <= COMMAND_RAW_COPY_END) {
+ uint8_t length = command & COMMAND_RAW_COPY_LENGTH_MASK;
+
+ for (size_t i = 0; i < length; i++) {
+ output_buffer[output_offset++] = input_buffer[input_offset++];
+ }
+ } else if (command <= COMMAND_RLE_WRITE_SHORT_ANY_VALUE_END) {
+ uint8_t length = command & COMMAND_RLE_WRITE_SHORT_ANY_VALUE_LENGTH_MASK;
+ uint8_t value = input_buffer[input_offset++];
+
+ // Add 2 to get the actual length since 2 is the minimum length.
+ length += 2;
+
+ for (size_t i = 0; i < length; i++) {
+ output_buffer[output_offset++] = value;
+ }
+ } else if (command <= COMMAND_RLE_WRITE_SHORT_ZERO_END) {
+ uint8_t length = command & COMMAND_RLE_WRITE_SHORT_ZERO_LENGTH_MASK;
+
+ // Add 2 to get the actual length since 2 is the minimum length.
+ length += 2;
+
+ for (size_t i = 0; i < length; i++) {
+ output_buffer[output_offset++] = 0;
+ }
+ } else if (command == COMMAND_RLE_WRITE_LONG_ZERO) {
+ u16 length = input_buffer[input_offset++] & COMMAND_RLE_WRITE_LONG_ZERO_LENGTH_MASK;
+
+ // Add 2 to get the actual length since 2 is the minimum length.
+ length += 2;
+
+ for (size_t i = 0; i < length; i++) {
+ output_buffer[output_offset++] = 0;
+ }
+ } else {
+ // Invalid command.
+ }
+ }
+
+ // Return the output offset as the output size.
+ return output_offset;
+}
+
+size_t decompress_rom(const uint8_t *input_rom_buffer, uint8_t *output_rom_buffer, size_t file_table_offset) {
+ uint32_t *input_file_table_entry = (u32 *)(input_rom_buffer + file_table_offset);
+ uint32_t *output_file_table_entry = (u32 *)(output_rom_buffer + file_table_offset);
+ uint32_t rom_offset = SWAP32(input_file_table_entry[0]) & 0x7FFFFFFF;
+
+ while (input_file_table_entry[0] != 0 && input_file_table_entry[1] != 0) {
+ uint8_t file_is_compressed = (SWAP32(input_file_table_entry[0]) & 0x80000000) >> 31;
+ uint32_t file_offset = SWAP32(input_file_table_entry[0]) & 0x7FFFFFFF;
+ uint32_t file_size = (SWAP32(input_file_table_entry[1]) & 0x7FFFFFFF) - file_offset;
+
+ if (file_is_compressed) {
+ uint8_t *compressed_file = (uint8_t *)(input_rom_buffer + file_offset);
+ uint8_t *decompressed_file = (uint8_t *)(output_rom_buffer + rom_offset);
+
+ file_size = decompress_file(compressed_file, decompressed_file, file_size);
+ } else {
+ memcpy(output_rom_buffer + rom_offset, input_rom_buffer + file_offset, file_size);
+ }
+
+ // Update the table entries for the current and the next file.
+ output_file_table_entry[0] = SWAP32(rom_offset);
+ output_file_table_entry[1] = SWAP32(rom_offset + (file_size + 0xF) & ~0xF);
+
+ rom_offset += (file_size + 0xF) & ~0xF;
+
+ input_file_table_entry++;
+ output_file_table_entry++;
+ }
+
+ return rom_offset;
+}
+
+#define MAXIMUM_ROM_SIZE 0x4000000
+#define FILE_TABLE_OFFSET 0x57FD8
+#define DECOMPRESSED_ROM_CRC_1 0x9CC11F4B
+#define DECOMPRESSED_ROM_CRC_2 0xABAA8538
+
recomp::RomValidationError recomp::select_rom(const std::filesystem::path& rom_path, std::u8string& game_id) {
auto find_it = game_roms.find(game_id);
@@ -355,8 +487,32 @@ recomp::RomValidationError recomp::select_rom(const std::filesystem::path& rom_p
}
}
}
+
+ std::vector<uint8_t> decompressed_rom_data(MAXIMUM_ROM_SIZE);
+ memcpy(decompressed_rom_data.data(), rom_data.data(), rom_data.size());
+
+ size_t final_size = decompress_rom(rom_data.data(), decompressed_rom_data.data(), FILE_TABLE_OFFSET);
+
+ // Align file_size to the nearest power of two. (https://graphics.stanford.edu/%7Eseander/bithacks.html#RoundUpPowerOf2)
+ final_size--;
+ final_size |= final_size >> 1;
+ final_size |= final_size >> 2;
+ final_size |= final_size >> 4;
+ final_size |= final_size >> 8;
+ final_size |= final_size >> 16;
+ final_size++;
+
+ decompressed_rom_data.resize(final_size);
+
+ // Write the CRC values to the header of the decompressed ROM.
+ *(uint32_t *)(decompressed_rom_data.data() + 0x10) = SWAP32(DECOMPRESSED_ROM_CRC_1);
+ *(uint32_t *)(decompressed_rom_data.data() + 0x14) = SWAP32(DECOMPRESSED_ROM_CRC_2);
+
+ if (!check_hash(decompressed_rom_data, game_entry.decompressed_rom_hash)) {
+ return recomp::RomValidationError::OtherError;
+ }
- write_file(config_path / game_entry.stored_filename(), rom_data);
+ write_file(config_path / game_entry.stored_filename(), decompressed_rom_data);
return recomp::RomValidationError::Good;
}
diff --git a/librecomp/src/ultra_stubs.cpp b/librecomp/src/ultra_stubs.cpp
index 9dd263b..160324d 100644
--- a/librecomp/src/ultra_stubs.cpp
+++ b/librecomp/src/ultra_stubs.cpp
@@ -3,10 +3,6 @@
#include "recomp.h"
// None of these functions need to be reimplemented, so stub them out
-extern "C" void osUnmapTLBAll_recomp(uint8_t * rdram, recomp_context * ctx) {
- // TODO this will need to be implemented in the future for any games that actually use the TLB
-}
-
extern "C" void osVoiceInit_recomp(uint8_t * rdram, recomp_context * ctx) {
ctx->r2 = 11; // CONT_ERR_DEVICE
}