Re: 1581 JiffyDOS Versions

From: Rob Clarke <crock_at_clarke-family.org.uk>
Date: Thu, 26 Jan 2023 00:38:20 +0100
Message-ID: <3e37fbb6-897d-9414-7bf4-e83a3dc2a001_at_clarke-family.org.uk>
Hi Jim, I'm no expert on Commodore DOS but after looking through the 
disassembly, the SEI is inserted just before the drive executes the next 
item on the command queue, and I've no reason to believe that JD would 
bypass that - so yes I think the bug is in the JD 1581 ROM. From the 
limited documentation available, I think the -02 ROM was released very 
late in the life of the drive, sometime in 1992, which is possibly after 
the JD ROM was released?

Given that the 1581 had been released for 5 years, the bug must have 
been very rare, and as the user population now is so small compared to 
back then, even if it does manifest in JD, it probably gets blamed on 
flaky disks?

I have patched the JD ROM to include this bug fix, which I can send to 
anyone who's interested.

I found this writeup of the bug, which was originnly published in the 
German 64'er magazine:

"Occasionally the 1581 destroys a track of the disk. The bug doesn't 
always appear, which is why it was hard to find.
After a close study of a destroyed diskette, the error was identified: 
part of the track was written correctly, but another
part was not. As a result, the routine for writing the data to disk is 
interrupted. Due to this interruption, the checksum
is no longer correct. If you now try to access this defective track, the 
floppy disk station reports read errors of various
kinds. The error can be at least partially corrected with the track 
saver (listing). However, repairing a track is not enough,
since only the checksum is restored here, but not the remaining track 
data. It only serves to make the track readable and
writable. So you have to get to the root of the problem. After a close 
look at the ROM listing of the 1581, the bug was
finally found: The interrupt is not locked before writing to the floppy 
disk, which can interrupt the 1581 while writing.
A new problem arises when the error is eliminated: the checksum test 
when the floppy disk drive is switched on.
This problem is avoided simply by skipping the routine for calculating 
this checksum. Now you can change parts in the 1581
ROM without the floppy drive hanging in this routine. Now the command to 
disable the interrupt can be inserted. However,
since a ROM cannot simply be written to, a new EPROM (27256) and an 
EPROM programming device are required. 8 bytes must be
changed in the ROM of the 1581 (see table). The 1581 also has an error 
in the ROM, which is noticeable by the fact that
sectors are occasionally not written. This error has not yet been found. 
Who is able to locate him?"

Rob

On 24/01/2023 05:42, Jim Brain wrote:
> On 1/10/2023 7:48 PM, Jim Brain wrote:
>> On 1/9/2023 6:47 PM, Rob Clarke wrote:
>>>
>>> Hi all,
>>>
>>> Small question on JiffyDOS versions. I recently acquired a 1581 that 
>>> came with JiffyDOS installed whch was labelled as v6.01. I had read 
>>> from the CMD JD literature that that JD included all the Commodore 
>>> firmware patches from the latest available ROM version at the time.
>>>
>>> After poking around in the ROM. it seems that this 1581 JD ROM does 
>>> not include the SEI patch that Commodore released with the 318045-02 
>>> ROM which disabled interrupts when processing the command queue. 
>>> There's only 8 bytes difference between the -01 and -02 official 
>>> ROMS, 3 bytes to jump to the patch code, 4 bytes for the patch code, 
>>> and one byte to disable the ROM checksum check at /RESET. Details below.
>>>
>>> Can anyone familiar with JD versions confirm that the 1581 JD ROM 
>>> did not include Commodore's patch?
>>>
>>> Differences below.
>>>
>>>
>>> 	318045-01 	318045-02 	Jiffy 601
>>> AF8C 	3A 	00 	3A
>>> C160 	6C 	4C 	6C
>>> C161 	48 	AF 	48
>>> C162 	00 	C5 	00
>>> C5AF 	FF 	78 	FF
>>> C5B0 	FF 	6C 	FF
>>> C5B1 	FF 	48 	FF
>>> C5B2 	FF 	00 	FF
>>>
>>> Rob
>>>
>> I wonder if the patch was unneeded on JD?  Have you tried JD with the 
>> patch?
>>
>> Jim
>>
>>
>> -- 
>> Jim Brain
>> brain_at_jbrain.com  
>> www.jbrain.com
>
> Any updates?
>
> Jim
>
> -- 
> Jim Brain
> brain_at_jbrain.com  
> www.jbrain.com
Received on 2023-01-26 01:00:04

Archive generated by hypermail 2.3.0.