Jump to content
IGNORED

how to make your own bootdisk


Marius

Recommended Posts

Hi!

 

In the past I knew how to do it, but I can not find it anymore.

 

I want to create my own boot disk, with a custom loader. I need to know: what do I need to write in the boot sectors.

 

I expect that as soon as the Atari is switched on, and the 1050 is checking the drive, it reads in sector 001 right. So what is the minimal information that needs to be on sector 001?

 

The 'problem' is that I converted a cart into a binary and the memory occupied by this binary is $0800 - $BFFF and for some strange reasons none of the known loaders wants to load this file. I also tried makeatr.exe and picoboot.com.

 

When I put my created binary on a atarimax flash card it runs perfect.

 

It also refuses to load from SIDE loader on MyIDE

It does run from Steven Tucker Fat32 loader.

It also runs from Emulators.

 

So I think my binary is good. Like I wrote: it runs perfect from Atarimax flash cart on real atari.

 

So now I want to create a special loader on a boot disk, which simply transfers data from sector xxx to yyy into memory $0800 - $BFFF and then I do a JMP $BFE0 to run the binary. Should work this way.

 

I hope someone can help. Thanks!

ProWizard

Link to comment
Share on other sites

I safely assume "$0800" is a typo and should be "$8000"? Did you convert the BINARY to an EXECUTEABLE

" put my created binary on a atarimax flash card it runs perfect" sounds as if you didn't.

 

You have to:

- disable BASIC, so it can be loaded to that area at all?

You can add $FF $FF $01 $D3 $FF at the start to do it automatically.

- add the load header ($FF $FF $00 $80 $FF $BF) at the start right before the module data

- add the RUNADR segment at the end ($FF $FF $E0 $02 $E1 $02 $E0 $BF) to start the module

 

Full sequence: $FF $FF $01 $D3 $FF $00 $80 $FF $BF <your 16k> $E0 $02 $E1 $02 $E0 $BF.

 

And of course there are modules which check if they have been copied to RAM and refuse to work then.

Edited by JAC!
Link to comment
Share on other sites

I expect that as soon as the Atari is switched on, and the 1050 is checking the drive, it reads in sector 001 right. So what is the minimal information that needs to be on sector 001?

 

ProWizard

 

Read the section which starts with:

"Locations 1792 to 2047 ($700 to $7FF; page seven) are the user boot area."

 

It is near the middle of the web page

Edited by atari8warez
  • Like 1
Link to comment
Share on other sites

I safely assume "$0800" is a typo and should be "$8000"?

 

No; it is $0800. It is a 64KB XEGS cart, and it does not run from ROM itself; as soon as the atari is switched on the entire ROM is copied by the cart into RAM; starting at $0800 up to $BFFF.

 

Did you convert the BINARY to an EXECUTEABLE

" put my created binary on a atarimax flash card it runs perfect" sounds as if you didn't.

 

Yes I did. the AtariMax Flash cards do work with executables. I thought binary and executable is the same in Atariland. I added the 'famous' six bytes header. It has the .XEX extension. It runs from emulator by opening the executable, it runs on real atari when I put this .xex on an AtariMax flash card. The only reason it does not run from all the existing loaders is (I presume) that $0800 is too low, and all those existing loaders use that area too.

 

Full sequence: $FF $FF $01 $D3 $FF $00 $80 $FF $BF <your 16k> $E0 $02 $E1 $02 $E0 $BF.

 

And of course there are modules which check if they have been copied to RAM and refuse to work then.

 

Thanks a lot for detailed information. In this case unfortunately it all should work.

 

this is my plan now:

 

1. I create a bootable disk (in the meantime I found out how, I read that in the Atari Reference Manual)

2. My bootable disk will run my own small loader, which will be run on page six $0600. The loader does do this:

 

* It switches off basic

* It will load disk sector 004 - 0?? (not calculated yet) into memory $0800 - $BFFF

* Then it will JMP $BFE0.

 

I'm not sure I need to set memtop/lomem ... but I guess not, since this cart does only play a game.

Link to comment
Share on other sites

Have you tried to wrap it into a k-file?. AtrUtil 1,13 by ©1998 Ken Siders-Freeware

Sort of like the old DOS program MakeAtr but made for Windows 95 It still works ok with Windows 7.

Why not post it and see if a AA guru can???

 

