+3 Bootstrap Loader

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
TomD
Manic Miner
Posts: 374
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

+3 Bootstrap Loader

Post by TomD »

While developing my new +3 disk utility to create compilation disks of old games I initially just stuck to a basic loader which called the +3 DOS routines. After I got it all working decided to mess with the disk bootstrap and have finally got it working. Shame I'm like 30 years late to the party but has been a lot of fun figuring this stuff out :-)

I've kept it pretty simple as my loader just copies the sectors in track 0 to memory and then executes it. It does run a bit fast than loading the autorun basic then the loader and frees up space from the disk as the bootstrap is in track 0. I am wondering how far you can go with it though especially as you can't really use page 7 which is needed for disk access and page 3 at the same time (where the bootstrap is stored in memory). Would be interested to see how the copy protected loaders from the 80s worked. Also very impressed in what is actually detailed in the +3 manual, I just skipped all of this as a kid!

Quick animated gif of my bootstrap loader in action

Image

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
User avatar
lister_of_smeg
Microbot
Posts: 145
Joined: Thu Nov 16, 2017 1:44 pm

Re: +3 Bootstrap Loader

Post by lister_of_smeg »

TomD wrote: Sat Jun 22, 2019 1:01 pm I am wondering how far you can go with it though especially as you can't really use page 7 which is needed for disk access and page 3 at the same time (where the bootstrap is stored in memory).
You could do one of the following:-

Switch to special paging mode 0, relocate your remaining bootstrap code somewhere in page 2 ($8000-$bfff), jump to it and then switch into regular paging mode.

Or the same with special paging mode 2, in this case relocating your code in page 5 ($4000-$7fff).
User avatar
TomD
Manic Miner
Posts: 374
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: +3 Bootstrap Loader

Post by TomD »

lister_of_smeg wrote: Sat Jun 22, 2019 6:19 pm
TomD wrote: Sat Jun 22, 2019 1:01 pm I am wondering how far you can go with it though especially as you can't really use page 7 which is needed for disk access and page 3 at the same time (where the bootstrap is stored in memory).
You could do one of the following:-

Switch to special paging mode 0, relocate your remaining bootstrap code somewhere in page 2 ($8000-$bfff), jump to it and then switch into regular paging mode.

Or the same with special paging mode 2, in this case relocating your code in page 5 ($4000-$7fff).
I've used the later in my bootloader, moving the code to page 5, switching back to normal paging (it is in special when the bootstrap is first run) and running it from there. I can then page in 7 easily to run the +3DOS commands.

TomD
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
Post Reply