mirror of
https://github.com/simple64/simple64.git
synced 2026-11-02 20:55:55 +01:00
update core
This commit is contained in:
1 parent
66774cf69d
commit
4def024b7c
1 file changed
+3
-3
@@ -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