Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-05 Thread Norman Dunbar via Ql-Users

Hi Wolf,

On 05/02/2019 14:01, Wolfgang Lenerz via Ql-Users wrote:


int nbrOfSectorsInMap=firstSector.getShort(WinDrive.QWA_SCTM)&0x;
// that many sectors are supposed to be in the fat

int 
temp=nbrOfSectorsInMap/(firstSector.getShort(WinDrive.QWA_SCTG)&0x);
if (nbrOfSectorsInMap % (firstSector.getShort(WinDrive.QWA_SCTG)&0x) 
!=0)

   temp++;   // these are the number of clusters needed to hold the map

if (temp!=this.fatClusterChain.size())  (...)
// if they both agree, all is ok, I have a valid drive map


That's very useful indeed, thanks. With a bit of luck, I might be able 
to get proper qxl.win files created soon. :)



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
___
QL-Users Mailing List

Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-05 Thread Wolfgang Lenerz via Ql-Users

Hi,

this is the comment I wrote to myself for SMSQmulator in this respect:

"
Patch for badly constructed drives, like those built by qxltools. These 
drives do NOT have cluster entries for the FAT(). They just indicate 
the number of sectors taken by the FAT. I presume that it can then be 
presumed that the FAT's sectors are all contiguous and start at sector 0.

"

Treated like this:

int nbrOfSectorsInMap=firstSector.getShort(WinDrive.QWA_SCTM)&0x;
// that many sectors are supposed to be in the fat

int temp=nbrOfSectorsInMap/(firstSector.getShort(WinDrive.QWA_SCTG)&0x);
if (nbrOfSectorsInMap % (firstSector.getShort(WinDrive.QWA_SCTG)&0x) 
!=0)

  temp++;   // these are the number of clusters needed to hold the map

if (temp!=this.fatClusterChain.size())  (...)
// if they both agree, all is ok, I have a valid drive map


HTH

Wolfgang



Can you give me an example of how to reproduce the problem(s) you are
seeing? I've just created a 20 MB qxl.win with no problems. (So far!)


Unfortunately not right now, and my memory is vague. I think that
all issues were gone with 16 MB and less. My next image size step
was probably 32 MB, not just 20 MB.

It could be, that just recompiling the latest qxltool source with an
up-to-date compiler and library makes the issues disappear.


I've created a couple of qxl.win files (at coffee time - I'm working) 
and checked them with my own QXLWin program. The headers looks strange 
to me:


On the 4 MB I see these dubious fields:

* Sectors per map = 21
* Number  of maps = 100
* Root directory length = 58

On the 20 MB I see these dubious fields:

* Sectors per map = $A1 (161)
* Number  of maps = 100
* Root directory length = 58

I've had a quick look at the definition of a QLWA header in the code and 
it appears slightly broken. Some of the fields I would think essential 
are not being used - sectors per block for example. That changes as the 
files grow bigger and might be related to your problems.


I'll see what I can do - there are still quite a few compilation 
warnings I need to get rid of first.



Cheers,
Norm.


___
QL-Users Mailing List

Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-05 Thread Norman Dunbar via Ql-Users

On 05/02/2019 10:07, pgraf--- via Ql-Users wrote:
Hi Peter,


Can you give me an example of how to reproduce the problem(s) you are
seeing? I've just created a 20 MB qxl.win with no problems. (So far!)


Unfortunately not right now, and my memory is vague. I think that
all issues were gone with 16 MB and less. My next image size step
was probably 32 MB, not just 20 MB.

It could be, that just recompiling the latest qxltool source with an
up-to-date compiler and library makes the issues disappear.


I've created a couple of qxl.win files (at coffee time - I'm working) 
and checked them with my own QXLWin program. The headers looks strange 
to me:


On the 4 MB I see these dubious fields:

* Sectors per map = 21
* Number  of maps = 100
* Root directory length = 58

On the 20 MB I see these dubious fields:

* Sectors per map = $A1 (161)
* Number  of maps = 100
* Root directory length = 58

I've had a quick look at the definition of a QLWA header in the code and 
it appears slightly broken. Some of the fields I would think essential 
are not being used - sectors per block for example. That changes as the 
files grow bigger and might be related to your problems.


I'll see what I can do - there are still quite a few compilation 
warnings I need to get rid of first.



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
___
QL-Users Mailing List


Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-05 Thread pgraf--- via Ql-Users
Hi Norm,

> > Sounds good. I could compile qxltools, but that was long ago. My concern
> > are image sizes over 16 MB and some strange characters in the
> > commandline output.
> 
> What problems do you have with 16MB files? I presume you mean that the 
> qxl.win file is over 16Mb, and it's not a problem of writing something 
> that big into a qxl.win?

Yes, I mean QLWA image sizes over 16 MB, not file sizes.

> I don't see any weirdness on the command line output though. I'm mainly 
> on Linux which might be helping.

