maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Atari800 v2.2.1 port and xkbd (https://talk.maemo.org/showthread.php?t=81629)

shawnjefferson 2012-01-15 19:13

Atari800 v2.2.1 port and xkbd
 
I've been using the port of Atari800 by tobiasj of the Atari800 emulator, and it's fine, but there are a couple of problems that I have:

- old Atari800 version (2.0.3)
- key bindings interfere with ASUI and Telescope, which is annoying.

So I started to port version 2.2.1 of Atari800 (SDL). I've got a working port, compiled with --enable-veryslow, --enable-pagedattrib and --disable-monitorbreak which seems to help emulation speed combined with the -refresh runtime parameter (emulated Atari runs very close to 100% and sound is working pretty well.) I've made a few changes to key input to allow xkbd to work for the console keys and fixed the Enter key so it sends Return to the atari.

I decided to avoid all the hardware keys that are bound to system functions, so you really need to use this with xkbd. I've started building a virtual keyboard with atari 800 functions on it, which works pretty well. Right now the keyboard only has Reset, Option, Select, Start, Help, and Break on it, but I'd like to add a few other key presses that are difficult to achieve on the N810 keyboard.

I have some questions about xkbd though... is there a way to send combination keypresses with xkbd? Like "Alt-D" or "Ctrl-Shift-Home" with one button in xkbd?

Addison 2012-01-15 21:49

Re: Atari800 v2.2.1 port and xkbd
 
3 Attachment(s)
Quote:

have some questions about xkbd though... is there a way to send combination keypresses with xkbd? Like "Alt-D" or "Ctrl-Shift-Home" with one button in xkbd?
Xkbd by itself, no, it can't do this.

FIrst off, better version of Xkbd.
http://talk.maemo.org/showpost.php?p=408688&postcount=1

The delay between the keys being repeated by accident is much better in this one. You can forget all of the other junk inside that Keyboards folder.

This could be done using Xbindkeys and XTE on an N810.

For an N800, it would be a little tricky.

Define one of your keys in Xkbd as something obscure, like F12.

In Xbindkeys have something like this.

/home/user/.xbindkeysrc
xte 'keydown Control_L' 'key r' 'keyup Control_L'
F12

or maybe it's
"xte 'keydown Control_L' 'key r' 'keyup Control_L'"
F12

I also attached Xmodmap just in case you need to change the output of a key as well.

If you're making your own buttons, here's a great site if you would like to visually make them more appealing on the screen.
http://cooltext.com/Ghost-Button

To convert your image to .xpm.
http://www.convertmyimage.com/index.php

Any questions and I'll be happy to help. :)

Johnnie Price 2012-01-15 23:03

Re: Atari800 v2.2.1 port and xkbd
 
Just as a note, xbindkeys and xmodmap are available in extas-devel.

shawnjefferson 2012-01-16 19:01

Re: Atari800 v2.2.1 port and xkbd
 
Quote:

Originally Posted by Addison (Post 1151033)
FIrst off, better version of Xkbd.
http://talk.maemo.org/showpost.php?p=408688&postcount=1

The delay between the keys being repeated by accident is much better in this one.

Thanks, I'll try that one out. There is an issue with repeating keypresses with the version I have, but if you press fast it isn't so bad... :)

Quote:

This could be done using Xbindkeys and XTE on an N810.
Frankly most of that was over my head!

I'm still having some trouble with the emulator recognizing certain keypresses (Insert, Delete, Home, End)The problem seems to be with the way the emulator is checking the keyboard, or an interaction with that and xkbd. Testing xkbd with xev shows the keys being pressed.

But for the majority of the others I have assigned them to F-keys, so almost all the functionality of the Atari keyboard is available now. If you know the Atari computer, here is what I'm missing still:

Ctrl/Shift-Insert
Ctrl/Shift-Clear
Tab

and the only hardware buttons assigned:

volume down: Start
volume up: Select
Menu button: Atari800 emulator menu
ESC button: ESC

plays much nicer with Telescope.

Quote:

If you're making your own buttons, here's a great site if you would like to visually make them more appealing on the screen.
http://cooltext.com/Ghost-Button
Thanks for that. What I want to do in the future is create keyboards with graphics of the actual keys from the Atari keyboard, at least for the stuff I'm using xkbd for.

Addison 2012-01-18 23:33

Re: Atari800 v2.2.1 port and xkbd
 
In that above link I provided, keep it all on your memory card and in Xterm, try this...

xkbd -geometry +65536+65536 -k /media/mmc2/N800/Keyboards/RightDosbox2.xkbd & xkbd -geometry +722+65536 -k /media/mmc2/N800/Keyboards/RightDosbox.xkbd

You should get this on your screen.
http://img803.imageshack.us/img803/2...2011817510.png

Xkbd can only do one graphic per key if you want to go that way. So you can't have it change from a lower case letter to an upper case one. This means you can't change the graphic when you press a key either.

Once you have the correct keyboard layout that you want, let me know what special bindings you need for any of them and I'll give you the xte scripts to do those. :)

Addison 2012-01-18 23:42

Re: Atari800 v2.2.1 port and xkbd
 
Here's a quick read on using graphics with Xkbd.

http://talk.maemo.org/showpost.php?p...&postcount=139

Best of luck with your project on this. :)

Addison 2012-01-19 02:14

Re: Atari800 v2.2.1 port and xkbd
 
One other thing.

To have full use of all the function keys, you can do this in Xterm.

/etc/init.d/mce stop

To restore your tablet back.

sudo /etc/init.d/mce start

Be very careful with this though since you'll lose your Task Navigator while running this emulator.

shawnjefferson 2012-01-19 04:00

Re: Atari800 v2.2.1 port and xkbd
 
5 Attachment(s)
Hi,

@Addison:
I tested with the keyboard you showed in your post and the Insert and Delete keys have the same non-effect, so I have to look into the code a bit more on that. I also want to avoid stopping MCE, so I am not using any hardware keys that are used by Telescope (I guess some people may have other hardware keys stole for system functions?)

I'm attaching the version I compiled for anyone who wants to try it out. Install the atari800 package that already available for Diablo (in another thread by tobiasj) first. Copy the atari.bin to the /usr/games/ directory overwriting the original (I made a backup of it first myself).

In that zip file is also the keyboard I'm using. You can see there is very few keys on it, just what you can't produce with the N810 keyboard easily (sorry those with N800s will have to use a more full-featured xkbd!) I also edited the atari800 launch script in /usr/games a bit too...

I added a line to launch my keyboard, and to run the emulator with a larger window by default (you can always go to full screen by pressing the full screen hardware key.)

exec xkbd -k /usr/share/xkbd/atari800.text.xkbd &
exec ${0}.bin -windowed -stretch 1.9 -bpp 16 "$@"


Here's some screenshots as well (taking a screenshot kills the emulator speed!)

Addison 2012-01-19 04:03

Re: Atari800 v2.2.1 port and xkbd
 
Nice!

I'll give a try later tonight and post back.

Thanks Shawn! :)

Addison 2012-01-19 06:52

Re: Atari800 v2.2.1 port and xkbd
 
Quote:

exec xkbd -k /usr/share/xkbd/atari800.text.xkbd & exec ${0}.bin -windowed -stretch 1.9 -bpp 16 "$@"
Is this correct because I receive the following error.

-bash: exec: -b: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]

Also, do I rename atari800.bin to atari800 because that's the original file name I have in /usr/games unless I'm using the wrong version.

Cheers. :)


All times are GMT. The time now is 23:03.

vBulletin® Version 3.8.8