mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-28 16:00:40 -04:00
first start with aurora after linking on MSVC
This commit is contained in:
+5
-2
@@ -24,6 +24,8 @@ elseif (APPLE)
|
||||
elseif (MSVC)
|
||||
add_compile_options(/bigobj)
|
||||
add_compile_options(/Zc:strictStrings-)
|
||||
add_compile_options(/MP)
|
||||
add_compile_options(/W0)
|
||||
endif ()
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error -Wno-c++11-narrowing")
|
||||
@@ -1353,14 +1355,15 @@ set(DUSK_FILES
|
||||
src/dusk/globals.cpp
|
||||
src/dusk/mtx.cpp
|
||||
src/dusk/J3DTransforms_C.cpp
|
||||
src/dusk/m_Do_ext_dusk.cpp
|
||||
#src/dusk/m_Do_ext_dusk.cpp
|
||||
src/dusk/jsystem_stubs.cpp
|
||||
src/m_Do/m_Do_main.cpp # TODO: move this to a more appropriate location, it's not really dusk-specific
|
||||
src/dusk/dvd_emu.cpp
|
||||
)
|
||||
|
||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${SSYSTEM_FILES} ${JSYSTEM_FILES} ${REL_FILES})
|
||||
source_group("dusk" FILES ${DUSK_FILES})
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_library(game SHARED ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${SSYSTEM_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES})
|
||||
target_compile_definitions(game PRIVATE TARGET_PC VERSION=0 NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0)
|
||||
# TODO: version handling for res includes
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef DOLPHIN_DVD_EMU_H
|
||||
#define DOLPHIN_DVD_EMU_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <string>
|
||||
|
||||
// PC-Emulation der DVD-Funktionen
|
||||
namespace DvdEmu {
|
||||
|
||||
// Basis-Pfad zum Datenordner (relativ zur .exe)
|
||||
void setBasePath(const char* path);
|
||||
const char* getBasePath();
|
||||
|
||||
// Konvertiert GameCube-Pfad zu PC-Pfad
|
||||
// z.B. "/res/Object/LogoUs.arc" -> "C:/Games/Dusk/data/res/Object/LogoUs.arc"
|
||||
std::string convertPath(const char* gcPath);
|
||||
|
||||
// Prüft ob Datei existiert
|
||||
bool fileExists(const char* gcPath);
|
||||
|
||||
// Lädt Datei komplett in Speicher
|
||||
// Gibt Pointer zurück, Größe wird in outSize geschrieben
|
||||
// Caller muss Speicher mit free() freigeben
|
||||
void* loadFile(const char* gcPath, u32* outSize, void* heap = nullptr);
|
||||
|
||||
// Lädt Datei in vorhandenen Buffer
|
||||
// Gibt gelesene Bytes zurück
|
||||
u32 loadFileToBuffer(const char* gcPath, void* buffer, u32 bufferSize, u32 offset = 0);
|
||||
|
||||
// Datei-Größe abfragen
|
||||
u32 getFileSize(const char* gcPath);
|
||||
|
||||
} // namespace DvdEmu
|
||||
|
||||
// Ersatz für DVDConvertPathToEntrynum
|
||||
// Gibt einen "Fake" Entry-Number zurück (Hash des Pfads) oder -1 wenn nicht gefunden
|
||||
s32 DVDConvertPathToEntrynum_Emu(const char* path);
|
||||
|
||||
// Speichert Pfad für Entry-Number (für späteres Laden)
|
||||
void DVDRegisterPath(s32 entryNum, const char* path);
|
||||
|
||||
// Holt Pfad für Entry-Number
|
||||
const char* DVDGetPathForEntry(s32 entryNum);
|
||||
|
||||
#endif // DOLPHIN_DVD_EMU_H
|
||||
@@ -0,0 +1,57 @@
|
||||
#ifndef DOLPHIN_ENDIAN_H
|
||||
#define DOLPHIN_ENDIAN_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Platform detection - Little Endian targets
|
||||
#if defined(_WIN32) || defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(_M_X64) || defined(_M_IX86)
|
||||
#define TARGET_LITTLE_ENDIAN 1
|
||||
#else
|
||||
#define TARGET_LITTLE_ENDIAN 0
|
||||
#endif
|
||||
|
||||
#if TARGET_LITTLE_ENDIAN
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
#define BSWAP16(x) _byteswap_ushort(x)
|
||||
#define BSWAP32(x) _byteswap_ulong(x)
|
||||
#else
|
||||
#define BSWAP16(x) __builtin_bswap16(x)
|
||||
#define BSWAP32(x) __builtin_bswap32(x)
|
||||
#endif
|
||||
#else
|
||||
#define BSWAP16(x) (x)
|
||||
#define BSWAP32(x) (x)
|
||||
#endif
|
||||
|
||||
// Big-Endian to Host conversion
|
||||
inline u16 be16(u16 val) { return BSWAP16(val); }
|
||||
inline s16 be16s(s16 val) { return (s16)BSWAP16((u16)val); }
|
||||
inline u32 be32(u32 val) { return BSWAP32(val); }
|
||||
|
||||
inline s32 be32s(s32 val) { return (s32)BSWAP32((u32)val); }
|
||||
|
||||
#ifdef TARGET_PC
|
||||
// Helper wrappers so code below reads nicely:
|
||||
static inline u16 RES_U16(u16 v) {
|
||||
return be16(v);
|
||||
}
|
||||
static inline s16 RES_S16(s16 v) {
|
||||
return be16s(v);
|
||||
}
|
||||
static inline u32 RES_U32(u32 v) {
|
||||
return be32(v);
|
||||
}
|
||||
static inline s32 RES_S32(s32 v) {
|
||||
return be32s(v);
|
||||
}
|
||||
#else
|
||||
// On GameCube host-endian == file-endian, these are no-ops (keep as macros to allow compile in
|
||||
// original code paths)
|
||||
#define RES_U16(x) (x)
|
||||
#define RES_S16(x) (x)
|
||||
#define RES_U32(x) (x)
|
||||
#define RES_S32(x) (x)
|
||||
#endif
|
||||
|
||||
#endif // DOLPHIN_ENDIAN_H
|
||||
@@ -8,8 +8,15 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#ifdef __MWERKS__
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
#include <string>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
#if DEBUG
|
||||
u8 JKRValue_DEBUGFILL_NOTUSE = 0xFD;
|
||||
@@ -95,12 +102,28 @@ JKRHeap::JKRFreeCallback JKRHeap::sFreeCallback;
|
||||
bool JKRHeap::initArena(char** memory, u32* size, int maxHeaps) {
|
||||
void* arenaLo = OSGetArenaLo();
|
||||
void* arenaHi = OSGetArenaHi();
|
||||
#if !PLATFORM_GCN
|
||||
OSReport("original arenaLo = %p arenaHi = %p\n", arenaLo, arenaHi);
|
||||
#endif
|
||||
|
||||
OSReport("[JKRHeap] initArena: Lo=%p Hi=%p Size=0x%X\n", arenaLo, arenaHi,
|
||||
(uintptr_t)arenaHi - (uintptr_t)arenaLo);
|
||||
|
||||
if (arenaLo == arenaHi)
|
||||
return false;
|
||||
|
||||
#ifdef TARGET_PC
|
||||
// PC: Simple arena setup without GameCube-specific memory management
|
||||
arenaLo = (void*)ALIGN_NEXT((uintptr_t)arenaLo, 0x20);
|
||||
arenaHi = (void*)ALIGN_PREV((uintptr_t)arenaHi, 0x20);
|
||||
|
||||
mCodeStart = nullptr;
|
||||
mCodeEnd = nullptr;
|
||||
mUserRamStart = arenaLo;
|
||||
mUserRamEnd = arenaHi;
|
||||
mMemorySize = (uintptr_t)arenaHi - (uintptr_t)arenaLo;
|
||||
|
||||
*memory = (char*)arenaLo;
|
||||
*size = (uintptr_t)arenaHi - (uintptr_t)arenaLo;
|
||||
return true;
|
||||
#else
|
||||
arenaLo = OSInitAlloc(arenaLo, arenaHi, maxHeaps);
|
||||
arenaLo = (void*)ALIGN_NEXT((uintptr_t)arenaLo, 0x20);
|
||||
arenaHi = (void*)ALIGN_PREV((uintptr_t)arenaHi, 0x20);
|
||||
@@ -119,6 +142,7 @@ bool JKRHeap::initArena(char** memory, u32* size, int maxHeaps) {
|
||||
*memory = (char*)arenaLo;
|
||||
*size = (uintptr_t)arenaHi - (uintptr_t)arenaLo;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
@@ -468,37 +492,113 @@ bool JKRHeap::isSubHeap(JKRHeap* heap) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void* operator new(size_t size) {
|
||||
return JKRHeap::alloc(size, 4, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new(size_t size) {
|
||||
if (JKRHeap::sCurrentHeap == NULL) {
|
||||
return malloc(size);
|
||||
}
|
||||
void* mem = JKRHeap::alloc(size, 4, NULL);
|
||||
if (mem == NULL) {
|
||||
OSReport("[NEW] JKRHeap FULL! Fallback to malloc for size %u\n", (unsigned)size);
|
||||
mem = malloc(size);
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void* operator new(size_t size, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new(size_t size, int alignment) {
|
||||
if (JKRHeap::sCurrentHeap == nullptr)
|
||||
return _aligned_malloc(size, alignment);
|
||||
void* mem = JKRHeap::alloc(size, alignment, nullptr);
|
||||
if (mem == nullptr) {
|
||||
OSReport("[NEW] JKRHeap FULL! Fallback to aligned_malloc size %u\n", (unsigned)size);
|
||||
return _aligned_malloc(size, alignment);
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* operator new(size_t size, JKRHeap* heap, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, heap);
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void* operator new[](size_t size) {
|
||||
return JKRHeap::alloc(size, 4, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new[](size_t size) {
|
||||
if (JKRHeap::sCurrentHeap == NULL)
|
||||
return malloc(size);
|
||||
void* mem = JKRHeap::alloc(size, 4, NULL);
|
||||
if (mem == NULL) {
|
||||
mem = malloc(size);
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void* operator new[](size_t size, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new[](size_t size, int alignment) {
|
||||
if (JKRHeap::sCurrentHeap == nullptr)
|
||||
return _aligned_malloc(size, alignment);
|
||||
void* mem = JKRHeap::alloc(size, alignment, nullptr);
|
||||
if (mem == nullptr)
|
||||
return _aligned_malloc(size, alignment);
|
||||
return mem;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* operator new[](size_t size, JKRHeap* heap, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, heap);
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void operator delete(void* ptr) {
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
#else
|
||||
void operator delete(void* ptr) {
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
JKRHeap* heap = JKRHeap::findFromRoot(ptr);
|
||||
if (heap == NULL) {
|
||||
free(ptr);
|
||||
return;
|
||||
}
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void operator delete[](void* ptr) {
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
#else
|
||||
void operator delete[](void* ptr) {
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
JKRHeap* heap = JKRHeap::findFromRoot(ptr);
|
||||
if (heap == NULL) {
|
||||
free(ptr);
|
||||
return;
|
||||
}
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
s32 fillcheck_dispcount = 100;
|
||||
bool data_8074A8D0_debug = true;
|
||||
|
||||
@@ -12,6 +12,8 @@ daObj_SSBase_c::daObj_SSBase_c() {
|
||||
|
||||
daObj_SSBase_c::~daObj_SSBase_c() {}
|
||||
|
||||
void daObj_SSBase_c::setSoldOut() {}
|
||||
|
||||
u32 daObj_SSBase_c::getProcessID() {
|
||||
return fopAcM_GetID(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
#include "dusk/dvd_emu.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <unordered_map>
|
||||
#include "dolphin/os.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <direct.h>
|
||||
#define PATH_SEP '\\'
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#define PATH_SEP '/'
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
s32 g_nextEntryNum = 1;
|
||||
|
||||
// Lazy-init to avoid crash during DLL static initialization
|
||||
std::string& g_basePath() {
|
||||
static std::string instance = "data";
|
||||
return instance;
|
||||
}
|
||||
|
||||
std::unordered_map<s32, std::string>& getEntryPaths() {
|
||||
static std::unordered_map<s32, std::string> instance;
|
||||
return instance;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace DvdEmu {
|
||||
|
||||
void setBasePath(const char* path) {
|
||||
#ifdef _WIN32
|
||||
char exePath[MAX_PATH];
|
||||
GetModuleFileNameA(NULL, exePath, MAX_PATH);
|
||||
|
||||
// Get the directory of the .exe
|
||||
char* lastSlash = strrchr(exePath, '\\');
|
||||
if (lastSlash) {
|
||||
*lastSlash = '\0';
|
||||
}
|
||||
|
||||
// exeDir + "/" + path
|
||||
g_basePath() = exePath;
|
||||
g_basePath() += PATH_SEP;
|
||||
g_basePath() += path;
|
||||
#else
|
||||
g_basePath() = path;
|
||||
#endif
|
||||
|
||||
OSReport("[DvdEmu] Base path set to: %s\n", g_basePath().c_str());
|
||||
}
|
||||
|
||||
const char* getBasePath() {
|
||||
return g_basePath().c_str();
|
||||
}
|
||||
|
||||
std::string convertPath(const char* gcPath) {
|
||||
std::string result = g_basePath();
|
||||
|
||||
// Skip leading slashes
|
||||
const char* p = gcPath;
|
||||
while (*p == '/' || *p == '\\')
|
||||
p++;
|
||||
|
||||
result += PATH_SEP;
|
||||
|
||||
// Append path, converting slashes
|
||||
while (*p) {
|
||||
if (*p == '/' || *p == '\\') {
|
||||
result += PATH_SEP;
|
||||
} else {
|
||||
result += *p;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool fileExists(const char* gcPath) {
|
||||
std::string fullPath = convertPath(gcPath);
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD attrib = GetFileAttributesA(fullPath.c_str());
|
||||
bool exists = (attrib != INVALID_FILE_ATTRIBUTES && !(attrib & FILE_ATTRIBUTE_DIRECTORY));
|
||||
#else
|
||||
struct stat st;
|
||||
bool exists = (stat(fullPath.c_str(), &st) == 0 && S_ISREG(st.st_mode));
|
||||
#endif
|
||||
|
||||
if (exists) {
|
||||
OSReport("[DvdEmu] FOUND: %s\n", gcPath);
|
||||
} else {
|
||||
OSReport("[DvdEmu] MISSING: %s\n", gcPath);
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
||||
|
||||
u32 getFileSize(const char* gcPath) {
|
||||
std::string fullPath = convertPath(gcPath);
|
||||
FILE* f = fopen(fullPath.c_str(), "rb");
|
||||
if (!f)
|
||||
return 0;
|
||||
|
||||
fseek(f, 0, SEEK_END);
|
||||
u32 size = (u32)ftell(f);
|
||||
fclose(f);
|
||||
return size;
|
||||
}
|
||||
|
||||
void* loadFile(const char* gcPath, u32* outSize, void* heap) {
|
||||
std::string fullPath = convertPath(gcPath);
|
||||
|
||||
OSReport("[DvdEmu] Loading request: '%s'\n", gcPath);
|
||||
|
||||
FILE* f = fopen(fullPath.c_str(), "rb");
|
||||
if (!f) {
|
||||
OSReport("[DvdEmu] ERROR: Failed to open file at physical path: %s\n", fullPath.c_str());
|
||||
if (outSize)
|
||||
*outSize = 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fseek(f, 0, SEEK_END);
|
||||
u32 size = (u32)ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
// Allocate with 32-byte alignment (matching GameCube)
|
||||
void* data;
|
||||
#ifdef _WIN32
|
||||
data = _aligned_malloc(size, 32);
|
||||
#else
|
||||
data = aligned_alloc(32, (size + 31) & ~31);
|
||||
#endif
|
||||
|
||||
if (!data) {
|
||||
OSReport("[DvdEmu] FATAL: Failed to allocate %u bytes for %s\n", size, gcPath);
|
||||
fclose(f);
|
||||
if (outSize)
|
||||
*outSize = 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
u32 bytesRead = (u32)fread(data, 1, size, f);
|
||||
fclose(f);
|
||||
|
||||
if (bytesRead != size) {
|
||||
OSReport("[DvdEmu] WARNING: Read error: expected %u, got %u for %s\n", size, bytesRead,
|
||||
gcPath);
|
||||
}
|
||||
|
||||
if (outSize)
|
||||
*outSize = bytesRead;
|
||||
|
||||
OSReport("[DvdEmu] SUCCESS: Loaded %s (%u bytes)\n", gcPath, bytesRead);
|
||||
return data;
|
||||
}
|
||||
|
||||
u32 loadFileToBuffer(const char* gcPath, void* buffer, u32 bufferSize, u32 offset) {
|
||||
std::string fullPath = convertPath(gcPath);
|
||||
|
||||
FILE* f = fopen(fullPath.c_str(), "rb");
|
||||
if (!f) {
|
||||
OSReport("[DvdEmu] Failed to open file for buffer load: %s\n", fullPath.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (offset > 0) {
|
||||
fseek(f, offset, SEEK_SET);
|
||||
}
|
||||
|
||||
u32 bytesRead = (u32)fread(buffer, 1, bufferSize, f);
|
||||
fclose(f);
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
} // namespace DvdEmu
|
||||
|
||||
// Entry-Number System (emulates DVD's entry system)
|
||||
|
||||
s32 DVDConvertPathToEntrynum_Emu(const char* path) {
|
||||
if (!DvdEmu::fileExists(path)) {
|
||||
OSReport("[DVD] Error: File not found for entrynum conversion: %s\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Check if already registered
|
||||
for (const auto& pair : getEntryPaths()) {
|
||||
if (pair.second == path) {
|
||||
return pair.first;
|
||||
}
|
||||
}
|
||||
|
||||
// Assign new entry number
|
||||
s32 entryNum = g_nextEntryNum++;
|
||||
getEntryPaths()[entryNum] = path;
|
||||
|
||||
return entryNum;
|
||||
}
|
||||
|
||||
void DVDRegisterPath(s32 entryNum, const char* path) {
|
||||
getEntryPaths()[entryNum] = path;
|
||||
}
|
||||
|
||||
const char* DVDGetPathForEntry(s32 entryNum) {
|
||||
auto it = getEntryPaths().find(entryNum);
|
||||
if (it != getEntryPaths().end()) {
|
||||
return it->second.c_str();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -54,5 +54,9 @@ void *_memcpy(void* dest, void const* src, int n) {
|
||||
}
|
||||
|
||||
void DCZeroRange(void* addr, uint32_t nBytes) {
|
||||
#ifdef _MSC_VER
|
||||
memset(addr, 0, nBytes);
|
||||
#else
|
||||
bzero(addr, nBytes);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
*/
|
||||
#pragma mark J3DShapeTable
|
||||
#include "JSystem/J3DGraphAnimator/J3DShapeTable.h"
|
||||
|
||||
@@ -46,7 +47,7 @@ bool JASVoiceBank::getInstParam(int a, int b, int c, JASInstParam* param) const
|
||||
}
|
||||
|
||||
// JASSeqParser::sCallBackFunc is compiled from JASSeqParser.obj
|
||||
|
||||
/*
|
||||
#pragma mark JHICommBuf
|
||||
#include "JSystem/JHostIO/JHIComm.h"
|
||||
|
||||
@@ -137,7 +138,7 @@ int JOREventCallbackListNode::JORAct(u32 eventID, const char* eventName) {
|
||||
puts("JOREventCallbackListNode::JORAct is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
#pragma mark J3DPSMtxArrayConcat
|
||||
void J3DPSMtxArrayConcat(float (*a)[4], float (*b)[4], float (*out)[4], unsigned long count) {
|
||||
puts("J3DPSMtxArrayConcat is a stub");
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
extern "C" void game_main(int argc, char* argv[]);
|
||||
int game_main(int argc, char* argv[]);
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
game_main(argc, argv);
|
||||
return game_main(argc, argv);
|
||||
}
|
||||
|
||||
+122
-110
@@ -5,14 +5,14 @@
|
||||
|
||||
// Credits: Super Monkey Ball
|
||||
|
||||
#pragma mark OS
|
||||
/*
|
||||
void OSReport(const char* msg, ...) {
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
vprintf(msg, args);
|
||||
va_end(args);
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
u32 OSGetConsoleType() {
|
||||
return OS_CONSOLE_RETAIL1;
|
||||
@@ -76,6 +76,7 @@ void OSCancelAlarm(OSAlarm* alarm) {
|
||||
|
||||
s32 OSCheckActiveThreads(void) {
|
||||
puts("OSCheckActiveThreads is a stub");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -235,14 +236,15 @@ void OSExitThread(void* val) {
|
||||
puts("OSExitThread is a stub");
|
||||
}
|
||||
|
||||
static void* sArenaLo = nullptr;
|
||||
static void* sArenaHi = nullptr;
|
||||
|
||||
void* OSGetArenaHi(void) {
|
||||
puts("OSGetArenaHi is a stub");
|
||||
return NULL;
|
||||
return sArenaHi;
|
||||
}
|
||||
|
||||
void* OSGetArenaLo(void) {
|
||||
puts("OSGetArenaLo is a stub");
|
||||
return NULL;
|
||||
return sArenaLo;
|
||||
}
|
||||
|
||||
OSContext* OSGetCurrentContext(void) {
|
||||
@@ -326,11 +328,11 @@ int OSSendMessage(OSMessageQueue* mq, void* msg, s32 flags) {
|
||||
}
|
||||
|
||||
void OSSetArenaHi(void* newHi) {
|
||||
puts("OSSetArenaHi is a stub");
|
||||
sArenaHi = newHi;
|
||||
}
|
||||
|
||||
void OSSetArenaLo(void* newLo) {
|
||||
puts("OSSetArenaLo is a stub");
|
||||
sArenaLo = newLo;
|
||||
}
|
||||
|
||||
void OSSetPeriodicAlarm(OSAlarm* alarm, OSTime start, OSTime period, OSAlarmHandler handler) {
|
||||
@@ -631,100 +633,42 @@ u32 VIGetRetraceCount() {
|
||||
}
|
||||
|
||||
u32 VIGetNextField() {
|
||||
puts("VIGetNextField is a stub");
|
||||
return 0;
|
||||
puts("VIGetNextField is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void VISetBlack(BOOL black) { puts("VISetBlack is a stub"); }
|
||||
void VISetBlack(BOOL black) {
|
||||
puts("VISetBlack is a stub");
|
||||
}
|
||||
|
||||
void VISetNextFrameBuffer(void *fb) {
|
||||
// puts("VISetNextFrameBuffer is a stub");
|
||||
void VISetNextFrameBuffer(void* fb) {
|
||||
// puts("VISetNextFrameBuffer is a stub");
|
||||
}
|
||||
|
||||
void VIWaitForRetrace() {
|
||||
if (sVIRetraceCallback) {
|
||||
sVIRetraceCallback(0);
|
||||
}
|
||||
if (sVIRetraceCallback) {
|
||||
sVIRetraceCallback(0);
|
||||
}
|
||||
}
|
||||
|
||||
void* VIGetCurrentFrameBuffer(void) {
|
||||
puts("VIGetCurrentFrameBuffer is a stub");
|
||||
return NULL;
|
||||
puts("VIGetCurrentFrameBuffer is a stub");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32 VIGetDTVStatus(void) {
|
||||
puts("VIGetDTVStatus is a stub");
|
||||
return 0;
|
||||
puts("VIGetDTVStatus is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* VIGetNextFrameBuffer(void) {
|
||||
puts("VIGetNextFrameBuffer is a stub");
|
||||
return NULL;
|
||||
puts("VIGetNextFrameBuffer is a stub");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VIRetraceCallback VISetPostRetraceCallback(VIRetraceCallback callback) {
|
||||
sVIRetraceCallback = callback;
|
||||
return callback;
|
||||
}
|
||||
|
||||
VIRetraceCallback VISetPreRetraceCallback(VIRetraceCallback cb) {
|
||||
puts("VISetPreRetraceCallback is a stub");
|
||||
return cb;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
# pragma mark DSP
|
||||
#include <dolphin/dsp.h>
|
||||
extern "C" void __DSP_insert_task(DSPTaskInfo* task) {
|
||||
puts("__DSP_insert_task is a stub");
|
||||
}
|
||||
|
||||
extern "C" void __DSP_boot_task(DSPTaskInfo*) {
|
||||
puts("__DSP_boot_task is a stub");
|
||||
}
|
||||
|
||||
extern "C" void __DSP_exec_task(DSPTaskInfo*, DSPTaskInfo*) {
|
||||
puts("__DSP_exec_task is a stub");
|
||||
}
|
||||
|
||||
extern "C" void __DSP_remove_task(DSPTaskInfo* task) {
|
||||
puts("__DSP_remove_task is a stub");
|
||||
}
|
||||
|
||||
void DSPAssertInt(void) {
|
||||
puts("DSPAssertInt is a stub");
|
||||
}
|
||||
u32 DSPCheckMailFromDSP(void) {
|
||||
puts("DSPCheckMailFromDSP is a stub");
|
||||
return 0;
|
||||
}
|
||||
u32 DSPCheckMailToDSP(void) {
|
||||
puts("DSPCheckMailToDSP is a stub");
|
||||
return 0;
|
||||
}
|
||||
void DSPInit(void) {
|
||||
puts("DSPInit is a stub");
|
||||
}
|
||||
u32 DSPReadMailFromDSP(void) {
|
||||
puts("DSPReadMailFromDSP is a stub");
|
||||
return 0;
|
||||
}
|
||||
void DSPSendMailToDSP(u32 mail) {
|
||||
puts("DSPSendMailToDSP is a stub");
|
||||
}
|
||||
|
||||
# pragma mark Z2Audio
|
||||
#include <Z2AudioLib/Z2AudioCS.h>
|
||||
void Z2AudioCS::extensionProcess(s32, s32) {
|
||||
puts("Z2AudioMgr::play is a stub");
|
||||
}
|
||||
|
||||
# pragma mark JORServer
|
||||
#include <JSystem/JHostIO/JORServer.h>
|
||||
|
||||
int JOREventCallbackListNode::JORAct(u32, const char*) {
|
||||
return 0;
|
||||
sVIRetraceCallback = callback;
|
||||
return callback;
|
||||
}
|
||||
|
||||
VIRetraceCallback VISetPreRetraceCallback(VIRetraceCallback cb) {
|
||||
@@ -780,27 +724,12 @@ void Z2AudioCS::extensionProcess(s32, s32) {
|
||||
puts("Z2AudioMgr::play is a stub");
|
||||
}
|
||||
|
||||
// #pragma mark JORServer
|
||||
// #include <JSystem/JHostIO/JORServer.h>
|
||||
// void JORServer::releaseMCTX(JORMContext*) {
|
||||
// puts("releaseMCTX is a stub");
|
||||
// }
|
||||
//
|
||||
// JORMContext* JORServer::attachMCTX(u32) {
|
||||
// puts("attachMCTX is a stub");
|
||||
// return NULL;
|
||||
// }
|
||||
//
|
||||
// JORServer* JORServer::instance;
|
||||
//
|
||||
// void JORMContext::genCheckBoxSub(u32 kind, const char* label, u32 id, u32 style, u16 initValue,
|
||||
// u16 mask, JOREventListener* pListener, u16 posX, u16 posY,
|
||||
// u16 width, u16 height) {
|
||||
// puts("JORServer::genCheckBoxSub is a stub");
|
||||
// }
|
||||
// void JORMContext::updateCheckBoxSub(u32 mode, u32 id, u16 value, u16 mask, u32 param_4) {
|
||||
// puts("JORServer::updateCheckBoxSub is a stub");
|
||||
// }
|
||||
#pragma mark JORServer
|
||||
#include <JSystem/JHostIO/JORServer.h>
|
||||
|
||||
int JOREventCallbackListNode::JORAct(u32, const char*) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark JSUMemoryOutputStream
|
||||
#include <JSystem/JSupport/JSUMemoryStream.h>
|
||||
@@ -834,7 +763,7 @@ mDoExt_onCupOffAupPacket::~mDoExt_onCupOffAupPacket() {
|
||||
puts("mDoExt_onCupOffAupPacket_c destructor is a stub");
|
||||
}
|
||||
|
||||
# pragma mark dKankyo_vrboxHIO_c
|
||||
#pragma mark dKankyo_vrboxHIO_c
|
||||
#include <d/d_kankyo.h>
|
||||
void dKankyo_vrboxHIO_c::dKankyo_vrboxHIOInfoUpDateF() {
|
||||
puts("dKankyo_vrboxHIO_c::dKankyo_vrboxHIOInfoUpDateF is a stub");
|
||||
@@ -1755,6 +1684,92 @@ void dMsgObject_c::setSelectWord(int i_no, const char* i_word) {
|
||||
puts("dMsgObject_c::setSelectWord is a stub");
|
||||
}
|
||||
|
||||
#pragma mark HIO
|
||||
#include <dolphin/hio.h>
|
||||
#include <revolution/hio2.h>
|
||||
BOOL HIO2Close(s32 handle) {
|
||||
puts("HIO2Close is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIO2EnumDevices(HIO2EnumCallback callback) {
|
||||
puts("HIO2EnumDevices is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIO2Init(void) {
|
||||
puts("HIO2Init is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 HIO2Open(HIO2DeviceType type, HIO2UnkCallback exiCb, HIO2DisconnectCallback disconnectCb) {
|
||||
puts("HIO2Open is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL HIO2Read(s32 handle, u32 addr, void* buffer, s32 size) {
|
||||
puts("HIO2Read is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIO2Write(s32 handle, u32 addr, void* buffer, s32 size) {
|
||||
puts("HIO2Write is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIORead(u32 addr, void* buffer, s32 size) {
|
||||
puts("HIORead is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIOWrite(u32 addr, void* buffer, s32 size) {
|
||||
puts("HIOWrite is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#pragma mark JHICommBuf
|
||||
#include <JSystem/JHostIO/JHIComm.h>
|
||||
void JHICommBufHeader::init() {
|
||||
puts("JHICommBufHeader::init is a stub");
|
||||
}
|
||||
|
||||
int JHICommBufHeader::load() {
|
||||
puts("JHICommBufHeader::load is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int JHICommBufReader::read(void*, int) {
|
||||
puts("JHICommBufReader::read is a stub");
|
||||
return 0;
|
||||
}
|
||||
void JHICommBufReader::readEnd() {
|
||||
puts("JHICommBufReader::readEnd is a stub");
|
||||
}
|
||||
|
||||
int JHICommBufReader::readBegin() {
|
||||
puts("JHICommBufReader::readBegin is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int JHICommBufWriter::writeBegin() {
|
||||
puts("JHICommBufWriter::writeBegin is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int JHICommBufWriter::write(void*, int) {
|
||||
puts("JHICommBufWriter::write is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JHICommBufWriter::writeEnd() {
|
||||
puts("JHICommBufWriter::writeEnd is a stub");
|
||||
}
|
||||
|
||||
u32 JHICommBufReader::Header::getReadableSize() const {
|
||||
puts("JHICommBufReader::Header::getReadableSize is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark dMeter2Info
|
||||
#include <d/d_meter2_info.h>
|
||||
void dMeter2Info_c::getString(u32 i_stringID, char* o_string, JMSMesgEntry_c* i_msgEntry) {
|
||||
@@ -1764,7 +1779,4 @@ void dMeter2Info_c::getStringKanji(u32 i_stringID, char* o_string, JMSMesgEntry_
|
||||
puts("dMeter2Info_c::getStringKanji is a stub");
|
||||
}
|
||||
|
||||
dPa_particleTracePcallBack_c JPTracePCB4;
|
||||
|
||||
|
||||
|
||||
dPa_particleTracePcallBack_c JPTracePCB4;
|
||||
+201
-885
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user