Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Games
  • Assigned To
    kkurbjun
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by punkrockguy318 - 2006-04-17
Last edited by kugel. - 2011-06-05

FS#5153 - Doom Scrollwheel Patch

This is a real puzzler. I have written a patch to use the scrollwheel for turning instead of the left/right keys. Then later, the left/right keys could be added for strafing. This patch works perfectly fine in the simulator, but it fails on the ipod 5g. When running on the ipod 5g, scroll events are ignored and no turning is possible.

I’ve tried many different approaches to fix this problem:
I set up a different segment of code to use button_get instead of button_status. Same results! Works fine on simulator, doesn’t work on the ipod.
I then tried to have the scroll whell send mouse events rather than keyboard ones: Same reults!

I did not keep these other attempts, only the cleanest attempt. Could someone please give some insight to this problem? I’ve talked to others on IRC and we can’t seem to figure it out.

Closed by  kugel.
2011-06-05 11:24
Reason for closing:  Accepted
Additional comments about closing:  

r29968

I’ve worked up a different patch. This changes a bit of g_game so mouse events will turn the player. This uses button_get() for input, because button_status won’t work with the clickwheel.

PROBLEM: This code only detects the first touch of the click wheel. You will turn a bit when you touch it for the first time, but circling around the clickwheel will do nothing. Could someone help me out here?

Alright, here is a working, clean, patch. This patch allows you to strafe with the scrollwheel. Please post any feedback.

This looks pretty good, but your sidemoves seem to be a cheat with the 5*sidemove[speed]. Also if you could add an option to enable or disable sidescrolling with the wheel in the doom startup menu I would be interested in committing the patch.

Thanks! I’d been hoping to do both of those things, but this is the crunch week of the drama I’m involved in (Grease!), and I’ve been really busy. When I get a chance to do some more coding, I’ll get right on both of those things.

I took a look at the menu code a while back, but haven’t got much progress since then. I’ve been quite busy lately, and need to reinstall my crosscompiler :-\\. I’ll see if I can improve this patch when I get a bit more free time. If someone else wants to improve my existing work, go ahead.

Sorry about that. Hopefully it will work this time.

It worked good on mine but the my wheel is really sensitive so I think someone should make a patch so that scrollwheel up is right and down is left. Then right and left can be used to strafe right and left.

Okay disregard the comment above, works on 5.5G iPod Video, works on 4G Grayscale - though it seems to be not sensitive enough.

Do you ever find that it automatically scrolls in Doom? Sometimes I have that problem

Patches modify source code, which means you need to get the source through SVN, apply the patch using Cygwin VMware (or patch in Linux). Checkout the forums under ‘Getting Started & Compiling’ for more info on how to use patches. also the wiki has some great documentation.
checkout http://www.rockbox.org/twiki/bin/view/Main/DocsIndex#For_Developers and http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling

if you don’t want to bother compiling yourself look around the ‘unsupported builds’ forum, some of the builds have the doom patch (mine does)

I have attached by quick fix to make the patch work again on the iPods (tested on 80GB iPod 5.5G ),
but the patch really needs to me merged with the Sansa scroll wheel support so it can be committed to SVN.

I had my own ideas for using the clickwheel for movement as mentioned in my comments on  FS#6945 

Perhaps someone can look at them and try to get this patch to be committed to the SVN. It’s been a few months now since the last comment here…

I would be happy to commit this patch if it was made properly. Unfortunately no one has made any of the corrections I suggested all the way back on the 26th of April, 2006. Until the patch is fixed so that it works with the Sansa, the movements are configurable in the configuration options, and the movement is not 5 times as fast as it should be it will not be committed to SVN.

Since the task is assigned to you, I assume you will be the one finalising the code?

Please take my suggestions for key mapping also, as mentioned in the comments of  FS#6945  , which could in fact be more useful/easy, less laggy (no interpretation of direction/speed, etc, resulting in faster code) and may improve the functionality and customisation of the scrollwheel in general (if simple touch-detection hasn’t been implemented to Rockbox yet…)

I will not be finalizing the code at least not any time soon (likely never). I have other projects I am working on and I do not have an Ipod or Sansa to develop with. I am more or less the maintainer of rockdoom since I did the port and I am a committer so I assigned myself the task as a possible mentor and interested commiter if someone finishes this. Someone has to take a genuine interest and spend some time if they want it done right and would like credit in Rockbox for their work. Feel free to write up whatever features you are interested in and submit the code. If you don’t know C a great way to learn is by doing, it’s definitely possible to teach yourself (I know first hand). None of us are payed for the work so it will likely never be done unless you find someone who is really interested in completing this (and has the ability) or you do it yourself. Lukas is the only one who has seriously stepped up so far regarding this patch. That said, I am more than happy to spend time helping someone else with the fixes - enabling others to better the code helps all of us in the end after all. If someone is genuinely interested in working on this I can be reached via PM on the forums.

Hello! I’m sorry to inform you that I’m too busy right now to invest any serious time into this patch. I hope that someone can extend my patch so that it can be implemented sometime. If anyone has any questions to me about the patch, feel free to contact me personally at punkrockguy318 _AT_ comcast _DOT net

this patch works w/ the sansa scrollwheel and the strafe works well, but when i apply this patch it patches 3 files: the d_event.h file the g_game.c file and the i_video.c file. after this patch is applied and the build is compiled i load the build onto my sansa e260 and play doom… all controls work fine, but when i go to exit the game by going to the menu and selecting quit game the game doesn’t exit it just goes right back to the playing screen…

anyone else had this problem w/ this patch or similar patches?

I re-applied the sync20061010 patch and compiled w/ the svn build avialable on 9/11/07.
The only problem I had with the patch was the scroll naming conventions were wrong for the sansa e260
the command was DOOMBUTTON_S_LEFT and DOOMBUTTON_S_RIGHT in the i_video.c file when they should have been DOOMBUTTON_SCROLLWHEEL_CC and DOOMBUTTON_SCROLLWHEEL_CW respectively. Once these were replaced it built fine, and exited properly when i selected quit. Kudos to ace 214
for supplying this patch.
I’d love to work on getting this committed to the svn, but I need to find out where the doom menu options are located etc.

Anonymous Submitter commented on 2007-09-12 20:17

Could you upload your sync’d version please?

dkarma, Make sure you update your information to have/show your full, real name. If you are going to do work that can be committed to the SVN tree we need your full name. The menu code is all located in rockdoom.c. If you have any specific questions about the menu code (or any of the code) please PM me on the forums and I would be glad to help.

Anonymous Submitter commented on 2007-09-15 12:38

Here, this one fixed the issue named by dkarma. Works with recent SVN.

i wasn’t asking anyone to post a new build for me, i was simply curious if there was a way i could just compile doom after adding a patch myself, instead of compiling the complete firmware over again
i guess my wording confused you Karl

thanks for that fixed-up patch, Thomas…though the changes were made in the Ipod section, it works great with my Sansa E280….though i think i want to change it so the scrollwheel turns left and right, and the left and right keys will strafe accordingly :D

Anonymous Submitter commented on 2007-09-17 08:13

If you know how, share it. There is a patch doing this, but the scrolling is pretty slow there.

In the doom options you can’t change it to turn with the scrollwhell, if I’m not wrong.

iDoom (for iPodLinux) has scrollwheel turning support.

Source code is avaliable.

Check that out?

http://idoom.hyarion.com/index.php

I allways wanted that!

I resynched it for recent SVN. Should work great with 3.6 too.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing