[Coco] Re: JVC header

John Collyer johncollyer at zoominternet.net
Wed Feb 4 11:58:40 EST 2004


Torsten,

Thanks for the encouragement.

Look at how easy it was to change the
part of the program that calculates the
"JVC" header information.

John Collyer

ff40w_5:
        invoke CreateFile,\
        edx,GENERIC_READ or GENERIC_WRITE,0,NULL,\
        OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL
        cmp eax,-1                      ;If there was an error
        je ff40w_3                      ;
        mov buffer_valid,0              ;Else clear flag indicating read,
                                        ;write buffer position is valid
        mov handle,eax                  ;Get the file's handle
        mov this_spt,18                 ;Reset SPT count
        mov this_header,0               ;Reset number of header bytes
        invoke SetFilePointer,eax,0,NULL,FILE_END
        cmp eax,-1                      ;If there was an error
        je ff40w_3                      ;
        cmp al,0                        ;Virtual disk non-integral multiple
of 256?
        jz ff40w_3                      ;No header information
        mov this_header,al              ;Header information is there
        mov eax,handle                  ;
        invoke SetFilePointer,eax,0,NULL,FILE_BEGIN
        push ecx                        ;
        mov ecx,handle                  ;
        mov edx,offset dta              ;Offset to buffer
        xor eax,eax                     ;The number bytes to read
        mov al,this_header              ;is header size
        invoke ReadFile,ecx,edx,eax,ADDR SizeReadWrite,NULL
        pop ecx                         ;
        test eax,-1                     ;If there was an error
        jz ff40w_3                      ;
        mov al,byte ptr [edx]           ;Get one byte of JVC header
        mov this_spt,al                 ;Save sectors per track
ff40w_3:                                ;Head is on track zero now
        pop ebx                         ;Restore registers
        pop edx                         ;Return
        pop eax                         ;
        ret                             ;

----- Original Message ----- 
From: "Torsten Dittel" <Torsten at Dittel.info>
To: <coco at maltedmedia.com>
Sent: Tuesday, February 03, 2004 3:36 PM
Subject: [Coco] Re: JVC header


> > However, if or when there is new virtual hardware
> > devices to link into the virtual FFxxH memory area
> > the new virtual hardware could support double side
> > disks images in anyway that it wants to.
>
> Wow, great effort John. This is exactly how I imagined the things to be
> without thinking too much and loosing too much words about it...
>
> Keep on hackin'
>
> Torsten
>
>
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>




More information about the Coco mailing list