Editing PS1DRV

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: Line 1:
==HW Registers==
PS1 emulation specific registers used by PS1DRV.
===PS1DRV 1.1.0===
{| class="wikitable"
! Address !! Name !! Description
|-
| 0x1000F240 || SIF_CR        || Sif control register, used by PS1DRV to?
|-
| 0x1000F300 || STAT          || PS1 GPUSTAT.
|-
| 0x1000F310 || GP0_E2_reg*  || Store response for GP1 (0x10000002) cmd.
|-
| 0x1000F320 || GP0_E3_reg*  || Store response for GP1 (0x10000003) cmd.
|-
| 0x1000F330 || GP0_E4_reg*  || Store response for GP1 (0x10000004) cmd.
|-
| 0x1000F340 || GP0_E5_reg*    || Store response for GP1 (0x10000005) cmd.
|-
| 0x1000F380 || PGIF          || PGIF status register.
|-
| 0x1000F3C0 || sfifo || Read from here return GP1 command from PS1 GPU fifo, fifo size is 8 words.
|-
| 0x1000F3E0 || gfifo || Read from here return GP0 command from PS1 GPU fifo, fifo size is 32 words.
|-
|}
Note: Beside this specific set, PS1DRV use standard VIF/GIF/TIMER/ETC. registers for transfers to GS, and other tasks.<br>
( * ) are made up names.
==GP1 commands handling==
PS1DRV 1.1.0 handle GP1 (0x00,0x01,0x03,0x05-0x08) on software side, while commands 0x02, 0x04, and 0x10 are completely ignored by PS1DRV. This imply some kind of hardware behavior on PGIF side that take care of mentioned CMDs.
GP1 parser function is at 0x201D1C, a0 is command from buffer (0x70000060) which is previously read from sfifo.<br>
Function which read GP1 from sfifo is located at 0x204F08, and is set as pgif handler using syscall 114. Function additionally check if command is 0/1, if yes then flag indicating gp0 fifo flush in near future is set. This shorten time where pgif wait for gfifo, and eventually give up since flush is in the plan anyway.
==Hardcoded Settings==
==Hardcoded Settings==
===Overview===
===Overview===
Line 37: Line 4:
Compatibility flags for PS1DRV, mostly PS1 GPU emulation related.
Compatibility flags for PS1DRV, mostly PS1 GPU emulation related.


===Config values explanation===
====Config values explanation====
{| class="wikitable"
<pre>
! Name (PS1DRV) !! Name (Deckard) !! Description
poly    = Render Polygon Delay by X multiplier
|-
sprt    = Render Rectangle Delay by X multiplier
| poly    || || Render Polygon Delay by X multiplier.
mecha    = Set 0x1F402014 to value (When greater than 2, this overwrites the speed setting set in OSDSYS.)
|-
null    = GP0 Increased Sync: Makes the emulator spend more time polling the GP0 FIFO directly, allowing it to respond faster to incoming data.
| sprt    || || Render Rectangle Delay by X multiplier.
vblank  = Adds extra scanlines to emulated frame time, making emulated VBLANK interrupts take more time to occur.
|-
hl      = Delay Command GP0 0xA0 transfer
| mecha    || || Write values to 0x1F402014.
pgpu    = Makes the emulator not do anything until timer 0's counter is equal to or greater than this value plus 4.
|-
special  =  
| null    || PARAM_CPU_DELAY || GP0 Increased Sync: Makes the emulator spend more time polling the GP0 FIFO directly,
    bit ( 2 and higher are unavailable/unused in non deckard models. )
allowing it to respond faster to incoming data. On Deckard model value is added to 0x79E and send as PARAM_CPU_DELAY)
    0 = Skip VRAM->VRAM transfers command, and flush GP0 fifo, if command is not 0x80000000.
|-
    1 = When set, "poly" only apply if the polygon is textured.
| vblank  || || Adds extra scanlines to emulated frame time, making emulated VBLANK interrupts take more time to occur.
    2 = if set 0x5000 is stored on 0x1CB40420, else 0
|-
    3 = Converted to 0x20, and stored at 0x1CB4041C
| hl      || || Delay Command GP0 0xA0 transfer.
   
|-
    4 = store 0x3E8  on 0c1CB40400
| pgpu    || || Makes the emulator not do anything until timer 0's counter is equal to or greater than this value plus 4.
    5 = store 0x12C0 on 0x1CB40400
|-
    4+5 = store 0x5DC  on 0x1CB40400
