Author Topic: Proof Of Concept: PSP Slim Touchscreen  (Read 12900 times)

Offline JoblessPunk

  • King of the Wii-tards
  • *
  • Posts: 146
  • Post quality +0/-0
Proof Of Concept: PSP Slim Touchscreen
« on: August 10, 2008, 02:11:42 PM »
Proof Of Concept: PSP Slim Touchscreen


A certain jube808 has launched a quixotic quest to add a myriad of features to the PSP that he believes should've been there from the start, including beefed up battery life, a better control pad, and touchscreen support. Think what you will of his aims, he certainly seems to have some hardware chops, as he's got a touchscreen up and running on the handheld. So far he's just got a proof of concept keyboard, which works with a finger or a stylus, but the hope is to provide full touchscreen support for homebrew gaming.


Code: [Select]
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspsdk.h>
#include <pspctrl.h>
#include <stdio.h>
#include <string.h>
#include <oslib/oslib.h>

#include "../../commons/callbacks.h"
#include "../../commons/calibrate.h"

PSP_MODULE_INFO("TS_SAMPLE", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_KB(12*1024);



char tschar = 0 ;
int sioReadChar();
int xread = 0;
int yread = 0;
int rread = 0;
int backspace = 0;
char screentext[1];
char redraw = 0;
char newchar = 0;




POINT touched,touchedscaled,touchedfinal;
POINT cal[3];
POINT tcal[3];
MATRIX calmatrix;

void sioInit(int,int);
void sioPutString(const char *, int);


int initOSLib(){
oslInit(0);
oslInitGfx(OSL_PF_8888, 1);
oslInitAudio();
oslSetQuitOnLoadFailure(1);
oslSetKeyAutorepeatInit(40);
oslSetKeyAutorepeatInterval(10);
return 0;
}



int byte2word ( int bytehigh, int bytelow )
{
int tally = 0;

tally = bytehigh ;
tally = tally << 8 ;
tally = tally | bytelow ;
return tally ;
}


char getTSChar (int yaxis,int xaxis)
{
char retchar = 0;
if ((yaxis > 60) && (yaxis < 100))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x31;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x32;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x33;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x34;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x35;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x36;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x37;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x38;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x39;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x30;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3F;
return(retchar);
}

if ((yaxis > 100) && (yaxis < 141))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 51;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x57;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x45;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x52;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x54;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x59;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x55;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x49;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x4f;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x50;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3f;
return(retchar);
}

if ((yaxis > 141) && (yaxis < 180))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x41;
if ((xaxis > 43) && (xaxis < 86))
retchar = 53;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x44;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x46;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x47;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x48;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x4A;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x4B;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x4c;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x3A;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3b;
return(retchar);
}

if ((yaxis > 180) && (yaxis < 220))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x5A;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x58;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x43;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x56;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x42;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x4e;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x4d;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x2c;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x2e;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x40;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3f;
return(retchar);
}

if ((yaxis > 100) && (yaxis < 141))
{
if ((xaxis > 0) && (xaxis < 43))
backspace = 1;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x20;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x0d;
return(retchar);
}
return(0);
}

int pollThread (SceSize args ,void * argp)
{
int ch = -1;
int readhigh = 0;
int readlow = 0;
float xf,yf ;
char oldchar = 0;
int keyrepeat = 0;


while(running())
{




ch = sioReadChar();
if(ch == 255)
{

ch = sioReadChar();
if(ch == 255)

{
readhigh = sioReadChar();
readlow = sioReadChar();
xf = ((byte2word ( readhigh,readlow )) - 45 ) / 1.77708 ;
xread = (int)xf;
if (xread > 480)
xread = 480;
if (xread < 0)
xread = 0;
xread = 480 - xread;


readhigh = sioReadChar();
readlow = sioReadChar();
yf = ((byte2word ( readhigh,readlow )) - 107 ) / 2.59191 ;
yread = (int)yf;
if (yread > 272)
yread = 272;
if (yread < 0)
yread = 0;
yread = 272 - yread;

readhigh = sioReadChar();
readlow = sioReadChar();
rread = byte2word ( readhigh,readlow ) ;

oldchar = newchar;
newchar = getTSChar(yread,xread);


if ((!(oldchar == newchar)) || (keyrepeat > 12) )
{
screentext[0] = newchar;
keyrepeat = 0;
redraw = 1;

}
else
{
keyrepeat++;
}


}
}
}
}



