Commit graph

487 commits

Author SHA1 Message Date
Marco Satti
76091d9252 Changed around some debug stuff - last commit (SBUS fixes) actually fixed the OSDSYS load problem: "[Debug] EE SIO Message: # Loader 'rom0:OSDSYS':pc=00200008", which I didn't notice! I'm still spending a bit of time to double check the DMA logic. 2017-03-12 21:16:44 +08:00
Marco Satti
e138a0ac59 Moved some of the SBUS register update logic to the IOP side, so it now obeys the start / finish order. Updated the DMAC logic of EE and IOP to check for appropriate read/write FIFO sizes (used for debugging). 2017-03-11 00:42:09 +08:00
Marco Satti
770f3f6909 Fix up the DMAC accuracy option for quicker debugging. Currently investigating the "failed to load OSDSYS". 2017-03-10 14:56:05 +08:00
Marco Satti
0f92f3e2f9 Fixed up the load memory instructions - now gets to: "[Debug] EE SIO Message: # Loader: can't load rom0:OSDSYS" :) 2017-03-10 00:59:12 +08:00
Marco Satti
6e7031d570 Update the readme a bit... been a while. 2017-03-08 14:50:13 +08:00
Marco Satti
21121a30a3 Update to VS2017. 2017-03-08 13:23:19 +08:00
Marco Satti
c25c79290c Added in a system skip cycles option to consume all ticks for a run - for systems such as the DMAC's, where nothing will change if no DMA transfer is in process (wasting energy on nothing). Multi threaded mode needs to be tested with it. Reworked the IOP timers overflow check - not sure why, but there was a huge perf increase (no obvious changes, probably a lot of cache misses). 2017-03-07 23:35:04 +08:00
Marco Satti
5fc137163a Fixed up the interrupt/exception PC stuff for the ??? time... Still not happy with it but it works. IOP and EE now sitting in idle loops (interrupts enabled), which is good. Onto the VPU's! 2017-03-07 13:33:44 +08:00
Marco Satti
0d5159440b Fixed up the EE DMAC interrupt not getting handled properly. Need to investigate the IOP infinite loop next (no interrupts enabled). 2017-03-05 20:21:17 +08:00
Marco Satti
436dec2b0d Implemented the IOP source chain mode DMA transfer! EE and IOP are now communicating with each other! 2017-03-05 15:22:18 +08:00
Marco Satti
717632d7d7 Got IOP DMAC channel SIF1 to recieve data properly in (dest) chain mode - now working on implementing source chain mode to work (for SIF0). 2017-03-04 23:14:31 +08:00
Marco Satti
506a741a0d Cleanup of the IOP and EE DMAC's based upon new info from wisi and SP193, getting ready for IOP's chain mode. 2017-03-03 13:51:34 +08:00
Marco Satti
3e2c08eed4 Git sync commit. 2017-02-23 17:06:34 +08:00
Marco Satti
999d7402e3 Fix dword ordering of the u128 type, which fixes the FIFO queue word ordering. Currently investigating the IOP SIF1 chain mode (not documented except for PCSX2). 2017-02-22 22:51:57 +08:00
Marco Satti
513bb452bd Change the COP0 operating context functions to be 1 function. 2017-02-21 16:39:24 +08:00
Marco Satti
91bcd88dd1 Merge branch 'gs-pcrtc-test' 2017-02-20 18:53:11 +08:00
Marco Satti
92884aaae8 Still not finished with the CRTC, but I wil look at it later - sorted out the pixel clock stuff, how to interrupt the EE/IOP intc, and the timer gate functionality for now. 2017-02-20 18:47:23 +08:00
Marco Satti
0ef78b3084 Initial test of the PCRTC - based of guesses (calculating a pixel clock, using that for hblank and vblank). 2017-02-15 20:04:15 +08:00
Marco Satti
eaeea2066e Merge branch 'threading-test' - although MT mode is not quite ready (race condition issues), the ST mode was updated in the process (stable). 2017-02-04 15:26:05 +08:00
Marco Satti
a26e84c42f Changed the time slice VM options (MT and ST) to a single option, as both are useless when only 1 mode can be selected. 2017-02-04 11:58:05 +08:00
Marco Satti
fe7fe047f7 Got logging working again, fixed up single threaded mode, added in a VM option for time slice's per VM run() instead of fixed values. 2017-02-04 00:36:22 +08:00
Marco Satti
4e638f247b Major refactor & clean, implemented threading (still not sure on best practice but it seems fairly simple code wise), added system biasing / persistant clock speed state, stuffed up logging however, need to fix that. 2017-02-03 21:32:00 +08:00
Marco Satti
2340a10aa7 Working POC of threading. Still need to make the bus writes (in PhysicalMMU_t) atomic, but for now it works without it (DMA transfers I imagine will need this). Will also refactor the VM manager shortly. 2017-01-30 20:33:39 +08:00
Marco Satti
cca0ab5b01 Initial threading test try - not currently working. 2017-01-28 16:17:20 +08:00
Marco Satti
65f1287dc5 Refactored a lot of code, moved the EE and IOP core's MMU and Exception handlers into the base core class logic. Currently brainstorming over multi-threading, as this is a good time to put it in. 2017-01-27 22:47:02 +08:00
Marco Satti
12cd7f1e4f Fixes for interrupt handling... 2017-01-22 20:21:22 +08:00
Marco Satti
3af76911eb Initial commit of working IOP timers.. still a lot left unimplemented, but basics (sysclock count, interrupting) working. 2017-01-21 17:32:05 +08:00
Marco Satti
70cba8c009 Implemented IOP timers resources, logic to follow. 2017-01-19 19:21:52 +08:00
Marco Satti
5e48cefa6f Implemented most of the SBUS registers. 2017-01-19 17:21:11 +08:00
Marco Satti
a7cae2e5ef WIP on implementing SBUS register functionality. DMA and FIFO stuff done. 2017-01-18 21:27:52 +08:00
Marco Satti
c11b989f67 Moved more interrupt logic to registers. 2017-01-17 00:00:56 +08:00
Marco Satti
55aee83090 Begin implementing SBUS register functionality. Moved some parts of code from logic components into registers, such as determining if an interrupt should be raised. There is a blurry line here.. when should I put things into registers (event based) and when should I put things into logic components (polling based)? I have currently defined this line as "its ok to put things in registers that do not interface with other registers outside its 'area'", exceptions being made for fully un-reversed engineered parts such as the SBUS registers/logic. 2017-01-16 21:04:38 +08:00
Marco Satti
ead73a2e67 Moved setFieldValue to an inline function. 2017-01-16 10:33:16 +08:00
Marco Satti
e96661bfba Cleanup. 2017-01-15 21:58:26 +08:00
Marco Satti
90b6b7de1d Fixed up a few exception handling errors - in particular, the EE and IOP Core's now increment the PC before executing the instruction. 2017-01-15 16:17:26 +08:00
Marco Satti
12792cc78a Changed interrupts to a full polling method - currently level interrupt triggered, but can be edge if needed. Still investigating a bug to do with the IOP.COP0.Status where it doesnt always re-enable interrupts. 2017-01-13 22:52:27 +08:00
Marco Satti
a473c16894 Small optimisation to both DMAC logic. 2017-01-13 14:35:25 +08:00
Marco Satti
c1a6f7b264 Added in separate MIPS branch delay object type, split register debugging into reads and writes. 2017-01-13 00:17:18 +08:00
Marco Satti
a86f11028e Few small fixes to interrupt handling. Still not working properly, currently debugging. 2017-01-11 19:07:53 +08:00
Marco Satti
cf9f784eda FeelsReallyGoodMan - EE and IOP are beginning to communicate through the SBUS (DMA transfers)! IOP now interrupting on SIF1 completing. Will need to change the way interrupt exceptions are generated as currently the IOP INTC is sending one every tick (and getting handled meaning no progression in the IOP Core). Reworked some COP0 BitfieldRegister32's that were basically equivilant to a Register32 (simplified). Added in an initalise virtual function to the registers. General reorganisation. 2017-01-09 19:00:07 +08:00
Marco Satti
78b8b170f3 Fixup of the exception handling for the EE and IOP cores. Now checks for masking conditions before commiting the exception (especially needed for interrupts). 2017-01-06 12:07:58 +08:00
Marco Satti
4f8ec56862 WIP on the IOP Dmac 2017-01-04 14:09:55 +08:00
Marco Satti
0e4728be86 Added in register context as a parameter when reading/writing. 2 reasons: easier debugging, and to support registers which have different functionality depending on which component accessed it (ie: EE or IOP). This will be useful, for example, with the SBUS registers. 2017-01-03 18:13:34 +08:00
Marco Satti
706fcedd78 Cleaned up the memory and register types - no longer have a signed/unsigned combo, instead the caller must cast the result to the appropriate type (only useful on reads in most cases). Rationale for this change is to stop duplicating custom functionality through eg: readWordU/S. 2017-01-01 19:00:42 +08:00
Marco Satti
23e7301aa4 Initial IOP INTC (INTR?) commit - still to decypher bitfields within the registers. 2016-12-29 22:23:21 +08:00
Marco Satti
62654cdfe1 Cleanup. 2016-12-26 00:02:51 +08:00
Marco Satti
aaf895f7c2 Add in debug syscall tables for the EE and IOP. 2016-12-24 16:31:19 +08:00
Marco Satti
f04e6d795c Remove getPCValue() from PCRegister32_t - not needed, use normal register read functions. 2016-12-23 21:54:33 +08:00
Marco Satti
5863b6b252 WIP on IOP DMAC registers. Changed FIFO queue to use u32 as base type, since the IOP needs to read from it. 2016-12-23 00:48:23 +08:00
Marco Satti
9e0af0acb9 Begin adding in IOP DMAC resources/system logic. 2016-12-22 18:43:23 +08:00