VIC 1540

Modding and Technical Issues

Moderator: Moderators

User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Ah, so a 1541 on the Vic just automatically runs slower on the Vic than a 1540. I thought it was a bug on the C64 side of things and that if a 1541 was used on the Vic it would run at a faster rate a la the 1540.

As an aside, is there a difference between the VIC-1541 and the newer ones?
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
shem
Vic 20 Enthusiast
Posts: 197
Joined: Sun Sep 17, 2006 6:52 am

Post by shem »

Ok here is my understanding


when the vic20 was released the drive was a 1540
later when the c64 was released the drive ( 1540 ) was too quick for the c64 so they modded the 1540 did some tweaks and a rom change so that it would be compatible with the 64 and re branded it so it became the 1541
as far as I am aware the 1541 will work with the vic and the 64 the problem only shows up if you try to use the original 1540 ( the faster drive ) with the c64 that's when you need to slow the 1540 down so that it works correctly with the c64 ...

There are several board versions of the original 1541 the older 1541 with the full size board is basically the same as the original 1540 but with a different rom later on commodore have altered the board layout in the 1541 but kept it in the 1541 box and later still they released the 1541 MKii
Last edited by shem on Sun Feb 15, 2009 1:27 pm, edited 1 time in total.
I'll take my cart to go thank you ;)
Roelie
Vic 20 Newbie
Posts: 6
Joined: Sat Feb 14, 2009 2:46 pm

Post by Roelie »

As far as I know the unaltered 1540 is too fast for the c64. Because of an error in the VIA 6522 (in the 1540 and 1540) the shift register could not be used anymore and they had the go back to bit-banging (bit by bit reading). This is very power consuming for the 6500 microprosessor in the computer (vic 20 and c64). Since the VIC II chip in the c64 needs more often access to the memory less is available for the 6502. Too less for bit-banging with the 1540. Commodore made a new rom to even slow the 1540 more down so that it did work with the c64 and then they called the drive a 1541.
Now with a special command you can again speed up the 1541 drive. But then it only works with a vic 20.

P.S. The 1570 and 1571 are the first drives that can use the serial shift register as meant to be, since they also have the CIA 6526 chip inside.

Correct me if I am wrong.
Last edited by Roelie on Sun Feb 15, 2009 1:32 pm, edited 2 times in total.
shem
Vic 20 Enthusiast
Posts: 197
Joined: Sun Sep 17, 2006 6:52 am

Post by shem »

Ahh now we are getting somewhere
This is an excellent history lesson :D
I'll take my cart to go thank you ;)
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

So, what is the special command to speed up the 1541? Does anyone know, at all? :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
Roelie
Vic 20 Newbie
Posts: 6
Joined: Sat Feb 14, 2009 2:46 pm

Post by Roelie »

From the 1541 user manual:

Using With a VIC 20 or Commodore 64
The 1541 Disk Drive can work with either the VIC 20 or Commodore 64 computers. However, each computer has different requirements for speed of incoming data. Therefore, there is a software seitch for selecting which computer's speed to use. The drive starts out ready for a Commodore 64. To switch to VIC 20 speed, the foIlowing command must be sent after the drive is started (power-on or through software):
OPEN 15,8,15, "UI-": CLOSE 15
To return the disk drive to Commodore 64 speed, use this command:
OPEN 15,8, 15, "UI+": CLOSE 15
More about using this type of command is in chapter 4, with a detailed
explanation of the U (user) commands in chapter 7.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Anyway, wouldn't POKE 53265,0 on the C64 let you use it with a 1540 ?

Yes, the display will shut down but that is a price you'd have to pay. Just type in commands in blind, the computer still works although you have no display.
Anders Carlsson

Image Image Image Image Image
brain
Vic 20 Nerd
Posts: 539
Joined: Sun Jul 04, 2004 10:12 pm

Post by brain »

Turning off the display does indeed work.

For those with the SD2IEC/uIEC, UI+- is implemented. Speed up your access today!

For reference, here's the sd2iec code that implements the change in speed:

Code: Select all

    set_clock(1);
    if (globalflags & VC20MODE)
      _delay_us(34);  // Calculated delay
    else
      _delay_us(69);  // Calculated delay
This happens during the send of data from 1541 to 64. in UI- mode, we set the clock HI and wait 69uS before setting clock LO again. In UI+ mode, we only wait 34uS. So, effectively, UI- is half as fast.

Jim
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Would those delays also apply to PAL computers? I guess as soon as mine arrive, I can experiment a bit and see for myself.
Anders Carlsson

Image Image Image Image Image
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

So what will happen if you connect a 1541 to a VIC-20 and DON'T execute the command to make it VIC-20 compatible (speed it back up)?

In my experience, no problems....but perhaps others have experienced otherwise.
shem
Vic 20 Enthusiast
Posts: 197
Joined: Sun Sep 17, 2006 6:52 am

Post by shem »

I guess it will run just a little slower
I'll take my cart to go thank you ;)
User avatar
Schema
factor
Posts: 1430
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

brain wrote:For those with the SD2IEC/uIEC, UI+- is implemented. Speed up your access today!
Is this one of the settings that's saved with XW?
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Yes, a 1541 runs fine with a VIC-20 although not quite as fast as it could... eeh... not as fast as a 1540 would. A poor man's C64 disk turbo is to issue the UI- command then close the display. On the other hand almost any fastloader will outperform that ~15% speed increase.
Anders Carlsson

Image Image Image Image Image
brain
Vic 20 Nerd
Posts: 539
Joined: Sun Jul 04, 2004 10:12 pm

Post by brain »

ral-clan wrote:So what will happen if you connect a 1541 to a VIC-20 and DON'T execute the command to make it VIC-20 compatible (speed it back up)?

In my experience, no problems....but perhaps others have experienced otherwise.
There won't be any problems, but you will get slower performance.

Jim
brain
Vic 20 Nerd
Posts: 539
Joined: Sun Jul 04, 2004 10:12 pm

Post by brain »

Schema wrote:
brain wrote:For those with the SD2IEC/uIEC, UI+- is implemented. Speed up your access today!
Is this one of the settings that's saved with XW?
It is not, because there was a concern that someone would save UI+ on a VIC setup, and then take it to a C64 and it would not work, and then call/email with issues.

You might be able to lobby for it to be saved in the config.

Jim
Post Reply