It's still not as complete as what I managed to get before I accidentally deleted the file, but it still shows what the functions accept. I still don't know what the GsHParam functions do though, as it seems tied with the hardware.
Functions not mentioned here are not disassembled nor looked at by me. I believe that most (if not all) of them just configure unknown parts of the Playstation 2, which are not even mentioned on the Internet.
EDIT: I forgot to mention, I think that the only known value handled by VParam is the GCONT (RGB/YBrPr setting) value. It's the first bit.
Other than that... I suppose that nobody knows the significance of the other bits handled by both sets of functions.
As usual, the older Protokernel boot ROM has got less code. Not only because it doesn't have to worry about different hardware versions, but because it was probably designed with less features in mind.
SCPH-77006 (v15) Boot ROM v2.20
Code:
static u64 GsHVParam=0x40; /* 0x80015f20 */
static int var_80015f7c=-1; /* 0x80015f7c */
static unsigned char var_80015f80=0xFF; /* 0x80015f80 */
static unsigned int var_80022bd8; /* 0x80022bd8 */
static unsigned int var_80022b44; /* 0x80022b44 */
/* 0x800077d0 */
static int func_800077d0(unsigned int arg){
/* Reconfigures some unknown part (0xbf803210) of the PS2. Again, this kind of function is not present in BIOS v1.01. */
}
/* 0x8000d578 */
void GetGsVParam(void){
return(((unsigned char)GsHVParam&1) | (GsHVParam>>40&0xFF&1)<<5 | (GsHVParam>>1&0xFF&1)<<1 | (GsHVParam>>6&0xFF&7)<<2 | 0x80);
}
/* 0x8000d8a8 */
int SetGsVParam(unsigned int arg){
GsHVParam=GsHVParam&0xFFFFFFFE|(arg&1);
return(func_800077d0(0x7E)<<8|func_800077d0(0x7F));
}
/* 0x8000d338 */
void GetGsHParam(unsigned int *arg1, unsigned int *arg2, unsigned int *arg3, unsigned int *arg4){
unsigned int temp;
if((GS_REG_CSR>>16&0xFF)>=0x19 && var_80022b44&0xFE!=0x1C){
temp=GsHVParam<<14>>26-25;
}
else{
if((GS_REG_CSR>>16&0xFF)>=0x19 && var_80022b44&0xFE==0x1C){
temp=GsHVParam<<14>>26-1;
}
else{
temp=GsHVParam<<14>>26;
}
}
/* 0x0000d410 */
*arg1=temp;
if((GS_REG_CSR>>16&0xFF)>=0x19 && var_80022b44&0xFE==0x1C){
temp=GsHVParam<<14>>28-8;
}
else{
temp=GsHVParam<<14>>28;
}
/* 0x0000d474 */
*arg2=temp;
if(((GS_REG_CSR>>16&0xFF)>=0x19 || var_80022b44&0xFE==0x1C) && ((GS_REG_CSR>>16&0xFF)>=0x19 && var_80022b44&0xFE==0x1C))
/* 0x0000d4e4 */
temp=GsHVParam<<8>>26+0x18;
}
else{
/* 0x0000d500 */
temp=GsHVParam<<8>>26;
}
/* 0x0000d510 */
*arg3=temp;
if((GS_REG_CSR>>16&0xFF)>=0x19 && var_80022b44&0xFE==0x1C){
*arg4=GsHVParam>>28-8;
}
else{
*arg4=GsHVParam>>28;
}
}
/* 0x8000d5f0 */
void SetGsHParam(unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4){
unsigned int value, value2;
if(arg4==0xFF){
arg1=~arg1;
if(arg1!=var_80015f7c){
if(arg3==0x83){ /* 0x8000d638 */
value=arg1>>30;
if(var_80015f7c>>38==value || GsHVParam>>42&3!=var_80015f80){
func_80008108(value, 0x83);
}
}
else{ /* 0x8000d680 */
value=arg1>>8&3;
if(value!=var_80015f7c>>8&3 || GsHVParam>>42&3!=var_80015f80){
func_80008108(value, arg4);
}
}
/* 0x8000d6c0 */
var_80015f7c=arg1;
var_80015f80=GsHVParam>>42&3;
}
/* 0x8000d6d8 */
if(arg4&0x83==0) arg2=arg2&0x30C;
if(var_80022bd8!=0x40 && var_80022bd8!=0x60){
*(volatile unsigned char*)0xbf801908=8;
*(volatile unsigned char*)0xbf801904=0x42;
*(volatile unsigned char*)0xbf801905=0;
*(volatile unsigned char*)0xbf801900=0x80;
*(volatile unsigned char*)0xbf801900=arg1;
*(volatile unsigned char*)0xbf801900=arg1>>8;
*(volatile unsigned char*)0xbf801900=arg1>>16;
*(volatile unsigned char*)0xbf801906=0x35;
/* 0x8000d778 */
while(*(volatile unsigned char*)0xbf801908 & 1){
__asm("nop\nnop\nnnop");
}
*(volatile unsigned char*)0xbf801900=arg3;
*(volatile unsigned char*)0xbf801900=arg3>>8;
*(volatile unsigned char*)0xbf801900=arg3>>16;
*(volatile unsigned char*)0xbf801900=arg3>>24;
*(volatile unsigned char*)0xbf801906=0x35;
while(*(volatile unsigned char*)0xbf801908 & 1){
__asm("nop\nnop\nnnop");
}
*(volatile unsigned char*)0xbf801900=arg2;
*(volatile unsigned char*)0xbf801900=arg2>>8;
*(volatile unsigned char*)0xbf801906=0x11;
while(*(volatile unsigned char*)0xbf801908 & 1){
__asm("nop\nnop\nnnop");
}
if(*(volatile unsigned char*)0xbf801908 & 4){
func_800075c0();
*(volatile unsigned char*)0xbf801908=8;
func_80008bd8(arg4);
}
__asm("sync\n");
}
}
else{
var_80015f80=arg4;
var_80015f7c=-1;
}
}
SCPH-10000 (v0) boot ROM v1.01:
Code:
/* 0x8000a768 */
void GetGsHParam(unsigned int *arg1, unsigned int *arg2, unsigned int *arg3, unsigned int *arg4){
*arg1=GsHVParam<<14>>26;
*arg2=GsHVParam<<4>>28;
*arg3=GsHVParam<<8>>26;
*arg4=GsHVParam>>28;
}
/* 0x8000a820 */
void SetGsHParam(unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4){
unsigned int value;
func_00007c18(0x80, arg1&0xff);
value=arg1>>8;
func_00007c18(0x81, value&0xFF);
func_00007c18(0x82, arg1>>16&0xF);
func_00007c18(0x83, arg3&0xff);
func_00007c18(0x84, arg3>>8&0xFF);
func_00007c18(0x85, arg3>>16&0xFF);
func_00007c18(0x86, arg3>>24);
func_00007c18(0x88, arg2>>8&0x3);
func_00007c18(0x87, arg2&0xFF);
func_80008020(value&3, arg4);
}