6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Sep 22, 2024 4:29 am

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Aug 11, 2009 12:21 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
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.


The range $DE00-$DFFF is available at the C-64's cartridge port for what you want to do. You assert /IO1 to map into $DE00-DEFF or /IO2 to map into $DF00-$DFFF (also applies to the C-128 in native or C-64 mode). Since you most likely won't be using the fake RS-232 kernel routines, you could enlist CIA #2 ($DD00) to act as a communications controller. 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. Take a look at a 74xx245.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 11, 2009 12:29 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
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.


Actually, it's not easy unless the two machines are phase-locked to each other (and, even then, you still need synchronization logic). Otherwise, you're essentially implementing a 4-phase asynchronous bus interface for both sides, plus bus arbitration logic in between them.

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).


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 11, 2009 1:11 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
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.


The 6510's 1 MHz Ø2 clock is present at the 64's cartridge port, so why not run both processors from the same clock. If you want to run the '816 faster, you should be able to use the C-64's Ø2 clock to trigger a clock generator circuit on your external board that runs at some multiple of the 64's clock (which is 1 MHz on the 128 whether in slow or fast mode). This should take care of your phase concerns.

kc5tja wrote:
(2) A means to let the 65816 interrupt the 6510A unambiguously. (Relatively easy)


Simple logic on your external board can assert /IRQ or /NMI, both being present at the cartridge port, assuming you want an interrupt. Or you can assert the 6510's /RDY line and tri-state the buses so the '816 can take control.

kc5tja wrote:
(3) A means for the 6510A to trigger an interrupt on the 65816.


You'd need something on the '816 board mapped into C-64 I/O space at a particular address that when written would ultimately toggle the '816 IRQ line for at least one clock pulse. Since writes on the 64 I/O space are always synced to the 1 MHz Ø2 clock, the effect of the write should persist long enough to gate your IRQ circuitry on the '816 side.

It sounds as though you're heading in the general direction that was taken with CMD's SuperCPU cartridge.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 11, 2009 1:32 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Quote:
It sounds as though you're heading in the general direction that was taken with CMD's SuperCPU cartridge.


Well, there's only one way to really do this sort of thing correctly, so it doesn't surprise me. :-)

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. :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 12, 2009 2:04 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
kc5tja wrote:
Well, there's only one way to really do this sort of thing correctly, so it doesn't surprise me.

The hardware aspects of connecting anything to the 64's or 128's cartridge port are pretty rigid, although all address and data lines are present. You could, in theory, map a piece of hardware into memory anywhere you want, but in practice bus conflicts between the port itself and RAM would arise. That's why /IO1 and /IO2 exist. Otherwise, decoding and bus arbitration would become a nightmare.

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.

Not to mention the paucity of 128s in reasonable condition.

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. :)

When do you plan to turn it into real hardware?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 12, 2009 2:36 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Good question. As I work on it only in my spare time, and only after higher-priority projects complete, it could well be never. :(


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 14, 2009 7:20 am 
Offline

Joined: Fri Aug 14, 2009 6:46 am
Posts: 2
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/transactor/disks/disk-23.html

lisp 64
http://www.c64-online.com/phpbb/downloads.php?view=detail&df_id=163

You may also want to check comp.sys.cbm and csdb forum for advice.

Good luck!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 25, 2009 3:41 am 
Offline

Joined: Thu Jul 24, 2003 8:01 pm
Posts: 24
You can also look for Oric Lisp. Oric was a European 6502 computer.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 22, 2009 9:00 pm 
Offline

Joined: Fri Aug 14, 2009 6:46 am
Posts: 2
another lisp for C64:

LIMP (Lisp Interpreter written in ML and Promal) D64 image (with docs)

http://www.lyonlabs.org/commodore/onrequest/limp.d64


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 02, 2013 6:27 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
"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


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 09, 2013 1:37 am 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 674
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.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Thu Feb 14, 2013 1:57 pm 
Offline

Joined: Thu Feb 14, 2013 1:49 pm
Posts: 1
Location: Milwaukee, WI, USA
5k3105 wrote:
This looks interesting. Does anyone know where I can find documentation for it?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 08, 2015 4:30 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Out of random curiosity, what's the status of this project now?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: