4040 dual floppy

History and Preservation Issues

Moderator: Moderators

User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: 4040 dual floppy

Post by srowe »

Kakemoms wrote: So, looks like I have to find a solution to this GPIB problem now.. I have a 65C22 on my expansion. I wasn't planning to reprogram a whole IEEE interface through that, so a userport solution would still be welcome. But from eslapions comments it sounds like it would be slow and expensive.
I got part way through my disassembly of the V-Link ROM before I got distracted by something else. I'll restart it but it's taking longer than planned because there are more differences between it and the BASIC4 ROM than I'd expected.

If it works it won't be any different in speed to the VIC-1112.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: 4040 dual floppy

Post by srowe »

My initial analysis is as follows:

The DIO lines are on VIA 1 DRB (no real surprise). The control lines are mapped on to VIA 1 DRA as follows
  • NRFD - bit 5 - joy fire
  • DAV - bit 4 - joy left
  • EOI - bit 3 - joy down
  • NDAC - bit 2 - joy up
and CB2 is used for ATN out.

I need to tidy up my disassembly just to check this all.
PhotoJim
Vic 20 Dabbler
Posts: 75
Joined: Sun Aug 21, 2005 10:47 pm
Website: http://www.photojim.ca
Location: Regina, SK, CA
Occupation: Insurance + lecturer

Re: 4040 dual floppy

Post by PhotoJim »

eslapion wrote:I would not be slow or expensive, it's plain impossible. You just don't have enough control lines there to have an operational GPIB interface for Commodore drives.
My instinct is that you could possibly convert IEEE-488 to the IEC bus (maybe with some sort of intermediary device to do control). It'd be slow, but at least it would keep the other ports free.

An easier solution would be to sell the 4040 and buy an MSD-2 drive (dual floppy, dual IEC/IEEE-488 bus) but they are rare these days.
VIC-20 NTSC 40K (stock 5K + 16K + 2 x 8K + 3K SuperExpander + cartridge expander)
VIC-20 NTSC 37K (stock 5K + 32K cartridge by eslapion)
128 NTSC flat 640K with 1750 REU
64 NTSC breadbox x 3
Amiga 500 9 MB, 40 MHz 68EC030
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

dragos wrote:Once all the kickstarter orders have been filled, there will be vic-1112s available. I anticipate 2 weeks or so and they will be built to order.

userport to IEEE is probably not going to happen, you'd need a custom kernal, someone to design it, etc. just use a cart port expander, they are cheap and give you many more options!
Any news on your 1112 replicas.. Have you managed to get them to communicate with a drive yet?

If you want to sell some PCB's for DIY, I am interested! PS: The cable can be troublesome to find.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: 4040 dual floppy

Post by srowe »

Kakemoms wrote: If you want to sell some PCB's for DIY, I am interested! PS: The cable can be troublesome to find.
This eBay seller claims to have multiple genuine Commodore cables

http://www.ebay.co.uk/itm/Commodore-PET ... SwZVlXrbQ4
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

srowe wrote:
Kakemoms wrote: If you want to sell some PCB's for DIY, I am interested! PS: The cable can be troublesome to find.
This eBay seller claims to have multiple genuine Commodore cables

http://www.ebay.co.uk/itm/Commodore-PET ... SwZVlXrbQ4
Indeed. Very strange were old things turn up.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

Well, I bougth two cables and a 8050. Then I found out that the 8050 has more storage space than the 4040.. Since neither of the 4040 or 8050 works I was thinking of fixing one of them with parts from the other...

Is both the 4040 and 8050 based on the SA390?

I also need a vic-1112 to get things going... yikes.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: 4040 dual floppy

Post by srowe »

Kakemoms wrote:Well, I bougth two cables and a 8050. Then I found out that the 8050 has more storage space than the 4040.. Since neither of the 4040 or 8050 works I was thinking of fixing one of them with parts from the other...

Is both the 4040 and 8050 based on the SA390?
No, the 8050 uses double the density of the 4040. I'm not sure the make and model of the bare drives.

According to this there are four different suppliers.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

The drives in my 8050 was Micropolis and it looks like the front plate mounting "clip" was broken on drive 1. Drive 0 seems to be ok. Still, it doesn't boot so well and flashes the central LED 3 times which is supposedly a bad ROM. I am waiting for my EPROM writer and will try to fit a 2764 in there if resoldering and reseating doesn't fix the problem.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

eslapion wrote: Not quite, if you mean less than 2 VIAs = the user port is enough.

I just took a look at the schematics for the 2031 on Zimmers here:
http://www.zimmers.net/anonftp/pub/cbm/ ... ge-30r.gif

The number of required VIA IO lines is reduced but there are a few lines which simply cannot be reduced as you suggest.

Managing the GPIB still requires 14 port lines which is more than can be offered by the user port.
If one combines the serial port with the User port you will get 14 port lines. The serial port can be routed with a buffer to free it for other devices when the IEEE isn't needed.
eslapion wrote: I took a quick look at SAM55's C64 GPIB cart and it has only one VIA so it can be done with a single VIA, that is if you can dedicate the whole chip to the job. That's not possible on the VIC-20.
An alternate way would be to use the user port and put a small interface card onto the keyboard connector inside the machine (with some buffers). Unless you need to type while one reads data from the IEEE, that shouldn't be a problem. Then you can also drop the 75160/1.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

srowe wrote:
Kakemoms wrote: How large is your basic v4?
The total code is just over 4K, however that includes
  • IEEE routines
  • intercepts for KERNAL routines
  • new BASIC commands
the first two alone should be less than 2K.

The original RTC ROM was 4K if you're happy with that the easiest thing would be to reverse-engineer the IEEE routines to figure out the wiring of their cable and use that.
I am starting to think that a solution with Userport+some internal adapter could be a way to keep the expansion port free. But that would require me to put the Kernal into a 2764 PROM and IEEE routines into Kernal...

The question is obviously space. There are a few bytes in the Kernal that are free or unused, but is it enought...
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: 4040 dual floppy

Post by srowe »

Kakemoms wrote: There are a few bytes in the Kernal that are free or unused, but is it enought...
By my counting there are 118 bytes of unused space (non contiguous). I don't think that would be enough.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

srowe wrote:
Kakemoms wrote: There are a few bytes in the Kernal that are free or unused, but is it enought...
By my counting there are 118 bytes of unused space (non contiguous). I don't think that would be enough.
Hmm.. no, thats not enough, even compressed.. How did they push JiffyDOS into that ROM. :shock:
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: 4040 dual floppy

Post by eslapion »

Kakemoms wrote:
srowe wrote:
Kakemoms wrote: There are a few bytes in the Kernal that are free or unused, but is it enought...
By my counting there are 118 bytes of unused space (non contiguous). I don't think that would be enough.
Hmm.. no, thats not enough, even compressed.. How did they push JiffyDOS into that ROM. :shock:
The tape routines are removed from JiffyDOS.

Perhaps you don't need the datasette routines if you implement IEEE-488 for userport in Kernal.
If one combines the serial port with the User port you will get 14 port lines. The serial port can be routed with a buffer to free it for other devices when the IEEE isn't needed.
Then take out the IEC routines too. There's your space.
Be normal.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

Kakemoms wrote:
srowe wrote:
Kakemoms wrote: There are a few bytes in the Kernal that are free or unused, but is it enought...
By my counting there are 118 bytes of unused space (non contiguous). I don't think that would be enough.
Hmm.. no, thats not enough, even compressed.. How did they push JiffyDOS into that ROM. :shock:
Well, I finally got my order of 12x2pin userport edge connectors from Taiwan. I though I had ordered 6, but it was 60 pcs in the package... lol.

So I really have to do this now. No need to have 60 connectors laying around. I have looked at the disassembly which is interesting. The schematics Eslapion pointed to also shows that one can do this with 16 I/O lines. The userport has 8+5 general I/O lines from one VIA plus another one that goes through a NOT gate to ATN (so it becomes output only). That can be used to switch the multiplexer. The user port also has two shift register I/O outputs, so a total of 16 lines.

I can draft a schematic once I have read through the disassembly and see if it works. I am missing the 75160/75161, but I can replace them with some 74LS245 on my breadboard to see if I can get it working.. Well, there goes October. :lol:

Edit: Here is my suggested V_Link replica. Its going to need new software because the V-Link ROM does not make sense with the available signals on the Userport. It also looks like it can be done without using output 9 on the Userport (which is connected to the serial port). Thus, the IEC should work as normal. Joystick port needs to be unused for this to work.
V-LINK-replica.png
Post Reply