Profile cover photo
Profile photo
Nate Downes
238 followers
238 followers
About
Nate's interests
View all
Nate's posts

Post has shared content
Was fun

Post has shared content
This week: a PET 2001 emulator in obfuscated C takes the shape of a PET, incorporates a 6502 emulation and all in just 66 lines.  Stephen Sykes won the 2005 IOCCC with this entry. He includes a 6502 test suite, a chess program and a Basic demo.  See this album of screenshots for details.

As is usual with obfuscated C contest entries, even a source code formatter does not help to understand it. Processing it with the preprocessor and re-formatting converts it into something that starts making sense. Keyboard input is written to $a2 into memory instead of being passed through a VIA emulation. The LOAD vector on $ffd5 is trapped to load files. The CPU emulation, however, is still ... ungrokable. Awesome piece of code - although I would not want to maintain it :)

For all the files, see http://www.ioccc.org/2005/sykes/
For more PET facts, see the FAQ at http://zimmers.net/cbmpics/cbm/PETx/petfaq.html or the index at http://www.6502.org/users/andre/petindex/index.html
For the memory map, see http://zimmers.net/cbmpics/cbm/PETx/petmem.txt
The chess program is (probably) a conversion of a previous IOCCC entry - see http://www.stephensykes.com/IOCCC/doodoo.c
PhotoPhotoPhotoPhotoPhoto
PET (shaped) Emulator from IOCCC
11 Photos - View album
Wait while more posts are being loaded