Elektrine lite

← Feed

@alice@mk.nyaa.place

Post #3434494

2026-05-22 02:16 UTC

More updates: libmirage added pre/postgap support, so every image I have parses properly now. I also fixed mednafen - this one was non-trivial but basically I used the beetle-pce-fast implementation (which is also separate - there are 3 different ones, not 2!) + manually backported SBI support (mostly based on the bin/cue upstream implementation rather than the libretro one). Either way - PCE CD, PSX and Saturn all work. Now, what doesn't work is calculating checksums. It took me a bit to find it, but there are 2 issues in play. The first one is - my hacky sector reading optimization breaks because the image is compressed. Whoops. And it's not really fixable without modifying libmirage, so for now reading CHD images is slow (like, 20s for one image kind of slow). The other problem is that audio track data is byteswapped. While in theory having non-byteswapped format. Either way, it's a libmirage bug, and after changing it (for testing), it works and the checksums are correct - the same game in bin/cue and chd is recognized as the same game.

Replies (1)

  • @alice@mk.nyaa.place 2026-05-24 02:11

    More updates: libmirage fixed the byteswap issue and the maintainer is fine with adding optimized reading functions, so I took a stab at that. A bit too sick to finish it atm, but good news: it is fast for bin/cue. Bad news: it's still very slow for CHD so I'm gonna have to profile it, that's gonna be fun emulators themselves don't have a problem loading chd files at all, it's instant, so I suspect libmirage is doing sth inefficiently with libchdr either way we'll see, but in theory I could already land chd support now. It will just be very slow until that part is fixed

    Open ##3434493