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 2,320: Line 2,320:
Cycles are count in function located at 0x17C9D0 (latest netemu). Emitter with addi to r13 register is what we are looking for. Since pcsx2 use different "unit", lets just call cycles here a... unit.
Cycles are count in function located at 0x17C9D0 (latest netemu). Emitter with addi to r13 register is what we are looking for. Since pcsx2 use different "unit", lets just call cycles here a... unit.


   _________________________________________________
   ________________________________________________
  |  Opcode type  |   Netemu/Gxemu  |    PCSX2  |
  |  Opcode type  | Netemu/Gxemu  |    PCSX2  |
  |----------------|------------------|-------------|
  |----------------|-----------------|-------------|
  | Default opcode |    1 unit       |    9 units  |
  | Default opcode |    1 unit     |    9 units  |
  | Load/Store    |    2 units     |  14 units  |
  | Load/Store    |    2 units     |  14 units  |
  | Multiply      |    4 units     |  16 units  |
  | Multiply      |    4 units     |  16 units  |
  | Divide        |    37 units     |  112 units  |
  | Divide        |    37 units     |  112 units  |
  | COP 0          |    1 unit       |    7 units  |
  | COP 0          |    1 unit     |    7 units  |
  | COP 1          |  1 unit(some 2) |    7 units  |
  | COP 1          |  1 unit(some 2) |    7 units  |
  | COP 2          |    1 unit       |    7 units  |
  | COP 2          |    1 unit     |    7 untis |
| NOP            |  0 units(!!!)  |  7? units |
  --------------------------------------------------
  ---------------------------------------------------
   
   
  Additionally pcsx2 use different cycles for many other opcodes that ps3 emus just count as one.  
  Additionally pcsx2 use different cycles for many other opcodes that ps3 emus just count as one.  
Line 2,340: Line 2,339:
   
   
  At the second hand gx/net emu do some weird shenigans with cycles based on... Opcode number, this is still small unknown here. Yeah...
  At the second hand gx/net emu do some weird shenigans with cycles based on... Opcode number, this is still small unknown here. Yeah...
  It turns out that emu is not counting nop cycles. Weird shenigans mentioned above check if opcode number is 1, which belongs to ee NOP in internal emu table.
  When opcode is NOP then emulator is not adding even single cycle. This explains a lot of issues with dma and why EE always seemed too fast for DMA and other components.
  This code takes 2 cycles (units) per loop in emu:
loop_here:
  addiu v0, -1
  nop
  nop
  nop
  nop
  nop
  bnez v0, loop_here
I still need to fully confirm that nop isn't handled in some special way elsewhere but looks like it's not.
   
   
  Underclocking/Overclocking could be done by modifying opcodes at 0x17CEB0, 0x17CFF8, 0x17D4C8.
  Underclocking/Overclocking could be done by modifying opcodes at 0x17CEB0, 0x17CFF8, 0x17D4C8.
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)