MarathonMan
Emulator Developer
- Thread Starter
- #761
Haven't checked back in a while, and as usual progress is made! Great job man, this is nothing short of amazing what you're doing here. Have you emulated the pipeline stalls and slips? I'd be very interested to see your method for doing so, as my implementations left a lot to be desired. Also, side note, is there any documentation of these conditions and how they're handled? I kind of just guessed about what would cause problems, and how they'd be resolved.
If cycle accurate N64 isn't usable at playable frame rates then it will still be a massive boon for the speed running community! I look forward to more progress, you are doing the lord's work![]()
Thanks, man.
Facilities for stalls and slips are in place, but I don't make much use of them ATM. The only faults I really respond to are external interrupts and co-processor unusable (games using the FPU will raise this fault to conditionally acquire a floating-point addition to their context space the first time a CP1 instruction is executed).
The stalls and slips are resolved in the same way any traditionaly RISC-y in-order pipeline is: flush to just before faulting instruction on faults, and freeze the pipeline on slips. To handle faults, I use the ShortCycleTable to conditionally execute parts of the pipeline to ensure that spurious stalls or slips are not raised when flushing, and eventually to call into the fault handler. To handle slips, I just set the 'stalls' variable which prevents the pipeline from doing any work for the next variable number of cycles (I will likely need to change this to be a little more specific in the future... but it works for now).
The VR4300 documentation is really good IMO. They cover most things. Whatever they didn't cover was just principles and whatnot applied from Hennessy and Patterson's.
Heh, still fighting the cycle-accuracy playable barrier, but I have some cards loaded up my sleeves yet.