F200: Official Test Builds

Subforum for discussion and help with ScummVM's GP2X, GP2X Wiz and Caanoo ports

Moderator: ScummVM Team

ProfesorSepulveda
Posts: 1
Joined: Mon Mar 31, 2008 6:30 pm

Post by ProfesorSepulveda » Mon Mar 31, 2008 6:42 pm

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:

EGA
Posts: 3
Joined: Tue Apr 08, 2008 12:31 am

Post by EGA » Tue Apr 08, 2008 12:39 am

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: Select all

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

Code: Select all

		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: Select all

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

Code: Select all

		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.

User avatar
DJWillis
ScummVM Porter
Posts: 174
Joined: Wed Oct 26, 2005 8:55 pm

Post by DJWillis » Tue Apr 08, 2008 7:07 am

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

EGA
Posts: 3
Joined: Tue Apr 08, 2008 12:31 am

Post by EGA » Tue Apr 08, 2008 9:18 am

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 :lol:. 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 :)

User avatar
DJWillis
ScummVM Porter
Posts: 174
Joined: Wed Oct 26, 2005 8:55 pm

Post by DJWillis » Wed Apr 09, 2008 1:53 pm

Hi EGA,
EGA wrote: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 :lol:. 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.
EGA wrote: 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 :)
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

EGA
Posts: 3
Joined: Tue Apr 08, 2008 12:31 am

Post by EGA » Wed Apr 09, 2008 4:57 pm

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 :D

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.

User avatar
DJWillis
ScummVM Porter
Posts: 174
Joined: Wed Oct 26, 2005 8:55 pm

Post by DJWillis » Wed Apr 09, 2008 6:47 pm

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 :D.

John

Post Reply