Author Topic: X-Mass Application  (Read 34514 times)

0 Members and 1 Guest are viewing this topic.

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #100 on: 20:44, 20 March 16 »
Ok,I agree of what you wrote but why don't simply use some unused bytes into the boot ? I was thinking about fake serial number written in the Boot.... for example...
My philosophy : It will be easy and faster to find the last sector written (and store here) instead of searching on the whole fat the most bigger sector.

All you have to do is :

On each file written, you'll just have to write the last sector used and store it onto the boot (sector 0) in the fake serial number.
I don't know if i'm definitively clear...
« Last Edit: 20:47, 20 March 16 by Ast »
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 810
  • Country: au
    • index.php?action=treasury
    • Awards
Re: X-Mass Application
« Reply #101 on: 21:22, 20 March 16 »
And what happens when someone writes to the drive using another tool that doesn't update your magic value? You just overwrite the sector and corrupt the drive?
like
0
No reactions

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #102 on: 21:29, 20 March 16 »
Right !
That's why we discuss about making Something compatible and usable by all.

Edit : That's why i've decided to open "the solution" i used and discuss with other people to see how they do.
« Last Edit: 21:33, 20 March 16 by Ast »
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline Fessor

  • CPC6128
  • ****
  • Posts: 265
  • Country: de
    • Awards
Re: X-Mass Application
« Reply #103 on: 21:36, 20 March 16 »
Why not storing it in the Place where a/the Bootloader would reside at the Bootsector?

*edit*
But, how will this value be helpful when the drive gets more and more fragmentated over the time?
*/edit*
« Last Edit: 21:43, 20 March 16 by Fessor »
like
0
No reactions

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.022
    • Awards
Re: X-Mass Application
« Reply #104 on: 21:36, 20 March 16 »
It's a bit late in the day to try and persuade everyone of a new requirement for FAT drives. And then you have the problem that the last written block may not be immediately followed by a free block, so you're just going to end up moving the scan to the end of each block write, rather than the beginning....
like
0
No reactions

Offline Singaja

  • CPC6128
  • ****
  • Posts: 174
  • Country: pl
    • Awards
Re: X-Mass Application
« Reply #105 on: 21:41, 20 March 16 »
The incorrect bootloader could mess up with other operating systems so I think it's not the best approach.
My idea is following use the volume serial , and the most safe 5-th byte of OEM as checksum mod 255 (or any other approach squeezing the checksum to 1byte). The chances of fake-positive clash from other systems not using this approach would be very very low.
« Last Edit: 21:44, 20 March 16 by Singaja »
like
0
No reactions

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 887
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: X-Mass Application
« Reply #106 on: 21:51, 20 March 16 »
And what happens when someone writes to the drive using another tool that doesn't update your magic value? You just overwrite the sector and corrupt the drive?

Pelrun and Andycadley are right. IMHO such a hack doesn't make much sense. At least in SymbOS I am not allowed to do such a trick at all, as it runs on systems which removeable IDE devices, and which are also handled by the native OSes of the machines (MSX-DOS, EXOS). If SymbOS would use such an optimizations, people would destroy their filesystems/storages. The same for the CPC and the SYMBiFACE II: You usually swap CF-cards/harddiscs with a PC for transfering data, and in this case it would be corrupted, too.
It would be an X-MASS-only solution, but why should you limit your new IDE-DOS in this way?
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #107 on: 21:56, 20 March 16 »
It would be an X-MASS-only solution, but why should you limit your new IDE-DOS in this way?
But, for information, iMPdos was first developped for the x-Mass :)
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 810
  • Country: au
    • index.php?action=treasury
    • Awards
Re: X-Mass Application
« Reply #108 on: 21:57, 20 March 16 »
That's why we discuss about making Something compatible and usable by all.
No, there will always be someone who uses a tool that doesn't follow your "standard". Or they connect the DOM to their PC to access it.

Since you can't force everyone to update their FAT support, and you can't force your users to only use the tools you cooperate with, the only correct way to handle this is to do it the way the FAT standard tells you to. Any "shortcut" you try to implement will be *wrong*. You may as well make your own format and renounce any sort of FAT compatibility.
« Last Edit: 21:59, 20 March 16 by pelrun »
like
0
No reactions

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #109 on: 22:02, 20 March 16 »
ah! That's better like that.
I don't want to force anyone to use a system instead of his own.

« Last Edit: 22:05, 20 March 16 by Ast »
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline Singaja

  • CPC6128
  • ****
  • Posts: 174
  • Country: pl
    • Awards
Re: X-Mass Application
« Reply #110 on: 22:07, 20 March 16 »
Correct me if I'm wrong but if there was a way to identify whether Ast's optimisation is used or not wouldn't it be good enough? If a drive is not using it, a search would be made to find the value and it would get stored then. Maybe I'm missing something
« Last Edit: 22:16, 20 March 16 by Singaja »
like
0
No reactions

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 887
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: X-Mass Application
« Reply #111 on: 22:17, 20 March 16 »
Correct me if I'm wrong but if there was away to identify whether Ast's optimisation is used or not wouldn't it be good enough? If a drive is not using it, a search would be made to find the value and it would get stored then. Maybe I'm missing something
Standard FAT-implementations don't know about Asts modification, and there is no fast way for iMPdos to find out, if a drive was modified by a system with standard FAT-implementation.
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Singaja

  • CPC6128
  • ****
  • Posts: 174
  • Country: pl
    • Awards
Re: X-Mass Application
« Reply #112 on: 22:21, 20 March 16 »
Standard FAT-implementations don't know about Asts modification, and there is no fast way for iMPdos to find out, if a drive was modified by a system with standard FAT-implementation.
My idea is following use the volume serial , and the most safe 5-th byte of OEM as checksum mod 255 (or any other approach squeezing the checksum to 1byte). The chances of fake-positive clash from other systems not using this approach would be very very low.

I just proposed a relatively fast way few posts back^.
like
0
No reactions

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 887
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: X-Mass Application
« Reply #113 on: 22:29, 20 March 16 »

I just proposed a relatively fast way few posts back^.

Maybe I don't get you, but another FAT implementation wouldn't change the volume serial/OEM. So how should you recognize any changes on the filesystem?
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Singaja

  • CPC6128
  • ****
  • Posts: 174
  • Country: pl
    • Awards
