mirror of
https://github.com/simple64/simple64.git
synced 2026-09-07 04:42:43 +02:00
update core
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user