Undocumented SPU Channels: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
mNo edit summary
(ch74 samples)
Line 55: Line 55:


== Channel 74 ==
== Channel 74 ==
Returns random data. Mostly used as a seed to feed a FIPS 186 PRNG with it.
Returns random data. Mostly used as a seed to feed a FIPS 186 PRNG with it.


Sample data (256 MB):
https://mega.co.nz/#!gNc0hQrR!4rC-Stz5yqi7yqvp6OWOQcxB_XhlrOadoE_fE5fyDxE


A bitmap generated from RNG samples:
[[File:Ch74_bitmap.png|200px|A bitmap generated from RNG samples|left|A bitmap generated from RNG samples.]]


{{Development}}<noinclude>[[Category:Main]]</noinclude>
{{Development}}<noinclude>[[Category:Main]]</noinclude>

Revision as of 21:52, 1 July 2014

Channels 64, 72 and 73

Used for storing the version.

Reading/writing the data:

void read_ch73(u32 skip, u32 *buf, u32 len)
{
	u32 i;
	spu_wrch(64, 0x10000);
	for(i = 0; i < skip; i++)
		spu_rdch(73);
	for(i = 0; i < len; i++)
		buf[i] = spu_rdch(73);
}

void write_ch72(u32 skip, u32 *buf, u32 len)
{
	u32 i:
	spu_wrch(64, 0x10000);
	for(i = 0; i < skip; i++)
		spu_wrch(72, spu_rdch(73));
	for(i = 0; i < len; i++)
		spu_wrch(72, buf[i]);
}

lv1ldr writes the version:

s64 lv1ldr_main(...)
{
	//...
	u64 ldr_ver = 0x0003004100000000;
	write_ch72(0, &ldr_ver, 2);
	//...
}

Other isolated binaries check the version:

s64 check_version(u64 ldr_ver)
{
	u64 stored_ver;
	read_ch73(0, &stored_ver, 2);
	//...
}

s64 load_isoself(...)
{
	ldr_ver = 0x0003004100000000;
	if(check_version(ldr_ver) != 0)
		return 0x30;
	//...
}

Channel 74

Returns random data. Mostly used as a seed to feed a FIPS 186 PRNG with it.

Sample data (256 MB): https://mega.co.nz/#!gNc0hQrR!4rC-Stz5yqi7yqvp6OWOQcxB_XhlrOadoE_fE5fyDxE

A bitmap generated from RNG samples:

A bitmap generated from RNG samples.