00cc9309cb
de6e324bdseparate emu thread10d3daf86Roms List improvements95d202f37Let's make the rom list process on a separate thread so the emulator doesnt take ages to load.fc306967fWow the ROM Header was just completely busted. Game list view works nowbad1691eefuck this shit2b59e5f46game list in progressd26417b83remappable inputs in progressac4af8106inpute72abc240update readme430139dc9Qt6 frontend3080d4d45Fix this small bug too08cd13b85Cop0 unused functions do not actually pose a threat (as per manual). They don't do anything, so shall we.61bb4fb44make idle loop detection a little more specific with where the load goesb037de4c3SAZDFsdff12e81e73eneed to figure out why n64-systemtest loops indefinitely at some address that appears to be valid (i think it's me not invalidating the cache properly)204f0e13bidle skipping seems to work!cb8bb634asdkfjlasdf58e5c89c1Fix compilation issue on my machine (no idea)24fb2898eattempting more serious idle skipping214719577Place rsp.Step inside cached interpreter. Gains about 3 more fpsbb97dcc23mmmmm920b77d38wjkhasdfjhkasdf430ccdab4it's a start...4f42a673aCached interpreter plays Mario 64. Start looking into RSP as wellc9a030787idle skipping works!5fbda03cenew idea366637abaIdle skipping... maybe?609fa2fb0Cache instructions implemented but broken lmao. Commented out for nowe140a6d12- Stop using inheritance for CPU, instead use composition. - Introduce KAIZEN_JIT_ENABLED optional define instead of relying on __aarch64__ and the like. - More cache work68e613057prep cache impl811b4d809fix clang formatfda755f7didkd5024ebbfsmall MI refactor in preparation of (eventually) implementing the RDRAM interface properly694b45341Merge commit '206dcdedf195fb320913584180edb12c7731e396' as 'external/SDL'206dcdedfSquashed 'external/SDL/' content from commit 4d17b99d0a4d16e1cb4need to update sdl848b19920Fix compilation errordb61b5299Merge commit 'e94a94559f28e49678fbcf72199a5258137b0fe9' as 'external/imgui'e94a94559Squashed 'external/imgui/' content from commit 02e9b8cac52edb3757need to update imguic1a705e86Emulate weird JALR behaviour4b4c32f4bFix exception for "unusable COP1" in 4 instructions i missed accidentally (again)df5828142Bug putting 0s in the log everywheref8b580048Make isviewer a sink to file8241e9735Fix exception for "unusable COP1" in 4 instructions i missed accidentallyb29715f20small changesd9a620bc1make use of my new small utility library0d1aa938eAdd 'external/ircolib/' from commit 'ce3cd726c8df8388d554abf8bb55d55020eb4450'e64eb40b3Fuck git git-subtree-dir: external/ircolib git-subtree-split:de6e324bde
205 lines
5.0 KiB
C
205 lines
5.0 KiB
C
/* 7z.h -- 7z interface
|
|
2023-04-02 : Igor Pavlov : Public domain */
|
|
|
|
#ifndef ZIP7_INC_7Z_H
|
|
#define ZIP7_INC_7Z_H
|
|
|
|
#include "7zTypes.h"
|
|
|
|
EXTERN_C_BEGIN
|
|
|
|
#define k7zStartHeaderSize 0x20
|
|
#define k7zSignatureSize 6
|
|
|
|
extern const Byte k7zSignature[k7zSignatureSize];
|
|
|
|
typedef struct
|
|
{
|
|
const Byte *Data;
|
|
size_t Size;
|
|
} CSzData;
|
|
|
|
/* CSzCoderInfo & CSzFolder support only default methods */
|
|
|
|
typedef struct
|
|
{
|
|
size_t PropsOffset;
|
|
UInt32 MethodID;
|
|
Byte NumStreams;
|
|
Byte PropsSize;
|
|
} CSzCoderInfo;
|
|
|
|
typedef struct
|
|
{
|
|
UInt32 InIndex;
|
|
UInt32 OutIndex;
|
|
} CSzBond;
|
|
|
|
#define SZ_NUM_CODERS_IN_FOLDER_MAX 4
|
|
#define SZ_NUM_BONDS_IN_FOLDER_MAX 3
|
|
#define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4
|
|
|
|
typedef struct
|
|
{
|
|
UInt32 NumCoders;
|
|
UInt32 NumBonds;
|
|
UInt32 NumPackStreams;
|
|
UInt32 UnpackStream;
|
|
UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX];
|
|
CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX];
|
|
CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX];
|
|
} CSzFolder;
|
|
|
|
|
|
SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd);
|
|
|
|
typedef struct
|
|
{
|
|
UInt32 Low;
|
|
UInt32 High;
|
|
} CNtfsFileTime;
|
|
|
|
typedef struct
|
|
{
|
|
Byte *Defs; /* MSB 0 bit numbering */
|
|
UInt32 *Vals;
|
|
} CSzBitUi32s;
|
|
|
|
typedef struct
|
|
{
|
|
Byte *Defs; /* MSB 0 bit numbering */
|
|
// UInt64 *Vals;
|
|
CNtfsFileTime *Vals;
|
|
} CSzBitUi64s;
|
|
|
|
#define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0)
|
|
|
|
#define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0)
|
|
|
|
typedef struct
|
|
{
|
|
UInt32 NumPackStreams;
|
|
UInt32 NumFolders;
|
|
|
|
UInt64 *PackPositions; // NumPackStreams + 1
|
|
CSzBitUi32s FolderCRCs; // NumFolders
|
|
|
|
size_t *FoCodersOffsets; // NumFolders + 1
|
|
UInt32 *FoStartPackStreamIndex; // NumFolders + 1
|
|
UInt32 *FoToCoderUnpackSizes; // NumFolders + 1
|
|
Byte *FoToMainUnpackSizeIndex; // NumFolders
|
|
UInt64 *CoderUnpackSizes; // for all coders in all folders
|
|
|
|
Byte *CodersData;
|
|
|
|
UInt64 RangeLimit;
|
|
} CSzAr;
|
|
|
|
UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex);
|
|
|
|
SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex,
|
|
ILookInStreamPtr stream, UInt64 startPos,
|
|
Byte *outBuffer, size_t outSize,
|
|
ISzAllocPtr allocMain);
|
|
|
|
typedef struct
|
|
{
|
|
CSzAr db;
|
|
|
|
UInt64 startPosAfterHeader;
|
|
UInt64 dataPos;
|
|
|
|
UInt32 NumFiles;
|
|
|
|
UInt64 *UnpackPositions; // NumFiles + 1
|
|
// Byte *IsEmptyFiles;
|
|
Byte *IsDirs;
|
|
CSzBitUi32s CRCs;
|
|
|
|
CSzBitUi32s Attribs;
|
|
// CSzBitUi32s Parents;
|
|
CSzBitUi64s MTime;
|
|
CSzBitUi64s CTime;
|
|
|
|
UInt32 *FolderToFile; // NumFolders + 1
|
|
UInt32 *FileToFolder; // NumFiles
|
|
|
|
size_t *FileNameOffsets; /* in 2-byte steps */
|
|
Byte *FileNames; /* UTF-16-LE */
|
|
} CSzArEx;
|
|
|
|
#define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i))
|
|
|
|
#define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i])
|
|
|
|
void SzArEx_Init(CSzArEx *p);
|
|
void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc);
|
|
UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder);
|
|
int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize);
|
|
|
|
/*
|
|
if dest == NULL, the return value specifies the required size of the buffer,
|
|
in 16-bit characters, including the null-terminating character.
|
|
if dest != NULL, the return value specifies the number of 16-bit characters that
|
|
are written to the dest, including the null-terminating character. */
|
|
|
|
size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest);
|
|
|
|
/*
|
|
size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex);
|
|
UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest);
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
SzArEx_Extract extracts file from archive
|
|
|
|
*outBuffer must be 0 before first call for each new archive.
|
|
|
|
Extracting cache:
|
|
If you need to decompress more than one file, you can send
|
|
these values from previous call:
|
|
*blockIndex,
|
|
*outBuffer,
|
|
*outBufferSize
|
|
You can consider "*outBuffer" as cache of solid block. If your archive is solid,
|
|
it will increase decompression speed.
|
|
|
|
If you use external function, you can declare these 3 cache variables
|
|
(blockIndex, outBuffer, outBufferSize) as static in that external function.
|
|
|
|
Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
|
|
*/
|
|
|
|
SRes SzArEx_Extract(
|
|
const CSzArEx *db,
|
|
ILookInStreamPtr inStream,
|
|
UInt32 fileIndex, /* index of file */
|
|
UInt32 *blockIndex, /* index of solid block */
|
|
Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */
|
|
size_t *outBufferSize, /* buffer size for output buffer */
|
|
size_t *offset, /* offset of stream for required file in *outBuffer */
|
|
size_t *outSizeProcessed, /* size of file in *outBuffer */
|
|
ISzAllocPtr allocMain,
|
|
ISzAllocPtr allocTemp);
|
|
|
|
|
|
/*
|
|
SzArEx_Open Errors:
|
|
SZ_ERROR_NO_ARCHIVE
|
|
SZ_ERROR_ARCHIVE
|
|
SZ_ERROR_UNSUPPORTED
|
|
SZ_ERROR_MEM
|
|
SZ_ERROR_CRC
|
|
SZ_ERROR_INPUT_EOF
|
|
SZ_ERROR_FAIL
|
|
*/
|
|
|
|
SRes SzArEx_Open(CSzArEx *p, ILookInStreamPtr inStream,
|
|
ISzAllocPtr allocMain, ISzAllocPtr allocTemp);
|
|
|
|
EXTERN_C_END
|
|
|
|
#endif
|