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

    Advance Mess and BBC Micro and joystick control

    Scheduled Pinned Locked Moved Help and Support
    advance messjoystickbbc micro
    75 Posts 5 Posters 10.0k 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
      spud11
      last edited by

      Pi Model or other hardware: See signature
      Power Supply used: standard + 2 powered hubs
      RetroPie Version Used: See signature
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: See Signature
      Controller used: See Signature
      Error messages received: As per log shown below
      Guide used: Topic on setting up Fairchild Channel F using Advance Mess
      File: NA
      Emulator: Advance Mess
      Attachment of config files: NA
      How to replicate the problem: Whether it's possible to set up a general joystick scheme for BBC Micro games using Advance Mess

      I've got BBC Micro emulation working with Advance Mess. However, the BBC Micro would appear to require the use of a keyboard and each BBC Micro game has its own keyboard control scheme. Could I ask please whether anyone has been able to get a general joystick scheme working for BBC Micro games or even a joystick scheme working for individual games? I'm very familiar with Xboxdrv and would be happy to set up individual bash scripts that invoke Xboxdrv for each game. Thanks.

      RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

      edmaul69E 1 Reply Last reply Reply Quote 0
      • edmaul69E
        edmaul69 @spud11
        last edited by

        @spud11 for individual settings its pretty easy. Press tab on the keyboard while in a game and use the option (whatever its called) to configure controller for that system. It will save for that game.

        S 1 Reply Last reply Reply Quote 0
        • S
          spud11 @edmaul69
          last edited by

          @edmaul69 Thanks. I've tried pressing TAB a number of times but it doesn't bring up the menu the way Advance Mame does. I've brought up the keyboard by pressing F1 and when I press TAB, it does show the word "Configure", but that's as far as it goes.

          RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

          edmaul69E caver01C 2 Replies Last reply Reply Quote 0
          • edmaul69E
            edmaul69 @spud11
            last edited by

            @spud11 if you have the zips named correctly you could try lr-mess too. When i get home i will check out bbc on advmess and lr-mess and let you know my findings.

            1 Reply Last reply Reply Quote 0
            • caver01C
              caver01 @spud11
              last edited by

              @spud11 you may need to press scroll lock to get the keyboard out of emulation mode. Then, TAB should work and let you access the other menu items.

              My 4-player cocktail style cabinet built as a custom "roadcase"

              S 1 Reply Last reply Reply Quote 1
              • S
                spud11 @caver01
                last edited by

                @caver01 and @edmaul69 Thanks, guys.

                With Advmess, I plugged in a USB keyboard rather than continuing to use the mini bluetooth one and scroll lock works. Having gone into the menu, it does say that "left alt" should replicate scroll lock but that doesn't seem to work with the mini bluetooth keyboard I've got.

                Anyway, I've had a look at Advmess's menu items and it allows "general" and "system" changes to the keyboard scheme but no "per game" settings unfortunately (at least not that I could find after starting up Thrust). (Thrust, for example, has quite different keyboard controls from other games). Not sure if I'm missing something though?

                About 2 days ago, I installed lr-mess2016 in case I couldn't get Advmess to work. I haven't yet had a chance to look at what it can do and would welcome any advice, @edmaul69 . I tried to install lr-mess but got the GCC 5.0 is missing error. (That's my recollection anyway and wasn't 100% sure where to go from there.)

                Thanks.

                RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                caver01C 1 Reply Last reply Reply Quote 0
                • caver01C
                  caver01 @spud11
                  last edited by

                  @spud11 you won’t find a “per disk image” or “per program” keymap in the menu, but I have used advmess to achieve the same effect with AppleII emulation. I can tell you what I did and how I am launching the Apple II disk images with advmess and maybe it can apply in similar fashion to BBC Micro.

                  I wrote most of this down in an Apple II thread a while back. I originally thought I was going to have to create a launch script that made copies of the .rc file so that my key mapping would follow the disk image. I had this working successfully, when I realized that advmess was doing that for me! To my surprise, it was adding the input map config lines in my .rc file with a disk image name prefix. You can read what I did here.

                  My 4-player cocktail style cabinet built as a custom "roadcase"

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    spud11 @caver01
                    last edited by

                    @caver01 Hi. I would really appreciate that. Thank you. Yesterday, I spent a couple of hours trying to create separate individual bash scripts for each game both invoking runcommand and avoiding it. Those scripts also invoked xboxdrv on a per game basis, but no script was successful. A bit strange really, because I've got separate scripts working quite successfully for Dosbox based games like SWOS and GTA that start those games plus invoke separate joystick control schemes using xboxdrv. Love to see how you got the Apple II scripts up and running. Thanks.

                    RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                    edmaul69E 1 Reply Last reply Reply Quote 0
                    • edmaul69E
                      edmaul69 @spud11
                      last edited by

                      @spud11 you dont choose specific game settings. It creates it automatically in every game you are in and set up the config. To do it for the whole system you have to edit in one game then you have to manually edit the advmess.rc to change it from one game to the whole system. Just set up the controls in each game.

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        spud11 @edmaul69
                        last edited by spud11

                        @edmaul69 and @caver01 Thanks to you both. Both of you have put me on the right track. Having had a look at the Apple II emulation thread, I've got some of it working.

                        I've got rid of the "type ok" message, started Thrust, gone into "Input (General)" and changed Player 1's keys. Oddly enough, it didn't automatically append the system and game name to my advmess.rc file, so the control scheme applied universally. It appears in the advmess.rc as follows:

                        input_map[p1_left] keyboard[0,capslock]
                        input_map[p1_right] keyboard[0,lcontrol]
                        input_map[p1_button1] keyboard[0,enter]
                        input_map[p1_button2] keyboard[0,lshift]
                        input_map[p1_button3] keyboard[0,space]
                        

                        I've only been able to make one change to an individual game so far - Chuckie Egg - and that's been automatically inserted into the advmess.rc file as follows:

                        bbcb[home_pi_retropie_roms_bbcmicro_chuckie]/sync_startuptime 75
                        

                        Not sure what button on the keyboard I pressed to get the above statement automatically added and also not sure quite where things are going wrong and why changes I'm making to Player 1's keys in TAB for Thrust are not automatically being recorded in the advmess.rc file for Thrust.

                        Assuming the problem above gets sorted out, I'd like to create individual bash scripts to start each game. That will allow me to invoke individual xboxdrv commands too on a per-game basis. @caver01, you mentioned that you had wanted to set up individual bash scripts for each Apple II game. Could you please provide me with an example of what/how you did this? My attempts yesterday at doing the same for the BBC Micro completely failed. Thanks.

                        RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                        edmaul69E 2 Replies Last reply Reply Quote 0
                        • edmaul69E
                          edmaul69 @spud11
                          last edited by edmaul69

                          @spud11 so now if you want the config to work for the whole system and not just one game you would do this. As an example you set up thrust for the bbc. If you remove the [Thrust] and saved the advmess.rc then those controls would now work for the entire system.

                          S 1 Reply Last reply Reply Quote 0
                          • edmaul69E
                            edmaul69 @spud11
                            last edited by

                            @spud11 also forgot to mention. You can create a default config by removing the games name as i mentioned above, but you can also have individual configs as well.

                            1 Reply Last reply Reply Quote 0
                            • S
                              spud11 @edmaul69
                              last edited by

                              @edmaul69 Sorry. I wound up editing my earlier post you've responded to. I couldn't get the changes to Thrust's controls to automatically pass into advmess.rc in the end.

                              RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                              edmaul69E 1 Reply Last reply Reply Quote 0
                              • edmaul69E
                                edmaul69 @spud11
                                last edited by

                                @spud11 so you are saying tat it created a universal config for that system? Did Manually adding the [Thrust] set it for only that game? Or did it add the [Thrust]?

                                S 1 Reply Last reply Reply Quote 0
                                • S
                                  spud11 @edmaul69
                                  last edited by

                                  @edmaul69 It added it universally for the system only. It didn't add [Thrust], I did that manually, but realised afterwards that, in fact, it made no difference.

                                  RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                  edmaul69E 1 Reply Last reply Reply Quote 0
                                  • edmaul69E
                                    edmaul69 @spud11
                                    last edited by edmaul69

                                    @spud11 here is the correct way to set up the individual configs in the advmess.rc. here is a channel f example:

                                    channelf[media_usb0_channelf_alieninv]/input_map[p1_button1] keyboard[16c0_0482,enter]
                                    

                                    my file is located here: /media/usb0/channelf/alieninv.zip . so you see that it goes to the location and name of my rom in the config. also caps and lowercase is important.

                                    edited for typo

                                    S 1 Reply Last reply Reply Quote 1
                                    • S
                                      spud11 @edmaul69
                                      last edited by spud11

                                      @edmaul69 and @caver01 Hi. After quite a bit of experimentation, I couldn't get the advmess.rc file to record settings for Thrust alone adapting the channelf[media_usb0_channelf_alieninv] statement. Not sure why, but it just wouldn't work for me. I made some other manual changes to the advmess.rc file as well to try to fix the problem, but I know advmess and advmame can be a bit picky about changes to the .rc file and ultimately, for me at least, advmess stopped working. After stripping out the changes I made, I got advmess working again, but still couldn't make changes to Thrust's keyboard settings using TAB which would be recorded automatically in advmess.rc.

                                      I did find a partial workaround. It isn't perfect. Two issues remain which I will outline at the bottom.

                                      The workaround effectively uses Thrust's default keyboard settings which are in-built in the game and then invokes xboxdrv directly by way of a bash script to match the keyboard commands against my Arcade joystick (Dragonrise usb). I've effectively bypassed runcommand altogether.

                                      I'm using Attract Mode. In the emulators sub-folder, I've got the following BBC Micro.cfg file:

                                      # Generated by Attract-Mode v2.2.1
                                      #
                                      executable           /bin/bash
                                      args                 "[romfilename]"
                                      rompath              /home/pi/RetroPie/roms/bbcmicro
                                      romext               .sh;.SH
                                      system               BBC Micro
                                      info_source          thegamesdb.net
                                      artwork    flyer           /home/pi/RetroPie/roms/bbcmicro/flyer
                                      artwork    marquee         /home/pi/RetroPie/roms/bbcmicro/marquee
                                      artwork    snap            /home/pi/RetroPie/roms/bbcmicro/snap
                                      artwork    wheel           /home/pi/RetroPie/roms/bbcmicro/wheel
                                      

                                      I've copied the advmess executable into a new folder /opt/retropie/emulators/bbcmicro/ and have made sure it is executable. (I just wanted to keep things "clean", but I think this step is unnecessary.)

                                      In the /home/pi/RetroPie/roms/bbcmicro folder, I now have a new bash script called Thrust.sh. I've made this script executable. The contents of Thrust.sh are:

                                      #!/bin/bash
                                      {
                                      fbi -1 -t 3 -noverbose -a "/opt/retropie/configs/bbcmicro/launching.png" </dev/tty
                                      sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                                      --silent \
                                      --detach-kernel-driver \
                                      --deadzone=4000 \
                                      --deadzone-trigger 15% \
                                      --force-feedback \
                                      --mimic-xpad \
                                      --trigger-as-button \
                                      --ui-buttonmap lb=void,rb=void,tl=void,tr=void,guide=void \
                                      --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.3:1.0-event-joystick \
                                      --device-name "Player_1" \
                                      --evdev-absmap ABS_X=y1,ABS_Y=x1 \
                                      --ui-axismap X1=KEY_CAPSLOCK:KEY_LEFTCTRL,Y1=KEY_UNKNOWN:KEY_UNKNOWN \
                                      --evdev-keymap BTN_THUMB2=a,BTN_PINKIE=b,BTN_TRIGGER=x,BTN_THUMB=y,BTN_BASE3=back,BTN_BASE6=start,BTN_BASE2=lt,BTN_BASE5=rt \
                                      --ui-buttonmap a=KEY_ENTER,b=KEY_LEFTSHIFT,x=KEY_SPACE,back=KEY_UNKNOWN,start=KEY_UNKNOWN,lt=KEY_SPACE,rt=KEY_UNKNOWN \
                                      --ui-buttonmap back+rt=KEY_ESC,rt+back=KEY_SCROLLLOCK+KEY_TAB \
                                      &
                                      sudo /opt/retropie/emulators/bbcmicro/advmess bbcb -cfg /opt/retropie/configs/bbcmicro/advmess.rc -floppy /home/pi/RetroPie/roms/bbcmicro/Thrust.ssd
                                      sudo killall /opt/retropie/supplementary/xboxdrv/bin/xboxdrv
                                      } &> /dev/null 2>&1
                                      

                                      I've wrapped the script with {} and silenced it (as much as I could) with &> /dev/null 2>&1.
                                      The script first launches the BBC Micro launching.png for a period of 3 seconds, then moves onto invoking xboxdrv which is tailored specifically to Thrust's keyboard controls and to my Arcade joystick. While xboxdrv is functioning, the script loads advmess and the Thrust floppy disk. I still need to type CHAIN "THRUST" at the command prompt to get Thrust to start. However, the joystick works perfectly. After I exit Thrust (pressing the back and rt buttons on my joystick), xboxdrv is killed automatically.

                                      For every BBC Micro game, I'll need a separate bash script tailored to each game's default keyboard controls, but most of them (hopefully) will be very similar to this first script.

                                      There are only 2 remaining issues:
                                      (a) I can't achieve complete silence from the Terminal unfortunately. There is always a reference in Terminal to the "working directory" of "bin/bash"; and
                                      (b) I still need to type CHAIN "THRUST"at the command prompt. So the game does not start automatically.

                                      It would be great if someone knew how to completely "silence" Attract Mode in Terminal and how to auto start games without typing something like CHAIN "THRUST".

                                      RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                      caver01C 1 Reply Last reply Reply Quote 0
                                      • caver01C
                                        caver01 @spud11
                                        last edited by

                                        @spud11 AdvanceMAME (mess) does have a scripting function. I once used it to wait a second or two, then automatically type scroll lock to switch keyboard modes. Seems to me you could setup a script that types commands like chain thrust. But I expect your next game will be different, so you’d have to start making separate .rc files.

                                        My 4-player cocktail style cabinet built as a custom "roadcase"

                                        S 2 Replies Last reply Reply Quote 0
                                        • S
                                          spud11 @caver01
                                          last edited by

                                          @caver01 Hi. I reckon I probably will have only about 20 games, so I'd have no issue with doing the script. If you can recall, could you please help me do a script of that kind? Thanks.

                                          RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            spud11 @caver01
                                            last edited by

                                            @caver01 Well, I thought I'd have a go. I've added the following to the advmess.rc, but it doesn't work. I'm hoping you might be able to suggest changes please:

                                            script_emulation \
                                            	delay(20000); \
                                            	simulate_key(key_c,100); \
                                            	delay(200); \
                                            	simulate_key(key_h,100); \
                                            	delay(200); \
                                            	simulate_key(key_a,100); \
                                            	delay(200); \
                                            	simulate_key(key_i,100); \
                                            	delay(200); \
                                            	simulate_key(key_n,100); \
                                            	delay(200); \
                                            	simulate_key(key_space,100); \
                                            	delay(200); \
                                            	simulate_key(key_quote,100); \
                                            	delay(200); \
                                            	simulate_key(key_t,100); \
                                            	delay(200); \
                                            	simulate_key(key_h,100); \
                                            	delay(200); \
                                            	simulate_key(key_r,100); \
                                            	delay(200); \
                                            	simulate_key(key_u,100); \
                                            	delay(200); \
                                            	simulate_key(key_s,100); \
                                            	delay(200); \
                                            	simulate_key(key_t,100); \
                                            	delay(200); \
                                            	simulate_key(key_quote,100); \
                                            	delay(200); \
                                            	simulate_key(key_enter,100);
                                            	delay(200); \
                                            

                                            RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                            caver01C 2 Replies 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.