void createPollThread(){
SceUID thid;
thid = sceKernelCreateThread("sio polling thread", pollThread, 20, 16384, 0, NULL);
sceKernelStartThread(thid, 0, NULL);
}

int main(void)
{
int baud=9600;
initOSLib();
oslIntraFontInit(INTRAFONT_CACHE_MED);
pspDebugScreenInit();
//Load image:
OSL_IMAGE *bkg = oslLoadImageFilePNG("tskbd.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
pspDebugScreenPrintf("immage loaded\n");

//Load font:
OSL_FONT *pgfFont = oslLoadFontFile("flash0:/font/ltn0.pgf");
oslIntraFontSetStyle(pgfFont, 1.0, RGBA(255,255,255,255), RGBA(0,0,0,0), INTRAFONT_ALIGN_CENTER);
oslSetFont(pgfFont);
pspDebugScreenPrintf("font set\n");
oslStartDrawing();
oslDrawImageXY(bkg, 0, 0);
oslEndDrawing();

setupCallbacks(); // [home] handler

sceDisplayWaitVblankStart();
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);

// load siodriver
SceUID mod = pspSdkLoadStartModule("sioDriver.prx", PSP_MEMORY_PARTITION_KERNEL);
if (mod < 0)
{
sceKernelDelayThread(3000000);
sceKernelExitGame();
}
sceKernelDelayThread(1000000);

sioInit(baud,0);
sceKernelDelayThread(1000000);

createPollThread();


while(running())
{

if (redraw)
{

oslStartDrawing();
oslDrawImageXY(bkg, 0, 0);
oslDrawString(100, 25, screentext);
oslEndDrawing();
redraw = 0;
pspDebugScreenPrintf(screentext);
}

}

sceKernelExitGame();
return 0;
}

Sources:
http://www.engadget.com/2008/08/09/man-inexplicably-brings-touchscreen-to-the-psp/
http://pspzproject.dcemu.co.uk/pspy-wip-132583.html
http://www.dcemu.co.uk/vbulletin/showthread.php?t=132638
« Last Edit: August 10, 2008, 04:28:07 PM by JoblessPunk »

Offline folklord36

  • Research & Development
  • Acid Modder
  • *
  • Posts: 810
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #1 on: August 10, 2008, 02:31:14 PM »
this is great too bad no release yet and i hope its real also the idiots comenting on the source are retards.

Offline JoblessPunk

  • King of the Wii-tards
  • *
  • Posts: 146
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #2 on: August 10, 2008, 02:36:36 PM »
this is great too bad no release yet and i hope its real also the idiots comenting on the source are retards.

Here's another sorce that will be more useful:
http://pspzproject.dcemu.co.uk/pspy-wip-132583.html

"...am few hours away from posting the code, which will do in the discussion section so can get help, which most proberbly will need !!"

Offline folklord36

  • Research & Development
  • Acid Modder
  • *
  • Posts: 810
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #3 on: August 10, 2008, 02:50:15 PM »
Hmmm I still have faith and dont wana call shinangins yet but he posted yesterday hes hours away from posting code so if I see no release tonight or tomorrow I will begin to lose faith

Offline JoblessPunk

  • King of the Wii-tards
  • *
  • Posts: 146
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #4 on: August 10, 2008, 04:22:21 PM »
Hmmm I still have faith and dont wana call shinangins yet but he posted yesterday hes hours away from posting code so if I see no release tonight or tomorrow I will begin to lose faith

... you need to search more.
He did post the code as he said he would and when he said he would.

Code: [Select]
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspsdk.h>
#include <pspctrl.h>
#include <stdio.h>
#include <string.h>
#include <oslib/oslib.h>

#include "../../commons/callbacks.h"
#include "../../commons/calibrate.h"

PSP_MODULE_INFO("TS_SAMPLE", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_KB(12*1024);



char tschar = 0 ;
int sioReadChar();
int xread = 0;
int yread = 0;
int rread = 0;
int backspace = 0;
char screentext[1];
char redraw = 0;
char newchar = 0;




POINT touched,touchedscaled,touchedfinal;
POINT cal[3];
POINT tcal[3];
MATRIX calmatrix;

void sioInit(int,int);
void sioPutString(const char *, int);


int initOSLib(){
oslInit(0);
oslInitGfx(OSL_PF_8888, 1);
oslInitAudio();
oslSetQuitOnLoadFailure(1);
oslSetKeyAutorepeatInit(40);
oslSetKeyAutorepeatInterval(10);
return 0;
}



int byte2word ( int bytehigh, int bytelow )
{
int tally = 0;

tally = bytehigh ;
tally = tally << 8 ;
tally = tally | bytelow ;
return tally ;
}


char getTSChar (int yaxis,int xaxis)
{
char retchar = 0;
if ((yaxis > 60) && (yaxis < 100))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x31;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x32;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x33;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x34;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x35;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x36;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x37;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x38;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x39;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x30;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3F;
return(retchar);
}

if ((yaxis > 100) && (yaxis < 141))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 51;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x57;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x45;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x52;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x54;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x59;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x55;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x49;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x4f;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x50;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3f;
return(retchar);
}

if ((yaxis > 141) && (yaxis < 180))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x41;
if ((xaxis > 43) && (xaxis < 86))
retchar = 53;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x44;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x46;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x47;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x48;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x4A;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x4B;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x4c;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x3A;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3b;
return(retchar);
}

if ((yaxis > 180) && (yaxis < 220))
{
if ((xaxis > 0) && (xaxis < 43))
retchar = 0x5A;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x58;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x43;
if ((xaxis > 131) && (xaxis < 175))
retchar = 0x56;
if ((xaxis > 175) && (xaxis < 218))
retchar = 0x42;
if ((xaxis > 218) && (xaxis < 262))
retchar = 0x4e;
if ((xaxis > 262) && (xaxis < 306))
retchar = 0x4d;
if ((xaxis > 306) && (xaxis < 350))
retchar = 0x2c;
if ((xaxis > 350) && (xaxis < 393))
retchar = 0x2e;
if ((xaxis > 393) && (xaxis < 435))
retchar = 0x40;
if ((xaxis > 435) && (xaxis <480))
retchar = 0x3f;
return(retchar);
}

if ((yaxis > 100) && (yaxis < 141))
{
if ((xaxis > 0) && (xaxis < 43))
backspace = 1;
if ((xaxis > 43) && (xaxis < 86))
retchar = 0x20;
if ((xaxis > 86) && (xaxis < 131))
retchar = 0x0d;
return(retchar);
}
return(0);
}

int pollThread (SceSize args ,void * argp)
{
int ch = -1;
int readhigh = 0;
int readlow = 0;
float xf,yf ;
char oldchar = 0;
int keyrepeat = 0;


while(running())
{




ch = sioReadChar();
if(ch == 255)
{

ch = sioReadChar();
if(ch == 255)

{
readhigh = sioReadChar();
readlow = sioReadChar();
xf = ((byte2word ( readhigh,readlow )) - 45 ) / 1.77708 ;
xread = (int)xf;
if (xread > 480)
xread = 480;
if (xread < 0)
xread = 0;
xread = 480 - xread;


readhigh = sioReadChar();
readlow = sioReadChar();
yf = ((byte2word ( readhigh,readlow )) - 107 ) / 2.59191 ;
yread = (int)yf;
if (yread > 272)
yread = 272;
if (yread < 0)
yread = 0;
yread = 272 - yread;

readhigh = sioReadChar();
readlow = sioReadChar();
rread = byte2word ( readhigh,readlow ) ;

oldchar = newchar;
newchar = getTSChar(yread,xread);


if ((!(oldchar == newchar)) || (keyrepeat > 12) )
{
screentext[0] = newchar;
keyrepeat = 0;
redraw = 1;

}
else
{
keyrepeat++;
}


}
}
}
}



void createPollThread(){
SceUID thid;
thid = sceKernelCreateThread("sio polling thread", pollThread, 20, 16384, 0, NULL);
sceKernelStartThread(thid, 0, NULL);
}

int main(void)
{
int baud=9600;
initOSLib();
oslIntraFontInit(INTRAFONT_CACHE_MED);
pspDebugScreenInit();
//Load image:
OSL_IMAGE *bkg = oslLoadImageFilePNG("tskbd.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
pspDebugScreenPrintf("immage loaded\n");

//Load font:
OSL_FONT *pgfFont = oslLoadFontFile("flash0:/font/ltn0.pgf");
oslIntraFontSetStyle(pgfFont, 1.0, RGBA(255,255,255,255), RGBA(0,0,0,0), INTRAFONT_ALIGN_CENTER);
oslSetFont(pgfFont);
pspDebugScreenPrintf("font set\n");
oslStartDrawing();
oslDrawImageXY(bkg, 0, 0);
oslEndDrawing();

setupCallbacks(); // [home] handler

sceDisplayWaitVblankStart();
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);

// load siodriver
SceUID mod = pspSdkLoadStartModule("sioDriver.prx", PSP_MEMORY_PARTITION_KERNEL);
if (mod < 0)
{
sceKernelDelayThread(3000000);
sceKernelExitGame();
}
sceKernelDelayThread(1000000);

sioInit(baud,0);
sceKernelDelayThread(1000000);

createPollThread();


while(running())
{

if (redraw)
{

oslStartDrawing();
oslDrawImageXY(bkg, 0, 0);
oslDrawString(100, 25, screentext);
oslEndDrawing();
redraw = 0;
pspDebugScreenPrintf(screentext);
}

}

sceKernelExitGame();
return 0;
}

Source:
http://www.dcemu.co.uk/vbulletin/showthread.php?t=132638

Offline folklord36

  • Research & Development
  • Acid Modder
  • *
  • Posts: 810
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #5 on: August 10, 2008, 05:38:02 PM »
Dude will someone with an account on dcemu.com post and tell him to come over here they dont even know what to do with them selves with info like that! well this just seems to be the code for the osk but still no suppourt for the actual hardware now i may be wrong but i think that all this is is a diff osk then the original

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #6 on: August 11, 2008, 06:24:40 AM »
hi all, well decided to pop in and answer questions and ask few of my own !

The code is as used in the video, its not exactly ground breaking code but hey it works !

I need a company/place to mold me a batch (100 or so ) of custom designed top psp slim cases, that is custom shape, so will need a custom/modified injection molding die (aluminium) and the experience to run off a small batch.

Offline folklord36

  • Research & Development
  • Acid Modder
  • *
  • Posts: 810
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #7 on: August 11, 2008, 08:49:20 AM »
HEY wow good to see you here man i sent you a message on youtube the other day lol. Well can yo specify exactly what kind of touch screen you got i will order one and see what can be removed on it to maybe make it fit in an oem case is the white plastic on the side nessacary? I assume it interfaces with the seiral port? or usb? if some of the white plastic can be removed i can see it fitting into the slim maybe just raise the fp a lil bit with an ettened trim and raise up the button contacts should be verry easy. I can make quite a bit of them for you after i figure out how to make one but ordering custom molded fp will be very expensive unless you have conections or know someone with the tools but im confident i can get one in there just send me all the info you possibly can i havent seen much about the hardware you are using so its too hard to tell now.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #8 on: August 11, 2008, 12:27:21 PM »
hmm... good idea about using a custom trim to raise the front casing, but am going for a really profesional finish for the internal version of the ts, it needs to look identical to a slim but with the slight ( 1.2 to 0.9 mm ) raise for the ts, hence custom case only way to go!, i have some experience with injection molding, i know a custom molding die ( aluminium not steel ) will caso approx $5-10,000 , but if someone has a die already it would be much cheaper to copy and modify, know anyone?. Have seen some adverts for clear cases etc on the site , do you know anyone personally? Both the internal and external use the sio, check the website for code, that should give you good clue as to what i did on the firmware side.

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #9 on: August 11, 2008, 03:03:56 PM »
ive been looking for the src thanks

Offline psppunk

  • Who Farted ???
  • *
  • Posts: 205
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #10 on: August 11, 2008, 03:08:09 PM »
its so much easier to hook up to the analog port and write code for that
theres at least 1 prog i have thats already compatible

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #11 on: August 12, 2008, 01:19:26 AM »
analog port, you mean joystick interface or mic interface? be interested to see what code you have for that, willing to publish as i have ?

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #12 on: August 12, 2008, 04:08:42 AM »
really? and how would one go about that ?

Offline folklord36

  • Research & Development
  • Acid Modder
  • *
  • Posts: 810
  • Post quality +0/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #13 on: August 13, 2008, 09:20:46 AM »
well if im not mistaken both the analog stick and touchscreen are nothing but potentiometers so theoretically  you could solder the screen to the analog stick and program the psp to read the touch pad trough analog pad

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #14 on: August 13, 2008, 09:23:39 AM »
I thought someone tried that before and it's impossible.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #15 on: August 13, 2008, 10:30:52 AM »
solder straight on? , nope wont work, but you could get a single axis on that way, if your very lucky with the resistances! A ts and a joystick are very different devices though, what do you think would happen if a 3.5kv static pulse ( from your finger tip ) were to jump directly into the joystick interface ( prob straight into a a/d with no buffer )?

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #16 on: August 13, 2008, 11:03:01 AM »
Gotcha. I thought Cyber or someone attempted it through the analog stick and it wasn't possible. Oh well. Can't wait to see this get pushed further.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #17 on: August 13, 2008, 12:51:51 PM »
alien...... thats not directly soldering :) and if your talking pwm a voltage onto the joystick port, fair enough may work but your going to have to be VERY carefull about the nyquist( pwm frequency ) and the impedence of the joystick circuit + some other factors will let you discover if you ever do it !! Then you have X,Y but what about R? ( touch pressure ) how you going to input that? Then finally if you solve all the problems, you have a internal only mod, not exactly a clip-on device. Of corse advantage is that is a non CFW mod, disadvantage, you have lost your joystick, unless you apply complex buffering circuit.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #18 on: August 13, 2008, 05:21:05 PM »
rtouch is derived from exiting the x,y plates in another combination, it is not fed from a seperate line.

The direct soldering was in relation to the post by folklord, but he has uncovered an interesting idea, ie 1 axis could still be very usefull, and EXTREAMLY easy and cheap to implement as long as resistances are matched, or easy op-amp buffer is used, if one were clever even joystick could be retained

Offline ApheX

  • Club AM VIP
  • Millennium Poster
  • *
  • Posts: 1094
  • Post quality +1/-0
  • Gender: Male
  • PSP And PSP Slim Case/Hardware Modder
    • ApheX MoDs
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #19 on: August 14, 2008, 12:38:36 AM »
This is a great mod jube. unfortunatly i've never been able to fullt understand how you would create a mod like this but i can understand the amount of time you must have spend developing this method. Nice work! hopefully someone will be able to make some custom faceplates and get this mod rolled out to the masses! :)

Offline SYSTEM aka (Cyberpyrot)

  • Site Founder
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 4091
  • Post quality +3/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #20 on: August 14, 2008, 04:49:48 AM »
rtouch is derived from exiting the x,y plates in another combination, it is not fed from a seperate line.

The direct soldering was in relation to the post by folklord, but he has uncovered an interesting idea, ie 1 axis could still be very usefull, and EXTREAMLY easy and cheap to implement as long as resistances are matched, or easy op-amp buffer is used, if one were clever even joystick could be retained
an even easier method would be to use 2 chips a quad digital potentiometer. "dallas" makes easy ones then the wiper can be moved up and down with simple high low pulses so writing code would be a brease.. so sayith the cyberpyrot...

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #21 on: August 14, 2008, 08:19:48 AM »
ching! you win the jackpot, yep thats how to do it, but watch the dallas its just a slow d/a and its impedence matching properties are suspect, there are much better devices for this application, again though your going to be adding more components if you want to retain the stick, ie buffer.
Then again a PSOIC would give you a single chip solution, you may even find a FPGA lib for the system bits and make it out of a Xilinx FPGA, but thats a 2 chip solution, both the PSOIC and the FPGA would give you firmware upgradeability to.
None of this gives you "touch what you see", you still would be navigating with finger and selecting with button, and rtouch is still not available. In the final analisis not a DS beater, thats why PSPZ is as it is.

