First compilation running owo

This commit is contained in:
KiritoDv 2024-04-01 18:23:37 -06:00
parent 8ddbae1a15
commit 110e54c562
6 changed files with 33 additions and 30 deletions

View File

@ -90,9 +90,12 @@ file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
# Exclude specific files from the ALL_FILES list # Exclude specific files from the ALL_FILES list
list(FILTER ALL_FILES EXCLUDE REGEX ".*.inc.c") list(FILTER ALL_FILES EXCLUDE REGEX ".*.inc.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_demo.c") list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_A4290_colheaders.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_versus.c") list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_edata_1C.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_edisplay.c") list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_rcp_setup.c")
list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_load_inits.c")
list(FILTER ALL_FILES EXCLUDE REGEX "src/overlays/ovl_ending/fox_end2_data.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_hud.c") # list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_hud.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_360.c") # list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_360.c")
# list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_beam.c") # list(FILTER ALL_FILES EXCLUDE REGEX "src/main/fox_beam.c")

View File

@ -35,26 +35,26 @@ D_versus_3000380:
D_versus_30003A0: D_versus_30003A0:
{ type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30003A0, symbol: D_versus_30003A0, tlut: 0x30004E0 } { type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30003A0, symbol: D_versus_30003A0, tlut: 0x30004E0 }
D_versus_30004E0: D_versus_30004E0:
{ type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30004E0, symbol: D_versus_30004E0 } { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x30004E0, symbol: D_versus_30004E0 }
BLOB_3000500: # BLOB_3000500:
{ type: BLOB, size: 0x10, offset: 0x3000500, symbol: BLOB_3000500} # 17th color for D_versus_30004E0? # { type: BLOB, size: 0x10, offset: 0x3000500, symbol: BLOB_3000500} # 17th color for D_versus_30004E0?
D_versus_3000510: D_versus_3000510:
{ type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 10, offset: 0x3000510, symbol: D_versus_3000510, tlut: 0x30006A0 } { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 10, offset: 0x3000510, symbol: D_versus_3000510, tlut: 0x30006A0 }
D_versus_30006A0: D_versus_30006A0:
{ type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30006A0, symbol: D_versus_30006A0 } { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x30006A0, symbol: D_versus_30006A0 }
BLOB_30006C0: # BLOB_30006C0:
{ type: BLOB, size: 0x10, offset: 0x30006C0, symbol: BLOB_30006C0} # 17th color for D_versus_30006A0? # { type: BLOB, size: 0x10, offset: 0x30006C0, symbol: BLOB_30006C0} # 17th color for D_versus_30006A0?
D_versus_30006D0: D_versus_30006D0:
{ type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30006D0, symbol: D_versus_30006D0, tlut: 0x3000810 } { type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30006D0, symbol: D_versus_30006D0, tlut: 0x3000810 }
D_versus_3000810: D_versus_3000810:
{ type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000810, symbol: D_versus_3000810 } { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x3000810, symbol: D_versus_3000810 }
BLOB_3000830: # BLOB_3000830:
{ type: BLOB, size: 0x10, offset: 0x3000830, symbol: BLOB_3000830} # 17th color for D_versus_3000810? # { type: BLOB, size: 0x10, offset: 0x3000830, symbol: BLOB_3000830} # 17th color for D_versus_3000810?
D_versus_3000840: D_versus_3000840:
{ type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 10, offset: 0x3000840, symbol: D_versus_3000840, tlut: 0x30008E0 } { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 10, offset: 0x3000840, symbol: D_versus_3000840, tlut: 0x30008E0 }
@ -759,4 +759,3 @@ D_versus_302EB3C:
D_versus_302EC20: D_versus_302EC20:
{type: VEC3F, count: 25, offset: 0x302EC20, symbol: D_versus_302EC20} {type: VEC3F, count: 25, offset: 0x302EC20, symbol: D_versus_302EC20}

View File

@ -201,6 +201,7 @@ extern u8 D_Tex_800DB4B8[];
extern Gfx D_Gfx_800D94D0[]; extern Gfx D_Gfx_800D94D0[];
extern OSTime osClockRate; extern OSTime osClockRate;
u32 osViClock = 0x02E6D354;
#define osViClock 0x02E6D354;
#endif // VARIABLES_H #endif // VARIABLES_H

@ -1 +1 @@
Subproject commit c3113ea894b91127262a31dafd1acb7827982011 Subproject commit 8cbc575218515c5518319e91870c404b86e87c36

View File

@ -1,12 +1,12 @@
#include <libultraship.h> #include <libultraship.h>
extern s32 osViClock; s32 osViClock2 = 0x02E6D354;
s32 osAiSetFrequency(u32 freq) { s32 osAiSetFrequency(u32 freq) {
register u32 a1; register u32 a1;
register s32 a2; register s32 a2;
register float ftmp; register float ftmp;
ftmp = osViClock / (float) freq + .5f; ftmp = osViClock2 / (float) freq + .5f;
a1 = ftmp; a1 = ftmp;
@ -22,5 +22,5 @@ s32 osAiSetFrequency(u32 freq) {
IO_WRITE(AI_DACRATE_REG, a1 - 1); IO_WRITE(AI_DACRATE_REG, a1 - 1);
IO_WRITE(AI_BITRATE_REG, a2 - 1); IO_WRITE(AI_BITRATE_REG, a2 - 1);
IO_WRITE(AI_CONTROL_REG, AI_CONTROL_DMA_ON); // enable dma IO_WRITE(AI_CONTROL_REG, AI_CONTROL_DMA_ON); // enable dma
return osViClock / (s32) a1; return osViClock2 / (s32) a1;
} }

View File

@ -17,10 +17,10 @@ GameEngine* GameEngine::Instance;
GameEngine::GameEngine() { GameEngine::GameEngine() {
std::vector<std::string> OTRFiles; std::vector<std::string> OTRFiles;
if (const std::string cube_path = LUS::Context::GetPathRelativeToAppDirectory("smcube.otr"); std::filesystem::exists(cube_path)) { // if (const std::string cube_path = LUS::Context::GetPathRelativeToAppDirectory("lylat.otr"); std::filesystem::exists(cube_path)) {
OTRFiles.push_back(cube_path); // OTRFiles.push_back(cube_path);
} // }
if (const std::string sm64_otr_path = LUS::Context::GetPathRelativeToAppBundle("lylat.otr"); std::filesystem::exists(sm64_otr_path)) { if (const std::string sm64_otr_path = LUS::Context::GetPathRelativeToAppBundle("sm64.otr"); std::filesystem::exists(sm64_otr_path)) {
OTRFiles.push_back(sm64_otr_path); OTRFiles.push_back(sm64_otr_path);
} }
if (const std::string patches_path = LUS::Context::GetPathRelativeToAppDirectory("mods"); !patches_path.empty() && std::filesystem::exists(patches_path)) { if (const std::string patches_path = LUS::Context::GetPathRelativeToAppDirectory("mods"); !patches_path.empty() && std::filesystem::exists(patches_path)) {
@ -33,7 +33,7 @@ GameEngine::GameEngine() {
} }
} }
this->context = LUS::Context::CreateInstance("Lylat64", "sf64", "lylat.cfg.json", OTRFiles, this->context = LUS::Context::CreateInstance("Lylat64", "sf64", "lylat.cfg.json", OTRFiles,
{0xFF2B5A63, 0xE3DAA4E}, 3); {}, 3);
// this->context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory( // this->context->GetResourceManager()->GetResourceLoader()->RegisterResourceFactory(
// LUS::ResourceType::SAnim, "Animation", std::make_shared<CubeOS::AnimationFactory>()); // LUS::ResourceType::SAnim, "Animation", std::make_shared<CubeOS::AnimationFactory>());
} }