RocKen: a Ken's Labyrinth clone for Rockbox INSTALLING BINARY PACKAGE: Unzip rockenbin.zip to the root of the Iriver. PLAYING: Use the joystick to move forward/backward and turn left/right. Press SELECT to fire. Press REC to strafe left, and MODE to strafe right. Hold PLAY and move the joystick up/down to move up and down. Hold PLAY and press SELECT to go to the debug menu. Press STOP to show the main menu. Toggle the hold switch to pause. Doors automatically open when you are near. Secret walls are activated by shooting them. If you exit, shutdown the player, or insert the USB cable while you are playing, your game will be automatically saved. COMPILING: 1. 'cd' to the source directory. 2. Unzip rockensrc.tar.gz. 3. Apply the patch to plugin.lds to support the GCC constructor attribute: patch -p1 < plugin.lds.patch 4. Add rocken to apps/plugins/SUBDIRS. 5. Compile RockBox. INSTALLING DATA: Put demoboard.rbd, rocken.tex, music/, and sound/ into /.rockbox/rocken/. You can associate .rbd (board) and .sav (savegame) files with rockenbox by adding these lines to /.rockbox/viewers.config: rbd,rocks/rocken, ff 18 24 42 81 00 sav,rocks/rocken, ff 18 24 42 81 00 FAQ: Q: Why? A: Because I can. Q: Is anything player other than the Iriver H120/H140 supported? A: It would be if I had another player. You are welcome to port it to whatever player you want (or donate one to me and I'll port it!). The Archos Recorder's CPU is most likely not powerful enough to run the game, but the H3x0, iAudio, and ipods should be up to it. Q: Why not use MP3/OGG for music? A: The Iriver doesn't have the cojones to play the game and decode OGG or MP3 at the same time. It *MAY* be powerful enough to do MP3, but libmad uses up most of the plugin IRAM, so some of the critical game data would have to be stored in main memory, slowing it down. Q: What is the game based on? A: It's based on Ken's Labyrinth, one of my all-time favorite games as a kid. You can download it (including an updated version for modern operating systems) from http://advsys.net/ken/klab.htm. Q: Is any code from Ken's Labyrinth used? A: No, only graphics and sound. Take a look at the code from the original and you'll see why! What isn't written in x86 assembler is very poorly written C (give him a break, he was just a teenager). However, the core tracing algorithm is loosely based on Ken's LABDEMO2.BAS (available on his web site). Q: What format are the textures/sounds/levels? A: Music and sound files are standard WAVE files, but must be exactly 11025 or 22050 Hz. Textures are 3 bits per pixel, giving 7 shades of gray and one transparent value (0). The upper 2 bits become the destination, with the low bit indicating solid or dithered color. Textures must be square and the dimensions must be a power of 2. Textures are stored in column major order with 10 pixels packed into a 32-bit word. The format is the transverse of the the Iriver's LCD format. For a 128x128 texture, _unsigned int *data_, data[0] stores the top pixels in columns 0...9, data[1] stores the second row pixels for columns 0...9, data[127] stores the bottom pixels for columns 0...9, data[128] stores the top pixels for columns 10...19, and so on. Textures are generated from grayscale PNG files by the gentex.py script. gentex.py requires the Python Imaging Library (http://www.pythonware.com/products/pil/index.htm). Levels are generated by the GIMP using the makerbd.py plugin. Put makerbd.py in ~/.gimp-/plug-ins/ and use "File->Export RocKen Board" to generate a level from the current image. See demoboard.xcf for an example of creating a level.