EN
Patch for Unerase and Fragmentation v 1.1 (PUF)

Designed for: Hard media: harddisk, CF cards, SD cards
Not apt for: Diskettes
Released: October, 24 th, 2010.

When I was working with TRDOS (thanks to Velesoft's PROFI Interface, and because I also work with BSDOS 308, I realised that marvelous feature TRDOS does provide, that you can undelete all files on the diskette.Those of you being familiar with BSDOS also know one of his very comfortable command UNERASE, that will undelet the already deleted file. In real life, however, this command works 100% in only such cases, when you have not saved anything since the last deleted file. Once you have, most probably tough luck for you, the deleted file cannot be unerased anymore.
I said to myself the other day, while I was working with TRDOS again, that BSDOS could manage to write on the disk the same way like TRDOS does. But BSDOS 308 as it is designed from its beginning is primarily targeted to work with floppy diskettes and saves the data from the unerase point of view totally inappropriately. You ask why? It is because of data record reliability. On a magnetic media, the sectors placed on an outer part of the disc are physically longer then they are towards the center of the disc, and that is why the data record is more reliable and stable than it is on the inner sectors. True, that data record reliability has for the user priority over the posibility to unerase files. Yes, this has its reasonable sense at diskettes. But most of us is using IDE devices for years meaning, that the quality of the record is constant and stable throughout the entire media and therefore the existing sequencing of sectors on the disc is loosing its meaning. Contrary to that, if we have stable data record at every single media data sector, we demand some extra feature from BSDOS. It is where PUF is taking its place.
I asked Busy, the author of BSDOS 308, if we could do anything about it and his answer was, that we could and we could quite easily. With a rather small portion of labour we created a new patch. Busy wrote a new sector allocation routine, told me what to set and what to delete, I realised his knowledge into practise and we are giving in the fruits of our effort.

What does the new patch brings ? The main feature of the new patch is reliable UNERASE. If you save on or delete from the disk and you still have free sectors towards the end of media, then you 100% unerase all previously deleted files. While the "old" BSDOS allocated sectors for a new file in a way, that is was always seeking from the media beginning and saved immediatelly into sectors he thus found and it could have meant that the sector is part of some deleted file, the "new" BSDOS works in a way, that it allocates free sectors right after the last saved file towards the end of the media. Only when there are no more such free sectors left, it gets back to the beginning of the media and is seeking if there are any free sectors left behind deleted files. Another great effect of such way of allocation is less file fragmentation. Only after free sectors towards the end of media has ran out, sectors that are left behind the deleted files are being allocated, if there are any, and only now the 100% funcionality of the UNERASE command cease to function. Yet, even now the probability that we will successfuly undelete the file is far more likely than at the "old" BSDOS. Give it a try and activate the patch, then format a disk, save 30 files onto it, unerase them immediatelly and save another 30 files. BSDOS will give them numbers 31-60. Now, type in .UNERASE 1 TO 30 and good Lord, first 30 files woke back to life, just as if you had just freshly saved them. With the "old" BSDOS such action would never work. It arises from what has been said, that if you want to stay with the old good diskettes and data record stability is your priority over the possibility to better unerase deleted files, then do not use this patch.

Part of the package is also a testing routine that will tell you wether you have got the patch installed or not (I used it mainly at testing). Tests were conducted and analysed by Busy himself:-), and turned out to be flawless and therefore the patch can be proclaimed error free, so this is no beta version.

Another PUFs add-on is that while most of patches steal system's memory, this one is adding flatly about 30 bytes. Lovely, isn't it:-))? Many successfuly unerased files wish Busy and Hood:-))







CZ
Patch for Unerase and Fragmentation v 1.1 (PUF)

Určeno pro: Pevná média: harddisk, CF karty, SD karty
Nevhodné pro: Diskety
Vydáno: 24.11.2010

Když jsem díky Velesoftově PROFI interfacu pracoval s TRDOSem, a jelikož pracuji i s BSDOSem 308, tak jsem si uvědomil, jakou báječnou vlastnost TRDOS poskytuje, že totiž lze obnovit všechny soubory na disketě. Kdo zná BSDOS, ví, že mezi jeho komfortní příkazy patří také UNERASE- obnova již smazaného souboru. V praxi ovšem tento příkaz funguje 100% spolehlivě pouze v případě, pokud jste od smazaní souboru nic jiného neuložili. Pokud jste něco již uložili, většinou máte smůlu a soubor nelze příkazem UNERASE obnovit.
Jednoho dne jsem si nad TRDOSem řekl, že tak jak zapisuje TRDOS, mohl by umět zapisovat i BSDOS. No jo, jenomže BSDOS 308, od svého počátku určen pro práci s přenosnými disketami, ukládá data z pohledu obnovy souboru naprosto nevhodně. Ptáte se proč? Je to kvůli spolehlivosti záznamu. Na magnetickém médiu jsou sektory na vnějším obvodu kotoučku větší než směrem ke středu a proto je záznam na vnějších sektorech spolehlivější, než na vnitřních. Přeci jen spolehlivost záznamu má pro uživatele větší význam než možnost obnovy souboru. Ano, toto má své opodstatnění u disket. Ale většina z nás již roky používé nějaké IDE zařízení, kde kvalita záznamu je všude stejná a proto staré řazení sektorů na disku při jejich ukládání ztrácí svůj význam. A naopak, když máme ve všech sektorech stejně spolehlivý záznam, tak chceme od BSDOSu nějakou tu vymoženost navíc. A tou je právě PUF.
Oslovil jsem Busyho, autora BSDOSu 308, jestli by se s tím něco dalo dělat a on odpověděl, že dalo a to velice snadno. Za relativně malého úsilí jsme vytvořili nový patch. Busy napsal novou alokační rutinu pro sektory, řekl mi co a jak nastavit, co kde vymazat, já se toho chopil a udělal jsem praktickou realizaci a výsledek zde předkládáme.

Co nový patch přináší? Hlavní vlastnost nového patche je spolehlivý UNERASE. Když na disk ukládáte nebo klidně i z disku mažete a stále vám zbývají volné sektory směrem ke konci média, tak 100% obnovíte všechny smazané soubory. Zatímco "starý" BSDOS alokoval sektory pro nový soubor tak, že hledal vždy od začátku média a do volného sektoru data hned uložil, což znamenalo, že volný sektor mohl být sektor po právě smazaném souboru, tak "nový" BSDOS pracuje tak, že alokuje volné sektory vždy po posledním uloženém souboru směrem ke konci média. Teprve až mu na konci média nezbývají žádné volné, tak potom se vrací na začátek a hledá, zda není nějaký volný sektor po smazaném souboru. Důsledkem takové alokace je mimo jiné i mnohem menší fragmentace souborů. Teprve až nám na médiu dojdou volné sektory ke konci média, tak se začnou alokovat sektory po smazaných souborech, jsou-li takové, a teprve tehdy přestává být funkčnost příkazu UNERASE stoprocentní. Pořád je ale pravděpodobnost, že se nám soubor podaří obnovit mnohem větší než u "starého" BSDOSu. Schválně si aktivujte patch, naformátujte disk, uložte na něj třeba 30 souborů, pak je hned všechny smažte a uložte si dalších třicet. BSDOS jim přidělí čísla 31-60. Teď zadejte příkaz .UNERASE 1 TO 30 a světe div se, prvních třicet souborů je obnovených, jako byste je právě uložili. Se "starým" BSDOSem by vám taková obnova vůbec nefungovala. Z výše řečeného vyplývá, že budete-li chtít používat diskety a spolehlivost záznamu je pro vás důležitější než možnost lépe obnovovat soubory, pak tento patch nepoužívejte.

Součástí balíčku je i testovací rutina, která po spuštění zjistí, zda patch máte nebo nemáte naisntalovaný (používal jsem hlavně při testování). Testy, které řídil a vyhodnotil sám Busy:-), dopadly bez závad, proto lze patch prohlásit za stoprocentní, nejde o betaverzi.

Dalším přínosem PUFa je, že zatímco patche většinou samotnému systému pamět ubírají, tento naopak přidáva, a to cca 30 bajtů. No není to nádhera?:-)) Hodně úspešně obnovených souborů přejí Busy a Hood:-))