Reply by Dilton McGowan II January 4, 20042004-01-04
"Dilton McGowan II" <nospam@nospam.net> wrote in message
news:58uJb.5220$Z76.3802@newssvr29.news.prodigy.com...
> > "Jim Stewart" <jstewart@jkmicro.com> wrote in message > news:bt5b7e$fci@library2.airnews.net... > > Dilton McGowan II wrote: > > > "Jim Stewart" <jstewart@jkmicro.com> wrote in message > > > news:bt35oa$r5n@library1.airnews.net... > > > > > >>Dilton McGowan II wrote: > > >> > > >>>"Jim Stewart" <jstewart@jkmicro.com> wrote in message > > >>>news:bt280g$f11@library2.airnews.net... > > >>> > > >>> > > >>>>Enrico Migliore wrote: > > >>>> > > >>>> > > >>>> > > >>>>>Sean Whitesell wrote: > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>>>My code is writting data to a CompactFlash card. I can see the
data
> > >>>>>>with WinHex. But, windows does not acknowledge the file. I'm
using
> > >>>>>>the same functions as examples that work elsewhere in the project. > I > > >>>>>>need help analyzing the FAT info to see where the problem is so I > know > > >>>>>>where the problem lies in the code. I have read the FAT specs and > > >>>>>>compared my file to good files and the differences are just not > > >>>>>>evident. Any help on this would be most appreciated. I'm really > > >>>>>>under the gun here. > > >>>>>> > > >>>>>>Sean W. > > >>>>> > > >>>>> > > >>>>>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: > > >>>> > > >>>> > > >>>>Any chance you could GPL the version of embedded > > >>>>Freedos that you created? > > >>>> > > >>>> > > >>> > > >>> > > >>>Not long after getting the uFlashTCP and ordering the 8 Meg M-Systems > > > > > > chip I > > > > > >>>got FreeDOS to run on it, so it's a good selling point Jim. I thought > > >>>FreeDOS was already GPL'd though. > > >> > > >>It is. I was wondering if he'd be willing to release > > >>his modifications. > > >> > > >>But my configuration was done using the > > >> > > >>>M-Systems chip as I don't have write access to the 512K chip. If I
did
> > > > > > then > > > > > >>>I imagine that the same technique would work for that. IIRC I just
used
> > > > > > the > > > > > >>>files from the FreeDOS download. If you're interested, I can do a
short
> > >>>write-up on the few steps. > > >> > > >>I sure would like to see it. > > >> > > >> > > >> > > >> > > > > > > > > > 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! > > > > 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. > > > > > > I found my old files! I'm going to review them and if I get it working
again
> I'll post the details here. > >
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
Reply by Dilton McGowan II January 3, 20042004-01-03
"Jim Stewart" <jstewart@jkmicro.com> wrote in message
news:bt5b7e$fci@library2.airnews.net...
> Dilton McGowan II wrote: > > "Jim Stewart" <jstewart@jkmicro.com> wrote in message > > news:bt35oa$r5n@library1.airnews.net... > > > >>Dilton McGowan II wrote: > >> > >>>"Jim Stewart" <jstewart@jkmicro.com> wrote in message > >>>news:bt280g$f11@library2.airnews.net... > >>> > >>> > >>>>Enrico Migliore wrote: > >>>> > >>>> > >>>> > >>>>>Sean Whitesell wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>My code is writting data to a CompactFlash card. I can see the data > >>>>>>with WinHex. But, windows does not acknowledge the file. I'm using > >>>>>>the same functions as examples that work elsewhere in the project.
I
> >>>>>>need help analyzing the FAT info to see where the problem is so I
know
> >>>>>>where the problem lies in the code. I have read the FAT specs and > >>>>>>compared my file to good files and the differences are just not > >>>>>>evident. Any help on this would be most appreciated. I'm really > >>>>>>under the gun here. > >>>>>> > >>>>>>Sean W. > >>>>> > >>>>> > >>>>>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: > >>>> > >>>> > >>>>Any chance you could GPL the version of embedded > >>>>Freedos that you created? > >>>> > >>>> > >>> > >>> > >>>Not long after getting the uFlashTCP and ordering the 8 Meg M-Systems > > > > chip I > > > >>>got FreeDOS to run on it, so it's a good selling point Jim. I thought > >>>FreeDOS was already GPL'd though. > >> > >>It is. I was wondering if he'd be willing to release > >>his modifications. > >> > >>But my configuration was done using the > >> > >>>M-Systems chip as I don't have write access to the 512K chip. If I did > > > > then > > > >>>I imagine that the same technique would work for that. IIRC I just used > > > > the > > > >>>files from the FreeDOS download. If you're interested, I can do a short > >>>write-up on the few steps. > >> > >>I sure would like to see it. > >> > >> > >> > >> > > > > > > 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! > > 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. > >
I found my old files! I'm going to review them and if I get it working again I'll post the details here.
Reply by Jim Stewart January 2, 20042004-01-02
Dilton McGowan II wrote:
> "Jim Stewart" <jstewart@jkmicro.com> wrote in message > news:bt35oa$r5n@library1.airnews.net... > >>Dilton McGowan II wrote: >> >>>"Jim Stewart" <jstewart@jkmicro.com> wrote in message >>>news:bt280g$f11@library2.airnews.net... >>> >>> >>>>Enrico Migliore wrote: >>>> >>>> >>>> >>>>>Sean Whitesell wrote: >>>>> >>>>> >>>>> >>>>> >>>>>>My code is writting data to a CompactFlash card. I can see the data >>>>>>with WinHex. But, windows does not acknowledge the file. I'm using >>>>>>the same functions as examples that work elsewhere in the project. I >>>>>>need help analyzing the FAT info to see where the problem is so I know >>>>>>where the problem lies in the code. I have read the FAT specs and >>>>>>compared my file to good files and the differences are just not >>>>>>evident. Any help on this would be most appreciated. I'm really >>>>>>under the gun here. >>>>>> >>>>>>Sean W. >>>>> >>>>> >>>>>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: >>>> >>>> >>>>Any chance you could GPL the version of embedded >>>>Freedos that you created? >>>> >>>> >>> >>> >>>Not long after getting the uFlashTCP and ordering the 8 Meg M-Systems > > chip I > >>>got FreeDOS to run on it, so it's a good selling point Jim. I thought >>>FreeDOS was already GPL'd though. >> >>It is. I was wondering if he'd be willing to release >>his modifications. >> >>But my configuration was done using the >> >>>M-Systems chip as I don't have write access to the 512K chip. If I did > > then > >>>I imagine that the same technique would work for that. IIRC I just used > > the > >>>files from the FreeDOS download. If you're interested, I can do a short >>>write-up on the few steps. >> >>I sure would like to see it. >> >> >> >> > > > 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!
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.
Reply by Dilton McGowan II January 2, 20042004-01-02
"Jim Stewart" <jstewart@jkmicro.com> wrote in message
news:bt35oa$r5n@library1.airnews.net...
> Dilton McGowan II wrote: > > "Jim Stewart" <jstewart@jkmicro.com> wrote in message > > news:bt280g$f11@library2.airnews.net... > > > >>Enrico Migliore wrote: > >> > >> > >>>Sean Whitesell wrote: > >>> > >>> > >>> > >>>>My code is writting data to a CompactFlash card. I can see the data > >>>>with WinHex. But, windows does not acknowledge the file. I'm using > >>>>the same functions as examples that work elsewhere in the project. I > >>>>need help analyzing the FAT info to see where the problem is so I know > >>>>where the problem lies in the code. I have read the FAT specs and > >>>>compared my file to good files and the differences are just not > >>>>evident. Any help on this would be most appreciated. I'm really > >>>>under the gun here. > >>>> > >>>>Sean W. > >>> > >>> > >>>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: > >> > >> > >>Any chance you could GPL the version of embedded > >>Freedos that you created? > >> > >> > > > > > > Not long after getting the uFlashTCP and ordering the 8 Meg M-Systems
chip I
> > got FreeDOS to run on it, so it's a good selling point Jim. I thought > > FreeDOS was already GPL'd though. > > It is. I was wondering if he'd be willing to release > his modifications. > > But my configuration was done using the > > M-Systems chip as I don't have write access to the 512K chip. If I did
then
> > I imagine that the same technique would work for that. IIRC I just used
the
> > files from the FreeDOS download. If you're interested, I can do a short > > write-up on the few steps. > > I sure would like to see it. > > > >
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
Reply by January 2, 20042004-01-02
"David Brown" <david@no.westcontrol.spam.com> writes:

