Use dram access primitives for remaining cases in main.c

This commit is contained in:
Bobby Smiles 2014-01-14 22:14:59 +01:00
parent bdb4733f33
commit 488e73cf0b

View file

@ -204,7 +204,7 @@ static void normal_task_dispatching(void)
{ {
const OSTask_t *const task = get_task(); const OSTask_t *const task = get_task();
const unsigned int sum = 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) { switch (sum) {
/* StoreVe12: found in Zelda Ocarina of Time [misleading task->type == 4] */ /* 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 */ /* dump ucode_boot */
sprintf(&filename[0], "ucode_boot_%x.bin", sum); 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 */ /* dump ucode */
if (task->ucode != 0) { if (task->ucode != 0) {
sprintf(&filename[0], "ucode_%x.bin", sum); 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 */ /* dump ucode_data */
if (task->ucode_data != 0) { if (task->ucode_data != 0) {
sprintf(&filename[0], "ucode_data_%x.bin", sum); 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 */ /* dump data */
if (task->data_ptr != 0) { if (task->data_ptr != 0) {
sprintf(&filename[0], "data_%x.bin", sum); 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);
} }
} }