VZ200 - VZ300 5.25" floppy format support?

Have an idea how to make KryoFlux even better? Let us know...
User avatar
IFW
Posts: 3080
Joined: Mon Nov 08, 2010 2:42 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by IFW »

Please submit a ticket to Softpres for details.

Thanks :)
gizmomelb
Posts: 12
Joined: Sat Nov 20, 2010 8:00 am

Re: VZ200 - VZ300 5.25" floppy format support?

Post by gizmomelb »

already done :)
RichAplin
Posts: 5
Joined: Wed Feb 16, 2011 12:07 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by RichAplin »

Ha that's pretty awesomely old-skool. Handy that you have the schematics in the manual

Very entertaining reading; it doesn't even have a disk controller, it appears to be entirely home-made - including the disk drive electronics. Pages 62-64 of that thing are awesome. The only off-the-shelf "disk" chip is the MC3470 which the verrry last bit of analog stuff for reading the disk heads (i.e. the sense and write amplifiers and some pulse cleanup)

It's basically all bit-banged reading and writing, which is why they spin the disk at 85rpm ;-)
Disk reading has some odd shift register setup (U5 on the disk controller page) which I can't quite figure out.. oooh I see, yes that's cute.

Ok so on the "Disk Controller" page; the amplified and cleaned up flux transitions come in on the left as "RD DATA", and the positive edge of each pulse clocks that flip-flop which is set up to toggle from 1 to 0 and back whenever such a disk pulse arrives. This toggling output is then sampled by the shift register U5 via the A input.
This is a rather incomplete solution b/c there's no sync mark detection, no clock recovery, nothing. The shift register is about as little hardware assist as they could get away with..
The input data shift register (unusually) is clocked every time the CPU reads the address decoded as Y1 (and the incoming data bit is also reset back to zero). The CPU can "peek" at the data bit status without clocking the shift register by reading address Y2.

It's funny they even bothered with the shift register; I guess not having to reassemble the bits into a byte makes it a bit faster, but it must be pretty marginal.

I love the way their disk format, like all the oldest-skool ones, uses interleaved sectors to give the CPU time to catch its breath when reading or writing. Classic.

Cheers that amused me. ;-)
RichAplin
Posts: 5
Joined: Wed Feb 16, 2011 12:07 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by RichAplin »

Yeah I think it has all the disk format info you need in the manual except the checksum algorithm (which is only a byte, can either guess it, ignore it, or disassemble the ROMs). The encoding is fully described, as far as I can see.
An original VZ300 drive could be made to work with firmware tweaks and minor hardware tweaks (two extra IOs so you've got 4 lines to control the head stepper phases) but I expect it's not worth the hassle.

IF the drive mechanism you read it back with has the same physical track positioning (i.e. distance from spindle of disk) to the VZ300 drive then;
Looking at the "Recording Technique" page 32,
The original spins at 85RPM, your reading drive presumably spins at 300RPM, so the timings are multiplied by 0.283, so;
32.2us * 0.283 = 9.11us between each clock+data pair, and 12us * 0.283 = 3.396us between each clock and its data bit.
The stuff about syncs marks and sector headers is all in the doc, one would hope it would be straightforward to decode. Basically your only gamble is that the reading+writing disk drive heads were calibrated the same. If not, you're hosed. ;-)

Actually, not really. It would be straightforward to read miscalibrated disks, you literally just need to swap out the stepper motor.. actually... huh. Maybe you could microstep the existing one.
Hm. actually, yes. Ok I'll start a new thread on that.
gizmomelb
Posts: 12
Joined: Sat Nov 20, 2010 8:00 am

Re: VZ200 - VZ300 5.25" floppy format support?

Post by gizmomelb »

RichAplin wrote:Yeah I think it has all the disk format info you need in the manual except the checksum algorithm (which is only a byte, can either guess it, ignore it, or disassemble the ROMs). The encoding is fully described, as far as I can see.
Thanks Rich! I'm glad this old 80's hardware manual made you smile - and I'm very happy to see you here. Reading your posts about the Cyclone20 project was always most interesting and I thank you for your posts here too. Nice to know you're still around and interested in this stuff.

As for disassembling the ROMs, there's a very talented VZ emulator author (writing it all himself in x86 assembly) by the name of Monty Stein who has already disassembled and documented the ROMs and is trying to figure out the RAW dumps I gave him - I believe his stumbling block is trying to work out the encoding method for the track data, so he can then 'massage' it against the known VZ disk format so he can then verify if VZ disk images are valid etc. and convert them to a .VZ disk format he's added to his emulator (for windows).
User avatar
IFW
Posts: 3080
Joined: Mon Nov 08, 2010 2:42 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by IFW »

Thanks for the dumps, I'll take a look, but right now it's very busy with other developments.
User avatar
IFW
Posts: 3080
Joined: Mon Nov 08, 2010 2:42 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by IFW »

So had anybody documented the checksum calculation yet?
Or is a commented rom disassembly available somewhere?
steinmonty
Posts: 8
Joined: Sat Dec 01, 2012 1:14 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by steinmonty »

Here is the checksum routine you are looking for:


;SECTOR CHECKSUM SUBROUTINE
;Entry parameters: Sector data loaded into data buffer IY+77
;Exit parameter: Checksum in DE
;Registers affected: A, B, DE, HL
;CHECKSUM SECTOR IN Z-80 DUMP FROM VZ DOS V1.2 ROM
;L5B10
; PUSH IY ;
; POP HL ;
; LD DE,004Dh ;
; ADD HL,DE ;HL = IY + 77
;
; LD E,(HL) ;PREPARE E FOR LOOP
; LD D,00h ;ZERO CARRY COUNTER
; LD B,7Fh ;B = 127 (LOOP COUNTER, SIZE OF SECTOR DATA)
;L5B1C
; INC HL ;INCREMENT SECTOR DATA BUFFER POINTER
; LD A,E
; ADD (HL) ;ADD SECTOR DATA TO CHECKSUM
; LD E,A ;SAVE CHECKSUM LOW BYTE IN E
; LD A,00h ;ZERO ACCUMULATOR WITHOUT RESETTING CARRY FLAG
; ADC D ;INCREMENT HIGH BYTE ON CARRY OVERFLOW
; LD D,A ;SAVE CHECKSUM HIGH BYTE IN D
; DJNZ L5B1C ;LOOP 127 TIMES
; RET


Its ADD16

I you want further assistance please ask.

;)
User avatar
IFW
Posts: 3080
Joined: Mon Nov 08, 2010 2:42 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by IFW »

1, Can you confirm that the drive uses a standard stepping mechanism, ie content fully readable on normal PC drives at 80TPI?
2, On page 30 of the Technical Manual you can see 2 checksums: one for the IDAM and one for the sector. Presumably the above routine is for the sector checksum. Could you post the IDAM checksum as well?

Cheers :)
steinmonty
Posts: 8
Joined: Sat Dec 01, 2012 1:14 pm

Re: VZ200 - VZ300 5.25" floppy format support?

Post by steinmonty »

You will find a good source of information when it comes to formats etc, in the VZ300 technical guide, track layouts sectors etc.
KryoFlux is the best thing I have seen
Last edited by steinmonty on Sat Dec 08, 2012 1:25 pm, edited 6 times in total.
Post Reply