Rockbox

Tasklist

FS#5153 - Doom Scrollwheel Patch

Attached to Project: Rockbox
Opened by Lukas Sabota (punkrockguy318) - Monday, 17 April 2006, 02:40 GMT
Last edited by Thomas Martitz (kugel.) - Sunday, 05 June 2011, 11:24 GMT
Task Type Patches
Category Games
Status Closed
Assigned To Karl Kurbjun (kkurbjun)
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

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.
This task depends upon

Closed by  Thomas Martitz (kugel.)
Sunday, 05 June 2011, 11:24 GMT
Reason for closing:  Accepted
Additional comments about closing:  r29968
Comment by Lukas Sabota (punkrockguy318) - Monday, 17 April 2006, 16:51 GMT
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?
Comment by Lukas Sabota (punkrockguy318) - Monday, 17 April 2006, 19:04 GMT
Alright, here is a working, clean, patch. This patch allows you to strafe with the scrollwheel. Please post any feedback.
Comment by Karl Kurbjun (kkurbjun) - Wednesday, 26 April 2006, 19:00 GMT
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.
Comment by Lukas Sabota (punkrockguy318) - Thursday, 27 April 2006, 02:51 GMT
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.
Comment by Lukas Sabota (punkrockguy318) - Thursday, 18 May 2006, 02:43 GMT
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.
Comment by Jon (ace214) - Wednesday, 15 November 2006, 02:57 GMT
Sorry about that. Hopefully it will work this time.
Comment by Ryan Dechant (gravedigg154) - Friday, 22 December 2006, 05:54 GMT
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.
Comment by Chris (decayed.cell) - Tuesday, 30 January 2007, 20:16 GMT
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
Comment by Gary Light (evilg123) - Thursday, 19 April 2007, 17:13 GMT
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)
Comment by Douglas Valentine (Dwyloc) - Thursday, 28 June 2007, 11:27 GMT
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.
Comment by Mark (Xebozone) - Thursday, 06 September 2007, 13:44 GMT
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...
Comment by Karl Kurbjun (kkurbjun) - Thursday, 06 September 2007, 14:19 GMT
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.
Comment by Mark (Xebozone) - Thursday, 06 September 2007, 16:13 GMT
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...)
Comment by Karl Kurbjun (kkurbjun) - Thursday, 06 September 2007, 17:01 GMT
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.
Comment by Lukas Sabota (punkrockguy318) - Thursday, 06 September 2007, 20:21 GMT
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
Comment by dkarma (digitalkarma) - Wednesday, 12 September 2007, 18:43 GMT
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?
Comment by dkarma (digitalkarma) - Wednesday, 12 September 2007, 19:32 GMT
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.

Comment by Anonymous Submitter - Wednesday, 12 September 2007, 20:17 GMT
Could you upload your sync'd version please?
Comment by Karl Kurbjun (kkurbjun) - Friday, 14 September 2007, 03:55 GMT
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.
Comment by Anonymous Submitter - Saturday, 15 September 2007, 12:38 GMT
Here, this one fixed the issue named by dkarma. Works with recent SVN.
Comment by Marty Carlton (martonius1978) - Sunday, 16 September 2007, 15:56 GMT
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
Comment by Marty Carlton (martonius1978) - Monday, 17 September 2007, 03:05 GMT
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
Comment by Anonymous Submitter - Monday, 17 September 2007, 08:13 GMT
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.
Comment by Mark (Xebozone) - Friday, 25 April 2008, 10:09 GMT
iDoom (for iPodLinux) has scrollwheel turning support.

Source code is avaliable.

Check that out?

http://idoom.hyarion.com/index.php
Comment by Gman (Thecoolgman) - Monday, 04 May 2009, 03:58 GMT
I allways wanted that!
Comment by John Romero (sssUSER) - Saturday, 26 June 2010, 04:56 GMT
I resynched it for recent SVN. Should work great with 3.6 too.

Loading...