4040 dual floppy

History and Preservation Issues

Moderator: Moderators

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 »

srowe wrote:Using bidirectional transceivers like DS75160A/DS75161A would halve the number of lines required. The BASIC4 ROM you uploaded drives a single 6520 PIA so it is possible with less than 2 VIAs.
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.

André Fachat's solution for converting a 1541 drive to a 2031 also uses the 75160/75161 transceivers and the requirements are identical.

See:
http://www.6502.org/users/andre/cbmhw/i ... index.html

Bottom line: To communicate on a GPIB with Commodore's drives protocol, you need a complete PIA or VIA. The user port only offers half the IO lines of a VIA (if you assume you can't use the joystick lines).

In the VIC-20, both IO ports of the 1st VIA are used for the keyboard. The 2nd VIA is shared between the joystick, the datasette, the IEC and, finally the user port. There just isn't enough resources there.

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.
Be normal.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 4040 dual floppy

Post by Kakemoms »

Finally got a 2040 dual floppy from the US. It was expensive as I had to pay 86USD for the shipping! And it probably needs repairs as well...

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.
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:... a userport solution would still be welcome. But from eslapions comments it sounds like it would be slow and expensive.
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.
Be normal.
User avatar
srowe
Vic 20 Scientist
Posts: 1325
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: 1325
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: 1325
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: 1325
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: 1325
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.
Post Reply