Yes I tried. I guess 'makeatr' is the same thing, since as soon as I boot my newly created .ATR file it shows a K on the upper left corner of the screen. Perhaps that AtrUtil 1.13 is newer... so I first have to find that AtrUtil 1.13 and then I will give it a try for sure. I guess it will run from Windows XP.

 

the reason I did not post it yet on AA, because I first want to try myself. It is the process that gives the fun for me. When I succeeded with this, I guess this project is done. When it keeps failing, I will come back ofcourse.

 

Greetz

ProWizard

Link to comment
Share on other sites

Read the section which starts with:

"Locations 1792 to 2047 ($700 to $7FF; page seven) are the user boot area."

 

It is near the middle of the web page

 

Ah thanks a lot! that is even more detailed information than the Atari Reference Manual. Mapping is great. I have the book (original and Xl/XE revision) myselfs. I do not understand why I did not check them in the first place! Thanks again!

 

PW

Link to comment
Share on other sites

Quickly put together this. Should be fine, apart from the usual "off by 1" errors and so on :-)

 

Boot.asm

 

Another idea that might work with coding is using Exomizer: http://hem.bredband.net/magli143/exo/ to load the executable to $2000 and unpack it from there.

This will definitively be the fasted method in terms of loading on the real machine.

It can directly handle XEX files and since this one only has 1 segment it might even work with this low start address.

Edited by JAC!
Link to comment
Share on other sites

Quickly put together this. Should be fine, apart from the usual "off by 1" errors and so on :-)

 

Boot.asm

 

Another idea that might work with coding is using Exomizer: http://hem.bredband.net/magli143/exo/ to load the executable to $2000 and unpack it from there.

This will definitively be the fasted method in terms of loading on the real machine.

It can directly handle XEX files and since this one only has 1 segment it might even work with this low start address.

 

 

Thanks for all your work!

 

That Exomizer is a little bit too complicated for me at this moment. Your assembler example looks rather what I was creating. Thanks.

 

When I'm done I'll get back here... but first I have other things to do (I hate it when I want to finish things on atari 8bit and there are other things that needs to be done)

  • Like 1
Link to comment
Share on other sites

If your using a pc, get the windows version of Superpacker (which has exomizer built in) only thing is you need the MADS assembler program in order to use the superpacker (since you need to tell superpacker where the MADS executable is....for some reason)

 

Superpacker packs all types of atari executables including xex's

Link to comment
Share on other sites

I'll answer later to carmel. First what not works:

 

My conversion works. I have data on disk, and when I run my loader from DOS, it loads the data from the disk into memory and the game runs. Ok that's cool. But....

 

I can't get it operation the way I want it. I want a BOOT disk.

 

This is my boot sector bytes:

00

02 (the amount of sectors the loader is using)

00

06 (the address where my loader is located)

06

06 (the address where the loader starts)

start of the loader

 

The atari boots... and indeed when I check with The Blackbox 6502 machine monitor I see indeed my 'loader' in memory, and indeed in pagesix, and indeed at the right location; when I would run $0606 it should work (I verified this, because it worked from DOS)

 

So... what I don't understand: why doesn't it work?

 

What flags/memory settings do I need to set to make this working? Memlo? Memhi? DosVec? And why do I need to set all that?

 

I really hope someone can explain. It is too long ago for me.

 

Summary:

 

1. I have the game itself stored in disk sector 16 - 384

2. I have a separate loader located in page six; which works (tested)

3. I want this loader to be booted from the disk. I need to modify my own boot sector; since the disk I stored the game on is not dos compatible anymore.

 

I am at this point of pulling my hair out. I am stuck grmbl.

 

Thanks!

Link to comment
Share on other sites

The 'problem' is that I converted a cart into a binary and the memory occupied by this binary is $0800 - $BFFF and for some strange reasons none of the known loaders wants to load this file. I also tried makeatr.exe and picoboot.com.

 

if you want boot & load to $0800-$bfff use this:.

copy your game to disk, rename game to xbios.com and boot

 

if you want direct load to:

$0000-$00ff, $0200-$06ff, $0c00-$cfff, $d800-$ffff use xbios (xbios use ataridos fs/mydos up to 16mb, catalogs, custom SIO)

dd.atr

Link to comment
Share on other sites

Ah I found my bug...

 

My loader was good indeed... but in my TEST setup I had been using a temp. disk in D2: where the game was stored. On my standalone setup there was only D1: ... so my loader still tried to load the game from D2:

 

I fixed that now.

 

Now I have to clean a few things up in my code, and then it is finished.

 

