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,452: Line 1,452:
* rfid is hit, let's go to our newly hooked srr0 with 0x2EFCC address.
* rfid is hit, let's go to our newly hooked srr0 with 0x2EFCC address.
* Time to use address preserved in r3. This address going thru few checks, it needs to be in 0x10000000- 0x12FFFFFF range (EE JIT Code).
* Time to use address preserved in r3. This address going thru few checks, it needs to be in 0x10000000- 0x12FFFFFF range (EE JIT Code).
* From this address emulator get single word, that word is used to figure out what mips code wanted to do. This word is ppc instruction that caused exception.
* From this address emulator get single word, that word is used to figure out what mips code wanted to do. This isn't simple offset but some kind of custom identifier.
* Code now read extended opcode (XOP) field to figure out instruction type ((code >> 1) & 0x3FF)
* When matching identifier is found, task is performed. Some tasks just jump to function and do what is needed, some continue that hackfest and instead are injected into recompiled code as branches to functions that will perform what game want them to do.
* When matching xop identifier is found, task is performed. Some tasks just jump to function and do what is needed, some continue that hackfest and instead are injected into recompiled code as branches to functions that will perform what game want them to do.
* blr is hit, remember that link register is patched earlier to 0x28F8C8
* blr is hit, remember that link register is patched earlier to 0x28F8C8
* This function restores previously backed up regs and set link register to value returned by hook. That's all.
* This function restores previously backed up regs and set link register to value returned by hook. That's all.
Line 1,548: Line 1,547:


Note: This code don't exist in ps2_netemu.
Note: This code don't exist in ps2_netemu.
== Shin Sangoku Musou config ==
This config does something with sceGsSyncPath by storing 0x4 to INTC_STAT before jumping to it (from one of the main function, so only a specific jump to sceGsSyncPath). I am thinking it fixes this: WhECT9RGZ0k (YouTube link)
What could be happening internally for something like this to be fixed? Interrupt delay to avoid an infinite loop or something? The freeze looks similar to something like the Ecole games (Melty Blood) where the game can move slightly after the freeze, or even break out of it entirely (rare).
* It does write an interrupt request for the start of the VBlank. Looks like the game does sync with the refresh rate and the game logic (at least the specific function you have mentioned) does break itself when the timing is not right.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 14:59, 10 August 2022 (UTC)
** Writing to INTC_STAT remove vblank start bit in this case (acknowledge that interrupt happened). But yeah, generally this is timing issue. Probably similar issue to what pcsx2 have: [[https://github.com/PCSX2/pcsx2/issues/5369#issuecomment-1146042222 | here.]] But affect different games due to other differences in emulator. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 19:38, 10 August 2022 (UTC)


== Universal DNAS anti-wipe patch ==
== Universal DNAS anti-wipe patch ==
Line 1,659: Line 1,666:
== Games with EE threading/interrupt issues ==
== Games with EE threading/interrupt issues ==


* '''Def Jam: Fight for NY'''
** Random hangs on first loading sequence.
* '''Visual Mix: Ayumi Hamasaki Dome Tour 2001'''
** Random hangs during loading transitions.
* '''Harry Potter and the Chamber of Secrets'''
* '''Harry Potter and the Chamber of Secrets'''
** Seems to randomly hang on the last stage of loading (ra=0x19bf70). WaitSema calls spotted during the hang.
** Seems to randomly hang on the last stage of loading (ra=0x19bf70). WaitSema calls spotted during the hang.
Line 1,770: Line 1,773:
*PS2 Memory and Hardware Mapped Registers Layout
*PS2 Memory and Hardware Mapped Registers Layout
*Video Modes
*Video Modes
*<s>Config related info</s> Done.
*Config related info


'''Video Modes''' listed there are not even supported by emulators without GS, and likely to fail even on PS3 with GS. This is really info for PS2 wiki in my opinion. '''PS2 Memory and Hardware Mapped Registers Layout''' also fit more in PS2 wiki. This is more like general PS2 dev knowledge than emulation related stuff. Eventually keep them as a links to ps2tek or ps2 devwiki, or something. Let me know if you think this is/isn't good idea. For example PS1 page don't list stuff like this, same goes for PSP page. In case of Config stuff. This is crucial part of this page, but i feel that harm general readability. Due to complicated nature of PS2 config descriptions are getting bigger, and bigger. Honestly this is still missing a lot of info because many times we are limiting ourself to not make descriptions too extensive. All that to not flood page too much. Maybe it's time to move most of that to new dedicated page? We can leave some basic info, like that small table, plus some '''BOLD''' link to "advanced page". This should allow to wikify and move some non-config stuff from talk page. This are only ideas, i expect not everyone will be happy about all of them. Lets talk. :P --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 08:21, 16 January 2023 (UTC)
'''Video Modes''' listed there are not even supported by emulators without GS, and likely to fail even on PS3 with GS. This is really info for PS2 wiki in my opinion. '''PS2 Memory and Hardware Mapped Registers Layout''' also fit more in PS2 wiki. This is more like general PS2 dev knowledge than emulation related stuff. Eventually keep them as a links to ps2tek or ps2 devwiki, or something. Let me know if you think this is/isn't good idea. For example PS1 page don't list stuff like this, same goes for PSP page. In case of Config stuff. This is crucial part of this page, but i feel that harm general readability. Due to complicated nature of PS2 config descriptions are getting bigger, and bigger. Honestly this is still missing a lot of info because many times we are limiting ourself to not make descriptions too extensive. All that to not flood page too much. Maybe it's time to move most of that to new dedicated page? We can leave some basic info, like that small table, plus some '''BOLD''' link to "advanced page". This should allow to wikify and move some non-config stuff from talk page. This are only ideas, i expect not everyone will be happy about all of them. Lets talk. :P --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 08:21, 16 January 2023 (UTC)
Line 1,894: Line 1,897:
{| class="wikitable" style="font-size:small;"
{| class="wikitable" style="font-size:small;"
|-
|-
! Name !! Start EA !! End EA !! Flags !! Notes
! Name !! Start !! End !! Flags !! Notes
|-
|-
| work  
| work  
Line 2,410: Line 2,413:
|| 0x13000000  
|| 0x13000000  
|| 0xD00000003  
|| 0xD00000003  
|| Recompiled EE code that gets executed.
||
|-
|-
| vu0_jit_code  
| vu0_jit_code  
Line 2,416: Line 2,419:
|| 0x18400000  
|| 0x18400000  
|| 0xD00000003  
|| 0xD00000003  
|| Recompiled VU0 micro code that is executed.
||
|-
|-
| vu0_jit_data  
| vu0_jit_data  
Line 2,428: Line 2,431:
|| 0x22000000  
|| 0x22000000  
|| 0xE00000003  
|| 0xE00000003  
|| Lookup Table which holds start addresses of recompiled blocks. If block is not in the table, it gets recompiled right when emulator tries to access it.
||
|-
|-
| eerom_jit_lut  
| eerom_jit_lut  
Line 2,434: Line 2,437:
|| 0x30000000  
|| 0x30000000  
|| 0xE00000003  
|| 0xE00000003  
|| EE ROM Lookup Table which holds start addresses of recompiled blocks. If block is not in the table, it gets recompiled right when emulator tries to access it.
||
|-
|-
| ustack (micro stack)  
| ustack (micro stack)  
Line 2,501: Line 2,504:
|| 0x42000B0000001  
|| 0x42000B0000001  
|| Thread EEonBE
|| Thread EEonBE
|-
|}
=== Gxemu ===
{| class=wikitable style=font-size:small;
|-
! Name !! Start EA !! Unk (lpar?) !! Unk !! Notes
|-
| work || 0 || 0 || 0 ||
|-
| vu0_direct || 0x30000000 || 0x30000000 || 0x1000000 ||
|-
| ustack || 0xAAA70000000 || 0x4200000000 || 0x1000000 ||
|-
| transcode|| 0x50000000 || 0xD00000000 || 0 || Recompiled EE code that gets executed.
|-
| transpc|| 0x10000000 || 0xE00000000 || 0 || Lookup Table which holds start addresses of recompiled blocks. If block is not in the table, it gets recompiled right when emulator tries to access it.
|-
| spc|| 0x40000000 || 0xE0000000 || 0x1000000 ||
|-
| rsx|| 0xA0000000 || 0x80000000 || 0x1000000 ||
|-
| sb_mmio|| 0x60000000 || 0x60000000 || 0x1000000 ||
|-
| io_work|| 0x80000000 || 0x70000000 || 0x1000000 ||
|-
| ee_cached|| 0x200000000 || 0xFF00000000 || 0x1000000 ||
|-
| ee_mmio|| 0x210000000 || 0x300000000 || 0x1000000 ||
|-
| ee_uncached|| 0x220000000 || 0x100000000 || 0x1000000 ||
|-
| ee_uncacc|| 0x230000000 || 0x100000000 || 0x1000000 ||
|-
| ee_rsvd0 || 0x240000000 || 0xA00000000 || 0x1000000 ||
|-
| ee_rsvd1 || 0x250000000 || 0xA00000000 || 0x1000000 ||
|-
| ee_spr_lo|| 0x260000000 || 0x700000000 || 0x1000000 ||
|-
| ee_spr_hi|| 0x270000000 || 0x800000000 || 0x1000000 ||
|-
| ee_kmem0 || 0x280000000 || 0xFF00000000 || 0x1000000 ||
|-
| ee_kmmio0|| 0x290000000 || 0x300000000 || 0x1000000 ||
|-
| ee_kmem1 || 0x2A0000000 || 0x100000000 || 0x1000000 ||
|-
| ee_kmmio1|| 0x2B0000000 || 0x300000000 || 0x1000000 ||
|-
| ee_krsvd0|| 0x2C0000000 || 0xA00000000 || 0x1000000 ||
|-
| ee_krsvd1|| 0x2D0000000 || 0xA00000000 || 0x1000000 ||
|-
| ee_krsvd2|| 0x2E0000000 || 0xA00000000 || 0x1000000 ||
|-
| ee_dbg || 0x2F0000000 || 0x900000000 || 0x1000000 ||
|-
| iop_mem|| 0x400000000 || 0x400000000 || 0x1000000 ||
|-
| iop_kmmio0 || 0x4B0000000 || 0x500000000 || 0x1000000 ||
|-
| iop_kmmio1 || 0x4A0000000 || 0x500000000 || 0x1000000 ||
|-
| spu2_mem || 0x600000000 || 0x600000000 || 0x1000000 ||
|-
| spu2_pcm || 0x800000000 || 0x1000000000 || 0x1000000 ||
|-
| rsx_xdr|| 0xA00000000 || 0x1500000000 || 0x1000000 ||
|-
| rsx_ddr|| 0x900000000 || 0x1600000000 || 0x1000000 ||
|-
| vrc_area || 0x90000000 || 0xC00000000 || 0x1000000 ||
|-
| ioptrace || 0x40000000000 || 0x1400000000 || 0x1000000 ||
|-
|}
===Emu===
{| class="wikitable" style="font-size:small;"
|-
! Name !! Start EA !! Size !! Flags !! Notes
|-
| work          || 0x0 ||        0x2000000(32MB) || 0x200000000 || 64MB minus below allocations (up to user stack 10). Minimum 32MB.
|-
| spider work  || 0x30000000 ||  0x600000(6MB) ||  0x600000000 || (sb work)
|-
| iop ram      || 0x100000000 || 0x200000(2MB) ||  0x600000000 ||
|-
| ps2 rom      || 0x200000000 || 0x400000(4MB) ||  0x600000000 ||
|-
| spu2 ram      || 0x70000000 ||  0x200000(2MB) ||  0x600000000 ||
|-
| spu2 ram2    || 0x70200000 ||  0x200000(2MB) ||  0x600000000 ||
|-
| pcm work      || 0x80000000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| menu work    || 0x90000000 ||  0x400000(4MB) ||  0x600000000 ||
|-
| user stack 0  || 0x10100000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 1  || 0x10300000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 2  || 0x10500000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 3  || 0x10700000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 4  || 0x10900000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 5  || 0x10B00000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 6  || 0x10D00000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 7  || 0x10F00000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 8  || 0x11100000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 9  || 0x11300000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| user stack 10 || 0x11500000 ||  0x100000(1MB) ||  0x600000000 ||
|-
| sb mmio      || 0x20000000 ||          ?(?MB) ||            ? ||
|-
| spc area      || 0x40000000 ||          ?(?MB) ||            ? ||
|-
| rsx mmio      || 0x50000000 ||          ?(?MB) ||            ? ||
|-
| rsx gcmbar1  || 0x60000000 ||          ?(?MB) ||            ? ||
|-
| memcard      || 0x300000000 || 0x1100000(17MB) ||          ? || Allocated much later than above memory.
|-
|-
|}
|}
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)