diff --git a/src/CP15.cpp b/src/CP15.cpp index 538c66a4..0f8d180f 100644 --- a/src/CP15.cpp +++ b/src/CP15.cpp @@ -2102,13 +2102,9 @@ void ARMv5::CodeRead32(u32 addr) if ((addr >> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = MainRAMTimestamp + ((1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; if ((NDS.ARM9Timestamp <= WBReleaseTS) && (DataRegion == WBLastRegion)) // check write buffer NDS.ARM9Timestamp += 1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; if ((NDS.ARM9Timestamp <= WBReleaseTS) && (DataRegion == WBLastRegion)) // check write buffer NDS.ARM9Timestamp += 1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; if ((NDS.ARM9Timestamp <= WBReleaseTS) && (DataRegion == WBLastRegion)) // check write buffer NDS.ARM9Timestamp += 1<> 24) == 0x02) { - MainRAMTimestamp = NDS.ARM9Timestamp + DataCycles; - if (NDS.ARM9ClockShift == 2) MainRAMTimestamp += 4; - DataRegion = Mem9_MainRAM; + MRTrack.Type = MainRAMType::Fetch; + MRTrack.Var = MR32 | MRSequential; + MRTrack.Progress = reg; } else { DataRegion = NDS.ARM9Regions[addr>>14]; if ((NDS.ARM9Timestamp <= WBReleaseTS) && (DataRegion == WBLastRegion)) // check write buffer NDS.ARM9Timestamp += 1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; if ((NDS.ARM9Timestamp <= WBReleaseTS) && (DataRegion == WBLastRegion)) // check write buffer NDS.ARM9Timestamp += 1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; + else + { + DataRegion = NDS.ARM9Regions[addr>>14]; - if (WBTimestamp < ((NDS.ARM9Timestamp + DataCycles + ((1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; + else + { + DataRegion = NDS.ARM9Regions[addr>>14]; - if (WBTimestamp < ((NDS.ARM9Timestamp + DataCycles + ((1<> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; + else + { + DataRegion = NDS.ARM9Regions[addr>>14]; - if (WBTimestamp < ((NDS.ARM9Timestamp + DataCycles + ((1<> 24) == 0x02) { - MainRAMTimestamp = NDS.ARM9Timestamp + DataCycles; - MainRAMTimestamp += 2<>14]; + + if (WBTimestamp < ((NDS.ARM9Timestamp + DataCycles + ((1<>14]; // burst stores seem to process the extra delay cycles at the end of the burst // this means that we end up *always* able to begin code fetches 3 cycles early when accessing the bus @@ -2997,17 +3005,19 @@ void ARMv5::DWrite32S_2() if ((addr >> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = (MainRAMTimestamp + ((1<>14]; - } + else + { + DataRegion = NDS.ARM9Regions[addr>>14]; - if (WBTimestamp < ((NDS.ARM9Timestamp + DataCycles + ((1<