Hi all ,
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).
RasPi ports of two emulators... and a question
- Posts: 9
- Joined: Wed Jan 11, 2012 9:10 am
I can't answer you question but I'd just like to thank you for the emulators.
- Posts: 22
- Joined: Tue Nov 29, 2011 11:56 pm
Thank you so much, I can't answer your question either as I'm really bad at that kind of thing. I don't have a raspberry pi yet, but when/if I do I will certainly be using your emulators!
- Posts: 7
- Joined: Sat Jun 09, 2012 2:03 am
Nice job on the gameboy emulator there
note: I may or may not know what I'm talking about...
- Posts: 1312
- Joined: Thu Aug 18, 2011 9:21 pm