Jump to content
Sign in to follow this  
DavidMil

Making a Bootable Game.

Recommended Posts

1. Some time back I promised to hack, 'Gateway To Apshai' and give you more lives. I've done that. I tried to change the byte to FF,

but the game wont allow that as it only displays two digits. So I put it to 63 HEX (99 decimal). 99 lives is a good number to start with.

My question is how to make the disk boot up upon turning on the PC. I have several menu loaders, but I don't want that. I want to boot

straight to the game when the PC powers up. Just like a game you used to buy at the store.

 

As soon as I get the game to auto boot I'll make an image of the disk and but it on the site.

DavidMil

Share this post


Link to post
Share on other sites
Posted (edited)

Most people these days prefer executables.

 

In the simplest form a boot disk just has the 6 byte header which allows a contiguous load. Given that game was a cartridge to begin with that should be OK but unless you load the game at a lower position then set PORTB to disable Basic then move the code up, you'd have to hold Option down on boot which is every bit as inconvenient as pressing a menu entry.

Many menu loaders allow you to press the key in advance anyway which is more convenient than holding Option.

 

The 6 byte header is -

xx unused, value doesn't matter but best left as 00

nn number of sectors to load

start address as LLHH

init address as LLHH

 

Following the header is the boot continuation code. If it's a single stage boot then you usually just CLC / RTS (CLC indicates no error). If it's a game potentially to go on tape then you should turn the motor control in PACTL off.

 

The init address gets stored by the OS into the relevant init vector (CASINI or DOSINI - 2-3 or $C-$D) and the relevant BOOT flag in location 9 is set. Then the init code will be called when loading completes as well as every warmstart. It's expected that the init code returns with RTS.

 

The run address you should store in DOSVEC ($A,$B) - this would normally occur either during the boot continuation code or during warmstart init. You should only need to do it once. Note that DOSVEC won't be called if Basic is enabled or a cartridge is present (think of the behaviour of DOS here).

 

My advice e.g. if it's a game that's a 16K cart, then load it to $3F00 - prepend your code that disables Basic and moves the game to the cartridge address space, 256 bytes for header + housekeeping should be plenty.

Edited by Rybags
  • Like 3

Share this post


Link to post
Share on other sites

Ya know... Sometimes you can think too hard and make something that is easy difficult. I remembered that you can make your executable

file bootable by renaming it to autorun.sys. Now that file will boot every time you boot the computer with that disk in drive one. So now that

I have the bootable version of my modified Gateway to Apshai, I'll start a new thread with that info (as soon as I make the disk image).

 

I consider this thread closed.

DavidMil

  • Like 1

Share this post


Link to post
Share on other sites

You can do that but then it's costing you an entire floppy for just one game, plus the extra time of having Dos load each time which is ~ 35 sectors vs 5 for many games loaders.

Share this post


Link to post
Share on other sites

For Ramp Rage and Space Fortres Omega I've used BOOTMAJSTER (yes with a J) it's on a disk image here from ChalieChaplin: how to make your own bootdisk.

 

It's easy to use though it might require a 130XE - note: it didn't work in altirra.

Share this post


Link to post
Share on other sites

Works here in Altirra with a 130XE 128k setting....

 

Bmajster.com needs the extra mem..

 

Not seen this util before or that dos..

Share this post


Link to post
Share on other sites

Works here in Altirra with a 130XE 128k setting....

 

Bmajster.com needs the extra mem..

 

Not seen this util before or that dos..

Please confirm if you've made a boot disk with this? (It did load but not create the disk). It was a while ago so perhaps an old version of altirra I tried.

 

I should have added using BootMajster let me use all of the RAM otherwise needed for DOS etc though now we have Mr Atari's Lite DOS it's a smaller benefit :thumbsup:

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Please confirm if you've made a boot disk with this? (It did load but not create the disk). It was a while ago so perhaps an old version of altirra I tried.

 

I should have added using BootMajster let me use all of the RAM otherwise needed for DOS etc though now we have Mr Atari's Lite DOS it's a smaller benefit :thumbsup:

 

Ah, didn't try to fully make the disk, I thought you meant it was not loading...Will try in a sec and come back to the message and edit in the result..

 

Ah, spotted the issue which is designed by default, formats are blocked in Options Media as the default is the Virtual File system, VRW..If you change that to a proper R/W it will and did write the disk out as checked by me a sec ago. As with that sort of stuff you can test it of save it as a digital ATR which I then checked.

 

So yes, its there as a safeguard as default...

 

VFW's still happen either way with the Media setting..

 

All ok :)

 

Edit if Avery spots this, in the disk drives section in the file menu, if you try and change the setting for a drive with a newly created atr to R/W after changing it in the Options Media section it keeps reverting the Disk Drives setting to VRW, a bug or reason?

 

Edit 2222222: Seems it needs a reboot to stick with the R/W?

Edited by Mclaneinc

Share this post


Link to post
Share on other sites

Edit if Avery spots this, in the disk drives section in the file menu, if you try and change the setting for a drive with a newly created atr to R/W after changing it in the Options Media section it keeps reverting the Disk Drives setting to VRW, a bug or reason?

 

Edit 2222222: Seems it needs a reboot to stick with the R/W?

 

The difference between R/W (read/write) and VRW (virtual read/write) is that in the latter case changes aren't automatically written back to the image file. If you've just created a new disk there is no associated image file until you save the disk. VRW mode does not block format commands, only VRWSafe mode does.

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks Avery, yep, I should have made the VRWSafe mode mention a little clearer but I presumed people would see the blocked format in the spinner. Too presumptuous on my part :)

Edited by Mclaneinc

Share this post


Link to post
Share on other sites

Many games and other things will autorun if you put them on a SpartaDOS format disk and issue the command BOOT GAME.EXE.

 

It depends on where in memory the game loads. Some work, some don't. I like it because the game is able to be easily copied to a hard drive.

Share this post


Link to post
Share on other sites

PicoBoot of MyPicoDos can be a simple and efficient solution.

Do you have a link of the version you would suggest.

And is there a manual or some sort of ?

I would like to test it.

 

Stefan

Share this post


Link to post
Share on other sites

Do you have a link of the version you would suggest.

And is there a manual or some sort of ?

I would like to test it.

 

Stefan

 

I should have included links in the first place.

 

So here it is:

This is the project page: https://www.horus.com/~hias/atari/index.html#mypdos

Download and extract the latest version and see the "Using PicoBoot" section of the readme.txt file.

 

In a nutshell, get a disk with DOS 2.5 compatible file system, copy your binary load file to that disk, and initialize the disk with the PicoBoot initializer.

If you are developing on PC, you can automate the process with DIR2ATR, another very useful tool from that page.

Share this post


Link to post
Share on other sites
Posted (edited)

I could NOT make a demo filename BREATHE.XEX run using your instructions. It also did not work trying to BOOT it.

 

Using XBIOS, the Indus GT shows it stuck on track 20. That's where the Directory is.

What's wrong?

 

It DID work when I did X BREATHE.XEX in SDX.

 

It ran perfectly.

 

I didn't bother with the old, inferior loaders. MyDOS SUX!

 

EDIT: Before you think you 'have something', I USED ATARIDOS SD format disk, so please don't blame SpartaDOS-X. It is actually THE ONLY ONE THAT WORKED TO RUN THE PROGRAM!!!

 

And YES! this was on a 6502, NOT an 802, C02 or 816.

Edited by Kyle22

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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...