-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCMD list #40
Comments
Thanks for your findings, @AKuHAK. I’ll try to sort them. It seems we should distribute them to various preexisting issues rather than create new ones, as explained below.
Isn’t this a partial duplicate of #12, and also already implemented here? linux/arch/mips/ps2/identify.c Lines 58 to 77 in 7ef0b69
I think the main targets for PlayStation 2 Linux are real hardware and emulators that simplifies development, for example QEMU. I’m hoping to revisit PS3 Linux, but then the real thing, via Other OS. I’m happy to accept good quality patches though, if someone feels PS3 and PS4 are important for the PlayStation 2 Linux kernel.
Sounds useful for #24? Maybe it’s a MAC address?
I suppose these subcommands mainly goes to #23?
Identifying the machine is best for #12, I think.
Likewise, #12 seems best for this one. |
I just posted here this list cause these particular SCMD commands are implemented even in partially emulated hardware. This means that these commands probably are present in every real hardware. Of course, the real SCMD list is much much larger. For example, on PSX DESR machines almost all 0x00 - 0xFF SCMD commands are supported and almost all SCMD 0x03 subcommands are supported (0x03, 0x00 - 0x03,0xFF). This is an enormous list but mostly all commands are for internal use (to lock DVR writing media, some DVRP processor interrupts, and so on). I don't mean that we should focus on compatibility with PS2Emu, just mention features that are implemented, so these features can be safely used.
Huh, yes Sony chooses bad naming for this ID. |
👍
#12 again, presumably. 😄
Is its algorithm publicly known these days? |
I collected and reversed some info. But for proper algorithm we need to collect data from all ps2 different models. Part of ilinkid is so called Model ID, and this ID is unique for console revision. It seems that Sony just have big table with all possible Model IDs and corresponding console hardware. While I collected many Model ID (about 200 if I am correct) this list is still incomplete. For example pink scph-70001 has different ModelID than black one. I use Model ID for proper console recogntion, cause sometimes pirates alter Model Name in nvram (there is software that allows it on pre-Deckard units) and sell, for ecample, SCPH-30003 as SCPH-39004. This can be easily checked by reading ilink ID from eeprom, cause noone knows about that feayure in 2000s. |
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.
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,...)
The text was updated successfully, but these errors were encountered: