Code from SD card?

I found out how to play music from an SD card. But is it possible to run code from an SD card, therefore creating different modes for your Arduino-powered robot, different game cartridges for your Arduino-powered game system, and other things?

If you can write a new bootloader to read code from the SD card, yes, it is possible.

There has been interest in a SD bootloader but little has been done. westfw started a topic and I wrote a very small program to read from an SD. The SD read part takes about 1200 bytes so a 2 KB loader would be possible.

Here is the topic with my code http://arduino.cc/forum/index.php/topic,89478.msg674246.html#msg674246. The code is attached to this post (you need to be logged in to see the atachment).

Too bad westfw didn't pursue it. He is an expert on bootloaders.

What about Nick Gammon's work? "Atmega chip stand-alone programmer to upload .hex files" http://www.gammon.com.au/forum/?id=11638

You can also get an interpreter that will run code straight from the SD card. Can’t remember the name of it at the moment.