• Status Unconfirmed
  • Percent Complete
  • Task Type Patches
  • Category Games
  • Assigned To No-one
  • Operating System Another
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by yossa - 2006-12-21
Last edited by pondlife - 2007-10-10

FS#6467 - New control scheme for Doom on Sansa e200

Patch changes controls for Doom:

Forward: rec/up
Left/Right: scrollwheel (it needs a lot of scrolls for large turns, but hopefully it can be modified to work better in the future)
Back: down
Shoot/Enter (menu): select
Change weapon: left
Open: right
Esc: power

yossa commented on 2006-12-30 20:34

No success as of yet with modifying the turn code in Doom source. A dirty hack is to bind key_left and key_right in g_game.c to 180 degrees turn function but lowering the actual degrees of turn. Effectively, by scrolling the wheel player view jumps a predefined number of degrees. Playing in such a way is jerky and generally not pleasant but works.

Example code of such a hack:

#define QUICKREVERSE (short)3072 // 180 degree reverse
if (gamekeydown[key_left])
cmd→angleturn += QUICKREVERSE;
gamekeydown[key_left] = false;
if (gamekeydown[key_right])
cmd→angleturn -= QUICKREVERSE;
gamekeydown[key_right] = false;

More skilled coders should probably be able to fix the problem in a much more elegant way. But since the scrollwheel code for sansa is to be modified to interrupt based when possible, this should probably be put off to a later date.

yossa commented on 2007-03-25 13:08

With the introduction of 90 degrees screen rotation in Doom, I tried to create a more useful method of controlling it. Changes introduced by the attached patch are as follows:

Forward: rec
Left/Right: up/down (suits rotated display)
Back: left
Shoot: select
Open: right
Change weapon: scroll up
confirm (menu): scroll down
Esc: power

The REC button for moving forward allows to move and turn at once without much strain, creating a more true to the original controls feel.

PS. Before first use you will likely have to remove the default.dfg file from your WAD directory, especially if you tried to set up your own controls via the plugin menu.

i know you've probably been done trying to figure out this problem for a while, but i can't seem to figure out how to apply this patch to my rockbox… if you could be of any help, i'd be very grateful

yossa commented on 2007-09-04 17:09

I'm sorry, I've neglected my patches for a long while due to lack of time. It's entirely possible that there were changes to the codebase which prohibit this patch from working correctly. I will try to update its status in the comming days, I don't promise anything though.

i know all the people posting patches and bug fixes on this site must have other much higher priorities, so i thank you very much for posting anything up here at all!
i have one more question though..
would this patch, if working, be the thing that provides the coding for the scrolling in Doom to work both directions?…i've gotten it to scroll right using the "key on" key setting for the "right" control key, though the "key off" doesn't work the opposite way(left)….
i'm just trying to figure out if this would be the patch i'd need, if it were to work as it was programmed to.


Available keyboard shortcuts


Task Details

Task Editing