Jump to content
candle

FAT32 XEX loader

Recommended Posts

Hi Jon,

 

This would be an example of my 1Gb CF card with the new MBR-setup.

CHS=1986-16-63

MyIDE must start at LSR [cyl_high], so cylinder $300.

255 sectors reserved (or must this be at a cylinderboundary?)

 

Let me know how APT would handle it and send me back the MBR created.

Thanks.

 

Sijmen.

  • Like 1

Share this post


Link to post
Share on other sites

Ok, no problem.

If I need to code the MyIDE-partition other then $26, just let me know.

 

In the meantime, I'll try to update and debug the IDE_manager....

Share this post


Link to post
Share on other sites

Ok, I finished the setup.

And ready for a new beta-release.

 

Since I didn't hear from you until now this is the layout I use.

I write a MBR with one valid partition, this is the space for FAT32 or other PC-based format.

The rest of the media is reserved for MyIDE. It has no entry in the MBR.

 

Your APT software can take space of this MBR-partition (reducing size of the FAT32-partition)

and write a second entry for APT-usage.

 

Example: 1Gb CF-card. CHS=1986-16-63

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 0C 00 00 00 00 01 00 00 00 CF 0B 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

Share this post


Link to post
Share on other sites

Thanks Sijmen - not juggling multiple tasks well at the moment, so apologies for not progressing on this. God willing, I will have time to look at things this week. ;)

  • Like 1

Share this post


Link to post
Share on other sites

The above would be enough to make me happy, at least then things will cooperate a little better.

 

If you write an MBR entry for the "unallocated" part of the drive occupied by MyIDE, backing up the MyIDE side of things would be as simple as "dd if=/dev/ad0s1b of=./MyIDE-bkup" on a Mac or Linux machine and would make writing PC-based drive editors a little easier. Replace ad0s1b with actual MyIDE partition.....

 

FJC, will your FDISK resize a FAT32 partition to make room for APT at this point without making a mess of the unallocated area?

 

--Kevin

Share this post


Link to post
Share on other sites

I tried APT (FDISK) yesterday.

It does not run from a stock XL, you need a 130XE (?)

>error out of memory.

 

On a 130XE, started FDISK, enter APT, only option is to init card and erase all data.

Then reserve space for FAT32/APT.

Rewriting the MBR.

So APT to my conclusion does not read the MBR and extract an already present FAT32-area.

 

Time to write a MBR-tool that does this (FAT32 adding with APT/MyIDE).

 

About the unallocated MyIDE-partition:

I had an entry ID=$26 "reserved", but after formatting on a PC (windowsXP) it formatted

the reserved space to FAT32, leaving the empty FAT32-area unuasable.....

Not sure why.

Swapping the entries worked, so $26 first, $0c second.

Unfortunately I needed room for the selftestversion of MyIDE-menu, so I only write one valid FAT32 in the MBR.

 

Later,

Sijmen.

Share this post


Link to post
Share on other sites

FJC, will your FDISK resize a FAT32 partition to make room for APT at this point without making a mess of the unallocated area?

 

Perhaps if you reinitialized the disk and paid super-close attention to the existing sector offsets. A utility to resize the partitions would be a much safer option, and fairly trivial to code up.

 

I tried APT (FDISK) yesterday.

It does not run from a stock XL, you need a 130XE (?)

 

It's possible to run it on a 48K machine with an especially slim configuration, but realistically you need a 130XE so that SpartaDOS X doesn't have to eat up low memory and the SIDE driver itself can reside in an extended bank. Kind of comes with the territory - drivers and buffers have all got to go somewhere.

 

...APT to my conclusion does not read the MBR and extract an already present FAT32-area.

 

Time to write a MBR-tool that does this (FAT32 adding with APT/MyIDE).

 

See above remarks. There's no room in FDISK for this kind of once-in-a-blue-moon functionality (owing to the 8KB filesize limit on CAR: - I've already delegated much of the code to two overlaying DLLs), but I'd happily write a small utility to do it.

Share this post


Link to post
Share on other sites

really Jon?

You would like to get preformance of partition magic on a8? do you know what it means to resize fat32 partition?

it won't be small ultility, it will be another year of your work - better let pc do it, as there is all software needed out there for this task

Share this post


Link to post
Share on other sites

I was just talking about amending the MBR, Sebastian - to hell with the data in the partition. Although, I suppose with that in mind, one might as well create the whole MBR from scratch, which is what FDISK already does. So it's a good reality check. I can definitely do without any more major coding jobs on this project.

 