More on the Windoze side here.

> Can you give me an example of how to reproduce the problem(s) you are 
> seeing? I've just created a 20 MB qxl.win with no problems. (So far!)

Unfortunately not right now, and my memory is vague. I think that 
all issues were gone with 16 MB and less. My next image size step 
was probably 32 MB, not just 20 MB.

It could be, that just recompiling the latest qxltool source with an 
up-to-date compiler and library makes the issues disappear.

Peter

___
QL-Users Mailing List


Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-05 Thread Norman Dunbar via Ql-Users

On 04/02/2019 17:25, Peter Graf wrote:


Sounds good. I could compile qxltools, but that was long ago. My concern
are image sizes over 16 MB and some strange characters in the
commandline output.


What problems do you have with 16MB files? I presume you mean that the 
qxl.win file is over 16Mb, and it's not a problem of writing something 
that big into a qxl.win?


I don't see any weirdness on the command line output though. I'm mainly 
on Linux which might be helping.


Can you give me an example of how to reproduce the problem(s) you are 
seeing? I've just created a 20 MB qxl.win with no problems. (So far!)



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
___
QL-Users Mailing List


Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-04 Thread Peter Graf via Ql-Users
Hi Norm,

> One of the reasons I did some work was a recent almost total loss of over 300 
> floppies going back many years.

Oh my. That sounds similiar to my Q60 harddisk loss long ago.

> I have qxltools on my laptop but haven't looked at it for ages, I think I had 
> problems compiling it - but I can't remember. It might well be in line for 
> some tittivation!

Sounds good. I could compile qxltools, but that was long ago. My concern
are image sizes over 16 MB and some strange characters in the
commandline output.

