I finally got to play with a Raspberry Pi for the first time over the weekend! After getting it up and running and messing around with Debian for a while I wanted to do some coding on, it so I did some quick ports of two console emulators I originally wrote for Android (one for the Gameboy and one for Sega Master System) to get to grips with the Broadcom-provided libraries. I decided to release the source code (GPLv3 license) in case anyone is interested... I put them online here:
Blog posts about developing them here:
"Screenshot" of Gameboy Tetris running on the Pi:
(I have to confess, the code is not all that nice. The emulator CPU cores and graphics rendering code is written in ARM assembly, just because when I started them I wanted a project to learn the ARM architecture on, there's probably no need from a speed point of view! But maybe it's of interest to someone).
Now the question... can anyone recommend a good way to get raw keyboard input data (i.e. both key presses and releases, unprocessed) that will work under X Windows? Currently I switch the keyboard into raw mode with Linux system calls but this doesn't work under X. I tried using the SDL library but although it's installed, it doesn't seem to work (I can link to it and initialise it but my program doesn't receive any keyboard events. The same code works on Windows). I'm wondering about creating some sort of hidden X window that can listen for input events, but I'm not very familiar with X so not sure how to go about that.
(I hope this is an OK place to post this. I'm quite new to the forums and still finding my way around).