A quick front-end / launcher that I just wrote

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
tricky
Posts: 1875
Joined: Tue Jun 21, 2011 8:25 am
Contact:

A quick front-end / launcher that I just wrote

Postby tricky » Thu Mar 16, 2017 8:19 pm

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:http://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 18 times
win-keydefine.zip
(6.57 KiB) Downloaded 12 times

User avatar
FourthStone
Posts: 396
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

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

Postby FourthStone » Thu Mar 16, 2017 9:38 pm

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
Posts: 2743
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

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

Postby Arcadian » Fri Mar 17, 2017 2:01 am

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!!
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
tricky
Posts: 1875
Joined: Tue Jun 21, 2011 8:25 am
Contact:

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

Postby tricky » Fri Mar 17, 2017 7:49 am

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: 396
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

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

Postby FourthStone » Fri Mar 17, 2017 9:46 pm

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: 1875
Joined: Tue Jun 21, 2011 8:25 am
Contact:

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

Postby tricky » Fri Mar 17, 2017 10:51 pm

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: 1875
Joined: Tue Jun 21, 2011 8:25 am
Contact:

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

Postby tricky » Sat Mar 18, 2017 11:36 am

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 13 times


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 0 guests