Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
Difficulty using image tool with v9t9 format #54593
10/03/09 05:45 AM
10/03/09 05:45 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
Code:
$ imgtool create v9t9 temp.dsk --sides=1 --tracks=40 --sectors=9

$ imgtool dir v9t9 temp.dsk

Contents of temp.dsk:
------------------------  ------ ---------------
------------------------  ------ ---------------
       0 File(s)               0 bytes
                             360 bytes free
$ imgtool put v9t9 temp.dsk ARC303G ARC303G

Putting file 'ARC303G'...
temp.dsk: Out of space on image
$ ls -l ARC303G 
-rwx------   1 barryn  barryn  8320 Oct 20  2006 ARC303G
$ 


I think a blank SS SD v9t9 floppy image SHOULD be able to hold a 8320 byte file...?

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54599
10/03/09 07:01 AM
10/03/09 07:01 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
Found the problem! The size returned needed to be multiplied by 256...
See the lines below the /* @BN@ */

Code:
static imgtoolerr_t ti99_image_freespace(imgtool_partition *partition, UINT64 *size){        imgtool_image *img = imgtool_partition_image(partition);        ti99_lvl2_imgref *image = (ti99_lvl2_imgref *) imgtool_image_extra_bytes(img);
        size_t freeAUs;
        int i;

        freeAUs = 0;
        for (i=0; i<image->AUformat.totAUs; i++)
        {
                if (! (image->abm[i >> 3] & (1 << (i & 7))))
                        freeAUs++;
        }

/* @BN@ */
/*      *size = freeAUs; */
        *size = freeAUs*256;

        return IMGTOOLERR_SUCCESS;
}


Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54600
10/03/09 07:02 AM
10/03/09 07:02 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
File was src/mess/tools/imgtool/modules/ti99.c

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54602
10/03/09 07:14 AM
10/03/09 07:14 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
Still not fixed... frown

$ imgtool put v9t9 temp.dsk ARC303G ARC303G

Putting file 'ARC303G'...
$ imgtool dir v9t9 temp.dsk

temp.dsk: Corrupt image

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54689
10/05/09 02:13 PM
10/05/09 02:13 PM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
So, everyone doesn't have to chime in all at once... smile I found one problem, anyone know what might cause the corrupt image issue?

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54705
10/05/09 04:24 PM
10/05/09 04:24 PM
Joined: Mar 2006
Posts: 1,026
PA, USA
L
Lord Nightmare Offline
Very Senior Member
Lord Nightmare  Offline
Very Senior Member
L
Joined: Mar 2006
Posts: 1,026
PA, USA
Not offhand, but could it be a sector size issue?
i.e. reporting size in sectors instead of bytes would cause the 'need to multiply by 256' thing, and corrupt images could result if the number of sectors per track etc is wrong.


LN


"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
Re: Difficulty using image tool with v9t9 format [Re: Lord Nightmare] #54829
10/07/09 01:58 PM
10/07/09 01:58 PM
Joined: May 2007
Posts: 542
Germany
M
mizapf Offline
Senior Member
mizapf  Offline
Senior Member
M
Joined: May 2007
Posts: 542
Germany
@Barry: I have written my own tools in Java for writing TIFILE-formatted files to a disk image. So if there's an issue with imgtool, I could offer you that tool in the meantime. Interested?

Michael

Re: Difficulty using image tool with v9t9 format [Re: mizapf] #54948
10/09/09 03:19 AM
10/09/09 03:19 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
Originally Posted By mizapf
@Barry: I have written my own tools in Java for writing TIFILE-formatted files to a disk image. So if there's an issue with imgtool, I could offer you that tool in the meantime. Interested?

Michael


Sure, I have some stuff I'd like to get into disk images while this gets fixed...

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #54981
10/10/09 05:39 AM
10/10/09 05:39 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
Originally Posted By Lord Nightmare
Not offhand, but could it be a sector size issue?
i.e. reporting size in sectors instead of bytes would cause the 'need to multiply by 256' thing, and corrupt images could result if the number of sectors per track etc is wrong.


LN
_________________________
"If life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"


Examining the resulting disk image after attempting to add a file, I found that the VIB (volume information block) at sector 0 is being over written by the first directory sector that should be written starting at the 3rd sector in the image.

Re: Difficulty using image tool with v9t9 format [Re: Barry Nelson] #55000
10/11/09 04:14 AM
10/11/09 04:14 AM
Joined: Oct 2004
Posts: 503
Miami, Florida
Barry Nelson Offline OP
Senior Member
Barry Nelson  Offline OP
Senior Member
Joined: Oct 2004
Posts: 503
Miami, Florida
This UGLY hack allows me to write at least one file to the disk sucessfully...
Code:
                fdr_aphysrec = fdr_AU * l2_img->AUformat.physrecsperAU;
                /* @BN@ */
                if (fdr_aphysrec <= 1) {
                        fdr_aphysrec=2;
                }

If someone else doesn't step in soon, I'm going to butcher this code with my code axe... (But I might get it working... smile ) Right now I can only write one file...
If someone else more familiar with this code doesn't step up, this could really ugly... smirk

Page 1 of 3 1 2 3

Who's Online Now
3 registered members (robcfg, Vas Crabb, Dorando), 131 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,606
Posts112,515
Members4,827
Most Online296
Dec 5th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 1.032s Queries: 15 (0.014s) Memory: 5.7223 MB (Peak: 5.9436 MB) Zlib enabled. Server Time: 2018-12-15 15:05:23 UTC