change PI DMA to use 16 bit fetches (275ba735de
)
This commit is contained in:
parent
682111f377
commit
f48f9dba9f
Binary file not shown.
|
@ -27,8 +27,12 @@ auto PI::dmaWrite() -> void {
|
|||
if (length.bit(0)) length += 1;
|
||||
|
||||
i32 rom_len = (cur_len + 1) & ~1;
|
||||
for (u32 i = 0; i < rom_len; i++)
|
||||
mem[i] = bus.read<Byte>(io.pbusAddress++);
|
||||
for (u32 i = 0; i < rom_len; i += 2) {
|
||||
u16 data = bus.read<Half>(io.pbusAddress);
|
||||
mem[i + 0] = data >> 8;
|
||||
mem[i + 1] = data & 0xFF;
|
||||
io.pbusAddress += 2;
|
||||
}
|
||||
|
||||
if (first_block) {
|
||||
if (cur_len == block_len-1) cur_len++;
|
||||
|
|
Loading…
Reference in New Issue