Implementing Lisp for 6502/65C816
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: off-topic: 65816 homebrew
kc5tja wrote:
One idea I've had for retrofitting a 65816 CPU into a Commodore computer was to adapt the Kestrel-1 computer I'd built to serve as an 8MHz 65816-based single-board computer that couples with the C64 via the cartridge port as a slave peripheral. I'd use $DE00-$DEFF (I think that was one of the open memory holes) as a 256-byte window into the 65816's memory space. A VIA (located elsewhere in I/O space) would then be used by the C64 to drive the 65816's DMA interface.
Re: off-topic: 65816 homebrew
BigDumbDinosaur wrote:
However, it would probably be not much more difficult to place some sort of bi-directional bus transceiver on the '816 board to handle the DMA stuff.
It's better to use some deep FIFOs, but they're pretty rare. So, with the Kestrel-1, I implemented a DMA interface using 74ACT595 shift registers. To work with the Commodore 64, you'd replace the shift registers with parallel registers.
However, even here, you still need:
(1) A means to synchronize the 6510A against the 65816's clock, which even if running at the same speed, may well be out of phase. (And, were I building this, you can bet I'll be driving the 65816 at 16MHz or faster.) A 4-phase asynchronous interface is ideal.
(2) A means to let the 65816 interrupt the 6510A unambiguously. (Relatively easy)
(3) A means for the 6510A to trigger an interrupt on the 65816.
(2) and (3) are used to establish communications between the two computers. (1) is needed to not blow either side up doing so.
This is an issue I've run into when initially considering designs for my Kestrel-2 computer. In subsequent designs, I've dropped the asynchronous bus design and instead am phase-locking the VGA and CPU (which means the CPU runs at 12.6MHz -- period. No means of up- or down-grading the speed).
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: off-topic: 65816 homebrew
kc5tja wrote:
(1) A means to synchronize the 6510A against the 65816's clock, which even if running at the same speed, may well be out of phase. (And, were I building this, you can bet I'll be driving the 65816 at 16MHz or faster.) A 4-phase asynchronous interface is ideal.
kc5tja wrote:
(2) A means to let the 65816 interrupt the 6510A unambiguously. (Relatively easy)
kc5tja wrote:
(3) A means for the 6510A to trigger an interrupt on the 65816.
It sounds as though you're heading in the general direction that was taken with CMD's SuperCPU cartridge.
Quote:
It sounds as though you're heading in the general direction that was taken with CMD's SuperCPU cartridge.
OTOH, this all would require me to acquire a C64 or C128 again (probably I'd get the 128, because it just doesn't get the love it deserves). I doubt that will be occurring any time too soon due to space limitations. Besides, the Kestrel-2 is my current 65816 project, and I already have a software emulation of the machine running on my Linux box.
I just can't seem to get around to writing the system software for it.
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
kc5tja wrote:
Well, there's only one way to really do this sort of thing correctly, so it doesn't surprise me.
Quote:
OTOH, this all would require me to acquire a C64 or C128 again (probably I'd get the 128, because it just doesn't get the love it deserves). I doubt that will be occurring any time too soon due to space limitations.
Quote:
Besides, the Kestrel-2 is my current 65816 project, and I already have a software emulation of the machine running on my Linux box.
I just can't seem to get around to writing the system software for it.
I just can't seem to get around to writing the system software for it.
I know of 2 C64 lisps (micro lisp and lisp 64), neither of which have source.
One of the links mentioned earlier http://www.hugbox.org/lisp8/
gives source it seems.
http://www.1541ultimate.net/content/index.php in the next version is rumored to have '816 functionality. Yet with an fpga, you might as well implement a lispmachine in vhdl
As for cross assembling w/ 2 C64s, it would be much easier to use an SD card interface like the above 1541U (expensive) or the uIEC (cheap - check http://groups.google.com/group/uIEC-users for availability, usually ~$50).
Thanks for all the cool links guys!
micro lisp
http://cbm.csbruce.com/~csbruce/cbm/tra ... sk-23.html
lisp 64
http://www.c64-online.com/phpbb/downloa ... &df_id=163
You may also want to check comp.sys.cbm and csdb forum for advice.
Good luck!
One of the links mentioned earlier http://www.hugbox.org/lisp8/
gives source it seems.
http://www.1541ultimate.net/content/index.php in the next version is rumored to have '816 functionality. Yet with an fpga, you might as well implement a lispmachine in vhdl
As for cross assembling w/ 2 C64s, it would be much easier to use an SD card interface like the above 1541U (expensive) or the uIEC (cheap - check http://groups.google.com/group/uIEC-users for availability, usually ~$50).
Thanks for all the cool links guys!
micro lisp
http://cbm.csbruce.com/~csbruce/cbm/tra ... sk-23.html
lisp 64
http://www.c64-online.com/phpbb/downloa ... &df_id=163
You may also want to check comp.sys.cbm and csdb forum for advice.
Good luck!
another lisp for C64:
LIMP (Lisp Interpreter written in ML and Promal) D64 image (with docs)
http://www.lyonlabs.org/commodore/onrequest/limp.d64
LIMP (Lisp Interpreter written in ML and Promal) D64 image (with docs)
http://www.lyonlabs.org/commodore/onrequest/limp.d64
Re: Implementing Lisp for 6502/65C816
"Jecel Assumpcao Jr." posted on the FONC mailing list about PICOBIT (non-native LISP for micros) and also aboutPDP-1 LISP:
Quote:
Take a look at the paper "PICOBIT: A Compact Scheme System for
Microcontrollers" by Vincent St-Amour and Marc Feeley:
http://www.iro.umontreal.ca/~feeley/pap ... yIFL09.pdf
They implement a cross development system to run Scheme in less than 7KB
of memory in Microchip PC18 microcontrollers.
For those of us who prefer native systems to cross development, "The
LISP Implementation for the PDP- 1 Computer" by L. Peter Deutsch and
Edmund C . Berkeley is an interesting text from 1984:
> http://archive.computerhistory.org/reso ... 650371.pdf
That Lisp system needed at least 2000 registers (roughly equivalent to
4500 bytes) to run, though it could make use of larger configurations.
Unlike PICOBIT, this is a fully interactive operating system.
http://simh.trailing-edge.com/kits/lispswre.zip
Microcontrollers" by Vincent St-Amour and Marc Feeley:
http://www.iro.umontreal.ca/~feeley/pap ... yIFL09.pdf
They implement a cross development system to run Scheme in less than 7KB
of memory in Microchip PC18 microcontrollers.
For those of us who prefer native systems to cross development, "The
LISP Implementation for the PDP- 1 Computer" by L. Peter Deutsch and
Edmund C . Berkeley is an interesting text from 1984:
> http://archive.computerhistory.org/reso ... 650371.pdf
That Lisp system needed at least 2000 registers (roughly equivalent to
4500 bytes) to run, though it could make use of larger configurations.
Unlike PICOBIT, this is a fully interactive operating system.
http://simh.trailing-edge.com/kits/lispswre.zip
-
White Flame
- Posts: 704
- Joined: 24 Jul 2012
Re: Implementing Lisp for 6502/65C816
Yay, Lisp! 
One idea I had about the type tags was a compromise between the two (24-bit elements vs static memory ranges). Each page in memory would hold one type of entry. The type could either be stored in $xx00 on the pages that are used, or in a static table $KKxx. I haven't implemented it, but it is more dynamic than the fixed ranges, if you allow the system to dynamically allocate pages as needed.
One idea I had about the type tags was a compromise between the two (24-bit elements vs static memory ranges). Each page in memory would hold one type of entry. The type could either be stored in $xx00 on the pages that are used, or in a static table $KKxx. I haven't implemented it, but it is more dynamic than the fixed ranges, if you allow the system to dynamically allocate pages as needed.
Re:
5k3105 wrote:
Re: Implementing Lisp for 6502/65C816
Out of random curiosity, what's the status of this project now?