Hacking the NES With Lisp 80
Andy Hefner has a detailed blog post covering his quest to program an NES with the assistance of Common Lisp. He developed a new 6502 assembler, a mini-language for composing musical sequences, and a neat demo (rom image).
That's hot (Score:3, Interesting)
I think that is the coolest thing I have seen in a while. Nothing like the king of all high level languages generating low level machine code.
Re:a strange mix of nausea and admiration (Score:4, Interesting)
Well he wasn't the first one to do it, Common Lisp already has a disassemble [psg.com] command.
This is what Slashdot needs more of (Score:5, Interesting)
Re:This is what Slashdot needs more of (Score:4, Interesting)
What I have always wondered about, is just how far can you push one of these old systems?
Like the snes.. it was designed to accept a 3rd party cpu inside the cartridge, in addition to the game rom.
What would happen if you built what would essentially be rom code toolbox routines to access the snes's hardware, and then switch execution to a more powerful/more modern low energy cpu, like an arm?
You would use the snes as an input device (they did make a snes mouse.....), and as the graphics hardware, but run all the heavy lifting on the arm instead of the 6500 series cpu. Other than the rom routines to do the interface, everything else is handled by a shared ram bank and an sdcard slot put into the cartridge.
Why? So you can run linux on the snes. Why? Because you could.
I bet you could do some really clever stuff by simulating a framebuffer.
Comment removed (Score:4, Interesting)
Re:a strange mix of nausea and admiration (Score:5, Interesting)
Read the fine article. Using CL does substantially change the language. Specifically, note the higher order manipulation of the eventual low-level program that the author achieved using promises (delayed evaluations). Basically, "threading while assembling".
Also, notice the ease of introducing higher-level flow control constructs (IF and UNTIL) into assembler. And the elimination of a second assembler pass by use of promises for forward references. It's kind of "magic" -- the correct data will be there when it's needed!
In this use-case, CL is a notational system for NES programming. It probably shouldn't be called "assembler" anymore, as the power of CL can be brought to bear in the process of generating the desired machine code.
Looks like Henry G. Baker's COMFY 6502 compiler (Score:4, Interesting)