mirror of
https://github.com/array-in-a-matrix/SAROO.git
synced 2025-04-02 10:31:43 -04:00
gamepatch update: wakuwaku7 speedup
This commit is contained in:
parent
d98055a743
commit
e39289ae99
3 changed files with 36 additions and 11 deletions
|
@ -901,6 +901,7 @@ int bios_cd_cmd(void)
|
|||
*(u32*)(0x06000290) = 3;
|
||||
ip_size = bios_loadcd_read();//1912读取ip文件
|
||||
*(u32*)(0x06002270) = read_1st;
|
||||
*(u32*)(0x02000f04) = cdc_read_sector;
|
||||
*(u16*)(0x0600220c) = 9;
|
||||
|
||||
retv = my_bios_loadcd_boot(ip_size, 0x18be);//跳到18be
|
||||
|
@ -960,31 +961,37 @@ void cdc_init(void)
|
|||
}
|
||||
|
||||
|
||||
int cdc_read_sector(u8 *buf, int fad, int num)
|
||||
int cdc_read_sector(int fad, int size, u8 *buf)
|
||||
{
|
||||
int nsec, retv, status;
|
||||
int nsec, retv, status, num;
|
||||
num = (size+3)&0xfffffffc;
|
||||
|
||||
cdc_set_size(0);
|
||||
cdc_reset_selector(0, 0);
|
||||
cdc_cddev_connect(0);
|
||||
|
||||
cdc_play_fad(0, fad, num);
|
||||
cdc_play_fad(0, fad, (size+0x7ff)>>11);
|
||||
while(num>0){
|
||||
retv = cdc_get_numsector(0, &nsec);
|
||||
if(retv<0)
|
||||
break;
|
||||
return retv;
|
||||
if(nsec==0)
|
||||
continue;
|
||||
|
||||
cdc_get_del_data(0, 0, nsec);
|
||||
cdc_trans_data(buf, 2048*nsec);
|
||||
|
||||
if(num>=2048)
|
||||
nsec=2048;
|
||||
else
|
||||
nsec=num;
|
||||
cdc_get_del_data(0, 0, 1);
|
||||
cdc_trans_data(buf, nsec);
|
||||
|
||||
cdc_end_trans(&status);
|
||||
|
||||
buf += 2048*nsec;
|
||||
buf += nsec;
|
||||
num -= nsec;
|
||||
}
|
||||
|
||||
return retv;
|
||||
return size;
|
||||
}
|
||||
|
||||
void cdc_read_test(void)
|
||||
|
@ -1076,7 +1083,7 @@ void cd_cmd(void)
|
|||
|
||||
cdc_read_test();
|
||||
|
||||
//cdc_read_sector(0x06040000, 0xd5, 0x195);
|
||||
//cdc_read_sector(0xd5, 0x195, 0x06040000);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -327,6 +327,20 @@ void WAKU7_patch(void)
|
|||
SS_CTRL = (SAROO_EN | CS0_RAM1M);
|
||||
*(u32*)(0x0601C19C) = 0x34403440;
|
||||
*(u16*)(0x0601C16C) = 0x9;
|
||||
*(u8*) (0x0601244d) = 0xa;
|
||||
|
||||
|
||||
*(u32*)(0x06011E64+0x00) = 0xD207D108;
|
||||
*(u32*)(0x06011E64+0x04) = 0x60436322;
|
||||
*(u32*)(0x06011E64+0x08) = 0x44087370;
|
||||
*(u32*)(0x06011E64+0x0c) = 0x40084000;
|
||||
*(u32*)(0x06011E64+0x10) = 0x4408523C;
|
||||
*(u32*)(0x06011E64+0x14) = 0x340C6312;
|
||||
*(u32*)(0x06011E64+0x18) = 0x324C5521;
|
||||
*(u32*)(0x06011E64+0x1c) = 0x432B6422;
|
||||
*(u32*)(0x06011E64+0x20) = 0x0603439C;
|
||||
*(u32*)(0x06011E64+0x24) = 0x02000F04;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ typedef unsigned short u16;
|
|||
typedef unsigned int u32;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
|
||||
#define REG(x) (*(volatile unsigned int*)(x))
|
||||
#define REG32(x) (*(volatile unsigned int*)(x))
|
||||
#define REG16(x) (*(volatile unsigned short*)(x))
|
||||
|
@ -48,7 +49,10 @@ typedef unsigned long long u64;
|
|||
#define bios_run_cd_player INDIRECT_CALL(0x0600026C, void, void)
|
||||
|
||||
int bios_cd_cmd(void);
|
||||
|
||||
int read_1st(void);
|
||||
void CHEAT_patch(void);
|
||||
void RUN_CHEAT(void);
|
||||
int cdc_read_sector(int fad, int size, u8 *buf);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue