PS1DRV

From PS2 Developer wiki
Revision as of 16:11, 5 February 2022 by Kozarovv (talk | contribs)
Jump to navigation Jump to search

HW Registers

PS1 emulation specific registers used by PS1DRV.

PS1DRV 1.1.0

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.
( * ) 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.
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

Overview

Compatibility flags for PS1DRV, mostly PS1 GPU emulation related.

Config values explanation

Name (PS1DRV) Name (Deckard) Description
poly Render Polygon Delay by X multiplier.
sprt Render Rectangle Delay by X multiplier.
mecha Set 0x1F402014 to value (When greater than 2, this overwrites the speed setting set in OSDSYS.)
null PARAM_CPU_DELAY GP0 Increased Sync: Makes the emulator spend more time polling the GP0 FIFO directly,

allowing it to respond faster to incoming data. On Deckard model value is added to 0x79E and send as PARAM_CPU_DELAY)

vblank Adds extra scanlines to emulated frame time, making emulated VBLANK interrupts take more time to occur.
hl Delay Command GP0 0xA0 transfer.
pgpu Makes the emulator not do anything until timer 0's counter is equal to or greater than this value plus 4.
special See table below

Special

Bit 2 and higher are unavailable/unused in non Deckard models.

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

PS1DRV 1.1.0

From 2.00-2.10 ROMS, latest available for non Deckard models.
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.

NTSC-J

NTSC-U

PAL

PS1DRV 1.3.0 (Deckard model)

Values from ROM 2.50, so latest available model (TV).
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.

NTSC-J

NTSC-U

PAL