Skip to content

Commit

Permalink
ws: fix sound DMA source/length shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka authored and LukeUsher committed Sep 2, 2023
1 parent 4509471 commit b11ff92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ares/ws/apu/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ auto APU::writeIO(n16 address, n8 data) -> void {
case range3(0x004a, 0x004c): //SDMA_SRC
if(!system.color()) break;
dma.io.source.byte(address - 0x004a) = data;
dma.state.source.byte(address - 0x004a) = data;
break;

case range3(0x004e, 0x0050): //SDMA_LEN
if(!system.color()) break;
dma.io.length.byte(address - 0x004e) = data;
dma.state.length.byte(address - 0x004e) = data;
break;

case 0x0052: { //SDMA_CTRL
Expand All @@ -158,10 +160,6 @@ auto APU::writeIO(n16 address, n8 data) -> void {
dma.io.target = data.bit(4);
dma.io.direction = data.bit(6);
dma.io.enable = data.bit(7);
if(trigger) {
dma.state.source = dma.io.source;
dma.state.length = dma.io.length;
}
} break;

case 0x006a: //SND_HYPER_CTRL
Expand Down

0 comments on commit b11ff92

Please sign in to comment.