Revert "revert arm9 main ram dma again (again (again))"

This reverts commit c90f10d056.
This commit is contained in:
Jaklyy 2024-12-16 11:45:14 -05:00
parent 67198a72bd
commit 7590c48471
1 changed files with 8 additions and 8 deletions

View File

@ -215,7 +215,7 @@ u32 DMA::UnitTimings9_16(int burststart)
dst_n = NDS.ARM9MemTimings[dst_id][4]; dst_n = NDS.ARM9MemTimings[dst_id][4];
dst_s = NDS.ARM9MemTimings[dst_id][5]; dst_s = NDS.ARM9MemTimings[dst_id][5];
if (src_rgn == Mem9_MainRAM) /*if (src_rgn == Mem9_MainRAM)
{ {
if (dst_rgn == Mem9_MainRAM) if (dst_rgn == Mem9_MainRAM)
{ {
@ -276,7 +276,7 @@ u32 DMA::UnitTimings9_16(int burststart)
return ((burststart == 2) ? src_n : src_s) + 7; return ((burststart == 2) ? src_n : src_s) + 7;
} }
} }
else if (src_rgn & dst_rgn) else*/ if (src_rgn & dst_rgn)
{ {
if (burststart != 1) if (burststart != 1)
return src_n + dst_n + (src_n == 1 || burststart <= 0); return src_n + dst_n + (src_n == 1 || burststart <= 0);
@ -306,7 +306,7 @@ u32 DMA::UnitTimings9_32(int burststart)
dst_n = NDS.ARM9MemTimings[dst_id][6]; dst_n = NDS.ARM9MemTimings[dst_id][6];
dst_s = NDS.ARM9MemTimings[dst_id][7]; dst_s = NDS.ARM9MemTimings[dst_id][7];
if (src_rgn == Mem9_MainRAM) /*if (src_rgn == Mem9_MainRAM)
{ {
if (dst_rgn == Mem9_MainRAM) if (dst_rgn == Mem9_MainRAM)
return (burststart == 2) ? 13 : 18; return (burststart == 2) ? 13 : 18;
@ -369,7 +369,7 @@ u32 DMA::UnitTimings9_32(int burststart)
return ((burststart == 2) ? src_n : src_s) + 8; return ((burststart == 2) ? src_n : src_s) + 8;
} }
} }
else if (src_rgn & dst_rgn) else*/ if (src_rgn & dst_rgn)
{ {
if (burststart != 1) if (burststart != 1)
return src_n + dst_n + (src_n == 1 || burststart <= 0); return src_n + dst_n + (src_n == 1 || burststart <= 0);
@ -584,14 +584,14 @@ void DMA::Run9()
if (!(Cnt & (1<<26))) if (!(Cnt & (1<<26)))
{ {
while (IterCount > 0 && !Stall) while (IterCount > 0 && !Stall)
{/* {
u32 rgn = NDS.ARM9Regions[CurSrcAddr>>14] | NDS.ARM9Regions[CurDstAddr>>14]; u32 rgn = NDS.ARM9Regions[CurSrcAddr>>14] | NDS.ARM9Regions[CurDstAddr>>14];
if (rgn & Mem9_MainRAM) if (rgn & Mem9_MainRAM)
{ {
NDS.ARM9.MRTrack.Type = MainRAMType::DMA16; NDS.ARM9.MRTrack.Type = MainRAMType::DMA16;
NDS.ARM9.MRTrack.Var = Num; NDS.ARM9.MRTrack.Var = Num;
break; break;
}*/ }
NDS.DMA9Timestamp += (UnitTimings9_16(burststart) << NDS.ARM9ClockShift); NDS.DMA9Timestamp += (UnitTimings9_16(burststart) << NDS.ARM9ClockShift);
burststart -= 1; burststart -= 1;
@ -609,14 +609,14 @@ void DMA::Run9()
else else
{ {
while (IterCount > 0 && !Stall) while (IterCount > 0 && !Stall)
{/* {
u32 rgn = NDS.ARM9Regions[CurSrcAddr>>14] | NDS.ARM9Regions[CurDstAddr>>14]; u32 rgn = NDS.ARM9Regions[CurSrcAddr>>14] | NDS.ARM9Regions[CurDstAddr>>14];
if (rgn & Mem9_MainRAM) if (rgn & Mem9_MainRAM)
{ {
NDS.ARM9.MRTrack.Type = MainRAMType::DMA32; NDS.ARM9.MRTrack.Type = MainRAMType::DMA32;
NDS.ARM9.MRTrack.Var = Num; NDS.ARM9.MRTrack.Var = Num;
break; break;
}*/ }
NDS.DMA9Timestamp += (UnitTimings9_32(burststart) << NDS.ARM9ClockShift); NDS.DMA9Timestamp += (UnitTimings9_32(burststart) << NDS.ARM9ClockShift);
burststart -= 1; burststart -= 1;