> Other removable media, such as zip drives, also use an MBR even though > windows can only cope with a single partition on it (other OS's can use > more).
Other OS's don't have to use the MBR scheme of partitions either. MBR is really only needed so that the BIOS can figure it out. -- Darin Johnson Gravity is a harsh mistress -- The Tick
Reply by 42Bastian Schick January 2, 20042004-01-02
>What is the media type for 'big floppy' ?? > >( I never heard of it )
Don't know the media type, but some BIOSes need USB-memorysticks configured as if it where a floppy, i.e. no MBR only an boot sector. Maybe some of these sticks hide the MBR if they are not accessed by the right driver ?! --- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@epost.de instead !
Reply by 42Bastian Schick January 2, 20042004-01-02
>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.
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 bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@epost.de instead !
Reply by Enrico Migliore January 2, 20042004-01-02


Hi

> > 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. >
That might be the answer. I'll check.
> > BTW, one copy of your message will normally suffice :-) >
yes, sorry. I didn't do it on purpose.
Reply by Enrico Migliore January 2, 20042004-01-02

Jim Stewart wrote:

> > 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: >
> > Any chance you could GPL the version of embedded > Freedos that you created?
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
Reply by David Brown January 2, 20042004-01-02
"Sprow" <news@sprow.co.uk> wrote in message
news:2ec0aa9a.0312301555.14b5776@posting.google.com...
> larwe@larwe.com (Lewin A.R.W. Edwards) wrote in message
news:<608b6569.0312300657.6f3e8ade@posting.google.com>...
> > > >You should have an MBR on the card, i.e. it should be a "hard disk" > > > >format card, not a "big floppy". > > > > > > It works either way. In fact, Windows, when formatting a CF card does > > > > It may work either way under some circumstances, but _all_ embedded > > equipment uses the hard disk type format for removable media. Why > > behave strangely when there is a known standard to follow? > > I assume this made-up "big floppy" and "hard disk" terminology serves > mainly to confuse everyone? > > It's perfectly valid to have a fixed disc (media type 0xF8) with or > without a partition table,and not unusual at all to have a partition > table with just one of the four entries occupied - pointing to a fixed > disc FAT image anyway,which always seemed a bit pointless to me. > > Conversely the other media type bytes (0xF9/FC/FD/FE/FF) for removable > media can't have partition tables.It's just that flash cards from > cameras etc are considered by Windows et al as a 'fixed disc' but > which just happens to be removable! > Sprow.
Other removable media, such as zip drives, also use an MBR even though windows can only cope with a single partition on it (other OS's can use more).