Heads up: GP2X file-name info

Previous topic - Next topic

Ian Price

Just thought others might like to know that filenames containing over 8 characters do not appear to be supported in GLBasic games on the GP2X.

I had two .PNG files (copyright.png and highlight2.png) in my game that when tested, did not appear on GP2X - they work fine on pc.  I don't know if this is just .PNG files, graphic files or any file in particular.

I don't know if this has been mentioned before, or if it's a bug/feature with GP2X or GLB, but reducing the number of characters in the file-name resolved the issue.

:)
I came. I saw. I played.

AndyH

Thanks Ian .... most of my filenames are more than eight characters so I'll get that sorted.

bigsofty

Something I didn't realise, ty! :)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

BasicMe

Hey iprice, I'm using filenames longer than 8.3, and they're loading fine for me on the GP2X.  Actual examples that I'm using are:

  backgroundmenu.png
  MainPiece_0000.png
  menuarrow1.png

Could there be something else going on, like maybe it's the path length that's too long?

Ian Price

I don't know what's going on, but I do know that reducing the length of the filename fixed problems for me. If it was the path length then all of my files would fail, as they are all in the same folder (media).

What GP2X are you using - maybe it's a newer version or updated over the F100 that I have access to (2.11)
I came. I saw. I played.

Kitty Hello

Should not be a problem. Can you send a small code piece that fails?

Moru

Did you type .PNG or .png? Linux sees a difference, windows does not :-)

Ian Price

I discovered that my name did not appear on the titlescreen (copyright.png), but my musician friend's did, despite being in exactly the same format. I then discovered another .PNG that wouldn't show (on GP2X) and realised that both had a filename longer than 8 characters. Therefore,  I renamed them both (and suitable code) and both displayed fine.

All my media is created and defined in exactly the same way and all share the same path; I don't know why some should load and others don't, but my investigation as outlined above led me to conclude that name length was the problem and the solution resulted from that.

 I was just sharing my solution. All images loaded fine on pc, but those as, mentioned, did not appear on GP2X F100. Simply renaming them fixed this.

Gernot - you have my code and all media already.

Would people have preferred that I didn't mention this at all? o_0
I came. I saw. I played.

Kitty Hello

It's OK. Can it connect to uppercase problems, maybe?

Moru

Ofcourse we want to know about it, I was just offering alternate reasons. I haven't had problems with long filenames and as I come from the ATARI world I love long filenames after being restricted so long :-)

I guess I have to do some tests again, was a while since I tested any code on the GP2X.

Ian Price

No it's not UPPER/lower-case related as I have images in both formats (actually all my media is lower case with uppercase ".PNG", but the splash screen is lowercase with a lowercase ".png") and they all work fine.

Unless it's a strange anomoly or an update problem, I'm sticking with filenames with 8 or less chars in, just to be on the safe side. :)
I came. I saw. I played.

Kitty Hello

Say, can you run your program over telnet? The console should give hints about that problem. (The F200 has no telnet, sorry).
http://wiki.gp2x.org/wiki/Tcp/ip_over_usb

BasicMe

Quote from: ipriceI was just sharing my solution. All images loaded fine on pc, but those as, mentioned, did not appear on GP2X F100. Simply renaming them fixed this.
...
Would people have preferred that I didn't mention this at all? o_0
Apologies, I wasn't trying to offend.  I just wanted to mention that it wasn't an issue on my GP2X (which is also an F100).  I figured that by narrowing down what the problem actually was, it would help all of us GP2X'ers.  After all, it may hit me in the future too so I'd rather solve it now!  :)

PeeJay

I don't have a GP2X, so I'm shooting blind, but could I suggest perhaps it might be a particular character it doesn't like? (space being the obvious contender)
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Ian Price

No offence taken. I apologise if my reply implied that I had been offended :)

I don;t think it's anything to do with non-standard characters, or spaces, as I have none. The filenames were -

highlight2.PNG
copyright2.PNG

As an interesting aside, I reversed the process on two .PNG images - "splash.PNG" and "blox.PNG"

I changed them to "splashscreen.PNG" and "titleblox.PNG"

splashscreen.PNG showed properly, so that killed my theory

However... titleblox.PNG did not show.

I'm now beginning to wonder if there's more to this - perhaps it's something to do with the way it was saved. Maybe the number of bits was different (after all, the splash screen was the only image that wasn't created by me). Perhaps a combination of colourdepth and filelength.

Or maybe I just right-royally fecked up somewhere along the line (highly likely, and hopefully true).

Hmmm.....
I came. I saw. I played.