So let me get this right, anyway: if FDISK detects an existing MBR and observes FAT32 and APT structure, there are two options here: a) FDISK needs the option to create MyIDE space as well as FAT32 and APT partitions, or b) a third party program needs to be written to create a FAT32 / APT / MyIDE combo which FDISK will play nicely with. I know which I'd prefer...

 

Sijmen - can you write a small program which will create MBR with MyIDE space, FAT32 partition, and APT entry on a CF card? Then we get the best of both worlds: FDISK is used to edit the APT (which it finds already on the disk), but doesn't need to worry about creating MyIDE space when initializing an MBR (which is anyway out of its spec). The objective here is surely to make the two systems play nice, not to make both pieces of software fully capable of editing the other's partitioning system.

Share this post


Link to post
Share on other sites

really Jon?

You would like to get preformance of partition magic on a8? do you know what it means to resize fat32 partition?

it won't be small ultility, it will be another year of your work - better let pc do it, as there is all software needed out there for this task

 

I was suggesting more just change the MBR and screw the contents....you'd have to reformat FAT32 partition on PC. Not too concerned with manipulating the FAT32 side from the Atari, just having it recognized cleanly with no real potential of filesystem corruption with most OS's.

 

Basically my overall goal is to have SDX, FAT32, and other bootable Atari partition (taking advantage of Sijmen's OS on an EPROM) when SDX is disabled. And have the disk be readable by most OS's as I'm definitely not a Windows user.

 

SDX is GREAT but still, I would like to play with RealDOS or show someone Atari DOS was on occasion. Maybe boot a gamedos and/or use SIDE Loader.

Edited by kogden

Share this post


Link to post
Share on other sites

Yep, no problem, I added a crude APT-table when FAT32 is directed.

This will be on the MyBIOS-SIDE firmware only.

 

Formula (roughly)

half for MyIDE (starting @ boundary LSR [cyl_high]). Unallocated for PC.

64mb FAT32 (fixed) ID: $0c for PC

256 sectors reserved (fixed).

Rest for APT ID: $7F for PC.

 

Tested on altirra.

After Init in the MyIDE-menu, rebooted with SDX

FDISK now says: un-init disk.

-NICE-

 

was only 16 extra bytes in the menu :-)

 

Later guys.

Edited by mr-atari

Share this post


Link to post
Share on other sites
The objective here is surely to make the two systems play nice, not to make both pieces of software fully capable of editing the other's partitioning system.

I'd also say this would be the proper the way to go.

 

If you initialize a new MBR, just allocate some space for "your" system and just leave the remaining 3 partition entries empty (type/start/end all 0). After all, this should be fairly easy to implement :-)

 

If you detect a valid MBR, only touch the partition type(s) "your" system knows of, plus provide support to allocate "your" partition type in one of the empty partition table slots. Never do anything to a partition type you don't know (only delete should be allowed). If, for example, you shrink a partition without also changing the "filesystem" inside that partition (may it be a FAT32, APT or whatever filesystem) you are calling for serious trouble.

 

Bottom line: just create MyIDE partitions with the MyIDE FDISK, APT partitions with the APT FDISK and use DOS/Windows to create FAT(32) partitions. This way you should be on the safe side and are able to keep your software simple.

 

so long,

 

Hias

Share this post


Link to post
Share on other sites

The reason FDISK takes over the task of creating the FAT32 partition is that 99 per cent of cards come with floppy boot record on them. Partioning cards on the PC so that they have a proper partition table and a FAT entry which doesn't consume the entire disk - while not difficult for the seasoned tweaker - isn't exactly trivial for everyone who's just bought a SIDE cart and a 4GB CF card. In addition, space in FDISK was already getting extremely tight when I was not only saddled with the task of implementing APT, but also putting an MBR on the disk. Creating an intuitive program which - for example - recognizes multiple existing FAT partitions and provides the user with the information he needs to decide on a partitioning scheme for the rest of the disk takes more than a wee bit of code. FDISK currently looks at the total capacity of the media and offers the user the chance to chop it up into up to two sections: APT and FAT32.

 

I agree that it's desirable that FDISK should work "around" existing partitioning schemes if they're found, however. Unfortunately it may be a more realistic proposition for someone (not necessarily me) to write a small utility which chops media up into FAT, MyIDE and APT sections prior to FDISK getting hold of it. This means the partition editor as it stands will then sense that the MBR is suitably initialized and can then be used to edit the APT partition table.

Edited by flashjazzcat

Share this post


Link to post
Share on other sites

any help would be welcome.

 

the standaard sdx that comes with SIDE doesn't load FDISK on a 64k machine.

