FAT16 help needed!!! - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: FAT16 help needed!!!
Quoted text here. Click to load it

It is.  I was wondering if he'd be willing to release
his modifications.

But my configuration was done using the
Quoted text here. Click to load it

I sure would like to see it.





Re: FAT16 help needed!!!
Quoted text here. Click to load it
chip I
then
the

Well, I tried today to duplicate it but it's not working like it did before.
Generally here are the steps I followed back when this worked for me, this
is for uFlashTCP:

On the PC:

1) Download the latest FreeDOS and make sure these files are handy:

SYS.com, KERNEL.sys, KERNEL1.sys, COMMAND.com and optionally FDCONFIG.sys

The handiest way for me was to download the boot image and use Winimage to
extract the files.

2) Use the SYS command to create a copy of the boot sector. Use SYS /? for
help.

Here I used tftp from WATTCP and a private IP address. It's *much* faster
than the Xmodem stuff and DOWN.com isn't working anyway.

On the unit:

1) Use M-Systems format command: "dformat /win:EE000" where EE000 is the
address of their chip IIRC.
2) reboot
3) check C: is clean
4) use a utility that will allow you to write the boot sector, the one I use
is makedisk.exe but I don't remember now where I got it from. Optionally
write one, which I've also done but mine only worked for the A drive on a PC
and I never updated it. Oh, and write the boot sector onto the C: drive
using the image you created in PC Step 2.
5) It's fuzzy here, I can't remember if I had to create a dummy 512 area
following the boot sector image or if I just proceeded.
6) Copy KERNEL.sys, KERNEL1.sys and COMMAND.com to the C: drive.

Note: According to the uFlashTCP doc I'm supposed to change the JP3 jumper
to make the C: drive bootable but it seems that if I just lift the 2-4
jumper, remove and apply power then place it back before it reaches the
TrueFFS driver in the boot sequence then it tries to boot from the M-Systems
(C: drive) chip.

Anyway, this worked one time (way back when...) but as I said in the
beginning of this post, I wasn't able to get it working today. Several times
I got it to print the "FreeDOS" logo then it hangs like the jump into the
DOS code fails. I tried with both 512 bytes and 1024 byte images.

Suggestions welcome and if this helps in some way, that's also great!

Dilton




Re: FAT16 help needed!!!
Quoted text here. Click to load it

Thanks for writing it up.  I've gotten as far as
the freedos logo too, but I'm pleased to know that
you've actually gotten it to boot.







Re: FAT16 help needed!!!

Quoted text here. Click to load it
I
know
before.
this
FDCONFIG.sys
to
for
faster
use
a PC
jumper
M-Systems
Quoted text here. Click to load it
times
the

I found my old files! I'm going to review them and if I get it working again
I'll post the details here.



Re: FAT16 help needed!!!
Quoted text here. Click to load it
data
using
same
did
used
short
Winimage
the
I
Optionally
on
drive
area
the
again

I went back to the firmware files (downloaded them from M-Systems web site)
and used my original files (which was FreeDOS 7 IIRC) and the farthest I get
is:

Freedos loading...
ROOT FAT KERNEL GO!

which us supposed to mean that the boot code found KERNEL.sys and attempted
the jump there, then it hangs. I've successfully booted these images in a
Virtual PC session (and ONCE on the M-Systems disk in the past). So to get a
better understanding will require jumping into the FreeDOS source. According
to the M-Systems documentation there is no bad sector management using this
approach. If we were to write a custom set of firmware using their BDK then
we would get bad sector management automaticaly from their source.

So I'm suggesting that this could be some sort of contigious sector issue.
There are no other indications though. The writing seems to work without
error, I even tried to dump the bad sector table and get only a zero length
file, which I suppose means there are no bad sectors on the Flash disk. If I
turn up anything new I'll probably post it new.

Dilton




FAT16 filesystem



Quoted text here. Click to load it


Hi Jim,

 the code is GPL, and I'm waiting for Pat Villani's (the author of FreeDOS)
 feedback on this work. The homepage of the project is
http://www.foskeea.org
 and the whole project should be on-line by the end of the month.

 Enrico



Re: FAT16 help needed!!!



Quoted text here. Click to load it

Dear Sean,

 during the past year I worked on a project of porting the FreeDOS'
 filesystem to an embedded architecture. The first thing I did was
 to compile the fs under MSVC, then I did many tests on a floppy,
 formatted FAT16 as a 128 kilobytes removeable media. I used a
 boot sector created by Windows, because I wanted the fs be able
 to read and write files just like Windows. Initially I  had the same
 problems you had:

 Windows was able to see the files but each time I tried to open them up,
 it turned out to be empty. After several hours spent using WinHex,
 I found that if I add an empty sector (512 bytes) between the last
 sector of the root directory and the first data sector, Windows
 was able to read correctly those files. It's still a mystery for me....


 I just downloaded fatgen102.pdf and I promised my self to read
 it carefully in order to see if what I did is correct or not.


 Enrico


Re: FAT16 help needed!!!



Quoted text here. Click to load it

Dear Sean,

 during the past year I worked on a project of porting the FreeDOS'
 filesystem to an embedded architecture. The first thing I did was
 to compile the fs under MSVC, then I did many tests on a floppy,
 formatted FAT16 as a 128 kilobytes removeable media. I used a
 boot sector created by Windows, because I wanted the fs be able
 to read and write files just like Windows. Initially I  had the same
 problems you had:

 Windows was able to see the files but each time I tried to open them up,
 it turned out to be empty. After several hours spent using WinHex,
 I found that if I add an empty sector (512 bytes) between the last
 sector of the root directory and the first data sector, Windows
 was able to read correctly those files. It's still a mystery for me....


 I just downloaded fatgen102.pdf and I promised my self to read
 it carefully in order to see if what I did is correct or not.


 Enrico


Re: FAT16 help needed!!!
Quoted text here. Click to load it

Look at the allocation mechanism.  An allocated block is, IIRC, at
least 1k, not 512.  You are probably simply running into failure
of the translation between block number and the disk address,
involving 0 based or 1 based numbering.

BTW, one copy of your message will normally suffice :-)

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: FAT16 help needed!!!



Hi

Quoted text here. Click to load it

That might be the answer. I'll check.

Quoted text here. Click to load it

yes, sorry. I didn't do it on purpose.



Re: FAT16 help needed!!!
Quoted text here. Click to load it

The size of a block can be any number of sectors. Old 360K or 720K
format used normaly 2 sectors. 1.44M floppies used 1 sector blocks.
How many blocks you'll need depends on the size of a FAT entry and the
size of the medium.

The first block starts after the root directory, IIRC its sector
address is: 1 (for boot sector) + # of hidden sectors + # of FATs * #
of sectors per FAT + # of sectors for the root directory.

Ah, and yes, sector numbers start with 1, blocks with 0.
---
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline