Skip to content
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

General information I found while looking into thumbnails #1

Open
maspling opened this issue Dec 22, 2023 · 7 comments
Open

General information I found while looking into thumbnails #1

maspling opened this issue Dec 22, 2023 · 7 comments

Comments

@maspling
Copy link

Hi! Not really an issue but I thought I would summerize stuff I found while generating images for the Duo, that might help you out a bit.

If you have problems with getting the images to show up in the library list view even if they work in the detailed view:

The thumbnails for the list view is govern by pce_thumbs.bin, this file does generate a thumbnail from the image automatically when booted once (added to the library), but it currently (1.1b) writes the wrong magic for the generated images (IDA instead of IPA), if hexedited to be correct it shows up. However it generates a 120x120 file, that gets cut off 12 pixels from the bottom (probably to fill the width). So if you want it to not be cut off you would have to generate a 120x120 black image, and blit a 108x108 image onto it.

Generated image: Discord_XbB8WbXmY7

Rescaled and inserted into pce_thumbs: obs64_seUnuqoKvg

Format of the pce_thumbs file is

? [1b]
MAGIC (FTA) [3b]
? (0xCE1C) [4b]
Amount of thumbnails [4b]
Repeated per thumbnails:

  • CRC32 of the game [4b]
  • Offset in file [4b]

At the location mentioned in the offset, the IPA image is located.

@maspling
Copy link
Author

If you add a larger image than 120x120 to the pce_thumbs file will render just the part of it that fits the buffer, and fill the rest with gray pixels.

@siffland
Copy link
Owner

Great information to know. I am going to play around with pixel size when i get the chance. Also i need to try to figure out what CRC32 or other mechanism they are using for CD games.

@davewongillies
Copy link

Great information to know. I am going to play around with pixel size when i get the chance. Also i need to try to figure out what CRC32 or other mechanism they are using for CD games.

Over on reddit I saw this: https://www.reddit.com/r/AnalogueInc/comments/18oieeq/analogue_duo_library_images_full_set_included/

have me exparamenting all night and I think I just managed to figure stuss out. The big thing first is, it seem like the CRC32 hex they are using to identify the games is based on track 2 of any given disc (or track one if there is only one). I have checked 5 discs and compared them to the working cd images. Every CRC32 that I generated off of a bin file of track two has come out with a matching image file. I have tried this with hashtab (windows) and hash checker (android) and got the same results in both.

@maspling
Copy link
Author

Just noticed myself that the hash matches the first Data section of the disk (usually track 2). You can look up this in redump:

For example, Snatcher has the list and pcecd thumbs file hash of 9fa5e9d2, Which is the first data track according to http://redump.org/disc/35095/

@maspling
Copy link
Author

This should be scriptable from the datfile at http://redump.org/datfile/pce/
image

@siffland
Copy link
Owner

I am working on updating it. I have the logic working to automatically sense the type of datfile (hucard vs CD) and choose between track 1 and 2 or 01 and 02 they use both in different cue files. The redump filenames do not match the thumbnail names (see below), going to work on some regex voodoo tomorrow and see how it goes (I am pretty tired so might be overthinking it). Plus the only official discs I have to try are YS I&II (USA) and YS III (USA)

Thumbnails:

Ys Book I _ II (USA).png
Ys I _ II (Japan).png

redump:

Ys Book I & II (USA)
Ys I & II (Japan)

@siffland
Copy link
Owner

Read the docs on thumbnails special character replacement and completely reworked the script. It creates hucard and cd bin files (Using the stock no-intro and redump DAT files). There are a few Demos and Alt versions missing but working on it. Will release new releases.

Still some work to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants