| View previous topic :: View next topic |
| Author |
Message |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Sat Aug 02, 2008 6:47 pm Post subject: |
|
|
| What about the status of this project ? |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Mon Aug 04, 2008 7:28 am Post subject: |
|
|
hlide..........
will be posting the example driver code i used and general data format in next couple of days, will then assemble some "dev" units and distribute them to interested software developers, will take another week, then still on target to offer consumer units in about 2.7 months. At the moment sourcing EXACTLY the right size touchscreens is proving a problem, but will sort it ! So suppose its going well with all the usual unexpected delays !! |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Mon Aug 04, 2008 6:25 pm Post subject: |
|
|
| i was thinking that i could be of help providing a library of mine performing character recognition via a small ANN: it's small in size, has a small memory footprint, fast, robust....think about it |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Wed Aug 06, 2008 2:26 am Post subject: |
|
|
| jean....... wow that sounds cool!!!, you still running a phat? , the dev units for phats are well delayed, initially was'nt going to support phats at all but public presseure forced re-think !!! |
|
| Back to top |
|
 |
Wraggster
Joined: 26 Aug 2005 Posts: 121
|
Posted: Wed Aug 06, 2008 4:25 am Post subject: |
|
|
hey jube do you have a blog/website where you can post updates on this project, would be good to hear the progress on this. _________________ Webmaster of http://www.dcemu.co.uk
DCEMU The Worlds Only Homebrew & Gaming Network of Sites. |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Wed Aug 06, 2008 5:18 am Post subject: |
|
|
yeah...i was thinking to pass to a slim before ta88v2 hell arrives here in europe, but 60 euros of difference for 32Mb of ram and a tv-out are an exageration (i mean...selling my phat and re-buying a slim will cost me approx 60 euros)
What do you exactly mean by "dev-units"? |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Wed Aug 06, 2008 5:42 am Post subject: |
|
|
| jean wrote: | yeah...i was thinking to pass to a slim before ta88v2 hell arrives here in europe, but 60 euros of difference for 32Mb of ram and a tv-out are an exageration (i mean...selling my phat and re-buying a slim will cost me approx 60 euros)
What do you exactly mean by "dev-units"? |
ta88v2 are fine, it is v3 the real problem :p |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Wed Aug 06, 2008 3:04 pm Post subject: |
|
|
jean............ im making and distributing ( free to interested commited developers ) about 10 dev units, these will be functionally identical to the final production units except very "rough" in terms of the hardware ( stick on screen, trailling wires etc ). Its going to cost me, but im hoping that by the time of the launch there will be a number of hombrew apps and games supporting the screen. Im going to be taking PM,s from interested developers today or tomorrow sometime and hopefully shipping the dev units to people by end of week, thats why asked if you were running slim, cos phat dev units not ready !
No blog im affraid, have zero idea how to go about one !!, who hosts that kind of thing ? |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed Aug 06, 2008 3:08 pm Post subject: |
|
|
Nice, bu tnow I can only see the thumbnail. _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Wed Aug 06, 2008 10:23 pm Post subject: |
|
|
Good progress :) Phat units not yet ready? _________________ Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Last edited by KickinAezz on Wed Aug 06, 2008 10:27 pm; edited 1 time in total |
|
| Back to top |
|
 |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Wed Aug 06, 2008 10:26 pm Post subject: |
