Editing Talk:PS2 Emulation

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1,093: Line 1,093:


===IOP SPE===
===IOP SPE===
This
SPE run not only dma related stuff, but also fully fledged r3000 instruction interpreter (yes interpreter, not recompiler).
<pre>
  opcode      | address
--------------+-------- 
r3000_ADDI      0x317C0
r3000_ADDIU    0x31800
r3000_SLTI      0x31840
r3000_SLTIU    0x31880
r3000_ANDI      0x318C0
r3000_ORI      0x31900
r3000_XORI      0x31940
r3000_LUI      0x31980
r3000_ADD      0x319C0
r3000_ADDU      0x31A00
r3000_SUB      0x31A40
r3000_SUBU      0x31A80
r3000_SLT      0x31AC0
r3000_SLTU      0x31B00
r3000_AND      0x31B40
r3000_OR        0x31B80
r3000_XOR      0x31BC0
r3000_NOR      0x31C00
r3000_SLL      0x31C40
r3000_unk1      0x31C80 Primary opcode field (Bit 26..31) = 0x3E (debug stuff, not existing on real r3000)
r3000_unk2      0x31CC0 Primary opcode field (Bit 26..31) = 0x3F (debug stuff, not existing on real r3000)
r3000_SRL      0x31D00
r3000_SRA      0x31D40
r3000_SLLV      0x31D80
r3000_SRLV      0x31DC0
r3000_SRAV      0x31E00
r3000_MULT      0x31E40
r3000_MULTU    0x31F00
r3000_DIV      0x31F80
r3000_MFHI      0x32080
r3000_MFLO      0x320C0
r3000_MTHI      0x32100
r3000_MTLO      0x32140
r3000_J        0x32180
r3000_JAL      0x32200
r3000_JR        0x32280
r3000_JALR      0x322C0
r3000_BEQ      0x32300
r3000_BNE      0x32340
r3000_BLEZ      0x32380
r3000_BGTZ      0x323C0
r3000_BcondZ    0x32400
r3000_SYSCALL  0x32480
r3000_BREAK    0x324C0
r3000_COP_bad  0x32500
r3000_COP0      0x32540
r3000_bad_op    0x32740
r3000_LB        0x32840
r3000_LH        0x32940
r3000_LW        0x32A40
r3000_LBU      0x32B80
r3000_LHU      0x32C80
r3000_LWL      0x32D80
r3000_LWR      0x32E80
r3000_SB        0x32F80
r3000_SH        0x33080
r3000_SW        0x33180
r3000_SWL      0x33300
r3000_SWR      0x33400
Addresses above ARE NOT the ones in emulator memory, this is local storage address in IOP SPE program!
Opcodes LWCx 0-3, and SWCx 0-3 are not supported at all.
Same goes for general COP 1-3 opcodes, but those cause COPx unusable r3000 exception.
While LWC/SWC are triggering bad opcode exception.
Not sure if LWC0/SWC0 should be allowed.
COP0 is working in PS2 mode, so those probably shouldn't cause exception.
At the second hand i don't know single IOP module that use that instruction.
</pre>
This is unconfirmed by any code reversing for now, but IOP emulator print messages like:  
This is unconfirmed by any code reversing for now, but IOP emulator print messages like:  
  Cache write (IOPADDR/LSADDR/SIZE)
  Cache write (IOPADDR/LSADDR/SIZE)
  Cache read  (IOPADDR/LSADDR/SIZE)
  Cache read  (IOPADDR/LSADDR/SIZE)
  ERROR: Double ICACHE fault
  ERROR: Double ICACHE fault
Which suggest that instruction cache is emulated for IOP. Making this (ps2/gx/net) emu only PS2 emulator that support cache emulation for IOP. For now even most ps1 emulators lack of that feature, and none of known PS2 emulators do that (including Pcsx2/Play!/Dobiestation). With this we can safely assume that also load delay slots are handled correctly here. Unrelated, but is hard to believe that someone implemented icache, but not load delay slots. Which again make it only known emu set that support this afaik.
Which suggest that instruction cache is emulated for IOP. Making this (ps2/gx/net) emu only PS2 emulator that support cache emulation for IOP. For now even most ps1 emulators lack of that feature, and none of known PS2 emulators do that (including Pcsx2/Play!/Dobiestation). With this we can safely assume that also load delay slots are handled correctly here. Unrelated, but is hard to believe that someone implemented icache, but not load delay slots. Which again make it only known emu set that support this afaik.  


===EEDMA on SPE3===
===EEDMA on SPE3===
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)