| special  || || See table below
    else store 0x1F4  on 0x1CB40400
|}
====Special====
Bit 2 and higher are unavailable/unused in non Deckard models.
{| class="wikitable"
! Name (Deckard) !! Hex !! Bit !! Description
|-
| || 0x01 || 0   || Skip VRAM->VRAM transfers command, and flush GP0 fifo, if command is not 0x80000000.
|-
| || 0x02 || 1   || When set, "poly" only apply if the polygon is textured.
|-
| PARAM_GPU_DMA_WAIT_LIMIT || 0x04 || 2   || if set 0x5000 is stored on 0x1CB40420, else 0
|-
| PARAM_SPU_DMA_WAIT_LIMIT || 0x08 || 3   || Converted to 0x20, and stored at 0x1CB4041C
|-
| PARAM_MDEC_DELAY_CYCLE || 0x10 || 4   || store 0x3E8  on 0c1CB40400
|-
| PARAM_MDEC_DELAY_CYCLE || 0x20 || 5   || store 0x12C0 on 0x1CB40400
|-
| PARAM_MDEC_DELAY_CYCLE || 0x30 || 4+5 || store 0x5DC  on 0x1CB40400
|-
| PARAM_MDEC_DELAY_CYCLE || || else || store 0x1F4  on 0x1CB40400
|-
| PARAM_TIMER_LOAD_DELAY || 0x40 || 6    || if set, 0x6 is stored on 1CB40430, else 0
|-
| PARAM_MIPS_DCACHE_ON || 0x80 || 7    || store 1 on 1CB40440
|-
|}
*Configs which write to 0x1CB404XX write directly to 0x00B40400 400KB segment on Deckard PPC side.
*Source for non Deckard commands: https://psi-rockin.github.io/ps2tek/
*For Deckard commands see: [[IOP/Deckard#Per_game_configuration]]


====Mecha====
    6 = if set 0x6 is stored on 1CB40430, else 0
 
    7 = store 1 on 1CB40400
{| class="wikitable"
   
! Name !! Hex !! Description
    Configs which write to 0x1CB404XX probably write directly to 0x00B40400 400KB segment on Deckard PPC side.
|-
</pre>
| || 0x11 || Delay every PS1 drive cmd by 79 units
Source for non deckard commands: https://psi-rockin.github.io/ps2tek/
|-
| || 0x12 || Allow Stop command even if disc is not valid CD media.
|-
| || 0x14 || Delay Getstat command by 79 units
|-
| || 0x17 || Some kind of timing for Pause command (70 units), same as 0x1A
|-
| || 0x18 || Some kind of timing for ReadS command (400 units)
|-
| || 0x19 || Skip seeking status check on cmd Pause
|-
| || 0x1A || Some kind of timing for Pause command (70 units), same as 0x17
|-
| || 0x1B || Some kind of timing for Pause command (100 units)
|-
| || 0x1C || Delay every PS1 drive cmd by 53 units
|-
| || 0x1D || Some kind of timing for SeekL/SeekP command (50 units)
|-
| || 0x1E || Change speed immediately if cdda is playing during Setmode, and new value differ from old.
|-
| || 0x1F || Some kind of timing for Pause command (40 units), combined with 0x1C setting
|-  
| || 0xFE || Fast CD
|-                               
|}
Note: Some commands are missing from the list. "Unit" seems to be ms, but this need more work. Generally this table need more work, and should be considered as w.i.p.


===PS1DRV 1.1.0===
===VER 1.1.0===
From 2.00-2.10 ROMS, latest available for non Deckard models.<br>
From 2.00-2.10 ROMS, latest available for non Deckard models.<br>
'''Values are decimal''', that's how PS2 read them. Also please don't edit game IDs if is written in small letters, etc. This is also how emu search for them.
'''Values are decimal''', that's how PS2 read them. Also please don't edit game IDs if is written in small letters, etc. This is also how emu search for them.
Line 1,275: Line 1,185:
</div>
</div>


===PS1DRV 1.3.0 (Deckard model)===
===VER 1.3.0 (Deckard model)===
Values from ROM 2.50, so latest available model (TV).<br>
Values from ROM 2.50, so latest available model (TV).<br>
'''Values are hexdecimal''', that's how new PS2 read them. Also please don't edit game IDs if is written in small letters, etc. This is also how emu search for them.
'''Values are hexdecimal''', that's how new PS2 read them. Also please don't edit game IDs if is written in small letters, etc. This is also how emu search for them.
Please note that all contributions to PS2 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS2 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)