User talk:Titousensei

From wiki.gp2x.org

I just received my unit from gp32z (USA). Everything looks very promising. I'm testing it with a Canon 32MB SD card.

There's been a lot of buzz with the issues of the first batch. Here's what I can report:

  • The screen is quite bright. I can see a slight flikering due to the diagonal lines reported. It's barely noticeable.
  • Booting time is actually OK. Turning the unit on shows a white screen for 2 seconds, then the GP2X logo on a black background shows up for 8 seconds. The green background loading screen is then displayed for 15 seconds before the orange menu screen is displayed. This is a (consistent) total loading time of 25, but with the black, then green displays, it doesn't feel that long.
  • The screen is not scratched (I removed both protections), but boy, does it attract fingerprints.
  • The on-board speakers are mono but it's very hard to tell because they are so tiny. The sound quality of this kind of speakers is pretty poor anyway. I will not return my unit for this.
  • The headphone sound quality is very good, and the volume is very good too. I listen at half the maximum volume. It's possible to turn the screen on and off by pressing the select button. The right and left channels are reversed as reported by other users.
  • I played ogg audio files and xvid-encoded AVI video files. I confirm that mpg is not recogninzed as a video file. Pdf and html are not recognized either. At this point, I'm not sure what ebook format can be read.
Only .txt (Plain-text) files can be read for now. Feel free to remove this message as you see fit.
Iignotus 01:08, 27 November 2005 (GMT)
  • The buttons and joystick are fairly responsive, no problem there.
  • I did not test the battery life. The DC input connector is tiny, tiny. I need to find a power adapter like that.
Radio Shack's 3V adapter, part number 273-1754 with adapter tip 'A', part number 273-1704 works. Make sure the center is '-'.
Mike3k 01:28, 1 December 2005 (GMT)
  • I did not test USB connection.
  • I could not run any of the downloadable games :-( I must miss something. Update: since I'm using a 32MB card, it's formatted in FAT; a bigger card can be formatted in FAT32, that could solve the problem.
All cards 2GB and under are formatted as FAT16 by default. There is no simply 'FAT' filesystem, but different types of it. Any card can be formatted to FAT32. Both FS types work with the GP2X by default. You need FAT32 to install the firmware. You do NOT need FAT32 to do anything else. You will need to install the SDL libraries in order to get the games working. Feel free to remove this message as you see fit.
Iignotus 01:06, 27 November 2005 (GMT)

--Titousensei 00:25, 26 November 2005 (GMT)

Contents

Day 2: Trying to do something useful.

  • I bought a 128MB Kodak card and formatted it to FAT32. BTW, FAT and FAT32 are windows designations for partition types. FAT16 and FAT12 are linux designations. Windows shows "FAT" for both FAT16 and FAT12 partitions. Anyway, I tried to upgrade the firmware following the rules posted somewhere else (only .img in the card, at the root) but I couldn't get the upgrade to work. When I turn the machine on, it displays the firmware upgrade screen for about 10 seconds, then changes to the green loading screen and freezes there forever. After several minutes it was still frozen and I turned the machine off. The firmware file was not delete from the card. I tried several times and it always does the same. I gave up for now until someone posts a better recipe.
  • Trying to install the SDL libraries, I experimented with the .gpu files, since I just found they are shell scripts. For some reason, only the patch for the EBookViewer and MusicPlayer (patch20051117) was working. Everything I tried was failing, even just removing one line of the patch gpu was failing badly: frozen on black screen, must reboot. I finally figured out that editing under windows was the cause of my problems: CRLFs make the GP2X very unhappy. Editing the scripts in Unix mode (LF only) solved it and I was able to install the libraries and run a few scripts of mine (more below).
  • Running and debugging scripts blind is not pleasant. The difference between success and failure is very subtle: if it returns in less than a second, it failed; if it took a couple of seconds, it worked. No success screen, and certainly no error message when it fails. Hard to debug in those conditions. I'll try to code something to make script debugging easier.

Here's an empty .gpu script:

 #!/bin/sh
 
 # useful code goes here
 
 cd /usr/gp2x
 ./gp2xmenu

The fact that the script needs to go back to gp2xmenu tells me that it's executed as exec without a fork. A script without this would freeze the machine. But this also means an alternative menu can be tested this way.

  • I was able to run an ls -Rl of the entire filesystem, copy /etc and /var/log/dmesg on the SD, and run a few commands (printenv, date, this sort of things). I learned some interesting things:
    • the root filesystem / is mounted as rw, which means copying to the fileystem actually patches the OS. COnvenient but dangerous, especially since everything runs as root. Hopefully the critical files are protected, but I'm not sure jffs2 supports chattr commands.
    • /etc/profile runs rm /mnt/sd/gp2xboot.img and rm /mnt/sd/gp2xkernel.img and remounts the SD card in vfat, then executes cd /usr/gp2x; ./gp2xmenu
    • the default shell is bash. Not sure what version.
    • The menu and applications run in runlevel 3.
    • Reported memory is 32MB; free memory is 20MB.
    • ttyS0, ttyS1 and ttyS2 are activated on boot. It might be possible to use one as console output with an EXT cable or debugging, and possibly telnet.
    • NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit). Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit": "Bootloader", "Param", "Kernel", "Filesystem", "Extend". Whatever that means
    • NetWinder Floating Point Emulator V0.97 (double precision)
  • I found a few bugs in the menu (deleting files does not refresh the list, this kind of things). Nothing major, but I'll be glad to have the source of gp2xmenu to fix a few things myself. I don't think it's GPL, though.
  • EBookViewer is pretty useless in the current state: it only recognizes txt files. Explorer is can only be used to delete files, which is the function on the default button! (and the confirmation is the same button! argh!)

