Tuesday, August 11, 2009

Notes on the PS3 wireless keypad and Linux...

The "PS3" Wireless Keypad is actually a small Bluetooth(r) keyboard+mouse.

To get it into pairing mode with other devices, hold down the blue button and turn the power 'on' and wait for blinkinglights. Then you can pair with it normally - set a PIN and like most other bluetooth kbd's, enter the PIN number and type enter.

And no, you can't use it as a USB keyboard.

I'm not quite sure how the modifier keys work yet, and how to properly map it. More details will come later as I figure out how to actually use it. ;) I've made a little progress using the "input-events" program (ubuntu: input-utils pkg)

As a general keyboard there are definitely "holes" in the keymap. The blue(left) button works as left shift for the keys it feels like working for, and the right is right alt.

However, they're only active for some keys, and those keys get remapped.

Therefore, to make this thing *actually* work, one needs to map other keys in as CTRL and ALT. The two buttons next to the keypad select switch (which map as F24 and F23) should work nicely for this.

The Linux input drivers can't do remapping on this, but x.org's event driver can.

xmodmap -e "keycode 202 = Control_L" < that *should* have worked, but the actual modifier isn't kicking in. Argh. But I'm tired, so that's a problem for another day...

Friday, August 07, 2009

mini 6502 emulator v0.001

I checked my very early 6502 source into google code (project: chadslab) - it's not debugged at all, but it's the smallest emulator I know of.

tl;dr the 6502's logic is really elegant and I felt like trying to writing .c file out of it. :)