Hacking the NES With Lisp
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).
(frosty piss)
on the one hand, this guy has re-implemented assembler with lisp syntax.
on the other hand, this guy has re-implemented assembler with lisp syntax.
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.
There aren't many NES consoles left alive, and I can't conceive of any person that will actually benefit from this. But, all the power to him. I guess.
But can it run Crysis?
Bravo, Slashdot. This is the kind of stuff that the geek crowd finds interesting. Is it useful? Nope. Is it cool and borderline bizarre? Yep!
"Every vision is a joke until the first man accomplishes it; once realized, it becomes commonplace." -Robert H. Goddard
This is why I've always preferred computers to consoles because the DRMtastic nature of the consoles quickly make them worthless.
Except most people aren't willing to buy a PC and hook it up to a TV. The cases are too big, they don't come with a recliner-friendly remote, etc. For this reason (and greed), the Wii is still a lot more likely than the PC to get games capable of using multiple controllers.
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'll have reimplemented Super Game Boy (for Super NES) or Game Boy Player (for Nintendo GameCube).
thith ith awethome!
I wrote a 6502 assembler in Logo in 1981 and we shipped it with the utilities disk.
That it had the key word defun. I guess I've got to complement them on their honesty that one of the goals of the creators of lisp was to remove the fun from programming.(Because it certainly did for me.)
Did you know 80 to 90% of the moderators on slashdot wouldn't recognize a troll even if one dragged them under a bridge.
Just what I needed 35 years ago.
http://michaelsmith.id.au
send him a crate of beer ;)
Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
Fun! This 6502-assembler-in-LISP looks similar to Henry G. Baker's "COMFY" 6502 compiler (described in "The COMFY 6502 compiler", SIGPLAN Notices, 1997). You can check out the COMFY-6502 implementation that uses Common Lisp (sadly this appears to be entrapped in the ACM non-commercial-use-only license, though for 6502 code that isn't very limiting). One cool thing about the approach of using LISP as an "assembler" in general is that unlike many traditional macro assemblers, this approach can easily do stuff like choose the optimal instruction set for branches because it can determine if it's in range for a short branch and use them when available. You can do it other ways, of course, but it's pretty elegant in LISP. Those interested in this sort of thing might like my page on 6502 Language Implementation Approaches or my page on making LISP-based languages more readable (especially sweet-expressions).
- David A. Wheeler (see my Secure Programming HOWTO)
If you`re curious about the idea of mixing new hardware with old, look into Amiga CPU boards. Folks have taken an Amiga that shipped with a 14Mhz 68020 (or in some cases even a 7MHz 68000) and added a 200+MHz PPC as basically a co-processor. Of course when you do this, the original hardware becomes a bit of a bottleneck, so next thing you know you`ve also added a separate video card, sound card, and SCSI controller.
But I think there have been at least a few demos that used an `060 or PPC CPU to render some fancy gfx and push it out the stock graphics hardware.
if you tried to do what this guy is doing for NES with a Sony Playstation or IPhone you would sued and threatened with millions in legal bills. If you don't believe me, ask George Hotz.
slashdot didn't move away from geeky stuff... certain corporate interests decided to attack the entire principle of DIY at its core. you can't expect slashdot to be silent about that.
I hope all the HTML-5 "coders" are taking note.
Here is a interesting article about the design of the 6502, on archeology.org of all places.
But you already knew it was archeology.org, didn’t you?
I’m old enough to remember 16K of memory being described as “whopping”
streaming raw data prepared for it through a cable from another machine
That would be Wide Boy, the pre-production version of Super Game Boy. Or it would be Super FX, a second CPU on a Super NES cartridge that renders graphics. In discussions about "super-mappers" on NESdev BBS, I've often mentioned a TV tuner for NES connected to an Xbox 360 as the hypothetical "upper limit" of what a mapper can do.
Thounds thtoopid to me.
Did anybody else read the headline and automatically think "N. E. Eth.?" Or was it just me?