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 request: tg16 platform

    Scheduled Pinned Locked Moved Help and Support
    skyscraperrequesttg16
    6 Posts 3 Posters 639 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 sleve_mcdichael

      @muldjord I tried to set up EmulationStation to show PC Engine as TurboGrafx-16 in the same way I have Genesis instead of Megadrive. I mostly have it working, but I still have to use the roms/pcengine folder to make it play nice with Skyscraper. Would it be trivial to add a tg16 platform so my folders can stop masquerading?

      (Specifically, even with symlinked directories in roms and gamelists duplicating pcengine to tg16; since SS writes "roms/pcengine" to the gamelist, when I had tg16 in es_systems.cfg, I got the error (from ES) that the rom paths (pcengine, per the gamelist) were outside the system path (tg16, per es_systems.cfg) and so they were all skipped. ES then saw the roms in tg16, but showed them all without metadata, since it "skipped" all the ones in the gamelist.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        @sleve_mcdichael said in Skyscraper request: tg16 platform:

        Would it be trivial to add a tg16 platform so my folders can stop masquerading?

        You don't need to move the folder to make it appear as tg16, just need to instruct EmulationStation to use the tg16 theme to display the folder - just like for Genesis/Megadrive.

          <system>
            <name>pcengine</name>
            <fullname>TG16</fullname>
            <path>/home/pi/RetroPie/roms/pcengine</path>
            <extension>.7z .pce .ccd .chd .cue .zip .7Z .PCE .CCD .CHD .CUE .ZIP</extension>
            <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ pcengine %ROM%</command>
            <platform>pcengine</platform>
            <theme>tg16</theme>
          </system>
        

        You can do that by adding a platforms.cfg file to /opt/retropie/configs/all and add to it:

        pcengine_theme="tg16"
        pcending_platform="tg16"
        

        then re-install one of the PC-Engine emulators so the changes are applied to EmulatonStation.

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

          @mitu said in Skyscraper request: tg16 platform:

          You don't need to move the folder to make it appear as tg16, just need to instruct EmulationStation to use the tg16 theme to display the folder - just like for Genesis/Megadrive.

          That's what I meant by "masquerading." It's a pcengine system pretending to be a tg16 system. I'd like my filesystem and cfg file to point to tg16 for TG-16 titles, is all. This workaround will have to do, until then.

          ectoE 1 Reply Last reply Reply Quote 0
          • ectoE
            ecto @sleve_mcdichael
            last edited by ecto

            @sleve_mcdichael You can use the commandline Skyscraper -p pcengine -s whatever -i /home/pi/RetroPie/roms/tg16 to change the roms folder of pcengine. This way I even have tg-cd separated from the rest. You would still need to change the platforms.cfg to change the theme. Look up Skyscraper on github. The documentation is really good!

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

              @ecto oh yeah, I forgot about just setting the input folder. I could even put that in config.ini under a [pcengine] section. I suppose that's probably my best option, then. Could use inputFolder= and gameListFolder=, and the only place it'll say "pcengine" is in the Skyscraper config and when I type the command.

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

                I got it working, basically. inputFolder=, et al, were the answer.

                .skyscraper/config.ini:

                # ...
                
                [pcengine]
                # use "tg16" folders for pce/tg16 titles
                inputFolder="/home/pi/RetroPie/roms/tg16"
                gameListFolder="/home/pi/.emulationstation/gamelists/tg16"
                mediaFolder="/home/pi/.emulationstation/downloaded_media/tg16"
                cacheFolder="/home/pi/.skyscraper/cache/tg16"
                # importFolder="/home/pi/.skyscraper/import/tg16"
                
                # ...
                

                Then I moved everything around in my filesystem to match these changes.

                This allowed me to point .emulationstation/es_systems.cfg at the roms/tg16 folder and still have the gamelists display correctly in ES. I did have to clear out the tg16 videos from my media folder (symlinked to ones in cache/pcengine that no longer exist) and build the gamelist one more time to fix the links but after that, it works fine!

                cacheFolder and importFolder don't really affect the gamelist end result, I just included them so that if a proper tg16 platform ever is added, everything will already be in the right place. (Edit: Setting importFolder gave me an error that the path does not exist when I tried to --cache edit on a rom. Even though it doesn't exist for any of the other systems either, but since this one is defined specifically I guess it really wants it to exist. Commenting out that line eliminated the error.)

                There was one more hitch. The runcommand launch art doesn't use the <image> file defined in the gamelist, but rather looks for a file matching the rom's name, in a folder matching the system name called by the run command (in es_systems.cfg). The original solution, that I had done with Genesis/Megadrive, was just to symlink the media folder to one matching the run command named system. But in the interest of completeness, I now decided to go the other route and just change the run command to call the proper system instead. So I changed _SYS_ pcengine to _SYS_ tg16 and then all I had to do was copy the /opt/retropie/configs/pcengine folder to tg16 (symlinked, so as not to duplicate data unnecessarily. I could have just renamed them, but keeping the links intact for the config and rom folders, allows me to retain the dual nature of the systems, while simultaneously keeping it hidden beneath the surface.)

                Now I guess the only problem is it works so well on the surface, I keep forgetting and trying to use -p tg16 by accident :-S

                Edit: well there was a little more under the hood work involved in getting the system(s) fully switched over. Both emulators.cfg and retroarch.cfg reference a system folder, so I scrapped the symlinks and just renamed the config folders, then replaced all instances of "megadrive" or "pcengine" with "genesis" and "tg16" in those files. Bonus: I learned about the sed command:

                sed 's/<old_text>/<new_text>/g' <file>
                

                e.g.

                sed 's/\/pcengine\//\/tg16\//g' emulators.cfg
                

                ...prints the result to stdout. (I wanted to match the string /pcengine/ and not just pcengine just in case it was in an emulator's name or something. It looks like they all just said "pce" but it doesn't hurt to make sure.)

                You can pipe it to an output file with > <file> e.g.

                sed 's/\/pcengine\//\/tg16\//g' emulators.cfg > emulators.cfg.new
                

                ...or

                sed -i 's/\/pcengine\//\/tg16\//g' emulators.cfg
                

                ...modifies the original file with -i or --in-place.

                1 Reply Last reply Reply Quote 1
                • 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.