This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
l0dable [2011/08/13 09:22] webholics old revision restored |
l0dable [2011/12/30 13:14] emdete |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | L0dables are small (<2.5k) loadable modules for the r0ket firmware. In the default released firmware these need to be encrypted signed to be run. The default l0dables are | + | ==== l0dable documentation ==== |
- | * BLINK {{:blink.c0d}} | + | This page documents to how to write a [[l0dable]]. depending on the font you are seeing this looks like "I/O dables" but meant is "loadable". these are small software components (in opposite to [[m0duls]] which are hardare components) that can easily copied to the [[r0ket]]. Once you are done with you l0dable please mention it in [[l0dables]]. |
- | * INVADERS {{:invaders.c0d}} **--New new version: workaround for mesh problems.** | + | |
- | * MANDEL {{:mandel.c0d}} | + | |
- | * PWGEN {{:pwgen.c0d}} | + | |
- | * ROCKETS {{:rockets.c0d}} | + | |
- | * RECVCARD {{:recvcard.c0d}} | + | |
- | * SENDCARD {{:sendcard.c0d}} | + | |
- | l0dables which replace the nickname display have the extension .NIK | + | Set up build environment as described in [[build]] |
- | * ANIM {{:anim.nik}} | + | |
- | * IMAGE {{:image.nik}} | + | |
- | * LIFE {{:life.nik}} | + | |
- | * PLAIN {{:plain.nik}} | + | |
- | * SCR0LL {{:scr0ll.nik}} | + | |
- | After-release l0dables: | + | <code> |
+ | cd firmware/l0dable/ | ||
+ | vi hello.c | ||
+ | </code> | ||
- | * SHOWCARD {{:showcard.c0d}} | + | <code> |
- | * displays a vcard | + | #include <sysinit.h> |
- | * VOLTAGE {{:voltage.c0d}} | + | #include <string.h> |
- | * Check your battery voltage and charging status | + | #include <stdlib.h> |
- | * SNAKE {{:snake.c0d}} | + | |
- | * <some witty comment> | + | |
- | * MATRIX {{:matrix.nik}} | + | |
- | * random characters :) | + | |
- | * INVADERS {{:invaders.nik}} | + | |
- | * invaders-style nickname | + | |
- | * JUMP {{:jump.c0d}} | + | |
- | * a Doodle Jump clone | + | |
- | All these modules can be downloaded here and placed on your r0ket via the usb_storage mode. | + | #include "basic/basic.h" |
+ | #include "basic/config.h" | ||
- | If you write a l0dable, stop by fpletzvillage to get it signed and distributed here. | + | #include "lcd/render.h" |
+ | #include "lcd/print.h" | ||
- | ====LeiwandVille Demo==== | + | #include "usetable.h" |
- | We are proud to present you the official LeiwandVille Demo App for your batch. | + | void ram(void) |
+ | { | ||
+ | lcdPrintln("Hello"); | ||
+ | lcdPrintln(GLOBAL(nickname)); | ||
+ | lcdRefresh(); | ||
+ | while (1){}; | ||
+ | } | ||
+ | </code> | ||
- | ===signed version=== | + | more examples how to do stuff are in the l0dable directory. |
- | If you haven't flashed your badge, here is the official signed version: http://staging.magicbooks.org/r0ket/leiwand.c0d. Just attach badge to computer, enter mass storage mode (menu -> usb_storage) and copy the file to the mass torage device. Don't forget to unmount/eject the device before unplugging! | + | |
- | ===open source version=== | + | ==== Compiling the l0dable for the r0ket ==== |
- | Download the files http://staging.magicbooks.org/r0ket/leiwand.c and http://staging.magicbooks.org/r0ket/leiwand.h to the directory "firmware/l0dable" in your local copy of the GIT repo and make a release build as described in the r0ket wiki. | + | <code> |
+ | make hello.c0d | ||
+ | </code> | ||
- | ==== Show *.lcd Files ==== | + | Select usb_storage on your r0ket, mount it and copy hello.c0d on the usb device. |
+ | on OS X so not use the finder, use | ||
- | This l0dable shows you .lcd files (images or animations) stored on your r0ket. | + | <code> |
- | It also allows you to choose the animation speed. | + | cp hello.c0d /Volumes/NO\ NAME/ |
- | (See also [[lcd_art|LCD Art]]) | + | </code> |
- | * [[http://ikarus4ever.ik.funpic.de/cccamp2011/l0dables/showlcd/|Download showlcd]] | + | |
- | * [[http://the-k3x.de/files/2011.08.11_11.25.46_showlcd.c0d|Mirror (signed .c0d)]] | + | |
- | * [[http://the-k3x.de/files/2011.08.11_11.25.40_showlcd.c|Mirror (source, maybe not the latest verstion)]] | + | |
- | (Sorry for the lame hosting... I don't have webspace) | + | |
- | ==== Unsigned .c files ==== | + | make sure you unmount the device properly. |
- | * [[http://the-k3x.de/files/2011.08.11_11.29.41_tetris.c|Tetris]] | + | |
- | * [[http://the-k3x.de/files/2011.08.11_11.29.49_dei_mudda.c|Dei Mudda]] | + | |
- | * [[http://dl.dropbox.com/u/37924579/sign.c|Sign]] (see http://xkcd.org/363/, c0d file [[http://dl.dropbox.com/u/37924579/sign.c0d|here]]) | + | |
- | * [[https://github.com/gasman/wolfy|wolfy]] (Wolfenstein 3D style raycasting engine, work in progress - [[http://altaria.vm.bytemark.co.uk/wolfy/wolfy.c0d|c0d file]], [[http://altaria.vm.bytemark.co.uk/wolfy/wolfy.png|screenshot]]) | + | |
- | * Fixed blink.c [[http://the-k3x.de/files/blink.c|source]] [[http://the-k3x.de/files/blink.c0d|git signed .c0d]] | + | |
- | * [[http://dl.dropbox.com/u/1866047/jump.c0d|r0ket JUMP!]] (a Doodle Jump clone) [[https://github.com/webholics/r0ket/blob/master/firmware/l0dable/jump.c|jump.c]] | + | |
- | * [[http://freakshare.com/files/zxe26v8o/geekloc.c.html|original freakshare]] [[http://the-k3x.de/files/geekloc.c|mirror]] GeekLoc(TM) See which geeks are nearby :) (uses your configured nick) | + | |
- | * [[https://paste42.de/1872/p0ng|simple singleplayer p0ng]] | + | |
- | * [[https://github.com/ranzwertig/r0ket/blob/master/firmware/l0dable/r0type.c|r0type.c]] rtype like game for r0ket (randomInit is needed in EXPORTS) [[http://dl.dropbox.com/u/6735909/r0type.c0d|r0type.c0d]] | + | |
- | For Nick-Animations, Animations and Images please see [[lcd_art|LCD Art]] | + | exit usb_storage, and run hello from the execute menu. |
+ | |||
+ | ==== running in the simulat0r ==== | ||
+ | |||
+ | <code> | ||
+ | cd simulat0r | ||
+ | make APP=l0dable LAPP=hello | ||
+ | gui/build/qsimulat0r | ||
+ | </code> | ||
+ | |||
+ | <note> This [[l0dable]] will loop forever and you will have to reboot you [[r0ket]] after starting it. </note> | ||