don't click here

ROM Properties Page shell extension

Discussion in 'Technical Discussion' started by GerbilSoft, Jul 20, 2016.

  1. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    ROM Properties Page v1.5 is now available for download! (It seems I forgot to update this thread for v1.3 and v1.4; oh well.)

    GitHub: https://github.com/GerbilSoft/rom-properties/releases
    Ubuntu PPA: https://launchpad.net/~gerbilsoft/+archive/ubuntu/ppa

    There's a lot of new stuff in v1.5, so I'll just list a few of the big ones:
    • Support for Leapster Didj textures, PowerVR 3.0.0 textures, Pokémon Mini ROM images, and Khronos KTX2 textures.
    • Enhanced security functionality for the online database image downloader on Windows, Linux, and OpenBSD.
    • The property sheet now shows a language dropdown for some formats that support multiple languages in a single ROM, e.g. Nintendo DS and 3DS.
    • Xbox 360 STFS thumbnail icons are now displayed.

    See NEWS.md for the full list of changes.

    [​IMG]

    ROM Properties Page v1.2 is now available for download!

    GitHub: https://github.com/GerbilSoft/rom-properties/releases
    Ubuntu PPA: https://launchpad.net/~gerbilsoft/+archive/ubuntu/ppa

    New features:
    • rpcli, rp-stub, rp-thumbnailer-dbus: PNG images now have an sBIT chunk. Images without an alpha channel are now saved as RGB PNGs instead of ARGB, which usually results in a smaller file.
    • Some functions have been optimized using SSE2 and/or SSSE3.
    New systems:
    • Sega PVR and GVR texture decoding.
    • Microsoft DirectDraw Surface decoding.
    • Nintendo Badge Arcade files.
    • Sega Dreamcast disc images. (Track 03 in ISO or BIN, and .GDI)
    • Sega Saturn disc images.
    • Atari Lynx ROM images. (Headered only)
    See CHANGES.md for a full list of changes.

    Download links:
    Note: For Windows, you will need the MSVC 2017 runtime:
    Note 2: For *ubuntu, you can install the individual packages, or rom-properties-all for all frontends.

    ----------------------------------------------------------------

    So, what does this shell extension do?

    Got a USB hard drive with Wii disc images for USB Loader GX or the Dolphin Emulator? Now you can actually see what those discs are:

    [​IMG]

    Or maybe you're using Nintendont for GameCube:

    [​IMG]

    How about some in-depth information on a GameCube save file? (The icon will be animated if your browser supports APNG.)

    [​IMG]
     
    Last edited: Mar 31, 2020
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,218
    965
    93
    Long-term happiness
    Looks interesting! This might well be something I install if/when it reaches Windows and xfce.
     
  3. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Now with Nintendo DS icons! (The blurriness is caused by the fact that the icons are 32x32, and the Dolphin file manager is upscaling them.)

    [​IMG]
     
  4. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    And now, Nintendo DS icons on Windows XP:

    [​IMG]

    No property page yet. Also, COM sucks.
     
  5. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    You don't know how happy this makes me. I'm really impressed with how fast this is moving along, and I can't wait to see your continued progress on this.
     
  6. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    I'm very excited about this, since I want to make my ROM folders not look like crap. Hoping for icons for other platforms like Game Boy!
     
  7. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Game Boy ROMs obviously don't have built-in icons, so it'd have to rely on an external database. That having been said, I am planning on adding at least GameTDB support for disc thumbnails for GameCube and Wii.
     
  8. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    And now, time for some "external" media scans:

    [​IMG]

    [​IMG]

    I added a libcurl-based downloader in the KDE version. It retrieves disc scans from GameTDB for GameCube and Wii games.

    Not seen in the GCN screenshot: A change to handle the second disc for two-disc games, e.g. Resident Evil 4.
    Also, the *.wbf1 files in the Wii screenshot are "second half" files, since I recently converted my Wii HDD to FAT32. (It was previously NTFS.)

    Some minor issues with the current implementation:
    • Images are not cached outside of the system thumbnail implementation. This means that if you have two copies of e.g. Super Smash Bros. Brawl (RSBE01), it has to download the image twice. I'll add a local caching mechanism for the shell extension later.
    • The images are not transparent. Dolphin applies a highlight so it works fine as long as the background color is white. I'll need to crop the circles using the Qt drawing tools (and GDI or GDI+ once I add ths in the Windows version). (The cropped versions will be cached by the system thumbnail implementation, not the shell extension. Only the original images will be cached by the shell extension.)
    • GCN/Wii region codes are a bit screwy in some cases. For example, the "PAL" code is used for multi-lingual releases in Europe, and there's currently no way to prefer a specific language for these. (I'm currently defaulting to "EN".) [The real issue is that the discs have different labels in different countries, but the data is identical.]
    • Similarly, there's some releases that have different subsets of languages in different builds of the game, with region codes 'W', 'X', 'Y', and 'Z'. I'm defaulting to "EN" for these as well. (Bonus: 'W' is also used for Taiwan.)
     
  9. Hivebrain

    Hivebrain

    Administrator
    3,047
    154
    43
    53.4N, 1.5W
    Github
    You could have a built-in emulator that runs at high speed and takes a screenshot after 20 in-game seconds. This is more or less how video thumbnails are made.
     
  10. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    For Wii/GCN games? Hope you enjoy your computer spending an hour at 100% CPU usage.
     
  11. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Using an emulator might work for older systems, but the title screen doesn't necessarily appear at a fixed point. An online database is far easier to deal with (if it exists, at least).

    Here's a partial TODO list of what needs to be done right now before a v1.0 release: (parentheses indicate OS-specific implementations)
    • Add a local cache for downloaded external media. (Linux, Windows)
    • Add an external media downloader. (Windows)
    • Implement the ROM Properties page. (Windows)
    • Add a system logo and console description to the ROM Properties page.
    • Mega Drive: Detect subsystems, e.g. Mega CD, 32X, Pico.
    • GameCube, Wii: Cut out parts of the downloaded disc scans for transparency purposes.
    • Configuration program for determining which images are used for thumbnails, since e.g. GameTDB has covers and discs. (Linux, Windows)
     
  12. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Some updates, in case anyone's interested:
    • Fixed a few reference leaks in the Win32 COM code.
    • Improved the libcurl-based downloader on Linux by checking the Content-Length header.
    • Started work on IExtractImage for Windows (not committed yet). This is needed in order to provide actual thumbnail previews instead of just icons. (IExtractImage is for XP; I'll also implement IThumbnailProvider for Vista+.)
    • Started work on a urlmon-based downloader for Windows, though I might scrap it in favor of WinInet, since urlmon only supports downloading to a file, whereas WinInet supports downloading to memory.
    More TODO:
    • Need to implement the local cache for "external" downloads, so images don't need to be downloaded multiple times if e.g. you have multiple copies of the same game for some reason.
    • Possibly add a way to "import" files into the cache. I'm using a slightly different directory layout than GameTDB (separated by Wii, GameCube, and Triforce, rather than grouping them all together). One option is a 'fallback' cache key for GCN and Triforce; that is, check the correct system directory first, and if it's not there, check Wii.
    • Improve the downloader to keep a connection open to each server in the case that multiple images from one server are being downloaded. (http keep-alive)
     
  13. Hivebrain

    Hivebrain

    Administrator
    3,047
    154
    43
    53.4N, 1.5W
    Github
    It could have a built-in list of durations to run the emulator then. No worse than having a built-in list of thumbnail urls (which might all disappear one day).

    P.S. Obviously I'm not talking about anything above Mega Drive here.
     
  14. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    I won't personally use this because I don't like shell extensions in general, but I think the best way to handle it would be offering the user a triple option during the installation process:
    1. never use thumbnails / icons whatsoever (just fill the property page and whatever);
    2. use an external source for thumbnails and icons "on demand", so only relevant images are downloaded on the fly as needed;
    3. download a gigantic library of images once and for all, which would make this usable even on computers without an internet access.
     
  15. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    For the first release, disc thumbnails for GCN/Wii/Triforce will be automatically downloaded on demand from GameTDB.com. However, the local cache directory will use the same directory structure as their download packs, so it's possible to download the packs and install them offline. (I'll add an option to disable downloading entirely when I add a configuration UI.)

    Icons from NDS games are always extracted on demand from the ROM image, since the icon is literally "right there".
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    Yes, of course I was referring to the "external" icons only. The problem doesn't exist at all if the icons are readily available in the ROM files themselves.
     
  17. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Why aren't save banners being used from Gamecube/Wii games?
     
  18. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    For GameCube, the 96x32 banner is present in opening.bnr, and will be available as an option later on. (Changing the type used for thumbnails will require clearing the system thumbnail cache.)

    For Wii, the save banner/icon isn't easily accessible, since it's not in a fixed location on disc. You can see this in Dolphin - it only loads the banner once the save file is created.
     
  19. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Yesterday I looked into writing the file properties page for the Windows port. On Windows, a property page consists of a dialog resource, which means that you either have to use a hard-coded dialog in a resource script or generate one programmatically. There's basically zero documentation on the latter, and MSDN's description of DLGTEMPLATEEX is totally broken. In addition, if there's even the slightest error with the generated dialog, the property sheet will merely hide your tab once you click it without any explanation. No errors are logged anywhere.

    I ended up using a commented hexdump of a DIALOGEX resource from The Old New Thing. This will eventually become the basis of a "dialog generator" class, which can be used to generate an arbitrary dialog resource in memory.
     
  20. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    And now, some more screenshots!

    [​IMG]

    [​IMG]

    The ROM Properties tab, which was the first thing I implemented in the Linux/KDE version, is now available in the Windows version. I probably need to pick a better monospaced font; right now, it's using Lucida Console with the same font size as the rest of the dialog, which looks a bit out of place.