Author Topic: psp touch screen  (Read 5199 times)

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
psp touch screen
« on: August 05, 2008, 11:04:53 PM »
ok well i pm'd jube 1000 and asked him for the src here is his video
http://www.youtube.com/watch?v=5SUpHTbLFHU
ive been looking more at c++ but i think i want to learn c it seems like more devs use it ive been thinking instead of reprograming the entire psp cant we just make a eboot that replicates the original xmb (im sure gr8prwfl will be able to awser this lol) if you dont get what i mean i will try to explain better
« Last Edit: August 05, 2008, 11:11:26 PM by socomhacker239 »

Offline rceckspurt13

  • Acid Modder
  • *
  • Posts: 637
  • Post quality +2/-0
  • Gender: Male
Re: psp touch screen
« Reply #1 on: August 05, 2008, 11:39:48 PM »
I think that would work but it would be sort of silly wouldent it? Only having one game or program that you can use with the touch screen and have it be useless everywhere else.
Any Questions? Please Contact Me: rceckspurt13@gmail.com

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #2 on: August 06, 2008, 12:38:53 PM »
ok what i meant was making an eboot to replicate the whole psp not just the xmb but the whole thing even the internet an games
i was wonderin how can we hook it to the psp before we even get started on the software?

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #3 on: August 06, 2008, 03:21:42 PM »
From what I understand or has been said about this mod, is that the touch screen is
tied into something like a pic processor. The pic processor converts the x y
co ordinates into a serial code. The serial code is sent to the PSP through the
serial headphone port. Internal software then takes the serial code and converts
it so the PSP can use it.

The eboot you are talking about is a program that runs on top of the operating
system of the PSP the stock OS or CFW.

If a program is not nicely written to use the system calls to read the buttons, switches
and joystick inputs, then there is NOTHING you can do to make that program use
your new hardware. Even rewriting the entire CFW from scratch will not gain you
anything as the program is reading from the hardware port directly.

Some of the early PSP programs did this, but they were not compatible with
the PSP 2000 as the hardware changed.

Newer programs behave themselves and make system calls to read the PSP
hardware. But an eboot is not the operating system, it sits on top of the operating
system and runs. Your program to make other programs work will have to
modifying  the CFW.

Your program could HOOK into the operating system and add functionality to it.

An example of that would be something like CXMB 3.2 for the PSP. It changes
the entire way the PSP uses themes. But every time  Sony releases new firmware
for the PSP your program will have to change and you will have to maintain
a version level repository.

What you are talking about is replacing the entire operating system for the PSP.
How do you feel like a task along the lines of writing Windows 98 from scratch on
your own ?

We decrypt the PSP operating system to add our functions. There are things
that are going on inside the LSI chips on the motherboard we only take educated
guesses at. There is no way Sony is going to give us that information, it is a trade
secret. Thats what keeps other people from building a PSP and competing in
the market with Sony.

I would love to see other people work on this. But you can never think that
you will do a mod like this and have it work on every single program the PSP
runs. Many people have looked and said that to do this mod only for the games
or programs that are in the homebrew market, are not enough to justify
the amount of work it will require.

If you want to do this to create something on your own, as a learning experience
please do so. You just have to understand the limitations before you begin.


Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #4 on: August 06, 2008, 04:32:20 PM »
ok um.... thanks gr8pwrfl for that info an yea i do realize the work that i have to put in im not going to do this by myself i welcome all people who want to help right now im learning c an looking at tings from youtube to diffrent forums
BUT WAIT what does is this supposed to mean im confused "Even rewriting the entire CFW from scratch will not gain you
anything as the program is reading from the hardware port directly."

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #5 on: August 06, 2008, 06:10:28 PM »
What I meant by that is that if a program is not well behaved the programmer
that wrote it will read from the hardware directly. They will not use the C
library functions to return the value of the button.

So if you rewrite the CFW to allow yourself to map the touchscreen in place
of certain buttons, these type of programs will just ignore your touch screen
input anyway.

The only way for that type of program to work, would be to replace the button
entirely with a hardware mod that tied to your touch screen translator.



Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #6 on: August 06, 2008, 10:26:58 PM »
oh ok

Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #7 on: August 06, 2008, 11:47:07 PM »
ok so ur saying we just need to rewrite the cfw but to read component differently to recognize the touch screen...

wat if we look into a touch screen we can use and maybe work off that such as lets say um the ipod touch screen something close enough that will fit in the psp perfectly and we can work on the pinouts and then move on to the programing of the psp recognizing it...

yea i looked up bout touch screen and see ur point on the x and y coordinates
http://www.pacificdisplay.com/touch_screens.htm
« Last Edit: August 06, 2008, 11:56:17 PM by Blazinkaos »

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #8 on: August 07, 2008, 12:57:28 AM »
Ok,

 I found some software that will remap the joystick as well as the buttons. So if we did a conversion
mapping of the touchscreen resistance values to the resistance values of the joystick.

We could map the touchscreen in Software to the joystick.

