Dosbox keyboard messed up in terminal only


38 posts   Page 2 of 2   1, 2
by abishur » Sun Apr 22, 2012 2:05 pm
jojopi said:


Abishur said:


chmod the file you just created to 0777 so you can actually run the dang thing (if you're a stickler for security use a lower setting)


...

So every time you see "chmod 0777" you know that the author turned all the permissions on without bothering which ones were needed.  You might be suspicious of everything else they say as well.


Yes, yes, and only the sith deal in absolutes, exaggerate much? :-P   I don't mind doing 777s because I do all my security happens *way* before the individual PC, and then I double up that security by configuring the settings on the PC to aggressively control who can get onto the PC such that by the time you get onto the PC, I don't care if you can change/access stuff ;-)

Still that's exactly why I wrote


(if you're a stickler for security use a lower setting)


I leave it up to the user to do whatever they want to the settings ;-)
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4326
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by thijsnl » Sun Jul 01, 2012 7:33 pm
What i did was install dosbox by 'apt-get install dosbox'

The keyboard layout was totally messed up (j=Enter, etc)

The solution for me was to edit the dosbox configuration file found in /home/pi/.dosbox/
Then set 'usescancodes=false'

Now the keymapping is correct on the Raspberry Pi

Mathijs
Posts: 4
Joined: Sun Jul 01, 2012 7:30 pm
by Mips » Sun Jul 15, 2012 4:02 am
Setting

usescancodes=false

has worked for me :)
User avatar
Posts: 1
Joined: Sat Jul 14, 2012 10:32 pm
by Acegi » Sat Aug 18, 2012 1:16 pm
I was wondering if there's a better workaround for this because it prevents holding down a key to repeat the same key. Since DOSBox is mostly used for games it means that you have to rapidly press direction keys to move around rather than simply hold down up/down/left/right. There are other examples too such as weapons fire or jumping etc.
Posts: 1
Joined: Fri Aug 17, 2012 5:52 pm
by abishur » Sat Aug 18, 2012 2:16 pm
Acegi wrote:I was wondering if there's a better workaround for this because it prevents holding down a key to repeat the same key. Since DOSBox is mostly used for games it means that you have to rapidly press direction keys to move around rather than simply hold down up/down/left/right. There are other examples too such as weapons fire or jumping etc.


Setting usescancodes=false has not prevented me from being able to hold down keys. Nor should it. usescancodes, to the best of my understanding details on what exactly it is are hard to find, does its best to auto assign the keys of your keyboard to it's keyboard mapper. This works great provided you have a standard keyboard, but if you're using a slightly more or less keys than standard keyboard it seems to get a little janky.

Side note, it cracks me up that people keep posting to use the solution listed early on on the first page. I guess they aren't reading through the tread? :lol:
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4326
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by diveroli » Mon Sep 10, 2012 5:45 pm
... find the line that says "usescancodes=true" and change it to false save and exit ... You can now run dosbox ...

Sorry to report that the above works for DOSBox Run from LXDE: DOSBox opens in a small window. Keyboard is now OK, it loads from my .conf file the UK keyboard, a final line to mount C:, all perfect except the very small window.

But it does NOT work from terminal. I Logout from LXDE, back to plain console, issue and I issue "sudo dosbox", DOSBOx opens in full screen: it looks beautiful, mounts C: as before (which means that it has processed my .conf file with the usescancodes=false, but from then on cannot type anything, keyboard all garbled, actually cannot even exit or stop, have to power off!
Any help?

Joe
Posts: 20
Joined: Sat Sep 08, 2012 10:20 pm
by abishur » Wed Sep 12, 2012 10:10 pm
Can you post the contents of your conf file and its location?

Also, I noticed that you're running one instance of dosbox within LXDE (presumably by running "startx") and the other with "sudo" It's possible you're ultimately using two separate conf files?
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4326
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by malakai » Mon Oct 08, 2012 5:09 pm
abishur wrote:came up with my own solution

cd /usr/bin

mv /usr/bin/dosbox /usr/games/dosbox

nano dosbox

#! /bin/bash

/usr/games/dosbox -conf /usr/games/dosbox.conf "$@"

save

Now I can type in dosbox anywhere and it load my conf file which works amazingly well!  Time to add some games to that bad boy!


running wheezy armfh nothing but updates on it

sudo apt-get install dosbox = works

mv /usr/bin/dosbox = no such directory searched the best I can but cant find it

keyboard works now with the edit in ~/.dosbox/ just wondering why I have a different location for install from package manager?
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by abishur » Mon Oct 08, 2012 5:25 pm
malakai wrote:
abishur wrote:came up with my own solution

cd /usr/bin

mv /usr/bin/dosbox /usr/games/dosbox

nano dosbox

#! /bin/bash

/usr/games/dosbox -conf /usr/games/dosbox.conf "$@"

save

Now I can type in dosbox anywhere and it load my conf file which works amazingly well!  Time to add some games to that bad boy!


running wheezy armfh nothing but updates on it

sudo apt-get install dosbox = works

mv /usr/bin/dosbox = no such directory searched the best I can but cant find it

keyboard works now with the edit in ~/.dosbox/ just wondering why I have a different location for install from package manager?


I suppose I didn't explain that very well :oops:

The basic idea I had was to still be able to type dosbox and have it run for any user regardless of what profile they were logged in under. Hence I moved the dosbox executable from /usr/bin to a separate directory (which for me was /usr/bin/games). Then I made a new executable that ran the dosbox from the location I moved it to with the conf file I created.

As far as I can remember I also installed dosbox with apt-get but I did so with the soft float version of debian. While it's possible that the soft/hard floats install differently, it is important to note that /usr/bin/dosbox is not a directory by a file.
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4326
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by malakai » Mon Oct 08, 2012 7:49 pm
I was under the impression that bin was for repos you download but I'll learn

I did get sound to work
sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1

a basic config got warcraft 2 open and playing but I read moby dick while i waited it didn't crash though.

Code: Select all
[sdl]
fulldouble=false
output=surface
sensitivity=100
mapperfile=mapper.txt

[dosbox]
machine=vga
memsize=8

[cpu]
core=simple
cputype=386
cycles=1200

[mixer]
nosound=false
rate=22050
blocksize=2048
prebuffer=30

[sblaster]
sbtype=none
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
gus=false
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=

[speaker]
pcspeaker=true
pcrate=22050
tandy=auto
tandyrate=22050
disney=true

[joystick]
joysticktype=none

[dos]
xms=true
ems=true
umb=true

[autoexec]
mount C home/pi/dosprog
c:


To run:
dosbox -userconfig

removed the comments and such so it's not a wall of text

Popping and buzzing very low but still there
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by safiuddinkhan » Sat Nov 03, 2012 11:22 pm
i have found what is causing this problem in source code
src/gui/sdl_mapper.cpp

from line 418 - 421

Code: Select all
#if !defined (WIN32) && !defined (MACOSX) && !defined(OS2)
      /* Linux adds 8 to all scancodes */
      else key-=8;
#endif


this is what is casuing the problem this code is there so to correct the problem in dosbox while running under X windows . since we dont want to run Dosbox in X windows on Raspberry Pi so just remove these lines and compile the code again and everything will work fine while running it from terminal or console without X windows
Posts: 3
Joined: Tue Oct 23, 2012 9:03 am
by GiantPlaidSquirrel » Tue Jul 30, 2013 3:56 pm
abishur wrote:came up with my own solution

cd /usr/bin

mv /usr/bin/dosbox /usr/games/dosbox

nano dosbox

#! /bin/bash

/usr/games/dosbox -conf /usr/games/dosbox.conf "$@"

save

Now I can type in dosbox anywhere and it load my conf file which works amazingly well!  Time to add some games to that bad boy!

wait there is a conf file? your explaination is kinda confusing
Posts: 5
Joined: Tue Dec 11, 2012 1:20 am
by abishur » Tue Jul 30, 2013 5:32 pm
GiantPlaidSquirrel wrote:
abishur wrote:came up with my own solution

cd /usr/bin

mv /usr/bin/dosbox /usr/games/dosbox

nano dosbox

#! /bin/bash

/usr/games/dosbox -conf /usr/games/dosbox.conf "$@"

save

Now I can type in dosbox anywhere and it load my conf file which works amazingly well! Time to add some games to that bad boy!

wait there is a conf file? your explaination is kinda confusing


Yeah, sorry about that I really need to go clean it up. Basically I copied the .conf file hidden with your home directory (in a hidden folder, I forget which off hand) and made duplicates of it which I would then call depending on which game I was running. If you just wanted to make a single change you could edit this global conf file in your home directory instead of doing as I suggested
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4326
Joined: Thu Jul 28, 2011 4:10 am
Location: USA