@xxl thanks for that; I will take a look at that too... sounds very interesting.

Link to comment
Share on other sites

Well,

 

I am not sure if any of the bootloaders from my collection will load a program that starts at $0800, but anyways. Here are some A8 bootloaders:

 

- Bootmajster: creates a 130k bootdisk without any directory and your program on it; it requires 128k RAM, will first load your program-file into XRAM and then format a disk in medium density (130k) and write out a bootdisk with your program...

 

The following bootloaders will work from a DOS 2.x formatted disk with one or more file(s) on it:

(no DOS required / available, thus the program must work without DOS)

 

- Picoboot: this bootloader will load the first ML-file on a disk (90k - 16 MB, yes any format / density), ignoring all other files; good for "big" programs that require a full disk and should be loaded without DOS and without any (gamedos-) menu...

 

- AvBoot: this bootloader will also load the first ML file on a disk, tested it with 90k and 130k, not sure if it also works with higher formats / densities...

 

- Autoload: another bootloader program that will load one ML-file from disk (not nescessarily the first program, could also be the 2nd, 3rd, 4th, ... program on disk), it works with 90k, 130k and 180k

 

- Bootload: yet another bootloader program that will load the first ML-file from disk; choose the upper option and press Return, then type in the filename of the file you want to have loaded; choose the lower option to quit the program; supports 90k and 130k...

 

The DOS on the attached disk is Turbo-DOS 2.1, use LOA FIL- to load one of the bootloader programs or simply type FIL and press SHIFT-Return to load a *.COM file (where FIL is the filename of course). If none of the bootloaders work with your program, then the low starting adress $0800 is the problem. Try to use Exomizer or Superpacker by TeBe (with built-in exomizer) then to load from a higher adress and unpack from there...

 

-Andreas Koch.

bootload.zip

  • Like 1
Link to comment
Share on other sites

@Andres: nice work. Picoboot is the one I tried earlier, and that one failed on my $0800-$BFFF file.

 

Tonight I finished my bootdisk. I really wanted to make my own loader, just to learn... and finally I succeeded. Took some more time than expected, and it's probably not the best way to do it, but ok... it works!

 

This is David's Midnight Magic. This is made from a CART DUMP from the XEGS cartridge. This version is a tiny bit different from the David Midnight Magic version that were available already. The controls in this game are 100% joystick (the older versions needed the keyboard to play certain special effects, and were made for paddles, or a joystick up side down).

 

I hope you enjoy the game. And thanks again for all your help people. It was great!

 

<hmmm there is an error going on on AtariAge... asking me for an Authorization Key or something? So I can not put an attachment, just a sec.. i'll try another browser>

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

This is my boot sector bytes:

00

02 (the amount of sectors the loader is using)

00

06 (the address where my loader is located)

06

06 (the address where the loader starts)

start of the loader

 

The atari boots... and indeed when I check with The Blackbox 6502 machine monitor I see indeed my 'loader' in memory, and indeed in pagesix, and indeed at the right location; when I would run $0606 it should work (I verified this, because it worked from DOS)

 

So... what I don't understand: why doesn't it work?

Just to check here... after the sectors have loaded, doesn't the Atari vector to LoadAdr+6 first and then call the StartAdr?

So your header could be (b=byte, w=word): $00.b, $02.b, $600.w, $607.w

and then this is immediately followed by $60.b (RTS) and then your code?

Link to comment
Share on other sites

  • 2 weeks later...

Since there's no Edit button in my last post, there's some tip:

 

If you have Sparta DOS X cart, you can type BOOT <filename> when you are on disk you want to make bootable. It'll put SDX bootloader on this and tell it to run this specific file (no DOS files will be put, only loader, so program should be dos-independent).

 

You will need to re-run BOOT utility every time you change code of that file, because when file is deleted or modified, boot flag is cleared (probably bootvirus safety or something).

  • Like 1
Link to comment
Share on other sites

Since there's no Edit button in my last post, there's some tip:

 

If you have Sparta DOS X cart, you can type BOOT <filename> when you are on disk you want to make bootable. It'll put SDX bootloader on this and tell it to run this specific file (no DOS files will be put, only loader, so program should be dos-independent).

 

You will need to re-run BOOT utility every time you change code of that file, because when file is deleted or modified, boot flag is cleared (probably bootvirus safety or something).

The BOOT command is also in the disk-based SpartaDOS, it allows making a boot disk with a different version of SpartaDOS than current booted.

Link to comment
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...