Elektrine lite

← Feed

@alice@mk.nyaa.place

Post #3434485

2026-06-03 05:22 UTC

The libmirage speedup PR landed today, so I landed the highscore part too. At this point we can consider CHD support done. It's still slow for compressed images, but I'm gonna switch to RetroAchievements hashes for that. Instead - I added a bunch more deinterlacing modes, and switched Blend to blend in linear sRGB (kinda, for performance it instead does power of 2 instead of 2.2 or proper sRGB, but ultimately it's close enough for this) Weave, Bob and Blend were already there. Linear is bob but with interpolation for doubled lines - it judders less as a result. Mean is like Blend but without shifting fields - basically Bob but blended - it doesn't smear pixel art as much but can look worse for 3D. Finally, Top Only and Bottom Only discard the other field, so the game runs at half the framerate and half the vertical resolution, but with no judder or motion blur. I may remove some of these for the release (or more likely, hide them behind a debug env variable), but we'll see. For now I just wanted an easy way to try other deinterlacers. See https://wiki.videolan.org/Deinterlacing/ for detailed explanations, I'm mostly using the same names. I didn't do Phosphor since we already have CRT filter (which does deinterlacing itself accordingly), and no fancy algorithms like YADIF - they are all optimized for smooth content like video rather than games + too heavy to run in parallel with the game.

Replies (1)

  • @alice@mk.nyaa.place 2026-06-04 02:30

    Update: RetroAchievement hashes don't work for this. Akumajou Dracula X - Chi no Rondo and its english translation have the same hash. Makes sense, since it hashes the title (which is SAMPLE PROGRAM in this game, funnily enough), and boot sectors, while the patch obviously edits the data instead. Soo this doesn't work. Another thing I investigated is - can we maybe hash less. E.g. in audio sectors we could probably hash just a few sectors and it would be enough to identify different music - unless we get extremely unlucky, but it's not common to have different game versions with different music in the first place. So - I wondered how much of the disks is audio tracks on average, in terms of the number of sectors per disc? Unsurprisingly it varies a lot, from about 91% for Rondo, to uhh about 1% for the Saturn port of SotN, to absolutely none for Ape Escape. On average it's about 40% in my library, so 60% of data tracks. So it's significant, but also actually not significant at all when reading even one compressed CHD image can take around 20 seconds - even if we skip data tracks entirely, 60% of that is still 12 seconds, still unacceptably slow. So - that doesn't work. What could work is skipping sectors on data tracks in addtion to that - e.g. doing every 100th sector (and perhaps skipping even more for audio tracks) I'd need to experiment with it, but in theory this could work.

    Open ##3434484