Advance Mess and BBC Micro and joystick control
-
@spud11 i know individual configs dont work but with seperate configs it doesnt matter. so if it doesnt save configs at all did manually entering them in work? Im not talking about xboxdrv, im talking about advmess controller configs? If they do work, keep making seperate config files but just change the advmess controls for each config file for each game instead of trying to get xboxdrv to work.
-
@edmaul69 Yes, I manually changed the
advmess.rc
adapting your Apple II script, but I couldn't get it to work and I tried several different ways.Basically, I think what I need is someone who's had changes made to the
advmess.rc
for the control schemes to show me what changes were made automatically in theiradvmess.rc
for a couple of different BBC Micro games and then I can try again to make manual changes to the file.While playing Chuckie Egg a couple of days ago, I unintentionally changed the
sync_startuptime
and that did appear automatically in theadvmess.rc
file asbbcb[home_pi_retropie_roms_bbcmicro_chuckie]/sync_startuptime 75
But my attempts to replicate the syntax to try to change the controls manually in
advmess.rc
have failed.I'd prefer not to use xboxdrv in this instance because it should be unnecessary but, as I can't get any changes I make to the control scheme via TAB to save automatically in
advmess.rc
, xboxdrv has been the only way so far for me to get the joystick to work and to "individualise" game control schemes. -
@spud11 I guess I was saying that you COULD have multiple scripts in the same .rc file so long as they have an added prefix that calls out the system/floppy image to which they apply. It would be similar to how my apple II config saves keymapping:
apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[key_j] keyboard[0,1] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[key_rshift] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[key_ctrl] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[key_open] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_button1] keyboard[0,lalt] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_button2] keyboard[0,lcontrol] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_stick_left] keyboard[0,right] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_stick_right] keyboard[0,left] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_stick_up] keyboard[0,up] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[p1_stick_down] keyboard[0,down] apple2ee[home_pi_retropie_roms_apple2_karateka]/input_map[key_esc] keyboard[0,p] apple2ee[home_pi_retropie_roms_apple2_lode_runner]/input_map[key_esc] keyboard[0,p] apple2ee[home_pi_retropie_roms_apple2_lode_runner]/input_map[key_a] keyboard[0,z] apple2ee[home_pi_retropie_roms_apple2_lode_runner]/input_map[key_u] keyboard[0,lshift] apple2ee[home_pi_retropie_roms_apple2_lode_runner]/input_map[key_ctrl] keyboard[0,x]
-
@spud11 If you could only get it to save settings after making adjustments in the GUI menu, you would have an example of the syntax for your system/floppy combo.
I assume you are checking the advmess.rc file you are specifying in your -cfg parameter on your launch script, right, and not a .rc file that was created automatically in the default location?
How are you exiting? You cannot "crash out" or kill the process. You have to exit properly for advancemame to write the changes to the .rc file. This comes up sometimes, so mentioning it here.
-
did you have problems with saving on the original default advmess.rc? i assume yes. i use a custom made advmess 3.4 that someone fixed the controls not saving or player 2 controls being messed up and stuff on several consoles we use. feel free to test with it. bbcb may or may not save. but it certainly wouldnt hurt to try.
https://drive.google.com/open?id=0B91PCRsG5b5baDFlMWEycV9Id3M
-
@edmaul69 and @caver01 Thanks to you both I've now made some further progress - I can now save individual game settings in the
admess.rc
file and I've also got ascript_play
to work - up to a point.I replaced the
advmess
executable with your version 3.4, edmaul69, and went back to using the runcommand method rather than using individual bash scripts for each game. In game, I can use the TAB menu to change keys on a per game basis which will save in theadvmess.rc
file.The problem I have though with using runcommand and a centralised
advmess.rc
is that I have arcade joysticks. To exit all emulators I want to use the same method and I've also got kids who button mash. Usingruncommand-onstart
, xboxdrv is system-based rather than individual-game based. So for all emulators, I'm usingselect
+right trigger
to exit. With non-libretro non-Retroarch emulators like AdvMess, I can only useselect
+right trigger
if I use xboxdrv so, although I can now save individual game settings in a centraladvmess.rc
, I'm finding that I can't exit any of the games without a keyboard. With the BBC Micro games all having different keys, I'm a bit stuck if I continue to use runcommand and a centralisedadvmess.rc
file. With individual bash scripts, though, pointing to individual .rc files for each game, I can set up xboxdrv tailored to each individual game's controls and also exit the games using the joystick without having a keyboard plus I should be able to use individualscript_play
commands. Unless AdvMess allows something similar toselect
+right trigger
, I prefer the bash script method.Turning to the
script_play
, the following works for Thrust, but only up to a point:script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(75); simulate_key(key_quote,75); delay(75); simulate_key(key_t,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_r,75); delay(75); simulate_key(key_u,75); delay75); simulate_key(key_s,75); delay(75); simulate_key(key_t,75); delay(75); simulate_key(key_quote,75); delay(75); simulate_key(key_enter,75); delay(75);
All of the characters appear on screen automatically without typing anything manually. However, the characters appear as follows:
CHAIN :THRUST:
instead ofCHAIN "THRUST"
.If you press TAB, go to the Input (System) settings, you will find that
quote
(iekey_quote
inscript_play
) corresponds to:
not to"
. There's no setting for"
. It's possible to manually enter"
by pressingshift
2
on a US keyboard, but I can't see any way of achieving"
automatically. I don't know if there is a way past this problem. A pity because I've now got very close to automatically starting games for the BBC Micro in AdvMess. -
@spud11 It sounds like the keypresses are reacting exactly as if you were typing on a BBC Micro. Quote is a shift 2 and colon is in the position where quote would be on a US keyboard. In other works, it seems to be working as designed. You are so close! I wonder if there is a way to add a shift key with an increase in the time it is pressed followed by a 2. Although, they may not be able to execute together. The script may simply wait until the shift key is done, then press the 2. I am stumped. You effectively need to press two keys at once, SHIFTmodifier+2.
Your need for special exit makes sense. That would have me leaning toward a runcommand-onstart too. However, there is the idea of a <CODE-AND> keymap in MAME and it probably works in MESS. Can you simply map an exit key in the GUI by pressing BOTH keys at the same time? It should detect this together.
I have examples of AND and OR mapping. For example, UP in QBERT:
qbert/input_map[p2_up] keyboard[0,y] keyboard[0,u]
Might something like that work?
-
@caver01 Hi. Thanks. I've done it. I've now got working BBC Micro emulation for Thrust where (a) the game starts automatically and (b) exiting the emulator is possible with the joystick in the same way as Retroarch/libretro cores.
I'm still using xboxdrv for exiting, but I will adapt your QBERT example to see if I can exit AdvMess without xboxdrv.
The
script_play
for Thrust needs to be as follows:script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_t,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_r,75); delay(75); simulate_key(key_u,75); delay(75); simulate_key(key_s,75); delay(75); simulate_key(key_t,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_enter,75); delay(75);
It is possible for parentheses/inverted commas (ie SHIFTmodifier+2) to be simulated on the BBC Micro command line with the following:
delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200);
Note that there is no
delay
command between theshift
key and the2
. Effectively,shift
is being held down as the2
is typed.The script above can just be adapted for every game. However, it does mean that every game requires its own
advmess.rc
because every game is going to have a differentscript_play
command.At the moment, I'm still using individual bash scripts to invoke xboxdrv so I can exit cleanly without a keyboard. However, I've been thinking about runcommand and what @edmaul69 has recently said above.
Just thinking: as each game will need a separate
advmess.rc
, would something like this inemulators.cfg
work?advmess= sudo /opt/retropie/emulators/advmame/bin/advmess bbcb -cfg /opt/retropie/configs/bbcmicro/%BASENAME%.rc -floppy %ROM% default = "advmess"
I have not tested this as yet as I'm just pleased that I've got a configuration to work for one game that can be replicated.
The Holy Grail though would be to get some form of automatic configuration for starting BBC Micro games and for exiting the BBC Micro emulator using runcommand without a keyboard and without xboxdrv. Absent a specific libretro core for the BBC Micro, this would just about mean that everyone using RetroPie could emulate the BBC Micro without a lot of difficulty.
-
@caver01 and @edmaul69 This came as a bit of a nice surprise. I definitely don't need individual .rc files. Even the
script_play
command can be individualised in the generaladvmess.rc
file eg for Thrust and Chuckie Egg.bbcb[home_pi_retropie_roms_bbcmicro_thrust]/script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_t,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_r,75); delay(75); simulate_key(key_u,75); delay(75); simulate_key(key_s,75); delay(75); simulate_key(key_t,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_enter,75); delay(75); bbcb[home_pi_retropie_roms_bbcmicro_chuckie]/script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_u,75); delay(75); simulate_key(key_c,75); delay(75); simulate_key(key_k,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_e,75); delay(75); simulate_key(key_space,75); delay(75); simulate_key(key_e,75); delay(75); simulate_key(key_g,75); delay(75); simulate_key(key_g,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_enter,75); delay(75);
So tonight I'll have a look and see whether I can get AdvMess to accept exiting using 2 joystick buttons and, if so, I've got everything I need and I should be able to just go back to using runcommand.
-
@spud11 glad you figured out the prefixes. I have been saying that all along. It is coming together!
-
Here are some tipps to adjust advmess.rc (...\configs\mame-advmame):
Get rid off the nag screen:
misc_quiet yes
If you just want to auto load your ssd's without typing CHAIN"LOAD" each time, then use this script:
bbcb/script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_l,75); delay(75); simulate_key(key_o,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_d,75); delay(75); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_enter,75); delay(75);
-
Is it possible to remap specific games without making .sh files for each game and using a single advmess.rc file without destroying the bootup scripts?
In other words I use the CHAIN"LOAD" script and additionally I 'd like to remap a keyboard game to joystick (I'd prefer to play Exile.ssd with a Joystick). Do I scramble up those letters which are already used by the chain load script? -
@teller I don't know the answer to that. Instead of using advmess's internal joystick controls, I use
xboxdrv
so my joysticks mimic the keys that are already set by each game. It means I don't need to fiddle too much with theadvmess.rc
file, except to add in thescript_play
commands to autostart games. @John_RM_70 or @SpudsMcToole may have a better idea as I'm pretty sure both of them are using joysticks via the advmess.rc file. -
@teller Yes, you can remap autoboots and key maps to specific games in a single RC file. See my guide to AdvMESS And The BBC Micro For Dummies which I think is still on the front page.
-
splendid!
here's my joystick config for SEE EMILY PLAY ;)bbcbp128[home_pi_retropie_roms_bbcmicro_seeemilyplay]/input_map[key_capslock] joystick_digital[046d_c219,0,0,1] or keyboard[0566_3029,capslock] bbcbp128[home_pi_retropie_roms_bbcmicro_seeemilyplay]/input_map[key_ctrl] joystick_digital[046d_c219,0,0,0] or keyboard[0566_3029,lcontrol] bbcbp128[home_pi_retropie_roms_bbcmicro_seeemilyplay]/input_map[key_space] joystick_button[046d_c219,tr] or keyboard[0566_3029,space] bbcbp128[home_pi_retropie_roms_bbcmicro_seeemilyplay]/input_map[key_n] joystick_button[046d_c219,tl] or keyboard[0566_3029,n] bbcbp128[home_pi_retropie_roms_bbcmicro_seeemilyplay]/input_map[key_enter] joystick_button[046d_c219,a] or keyboard[0566_3029,enter]
I use a Logitech F710 which is working very well on RetroPie!
The funny thing was that the capslock didn't turn up to be saved, so I had to manually enter that line into advmess.rc. -
Are there any games that only work with the bbcb, that can't be loaded on bbcbp128?
I ask because I think it's not possible to switch between the two without modifying manually the emulators.cfg. -
@teller said in Advance Mess and BBC Micro and joystick control:
Are there any games that only work with the bbcb, that can't be loaded on bbcbp128?
I ask because I think it's not possible to switch between the two without modifying manually the emulators.cfg.I found a few, I'd recommend using bbcb rather tham bbcbp128.
-
unfortunately in this game SABRE WULF the input key SHIFT is used for using the sword. It can't be mapped twice, otherwise i get a Type mismatch error and the autoboot command looks like this:
CHAIN 2LOAD2 instead of CHAIN "LOAD"input map (SWORD):
bbcb[home_pi_retropie_roms_bbcmicro_sabrewulf]/input_map[key_shift] joystick_button[046d_c219,a] or keyboard[0566_3029,lshift]
autoboot command
bbcb[home_pi_retropie_roms_bbcmicro_sabrewulf]/script_play delay(750); simulate_key(key_scrlock,75); simulate_key(key_c,75); delay(75); simulate_key(key_h,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_i,75); delay(75); simulate_key(key_n,75); delay(75); simulate_key(key_space,75); delay(200); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_l,75); delay(75); simulate_key(key_o,75); delay(75); simulate_key(key_a,75); delay(75); simulate_key(key_d,75); delay(75); simulate_key(key_lshift,150); simulate_key(key_2,50); delay(200); simulate_key(key_enter,75); delay(75);
I also tried rshift.
In other words, a game which uses the same keys for the autoboot command can't be used. -
@teller Could you use capslock instead? That's what I use in the script_play commands.
-
@spud11 Good idea!
But if I try key_capslock I get
CHAIN load
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.