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

    Apple2e: AppleWin Libretro

    Scheduled Pinned Locked Moved Help and Support
    apple 2
    37 Posts 4 Posters 4.3k 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.
    • ExarKunIvE
      ExarKunIv
      last edited by

      @Lolonois i have finally gotten around to giving this a try, it installs fine as i can tell, but it will not start any game i throw at it.

      i tried liapple and the games start, so i know at least my games are ok.

      i looked at the runcommand log and there is not much there

      Parameters: 
      Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-applewin/applewin_libretro.so --config /opt/retropie/configs/apple2/retroarch.cfg "/home/pi/RetroPie/roms/apple2/Beyond Castle Wolfenstein.dsk" --appendconfig /dev/shm/retroarch.cfg
      RA2: retro_get_system_info
      RA2: retro_set_environment
      xboxdrv: no process found
      

      any thoughts

      i never really messed with apple so im at a lost with this

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

        @ExarKunIv I guess you are asking me directly because of my post on this scriptmodule roughly three months ago.

        You may run retroarch with the verbose flag (from runcommand menu). This should give you some more information. Additionally, why is there a error message on xboxdrv?

        Does this issue happen on your Rpi3 or Rpi4 setup, or both?

        I could start the ROM in question either with linapple or with lr-applewin successfully on a Rpi4. I tried it with the commit 99130da (from yesterday) of the audetto/AppleWin repo.

        ExarKunIvE F 3 Replies Last reply Reply Quote 0
        • ExarKunIvE
          ExarKunIv @Lolonois
          last edited by

          @Lolonois yes I'm asking you. Since I have a feeling only you are using this.

          I will try it with the verbose flag . I didn't know about that. Lol.

          Don't worry about the xboxdrv. I have that enabled since I run a lot of ports that I use it for so it shows up on every log.

          Lineapple plays the game fine on my end. But lr-applewin it just blacks screen and back to the rom list.

          I'll post what I get with the verbose flag.

          1 Reply Last reply Reply Quote 0
          • ExarKunIvE
            ExarKunIv @Lolonois
            last edited by ExarKunIv

            @Lolonois here is the log

            Parameters: 
            Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-applewin/applewin_libretro.so --config /opt/retropie/configs/apple2/retroarch.cfg "/home/pi/RetroPie/roms/apple2/Beyond Castle Wolfenstein.dsk" --verbose --appendconfig /dev/shm/retroarch.cfg
            [WARN] [GameMode]: GameMode cannot be enabled on this system ("dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory.") https://github.com/FeralInteractive/gamemode needs to be installed.
            [WARN] [Config]: GameMode unsupported - disabling...
            [INFO] RetroArch 1.12.0 (Git d6deee4)
            [INFO] === Build =======================================
            [INFO] CPU Model Name: ARMv7 Processor rev 3 (v7l)
            
            [INFO] Capabilities:  NEON VFPv3 VFPv4
            [INFO] Built: Feb 19 2023
            [INFO] Version: 1.12.0
            [INFO] Git: d6deee4
            [INFO] =================================================
            [INFO] [Input]: Found input driver: "x".
            [INFO] [Core]: Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-applewin/applewin_libretro.so"
            RA2: retro_get_system_info
            [INFO] [Config]: Loading config: "/opt/retropie/configs/apple2/retroarch.cfg".
            [INFO] [Config]: Appending config: "/dev/shm/retroarch.cfg".
            RA2: retro_set_environment
            [INFO] [Environ]: GET_LOG_INTERFACE.
            [INFO] [Environ]: SET_CONTROLLER_INFO.
            [INFO] [Environ]: SET_KEYBOARD_CALLBACK.
            [INFO] [Environ]: SET_AUDIO_BUFFER_STATUS_CALLBACK.
            [INFO] [Environ]: SET_FRAME_TIME_CALLBACK.
            [INFO] [Environ]: SET_SUPPORT_ACHIEVEMENTS: yes.
            [INFO] [Environ]: GET_SAVE_DIRECTORY.
            [INFO] [Environ]: GET_DISK_CONTROL_INTERFACE_VERSION.
            [INFO] [Environ]: SET_DISK_CONTROL_EXT_INTERFACE.
            [INFO] [Environ]: SET_VARIABLES.
            [INFO] [Overrides]: Redirecting save file to "/home/pi/RetroPie/roms/apple2/Beyond Castle Wolfenstein.srm".
            [INFO] [Overrides]: Redirecting save state to "/home/pi/RetroPie/roms/apple2/Beyond Castle Wolfenstein.state".
            [libretro INFO] RA2: retro_init
            [INFO] [Content]: Content loading skipped. Implementation will load it on its own.
            [libretro INFO] RA2: retro_load_game
            [INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
            [libretro INFO] Exception: Cannot found the resource path: /resource/
            [ERROR] [Content]: Failed to load content
            [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
            [INFO] [Core]: Unloading core..
            [libretro INFO] RA2: retro_deinit
            [INFO] [Core]: Unloading core symbols..
            [INFO] [Core]: Saved core options file to "/opt/retropie/configs/all/retroarch-core-options.cfg".
            [INFO] [Config]: Loading config: "/opt/retropie/configs/apple2/retroarch.cfg".
            [INFO] [Overrides]: Configuration overrides unloaded, original configuration restored.
            

            i see a few errors that come up, but i know nothing about Ir cores so im lost on it

            i did just try to rebuild it and it failed to build.
            so i locked the script to 99130da and it still would not start a game

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

              @ExarKunIv thanks for the verbose answer. This story is twofold. One is the upstream build is broken for the libretro Applewin core. Pinning to 99130da8 from 2023-03-09 mitigates this. The other part is that the resources/ are not deployed by my scriptmodule. Will fix that. In the meantime you can work around with these commands (i.e. do not run the clean):

              cd RetroPie-Setup
              for a in depends sources build install ; do sudo ./retropie_packages.sh lr-applewin $a ; done
              

              In the verbose log you can recognize the resources pulled from the build folder if everything went well:

              ...
              [libretro INFO] RA2: retro_load_game
              [INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
              [DSInit] PC=00000000, WC=00000000, Diff=00000000
              [INFO] [Environ]: SET_MESSAGE: Enhanced Apple //e Emulator -  50% Color (Composite Idealized)
              [libretro INFO] RA2: GetBitmap. /home/pi/RetroPie-Setup/tmp/build/lr-applewin/resource/CHARSET4.BMP = 256x768, 1bpp
              ...
              
              ExarKunIvE 1 Reply Last reply Reply Quote 0
              • ExarKunIvE
                ExarKunIv @Lolonois
                last edited by

                @Lolonois i was about to say, that i found the same thing with the upstream build being broken.

                i went back to a older commit and was able to get it to build and play.

                so if we can find a commit that works well and when you fix the problem with the resources i think we will be good.

                kinda glad its not me, :)

                I will mess around more come monday, unless you come back with a update.
                thanks again for your help

                1 Reply Last reply Reply Quote 0
                • F
                  Folly @Lolonois
                  last edited by Folly

                  @Lolonois

                  I tried to install your script too on my x86_64 Bullseye VM and used your code to install from here :
                  https://gist.github.com/Gemba/9dff49492c3ad1d2d3fbb15bfb3ebc4a
                  Seems there are some issues with the bash install code.
                  Somehow the retropie_packages can't install because the module-script is copied into : ext/local/scriptmodules/supplementary/libretrocores
                  I think it should be : ext/local/scriptmodules/libretrocores

                  Also the module-script is cloned with this line :
                  applyPatch "$md_data/01-libretro_gcc8_static_lstd++-fs.patch"
                  But no patch is downloaded and the patch cannot be applied.
                  In the module-script on the readme page I cannot find the line.
                  Seems to me that this line only has to be used if gcc8 is used, correct ?

                  Another problem is that lr-applewin cannot be compiled because the files source/SaveState_Structs_common.h (and most likely source/SaveState_Structs_v1.h) cannot be found.
                  So I got them from here :
                  https://github.com/AppleWin/AppleWin/tree/717c5cba84edfecc735505db4df7d01519c509b0/source

                  After adding these files in source/ it did compile.

                  (EDIT : issue seems to fixed upstream )

                  I did not test the emulator yet but I wanted to let you know what experience I had so far.

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

                    @Folly Wow. It's getting momentum. :) 1. Yes, right the readme of the gist pointed to an outdated revision, however the shown lr-applewin.sh file of the gist did not rely on the gcc8 static lib patch (has been fixed upstream). Thanks for noting the surplus supplementary/ folder in the readme.
                    2. The broken build was introduced by the upstream merge between Applewin and audetto's repo earlier this day (commit 9d5b3cf FWIW).

                    TL;DR: Find the updated gist including the corrected readme at [1]. Please notify me shortly @ExarKunIv if it works for you too.

                    [1] https://gist.github.com/Gemba/9dff49492c3ad1d2d3fbb15bfb3ebc4a

                    ExarKunIvE 1 Reply Last reply Reply Quote 0
                    • ExarKunIvE
                      ExarKunIv @Lolonois
                      last edited by

                      @Lolonois I'll let you know first thing Monday.

                      I leave my pi at work, since I'm still building my system and that's where I have most of my time. Lol

                      Glad this is getting more momentum.

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

                        @ExarKunIv sure thing. No hassle, as you can find time. I picked the wrong word, "briefly" was my intention.

                        F ExarKunIvE 2 Replies Last reply Reply Quote 0
                        • F
                          Folly @Lolonois
                          last edited by Folly

                          @Lolonois

                          I just tried my binary and it works on Lode Runner (4am crack).dsk.
                          For now I had to remove this line in /opt/retropie/configs/apple2/retroarch.cfg :
                          input_game_focus_toggle_key = "2"
                          As I can't use my "keyboard joystick" and somehow I can't toggle game-focus with a key if above line is set.

                          I always use a hotkey enable key so hotkeys are not in the way.
                          So I now can use down, left and right but up locks the movements. I can't go up the stairs in loderunner yet.

                          @ExarKunIv
                          Seems you have the same issue with the joystick not working if the game_focus is on.

                          I will do some more investigation if I can.
                          Btw. I am on vacation so if I don't answer you know the reason.

                          ExarKunIvE 1 Reply Last reply Reply Quote 0
                          • ExarKunIvE
                            ExarKunIv @Folly
                            last edited by

                            @Folly no rush. We figured out he bigger problem with it not running the games.

                            Now that's out of the way we can find tune it.

                            Enjoy your vacation

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              Folly @ExarKunIv
                              last edited by Folly

                              @ExarKunIv

                              Enjoy your vacation

                              Thanks ;-)

                              We figured out he bigger problem with it not running the games.

                              So you have it working now too ?
                              ( Oh yea, I forgot you can't test it right now )

                              I tried some other games, but they didn't work.
                              Not sure why but perhaps .2mg files are not supported, will have a second look.
                              ( indeed .2mg is not supported, these are the supported extensions : .po .dsk .nib .PO .DSK .NIB .zip )

                              ExarKunIvE 2 Replies Last reply Reply Quote 0
                              • ExarKunIvE
                                ExarKunIv @Folly
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • ExarKunIvE
                                  ExarKunIv @Folly
                                  last edited by

                                  @Folly said in Apple2e: AppleWin Libretro:

                                  So you have it working now too ?
                                  ( Oh yea, I forgot you can't test it right now )
                                  Lol

                                  I can't test the new script.
                                  But I did have it working with my test build yesterday. Which is when I confirmed that the issue is upstream.

                                  So for me it was close enough to say we got that figured out.

                                  F 1 Reply Last reply Reply Quote 0
                                  • F
                                    Folly @ExarKunIv
                                    last edited by

                                    @Lolonois @ExarKunIv

                                    For testing I now have this in the apple2 retroarch.cfg

                                    input_auto_game_focus = "0"
                                    input_game_focus_toggle = "scroll_lock"
                                    input_game_focus_toggle_axis = "nul"
                                    input_game_focus_toggle_btn = "nul"
                                    input_game_focus_toggle_mbtn = "nul"
                                    

                                    input_auto_game_focus = "0" (or nothing in retroarch.cfg) will NOT set the game focus on at startup.
                                    input_auto_game_focus = "2" will set the game focus on at startup.

                                    When game focus is on and using the keyboard as joystick it will disable the joystick.
                                    So for me it's better to disable game focus at startup and enable it when I have to.
                                    A good game example, not needing game-focus, is : test-drive.

                                    I added the toggle lines so I can change the toggle button as my mac doesn't have "scroll_lock" I can change it now into "shift", for example.
                                    If not added in the apple2 retroarch.cfg the game focus toggle button is always "scroll_lock".
                                    A good example, needing toggling game focus, is : bruce_lee.
                                    without game focus : setting the joystick keys
                                    with game focus : starting player 1
                                    without game focus : playing the game

                                    1 Reply Last reply Reply Quote 0
                                    • ExarKunIvE
                                      ExarKunIv @Lolonois
                                      last edited by

                                      @Lolonois Thank you for looking into this. i installed with the updated script and it starts perfectly.

                                      @Lolonois, @Folly
                                      i think we should change the input_auto_game_focus to 0

                                      just so people are not surprised when they get locked out from exiting the game if they dont have a controller programed with button 3

                                      like people that might be just using a keyboard.

                                      what you guys think? or pick a different key/button

                                      we can always add more detail in the help about the game focus

                                      F 1 Reply Last reply Reply Quote 0
                                      • F
                                        Folly @ExarKunIv
                                        last edited by Folly

                                        @ExarKunIv said in Apple2e: AppleWin Libretro:

                                        what you guys think?

                                        I agree.
                                        People can always use game-focus just like with other cores.
                                        A good thing, with this core, is that it will remind you of the game-focus option at the startup.

                                        I would like to have the toggle lines in there too so people don't have to search for the config toggle lines because you can't find them in the normal all/retroarch.cfg.

                                        @Lolonois @ExarKunIv
                                        What do you both think ?

                                        The package libslirp stays in the folder /home/pi/RetroPie-Setup/tmp/build/libslirp after install.
                                        Shouldn't it be moved to the opt directory when installing ?

                                        ExarKunIvE 1 Reply Last reply Reply Quote 0
                                        • ExarKunIvE
                                          ExarKunIv @Folly
                                          last edited by

                                          @Folly said in Apple2e: AppleWin Libretro:

                                          I would like to have the toggle lines in there too so people don't have to search for the config toggle lines because you can't find them in the normal all/retroarch.cfg.

                                          good idea.

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

                                            Valid aspects, you two.

                                            Some changes I did:

                                            1. Game focus is off by default.
                                            2. Added to the Readme/Help to closely review the game focus toggle button
                                            3. Removed libslirp build artefacts. At the moment they are installed at /usr/local/lib/arm-linux-gnueabihf. Maybe I change it over time, but for now (experimental scriptmodul still) I will leave it like that.
                                            ExarKunIvE F 2 Replies Last reply Reply Quote 2
                                            • 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.