A quick front-end / emulator launcher that I just wrote

discuss bbc micro and electron emulators (including mame) here!
Post Reply
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

A quick front-end / emulator launcher that I just wrote

Post by tricky »

Latest BBC Emulator Launcher downloads in viewtopic.php?p=410695#p410695

I am planning on building a MAME cabinet and would like it to run BBC emulators from the joystick and play as many games as possible.
The GameSelector uses games.CSV to list games and their: sorting group (0 is hidden), title, description, exe and command line arguments.
I have been testing with the info from bbcmicro.co.uk and using their screen shots. Admins, if this is not OK, please let me know.
The launcher is windows only and looks for any joysticks and then lets you scroll around and select a game with the stick(s) and launch with button 0, any other button quits. You can also use the cursor keys and RETURN to launch as I quite like it :lol:

I have also been adding similar support to b-em, so that any stick found can map any direction or button to any key on the keyboard.
The additional joystick code that I have added to b-em is windows only (as I don't "do" linux), but is fairly straight forward.
I have added joymaps.txt, which is read if -joymap config is found on the command line.
In the joymaps.txt file, there are section headings which are processed in order -joymap config <optional joystick name>
If a config with matching joystick name is found, this is mapped, otherwise, the one matching config will be mapped to the first unmapped joystick.
The code actually maps the "prefered" joystick to stick 0, so that will be mapped first if not already mapped (this isn't necessary now).

This is a demo of me running the launcher and using the joystick in-game by driving the emulated keys, sorry about the colour quality.
The flickering when launching b-em seems to be down to allegro, as everything else I tried is fine, but full-screen has always been a bit tricky on windows :(

URL:https://youtu.be/cHkXg0ZueoY[/quote]

games.csv - if first column is a 0, then the game is hidden, other numbers are sorted and then alphabetically within those groups.

Code: Select all

show,title,description,exe,args,screenshot
0,Wordmaster ,ASP Software 1983  (Word Games (Mastermind) P:1),..\b-em-joymap\b-em.exe,-autoboot 15 -joymap hori_zx2 discs\Disc090-Wordmaster.ssd,screenshots\Disc090-Wordmaster.png
1,Carnival,Retro Software 2015 Richard Broadhurst (Shooter (Gallery) P:1),..\b-em-joymap\b-em.exe,-autoboot 15 -joymap hori_zx2 discs\Disc107-CarnivalSTD.ssd,screenshots\Disc107-CarnivalSTD.png
3,Grand Prix Construction Set ,Superior Software 1987 A. Bradley (Add On P:1 to 2),..\b-em-joymap\b-em.exe,-autoboot 15 -joymap hori_zx2 discs\Disc033-GrandPrixConstructionSetSTD.ssd,screenshots\GrandPrixConstructionSet-Superior.png
3,Kastle ,Tynesoft 1986 Martin Sykes (Adventure P:1),..\b-em-joymap\b-em.exe,-autoboot 15 -joymap hori_zx2 discs\Disc108-KastleE.ssd,screenshots\Kastle-Tynesoft.png
3,Yes Prime Minister ,Mosaic Publishing Ltd. 1988  (Adventure P:1),..\b-em-joymap\b-em.exe,-autoboot 15 -joymap hori_zx2 discs\Disc108-YesPrimeMinisterSTD.ssd,screenshots\Disc108-YesPrimeMinisterSTD.png
As my changes to b-em weren't appreciated before, I am just uploading win-keydefine.zip to show what I did.
I think this is a good feature to have in an emulator and this is one example (windows only) of how it could be implemented.

I haven't tested the custom controller name mapping, but it should work :shock:
The button names are those used by allegro4 (I will probably change this for myself as I don't really like allegro)

joymaps.txt

Code: Select all

-joymap zx2 Controller (XBOX 360 For Windows)

LEFT  = Z
RIGHT = X
UP    = QUOTE
DOWN  = SLASH
0         = ENTER
1         = SHIFT
10        = QUIT


-joymap zx2

POV_LEFT  = Z
POV_RIGHT = X
POV_UP    = QUOTE
POV_DOWN  = SLASH
0         = ENTER
3         = SHIFT
12        = QUIT
Attachments
GameSelector.zip
(5.31 KiB) Downloaded 150 times
win-keydefine.zip
(6.57 KiB) Downloaded 156 times
Last edited by tricky on Tue Dec 12, 2023 10:13 am, edited 3 times in total.
User avatar
FourthStone
Posts: 1527
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: A quick front-end / launcher that I just wrote

Post by FourthStone »

Looks bloody amazing, well done! Would love to include beeb games in a mame cabinet someday so please post regular updates about the whole process as I think it will be useful for us tinkerers out there :D
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: A quick front-end / launcher that I just wrote

Post by Arcadian »

Wow, have been waiting years to see something like this! I've always wanted a custom beeb-cade bartop - this might just spur me into ordering something!! Brilliant work Tricky!!
Please subscribe to the ABug YouTube channel!
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

Thanks, your video of Carnival in an arcade cab was one of the things that inspired me.

The biggest chunk of work is to go through each game and choose which keys need mapping.
User avatar
FourthStone
Posts: 1527
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: A quick front-end / launcher that I just wrote

Post by FourthStone »

Thinking out loud and knowing how these things can spiral out of scope... would be awesome to have a load screen for each game to show which joystick buttons are mapped to which keys just before launching a game, it could be pretty generic and doesn't have to be tied to the game, just when reading the keyboard mapping when loading a game, maybe have an extra column in the csv for a button description?

Hope you post lots of updates on progress, this project is a really awesome effort =D>
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

I was thinking that myself, i was going to display the mapping at the bottom of the screen for the currently selected game. I'm not sure how useful some of the info is, button 3 is space.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

Tidied things up a bit and added joymaps to beebem, the speech version.
In the zip are the tidied up source joymap.h and joymap.c along with a text file listing the changes I made to integrate joymaps.
As the game sees both joystick and keyboard, mapping the first button to RETURN can be unpredictable in game as the game will see both RETURN (if that is start with keyboard) and FIRE.
To avoid this, when there is an issue, I use a preferences file with joysticks disabled.
Obviously, this could be better integrated into the emulator if someone wants to, but this work well for me.

I also added a timer to turn off the SHIFT key which is left pressed by the emulator if a disc is auto booted.

Normal beebem next and then tidy up the b-em integration.
Attachments
beebEm-speech-joymap.zip
(7.79 KiB) Downloaded 170 times
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

Is forgotten that I wrote this until someone commented on the yt video!
It is probably due an update now that I think the emulators support making keys to pc joystick.
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: A quick front-end / launcher that I just wrote

Post by Stainy »

Hi, I've tried the latest beebem and b-em and for the life of me i can't work out mapping to pc joystick.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

That is probably because the emulators have implemented different ways to map a joystick to how I originally did it.
I keep meaning to go back and see how they have implemented mapping and add support but never seen to get around to it.
One issue is that the latest versions of beebem and b-em don't worry we'll on my pc so I don't use them.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / launcher that I just wrote

Post by tricky »

I've put a copy of my launcher with hopefully all the necessary files on drop box in a .zip
https://www.dropbox.com/scl/fi/x0kx2p0e ... 3qh35&dl=0
The source for the launcher is also in a .zip if you are interested!
https://www.dropbox.com/scl/fi/pc0tehiw ... 45jhl&dl=0

You don't have to login to download or browse the files in the .zips.

The main zip contains:

Code: Select all

BeebEmulatorLauncher
+b-em-joymap - old version of b-em with my old joymap code
+beebEm-joymap - old version of beebem with my old joymap code
+beebem-speech-joymap - old version of beebem with speech chip support and my old joymap code
-GameSelector - launcher and support files
 GameSelector.exe - winXP compatible launcher with my old joymap code
 joymaps.txt - sample mapping for ZX/: and AZ<> with sections for a PS3 joystick (not pad), 360 controller and default
 games.csv - contains game info including which emulator to run, which screenshot to display and which key mapping to use
 +discs - the .SSD files to load
 +screenshots - the screen shot to display for each game
This is all quite old, but still seems to work.
The emulators have moved on and have new features and bug fixes as well as I think different joymap code, hence including my old versions of them.
I will have run the installers for the eumlators at some point, so they may not work on a system that has never run them! I don't know which versions they were based off now, so can't say which installers may be necessary, but hopefully none.
If I can find an old machine and windows license, I might try a clean install, but I don't know when or if that might be!
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: A quick front-end / emulator launcher that I just wrote

Post by Stainy »

Hi

Windows defender keeps throwing b-em as having a nasty virus.
Can you check that please?

I tried changing the b-em games to beebem but it was complaining about other switches in the csv etc..

thanks

looks promising
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: A quick front-end / emulator launcher that I just wrote

Post by tricky »

I don't know about the b-em anti-virus warning, I don't get it with AVG, but did used to get it when downloading the original version that mine was modified from.
With the advances in the emulators, it might be better for me to look at what they offer with regards to keyboard to joystick mapping and update the launcher.
Post Reply

Return to “8-bit acorn emulators”