GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment: Experimental Sdhc Support For Gp2x - GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment

Jump to content

  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Experimental Sdhc Support For Gp2x a bit more tested stuff

#1 User is offline   notaz

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 1,250
  • Joined: 22-August 05
  • Location:Lithuania

Posted 08 March 2007 - 11:27 AM

Update: I've backported 4.0.0 SDHC code (was only copy-paste, really), you can download new patch here, and source here. The SDHC support in this update should be exactly the same as in GPH 4.0.0 firmware, so this update should have the same card compatibility as 4.0.0 firmware. This kernel also has read-ahead disabled, as it causes problems with software, which tends to stream data from SD card. Haven't noticed any bad effects because of this.

Short history of this patch: my previous patch was merged by DJWillis with his code, and went into Open2x. GPH took that code and merged it into their 4.0.0 firmware, after that I took it back and merged with 2.1.1, what resulted in a thing you can download above.

Updated readme:
About
-----

This is a modified GP2X firmware 2.1.1 kernel with SDHC SD card support
for F100 GP2Xs. It also has read-ahead disabled by default, which is
better for apps, which do data streaming from SD card.

The SDHC code used is exactly the same as in GPH 4.0.0 firmware, which is
my code with some enhancements by DJWillis (Open2x).

WARNING: this update involves flashing kernel area in your GP2X NAND.
While this should be reversible, because boot loader (the vital part)
should not get harmed, small chances of bricking exist.
Do not use this on GP2X versions other than F100, as it will cause some
things (like touchscreen) not to work.
I TAKE NO RESPONSIBILITY IN FLASHING YOUR GP2X. DO IT AT YOUR OWN RISK.

- notaz


Installing
----------

Format your SD card with FAT32 filesystem, then copy ONLY gp2xkernel.img
from this archive to the root (main) directory. The SD card used for
updating must NOT be SDHC, and it must be firmware update compatible.
See the page below for details:

http://wiki.gp2x.org/wiki/SD_card_compatibility

The procedure is similar as of firmware update. Turn off your GP2X, insert
the card, press START and SELECT and while holding them turn on your GP2x.
Then "firmware update" (or similar) screen should appear. When this finishes,
restart your GP2X, it should boot exactly as before, but start supporting
SDHC cards.


Uninstalling
------------

Download firmware upgrade files of firmware you were previously using. Take
only gp2xkernel.img from the firmware upgrade and copy it alone to your SD.
Then repeat the update procedure you have done before. Everything should go
back as it was before.


Old post below:

I recently bought a 4GB SD card and well it was SDHC. So I hacked up a quick support for SDHC. I know DJWillis was working on this, and probably achieved similar results, but I wanted to do it myself.

To test it out, you have to flash my custom kernel, because gph has built SD card support into kernel (instead of building it as a module). This involves some risks, but should be easily reversible.
The kernel is based on kernel from 2.1.1 firmware here.

Older, download here.
The source changes to this kernel are here.

#2 User is offline   notaz

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 1,250
  • Joined: 22-August 05
  • Location:Lithuania

Posted 08 March 2007 - 11:38 AM

I also patched ART103's bootloader, the source patch is here. This allows it to boot kernel from SDHC and other SD cards, which have larger block sizes (I have one such 2GB card, which was not working with ART103's bootloader). It boots ok if the only file in card is the kernel image, but if there are more files, it sometimes fails.

I am not providing binary image for this, because the only guys interested in this should be kernel devs (probably Open2X coders). Also because of bricking dangers when updating bootloader.

#3 User is offline   Mudi

  • You're pushing your luck little man
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 815
  • Joined: 25-January 06

Posted 08 March 2007 - 12:46 PM

Very cool stuff... I'd help you test but at the moment I don't have any SDHC cards, I'll see if I can get one to help out testing and bugfixing and whatever.

#4 User is offline   DJWillis

  • Random GP32/GP2X/Wiz & Pandora Moocher
  • Icon
  • Group: GP Guru
  • Posts: 1,366
  • Joined: 20-July 03
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Posted 08 March 2007 - 05:48 PM

notaz,

I have been doing just the same with the current Open2x SVN code (basic SDHC support is in there but proving flakey with one of my 4GB cards, other is fine).

Do you have any issue with me mergeing your changes with mine and adding them into Open2x SVN? Failing that, want to help out with Open2x? :D .

#5 User is offline   DaveC

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 8,767
  • Joined: 04-March 04

Posted 08 March 2007 - 06:07 PM

SNAFU.

I would buy an 8 GB SD card when I know that the GP2X would work with them. I don't know if they work because I cant test until I buy an 8 GIG card :P

#6 User is offline   DJWillis

  • Random GP32/GP2X/Wiz & Pandora Moocher
  • Icon
  • Group: GP Guru
  • Posts: 1,366
  • Joined: 20-July 03
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Posted 08 March 2007 - 06:30 PM

View PostDaveC, on Mar 8 2007, 06:07 PM, said:

SNAFU.

I would buy an 8 GB SD card when I know that the GP2X would work with them. I don't know if they work because I cant test until I buy an 8 GIG card :P


