Master your ZX Microdrive - Second Edition

Introduce yourself. Pimp your website, competition, event or other activity here, as long as it's Spectrum related.
Post Reply
User avatar
jpnz
Manic Miner
Posts: 324
Joined: Tue Nov 14, 2017 4:07 pm
Location: Hamilt[r]on - City Of The Future - NZ

Master your ZX Microdrive - Second Edition

Post by jpnz »

There was a second edition of Master your ZX Microdrive book that "details the differences between the three types of Interface 1"...



After two failed attempts to get hold of the second edition, the third time has indeed been the charm and it landed on my desk this morning

I've not gone through it thoroughly yet, but this bug stood out - never even heard of it:

From Appendix C - Interface Bugs - page 136
The following problems relate to the old ROM only - they have all been
corrected in the new ROMs.

10. NETWORKING PROBLEM
If a SAVE*"N" is done, and the fourth byte in the final "N" buffer hap-
pens to be 205 then the machine crashes. It is caused by the value of register
IX being corrupted. Luckily the chances of it happening are very small.
What a superb corner-case!

I'll post some more about the other updates to the book later on
User avatar
jpnz
Manic Miner
Posts: 324
Joined: Tue Nov 14, 2017 4:07 pm
Location: Hamilt[r]on - City Of The Future - NZ

Re: Master your ZX Microdrive - Second Edition

Post by jpnz »

Ouch!

User avatar
jpnz
Manic Miner
Posts: 324
Joined: Tue Nov 14, 2017 4:07 pm
Location: Hamilt[r]on - City Of The Future - NZ

Re: Master your ZX Microdrive - Second Edition

Post by jpnz »

The following problems relate to the old ROM only - they have all been
corrected in the new ROMs.

10. NETWORKING PROBLEM
If a SAVE*"N" is done, and the fourth byte in the final "N" buffer hap-
pens to be 205 then the machine crashes. It is caused by the value of register
IX being corrupted. Luckily the chances of it happening are very small.
Just looking at the "NETWORK PROBLEM" in a bit more detail and the machine crash really is an "ooh, nasty"

It's a happy coincidence that a network save of a SCREEN$ full of byte 205 with a IF One V1 results in a recoverable "Microdrive not present" error

But the really nasty stuff, i.e. a full on lockup, can be triggered with:

Code: Select all

SAVE *"n";0 CODE 0,75
With the appropriate ROM version this can be tested with Spectaculator - set a breakpoint at 0x12ba which calls 0x10c4 to reclaim a microdrive channel - now on the road to nowhere...

Anyway, the bug is resolved in the later ROM editions by preserving the IX register - the fix is not really documented in Geoff's IF One v2 disassembly just the curious comments ";;;"

Code: Select all

;; SA-BLK-LP
L0872:  LD      A,C             ;
        OR      B               ;
        JR      Z,L0881         ; forward to S-BLK-END

        PUSH    IX              ;;;

        CALL    L0884           ; routine SA-BYTE

        POP     IX              ;;;

        DEC     BC              ;
        INC     HL              ;
        JR      L0872           ; back to SA-BLK-LP
Post Reply