All the best
Peter
___
QL-Users Mailing List


Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-03 Thread simon629--- via Ql-Users
 You may want to try a older Version of QPC2 but Some THINGS` work better on 
the old Version Then the New Version  you just see  what works Right for you
On Saturday, 2 February 2019, 22:18:33 GMT, Norman Dunbar via Ql-Users 
 wrote:  
 
 Hi Peter.

One of the reasons I did some work was a recent almost total loss of over 300 
floppies going back many years. They had all seized in the cases and refused to 
rotate. I have "ripped" the ones that still work onto my Linux laptop for 
posterity. Qltools comes in handy as I cannot get QPC 4.0.5 to read a floppy 
image. I get not found errors. But I'm running under Wine, which might be 
contributing.

I have qxltools on my laptop but haven't looked at it for ages, I think I had 
problems compiling it - but I can't remember. It might well be in line for some 
tittivation!

Cheers,
Norm.

On 2 February 2019 08:28:53 GMT+00:00, Peter Graf via Ql-Users 
 wrote:
>Norman Dunbar via Ql-Users wrote:
>> Revision 2.15.5
>> 
>> [...]
>> 
>> If you enjoy using this half as much as I've enjoyed amending it,
>then 
>> I've had twice as much fun as you! :o)
>
>That's great work! But like many, I went from floppy images to harddisk
>images to be honest. Most native machines now support SD cards as
>removable media.
>
>So what I have to use for the commandline is "qxltool" rather than
>"qltools". Is there any chance that "qxltool" also receives some
>maintainance?
>
>All the best
>Peter
>___
>QL-Users Mailing List

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
QL-Users Mailing List
  
___
QL-Users Mailing List

Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-02 Thread Norman Dunbar via Ql-Users
Hi Peter.

One of the reasons I did some work was a recent almost total loss of over 300 
floppies going back many years. They had all seized in the cases and refused to 
rotate. I have "ripped" the ones that still work onto my Linux laptop for 
posterity. Qltools comes in handy as I cannot get QPC 4.0.5 to read a floppy 
image. I get not found errors. But I'm running under Wine, which might be 
contributing.

I have qxltools on my laptop but haven't looked at it for ages, I think I had 
problems compiling it - but I can't remember. It might well be in line for some 
tittivation!

Cheers,
Norm.

On 2 February 2019 08:28:53 GMT+00:00, Peter Graf via Ql-Users 
 wrote:
>Norman Dunbar via Ql-Users wrote:
>> Revision 2.15.5
>> 
>> [...]
>> 
>> If you enjoy using this half as much as I've enjoyed amending it,
>then 
>> I've had twice as much fun as you! :o)
>
>That's great work! But like many, I went from floppy images to harddisk
>images to be honest. Most native machines now support SD cards as
>removable media.
>
>So what I have to use for the commandline is "qxltool" rather than
>"qltools". Is there any chance that "qxltool" also receives some
>maintainance?
>
>All the best
>Peter
>___
>QL-Users Mailing List

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
QL-Users Mailing List


Re: [Ql-Users] QLTools - 2.15.5 available

2019-02-01 Thread Wolfgang Lenerz via Ql-Users

Hi,

That's quite a changelog!

Wolfgang



Revision 2.15.5

1) Now compiles under Windows with Gcc. I used CodeBlocks with the built 
in 32bit gcc to do the builds. There's also a makefile for shell usage.


2) Fixed 32bit bug in formatting an ed image file. It would segfault on 
Windows 64bit when compiled as 32bit, but not as a 64 bit build. Turned 
out to be a bug in my 'ed' formatting code.


3) If the image file doesn't exist, it will now be created when 
formatting an image.


4) Files were being corrupted when extracted from an image with the '-n' 
option. This was because the 'DOS_LIKE' define was not being done on 
modern C compilers/operating systems. It is now! The corruption was to 
add a CR in front of every LF in the file.


5) When changing the dataspace of a file with '-x' the dataspace size 
was allowed to be an odd size. I'm sure this causes trouble on a QL, so 
it now gets rounded up if it is odd.


6) The '-M' option to create a level 2 directory wasn't working. This 
was because it was opening the image file in read only mode. I may have 
been responsible for breaking this - but don't quote me. It's fixed now.


7) Dumping an ED cluster with the '-u' option (ASCII dump) was only 
dumping 32 lines of 16 bytes - 512 bytes in total. The number of lines 
was hard coded. It has been changed to calculate the number of lines 
from the sector size. This option now works for ED drives as well.


8) Windows uses the '/' character for command line options, unlike Linux 
which uses '-' and while there was some code that allowed the '/' when 
'DOS_LIKE' was defined, it wasn't in all the places it needed to be. Now 
it is. Windows users have the choice of whichever flag symbol they like. 
(Well, '-' or '/' is all the choice actually!)


9) Slightly weird. If the '-w' option was used to write a file into an 
image, and that that file was already there, it didn't prompt to 
overwrite. I spent ages tracking it down and it turned out that running 
in a Windows command session does prompt, only running in a bash shell, 
on Windows, does it not prompt. As most users won't be in my development 
bash shell, I'm not fixing this.


10) Source Code is available from https://github.com/NormanDunbar/qltools.

11) Compiled binaries for 32/64 bit Windows and Linux are also available 
from https://github.com/NormanDunbar/qltools/releases - along with a new 
user guide.


If you enjoy using this half as much as I've enjoyed amending it, then 
I've had twice as much fun as you! :o)



Cheers,
Norm.


___
QL-Users Mailing List


[Ql-Users] QLTools - 2.15.5 available

2019-02-01 Thread Norman Dunbar via Ql-Users

Revision 2.15.5

1) Now compiles under Windows with Gcc. I used CodeBlocks with the built 
in 32bit gcc to do the builds. There's also a makefile for shell usage.


2) Fixed 32bit bug in formatting an ed image file. It would segfault on 
Windows 64bit when compiled as 32bit, but not as a 64 bit build. Turned 
out to be a bug in my 'ed' formatting code.


3) If the image file doesn't exist, it will now be created when 
formatting an image.


4) Files were being corrupted when extracted from an image with the '-n' 
option. This was because the 'DOS_LIKE' define was not being done on 
modern C compilers/operating systems. It is now! The corruption was to 
add a CR in front of every LF in the file.


5) When changing the dataspace of a file with '-x' the dataspace size 
was allowed to be an odd size. I'm sure this causes trouble on a QL, so 
it now gets rounded up if it is odd.


6) The '-M' option to create a level 2 directory wasn't working. This 
was because it was opening the image file in read only mode. I may have 
been responsible for breaking this - but don't quote me. It's fixed now.


7) Dumping an ED cluster with the '-u' option (ASCII dump) was only 
dumping 32 lines of 16 bytes - 512 bytes in total. The number of lines 
was hard coded. It has been changed to calculate the number of lines 
from the sector size. This option now works for ED drives as well.


8) Windows uses the '/' character for command line options, unlike Linux 
which uses '-' and while there was some code that allowed the '/' when 
'DOS_LIKE' was defined, it wasn't in all the places it needed to be. Now 
it is. Windows users have the choice of whichever flag symbol they like. 
(Well, '-' or '/' is all the choice actually!)


9) Slightly weird. If the '-w' option was used to write a file into an 
image, and that that file was already there, it didn't prompt to 
overwrite. I spent ages tracking it down and it turned out that running 
in a Windows command session does prompt, only running in a bash shell, 
on Windows, does it not prompt. As most users won't be in my development 
bash shell, I'm not fixing this.


10) Source Code is available from https://github.com/NormanDunbar/qltools.

11) Compiled binaries for 32/64 bit Windows and Linux are also available 
from https://github.com/NormanDunbar/qltools/releases - along with a new 
user guide.


If you enjoy using this half as much as I've enjoyed amending it, then 
I've had twice as much fun as you! :o)



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
___
QL-Users Mailing List