Description
linux/arch/mips/include/asm/mach-ps2/scmd.h
Lines 22 to 34 in 7ef0b69
Some notes about the SCMD list. Currently, this is a very undocumented feature, cause this list depends on the Mechacon firmware version and probably is generated by mechacon processor.
For example, scmd_cmd_read_machine_name
actually reads machine model name from EEPROM (or NVRAM). EEPROM content can be rewritten, so this command can be inaccurate in some cases.
Below is the list of SCMD that I collected and that works in PS3 with backward compatibility PS2. In theory, this list should be universal for any mechacon.
scmd_cmd_read_rtc
scmd_cmd_power_off
It seems that these 2 is present on all machines.
scmd_cmd_read_machine_name
this one isnt present on very early units
scmd_cmd_write_rtc
this one also isn't present on some machines, for example in PS3/PS4 in PS2 mode
scmd_send_byte(0x12, NULL, 0, &ilinkID, sizeof(ilinkID));
_get_ilink_id
- returns iLink.ID - this is a unique ID, for each PS2 it is different. Some online games used this ID for identifying consoles. This ID is calculated from information on the sticker, and stored in EEPROM, all functions for calculating still is unknown.
scmd_send_byte(0x1e, NULL, 0
purpose unknown, returns some static information
0x41, 0x84, 0x85
purpose unknown, returns NULL
There is also such SCMD 0x03 command family. SCMD 0x03 is an interesting command set, cause it always is called with a subcommand. Looks like this feature is not implemented currently, but SCMD subcommands offers some useful information. Code examples can be found here:
https://github.com/ps2homebrew/PS2Ident/blob/master/libcdvd_add.c
For example sceCdApplySCmd(0x03,0x00,...)
_get_MV
will return 4 bytes, 1 byte error code (which is BTW buggy on some DTL-H301** machines - it will incorrectly return 0x01, error state, while no actual error proceed), 2 or 3 bytes - Mechacon version. 2 bytes on pre-Deckard models, 3 bytes on Deckard. Also 1 byte (last) of these 3 - will be the console real region (I mean the most accurate). Very useful command, based on mechacon version we can know which SCMD commands are supported, and also the real region is read (not that one from ROMNAME, but flag from EEPROM). This command also seems supported in all machines starting from very early units.
sceCdApplySCmd(0x03,0x01,...)
_get_DSP
will return DSP chip revision. Can be 4 values: 0,1,2,3. starting from SCPH-3xxxx always return 3.
sceCdApplySCmd(0x03,0x30,...)
purpose unknown
also 2 SCMD command are force disabled in PS3 in PS2 mode. That probably means that they are used somewhere:
scmd_send_byte(0x0a,
sceCdApplySCmd(0x03,0x45,...)