We would feed the joystick into a pic processor. It would convert the positions on the screen
to hex values. The hex values would be sent into the PSP through the headphone serial port
The remapping software would take the hex value look it up in a table and remap the value
to the internal joystick.

Would the touchscreen be that useful in a game that was setup for the joystick ????


Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #9 on: August 07, 2008, 01:25:36 AM »
Man how much did u read to kno this i been looking and that but finding stuff bout the touch and how it works and so.
But yea i think i got wat ur saying bout the internal joystick. Like are u trying to say like the analog works like x y coordinates so that how this would some how relate and work with the screen.

In a game huh idk well lets see like would be like having DS right but its mm idk. But in a game if ur online of a game would help if here was a keyboard that could be used in the touch screen to write to members online

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline gx4702

  • Motor Mouth
  • *
  • Posts: 84
  • Post quality +1/-0
Re: psp touch screen
« Reply #10 on: August 07, 2008, 08:08:02 AM »
lol touch screen would be kewlz but think of all that fingerprints on ur screen *shivers*

Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #11 on: August 07, 2008, 10:40:32 AM »
yea but we may have a plastic piece over it real thin and you can also ummm wats the work well place a coating over the screen that is free of finger prints and yea

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #12 on: August 11, 2008, 03:13:13 PM »
so yea ive been gone for a couple of days (playing rock band lol) learning c is pretty hard  i finally found the src to the program that the guy used to get an idea does anyone know where to learn the libraries for the psp in c

here is the src for anyone who wants to help or try
#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;
}

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #13 on: August 11, 2008, 03:43:06 PM »
Yes you need to install the PSP toolchain. That will give you all the libraries you need.

So what you going to do with it ????

You going to write your own game to use it ?



Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #14 on: August 11, 2008, 03:54:49 PM »
um... im still thinking maybe like rewriting the entire xmb when i get really good like microsoft good i will rewrite the entire os
oh an thank you for the toolchan tip

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #15 on: August 11, 2008, 04:16:21 PM »
OK, just play with making small programs first then work your way up


Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #16 on: August 11, 2008, 04:47:36 PM »
yea thats what i was doin um.... anyone have any ideas or thoughts?

Offline gr8npwrfl

  • Acid Modder
  • *
  • Posts: 582
  • Post quality +0/-0
  • Gender: Male
  • Ignorance is not fatal it can be cured
Re: psp touch screen
« Reply #17 on: August 11, 2008, 09:01:17 PM »
Just build a simple menu system first then you can take your menu system and control some of the
hardware in the psp


Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #18 on: August 11, 2008, 11:05:02 PM »
Wow nice socomhacker239 u know how to rewrite that stuff thats dope..
This project is gaining progress...

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #19 on: August 12, 2008, 01:15:53 AM »
Yicks man almost as much as learning the whole process to hack to much coding and reprograming  :confused:.
The dev i havent heard anything bout that.

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #20 on: August 12, 2008, 01:53:13 PM »
mate, just a thought, don't expect to be able to program PRX's or plug ins like this after learning C for less than a day, im not trying to put you down, just a reality check. Ive been learning it for a little while now, i have 10 books on it, and i have spent several days reading about it non stop, and i can fully understand what is going on in his code, but it would take me many many days , and maybe weeks to write something like that from scratch.

also on a sidenote, in his qj forums topic, it is funny how he says that he will give free units to dev, and then suddenly everyone is claiming to be a dev, when they only know lua - not even C! or probably have no prior programming experience and just want a free psp..
i have been learning c for about a month now it will take many years to fully understand c. i didnt start the project just because he said he was handing out free psps trust me i dont need anymore i started it because gr8npwfl had made a thread talking about the subject an i said why not give it a try.
« Last Edit: August 12, 2008, 01:55:00 PM by socomhacker239 »

Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #21 on: August 12, 2008, 06:43:11 PM »
Yea i feel ya socomhacker239..
Well just do what u gotta do. U get this figure out awesome man you make big bucks plus support...

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

Offline socomhacker239

  • E = MC²
  • *
  • Posts: 327
  • Post quality +0/-0
  • Gender: Male
Re: psp touch screen
« Reply #22 on: August 12, 2008, 07:20:02 PM »
once again thanks Blazinkaos for the support lol well im not in it for the money although that would be nice lol dax gr8nprfl and many other devs an moders do it for free why should i charge people

Offline Blazinkaos

  • Technology Revolution
  • Art & Theme Team
  • E = MC² Mad Scientist
  • *
  • Posts: 2259
  • Post quality +12/-0
  • Gender: Male
  • Time Passes Will You
    • ROOKIE BUILDERS DISCORD
Re: psp touch screen
« Reply #23 on: August 12, 2008, 07:32:08 PM »
well not like ask ppl if they want done for money such as you can show it...but if they cant do and they come to u and ask if u can do it im sure u should charge them some money for ur progress and time for doing it for them like ppl pay me to do stuff but i dnt charge a lot u kno very lil...if that makes any sense ..

*Thanks Modders/Friends:Ghost_Death, gr8npwrfl, Blizzrad, Kenshinffx.
*Thanks 802Chives for the Art position!

 

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