Sane keyboard controls for softgun emulator

Share unrelated electronics stuff, ideas, rants, etc!
Post Reply
User avatar
Posts: 1060
Joined: Thu Jun 04, 2015 5:35 pm

Sane keyboard controls for softgun emulator

Post by Artcfox » Sat Oct 03, 2015 1:24 am

I wanted to see what the Softgun emulator was about, but the default keymap is atrocious!

To make it somewhat usable, open ~/.softgun/ and disable the keyboard controlled mouse crap:

Code: Select all

mouse: 0

mouse: 0
Then open softgun-0.22/avr8/uze_snes.c and change the definition of keymap_template to:

Code: Select all

KeyMapEntry keymap_template[] = {
	{ 0xffe2,	0x0800 },
	{ 0xffe1,	0x0400 },
	{ 'x',		0x0200 },
	{ 'a',		0x0100 },
	{ 0xff53,	0x0080 },
	{ 0xff51,	0x0040 },
	{ 0xff54,	0x0020 },
	{ 0xff52,	0x0010 },
	{ 0xff0d,	0x0008 },
	{ 0xff09,	0x0004 },
	{ 'z',		0x0002 },
	{ 's',		0x0001 },	
and finally recompile softgun.

That should make it match the SNES 1p keyboard configuration of Uzem. I didn't verify BTN_X and BTN_Y, because my WIP doesn't use those, and ControllerTester.hex is telling me "NO CONTROLLER" when I try running it under the softgun emulator.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests