diff options
| author | Gabriel Ravier <gabravier@gmail.com> | 2025-11-21 00:49:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 18:49:16 -0500 |
| commit | eb5dac74d6435baf85ced9158d3ff915ba8872ca (patch) | |
| tree | dde94c72946ca345a8d0d908625ccceb472903a7 | |
| parent | eb55fc84531c6163e6fc0cf80d0501a5166cae76 (diff) | |
Document N64DD data buffer (#2665)
| -rw-r--r-- | include/n64dd.h | 2 | ||||
| -rw-r--r-- | src/n64dd/n64dd_data_buffer.c | 8 | ||||
| -rw-r--r-- | src/n64dd/z_n64dd.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/include/n64dd.h b/include/n64dd.h index f7a3f649c..97064bc35 100644 --- a/include/n64dd.h +++ b/include/n64dd.h @@ -155,7 +155,7 @@ extern vu8 D_80121214; extern s32 (*D_801D2E54)(struct_801E0D18*); -extern u8 B_801DC000[]; +extern u8 gN64DDDiskReadTemporaryBuffer[]; extern s32 D_801D2E90; extern OSMesgQueue* B_801E0D10[2]; diff --git a/src/n64dd/n64dd_data_buffer.c b/src/n64dd/n64dd_data_buffer.c index d4dfeb336..00a09a69b 100644 --- a/src/n64dd/n64dd_data_buffer.c +++ b/src/n64dd/n64dd_data_buffer.c @@ -1,4 +1,8 @@ #include "n64dd.h" -// Buffer used for reading from the disk? -u8 B_801DC000[0x4D10]; +/** + * Buffer used during the process of reading from the disk + * Used to directly read individual blocks from the disk before copying to the final destination. + * As blocks are read directly into this buffer from the disk, it should be 16-byte aligned. + */ +ALIGNED(16) u8 gN64DDDiskReadTemporaryBuffer[MAX_BLK_SIZE]; diff --git a/src/n64dd/z_n64dd.c b/src/n64dd/z_n64dd.c index ea1b73249..4c896b587 100644 --- a/src/n64dd/z_n64dd.c +++ b/src/n64dd/z_n64dd.c @@ -36,7 +36,7 @@ typedef struct struct_801D9B90 { s32 func_801C7A1C(struct_801E0D18* arg0); -void* D_801D2E50 = &B_801DC000; +void* D_801D2E50 = &gN64DDDiskReadTemporaryBuffer; s32 (*D_801D2E54)(struct_801E0D18*) = func_801C7A1C; struct_801D9B90 B_801D9B90; |
