1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 12:24:39 +00:00

More documentation for z_std_dma.c (#1415)

* More documentation for z_std_dma

* uintptr casts for rom symbols in z64animation.h and z_kanfont.c

* Format

* Suggested changes, more defines for static texture sizes

* PI Interface -> PI

* Further suggested changes

* Format

* Comments about item_name and map_name texture assumptions
This commit is contained in:
Tharo 2022-11-17 02:57:02 +00:00 committed by GitHub
parent 40639e698d
commit 7ecafcfe7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 549 additions and 320 deletions

View file

@ -2,11 +2,12 @@
#define Z64_DMA_H
#include "ultra64.h"
#include "alignment.h"
typedef struct {
/* 0x00 */ uintptr_t vromAddr; // VROM address (source)
/* 0x04 */ void* dramAddr; // DRAM address (destination)
/* 0x08 */ u32 size; // File Transfer size
/* 0x08 */ size_t size; // File Transfer size
/* 0x0C */ const char* filename; // Filename for debugging
/* 0x10 */ s32 line; // Line for debugging
/* 0x14 */ s32 unk_14;
@ -21,4 +22,28 @@ typedef struct {
/* 0x0C */ uintptr_t romEnd;
} DmaEntry;
extern DmaEntry gDmaDataTable[];
extern u32 gDmaMgrVerbose;
extern size_t gDmaMgrDmaBuffSize;
#define DMAMGR_DEFAULT_BUFSIZE ALIGN16(0x2000)
// Standard DMA Requests
s32 DmaMgr_RequestSync(void* ram, uintptr_t vrom, size_t size);
s32 DmaMgr_RequestSyncDebug(void* ram, uintptr_t vrom, size_t size, const char* file, s32 line);
s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk5, OSMesgQueue* queue,
OSMesg msg, const char* file, s32 line);
// Special-purpose DMA Requests
s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size);
void DmaMgr_DmaFromDriveRom(void* ram, uintptr_t rom, size_t size);
s32 DmaMgr_AudioDmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction);
// Initialization
void DmaMgr_Init(void);
#endif