|
|
| jube, youre going to make it a commercial product though it will only work on Homebrew/CFW? I mean, is it legally all right? |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Wed Aug 06, 2008 11:51 pm Post subject: |
|
|
| kralyk wrote: | | jube, youre going to make it a commercial product though it will only work on Homebrew/CFW? I mean, is it legally all right? |
Well just think about a Datel Tool (Red) Battery : is it illegal ? |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Thu Aug 07, 2008 1:48 am Post subject: |
|
|
| no not worried about the legality as hlide pointed out its damn sight less contraversial than something like pandora. Yes V1 works only through the sio hence is only a cfw product that is going to limit the customer base big time but since the main motivation is not to make money, but to get the screen out there supported by devs, as long as i break even not to worrid :) |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Sun Aug 10, 2008 8:10 am Post subject: |
|
|
hi guys, her is another 2 vids showing app have done, will post the code in a bit, BUT DONT FLAME ME !!!!!, am just starting on psp code and the code is shit!!!!! not exactly text-book c!!! ( coming from a microcontroller background where even function calls are a no-no when they eat up your stack!! )
http://ru.youtube.com/watch?v=eXNpe7NWaZw
http://ru.youtube.com/watch?v=vzesLXiYHN0 |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sun Aug 10, 2008 9:30 am Post subject: |
|
|
Great progress!
Be sure to post 2 versions of the code
1: The code you consider shit. (i.e. the as-is version)
2: Cleaned up.
Just curious of programming style of a programmer for microcontrollers. :) _________________ Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming. |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Sun Aug 10, 2008 10:59 am Post subject: |
|
|
thats the source to the osk that video'ed, posting it to let developers know how the serial data stream looks like, its all very simple, and a little derivative but hey just starting!
this bit uses jeans sio prx but its just as good using the sdk call ( at 14400 obviously ! )
| Code: | #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;
} |
Last edited by jube on Sun Aug 10, 2008 3:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Sun Aug 10, 2008 11:43 am Post subject: |
|
|
Please, Jube, always use tag code "[code/]" to put a code source.
example :
| Code: |
int main(char **argv, int argc)
{
if (argc < 2)
{
...
}
return 0;
}
|
|
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Sun Aug 10, 2008 3:43 pm Post subject: |
|
|
| hlide.......... edited it, thanks, looks much better :) |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Sun Aug 10, 2008 7:05 pm Post subject: |
|
|
why OSLib??? no big deal having a whole graph library if you only have to do a pair of blits per cycle...moreover, the last time i checked OSLib, it was closed-source.
Some (very)small guidelines/advices:
in byte2word, no need for an in-memoy temp variable, let the compiler hold midvalues as registers that's way faster if you use it frequently.
so: | Code: |
int byte2word ( char h, char l)
{
return (h<<8)|l;
} |
but you could even put an "inline" before declaration or (better) do it as a macro (through "define" directive)
in "char getTSChar (int yaxis,int xaxis) ", you don't need to perform all the checks once you find the pressed key, so in the big "if" list, you can write a lot of "else", or (better) you can simply return instead of setting a temp:
| Code: |
if ((yaxis > 60) && (yaxis < 100))
{
if ((xaxis > 0) && (xaxis < 43))
return 0x31;
if ((xaxis > 43) && (xaxis < 86))
return 0x32;
if ((xaxis > 86) && (xaxis < 131))
return 0x33;
.
.
.
}
|
turn all divide for constant into multiply for constant...
| Code: | | xf = ((byte2word ( readhigh,readlow )) - 45 ) / 1.77708 ; |
will become
| Code: | | xf = ((byte2word ( readhigh,readlow )) - 45 ) * 0,563 ; |
...don't know if compiler holds such an optimization all alone, but usually a multiply is 4x faster than division.
Oh, and put a sleep somewhere in that poll thread main-loop.
You are one of the few among new "devs" that really deserve help in my opinion. And i want to see your project working well, so when you need help, feel free to ask. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Sun Aug 10, 2008 7:20 pm Post subject: |
|
|
| jean wrote: | turn all divide for constant into multiply for constant...
| Code: | | xf = ((byte2word ( readhigh,readlow )) - 45 ) / 1.77708 ; |
will become
| Code: | | xf = ((byte2word ( readhigh,readlow )) - 45 ) * 0,563 ; |
...don't know if compiler holds such an optimization all alone, but usually a multiply is 4x faster than division. |
i'm not totally sure but -ffast-math option should allow compiler to do such such optimization. |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Mon Aug 11, 2008 2:12 am Post subject: |
|
|
| jube, great job! This looks very promising. You have added 1 of the most important features that Sony missed out. I think many of us will like to know how will the final product fit into the PSP Slim. Does the mod fit insides our PSP, or stick out like the one you've in the youtube video? If it fits inside the PSP, does your product come with a replacement faceplate? |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Mon Aug 11, 2008 6:30 am Post subject: |
|
|
jean........ hlide...thank you VERY much for your kind words and advice, its good stuff!!! will maker those changes when i get out of the hardware world!
phantom...unit will come in 2 flavours, a clip-on add-on, and an internal modification, the internal mod will include a custom molded top casing which accomidates the extra 1.7 to 0.9 mm touch screen. The clip-on should come in at a reasonable $60-80 ( break-even price ), but the internal mod will be horrably expensive!!
You cant see much cos of the camera, but the second videos are of the internal mod ( dev unit ) BTW. video is with my dev screen which by now is knackered! so response not that good!! |
|
| Back to top |
|
 |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Mon Aug 11, 2008 6:56 am Post subject: |
|
|
great work jube!
(just to say, in future releasing some sort of lib for the touchscreen ad-on for others to integrate it into their homebrew would be nice, just saying, you probably plan to do it anyway dont you...)
btw. how much the you estimate the touch ad-on to cost? |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Mon Aug 11, 2008 12:39 pm Post subject: |
|
|
| jube, it's good to hear there will be 2 versions. I'm more interested in the internal mod, but this of course will depend on the final pricing. I understand making custom mold would be extremely expensive. You may even lose money if you don't sell a lot of units. To me, determine the pricing would be difficult. If the price is too high, you may not be able to sell many. If it's too low, you will need to sell a lot to even break even. Have you considered to sell you design or partner with other companies, such as neoflash or divineo? This could lower your risk. |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Mon Aug 11, 2008 12:42 pm Post subject: |
|
|
| kralyk wrote: |
btw. how much the you estimate the touch ad-on to cost? |
jube said the price would be around $60-$80. It's in the post above yours. |
|
| Back to top |
|
 |
mypspdev
Joined: 11 Jul 2007 Posts: 178
|
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Tue Aug 26, 2008 8:55 am Post subject: |
|
|
| yep all of the above sound good, for a phat that is :) |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Tue Aug 26, 2008 8:46 pm Post subject: |
|
|
| Quote: | To set up a Sparkfun 4wire resistive touchscreen controller transmitting via SIO RS232 to PSP:
.... |
PSP sio cannot provide million amperes, so i racomend using the fewest (already power-saving) components possible. The only way to go for phat and slim in my perspective (as the pic16f883 teached us in openKeyboard's story) is to use a single pic of the new family going 2v, capable of internal timing (no external quartz), chosen between those providing at least a 2 ways ADC. Single component, small (SMD version is VERY smal), no additional compoments but a capacitor, ease of mount and use, single firmware that can customize anything, ICSP. Wonderful. There is definitely no sense in using a max**** to adapt voltage level between two low-voltage devices. If i correctly understand, the meaning of jube's project is to spread the software support, too; remember this when you do your customized version of this project, if you do.
If someone is in need of hints about a firmware, feel free to ask, i'm a low-level man atm ;) |
|
| Back to top |
|
 |
jube
Joined: 23 Oct 2007 Posts: 115
|
Posted: Wed Aug 27, 2008 2:28 am Post subject: |
|
|
| jean has about summed it all up, have very little to add, except the sparkfun screen is too big, by 1.2 mm, catches the dpads on both sides :) |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Wed Aug 27, 2008 3:01 am Post subject: |
|
|
| uhm...sorry if you already told me and i don't remember, but.... what touch-film are you using? can you provide a link? |
|
| Back to top |
|
 |
|