ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > GP2X/GP2XWiz/Caanoo Port > F200: Official Test Builds Goto page Previous  1, 2
F200: Official Test Builds
  Author    Thread Reply to topic
ProfesorSepulveda



Joined: 31 Mar 2008
Posts: 1
 

Hello,
For example in monkey island, when I move the stylus for investigate the screen, Guybrush follows the movement of stylus.

For solve this problem could be that pressing L button and moving the stylus , the "mouse left click" simulation haven't effect?

In this moment I prefer use the NDS port because this problem, but I think that the GP2X port could be the best port, for stylus support & better aspect ratio than NDS.

Thanks and congratulations for your work, and sorry for my poor english
Wink

 Reply with quote  
Post Mon Mar 31, 2008 6:42 pm 
 View user's profile Send private message
EGA



Joined: 08 Apr 2008
Posts: 3
 

Well, I rather have the stylus as a "clic" so I hope you put this as a choice in a configuration file (or some other way).

Btw, I've looked at your code and (if you don't mind) would like you to change in backends/platform/gp2x/events.cpp the following (once more, if you don't mind):

code:
      case SDL_MOUSEBUTTONDOWN:
         if (ev.button.button == SDL_BUTTON_LEFT)
            event.type = Common::EVENT_LBUTTONDOWN;


with
code:
      case SDL_MOUSEBUTTONDOWN:
         if (ev.button.button == SDL_BUTTON_LEFT)
//            event.type = Common::EVENT_LBUTTONDOWN;
            if (GP2X_BUTTON_STATE_L == TRUE) {
                event.type = Common::EVENT_LBUTTONDOWN;
            } else {
                event.type = Common::EVENT_RBUTTONDOWN;
            }


and
code:
      case SDL_MOUSEBUTTONUP:
         if (ev.button.button == SDL_BUTTON_LEFT)
            event.type = Common::EVENT_LBUTTONUP;


with
code:
      case SDL_MOUSEBUTTONUP:
         if (ev.button.button == SDL_BUTTON_LEFT)
//            event.type = Common::EVENT_LBUTTONUP;
            if (GP2X_BUTTON_STATE_L == TRUE) {
                event.type = Common::EVENT_LBUTTONUP;
            } else {
                event.type = Common::EVENT_RBUTTONUP;
            }




This way the Left trigger may be used with the stylus to do the right clic on the F200 (I'd like to have the default action on clic).

Other than that, right now I'm trying to compile the gp2x version (on windows, this may take me some time xD) but if I'm able I'd like to help.

Cheers and thank you for your hard work.

PS: After rereading the full topic (it wasn't long) about the F200 screen problem, hey guys have you tried to calibrate the screen? You must clic on the (middle) of the boxes and it works. I had the same problem at first.
 Reply with quote  
Post Tue Apr 08, 2008 12:39 am 
 View user's profile Send private message
DJWillis
ScummVM Porter


Joined: 26 Oct 2005
Posts: 174
 

Hi EGA,

Thanks for the patch, I have almost the same change in my current local tree so it is very much on the right lines. There is a problem with your patch however. The right mouse button has meaning in a number of engines so defaulting to a right click is not really 100% desirable. I have held off making this change until I have a F200 to test things on.

I also have a change to match a feature request for AGI games in my local tree that I want testing and a few other fixes so expect a new build soon. I am having some issues getting a good build out of SVN at the moment so I can't post up a test build right away and don't want to check-in the code just yet.

Any help is appreciated, no question about that. With any luck I should have a working F200 to test on in the near future (I have picked up a broken one cheaply to fix). What toolchain are you using to build on Windows, you may find a Windows cross-compile is a bit of a pain Wink. If you want to ensure you have F200 support you need to be fairly selective about the versions of supporting libs you use. You may also find profiling a pain with a Windows toolchain due to nuances in GCCs path generation.

John

 Reply with quote  
Post Tue Apr 08, 2008 7:07 am 
 View user's profile Send private message
EGA



Joined: 08 Apr 2008
Posts: 3
 

Hi DJWillis,

No problem, any help you need just ask (as I've told before I'll try my best), indeed I do have a F200 so if you want me to test something just PM me and I'll give you my email.

BTW I know that it's going to be a pain to cross-compile on Windows as just compiling on Windows is a real pain Laughing. I was unable to do it with the VC6 version, unable using the DevCPP so I finally decided to go through MinGW which should be better to cross-compile it anyway.

Unlucky my main computer is broken so I can only compile on Windows.

--> Edit to avoid flooding:

I've been thinking, I don't know which problems you may find with my patch (after reading your post), but as you need to press the Left Trigger I can't understand what problems may arise... Although you've done the rest of the port so I'll trust you Smile

 Reply with quote  
Post Tue Apr 08, 2008 9:18 am 
 View user's profile Send private message
DJWillis
ScummVM Porter


Joined: 26 Oct 2005
Posts: 174
 

Hi EGA,

quote:
Originally posted by EGA
Hi DJWillis,

No problem, any help you need just ask (as I've told before I'll try my best), indeed I do have a F200 so if you want me to test something just PM me and I'll give you my email.

BTW I know that it's going to be a pain to cross-compile on Windows as just compiling on Windows is a real pain Laughing. I was unable to do it with the VC6 version, unable using the DevCPP so I finally decided to go through MinGW which should be better to cross-compile it anyway.

Unlucky my main computer is broken so I can only compile on Windows.



Sounds like a pain, as a rule if you can get the latest CygWin based Open2x toolchain and libpack going your in business (but compiling with a CygWin hosted GCC is slow).

You could also try a VMWare Player image of say Ubuntu and pop the Open2x toolchain on that. It’s been ages since I got a ScummVM build out of DevKitGP2X.

quote:
Originally posted by EGA

I've been thinking, I don't know which problems you may find with my patch (after reading your post), but as you need to press the Left Trigger I can't understand what problems may arise... Although you've done the rest of the port so I'll trust you Smile


You would break USB mouse click support without the L trigger held on the console and your generating right clicks on tap without it. This is not a good thing with engines that assign meaning to the right click Wink.

The solution I have in mind is very similar however:-

Firstly we check to see if the mouse is an F200 touchscreen, if not it falls back to a USB mouse. I am fixing that in SDL to work correctly. That detection really needs to be dynamic with maybe a fallback to some config settings so people can turn off the touchscreen support if they want a regular USB mouse.

The easy solution here may just be to assume the user wants to use a regular USB mouse if they have a mouse connected to an F200. USB mouse and TV out support are very popular with some GP2X users so I am told. I also get a lot of requests for USB keyboard support but that is another issue.

Once we know we have an F200 TS and not a mouse we can then decide how we map movement. As we have 4 free buttons on the F200 (the DPAD, assuming you do not want to use it for movement) I had considered just making the stylus generate movement and use the DPAD as a modifier for clicks (Left and Stylus = Left Click etc.). That needs some playing with to see how fluid it may be. The other option is to use a button as a cycle modifier (none, left click, right click, none).

All of that could also be turned off with a setting in the ScummVM config that would just default to setting up ScummVM as it would be on an F100 with no touchscreen (it would also allow us to cleanly see F200 mods as they would be wrapped in the check). A custom options page for the GP2X port (using the ScummVM GUI, like the DS) is on my TODO anyway and check boxes such as “Enable Touchscreen” could live on that option page.

Anyway, it seems we are all thinking on the same lines. Any feedback would be great.

I have held off on finishing this off but as I now have a cheap F200 on its way to me (broken but I hope to have enough spare bits to fix it) it should be easy enough to test.

John
 Reply with quote  
Post Wed Apr 09, 2008 1:53 pm 
 View user's profile Send private message
EGA



Joined: 08 Apr 2008
Posts: 3
 

Hi again John,

I know it's going to be a pain+slow to cross-compile the source, although I just want to do some testing+help you anyway I can, so it doesn't matter and it's worth the effort.
By the way this computers aren't powerful enough for me to use a virtual machine of any short. If I have the time and the will I will repair my main and then I will be able to use an installed linux on it (through virtual machine).

Back in the topic, I bassed the patch on the source on SVN where the GP2X_BUTTON_STATE_L variable only changes depending on the L trigger so you shouldn't... (EGA starts re-reading the answer from DJWillis and starts re-thinking about it) ... Forget everything I've said, I think that I've understanded what you are telling me. I'm going to ask to confirm: if you clic the L trigger the TS is disabled? OMG, WTF! xD

Sorry about that, anyway even if it should have worked (which now I know that it wouldn't) it was short of fast-patch until a really good patch was done.

Thanks for the lesson Very Happy

Alberto

PS: I still want to help you anyway I can.

--> Edit:

PPS: Thank you very much for your explanation (on the next post).


Last edited by EGA on Thu Apr 10, 2008 9:33 am; edited 1 time in total

 Reply with quote  
Post Wed Apr 09, 2008 4:57 pm 
 View user's profile Send private message
DJWillis
ScummVM Porter


Joined: 26 Oct 2005
Posts: 174
 

Hiya,

No, L trigger does not turn the touchscreen off or anything like that but your assuming that the SDL_MOUSEBUTTON* et. all is only tied to the touchscreen. That is simply not the case.

The GP2X supports USB devices via the cradle/BoB. One of the most common things people plug in is a USB mouse. I do not want to break that, hence my comments about it needing to be wrapped and considered before code is committed. The basic idea is fine. I just do not want to mess up existing users for the sake of the F200. I want all GP2X's to run ScummVM well Very Happy.

John

 Reply with quote  
Post Wed Apr 09, 2008 6:47 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge