mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-04 02:09:46 -04:00
@@ -5,6 +5,8 @@
|
||||
|
||||
void Yaz0_Decompress(uintptr_t romStart, void* dst, size_t size);
|
||||
|
||||
#if MM_VERSION >= N64_US
|
||||
extern void* gYaz0DecompressDstEnd;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,9 @@ uintptr_t sYaz0CurRomStart;
|
||||
size_t sYaz0CurSize;
|
||||
u8* sYaz0MaxPtr;
|
||||
|
||||
#if MM_VERSION >= N64_US
|
||||
void* gYaz0DecompressDstEnd;
|
||||
#endif
|
||||
|
||||
#include "yaz0.h"
|
||||
|
||||
@@ -83,6 +85,9 @@ s32 Yaz0_DecompressImpl(u8* src, u8* dst) {
|
||||
u32 magic = ((Yaz0Header*)src)->magic;
|
||||
|
||||
if (magic != YAZ0_MAGIC) {
|
||||
PRINTF(T("slidstart_szs IDが違います (%02x %02x %02x %02x %08x)\n",
|
||||
"The slidstart_szs ID is incorrect (%02x %02x %02x %02x %08x)\n"),
|
||||
src[0], src[1], src[2], src[3], magic);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -123,7 +128,9 @@ s32 Yaz0_DecompressImpl(u8* src, u8* dst) {
|
||||
bitIndex--;
|
||||
} while (dst != dstEnd);
|
||||
|
||||
#if MM_VERSION >= N64_US
|
||||
gYaz0DecompressDstEnd = dstEnd;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "libc64/malloc.h"
|
||||
#include "color.h"
|
||||
#include "versions.h"
|
||||
#include "yaz0.h"
|
||||
#include "z64dma.h"
|
||||
|
||||
@@ -116,6 +117,8 @@ void CmpDma_LoadAllFiles(uintptr_t segmentVrom, void* dst, size_t size) {
|
||||
|
||||
for (i = 0; i < end; i++) {
|
||||
CmpDma_LoadFileImpl(rom, i, nextDst, 0);
|
||||
#if MM_VERSION >= N64_US
|
||||
nextDst = gYaz0DecompressDstEnd;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user