8 Gig's are working with my patch (slow, not well tested) and looking at Notaz’s patch it is very similar (with MUCH better code then mine ;) ) so I would think it would be good but I guess I should stump up another £45 for the 8GB SDHC rather then trashing cards work bought for other stuff :D .

#7 User is offline   DaveC

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 8,767
  • Joined: 04-March 04

Posted 08 March 2007 - 06:55 PM

Hmm well now with GBA emus comming along, and card guzzling Sega CD games we really need an 8 GB card to work. Good luck getting it going faster more reliable etc.

#8 User is offline   purple_goat

  • Mega GP Mania
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 1,479
  • Joined: 14-September 06
  • Location:USA

Posted 08 March 2007 - 08:22 PM

very cool, looking foward to gph official working it in, or at least a alpha :)

#9 User is offline   notaz

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 1,250
  • Joined: 22-August 05
  • Location:Lithuania

Posted 08 March 2007 - 08:32 PM

View PostDJWillis, on Mar 8 2007, 07:48 PM, said:

notaz,

I have been doing just the same with the current Open2x SVN code (basic SDHC support is in there but proving flakey with one of my 4GB cards, other is fine).

Have you tried your cards on my patch?

View PostDJWillis, on Mar 8 2007, 07:48 PM, said:

Do you have any issue with me mergeing your changes with mine and adding them into Open2x SVN? Failing that, want to help out with Open2x? :D .

No problem with that, you can consider the patch as public domain and do whatever you want with it. We just don't know if the code works (I only know it works with my SDHC..)

#10 User is offline   DJWillis

  • Random GP32/GP2X/Wiz & Pandora Moocher
  • Icon
  • Group: GP Guru
  • Posts: 1,366
  • Joined: 20-July 03
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Post icon  Posted 08 March 2007 - 08:38 PM

View Postnotaz, on Mar 8 2007, 08:32 PM, said:

View PostDJWillis, on Mar 8 2007, 07:48 PM, said:

notaz,

I have been doing just the same with the current Open2x SVN code (basic SDHC support is in there but proving flakey with one of my 4GB cards, other is fine).

Have you tried your cards on my patch?


Not yet, just taken my patch out and was going to test yours in a min before I look to hack them together. It may need a tiny bit of help to build with the 2.4.26 kernel we use in O2X but does not look that hard.

View Postnotaz, on Mar 8 2007, 08:32 PM, said:

View PostDJWillis, on Mar 8 2007, 07:48 PM, said:

Do you have any issue with me mergeing your changes with mine and adding them into Open2x SVN? Failing that, want to help out with Open2x? :D .

No problem with that, you can consider the patch as public domain and do whatever you want with it. We just don't know if the code works (I only know it works with my SDHC..)


Cool :D .

#11 User is online   PokeParadox

  • Founder of Pirate Games - Penjin Coder
  • PipPipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 3,627
  • Joined: 08-December 05
  • Gender:Male
  • Location:UK
  • Interests:Homebrew and Emulation!

Posted 08 March 2007 - 08:45 PM

This sounds like exciting stuff... my next SD card might just end up as 8GB(When I finally have some dough again >_>) :)

#12 User is offline   Rivroner

  • Mega GP Mania
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 1,077
  • Joined: 03-June 06

Posted 08 March 2007 - 11:12 PM

Incredible O_o
Thank you man :)

#13 User is offline   prairiefire

  • Ultimate Frisbee Nut
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 528
  • Joined: 15-September 06
  • Location:British Columbia, Canada

Posted 09 March 2007 - 01:48 AM

i love the timing of this work. :) Just as we get a new emulator for the '2x.

Thanks guys!

#14 User is offline   DJWillis

  • Random GP32/GP2X/Wiz & Pandora Moocher
  • Icon
  • Group: GP Guru
  • Posts: 1,366
  • Joined: 20-July 03
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Posted 09 March 2007 - 09:40 AM

View Postnotaz, on Mar 8 2007, 08:32 PM, said:

View PostDJWillis, on Mar 8 2007, 07:48 PM, said:

notaz,

I have been doing just the same with the current Open2x SVN code (basic SDHC support is in there but proving flakey with one of my 4GB cards, other is fine).

Have you tried your cards on my patch?


Ok, here goes...

4GB DataWrite SDHC - Works
4GB Unknown SDHC - Fails (finds the card every time but that is about it)
8GB DataWrite SDHC - Fails (finds the card sometimes but gets no further, i.e. hangs)

Looking at the code and the fact you where kind enough to patch SDK2X (so debugging should be a lot easier :D ) I think it should not be to hard to track down the bugs and smooth off the rough edges. I will start to merge the patches together tonight and see what we get with the combined effort.

#15 User is offline   notaz

  • Mega GP Mania
  • Icon
  • Group: GP Guru
  • Posts: 1,250
  • Joined: 22-August 05
  • Location:Lithuania

Posted 09 March 2007 - 03:57 PM

SDK2X has a good debug output support, so just bumping up the debug level should show exactly where it fails.

If the cards are detected, maybe they just need to be reformatted to work?

  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic