From 488e73cf0bebf7b814557b9293d8b4ff752f9302 Mon Sep 17 00:00:00 2001 From: Bobby Smiles Date: Tue, 14 Jan 2014 22:14:59 +0100 Subject: [PATCH] Use dram access primitives for remaining cases in main.c --- src/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 956c5f4..408abd9 100644 --- a/src/main.c +++ b/src/main.c @@ -204,7 +204,7 @@ static void normal_task_dispatching(void) { const OSTask_t *const task = get_task(); const unsigned int sum = - sum_bytes(rsp.RDRAM + task->ucode, min(task->ucode_size, 0xf80) >> 1); + sum_bytes(dram_u8(task->ucode), min(task->ucode_size, 0xf80) >> 1); switch (sum) { /* StoreVe12: found in Zelda Ocarina of Time [misleading task->type == 4] */ @@ -267,24 +267,24 @@ static void handle_unknown_task(unsigned int sum) /* dump ucode_boot */ sprintf(&filename[0], "ucode_boot_%x.bin", sum); - dump_binary(filename, rsp.RDRAM + (task->ucode_boot & 0x7fffff), task->ucode_boot_size); + dump_binary(filename, dram_u8(task->ucode_boot), task->ucode_boot_size); /* dump ucode */ if (task->ucode != 0) { sprintf(&filename[0], "ucode_%x.bin", sum); - dump_binary(filename, rsp.RDRAM + (task->ucode & 0x7fffff), 0xf80); + dump_binary(filename, dram_u8(task->ucode), 0xf80); } /* dump ucode_data */ if (task->ucode_data != 0) { sprintf(&filename[0], "ucode_data_%x.bin", sum); - dump_binary(filename, rsp.RDRAM + (task->ucode_data & 0x7fffff), task->ucode_data_size); + dump_binary(filename, dram_u8(task->ucode_data), task->ucode_data_size); } /* dump data */ if (task->data_ptr != 0) { sprintf(&filename[0], "data_%x.bin", sum); - dump_binary(filename, rsp.RDRAM + (task->data_ptr & 0x7fffff), task->data_size); + dump_binary(filename, dram_u8(task->data_ptr), task->data_size); } }