Here is a quick question - how do you extend a qxl.win file to make it bigger?
Hopefully, the answer is not to create a new one and then copy all the files over - I seem to remember QTOP can do this, retaining all of hte sub-directories, but can't remember!
Out of space on qxl.win file
-
- RWAP Master
- Posts: 2890
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Out of space on qxl.win file
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Out of space on qxl.win file
Sorry, but that is the correct answerRWAP wrote:Here is a quick question - how do you extend a qxl.win file to make it bigger?
Hopefully, the answer is not to create a new one and then copy all the files over - I seem to remember QTOP can do this, retaining all of hte sub-directories, but can't remember!

(The following for QPC2 only)
WIN_DRIVE 8, "C:\QL\Win\New.win"
WIN_FORMAT 8, 1
FORMAT 'win8_<new size in Mb>'
Code: Select all
10 REMark QLone a drive - Use at own risk!
11 :
12 source$ = 'win2_': dir$ = ''
13 target$ = 'win8_'
14 :
15 CLS
16 PRINT 'Press <ENTER> to clone'! source$; dir$! 'to'! target$!: INPUT r$
17 IF r$ <> '': STOP
18 :
19 dcount = 0: fcount = 0: ttaken = DATE
20 ERT QLone(source$, dir$, target$)
21 PRINT\ 'Done!'
22 PRINT dcount! 'directories created'\ fcount! 'files copied'
23 PRINT 'Time taken'! (DATE - ttaken);'s'
24 :
25 DEFine FuNction QLone(sdv$, dir$, tdv$)
26 LOCal ch, lp, fl, ps, er, ty%, nm$
27 REMark GLObal counts
28 REMark Scan source directory tree and
29 REMark Create correponding structure under target
30 REMark Backup files, maintaining date
31 REMark V0.00, pjwitte, January 30th 2015
32 :
33 ch = FOP_DIR(sdv$ & dir$): IF ch < 0: RETurn ch
34 :
35 ps = 0: er = 0: fl = FLEN(#ch)
36 REPeat lp
37 IF ps >= fl: EXIT lp
38 GET#ch\ ps + 14; nm$: l% = LEN(nm$)
39 IF l% > 0 THEN
40 BGET#ch\ ps + 5, ty%
41 IF ty% = 255 THEN
42 PRINT 'Creating: >'! tdv$; nm$
43 er = FMAKE_DIR(tdv$ & nm$): IF er = -8: er = 0
44 IF er < 0: RETurn er
45 dcount = dcount + 1
46 er = QLone(sdv$, nm$, tdv$)
47 ELSE
48 PRINT 'Copying:'! sdv$; nm$! '..'
49 COPY_O sdv$ & nm$ TO tdv$ & nm$
50 SET_FUPDT \tdv$ & nm$, FUPDT(\sdv$ & nm$)
51 fcount = fcount + 1
52 END IF
53 END IF
54 IF er < 0: EXIT lp
55 ps = ps + 64
56 END REPeat lp
57 CLOSE#ch
58 RETurn er
59 END DEFine QLone
60 :
Code: Select all
10 REMark Rename QLWA Hard drive
11 REMark V0.00, pjw
12 REMark No channels must be open on hard drive!
13 :
14 drive% = 8 : REMark Drive number 1..8
15 name$ = 'Testing' : REMark New name
16 maxnl% = 10 : REMark MAX name length = 10
17 :
18 name$ = name$ & FILL$(' ', maxnl%)
19 cw = FOPEN("win" & drive% & '_*D2d'): ERT cw
20 GET#cw\ 0; sec$
21 IF sec$(1 TO 4) <> 'QLWA': CLOSE#cw: ERT -12
22 :
23 sec$ = sec$(1 TO 6) & name$(1 TO maxnl%) & sec$(17 TO LEN(sec$))
24 PUT#cw\ 0; sec$
25 CLOSE#cw
26 :
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: Out of space on qxl.win file
Rich,
I'm afraid that answer is the answer.
I am not aware of any possibility that an emulator could extend a native file (which would be needed to do such things). Thus, I'm pretty sure QTop would not be able to do that.
There is, however, a number of very nice backup programs around that actually make that undertaking extremely easy. Look here
http://www.dilwyn.me.uk/backup/
And I just saw Per's program - nice piece of recursive S*Basic programming, Per!
Regards,
Tobias
I'm afraid that answer is the answer.
I am not aware of any possibility that an emulator could extend a native file (which would be needed to do such things). Thus, I'm pretty sure QTop would not be able to do that.
There is, however, a number of very nice backup programs around that actually make that undertaking extremely easy. Look here
http://www.dilwyn.me.uk/backup/
And I just saw Per's program - nice piece of recursive S*Basic programming, Per!
Regards,
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Out of space on qxl.win file
Thanks. A benefit of publicizing is that one sees one's code anew, as if through the eyes of others (or so it seems to me). Hence I detected the following tweak (re QLone code above):tofro wrote: <>
And I just saw Per's program - nice piece of recursive S*Basic programming, Per!
Code: Select all
26 LOCal ch, lp, fl, ps, er, dt, ty%, nm$
..
49 LGET#ch\ ps + 52; dt
50 COPY_O sdv$ & nm$ TO tdv$ & nm$
51 SET_FUPDT \tdv$ & nm$, dt
52+

Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
- NormanDunbar
- Forum Moderator
- Posts: 2424
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Leeds, West Yorkshire, UK
- Contact:
Re: Out of space on qxl.win file
I haven't seen Per''s program, but I know it will be good!
My own WinBack available from Dilwyn site linked above, has a utility to prevent your recreation of the old data on the new disc from leaving lots and lots of empty spaces in the directory, as happens when you create the files first, then create the directories afterwards. Wasted space takes up more of your hard drive and extends the size of the main directory hugely. This slows down access via the directory as the blank entries are read and skipped. I did some testing of this back in the early 1990s.
Run the utility, rebuild_directory_structure, to create a SuperBasic program to recreate all your source drives directory structure first. Run the generated program to build the empty tree, then you can wcopy or WinBack the source drive to the newly created, larger, destination drive.
HTH.
Ps. There's some really nice recursive Super Basically code in the above utility, and in WinBack too!
Cheers,
Norm.
My own WinBack available from Dilwyn site linked above, has a utility to prevent your recreation of the old data on the new disc from leaving lots and lots of empty spaces in the directory, as happens when you create the files first, then create the directories afterwards. Wasted space takes up more of your hard drive and extends the size of the main directory hugely. This slows down access via the directory as the blank entries are read and skipped. I did some testing of this back in the early 1990s.
Run the utility, rebuild_directory_structure, to create a SuperBasic program to recreate all your source drives directory structure first. Run the generated program to build the empty tree, then you can wcopy or WinBack the source drive to the newly created, larger, destination drive.
HTH.
Ps. There's some really nice recursive Super Basically code in the above utility, and in WinBack too!

Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
-
- RWAP Master
- Posts: 2890
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Out of space on qxl.win file
Many thanks for all of the suggestions - Per's program is a winner and I have stored it here 

Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Out of space on qxl.win file
Does COPY_O preserve the file version? When Arvid Borretzen once has written his harddisk copy program, I suggested to take SG's GETHEAD an SETHEAD extensions to patch the file header after copying to preserve all extra Information. That was a good workaround.
I am not sure about FUPDT increasing the version...?
I am not sure about FUPDT increasing the version...?