RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Skyscraper and apple2

    Scheduled Pinned Locked Moved Help and Support
    skyscraperapple2gamelist
    3 Posts 2 Posters 366 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sleve_mcdichael
      last edited by

      @muldjord, et al:

      My gamelist got corrupted (missing entries) so I investigated, and found an issue relating to Skyscraper and apple2 roms. (I suppose this applies to any system that uses writable disk images like this, but apple2 is the only one that I have at the moment.)

      apple2 roms aren't exactly "ROMs," in that they aren't read-only. Rather, they are "live" floppy disk images that are both read from, and written to, during normal operation.

      Skyscraper organizes its cache by assigning each entry a hash value, based on the file's sha1sum. When the file is written to, this changes its content and therefore its sha1sum, which "un-links" it from the cache entry.

      So what happened was this:

      I had some apple2 games. I scraped them using Skyscraper. Skyscraper hashed the files and wrote its database. Then I played a game (Lode Runner), and achieved a high score. This score was written to the disk image/ROM, which now has a different hash value than the database entry. Then, I removed a different game (Carmen Sandiego) from my library. I ran Skyscraper with --cache vacuum to clean out the removed game's (Carmen Sandiego's) assets. But now, the "Lode Runner" file that exists in my library is different from what's logged in the cache. And what's logged in the cache, doesn't exist...so it has its assets vacuumed along with Carmen Sandiego. Now I have zero Lode Runner assets cached, and when I rebuild my gamelist, it doesn't include a Lode Runner entry.

      I only had a small handful of apple2 games to begin with so it was relatively painless to reconstruct my gamelist after this single occurrence, but any ideas to prevent it happening again in the future?

      1 Reply Last reply Reply Quote 0
      • LolonoisL
        Lolonois
        last edited by

        Interesting find. What SkySkraper version you are on? Does it happen with all apple2 emulators or which one are you using in this context?

        Does the apple2 emulator in question support loading ROMs from zip files?

        Yes: You are lucky. Use zipped-ROMs and you should be fine, as SkySkraper uses the filename instead of the file contents for zip files (and other file formats). [1]
        I came across the same issue but with PC games, launched from *.conf "ROMs" (=dosbox configurations). I filed a bug report a while ago [2], but Muldjord is not very active on SkySkraper as it seems.

        No: If your favorite emulator can not deal with zipped ROMS you may add the extensions to this if clause [1], then the filename will be used as input for the hash.

        Only downside is that you have to reapply the patch everytime you update SkySkraper from sources. And you can not use the binary pre-compiled SkySkraper from the RetroPie maintainers.

        [1] https://github.com/muldjord/skyscraper/blob/master/src/nametools.cpp#L500-L505
        [2] https://github.com/muldjord/skyscraper/issues/333

        1 Reply Last reply Reply Quote 0
        • S
          sleve_mcdichael
          last edited by sleve_mcdichael

          @Lolonois oh yah, it looks like this is the same issue as that.

          I'm using linapple. It does not appear to support .zip files (platforms.cfg), but adding the Apple2 suffixes to that list in nametools.cpp does look like it might do the trick.

          Edit: yah that seems to have worked: https://github.com/muldjord/skyscraper/compare/master...s1eve-mcdichae1:skyscraper:apple2exts

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.