English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.OtherUAE (http://eab.abime.net/forumdisplay.php?f=54)
-   -   Keyboard problem with E-UAE (http://eab.abime.net/showthread.php?t=63288)

vxm 25 February 2012 13:53

Keyboard problem with E-UAE
 
and Debian.

Hello

At least, the following keys:
ralt,
rcommand,
rctrl
and arrow
are not usable within the emulation.

In the configuration file, sdl.map_raw_keys and kbd_lang are activated unlike x11.map_raw_key.

Is there a solution?

Thank you

FrodeSolheim 25 February 2012 14:07

I haven't used E-UAE in years, since it is not maintained and (for me) has issues on Linux. You could try the debian version of FS-UAE. The latest version (http://eab.abime.net/showpost.php?p=...&postcount=190) has improved keyboard support (I know this did not directly answer your question; sorry for the shameless plug).

vxm 25 February 2012 20:06

Thank you for the answer.

I configured a A1200/020
It returns "segmentation error" with an empty log file.

Then without a configuration file (default A500)
It returns "segmentation error" with the following log file :

"...
libamiga (based on WinUAE 2.4.0beta5) initialized
load config file
checking config file fs-uae.conf
using documents directory "/home/user/Documents"
using base directory "/home/user/Documents/FS-UAE"
using "Configurations" directory "/home/user/Documents/FS-UAE/Configurations"
checking config file /home/user/Documents/FS-UAE/Configurations/Default.fs-uae
checking config file /home/user/.config/fs-uae/fs-uae.conf
WARNING: No configuration file
(TODO: present this warning to the user in the UI
fs_uae_configure_amiga_model
using PAL mode (50Hz)
WARNING: unknown amiga config specified, using A500
using "Kickstarts" directory "/home/user/Documents/FS-UAE/Kickstarts"
using "Flash Memory" directory "/home/user/Documents/FS-UAE/Flash Memory"
using "Save States" directory "/home/user/Documents/FS-UAE/Save States"
using "Floppy Overlays" directory "/home/user/Documents/FS-UAE/Floppy Overlays"
using "Controllers" directory "/home/user/Documents/FS-UAE/Controllers"
fs_emu_init
initializing SDL
fs_emu_init
..."

An idea?

FrodeSolheim 25 February 2012 20:28

Yes, you are quite right, -it crashes hard when installed because it finds the wrong data folder (because g_set_prgname was not set). I'm building 0.9.9beta5 now...

vxm 25 February 2012 20:35

Awesome!
Once again thank you for your reply.

FrodeSolheim 25 February 2012 20:39

Quote:

Originally Posted by vxm (Post 804097)
Awesome!
Once again thank you for your reply.

Here is 0.9.9beta5 for Debian (let's call it the "embarrassing crash" release) :):
http://fengestad.no/fs-uae/files/fs-...ta5-0_i386.deb
http://fengestad.no/fs-uae/files/fs-...a5-0_amd64.deb
(and this time I tested it!)

vxm 25 February 2012 22:01

Well this now seems to work, thank you.
Just one question before I go any further, Picasso96 is not available, is it right?

FrodeSolheim 25 February 2012 23:20

Quote:

Originally Posted by vxm (Post 804107)
Well this now seems to work, thank you.
Just one question before I go any further, Picasso96 is not available, is it right?

Correct (not yet, anyway).

vxm 26 February 2012 11:28

Hello

Result of try: The emulation is really slow (roughly, uae in an A500).

No luck, the 3D part of the graphic chipset is not supported by Debian so goodbye OpenGL.

Well I know it would take work, but a SDL version is possible?

Thank you.

FrodeSolheim 26 February 2012 22:06

Quote:

Originally Posted by vxm (Post 804148)
Hello

Result of try: The emulation is really slow (roughly, uae in an A500).

No luck, the 3D part of the graphic chipset is not supported by Debian so goodbye OpenGL.

Well I know it would take work, but a SDL version is possible?

Thank you.

Bad luck with the chipset :-/ -An all-SDL version without OpenGL is possible, but not without sacrificing features (fullscreen scaling at 1080p, vsync etc). I'm not interested in this personally, I'm afraid.

modrobert 27 October 2012 19:18

Quote:

Originally Posted by vxm (Post 804034)
and Debian.

Hello

At least, the following keys:
ralt,
rcommand,
rctrl
and arrow
are not usable within the emulation.

In the configuration file, sdl.map_raw_keys and kbd_lang are activated unlike x11.map_raw_key.

Is there a solution?

Thank you

For cursor keys in E-UAE, try adding these lines to your .uaerc file:

Code:

input.1.keyboard.0.button.111=KEY_CURSOR_UP.0
input.1.keyboard.0.button.113=KEY_CURSOR_LEFT.0
input.1.keyboard.0.button.114=KEY_CURSOR_RIGHT.0
input.1.keyboard.0.button.116=KEY_CURSOR_DOWN.0

If these key codes fail (111,113,114,116), you can check SDL key codes (for your keyboard/country) by compiling this C source code:

Code:

#include <stdlib.h>
#include <stdio.h>
#include <string.h>   
#include "SDL/SDL.h"

    /* Function Prototypes */
    void PrintKeyInfo( SDL_KeyboardEvent *key );
    void PrintModifiers( SDLMod mod );

    /* main */
    int main( int argc, char *argv[] ){
       
        SDL_Event event;
        int quit = 0;
       
        /* Initialise SDL */
        if( SDL_Init( SDL_INIT_VIDEO ) < 0){
            fprintf( stderr, "Could not initialise SDL: %s\n", SDL_GetError() );
            exit( -1 );
        }

        /* Set a video mode */
        if( !SDL_SetVideoMode( 320, 200, 0, 0 ) ){
            fprintf( stderr, "Could not set video mode: %s\n", SDL_GetError() );
            SDL_Quit();
            exit( -1 );
        }

        /* Enable Unicode translation */
        SDL_EnableUNICODE( 1 );

        /* Loop until an SDL_QUIT event is found */
        while( !quit ){

            /* Wait for event */
            if( SDL_WaitEvent( &event ) ){               
                switch( event.type ){
                    /* Keyboard event */
                    /* Pass the event data onto PrintKeyInfo() */
                    case SDL_KEYDOWN:
                    case SDL_KEYUP:
                        PrintKeyInfo( &event.key );
                        break;

                    /* SDL_QUIT event (window close) */
                    case SDL_QUIT:
                        quit = 1;
                        break;

                    default:
                        break;
                }

            }

        }

        /* Clean up */
        SDL_Quit();
        exit( 0 );
    }

    /* Print all information about a key event */
    void PrintKeyInfo( SDL_KeyboardEvent *key ){
        /* Is it a release or a press? */
        if( key->type == SDL_KEYUP )
            printf( "Release:- " );
        else
            printf( "Press:- " );

        /* Print the hardware scancode first */
        printf( "Scancode: 0x%02X (%u)", key->keysym.scancode, key->keysym.scancode );
        /* Print the name of the key */
        printf( ", Name: %s", SDL_GetKeyName( key->keysym.sym ) );
        /* We want to print the unicode info, but we need to make */
        /* sure its a press event first (remember, release events */
        /* don't have unicode info                                */
        if( key->type == SDL_KEYDOWN ){
            /* If the Unicode value is less than 0x80 then the    */
            /* unicode value can be used to get a printable      */
            /* representation of the key, using (char)unicode.    */
            printf(", Unicode: " );
            if( key->keysym.unicode < 0x80 && key->keysym.unicode > 0 ){
                printf( "%c (0x%04X)", (char)key->keysym.unicode,
                        key->keysym.unicode );
            }
            else{
                printf( "? (0x%04X)", key->keysym.unicode );
            }
        }
        printf( "\n" );
        /* Print modifier info */
        PrintModifiers( key->keysym.mod );
    }

    /* Print modifier info */
    void PrintModifiers( SDLMod mod ){
        printf( "Modifiers: " );

        /* If there are none then say so and return */
        if( mod == KMOD_NONE ){
            printf( "None\n" );
            return;
        }

        /* Check for the presence of each SDLMod value */
        /* This looks messy, but there really isn't    */
        /* a clearer way.                              */
        if( mod & KMOD_NUM ) printf( "NUMLOCK " );
        if( mod & KMOD_CAPS ) printf( "CAPSLOCK " );
        if( mod & KMOD_LCTRL ) printf( "LCTRL " );
        if( mod & KMOD_RCTRL ) printf( "RCTRL " );
        if( mod & KMOD_RSHIFT ) printf( "RSHIFT " );
        if( mod & KMOD_LSHIFT ) printf( "LSHIFT " );
        if( mod & KMOD_RALT ) printf( "RALT " );
        if( mod & KMOD_LALT ) printf( "LALT " );
        if( mod & KMOD_CTRL ) printf( "CTRL " );
        if( mod & KMOD_SHIFT ) printf( "SHIFT " );
        if( mod & KMOD_ALT ) printf( "ALT " );
        printf( "\n" );
    }

Use this command to compile:

Code:

gcc sdl_test_key.c -o sdl_test_key -lSDL
Run ./sdl_test_key and click on the window that opens, the output from your key presses will look like this example:

Code:

Press:- Scancode: 0x6F (111), Name: up, Unicode: ? (0x0000)
The decimal code in this case is 111 for the cursor "up" key, so that means the line should be like this in .uaerc:

Code:

input.1.keyboard.0.button.111=KEY_CURSOR_UP.0
You can figure out the rest of the "missing keys" the same way, and map them to the corresponding E-UAE input event name by checking this file:

http://www.eurasia.nu/images/submitt...events_def.txt


All times are GMT +2. The time now is 06:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.04284 seconds with 11 queries