6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:03 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Jul 03, 2012 4:49 pm 
Offline

Joined: Sat Aug 21, 2010 7:52 am
Posts: 231
Location: Arlington VA
I'm working on the virtual memory piece of a Forth for the Commodore PET 2001 and it requires both a PLAY and a RECORD deck, simultaneously available as devices #1 and #2. Fiddling around a bit with vice 2.3.dfsg-2 (Versatile Commodore Emulator) on Ubuntu Linux, I could only get one cassette drive. It works on the real hardware. Is there something I'm missing here or is it just a limitation of the emulation software?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 06, 2012 7:00 pm 
Offline

Joined: Sat Aug 21, 2010 7:52 am
Posts: 231
Location: Arlington VA
* crickets *

I suppose I can use SEQ files on an emulated 8050 on the Vice/Xpet for development, and real datasette decks on the real hardware


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 06, 2012 7:49 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I'd only be able to help by digging into VICE sources, so probably not the person to help. It sounds like an interesting idea: you're swapping to one device and using the other conventionally for data?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 06, 2012 8:56 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
I would imagine that it would be straightforward to add "another deck" to the emulator, but frankly I didn't even know a PET could HAVE two cassette decks until this post showed up.

Back in the day I tried being able to append to a cassette based system, but it didn't work out. My data set was small enough to store in RAM, so I just copied over the tape each time.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 07, 2012 2:09 am 
Offline

Joined: Sat Aug 21, 2010 7:52 am
Posts: 231
Location: Arlington VA
The Commodore PET 2001 has two cassette ports (devices #1 and #2) while the VIC-20 & C=64 had only one (device #1) with device #2 unused (memory confidence 95% on that assertion).

The virtual memory scheme involves waiting for a FLUSH (Forth's write operation) and having the user press play on one deck and record on the other deck. Every block (1024 bytes) is copied in order from the play deck (#1) to the record deck (#2), with the in-memory modified blocks being inserted at the appropriate times to replace the (now obsolete) blocks on the play deck.

Six 192-byte data blocks per 1024 byte Forth block would mean 1152 bytes per Forth block.
2 bytes of block number (meta info)
1024 bytes of block data
126 bytes unused

At the end of copying the entire virtual memory space from one tape to the other, both decks are stopped and rewound. The next FLUSH operation would copy in the other direction from (#2) being the play deck writing to (#1) as the record deck


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 07, 2012 11:16 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Hm, I wrote the xpet emulator in VICE, and IIRC I only re-used the tape code that already existed for the C64 and the other platforms.

So my guess is that you have to extend the emulator to include a second tape simulation for your requirements

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 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: