Problems with DDOS12A and command KILL

Hardware Hacking, Programming and Game Solutions/Cheats
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Problems with DDOS12A and command KILL

Post by pser1 »

I am just copying here the text included in some messages of the thread "XRoar and 16k DOS" where I mixed two different problems:

==============================================================================================================================

I have noticed that DDOS12A has a flaw in the KILL command, it just modifies back to '1' (free) the sectors used by the first extent of the deleted file.
But forgets about the other extents ...
Testing DDOS11C with the same disks, it works well and ends up with the correct free bytes.
Unassembling both on two different XRoar sessions, there is a massive change at the end of the function DDosDeleteFile ($CFB6), the changes
affect from $CFEE to $D00A

Maybe I have got the wrong version ... I don't remember the differences between 11C and 12A (or 11 vs 12)

regards
pere
Last edited by pser1 on Sun Apr 26, 2015 3:37 pm, edited 1 time in total.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hi, Steve

I will give a peek at the whole document.
The code area that conflicts is this:
From $CFEE to $D000 is different code. DDOS11C works OK, DDOS12A doesn't
I attach here a VDK image to be used as test with both DOS
You can KILL any file that just uses an extent: DONKEY, BTRACK, ASTRO (this one should be Unprotected previously)
Both versions of DOS will work right.
But any of the others that use more than one extent in their directory entry, will fail giving as result the wrong free bytes number
In fact they just free the sectors of the very first extent, forgetting about the other extents ...

cheers
pere

PS. The contents of the disk (with a full VDIR)

Code: Select all

    Name     1LSN  No BLS  Bytes
BORIS   .BIN  324  36           
              252  36           
              216   6 202  19914
SPORES  .BIN  180  36           
              144  31 122  17018
ASTRO   .BINp 108  29  94   7262
GALAX   .BIN   72  36           
               36   7 135  10887
FROGGER .BIN    0  36           
              378  70 139  27019
DONKEY  .BIN  450  84  56  21304
BTRACK  .BIN  540  98   9  24841
MRDIG   .BIN  648  72           
               43  13 146  21650
 24064  FREE BYTES 
OK
Attachments
GAMTST.zip
VDK to test command KILL with DDOS11C and DDOS12A
(75.89 KiB) Downloaded 316 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Reading Philip Scott's patch document and referred to Problem2, he says that there are two ways to solve it:
patch a) that impies solving Problem 1 too, and
patch b) that implies reserving some RAM from $7FEF to store the patch there (code is PIC so could be allocated anywhere)

In DDOS12A, Problem1 is solved and patch a) for Problem2 has also been applied. Alright!

Strangely, someone added patch b) too, but placed it adding C000, so that the final 'killed code' is $CFEF onwards
Besides that, to be of use it needs bytes $0183/184 be modified so that they point to the new code
But this is NOT needed once we have applied patch a)
So, this part should be restored to the previously existent code there (can be copied from DDOS11C)

I am still comparing both DOS versions to find out more differences (documented or not)

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hi,
I attach here the P G Scott's document about how to solve the DDOS1.0 problems
and a document I have written with the differences that I have found comparing the two ROM files

I will modify DDOS12A to restore the part of KILL destroyed by the b patch for Problem 2 (was not needed)
At the same time I will apply the line 3 of the patch for Problem 4 (not yet done here)
Then I will create another version with the patch for Problem 5 applied (just for testing purposes)

Once done, I will upload both versions as DDOS12B and DDOS12T just to differentiate them

cheers
pere
Attachments
Comparison DDOS11c vs DDOS12a.zip
DDOS11C vs DDOS12A
(1.16 KiB) Downloaded 309 times
Correcting the faults and problems with Dragondos v1.0.zip
P G Scott's document
(5.58 KiB) Downloaded 330 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

I have modified DDOS12A and renamed the result as DDOS12B
Now it KILLs any file and restores all the sectors of every extent in the FAT

So, presumably is a bit better than version 12A, but needs more tests to be done
You can find it attached here

regards
pere

PS. The modified version with the patch for Problem 5 works painfully (DDOS12T)
I will have to verify if the doc I am using is the right one or maybe I have patched it the wrong way ...
I will not upload it until it performs as expected

EDIT: attachment deleted, see next post
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hi,
having read the Dragon Users of 1985-May and July, I have found two points in wich the old DDOS12B
that I had uploaded in my previous message, differs from the suggested values to be chaged ... so I have updated it and do upload it again
with the same name ...
Please, if you had downloaded the DDOS12B from my previous post, DELETE it and use this new version.

cheers
pere
Attachments
ddos12b.rom
modified version according to DUser mags
(8 KiB) Downloaded 306 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hello,
sorry I had not time to explain the last changes I made to correct the 1st DDOS12B file to the final uploaded version.

According to the issue July, 1985 of Dragon User (correction of errata into patches of May-1985 issue), I found:
- For Fault 6, the indirect table at the begining of the ROM has to be patched, this means pairs of bytes that are in
fact the entry address for certain functions. Well, the written (and applied) patch had changed only three bytes whilst in July issue there are FOUR bytes corrected.
I verified that the four bytes were pointing really to 'actual' entries to functions and both are OK, so I decided to modify the patch.
+001C D0 9D CF and converted it to
+001C D0 9D D0 CF
- For Problem 4 the solution patch occupies four lines of mods to do.
+179D 26 25 39 was one of these lines in May issue but in July issue we were told NOT to do that, instead we should do
+1795 20 E5 12 this one was already applied, so no problem
But the +179D was applied too, so I restored back the three 'old' bytes: 26 25 39

Hopefully now we could be more confident with that version DDOS12B, but you should better test it as much as possible
before switching to it.

cheers
pere
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Problems with DDOS12A and command KILL

Post by zephyr »

Thanks for the fix, Pere. :) Any chance you could apply the same fix to DragonDOS 1.2 (ddos12.rom)?
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hi Steve,
hope to have the time tomorrow afternoon.
Will give a peek at DDOS12dir as well, just to see if it is possible to do the same on it.
As soon as have it/them tested, I will upload it/them here.
Sorry for having changed the letter from A to B.
It was just a way to distinguish them, so now we have DDOS12A converted to DDOS12B
and DDOS12 that should be renamed as ... (?)
Just an idea ... if we are not afraid of number thirteen, we could have the new versions with that number and the same termination
DDOS12 => DDOS13
DDOS12A >= DDOS13A
DDOS12dir => DDOS13dir

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Problems with DDOS12A and command KILL

Post by pser1 »

Hi,
finally I have modified both DDOS12 and DDOS12dir so that they have the KILL bug corrected.
I am attaching here a zip with the three 'new' versions:
- DDOS13 corresponding to the old DDOS12
- DDOS13A related to old DDOS12A
- DDOS13dir derivated from old DDOS12dir
This last one will show as version number: 1.3D

To avoid moving some bytes to the right as was done in version DDOS12, I have put the letter ('D') in the place occupied by the intro ($0D) in the
version String. It works well, so we have not to change some six extra code bytes to move one byte to the right pointers/references to that area.

When I have compared the old versions DDOS12 and DDOS12A, I have found that in DDOS12 there is a long modification
that begins at $C08D (43 bytes long) that comprises the patch that solves Problem 5 of P G Scott's notes.
If I change only the bytes affected according to that document ($C09E:C0B5) it just produces garbage when trying DIR.
It seems that someone took the time to patch that patch and modified also the code $C08D:C09D getting a functional version.

As a last try, I will apply this 17 byte change to our DDOS13a just to verify if the pacth for Problem 5 could be included too ...
Tomorrow will let you know what happened

cheers
pere
Attachments
DOS-ROMs.zip
DDOS13, DDOS13A & DOS13dir
(20.87 KiB) Downloaded 324 times
Last edited by pser1 on Sun Nov 15, 2015 1:54 pm, edited 1 time in total.
Post Reply