Some months ago, I hacked up some existing Arduino-based AVR programming code (avr910_ard.pde) in order to program Funcards with it. You can download it here.
If you’re not familiar with Funcards, they’re basically standard AT90S8515 AVR microcontrollers in smartcard format. Once upon a time, you could apparently use them for the legally dubious purpose of watching pay TV without paying. That’s ancient history, but they’re still a useful way of developing simple hobbyist smartcards. For example, you can install SOSSE or a modified version thereof on one. Plus, now that they’re outdated and not all that useful for illicit purposes, you can pick them up quite cheap.
Note that you can’t program the external EEPROMs on cards that have them with this software. (I don’t use the external EEPROM for anything, and so didn’t bother adding this feature.)
To make this work, you’ll need: a computer, a copy of avrdude, an Arduino or clone, a smart card socket correctly wired to the Arduino (see the comments in the source and the pin-out information on the SOSSE site), and a Funcard to program. Connect everything up, program the Arduino with this sketch, insert the Funcard, and use avrdude in avr910 mode to program it. Don’t forget to reset the Arduino between Funcard programming runs – there’s some weird bug that means it won’t work unless you do.
Edit 23 Feb 2010: New version. Now I’ve removed some dubious local modifications of my own, you no longer need to reset the Arduino between runs and programming is also faster. Plus, I added the ATmega163 to the list of supported devices, and you can now program smartcards based on it too.