coastline 0.0.4
Loading...
Searching...
No Matches
assetdma.h
Go to the documentation of this file.
1#ifndef COASTLINE_ASSET_DMA_H
2#define COASTLINE_ASSET_DMA_H
3
4#include "common/types.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
23void DmaRead(void *dst, u32 romOffset, s32 size);
24
37u32 DmaReadWord(u32 romOffset);
38
51#ifdef COASTLINE_ROM_POINTERS
52u32 DmaReadAssetSize(char *romOffset);
53#else
55#endif
56
68
70#define DMA_WORK_BUFFER_SIZE 0x8000
71
80extern u8 g_aDmaWorkBuffers[];
81
94void InitDmaRequest(DecompressJob *job, u8 *buffer);
95
111#ifdef COASTLINE_ROM_POINTERS
112u32 DecompressFromRom(void *dst, char *romOffset, DecompressJob *job);
113#else
114u32 DecompressFromRom(void *dst, u32 romOffset, DecompressJob *job);
115#endif
116
128
138extern u32 g_dwDmaReadWordBuffer;
140
141#if TGR_BOSS_RALLY
147extern s32 g_dwDmaReadPending;
149#endif
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif /* COASTLINE_ASSET_DMA_H */
u32 g_dwDmaAssetSizeBuffer
The words the DMA reads sizes and chunk lengths into.
u32 DmaReadAssetSize(u32 romOffset)
Read the decompressed size from the header of the asset at a cartridge offset.
u32 DecompressFromRom(void *dst, u32 romOffset, DecompressJob *job)
Decompress the asset at a cartridge offset into RAM.
u32 DmaReadWord(u32 romOffset)
Read a word from the cartridge.
void InitDmaRequest(DecompressJob *job, u8 *buffer)
Start a decompression with a buffer for its compressed data.
void DmaRead(void *dst, u32 romOffset, s32 size)
Copy bytes from the cartridge into memory by DMA, in blocks of 4 KB.
u8 g_aDmaWorkBuffers[]
The buffers that decompressions read their compressed data into.
A decompression that runs over several calls of DecompressFromRom(), a step a call.
Definition assetdma.h:58
u32 remaining
Definition assetdma.h:65
u32 pendingChunkSize
Definition assetdma.h:66
u32 romOffset
Definition assetdma.h:59
u32 compressedSize
Definition assetdma.h:63
u8 * buffer
Definition assetdma.h:61
u32 decompressedSize
Definition assetdma.h:64
void * dst
Definition assetdma.h:60
u32 bufferHalf
Definition assetdma.h:62
The integer and floating-point types of the console, for headers shared with Windows.
unsigned int u32
Definition ultratypes.h:20
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18