-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL2 issue with multiple mapper files #3821
Comments
There are plenty of useful information in the Wiki before asking questions. |
I know how to use the mapper editor. I was asking if there was a way to load a specific map file after DOSBox started. I guess the answer to my question is no. Perhaps, this can be an added feature. |
Sorry, I mistaken the link. https://github.com/joncampbell123/dosbox-x/wiki/DOSBox%E2%80%90X%E2%80%99s-Drop%E2%80%90Down-Menus |
There is a |
DOSBox-X is continuously deliveredI have pinned the explanations on how to download it. Load another mapper fileAlso possible from the .conf file:
|
Is there a command I can run in a .bat file that will load a map file and then run the game? If not, then this may be a nice feature to add, if possible. Thanks. |
You can run a bat file either inside or outside of dosbox-x to set the mapper, from my last comment you could create a .bat file similar to the following. Outside dosbox-x, example:
Inside dosbox-x, example:
Both would work the same, it depends on how you prefer to work. For my setup I tend to do as much inside dosbox-x as I can, essentially every game is started through a |
config -set command does not appear to work. Here is a copy of the .bat file. config -set "mapperfile=C:\Portable\Emulators\DosBox\DOSBox-x\mapper-dosbox-x.map" :: mount cd images[3] (R drive) / automatically presses 'spacebar' to start game / game executable :: unmount cd images[3] (R drive) the map file has certain keyboard keys mapped to a game controller. After the game starts, I hit F11+M to open mapper. None of the keys are mapped to the game controller. If i load the mapper from the conf file when starting doxbox-x,, the keys are mapped to the game controller. There is also no error message when the command is run. |
I've not really used mapper files before so I've just tested and it works fine for me (admittedly a very basic test). I deleted the Z and X keys, stupidly choosing the key that prevents me typing exit or pasting the filename of the default mapper. 🤣 You can test the same using this file --> test.zip mappertest.mp4 |
Okay.... the config command works. It is loading the file. The problem appears to be when I load the file using config, it doesn't seem to be loading the saved configuration; it seems to be loading as default. None of my saved mapping is shown. If i load it from conf when dosbox starts, the saved mappings are there. I also tried mapping keys after loading from config and saving it. It still loads as default the next time I run config. I don't get a message that the map file had be been saved; also the date modified did not change. I checked the file properties and it is not set to read only. |
I confirm that loading the mapper configuration file using the With the help of the
|
Will this be fixed in a new release? Also, there has not been any new
releases since September.
…On Fri, Nov 18, 2022, 5:37 PM grapeli ***@***.***> wrote:
I confirm that loading the mapper configuration file using the config
command *does not work*.
The configuration is loaded correctly when we do it using the menu Main--->Load
mapper file... or when starting dosbox-x from the command line.
dosbox-x -set mapperfile=/path/to/mapper/file.map
With the help of the config command, you can specify any non-existent
configuration file, and when checked, it will show us that it has been
loaded.
config -set mapperfile=/nonexist/directory/blablabla.map
config -get mapperfile
/nonexist/directory/blablabla.map
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RMUOQRE6KHRSDDCK4LWJAHKPANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This is not an error. |
I don't understand. Even if I use the command to load the file, the changes
are not saved by the editor. What is the point of using the command?
…On Fri, Nov 18, 2022, 9:48 PM grapeli ***@***.***> wrote:
This is not an error.
By using the config -set mapperfile= command, you only declare the file
to which any configuration changes will be saved made with the mapper
editor.
It's not very intuitive if you're using it for the first time. Just like
in my case.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RKQ3ADUFDIQI22RSJ3WJBEX5ANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In fact, the mapper editor does not write to the specified file. Surely this must be a mistake. |
The file also does not seem to be ready when loaded from config command.
I have map file that has mapped keys to game controller. When loaded from
config command, the mapped keys are not present.
…On Sat, Nov 19, 2022, 2:06 AM grapeli ***@***.***> wrote:
In fact, the mapper editor does not write to the specified file. Surely
this must be a mistake.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RMX4C7NLAXKET7QKDLWJCDBJANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You still have the option to reload the mapper configuration file. Some have been given earlier. Although with the help of the
and |
From my test I did the following which worked in that the Z and X keys were disabled.
Loading my test.map and going into the editor, I can re-add the Z key, and save to test.map, Z now works again and file timestamp updated to a few seconds ago. What is weird is that I cannot attach mappings to my XBox360 pad or mouse. Keyboard mappings work as described above but for a simple example no matter what I do I cannot get Button 1 on the pad to type Z on the screen. ##EDIT## |
Dosbox-x compiled with clang ( |
Thanks, Andy. I am also trying to map keys to a game controller. It does
not work if loading map using config command.
Also, if the map already has keys mapped to my game controller (loaded from
conf file), then mapped keys to game controller are not shown if loaded
from config command.
Ex. I have a map file that has the spacebar mapped to a game controller
button. If the file file, is loaded from conf file, then the button works
perfectly and I can save changes. If the map file is loaded using config
command, then the button does not work and any changes I make in the editor
are not saved.
…On Sat, Nov 19, 2022, 5:07 AM Andy ***@***.***> wrote:
From my test I did the following which worked in that the Z and X keys
were disabled.
- Copy the default .map to test.map
- Start DosBox-->use `config -set "mapperfile=test.map"->Mapper Editor
- Delete the Z & X keys from the map->Save map (This updated test.map)
- Exited Dosbox and relaunched, this loads the default map, Z and X
work, load test.map through config they do not work, as poorly shown in
video where I could not pasted the default.map name because there was no
mapped keys for X.
Loading my test.map and going into the editor, I can re-add the Z key, and
save to test.map, Z now works again and file timestamp updated to a few
seconds ago.
[image: image]
<https://user-images.githubusercontent.com/8470449/202846452-0ab9648f-d601-4321-b301-badafe1b3c00.png>
What is weird is that I cannot attach mappings to my XBox360 pad or mouse.
Keyboard mappings work as described above but for a simple example no
matter what I do I cannot get Button 1 on the pad to type Z on the screen.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RPY4JRBDSMHUNQCAGDWJCYH3ANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think I've partially figured it out... When I was testing I was using a recent SDL1 compile for testing another issue, which works as I've described, I only noticed I was on SDL1 when I decided to try another build. Switching to the same compile but SDL2 results in it behaving as @github-fanuser and @grapeli describe. So we were all right. 🤣 In short:
|
Okay, thanks for the help. I am also using sd2. I have a game that doesn't
work properly in sd1.
…On Sat, Nov 19, 2022, 5:52 AM Andy ***@***.***> wrote:
I think I've partially figured it out...
When I was testing I was using a recent SDL1 compile for testing another
issue, which works as I've described, I only noticed I was on SDL1 when I
decided to try another build. Switching to the same compile but SDL2
results in it behaving as @github-fanuser
<https://github.com/github-fanuser> and @grapeli
<https://github.com/grapeli> describe. So we were all right. 🤣
In short:
- SDL1 Builds appear to work as I've described and how we expect them
to, loading via config -set "mapperfile=test.map" works and when you
edit in Mapper Editor it saves to the correct .map as seen in my images.
- SDL2 Builds appear to be broken and can only load via the host
command line, using the Mapper Editor to make changes only edits the
default file not the chosen one.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RKPZQCSOKYKIKFLAXTWJC5OBANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In fact, the problem is with the SDL2 version. That's the only one I use.
|
@github-fanuser Can I suggest editing the title of this post to 'SDL2 Issue with Multiple mapper files' and add a bug label, might help to attract more help in solving this issue. @grapeli looking through the source code there is reference to different MAPPERFILE entries for SDL1 and SDL2 but I can't follow how they are used. Lines 781 to 783 in 16f23fd
|
With This sdl section option does not show up when running |
Tested and works for me, seems so weird they would use different .conf entries to perform the same job. |
Thank you, Andy! mapper_sdl2 did the trick. It now works as expected. One
caveat is that the mapper needs to be in the dosbox-x folder. It would not
work for me if I put it in the game folder. I guess this issue can be close
now.
…On Sat, Nov 19, 2022, 7:28 AM Andy ***@***.***> wrote:
With config -set mapperfile_sdl2=new.map it works fine with dosbox-x-sdl2.
This sdl section option does not show up when running config -get sdl.
Although in the configuration file there is.
Tested and works for me, seems so weird they would use different .conf
entries to perform the same job.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RO4NMARKI3V7NH65VLWJDIXLANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@github-fanuser it was @grapeli would found there are the two entries so all thanks to them. I just tested with the file on another drive and it worked for me. Try wrapping the command in quotes to allow for spaces and such: |
Ok... I have different mapper files for various games. I put the map file
in the same folder as the game. The reason it would not load when file was
in different folder than dosbox-x was I was using the mounted drive path. I
had to the real path as seen in Windows.
I do have one more question. Is there a way to unload the mapper file when
done playing the game. I tried config -set "mapperfile_sdl2=". I also tried
putting a space after =. Neither work.
I know I can just load a default map file, but would rather not have a file
loaded until needed. Thanks.
…On Sat, Nov 19, 2022, 7:20 AM grapeli ***@***.***> wrote:
With config -set mapperfile_sdl2=new.map it works fine with dosbox-x-sdl2.
This sdl section option does not show up when running config -get sdl.
Although in the configuration file there is.
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5ROKXCV5GQDWBDBDIPLWJDH2XANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The only option is to reload the default, add I'm going to be doing something similar now for some of the older pre joystick games I have now, then it can just fire up, load the mapper and play the game, then reload the stock config on exit. For ones that do not have an 'Exit To Dos' map a quit DosBox to a two button combo so it's not accidentally pressed (for example both Start and Select on the joypad). |
Glad we were able to figure this out. I am gonna do the same thing you are
doing.
…On Sun, Nov 20, 2022, 3:45 AM Andy ***@***.***> wrote:
The only option is to reload the default, add config -set
"mapperfile=mapper-dosbox-x.map" to the end of your .bat file and that
will set you back to the default mappings.
I'm going to be doing something similar now for some of the older pre
joystick games I have now, then it can just fire up, load the mapper and
play the game, then reload the stock config on exit. For ones that do not
have an 'Exit To Dos' map a quit DosBox to a two button combo so it's not
accidentally pressed (for example both Start and Select on the joypad).
—
Reply to this email directly, view it on GitHub
<#3821 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWI5RJPRQL7PLYWKXLJ7D3WJHXK3ANCNFSM6AAAAAAR5SOMVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Cool, please can you close the issue to help the devs with housekeeping. 🙂 |
Question
I apologize if this question has already been asked and answered.
I have several games that require mapping configurations. I have save these to different map files. Is there a way to load a map file after dosbox starts? If not, is this a feature that can be added in the future?
P.S. There has not been a new release since Sep. What is happening?
Thanks.
Have you checked that no similar question(s) exist?
Code of Conduct & Contributing Guidelines
The text was updated successfully, but these errors were encountered: