PCSX2 Documentation/PCSX2 EE Recompiler: Difference between revisions

Line 20: Line 20:
# The pause phase:<br > The purpose is to emulate the others HW block (VU, GIF, DMA etc..) In particular EE interrupts are handled here.
# The pause phase:<br > The purpose is to emulate the others HW block (VU, GIF, DMA etc..) In particular EE interrupts are handled here.


== Internal detail of the EE recompiler ==
== Memory And Buffer ==


An important part of the recompiler is the management of various blocks (x86/EE etc...). You can see below a nice schematic with the links between them.
An important part of the recompiler is the management of various blocks (x86/EE etc...). You can see below a nice schematic with the links between them.
Line 44: Line 44:


'''Important note:''' those LUTs are based on the TLB mapping at the boot of the EE kernel. They don't take TLB updates into consideration. It won't work if your game/program (linux/home-brew) relies on TLB management. In this situation your best bet is to use the interpreter.
'''Important note:''' those LUTs are based on the TLB mapping at the boot of the EE kernel. They don't take TLB updates into consideration. It won't work if your game/program (linux/home-brew) relies on TLB management. In this situation your best bet is to use the interpreter.


=== Base Block ===
=== Base Block ===
Line 62: Line 63:




=== Lazy Allocation ===
=== Memory Protection ===




== Code Generation ==


=== Dispatcher ===


=== Compilation


== EE Memory Emulation ==








[code]
static __aligned16 uptr recLUT[_64kb];
[/code]
Basically the RAM memory is splitted in 32MB zone. It is more complex for ROM, but boot ROM isn't really important to emulate.


You can get current BASEBLOCK of the PC with the macro
[code]
PC_GETBLOCK(pc)
[/code]


There is also an hardware lut. It cheaply converts a virtual address to the physical address (static TLB)


All those blocks are managed by the BaseBlocks class.
All those blocks are managed by the BaseBlocks class.
ninja
56

edits