OS threading, DVD I/O, Endianness fixes, ARAM emulation, GX vertex fix

Major changes:

- Implement Big-Endian to Little-Endian byte-swapping for all RARC archive
  types (JKRCompArchive, JKRMemArchive, JKRDvdArchive, JKRAramArchive)
- Implement DVD file I/O via DvdEmu (DVDOpen, DVDFastOpen, DVDReadPrio,
  DVDReadAsyncPrio, DVDConvertPathToEntrynum)
- Fix YAZ0 decompression endianness in JKRDvdRipper, JKRDecomp, JKRAram,
  and JKRDvdAramRipper (use JKRDecompExpandSize instead of direct header read)
- Emulate ARAM with 16MB malloc buffer and synchronous memcpy in ARQPostRequest
  instead of hardware DMA transfers that hang on PC
- Add real OS threading implementation (OSContext, OSThread, OSMutex) using
  native Windows threads with side-table pattern for GC struct compatibility
- Fix font endianness for JUTResFont and JUTCacheFont
- Redirect GXVert.h to Aurora's PC implementation to prevent FIFO writes to
  the GameCube hardware address 0xCC008000
- Add Z-buffer texture format support (GX_TF_Z24X8, GX_TF_Z16, GX_TF_Z8)
  in Aurora's texture converter
This commit is contained in:
Lurs
2026-02-19 10:35:42 +01:00
parent c86a2208d2
commit a4d72437ef
17 changed files with 1509 additions and 399 deletions
+3
View File
@@ -88,6 +88,7 @@ bool JKRCompArchive::open(s32 entryNum) {
JKRDvdToMainRam(entryNum, (u8 *)arcHeader, EXPAND_SWITCH_UNKNOWN1, 32, NULL, JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0, &mCompression, NULL);
DCInvalidateRange(arcHeader, 32);
JKRSwapArcHeader(arcHeader);
mSizeOfMemPart = arcHeader->field_0x14;
mSizeOfAramPart = arcHeader->field_0x18;
@@ -108,6 +109,7 @@ bool JKRCompArchive::open(s32 entryNum) {
JKRDvdToMainRam(entryNum, (u8 *)mArcInfoBlock, EXPAND_SWITCH_UNKNOWN1, (uintptr_t)arcHeader->file_data_offset + mSizeOfMemPart,
NULL, JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0x20, NULL, NULL);
DCInvalidateRange(mArcInfoBlock, (uintptr_t)arcHeader->file_data_offset + mSizeOfMemPart);
JKRSwapArchiveMemory(mArcInfoBlock);
field_0x64 = (uintptr_t)mArcInfoBlock + arcHeader->file_data_offset;
if (mSizeOfAramPart != 0) {
@@ -156,6 +158,7 @@ bool JKRCompArchive::open(s32 entryNum) {
else {
// arcHeader + 1 should lead to 0x20, which is the data after the header
JKRHeap::copyMemory((u8 *)mArcInfoBlock, arcHeader + 1, (arcHeader->file_data_offset + mSizeOfMemPart));
JKRSwapArchiveMemory(mArcInfoBlock);
field_0x64 = (uintptr_t)mArcInfoBlock + arcHeader->file_data_offset;
if (mSizeOfAramPart != 0) {
mAramPart = (JKRAramBlock*)JKRAllocFromAram(mSizeOfAramPart, JKRAramHeap::HEAD);