so, what to configure?

 

Remember, I'm a noob with SDX

Share this post


Link to post
Share on other sites

any help would be welcome.

 

Sure: Create CONFIG.SYS on drive 1. Put the following commands in it:

 

USE OSRAM

DEVICE SPARTA OSRAM

DEVICE SIO

DEVICE MYIDE

 

Boot SDX and it will configure itself to this very minimal setup. You won't even be able to read AtariDOS format disks. Typing "MEM" at the command prompt will give you the current MEMLO. Try and run FDISK with this configuration. You can then selectively start adding drivers to the config until MEMLO gets too high to be useful.

Share this post


Link to post
Share on other sites

If you initialize a new MBR, just allocate some space for "your" system and just leave the remaining 3 partition entries empty (type/start/end all 0). After all, this should be fairly easy to implement :-)

 

If you detect a valid MBR, only touch the partition type(s) "your" system knows of, plus provide support to allocate "your" partition type in one of the empty partition table slots. Never do anything to a partition type you don't know (only delete should be allowed). If, for example, you shrink a partition without also changing the "filesystem" inside that partition (may it be a FAT32, APT or whatever filesystem) you are calling for serious trouble.

 

Yep, I've had stuff like Partition Magic or GpartEd NOT work as often as it has worked most of the time. Generally I just assume the data is f**ked and should be backed up before I "resize" a partition. I was mainly just trying to get a feel for how I would need to set the drive up initially. A partition editor PC-side seems the way to go for now for the initial FAT32 partition and MBR creation.

 

With the MyIDE BIOS, I wouldn't necessarily need APT but it is a good way to do things, easier for me to back up here and there and if I move my MyIDE cart to another machine I'd still be able to use it with SDX flashed on the cart. I just wouldn't be able to read the MyIDE partitions at that point.

 

What I probably really want is an IDE+. I don't have anything but a 400 without PBI/ECI so it would be easy to move and looks like it works great with stock OS. Anybody still have them for sale?

Share this post


Link to post
Share on other sites

any help would be welcome.

 

Sure: Create CONFIG.SYS on drive 1. Put the following commands in it:

 

USE OSRAM

DEVICE SPARTA OSRAM

DEVICE SIO

DEVICE MYIDE

 

Boot SDX and it will configure itself to this very minimal setup. You won't even be able to read AtariDOS format disks. Typing "MEM" at the command prompt will give you the current MEMLO. Try and run FDISK with this configuration. You can then selectively start adding drivers to the config until MEMLO gets too high to be useful.

 

Yep that works for a 800xl, great.

I wonder how newbies get by, without knowing this.....

MyBIOS-SIDE setup works too.

Nice and easy swapping between fat32/myide/apt :-)

 

Later guys!

Share this post


Link to post
Share on other sites

IDE Plus 2.0 requires PBI... He is thinking of SIO2IDE...

 

Yep - missed the bit about the 400. ;)

 

Yep that works for a 800xl, great.

I wonder how newbies get by, without knowing this.....

 

Wasn't sure it would work, actually. ;) I'll put it in the documentation if I ever have a reason to release the pending update...

 

MyBIOS-SIDE setup works too.

Nice and easy swapping between fat32/myide/apt :-)

 

Cool!

Share this post


Link to post
Share on other sites

IDE Plus 2.0 requires PBI... He is thinking of SIO2IDE...

 

Nothing wrong with that.... most of my machines have it.... My 600XL, 800XL, and 130XE should be fine.... an MIO would be awesome but out of my price range. I have LOTS of old SCSI drives from aging UNIX boxes around.

 

Only Atari I have that does NOT have PBI is an old 48K 400 which I'd need SIO2IDE or something like that for. I just use an SIO2PC with it at the moment. SIO2IDE would be kinda cool to have as well.... I think an SIO2SD would be cheaper in reality though.

 

I sent Lotharek an e-mail about an IDE+ a while back, might try again soon. Never got a reply.

Share this post


Link to post
Share on other sites

This is a pre-beta for testing here on atariage.

Just drop a reply or PM what you think about it. ;-)

The cartridge-bootmenu default=ON.

 

64k machines who want to run FDISK, need the config.atr in D1:

 

Setup your CF-card using the MyIDE-MENU:

The init routine will detect room for FAT32/APT.

Since this is a beta, FAT32/APT/MyIDE-room-resevation is fixed.

 

The rom-image is 512k, contaning the original SDX,SIDE and MyBIOS.

Switch must be on SDX to flash the hardware.

 

Altirra SIDE-firmware included.

 

Happy computering!

Edited by mr-atari

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...