Re: X-Mass Application
« Reply #114 on: 22:48, 20 March 16 »
Maybe I don't get you, but another FAT implementation wouldn't change the volume serial/OEM. So how should you recognize any changes on the filesystem?
Let's consider the case of Dos/Windows formatted FAT16. It will have some arbitrary 4byte volume serial number and OEM of something like "DOS  5.0" "WIN  4.0" (I did this cover the other OEMs in detail in my previous post for reference). Now the drive gets connected and it's X-mass like device running on CPC.
Ast's Impdos reads the 4byte volume serial and computes a checksum. I did suggest using a 1 byte checksum (it's not a necessary condition though a bigger checksum would be even better), because that would be least invasive for DOS3.x from various vendors (also covered in my OEM post).
Now the computed checksum is checked against the place against where the stored checksum is expected. If they are not equal (and for the above case they should not be equal but it's important to minimise the chance of false positive clash) then voila it's not a "pimped by Ast" Fat16 so time for searching. When done the value is found it should get stored, the checksum computed and stored too. The opposite case is pretty straightforward, the volume serial vs the checksum matches so it's safe to use the volume serial storing Ast's special value.
 
like
0
No reactions

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #115 on: 22:58, 20 March 16 »
That's exactly this way... This debate is very exciting.
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 810
  • Country: au
    • index.php?action=treasury
    • Awards
Re: X-Mass Application
« Reply #116 on: 23:09, 20 March 16 »
Step 1. Use the drive with iMPdos so that it sets this custom value.
Step 2. Write to the drive with something else that doesn't update the value and *doesn't* automatically overwrite the volume label.
Step 3. Write to the drive with iMPdos. iMPdos reads the label, sees the checksum is intact, reads the custom value, then overwrites the wrong sector with new data. BAM, you've corrupted it.


The *only* way to ensure you don't hit a corruption path is to ensure it's only ever written to by iMPdos. At that point, there's no reason to pretend to be FAT compatible, you're effectively doing your own thing anyway.
like
0
No reactions

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 887
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: X-Mass Application
« Reply #117 on: 23:43, 20 March 16 »
Step 2. Write to the drive with something else that doesn't update the value and *doesn't* automatically overwrite the volume label.
...which is usual for all FAT-implementations. So this is the standard case.

Step 3. Write to the drive with iMPdos. iMPdos reads the label, sees the checksum is intact, reads the custom value, then overwrites the wrong sector with new data. BAM, you've corrupted it.
And because of this such hacks won't work, when using multiple FAT-implementations for the same storage.

Did you already test, how long it takes to find the first free cluster on a 128MB DOM which is nearly full, when starting from the beginning?
As I said before, you only need to do it once after booting, so even if it takes some seconds it's not an issue IMHO.
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Singaja

  • CPC6128
  • ****
  • Posts: 174
  • Country: pl
    • Awards
Re: X-Mass Application
« Reply #118 on: 23:59, 20 March 16 »
Step 1. Use the drive with iMPdos so that it sets this custom value.
Step 2. Write to the drive with something else that doesn't update the value and *doesn't* automatically overwrite the volume label.
Step 3. Write to the drive with iMPdos. iMPdos reads the label, sees the checksum is intact, reads the custom value, then overwrites the wrong sector with new data. BAM, you've corrupted it.


The *only* way to ensure you don't hit a corruption path is to ensure it's only ever written to by iMPdos. At that point, there's no reason to pretend to be FAT compatible, you're effectively doing your own thing anyway.
Ok, I must admit this is a problem. I'm reading about Last Access Time and/or Write Access Time of Directory Entry Structure (having the root directory in mind). Perhaps it could be useful but I'll need my mind fresh to evaluate it. More to come I hope  :P
« Last Edit: 00:01, 21 March 16 by Singaja »
like
0
No reactions

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.472
  • Country: au
  • I know RST3 . I now know a little More.
    • Awards
Re: X-Mass Application
« Reply #119 on: 00:06, 21 March 16 »
@Ast
Please make Impdos fully compatible with FAT 16.

Quote from Prodatron
""Did you already test, how long it takes to find the first free cluster on a 128MB DOM which is nearly full, when starting from the beginning?As I said before, you only need to do it once after booting, so even if it takes some seconds it's not an issue IMHO.""

Please keep up the good work.Ray
like
0
No reactions
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 887
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: X-Mass Application
« Reply #120 on: 00:15, 21 March 16 »
I'm reading about Last Access Time and/or Write Access Time of Directory Entry Structure (having the root directory in mind).
I think there is no rule to update timestamps of parent directories, if you write into sub directories. So this shouldn't work as well.

@Ast
Please make Impdos fully compatible with FAT 16.
I agree! :)
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #121 on: 17:02, 22 March 16 »
Here is a new video showing iMPdos in action... It's good and Fast ! Mmmmm !

[YouTube]https://HuZn1X_RnGY[/youtube]

Do you agree ?
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.870
  • Country: gb
    • index.php?action=treasury
    • Mundo CPC
    • Awards
Re: X-Mass Application
« Reply #122 on: 17:11, 22 March 16 »
It is really awesome!

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #123 on: 18:36, 22 March 16 »
A new video, just to show you how you can copy all files from drive a/b to x-Mass.
Usage :
├╣copy,"* -> copy all files

[YouTube]l6DlV7hG4kQ[/youtube]

Life is so beautifull!
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.245
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
Re: X-Mass Application
« Reply #124 on: 18:08, 23 March 16 »
As you probably know, you can't write many and many files on your x-Mass.
Fat 16 has his limit. Root can allow up to 512 files and Directory up to 64 files per directory, of course.
It's what's i did this afternoon. Result ? It works very well.

[YouTube]W7qW8bVWcCQ[/YouTube]
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !