diff --git a/include/n64dd.h b/include/n64dd.h index f7a3f649ca..97064bc352 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 d4dfeb3363..00a09a69b6 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 ea1b73249e..4c896b5873 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;