Welcome, Guest. Please login or register.

Author Topic: C64 Tape Port  (Read 3028 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: C64 Tape Port
« on: March 21, 2013, 11:47:23 AM »
@Linde

Are you sure the REUs DMA into local memory?? I'd rather guess that they overlay onboard memory with the page you select.

I once built a DMA interface to the Amiga where the 64's RAM was accessible through a 64K page on the Amiga - amazingly simple to build.
It worked somewhat, with lots of garbage coming along and writing to the 64 invariable crashed it (very likely memory corruption from the garbage). Guess I didn't really handle bus synchronisation correctly but the VIC does some funny stuff there...
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: C64 Tape Port
« Reply #1 on: March 26, 2013, 08:38:27 PM »
I'm still not really sure whether there's actually a DMA going on - it'd just be a waste of time since all of the REU's data is already in memory (not necessarily main memory though)...

The expansion port can override the PLA's memory decoder, so essentially it can - whenever it detects an access to one of its locations - switch off all onboard devices and put whatever data on the bus. To the CPU the data seems to be read from location $E100 when in reality it comes from $08E100 from the REU memory (just an example, I've got no idea which addresses are used).

So, actually DMAing (=copying) the data for a 256 byte page (or whatever) into main memory takes 256 cycles. That's a huge waste of time since mapping the data into the CPU's address space so it looks like main memory essentially takes no time for there's no data actually moved.

I can imagine that someone really called that "DMA" to point out the speed, but it should be much faster. Additionally, DMA requires a lot more logic than simple mapping. IMHO it doesn't make any sense.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: C64 Tape Port
« Reply #2 on: March 27, 2013, 07:38:47 PM »
Thanks for clearing this up! I still have problems imagining a case when this DMA scheme is of any real advantage compared to bank switching but my imagination may just fail me.

I'd have designed it with bank switching, using several (maybe 4) programmable windows of maybe 256, 4K or 16K in size and any location on a 256 byte boundary. That way you could flip the required memory in the matter of a single clock - even changing memory in time for the VIC to pick up. It wouldn't only be faster and save precious bandwidth but also not require a transfer buffer (you get back the mainboard memory when you switch the window off) which does have a point on a 64K system.

Anyway, DMA has some advantage if you want to look at the memory as secondary storage (while the bank-switching would treat is as primary). To make a real point, the cartridge would require a file system and battery backup however. ;)