Search found 24 matches

by kuroneko
Thu Feb 12, 2009 3:57 pm
Forum: PSP Development
Topic: Loading textures causes crash.
Replies: 11
Views: 4362

I just noticed something, you use glTexImage2D(GL_TEXTURE_2D, 0, 3, 64, 64, 0, GL_BGR, GL_UNSIGNED_BYTE, t0->pixels); Internal format 3 and external being GL_BGR. They have to be the same. When you changed it to GL_RGB it worked because 3 is mapped to GL_RGB internally. So assuming GL_BGR is actuall...
by kuroneko
Thu Feb 12, 2009 10:03 am
Forum: PSP Development
Topic: Problems with minPsp and eclipse
Replies: 10
Views: 4523

The error I get is that there is no seperator at line 5. 'moon' is the name of the project and 'lunar' is the 'c' file. Anyone have any idea what this seperator is? A separator is e.g. a TAB character (don't know if make accepts SPACES, never tried), i.e. commands associated with a target can't sta...
by kuroneko
Thu Feb 12, 2009 9:58 am
Forum: PSP Development
Topic: Loading textures causes crash.
Replies: 11
Views: 4362

longjoel wrote:I've narrowed it down, it is infact glTexImage that is causing the issue. It only seems to want to work with GL_RGB, trying to use GL_BGR causes it to crash.
Does glTexImage actually accept GL_BGR, i.e. what is the status reported from glGetError() before and after this call?
by kuroneko
Wed Feb 11, 2009 9:03 pm
Forum: PSP Development
Topic: Loading textures causes crash.
Replies: 11
Views: 4362

In your "buildTextures" function , you're creating 2 textures( 1 with size of 3 elements , and another one with 2), but only 1(Just 1 out of 5) actually gets binded. Its simple , you have no idea what you're doing ... Could it be that it wasn't the complete source? There is a comment sayi...
by kuroneko
Wed Feb 11, 2009 9:54 am
Forum: PSP Development
Topic: Problems with minPsp and eclipse
Replies: 10
Views: 4523

Re: Problems with minPsp and eclipse

... secondly when I click on run it fails with 'binary not found'. Having thought about this, there is no point Run(ning) the PSP binary on your PC. This error - IIRC - results from launch shortcut creation which tries to find a type of executable suitable for your eclipse platform (e.g. win32 -> *...
by kuroneko
Tue Feb 10, 2009 10:58 pm
Forum: PSP Development
Topic: Problems with minPsp and eclipse
Replies: 10
Views: 4523

Re: Problems with minPsp and eclipse

sicga wrote:... first off it highlighs a lot of the include headers and states that it is 'unresolved inclusion' and secondly when I click on run it fails with 'binary not found'.
Eclipse expects the toolchain binaries to be "in the path". Are they available from the command line?
by kuroneko
Sat Nov 15, 2008 1:22 pm
Forum: PSP Development
Topic: svn checkout svn://svn.ps2dev.org/psp/trunk/pspirkeyb
Replies: 8
Views: 4870

Re: svn checkout svn://svn.ps2dev.org/psp/trunk/pspirkeyb

svn: In directory 'pspirkeyb/libpspirkeyb/config' svn: Can't copy 'pspirkeyb/libpspirkeyb/config/.svn/tmp/pspirkeyb.ini.tmp.tmp': No such file or directory FWIW, I get a similar error which is most likely due to there being two files with the same name but different case (which doesn't work too wel...
by kuroneko
Thu Mar 27, 2008 10:14 am
Forum: PSP Development
Topic: [SOLVED]Alphasort File listed
Replies: 5
Views: 1804

Re: Alphasort File listed

Has anyone a solution? Just sorting by name isn't going to get you anywhere as readdir() does not guarantee any order for the items returned. When you sort you'll have to consider type (dir/file) first, then name. IIRC, stat() requires an absolute file name so once you read the entry with readdir()...
by kuroneko
Tue Mar 25, 2008 11:19 am
Forum: PSP Development
Topic: A few questions about pspGL.
Replies: 6
Views: 2992

The Tjalian wrote:Hnmm, it's weird that glSolidCube and glWireCube isn't suppored, while glVertef3f is.
That looks more like a typo. IIRC, OpenGL simply doesn't have the first two functions you mention, GLUT has (known as glutSolidCube and glutWireCube).

http://www.opengl.org/resources/libraries/glut/spec3
by kuroneko
Tue Oct 30, 2007 1:29 pm
Forum: PSP Development
Topic: main.c:1: error: stray ´\357´ in program ... ??
Replies: 1
Views: 1241

Re: main.c:1: error: stray ´\357´ in program ... ??

Looks like a character encoding signature to me (0xEF, 0xBB, 0xBF). Just load your file into a very basic editor (preferably one which only knows ASCII), remove the garbage at the beginning of the file (main.c:1:) and try again. Then make sure your editor of choice doesn't save in some funny encodin...
by kuroneko
Fri Jan 12, 2007 1:58 pm
Forum: PSP Development
Topic: Using sscanf() to extract strings
Replies: 4
Views: 1728

Re: Using sscanf() to extract strings

Would this help? I assume line[linesUsed].data is the actual string and temp a char* (ASCII string, no multibyte characters). temp = line[linesUsed].data; if (temp[0]) /* string not empty */ { temp[strlen(temp)-1&#9...
by kuroneko
Thu Dec 14, 2006 7:06 pm
Forum: PSP Development
Topic: Free Space on Flash0?
Replies: 8
Views: 5403

... I have a routine that counts the size of every file on flash0, and it accurate compared to a flash0 filedump size in Windows. If I subtract the value from the 24Mb, there's a figure left that's apparently considerably higher than the actual available space. If a file has non-zero size you have ...
by kuroneko
Thu Mar 30, 2006 4:04 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

That's the thing, correction does not appear to be included! ... That's really what happens. I thought I was reading it wrong at first and that the xor would be with the offending bit, but it really is always the last byte! Looks like some unfinished code then ;) I mean they're going through all th...
by kuroneko
Thu Mar 30, 2006 12:27 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

... although if a write fails and it's just a single bit error, one can ignore it and let the ECC reclaim the block when it's later being read ... IIRC the NAND status only tells you whether the write failed or not. There is no way telling how many bits - in case of an error - failed to be reprogra...
by kuroneko
Tue Mar 07, 2006 4:05 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

The ECC for all 1s is actually all 0s, so it does give an ECC error if the block is completely empty. This surely depends on your algorithm. All the ones I've seen are written so that all 0s or all 1s result in 0xFFFFFF (512bytes), i.e. the actual ECC is returned as (ECC xor -1). Which means it is ...
by kuroneko
Tue Mar 07, 2006 8:45 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

From your description it would seem that those 100 blocks you say you can't read are simply empty blocks (all 1s) and so the hardware ECC calculations fail and the read returns an error (even though nothing is wrong.) That's odd. What if the user data is all 1s (as opposed to simply empty)? Perfect...
by kuroneko
Sun Feb 26, 2006 11:19 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

Where did you get this information? What do you mean by "_usually_ the first page of each block" ? Sometimes Sony puts this 16-byte metadata you describe at the first page of each block, and sometimes they don't? That doesnt seem to make much sense. What is the exact format of this 16 byt...
by kuroneko
Sat Feb 25, 2006 4:58 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

Sony must be implementing this themselves, right? But where is that translation data stored? It's stored in the extra data section of each page, i.e. you have 512 bytes payload and 16 bytes which tell the block driver about ECC, logical sector number and all the other stuff etc. What happens is, th...
by kuroneko
Thu Feb 23, 2006 9:03 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

Wow, thanks Nem! Much more clearly than my mess of spare ECC code :) This is useful information for people experimenting with external hardware for flashing! The only annoying bit is that it might be a bit on the slow side. I did some speed comparisons in the past and it turned out that a table+loo...
by kuroneko
Sun Jan 08, 2006 11:10 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

ryoko_no_usagi wrote:I have confirmed that what I called block_stat is indeed the ECC of the spare area from bytes 4 to 12, with the final MSB nibble always set.
4-12 are 9 bytes in my book ;) I assume you exclude the block status byte?
by kuroneko
Sat Jan 07, 2006 7:02 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

typedef struct { char ecc[3]; /* calculated per 512 byte page */ char unknown0; /* always zero when block is not empty */ char block_fmt; /* 0xff = IPL, 0x00 = FAT */ char block_invalid; /* if not 0xff -> invalid block */ short block_addr; /* logical block number, mostly 0x...
by kuroneko
Thu Dec 22, 2005 9:21 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

P.s. I might be able to get another 1MB of data using the ScenandReadExtraOnly function, however I doubt it since the extra should be inclueded in the nand dump I got (I dumped every single blocks and every single pages from the nand chip I could access with Scenand. If your image dump is only 32MB...
by kuroneko
Wed Dec 21, 2005 1:14 pm
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

So do you think one could use a custom way (since there is partition tables) of reading the FAT12 partitions using a SmartMedia interface? Don't see why not. What I think you'd have to do is adjust whatever driver you use to be able to ignore a specified range of physical blocks (i.e. non-FS areas)...
by kuroneko
Tue Dec 20, 2005 10:17 am
Forum: PSP Development
Topic: PSP Flash Chip Facts: The Good, the Bad and the Ugly
Replies: 194
Views: 170840

By the way is the flash fat16 and the IPL fat12? The IPL doesn't seem to be part of any kind of FS (blocks appear at fixed physical locations). Everything else (above 1M phys) is FAT12 (I found 4 boot sectors with matching FATs and a number of partition tables). Block mapping is done SmartMedia sty...