ROM Properties Page shell extension

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
Some new updates (no screenshot this time): I've implemented initial support for displaying icons from .SMDH and .3DSX files, which are commonly used for 3DS homebrew. I have some preliminary code for unencrypted CIAs, and should be able to implement that as well as support for unencrypted 3DS ROMs.

Support for encrypted CIAs and 3DS ROMs probably won't happen until (unless?) the boot ROM is dumped.

Note that even for encrypted ROMs, there's still unencrypted sections. For example, CCI images (.3ds) have a plaintext product code, which can be used for GameTDB cover art fetches.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
And now for something completely different:

rp.2016-11-19.9da218b1.amiibo.png


amiibo NFC dump parsing and thumbnails, courtesy of amiibo.life.

Special thanks to @CheatFreak47 since he suggested amiibo parsing and provided some useful information and data files.
 
  • Like
Reactions: CheatFreak47

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
Quick update: I'm planning on releasing the next beta version (0.9) around Christmas. One major thing I want to have implemented by then that I haven't started yet is support for XFCE. This requires writing a property page plugin as well as an XFCE-compatible thumbnailer. (The thumbnailing interface on XFCE is the same as GNOME, so I should be able to support both with one project later on.)

Some other stuff that I've added recently:
  • Support for Wii RVT-R disc images. This doesn't do much, since the update partition doesn't have a full system menu, but it does at least identify the partitions as using the Debug key instead of Retail or Korean.
  • Added more amiibo entries and fixed a few that were incorrect.
  • Fixed a race condition in pngcheck that caused crashes on Windows 10 in some cases.
Things I also plan to have implemented for 0.9:
  • amiibo: Show owner and name. Requires the amiibo decryption key.
  • Wii: Display the opening.bnr game name.
  • Windows: Automatically pad icons so they're square, since Windows doesn't really like non-square icons. (It ends up being resized to be square, resulting in the wrong aspect ratio.)
Other stuff I've been working on that may or may not end up in 0.9:
  • Nintendo 3DS support. Currently handles .smdh, .3dsx, and unencrypted .cia files that have a META section. No support for .3ds/.cci or encrypted .cia yet. (Support for encrypted .3ds/.cci and .cia might not happen unless the protected boot ROM is dumped.)
  • Wii save files. Requires the SD common key, IV, and MD5 blanker. Contains a banner and icon similar to GameCube save files, but at a higher resolution. (Banner is 192x64; icon is 48x48.)
Does anyone have any suggestions for ROM images, save files, etc. that could be supported by ROM Properties? In particular, anything that has a built-in icon or thumbnail, or has a freely-available database of images like GameTDB.
 
  • Like
Reactions: CheatFreak47

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
Today's progress update: There's now an XFCE (Thunar) property page plugin. Thumbnail generation isn't supported yet on XFCE, though if you had thumbnails generated using the KDE plugin, then they should show up in Thunar as well. (...with an exception if the filenames have spaces in them, because Thunar replaces spaces with urlencoded %20 when generating thumbnail names, whereas KDE and other desktop environments don't.) [Sidenote: GTK+ sucks. :V The XFCE plugin is currently more lines of code than the KDE version, and it doesn't have thumbnailing yet.]

I also came across a few GBA titles that aren't recognized, and I'm not sure if there's a really good way to add support for these other than hard-coded exceptions. Specifically, an expansion pack for the DS game "Daigasso! Band Brothers" was released in the form of a GBA cartridge. The ROM image has a GBA header at 0xA0, but it's missing the GBA logo data, so it isn't bootable as a standalone game. The missing logo data prevents rom-properties from recognizing it.
 
Last edited by GerbilSoft, , Reason: bleh GTK+

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
Almost ready to release v0.9-beta2, and it has an important feature that makes it more usable on Windows systems:

rp.2017-01-25.d716e5c4.Win7.fallbacks.png


On Windows, only one icon and thumbnail handler can be registered per file type. rom-properties didn't register itself for common extensions like .iso before, since if a .iso image wasn't supported (i.e. anything that isn't GameCube or Wii), it would show a blank file icon. The new feature stores the previously-registered icon and thumbnail handler in a backup key in the registry. If rom-properties doesn't support a file that it's registered for, then it uses the backup to call the previous icon handler. This lets us support GameCube and Wii disc images with .iso extensions as well as other .iso files.

The above screenshot shows a Smash Bros. Brawl disc image with .iso extension, as well as a generic disc image. (It's named "RSBE01.notwii.iso" because I had it in a larger directory before taking the screenshot, so I wanted it to be right next to the Smash Bros. Brawl image.) The Wii disc image shows the disc scan, while the not-a-Wii disc image shows the correct ISO file icon.
 
  • Like
Reactions: CheatFreak47

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
So here's what I've been working on since v0.9-beta2:
  • Parser for Windows/DOS EXEs, DLLs, and other executable files. This includes NE, LE, LX, and PE formats. For NE and PE, the header flags are shown, and if a version resource is present, the version resource is displayed in a subtab. Not yet implemented is icon thumbnailing (for non-Windows platforms only) and manifest parsing (for PE).
  • The Nintendo DS, GameCube, and Wii parsers now support downloading cover scans. The user configuration program for determining which type of scan to use has not been started yet, but it will be included for v1.0.
  • Parser for Wii U disc images. (*.wud) Currently only shows the basic product information, including game ID, region, and system version; everything else is encrypted using a per-disc key. GameTDB downloads of disc and cover scans are available.
  • Support for multiple sizes of external images. This will allow e.g. downloading the "default" image for small thumbnails, and then downloading "large" images if the thumbnail size is increased. Supported for Nintendo DS and Wii U; support for internal images (e.g. Windows executables) will be added later. An option to control downloading of large images will be added to the user configuration program, since that might not be wanted on low-bandwidth connections.
Some other stuff in progress:
  • Windows: Property tab for actual CD-ROM drives, e.g. if you insert a Wii DVD-R. Icon handling probably won't be added initially, since I don't want to conflict with the default CD-ROM icon handler.
  • Nintendo 3DS parser. Currently only supports standalone .smdh and .3dsx files, and I think unencrypted .cia files that have a META section. Will be adding support for encrypted .cci/.3ds for GameTDB image downloading and partition table viewing; for decrypted .cci/.3ds and .cia, it will parse the icon as well.
I'm still looking for feature suggestions and/or code contributions. If you have any ideas, feel free to reply.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
And here's the first public screenshot of the Nintendo 3DS parser!

rp.2017-03-25.af71363f.Nintendo3DS.png


The following file formats are currently supported:
  • .smdh: Shows text fields, region code, and age ratings. Icon is also extracted.
  • .3dsx: Shows the SMDH section if it's available.
  • Encrypted .3ds (.cci): Shows some plaintext card information like media ID and product code, plus a partition listing. Cover art can be downloaded from GameTDB.
  • Decrypted .3ds: Same as encrypted, but can also extract the icon and other SMDH fields.
  • Zero-Key .3ds: Same as decrypted. Used by some homebrew. (This is basically encrypting with a key that consists of all zeroes.)
  • Encrypted .cia: Shows title ID, version, and contents table.
  • Decrypted .cia: Same as encrypted, but can also extract the icon and other SMDH fields, and can download cover art from GameTDB. DSiWare CIAs will also show a subtab showing the SRL header, which is basically what you'd see if you extracted the .SRL and viewed its properties by itself.
Other things I need to test:
  • System software, e.g. firmware updates.
  • DSi system software repackaged as CIAs, e.g. PictoChat.
  • DLC and game updates.
  • SDK software.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
Getting close to a 1.0 release. I'm probably going to postpone the configuration UI, but the actual functionality is there. You'll just need to edit the config file manually.

For 1.1, I'd like to add a set of "generic" icons for the systems to use if images aren't available. These should be in multiple sizes with alpha-transparency, starting with 128x128 or 256x256 as the largest, plus a small version at 16x16 and/or 24x24. (The small versions may need adjustments; for 32x32 and larger, downscaling should work.) If anyone would like to contribute these icons, please let me know. (The images must have a free redistribution license, e.g. CC-BY-SA or GPLv2.)

Icons needed: (listed by ROM Properties class)
  • Sega Mega Drive (JP and US variants), Sega CD, Sega 32X, Sega Pico
  • GameCube, Wii3, Triforce
  • Nintendo DS, DSi1
  • Nintendo Game Boy, Game Boy Color
  • Nintendo Game Boy Advance
  • Nintendo 64
  • Super NES (JP/PAL and US variants)
  • Sega Dreamcast save file (VMU image?)
  • PlayStation save file
  • Virtual Boy
  • Nintendo amiibo
  • Nintendo Entertainment System (JP and Intl variants)
  • Wii U3
  • Nintendo 3DS1
  • EXE2
1For DS(i) and 3DS, I can probably reuse the image from TWLoader.
2For EXE, I can reuse the image from one of KDE's icon sets. There will be multiple variants for the different operating systems that use EXE and related formats, e.g. MS-DOS, Win16, OS/2, Win32, Xbox, and EFI. There will also be variants for the different subtypes, e.g. DLLs and Win16 drivers.
3For 120mm disc-based systems, I might end up using a transparent overlay on top of the system's optical disc icon. This won't work too well for GameCube, though.
 
Last edited by GerbilSoft, , Reason: move vboy

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
rom-properties 1.0 is out now. See the OP for changes and downloads.

Among other things, it now supports encrypted 3DS ROMs, thanks to last night's Boot9Strap release. Keys are NOT included; you'll need to add them to keys.conf yourself.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
I want this but i've not pic in all my .cia game :(
If the CIAs are encrypted, then you either need to decrypt them, or dump the Boot9 keys and add them to keys.conf.

Assuming you have a 3DS with Boot9Strap, you can get Boot9.bin by holding Start+Select+X while turning the system on. Boot9Strap will dump boot9.bin, boot11.bin, and otp.bin to the /Boot9Strap directory.

You'll then need to open boot9.bin in a hex editor, and create this file: C:\Users\[username]\AppData\Roaming\rom-properties\keys.conf - the file should contain the following:
Code:
[Keys]
ctr-scrambler=
ctr-Slot0x2CKeyX=
ctr-Slot0x3DKeyX=
ctr-Slot0x3DKeyY-0=
ctr-Slot0x3DKeyY-1=
You'll need to fill in the empty placeholders with the actual values.

The CTR scrambler constant and 0x3D KeyY values aren't available in the boot ROM, but they are available on the Internet.

The KeyX values can be found in the following places in boot9.bin. You'll need to copy them from the hex editor to the text file as ASCII hexadecimal: (all keys are 16 bytes, or 32 hexadecimal digits)
  • ctr-Slot0x2CKeyX: 0xD9D0
  • ctr-Slot0x3DKeyX: 0xDA20
These are all the keys needed for most 3DS retail ROMs. 3DS debug ROMs need a different set.

I'll probably add a key manager to rp-config in the next release to make it easier to import all of the BootROM keys from a boot9.bin file directly.
 
Last edited by GerbilSoft, , Reason: +Roaming
  • Like
Reactions: chronoss

chronoss

Well-Known Member
Member
Joined
May 26, 2015
Messages
3,007
Trophies
1
XP
4,904
Country
Congo, Republic of the
If the CIAs are encrypted, then you either need to decrypt them, or dump the Boot9 keys and add them to keys.conf.

Assuming you have a 3DS with Boot9Strap, you can get Boot9.bin by holding Start+Select+X while turning the system on. Boot9Strap will dump boot9.bin, boot11.bin, and otp.bin to the /Boot9Strap directory.

You'll then need to open boot9.bin in a hex editor, and create this file: C:\Users\[username]\AppData\rom-properties\keys.conf - the file should contain the following:
Code:
[Keys]
ctr-scrambler=
ctr-Slot0x2CKeyX=
ctr-Slot0x3DKeyX=
ctr-Slot0x3DKeyY-0=
ctr-Slot0x3DKeyY-1=
You'll need to fill in the empty placeholders with the actual values.

The CTR scrambler constant and 0x3D KeyY values aren't available in the boot ROM, but they are available on the Internet.

The KeyX values can be found in the following places in boot9.bin. You'll need to copy them from the hex editor to the text file as ASCII hexadecimal: (all keys are 16 bytes, or 32 hexadecimal digits)
  • ctr-Slot0x2CKeyX: 0xD9D0
  • ctr-Slot0x3DKeyX: 0xDA20
These are all the keys needed for most 3DS retail ROMs. 3DS debug ROMs need a different set.

I'll probably add a key manager to rp-config in the next release to make it easier to import all of the BootROM keys from a boot9.bin file directly.
Thank but not easy for me :(
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
If you can help me, send me just a private message...
I'm trying to help you get the keys, which can't be done via PM for obvious reasons. :V

There's also a sheet on Google Sheets that contains AES keys for 3DS, and it has been updated with the Boot9 keys. You can search for it on Google using the correct search terms.
 
  • Like
Reactions: chronoss

chronoss

Well-Known Member
Member
Joined
May 26, 2015
Messages
3,007
Trophies
1
XP
4,904
Country
Congo, Republic of the
I'm trying to help you get the keys, which can't be done via PM for obvious reasons. :V

There's also a sheet on Google Sheets that contains AES keys for 3DS, and it has been updated with the Boot9 keys. You can search for it on Google using the correct search terms.
So, i'm waiting your next update to make it easier :(
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,255
Country
United States
So, i'm waiting your next update to make it easier :(
Or you could just email me. :V Also some of the keys aren't in boot9.bin, which makes it harder. (aeskeydb.bin might have it, but those seem to be encrypted, probably using a boot9.bin key.)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi @ AncientBoi:
    ooowwww a new way for me to beat NFS 510 :D @SylverReZ
    +1
  • SylverReZ @ SylverReZ:
    @AncientBoi, Yeah, believe you can do PSP games as well. But a Pi5 is much powerful in comparison.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Not sure about other models of Pi4 but the Pi 4 B with 8GBs OCed to 2Ghz handles PSP really great except like 1 game I found and it is playable it just looks bad lol Motor Storm Arctic something or other.
  • Psionic Roshambo @ Psionic Roshambo:
    Other games I can have turned up to like 2X and all kinds of enhancements, Motorstorm hmmm nope 1X and no enhancements lol
  • Veho @ Veho:
    Waiting for Anbernic's rg[whatever]SP price announcement, gimme.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I will admit that one does seem more interesting than the usual Ambernic ones, and I already liked those.
  • Veho @ Veho:
    I dread the price point.
    +1
  • Veho @ Veho:
    This looks like one of their premium models, so... $150 :glare:
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    To me that seems reasonable.
  • Psionic Roshambo @ Psionic Roshambo:
    I mean since basically all the games are errmmm free lol
  • Veho @ Veho:
    I mean yeah sure but the specs are the same as a $50 model, it's just those pesky "quality of life" things driving up the price, like an actually working speaker, or buttons that don't melt, and stuff like that.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I think all in my Pi 4 was well north of 200 bucks 150ish for the Pi 4 the case the fancy cooler, then like 70 for the 500GB MicroSD then like 70 for the Xbox controller. But honestly it's a nice set up I really enjoy and to me was worth every penny. (even bought more controllers for 2 or 4 player games.) hmmm have never played any 2 player games yet :(
  • Veho @ Veho:
    Yeah that's what I hate about the RPi, it's supposedly $30 or something but it takes an additional $200 of accessories to actually turn it into a working something.
  • Psionic Roshambo @ Psionic Roshambo:
    yes that's the expensive part lol
  • Veho @ Veho:
    I mean sure it's flexible and stuff but so is uremum but it's fiddly.
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah a lot of it I consider a hobby, using Batocera I am constantly adjusting the collection adding and removing stuff, scraping the artwork. Haven't even started on some music for the theme... Also way down the road I am considering attempting to do a WiiFlow knock off lol
  • Veho @ Veho:
    I want everything served on a plate plz ktnx, "work" is too much work for me.
  • Veho @ Veho:
    Hmm, with that in mind, maybe a complete out-the-box solution with all the games collected, pacthed and optimized for me would be worth $150 :unsure:
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's all choice and that's a good thing :)
  • Bunjolio @ Bunjolio:
    animal crossing new leaf 11pm music
  • Bunjolio @ Bunjolio:
    avatars-kKKZnC8XiW7HEUw0-KdJMsw-t1080x1080.jpg
    wokey d pronouns
  • SylverReZ @ SylverReZ:
    What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo
    SylverReZ @ SylverReZ: What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo