Introducing the IOP
* So after a week, it's finally here! The initial implementation of the IOP has been added to the emulator. You might wonder why did it take so long? This was mostly because I wanted to make the implementation as complete as possible and also test it to ensure it's bug free. So this is actually based on the MIPS R3000A interpreter I wrote last year for my PS1 emulator. So did I just copy the code and call it a day? Hell no, the code in that ancient project is awful, even if it works. So I completely rewrote the interpreter by using our modern techiniques of storing state. So rewriting the old code allowed me to test if it actually worked in that environment and could boot PSX games. * Due to this, the implementation is a bit more complete than the EE as it includes interrupt support. In addition we have to account for the fact that the IOP runs at 36.864MHz, in constrast to the EE which clocks at 295MHz. This maps approximatly to an 1/8 ratio, which means that 1 IOP instruction will run every 8 EE cycles. The current implementation of this is hacky and a bit inaccurate because some EE instructions can take more than 1 cycle to execute, but it's good enough for now (Play! assumes this as well and can boot 40%+ of games). * Because both the CPU emulators can share a lot of naming conventions, to avoid confusion each processor has been seperated into a namespace so we can always know which CPU we are refering to. Finally, for now reads/writes except for the BIOS and IOP RAM, haven't been implemented but will come soon.
Showing
- CMakeLists.txt 4 additions, 1 deletionCMakeLists.txt
- src/common/manager.cpp 22 additions, 112 deletionssrc/common/manager.cpp
- src/common/manager.hpp 126 additions, 7 deletionssrc/common/manager.hpp
- src/common/memmap.hpp 21 additions, 7 deletionssrc/common/memmap.hpp
- src/cpu/cop0.hpp 0 additions, 117 deletionssrc/cpu/cop0.hpp
- src/cpu/ee.cpp 0 additions, 1125 deletionssrc/cpu/ee.cpp
- src/cpu/ee.hpp 0 additions, 150 deletionssrc/cpu/ee.hpp
- src/cpu/ee/cop0.hpp 105 additions, 0 deletionssrc/cpu/ee/cop0.hpp
- src/cpu/ee/ee.cpp 1098 additions, 0 deletionssrc/cpu/ee/ee.cpp
- src/cpu/ee/ee.hpp 172 additions, 0 deletionssrc/cpu/ee/ee.hpp
- src/cpu/iop/cop0.hpp 78 additions, 0 deletionssrc/cpu/iop/cop0.hpp
- src/cpu/iop/iop.cpp 1078 additions, 0 deletionssrc/cpu/iop/iop.cpp
- src/cpu/iop/iop.hpp 163 additions, 0 deletionssrc/cpu/iop/iop.hpp
- src/main.cpp 4 additions, 1 deletionsrc/main.cpp
Loading
Please register or sign in to comment