Offline SYSTEM aka (Cyberpyrot)

  • Site Founder
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 4091
  • Post quality +3/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #22 on: August 14, 2008, 01:07:06 PM »
ching! you win the jackpot, yep thats how to do it, but watch the dallas its just a slow d/a and its impedence matching properties are suspect, there are much better devices for this application, again though your going to be adding more components if you want to retain the stick, ie buffer.
Then again a PSOIC would give you a single chip solution, you may even find a FPGA lib for the system bits and make it out of a Xilinx FPGA, but thats a 2 chip solution, both the PSOIC and the FPGA would give you firmware upgradeability to.
None of this gives you "touch what you see", you still would be navigating with finger and selecting with button, and rtouch is still not available. In the final analisis not a DS beater, thats why PSPZ is as it is.

you can hot wire a double tap to the "A" button with a microcontroller..

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #23 on: August 14, 2008, 02:55:49 PM »
dude not easy in real life, if the micro is processing the double tap, you got no controll of paramiters ( tap-time, double-tap time, rtouch time etc etc etc ) they are fixed there is no 2 way comms between your micro and psp hence cant be changed for individual users, ie will work for man, wont work well for woman etc etc, thats exactly why that param is available on commercial ts/touch pad/mouse button. Finally nail in coffin, how you going to calibrate your ts? THat requires displaying 3 points on-screen and relaying info back to micro, which you cant do.

Offline SYSTEM aka (Cyberpyrot)

  • Site Founder
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 4091
  • Post quality +3/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #24 on: August 14, 2008, 04:09:50 PM »
dude not easy in real life, if the micro is processing the double tap, you got no controll of paramiters ( tap-time, double-tap time, rtouch time etc etc etc ) they are fixed there is no 2 way comms between your micro and psp hence cant be changed for individual users, ie will work for man, wont work well for woman etc etc, thats exactly why that param is available on commercial ts/touch pad/mouse button. Finally nail in coffin, how you going to calibrate your ts? THat requires displaying 3 points on-screen and relaying info back to micro, which you cant do.

I wrote a program for microcontroller - 360 controller where the dallas chips control the analog sticks

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #25 on: August 14, 2008, 10:27:43 PM »
fair enough, if you used the dallas with good results, am not going to argue :) ( does not mean to say will work in this circuit though ) i used same device to vary backlight on a qvga display and had mixed results, ended up switching to a ic2 part, so suppose for me it still has that stigma. V2 of PSPZ has abbility to take over analog stick function on standard psp, it does it in a different way.

Offline SYSTEM aka (Cyberpyrot)

  • Site Founder
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 4091
  • Post quality +3/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #26 on: August 15, 2008, 04:13:19 AM »
fair enough, if you used the dallas with good results, am not going to argue :) ( does not mean to say will work in this circuit though ) i used same device to vary backlight on a qvga display and had mixed results, ended up switching to a ic2 part, so suppose for me it still has that stigma. V2 of PSPZ has abbility to take over analog stick function on standard psp, it does it in a different way.
dont get me wrong I have had my issues with it eg( run away wiper) so ultamatly we whent with PWM...

Offline SYSTEM aka (Cyberpyrot)

  • Site Founder
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 4091
  • Post quality +3/-0
  • Gender: Male
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #27 on: August 15, 2008, 05:55:55 AM »
Will one of the Admins add jube to the R&D team I have some ideas and a diffrent aproach to discuss with him.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #28 on: August 15, 2008, 07:33:16 AM »
a lot of the newer micro's ( pic's and NXP ARM 7 series spring to mind) ship with multi-channel 12 bit d/a 's, should easier to use that, they are also buffered on chip. PWM is cool in a lot of applications, but the caps break down over time ( especially being swiched ) + EMC effects of PWM , NOT GOOD !!!! + considerable variation over temperature. NOT SAYING DONT DO IT, but d/a has none of those disadvantages.

Offline jube

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +0/-0
Re: Proof Of Concept: PSP Slim Touchscreen
« Reply #29 on: August 15, 2008, 07:36:12 AM »
sounds cool, what do we post on a private board?

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal