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
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
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
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
The button names are those used by allegro4 (I will probably change this for myself as I don't really like allegro)
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