RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    BBC Micro / Acorn Electron Emu

    Scheduled Pinned Locked Moved Ideas and Development
    bbcacornmodel belectronbbc micro
    178 Posts 9 Posters 48.4k 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.
    • F
      Folly @retrofan
      last edited by Folly

      @retrofan

      Edit :
      You should skip this part and try this solution first :
      https://retropie.org.uk/forum/topic/29402/bbc-micro-acorn-electron-emu/62

      I hope I will be making YOUR DAY !
      It looks like I found the solution for the RPI3 to run xbeeb and xmaster !

      Edit :
      Although this seems to work for xbeeb and xmaster it will break running emulationstation !
      I found a fix for this too.
      So read carefully !

      Installation b-em-pico-pi from the RetroPie-Setup was OK.
      So no compilation problems.

      After trying it the first time, I had a look at the /dev/shm/runcommand.log.
      It contained 2 errors :

      • libEGL warning: DRI2: failed to authenticate
      • ERROR(/home/pi/RetroPie-Setup/tmp/build/b-em-pico_pi/b-em-pico/src/pico/x_gui/x_gui.cpp:663) : failed to create texture

      So it seems like the RPI3 is missing some video hardware or driver and that is why it fails to create the textures.

      I had no idea where to look, but I had to do something in the raspi-config .
      By accident I found that you can install an experimental full KMS openGL desktop driver.
      ( Advanced Options -> GL driver - > GL (fake KMS) -> restart )
      I installed it and now xbeeb and xmaster are working on the RPI3.
      Edit: Reverting back to the normal driver seems not always possible !
      Using (full KMS) there are many troubles like :
      (so not advisable to use !)

      - no sound from hdmi
      - black screens, so you have to force a poweroff sometimes

      As told at the beginning, the binary version of emulationstation doesn't work with this driver !
      Also other things can break because RetroPie doesn't seem to support the experimental GL driver.

      After enabling the GL driver I installed emulationstation from source and now both work !

      When you reboot after installing the GL driver emulationstation will not work anymore.
      Chances are that you come into the CLI enviroment.
      From here you have to run the RetroPie-Setup :

      cd RetroPie-Setup
      sudo ./retropie_setup.sh
      

      Then install emulationstation from source again.
      Reboot :

      sudo reboot
      

      Now it should work, at least I hope so.

      Let me know how it goes !

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

        @folly said in BBC Micro / Acorn Electron Emu:

        By accident I found that you can install an experimental full KMS openGL desktop driver.
        ( Advanced Options -> GL driver - > GL (full KMS) )

        This will break an existing RetroPie install, since most emulators use the Broadcom GPU drivers (GLES) and not the KMS GL driver. Installing EmulationStation would fix the issue for it, but all the other emulators would need to be installed from source. Note that this is not a supported configuration on a RPI3 or less.

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

          @mitu said in BBC Micro / Acorn Electron Emu:

          @folly said in BBC Micro / Acorn Electron Emu:

          By accident I found that you can install an experimental full KMS openGL desktop driver.
          ( Advanced Options -> GL driver - > GL (full KMS) )

          This will break an existing RetroPie install, since most emulators use the Broadcom GPU drivers (GLES) and not the KMS GL driver. Installing EmulationStation would fix the issue for it, but all the other emulators would need to be installed from source. Note that this is not a supported configuration on a RPI3 or less.

          Yes indeed. I have mentioned this :

          Also other things can break because RetroPie doesn't seem to support the experimental GL driver.

          Do you have an idea of fixing this without using this experimental GL driver ?

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

            @folly said in BBC Micro / Acorn Electron Emu:

            Do you have an idea of fixing this without using this experimental GL driver ?

            Convince the emulator to use software rendering and not rely on OpenGL.

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

              @mitu

              Ok, I should look at the flags on how it's compiling then.
              No idea on where to look but i will have a look.

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

                @mitu @retrofan

                I had a look at the readme :
                https://github.com/kilograham/b-em/blob/pico/README.md

                As it says :

                • YOU MUST NOT BE USING THE LEGACY VIDEO DRIVER.

                I was thinking I could not use the legacy driver.

                Reading further it says :

                • You can run the Pi Build on other desktop Linuxes, omitting -DDRM_PRIME=1 if your driver doesn't support DRM_PRIME/DRI3. It will use the slower C CPU emulation, but that shouldn't be a problem on any recent desktop.

                So I turned back to the legacy driver and rebooted.

                I remove the part -DDRM_PRIME=1 in the module script and installed it again.

                A bit slower, but now it worked without the experimental GL driver!

                So @retrofan can you test this solution ?
                Can you remove the two -DDRM_PRIME=1 parts in the module-script by yourself, for now ?

                R 1 Reply Last reply Reply Quote 0
                • R
                  retrofan @Folly
                  last edited by retrofan

                  @folly

                  Just to confirm, it works !
                  Thanks Folly, you really made my day, just tried Stunt Car Racer and Prince of Persia, they work perfectly in 50fps. :)
                  Just a few questions:
                  Is it possible to run the emulator in full screen mode, this windowed box pretty much spoils the realism?
                  Can we started ssd images through the command prompt, without using ES ?
                  I have already read that there's no way to exit the emulator with a keyboard, only with the mouse.
                  Is there a way to solve this ?

                  Once again, thank you very much for your kind help.

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

                    @retrofan said in BBC Micro / Acorn Electron Emu:

                    @folly

                    Just to confirm, it works !

                    Great to hear !

                    Thanks Folly, you really made my day, just tried Stunt Car Racer and Prince of Persia, they work perfectly in 50fps. :)

                    Nice indeed.
                    This emu isn't perfect, but with this some things can work that otherwise weren't possible.
                    Btw. mine had only 15 fps with the second solution, but it ran ok.

                    Just a few questions:
                    Is it possible to run the emulator in full screen mode, this windowed box pretty much spoils the realism?

                    The only way to make full screen is to turn off the aspect ratio.
                    (but you will keep the match-box window).
                    For now, there is no way, I think, to get around that window.
                    I have tried, but then it gets very small and the keyboard isn't working then.
                    Also there is no escape button programmed in the emulator.

                    Can we started ssd images through the command prompt, without using ES ?

                    Basically it should be possible but it has to run with xinit.
                    You can't use xinit by default, so no solution now.

                    Though if you install Raspberry Pi OS with a desktop environment and install RetroPie on top of that you can open a terminal in the desktop and you will be able to run xbeeb/xmaster directly from the command-line.

                    I have already read that there's no way to exit the emulator with a keyboard, only with the mouse.
                    Is there a way to solve this ?

                    Then it should be programmed in the emulator.

                    Once again, thank you very much for your kind help.

                    Your, wecome !

                    Enjoy, post some pictures in here, that would be nice !

                    1 Reply Last reply Reply Quote 0
                    • R
                      retrofan
                      last edited by

                      I experimented a bit with the overscan settings in the config.txt file and moved the status bar outside of visible zone but the white windows frame remained, altough it looks better now.
                      In a desktop environment, I would be able to change the color of this window to black and solve the problem easily, but I don't know how to do it here.
                      Interestingly, in Graham Sanderson's video, Pico boots directly into the emulator and works in fullscreen.
                      The speed is very dependent on the resolution, so I have set to 640x480 framebuffer resolution in config.txt and have a constant 50 fps, even with xmaster.
                      Here are a few pictures from the TV screen, while testing the Stunt Car Racer. :)
                      scr1.jpg
                      scr2.jpg

                      F 2 Replies Last reply Reply Quote 1
                      • F
                        Folly @retrofan
                        last edited by Folly

                        @retrofan

                        Haha.
                        That's a good idea using the overscan settings ! ;-)
                        That is looking great.

                        I am using 800x600 perhaps you have to try that.
                        I can run full screen.
                        Perhaps it depends on what monitor you are using, I don't know.

                        Btw. Have you ever tried lr-mess or mame for bbcmicro ?

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

                          @retrofan

                          I looked at the help of matchbox-window-manager.
                          If we add -use_titlebar no the window is gone.
                          But the side effect will be that there is no way of exiting the emulator.

                          Well you can open a new terminal (for example : ctrl+alt+F2) and poweroff the pi but that is not what we want.

                          Perhaps there is a way if we put a kill command in the starter script that is activated when pressing a specific button.
                          Just an idea, I will look at it when I can.

                          1 Reply Last reply Reply Quote 0
                          • R
                            retrofan
                            last edited by

                            @folly

                            I am currently using an LCD TV, maybe this fork is adapted to monitor resolutions and that's why full screen works.
                            Tried with both lr_mame and lr_mess, but they are too slow and definitely suitable only for Pi4.
                            Thanks for the matchbox-window-manager tip, I'll try that too.
                            It's really interesting to play with this emulator, I'm thinking of trying to compile a standard b-em installation on the Raspbian desktop OS and try its full features.
                            We will see, this has been a long day, but a successful one. ;)

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

                              @retrofan

                              I added a post in Grahams thread, perhaps I will get a response.
                              But the thread isn't that much alive.
                              https://stardot.org.uk/forums/viewtopic.php?f=4&t=21985&p=322048#p322048

                              The standard b-em compiles very easy if you know what packages to install.
                              But it doesn't work at full speed on the RPI3/4.
                              You have to put the speed on 400% or 500% and it will stutter a bit.
                              That is why I choose the Graham's fork.

                              Add dependencies (I think you need these, but perhaps you need more) :

                              sudo apt install build-essential cmake
                              sudo apt install liballegro5-dev liballegro-audio5-dev liballegro-acodec5-dev liballegro-image5-dev liballegro-dialog5-dev liballegro-video5-dev
                              

                              Compile :

                              ./autogen.sh && ./configure && make
                              

                              You can search in other threads on stardot, perhaps you can find something useful for the RPI.

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                retrofan @Folly
                                last edited by

                                @folly

                                Thanks Folly.
                                Just tried it and you're right, standard b-em is a noticeably slower than Graham fork, on pi3.
                                btw, there's one more thing worth fixing.
                                By default the mouse pointer always appears in the center of the screen and it would be far better to be moved to the upper right corner and not spoil the startup beeb screen.
                                I looked in the source code a bit, but I can't find where the start coordinates are stored.
                                Could you maybe take a look, if there's a chance this can be sorted out ?

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

                                  @retrofan

                                  EDIT : I added all the fixes in my module-scripts :
                                  github_commit_link
                                  Fixing bbcmicro module-scripts :
                                  - changing a compiling line depending on the platform RPI4 or something else (RPI3 tested)
                                  - no window border anymore
                                  - no mouse pointer anymore
                                  - quit is possible with (ctrl+c)


                                  The mouse pointer is from the matchbox-windows-manager.

                                  For all the problems I have found a solution.
                                  Adding config-options to matchbox-windows-manager in :
                                  /opt/retropie/emulators/b-em-pico-pi/xmaster.sh

                                  #!/bin/bash
                                  xset -dpms s off s noblank
                                  matchbox-window-manager -use_titlebar no -use_cursor no -kbdconfig /opt/retropie/ports/b-em-pico_pi/matchbox_shortcuts &
                                  /opt/retropie/emulators/b-em-pico-pi/xmaster -disc "$1"
                                  

                                  Adding a keyboard-shortcut-file /opt/retropie/ports/b-em-pico_pi/matchbox_shortcuts :

                                  <ctrl>c=close
                                  

                                  So now it's possible to :

                                  • have no window border anymore
                                  • have no mouse pointer anymore
                                  • quit with (ctrl+c)

                                  I tried to set the <escape> button, but up til now I had no luck with this.
                                  It's an early discovery, I have not added it to my module-scripts yet.

                                  I found the solutions running the help :

                                  matchbox-window-manager -h
                                  

                                  And looking at these pages :
                                  https://unix.stackexchange.com/questions/223110/what-are-the-keyboard-shortcuts-for-matchbox-window-manager
                                  http://git.yoctoproject.org/cgit.cgi/matchbox-history/plain/matchbox-documentation/manual/matchbox-manual.xml

                                  R 1 Reply Last reply Reply Quote 0
                                  • R
                                    retrofan @Folly
                                    last edited by retrofan

                                    @folly

                                    It’s a great finding, now everything works and looks almost like a real beeb. ;)
                                    In the meantime, I noticed some lag when typing.
                                    I don't think it's related to these latest changes, but it's easiest to notice if you hold down a key and observe the auto repeat function.
                                    At the beginning, the letters are printed smoothly, but then it starts to get stuck at irregular intervals and it seems that the emulator cannot catch up with all the keyboard input.
                                    This doesn't happen on PC emulators, maybe pi 3 doesn't have enough horse power, so it would be worth trying on Pi4.
                                    I tested with a wired and wifi keyboard, but it behaves the same...

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

                                      @retrofan

                                      I had the same issue when using the pi3.
                                      It kept jumping with the game Blagger.

                                      Perhaps we have to add frameskipping for the RPI3.
                                      Frameskipping is selectable in the qui.
                                      (Edit : It seems I have no key lag with frame skip = 4)

                                      The installation was ok on my pi4.
                                      And I detected no lag with the keys on the pi4.

                                      R 1 Reply Last reply Reply Quote 0
                                      • R
                                        retrofan @Folly
                                        last edited by retrofan

                                        @folly

                                        Yes, it seems that even pi3+ isn't strong enough for b-em.
                                        I was surprised that the frame drop during the key auto repeat process went from 50 fps, all the way below 30 fps and back.
                                        I don't think there's any point in lowering the resolution below 640x480, because the image quality drops quite a bit.
                                        On the other hand, I've never liked frame skipping, so I'll try to explore some more tweaking options or buy pi4, as the easiest solution. ;)
                                        It's really a pity, that after almost a whole decade, there's still no solution for a sound issue with a beebem on a Raspberry Pi, because it's also a great emulator, less demanding than b-em.

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

                                          @retrofan

                                          Too bad it's not that great on the RPI3, indeed you can consider a RPI4.
                                          RPI4 is really nice !

                                          Well if you only want a go with bbc-micro you can still try this solution on RPI3 :
                                          https://retropie.org.uk/forum/topic/29402/bbc-micro-acorn-electron-emu/57
                                          Beware of what mitu told !, Not supported, but if you only use it for bbcmicro, who cares.

                                          The framerate is much better.
                                          But you have to remove the platform check in the updated module-script.
                                          (you can just change rpi4 into rpi3, that will work)

                                          Edit: I tried again and with this solution and it works just as fast as on a rpi4 !
                                          This morning I had some blackouts in the desktop with the exp driver on.
                                          Could be a power-supply issue, but could also be related to the exp driver though, so be aware of it !

                                          R Lister of SmegL 2 Replies Last reply Reply Quote 0
                                          • R
                                            retrofan @Folly
                                            last edited by

                                            @folly

                                            I did the whole procedure with full GL Driver enabled, compiled ES from source and emulator works, but I have no sound at all in the whole retropie system.
                                            There is no HDMI option in the audio setup, only the Headphone, setting audio to default does not help.
                                            With fake GL Driver, the sound worked, still every entry in any option in the ES menu gives an error:
                                            VolumeControl :: init () - Failed to find mixer elements!
                                            Once again I reinstalled ES from source, but without success and now I have no idea how to fix this.

                                            S 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.