Thursday, September 7, 2006

JuiceBox Modding

Well I got one of these off ebay.

Just for fun really, it plays 128kbit mp3s but nothing more (I think later models do more?). I might give it to parents for xmas or something loaded with a couple of albums.

Also makes for a nice (well not really, the display is really crappy) digital pictureframe if you're into stuff like that.

My order of 5 SD sockets arrived and I was bored. Found a piece of mylar cable that accidentally had the same pin spacing as a juiceware cart that wasn't included and ...

From left to right, piece of an old phonecard to hold the mylar cable in place, the mylar cable, some regular wires, an sd socket and a 32 meg SD card. Perfect

Will make a cleaner SD adapter inside a real juiceware cart later when it arrives from the other end of the world.

UPDATE 09/02

Hooked it up to JTAG and serial :-)

Ran some demos

And since I was stupid enough to destroy the juiceware cart I ordered before dumping it's contents that's about it for now. Would also need the program flash code to do the xD card mod, and that hasn't been released yet.

UPDATE 09/05

Coding, coding. Managed to learn some aspects of this cpu and embedded development as a whole. Managed to set up the LCD in 4096 color mode and modify the example font drawing code that was released on the elinux Wiki to work with the 12bpp framebuffer (not perfectly yet though..) Also managed to set up the serial port for receiving (rx didn't work in the example code) and now I have something running that prints out stuff I send it through the serial port.

Tuesday, September 5, 2006

ZipIt Modding

Well I received my Zipit and broke it shortly after. An adapter rated at 4.5 volts was outputing 8.2 and that fried the stepdown pretty quick, ended up having to remove it.

Lucikly there was a repair guide available and I could make sure that the rest of the unit was undamanged. I went and ordered free samples of both the 3.3v Stepdown and the Li-Ion charger IC (which I didn't need thankfully) from Linear Technology ( A week later they arrived in shiny antistat ziplock bags

After replacing the StepDown the unit worked perfectly so I went and did the serial port and mmc mods almost losing my remaining sanity in the process. (had to redo it twice because the wires got ripped off) The serial mod: (these turned out really horrible, see the clean mod :)

and the MMC mod:

Using Steph's idea of where to mount the mmc socket and her rom image I have a working unit.

Sadly the audio apps don't work yet. The CPU has enough horsepower but for some reason the audio skips anyway. I have no idea why yet but it might have something to do with the audio drivers.

UPDATE 08/24

It's partly the fault of the slow MMC/SD Interface. And possibly because reads take up too much of the cpu. Eitherways one thing is 100% sure.. if the data is in memory.. it'll play. It'll play 320kbit CBR mp3s flawlessly as long as they fit in memory. Manipulating /proc/sys/vm/min-readahead and max-readahead (like setting them to a very high number like 3000 - 10000) can make linux pull the whole file up into ram and after that playmp3 from Cirrus (this is Cirrus's optimized decoder which probably uses the Maverick unit on the cpu as well) will play them without a single skip most of the time (always if played in sequence uninterrupted) However I tried with a bigger file that couldn't possibly fit in memory and it just segfaulted. And the initial read takes quite a few seconds. Not really a feasible jukebox but if you're desperate it works. I never could get FLAC decoders to work right. When there's data to be read it just starts skipping wildly, and FLAC files are too big to fit in ram so unless somsone codes an efficient slow-media optimised buffer handler for mplayer or ffmpeg it's not going to play well, and forget about the "genuine" flac library from the flac project. 100% cpu while decoding to devnull as opposed to 50% with the ffmpeg implementation. What else.. modplugplay doesn't work.. reason unknown skips like me in my last year @ HS. no mmc reads involved tho. cpu usage at 32%.. NO idea why it skips (no kswapd/kupdated activity either) I'll try to find a module player that works.

What else.. oh yes I compiled mc, who can live without mc right? It's quite nice but the initial setup is a pain. getting into the menu for example.. but after modifying some key bindings it works great. Can't get it to use mc.ext yet though for some strange reason.

I'll have some binaries up sometime, maybe...

UPDATE 08/24 x2

Compiled MikMod. It plays smaller modules fine but bigger XMs make it skip. Had to do a little hacking in libmikmod to get it running. Basically just turned the stdout driver into one that writes to /dev/zipaudio because I got horrible desyncs with the OSS driver (buffering issues again?)

HURRAY! BINARIES! Here's mc, yafc(ftp client) and whoops, no mikmod. Reason: The above two were direct compiles from source, so please see respective project pages for source, but I did indeed modify mikmod, so I don't think I can release that without a source release(though I might just not know GPL good enough).. and I don't have that anymore.

Just make sure you "export TERM=linux" before running these and put this into "/root/.mc" to get F9 as ALT(the ... key, not the Alt key)+UP, F3 as ALT+LEFT, F4 as ALT+RIGHT and F1 as ALT+DOWN (or alternatively find the source of chgscancodes and link other keys. Until that happens this works) You might also want to start mc with -b for monochrome mode, and set the monochrome skin in mikmod.