update core

This commit is contained in:
Logan McNaughton
2021-06-13 08:44:43 -06:00
parent 66774cf69d
commit 4def024b7c
@@ -71,7 +71,7 @@ static void dma_pi_read(struct pi_controller* pi)
pre_framebuffer_read(&pi->dp->fb, dram_addr);
// PI seems to treat the first 128 bytes differently, see https://n64brew.dev/wiki/Peripheral_Interface#Unaligned_DMA_transfer
if (length > 0x80 && (length & 1))
if (length >= 0x7f && (length & 1))
length += 1;
unsigned int cycles = handler->dma_read(opaque, dram, dram_addr, cart_addr, length);
@@ -107,10 +107,10 @@ static void dma_pi_write(struct pi_controller* pi)
}
// PI seems to treat the first 128 bytes differently, see https://n64brew.dev/wiki/Peripheral_Interface#Unaligned_DMA_transfer
if (length >= 0x7f && (length & 1))
length += 1;
if (length <= 0x80)
length -= dram_addr & 0x7;
if (length > 0x80 && (length & 1))
length += 1;
unsigned int cycles = handler->dma_write(opaque, dram, dram_addr, cart_addr, length);
post_framebuffer_write(&pi->dp->fb, dram_addr, length);