From eb5dac74d6435baf85ced9158d3ff915ba8872ca Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Fri, 21 Nov 2025 00:49:16 +0100 Subject: Document N64DD data buffer (#2665) --- src/n64dd/n64dd_data_buffer.c | 8 ++++++-- src/n64dd/z_n64dd.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3