This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

lisp for the nes

lisp for the nes
by on (#74228)
Hi,

To program for my nes I wanted a good language, like lisp.
A compiler for the nes did not exist yet, so I homebrewed my own lisp to
nes assembler system. In fact I made three of them.

Here are the links : http://soft.vub.ac.be/~jceuppen/lisp/

About the source tarballs, nescc uses flex and bison, nes-dlsym uses dynamic loading of assembly libs and nes-target is the latest greatest with operator/operand switch, all implemented in C.

Have fun with it, I'll post again if I finish this.

Love,
erana
lisp for the nes
by on (#74229)
BTW, there's a lot of debug printing, but this way you can see the compiler do his thing.

Love,
erana

by on (#74236)
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((lisp))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

by on (#74237)
On a side note, new languages are always cool. Now that you've done lisp, someone do OCAML or Haskell.
neslisp @ freshmeat.net
by on (#74412)
The project neslisp is hosted at freshmeat.net, you can follow it here :

http:/freshmeat.net/projects/neslisp

Love,
erana
neslisp supported syntax
by on (#74413)
At this date there is support for the following lisp language syntax:

when, loop, defun, function call, <, >, =, setq, +, -
Feedback
by on (#74447)
The first thing we're wondering is how well this assembler manages memory, how accurate it is, and that kind of stuff. If it's as weak as Batari BASIC, then some people may flee from it. Those are the people who want power for their thing.

by on (#74448)
all high-level languages for the NES interest me so keep it up... though i have to admit i'm not a fan of lisp
neslisp usable now
by on (#75006)
The compiler should be usable now more or less, see http://freshmeat.net/projects/neslisp

Love,
erana

by on (#78604)
Very cool. Do you have a road-map for what parts of lisp you plan on or would like to implement?

by on (#92983)
dullahan wrote:
Very cool. Do you have a road-map for what parts of lisp you plan on or would like to implement?


Just features are, see moose.config file :

1 (
2 )
3 setq
4 defun
5 +
6 loop
7 when
8 <
9 >
10 =
11 -
12 if
13 '
14 asm


then list support and better transactions and more operators.
If I find the time I am going to work more on it.

erana
Re: Feedback
by on (#93025)
Player 3 wrote:
The first thing we're wondering is how well this assembler manages memory, how accurate it is, and that kind of stuff. If it's as weak as Batari BASIC, then some people may flee from it. Those are the people who want power for their thing.


I haven't personally noticed any of the weaknesses stated in Batari BASIC. I've never corrupted memory using any function or complicated mathematical statement. I don't understand what accuracy means as compiled binaries work on actual cartridges, flash carts and emulators without fail - as long as you keep the cycle count sane.

That aside please continue developing lisp for NES! I personally failed to find enough documentation to get started though. NOTES and README didn't explain the commands.

Is there a preferred IDE to use with this?
Re: Feedback
by on (#93327)
slobu wrote:
Player 3 wrote:
The first thing we're wondering is how well this assembler manages memory, how accurate it is, and that kind of stuff. If it's as weak as Batari BASIC, then some people may flee from it. Those are the people who want power for their thing.


I haven't personally noticed any of the weaknesses stated in Batari BASIC. I've never corrupted memory using any function or complicated mathematical statement. I don't understand what accuracy means as compiled binaries work on actual cartridges, flash carts and emulators without fail - as long as you keep the cycle count sane.

That aside please continue developing lisp for NES! I personally failed to find enough documentation to get started though. NOTES and README didn't explain the commands.

Is there a preferred IDE to use with this?


Look in moose.c :

moose.config contains the commands which are read in for lisp syntax (you can change the syntax to words of e.g. your own language (ASCII).

moose.lisp gets read and matched with moose.config and 6502 assembler output goes in the code.s file.

Explanation of commands can be found in any lisp tutorial, you see.
The IDE is vi & kterm ;-)

I am probably going to continue development, so more lisp syntax and doing something with lists stored at a fixed address now.

Cheers,
erana
Re: Feedback
by on (#93330)
slobu wrote:
Player 3 wrote:
The first thing we're wondering is how well this assembler manages memory, how accurate it is, and that kind of stuff. If it's as weak as Batari BASIC, then some people may flee from it. Those are the people who want power for their thing.


I haven't personally noticed any of the weaknesses stated in Batari BASIC. I've never corrupted memory using any function or complicated mathematical statement. I don't understand what accuracy means as compiled binaries work on actual cartridges, flash carts and emulators without fail - as long as you keep the cycle count sane.

That aside please continue developing lisp for NES! I personally failed to find enough documentation to get started though. NOTES and README didn't explain the commands.

Is there a preferred IDE to use with this?


I've put in a Makefile and got all warnings out. You should be able to compile it this way on MacOSX and Unices.
neslisp available elsewhere
by on (#93976)
neslisp is now hosted at code.google.com:

https://code.google.com/p/neslisp/

enjoy.
Re: lisp for the nes
by on (#121774)
NOTE : this is another Lisp project, another compiler written in Objective-C.

The following Lisp code can now be compiled :

(if (+ 200 300 100) (+ 1 2) 3)
(if 1 x 2)
(+ x 20 30)
(setq x 33)
(setf x (1 2 3))

A windows port (using gnustep) is also available.

6502 and ARM targets are fully operational for the above code.

I will now try to port it to the SNES.

Project site is : https://code.google.com/p/arm-lisp
Re: lisp for the nes
by on (#122131)
There is support for SNES (65816). The output is the same as for NES for now, but the target exists, see the version 0.2.73 download at https://code.google.com/p/arm-lisp

git is not up to date for now.