PDA

Ver la versión completa : Woopsi2x Abandoned



DCEmu.co.uk
31/01/2008, 00:45
Tinkering with and researching the GP2x’s touch screen reveals some answers to the questions posed last time around.

First off, my GP2x isn’t duff. There’s another guy here who has discovered the same problem I have - the only readily-available example of using the touch screen on the GP2x jitters like crazy.

I’ve tried swapping batteries, which often causes problems with the console, to no effect.

Testing the read() function reveals that the touchscreen will produce new values every time it is interrogated. There’s no need to wait for a VBL before it will produce new values. This means that my initial jitter-removal routine based on mean averages was actually doing something. I’ve increased the sample count from 5 to 40, which has improved things a lot, but it’s still nowhere near perfect.

I realised that I’ve got no idea what the “open(”dev/touchscreen/wm97xx”)” command does. Does it access the raw hardware, or does it just open a driver? Not having done any Linux kernel hacking I couldn’t say. I’ve looked through the driver sourcecode and it appears to have some jitter correction built-in. It definitely compensates for some of the quirks of the hardware. If the open() command works with the driver, there’s something seriously wrong if I’m still getting wildly different values back each time I poll the screen. If I’m working with the hardware, I’ll have to re-implement the driver for the 2x in order to get any decent values from the it.

Some digging around in the code for the 2x’s port of ScummVM suggests that the author built a time delay into its touch screen routines to cater for the jitter. At least that way you’re guaranteed to get steady values for the duration of the delay. Works fine for Scumm, as it doesn’t really require fine control. No good for Woopsi - any jitter is immediately obvious. One clever idea the author had was to use the SDL_WarpMouse() command to move SDL’s cursor to match the GP2x’s stylus position. This triggers an SDL_MOUSEMOVE event, which can then be interpreted in a standard SDL event parser block without any custom code. Neat.

The official SDK has no documentation. Nothing. There doesn’t seem to be any way to get the sourcecode, either (which is rapidly becoming my favourite way to understand a program - don’t tell me how it works, just show me the code).

Coupled with the fact that the GP2x has been abandoned by the majority of coders in favour of the forthcoming “Pandora” system (which looks like a weird cross between a 48K Spectrum, a dual-shock PS1 pad, a DS and an N-Gage), I think creating a GP2x port would be a painful waste of time. Shame, because the new d-pad does actually make it quite a good system.

Here’s the touchscreen class I came up with (credit to the author of the original “touchscreen_sample.zip” file, who neglected to include his details in the zip):

GP2xTouchScreen

I’ve switched it from using Woopsi-style “u8″, “u16″, etc types to using SDL-style “uint8_t” types. I haven’t compiled it since then, but it should be OK. Consider the archive public domain.

EDIT:

Increasing the number of samples to 100 further increases the accuracy, but has a noticeable impact on speed. It doesn’t solve the problem of the touch screen occasionally producing totally incorrect values. Having noticed that the amount of pressure needed to trigger a response isn’t even vaguely uniform across the surface of the touch screen, I’m growing more and more certain that GamePark skimped on the touch screen and used components that fell off the back of a lorry.

http://ant.simianzombie.com/blog/?p=271


Más información... (http://www.dcemu.co.uk/vbulletin/showthread.php?t=88378&goto=newpost)

esosiqueno
31/01/2008, 18:07
Vaya putada, el chaval ha perdido el ánimo y ha decidido no continuar con el proyecto, entre otras cosas, dado que no ve viable crear un proyecto ahora mismo para gp2x porque casi todos los desarrolladores han parado a la espera de Pandora. Esperemos que por esta puerta que se cierra se abra otra, o un par.

Propeller
31/01/2008, 18:19
¿Casi todos los desarrolladores han parado para esperar a la Pandora? Me cago en la leche, ahora a ver qué hago por las noches si dejo de programar para esperar a la Pandora.

¿Valores raros e imprecisiones en las lecturas de la táctil? Ya, ya, que si, que si.

Este chico lo que quiere son mimitos, no una Pandora. Eso, y gritos de "pofavó, pofavó".

Propeller

BUHOnero
31/01/2008, 19:36
¿Casi todos los desarrolladores han parado para esperar a la Pandora? Me cago en la leche, ahora a ver qué hago por las noches si dejo de programar para esperar a la Pandora.

¿Valores raros e imprecisiones en las lecturas de la táctil? Ya, ya, que si, que si.

Este chico lo que quiere son mimitos, no una Pandora. Eso, y gritos de "pofavó, pofavó".

Propeller
a mi me ha dado la misma impresión...aunque no sé de qué iba su proyecto, ni si tanto tenemos que lamentar que no lo tire palante

X-Code
31/01/2008, 19:43
¿Casi todos los desarrolladores han parado para esperar a la Pandora? Me cago en la leche, ahora a ver qué hago por las noches si dejo de programar para esperar a la Pandora.

¿Valores raros e imprecisiones en las lecturas de la táctil? Ya, ya, que si, que si.

Este chico lo que quiere son mimitos, no una Pandora. Eso, y gritos de "pofavó, pofavó".

Propeller

jejejee, amigo Propeller, no tienes coração xDD


Estoy de acuerdo, el tipo se ha desanimado y quiere mimitos... En cuanto a lo de que la gente haya detenido su vida para esperar a Pandora... Eso simplemente no es cierto, no hay Pandora, y aunque salga, va a tardar bastante en despegar bien si tenemos en cuenta los numeros.

Yo desde luego espero que tarden algo mas en sacar a Pandora y en pulir el diseño y el hardware porque si no, podría acabar siendo un autentico y caro fracaso. :brindis:

chipan
01/02/2008, 01:21
Yo desde luego espero que tarden algo mas en sacar a Pandora y en pulir el diseño y el hardware porque si no, podría acabar siendo un autentico y caro fracaso. :brindis:
Pulir? eso no se arregla con una lija; para que la pandora funcione hace falta cincel, mazo y un bloque de marmol completamente nuevo si me apuras.

X-Code
01/02/2008, 01:32
El diseño en si no me parece malo, pero si que creo que se debe de someter a un estudio mas... honesto (http://gp32spain.myminicity.es/env):)

Fiu
01/02/2008, 10:02
Pues menos mal que nadie hace nada para la GP2X...

WinterN
01/02/2008, 12:02
Pues menos mal que nadie hace nada para la GP2X...

...por eso no hay noticias acumuladas que postear con una semana de retraso, incluso para GP32...

AOJ
01/02/2008, 13:57
Joer pinta lo de leer valores de la táctil como una auténtica odesea! Tan chungo es?

Lo de decir que "me espero a Pandora, porqué todo el mundo lo hace", me parece una excusa de lo más cutre.

esosiqueno
01/02/2008, 14:28
En honor a la verdad, según dice en los comentarios de su blog va a seguir con el desarrollo en Gp2x y parece que el problema del tema de la táctil lo está volviendo a mirar.

Zizti
01/02/2008, 15:45
usease que le han dado mimitos y se ha vuelto a poner.... venga mandemosle nuestros mimos.... porcierto que es lo que hace.. porque en english ni papa :D