--Titousensei 20:28, 27 November 2005 (GMT)

For an unknown reason, the SD card is now mounted read-only on my machine: the same scripts that worked yesterday to copy part of the filesystem to the SD card are now failing. I added the following line to one of the scripts and it worked.

 mount -t vfat -o iocharset=utf8 -o remount -o rw /dev/mmcsd/disc0/part1 /mnt/sd

I wasted most of my evening figuring out what was going on :-(

--Titousensei 08:53, 28 November 2005 (GMT)

Day 3: successful firmware upgrade to 1.0.1

From Windows XP with a built-in card reader machine. See Talk:Firmware_Upgrade for more info.

--Titousensei 05:09, 29 November 2005 (GMT)

Do you fancy e-mailing me an SD card image as you suggested in Talk:Firmware Upgrade? I'm at michael@<my-user-name>.co.uk Araneidae 19:47, 29 November 2005 (GMT)

Day 4: compiling

After many attempts to use devkitGP2X, I finally found this post from Guyfawkes. I was able to compile and run HelloPixel from Writing_an_SDL_Hello_World, but I could not load a BMP like the next example, because bmp = SDL_LoadBMP("test.bmp"); is null (even with the full path).

As other reported, using SDL_image give linking error, so I'm stuck with BMP for now.

It compiles in static and I think I'm missing a few files to compile against dynamic libraries (which should allow SDL_image).

Exiting the program is a bit tricky because the GP2X doesn't reload the menu, so I'm debugging with this script, called sdltest.gpe (borrowed the idea from sopwith_camel):

#!/bin/sh
mount -t vfat -o iocharset=utf8,remount,rw,sync /dev/mmcsd/disc0/part1 /mnt/sd
./sdltest > out.txt 2>&1

# return to normal
cd /usr/gp2x
./gp2xmenu

where sdltest is my executable. Renaming the executable to .gpe works too, but it does not reload the menu (I'm using the e-book reader to read out.txt, clever ;-). Oh, I guess I could exit by exec("/usr/gp2x/gp2xmenu"), but I would loose my only debbugging output. There's not a lot of source examples out there right now, I wish everybody was releasing their source in GPL ;-)

Day 5: Displaying a BMP

I finally figured out what was wrong with my bmp image: it was saves with RLE compression, it should not. It's showing properly now. I won't be experimenting tonight to get dynamic linking, I think I'll try the new games released today, and perhaps try to make my first useful app with rlyeh's minimal library v0.7.

At least I know what I need to buy/build next form my GP2x: a serial cable to get the console debug information. Printing the output ont the SD in a file is just not funny.

--Titousensei 05:49, 1 December 2005 (GMT)

Personal tools