9

I finally have my Apple //e booting from my SCSI2SD but I'm missing something regarding how ProDOS knows what program to start when it boots.

As I understand it, ProDOS will look for the first .SYSTEM file and launch that, which seems simple enough.

But what if you want to change a bad decision you made months ago? In my case, I was working from the newly released ProDOS 2.4.2 and copied over the files PRODOS and BASIC.SYSTEM (and sure enough, I wind up at the basic prompt when I boot).

But the floppy disk I was working from seems to have QUIT.SYSTEM as the first system file, and that disk boots into BITSY.BOOT, so I have to suppose that QUIT.SYSTEM is redirecting the boot loader somehow.

If I wanted to change my existing ProDOS disk to stop loading into BASIC.SYSTEM and instead load into BITSY.BOOT, how would I move the QUIT.SYSTEM to appear before the existing BASIC.SYSTEM?

How does a user manipulate the order of the files to change which .SYSTEM file you want to currently use?

I would be astounded if the answer is to "delete everything and add files in the correct order". I feel like I am missing something fundamental, but snooping around the web hasn't exactly been very informative.

Would someone kindly kick-start my brain please?

3
  • 1
    You seem to be assuming that typical ProDOS disks hold more than one .SYSTEM program - They don't. If you want another one, put it on a separate disk or delete the old, then create the new one. Those old 8-bit systems were way less sophisticated than you might assume.
    – tofro
    Commented Jul 15, 2023 at 21:23
  • @tofro: a valid point for 140KB floppies, but on the Apple IIgs, 800KB floppies were common. So what constitutes a "typical" ProDOS disk is subject to context.
    – fadden
    Commented Jul 16, 2023 at 17:56
  • @fadden Well, even on 800k (which includes the IIC+, my main machine to do apple II nowadays) one had different floppies for different environments.
    – Raffzahn
    Commented Jul 17, 2023 at 23:11

2 Answers 2

8

Sorting the root directory to put the desired .SYSTEM program first will fix the issue.

You can sort a directory on a ProDOS disk with the ProSel-8 disk utilities or Copy II+. You can also just format a new disk, and copy all of the files to it in the desired order.

3
  • I'm marking this as the answer mostly because all proposed solutions dance around the same concept; which is to have a single SYSTEM file in the root directory or manually sort the files to move the preferred SYSTEM file to the top using a third-party tool. But I'm not going to do either of these things, because the RIFA capacitor in my power supply just let the magic smoke out, sigh.
    – Geo...
    Commented Jul 17, 2023 at 17:01
  • @Geo... in reality, fadden's suggestion of using those tools to re-arrange the directory IS what we did back in the day. The ProDOS binary only searches for a .SYSTEM suffix.
    – bjb
    Commented Jul 19, 2023 at 17:10
  • Yea, it makes sense - I was a DOS3.3 guy, and never really embraced ProDOS (as I moved to focus more on my C64 at home, and later my Amiga 1000). Sometimes a feature or 'way of doing things' seems so obvious it's hard to believe it wasn't included back then. :-P
    – Geo...
    Commented Jul 20, 2023 at 16:22
4

I would be astounded if the answer is to "delete everything and add files in the correct order"

Jup, that's 'a' solution :))

ProDOS only expects a single SYSTEM to exist on the boot volume. It will always start the first it finds in the volume directory.


Details:

Boot Process

Booting an Apple II is a straightforward process:

  • After basic initialisation the monitor looks for a bootable card
  • If found it jumps to that card's PROM
  • For a DISK II (compatible) card the boot sector gets loaded to $800
  • The boot sector loads its remaining code from the following sector.
  • For PRODOS that code then looks for a file named PRODOS
  • PRODOS is loaded to $2000 and executed
  • PRODOS checks for memory size and moves itself up to top of memory
  • Now PRODOS searches the volume directory of the boot volume for the first file with type $FF and a name ending in ".SYSTEM"
  • If found that file gets loaded to $2000 and executed.

What To Do:

Solution A: Have only one .SYSTEM file in a boot volumes directory

This can be done in several ways:

  • Have different disks for different purposes

  • Rename all unused SYSTEMs to something else - like 'NONSYS'

    To change, rename the actual SYSTEM to NONSYS and the desired one to SYSTEM before rebooting

  • Have them in subdirectories and create a fake BOOT.SYSTEM which points to one of them

    To change, fiddle with the linking.

Solution B: Create a boot manager

That is, write a program, let's call it GRUB.SYSTEM, which will, when loaded, look in some configuration file for what SYSTEM to be loaded - or offer a menu of such - and load whatever is selected using an MLI call. GRUB.SYSTEM must be the first - or better the only - SYSTEM file on that volume.

Of course that could be made indefinitely complex ... err I mean comfortable :))

8
  • I wonder how hard it would be for a .SYSTEM file to patch one of the bytes in the word ".SYSTEM" used to find a matching file (e.g. changing it to ".SYSTE2"), and then exit in a manner that would cause the boot code to search for a file called ".SYSTE2" without having to modify anything on disk?
    – supercat
    Commented Jul 16, 2023 at 16:44
  • @supercat The first part isn't hard at all, as the DOS is already present and all function needed, like searching for a file, can be used via MLI.
    – Raffzahn
    Commented Jul 16, 2023 at 19:57
  • 1
    @supercat: re "without having to modify anything on disk", wouldn't you have to modify the preferred file on disk to have this new extension? Or have I misunderstood the proposal?
    – paxdiablo
    Commented Jul 17, 2023 at 2:20
  • @paxdiablo: The idea would be that the patch would happen in the copy of the loader in RAM.
    – supercat
    Commented Jul 17, 2023 at 14:35
  • 1
    Raffzahn, I just wanted to say thanks for your answer - I'm taking the lazy way out and will simply rework my root directory to contain a single SYSTEM file. Alternate files can go into subdirectories, and can be easily selected from the 'bitsy bye' menu. - That's a fun idea about the GRUB.SYSTEM tho. It might be worth revisiting at some point down the road when my backlog of "other interesting stuff to work on" starts running low. :-)
    – Geo...
    Commented Jul 17, 2023 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .