Running ProDOS from DOS

12 posts / 0 new
Last post
macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
Running ProDOS from DOS

Does anyone know if there is an executable that exists you can run from a DOS formatted disk that will load ProDOS?

There is a method to my madness ... I'm trying to run executables that assume a ProDOS operating system from (initially) within a DOS environment.

I already know that ProDOS clobbers DOS once loaded and that's OK.  I can give more detail to my project in time but if anyone knows

of an executable that exists that can do this, (load ProDOS over DOS)  I would surely appreciate it.  Thanks in advance.

Offline
Last seen: 10 hours 3 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2577
It could probably be done,

It could probably be done, but it would be messy.  What you'd need to do is relocate ProDOS to lower memory then write a small program for DOS 3.3, probably in assembler that would load that image, relocate the parts of it to where ProDOS needs them to be (including the "language card" area), fix zero page memory values and then jump into the warm entry location for ProDOS.  It is the fixing of things like zero page that I'd expect most people would forget.

 

macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
Yeah, I did this for Integer

Yeah, I did this for Integer Basic (load the language card from a simple executable) 30+ years ago,

I was just hoping someone had done it for ProDos.  This is something I need done for my up-coming QuikLoader Compact card.  I want to do it with the latest version of Prodos.  Shouldn't be all that hard to dispense once I sort out all the pieces, but I was hoping to avoid making  it. :-(

Online
Last seen: 46 min 8 sec ago
Joined: Jun 18 2010 - 13:54
Posts: 741
Shouldn't be that hard

I think you could just copy the first half of the ProDOS Loader code (sector 0) that loads to $800 when booting ProDOS. Copy that there and then just JMP to $801 to let it load the rest of the Loader, Relocator, and ProDOS. 

macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
Thanks Jeff.  Is there an

Thanks Jeff.  Is there an easy way to do that? (copy the first half ... )

Interupting in the middle of "loading from disk" isn't a challenge ...(thank you wildcard interrupt) but knowing "what is loading where" would be the challenge for me.  Been a while since I've done any boot tracing.  If I can get all the code PIECES, I nave no problem parsing it out in assembler if I know where it's all supposed to go.

Online
Last seen: 46 min 8 sec ago
Joined: Jun 18 2010 - 13:54
Posts: 741
I just re-read your initial

I just re-read your initial post and need some clarification. When your code runs, what type of disk will be in the druve? Do you need a disk that boots into DOS, runs some code, and then boots ProDOS? What is the purpose of loading ProDOS?

macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
Good question ...

Good question ...

The goal is to (from a blank Apple ][ memory) execute a binary file that loads Prodos 2.4. Once the binary ProDOS is created, it will be loaded onto a DOS3.3 formatted Disk.  The reason for this is to have an executable that will replace the DOS3.3 boot with a Prodos boot without actually booting from a ProDOS disk.

Why?  ...

I am compiling code to ROMS so that I can use them on the QuikLoader Card.  (I have a new version of this card soon to disclose)

 This card has an old version of ProDos (V1.1) that was created by Jim Sather in the early 80's.  I'm looking to make the latest ProDOS load into a ROM as an executable.  The latest Prodos can catalog and move files between the 2 DOS formats.  The old ProDOS can't even catalog a DOS3.3 disk, so having the update is fairly important IMO.

My main incentive, Copy II Plus V8.x  will work on any Apple II with 64K as long as the later ProDOS version is loaded. (not with Dos3.3)

That version of Copy II was released on the latest ProDOS V2.4 disk.  (A really nice version of DOS I might add...)

There are other applications that also work "cross-platform" as well that I would like to include into the ROM, but I need to create this executable first before I can move forward.

I hope this answers with clarity.

Online
Last seen: 46 min 8 sec ago
Joined: Jun 18 2010 - 13:54
Posts: 741
Ah, now I get it.

So the only reason for DOS 3.3 is to have something that the Quickloader card can execute? If that's the case, then let's break ProDOS down into it's two parts: the Kernel and BI (BASIC Interpreter). If all you want to do is run Copy II Plus then you should just need to load the Kernel. 

One way to load the kernal would be to just copy an image from RAM after ProDOS is loaded. This sits in the LC but there are other areas of RAM that get initialized and used. A safer way would be to load the contents of the ProDOS Relocator (PRODOS.SYSTEM) to location $2000 and then execute it there. This should set everything up and you could patch it to load COPY II.SYSTEM instead if BASIC.SYSTEM.

 

A good place to start would be to read Chapter 5 of Beneath Apple ProDOS. Also, I beleive Jim outlined how he got ProDOS 1.1 onto the QuickLoader so I assume you've read that.

 

macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
Hi Jeff,

Hi Jeff,

Yes, I have read Beneath Apple ProDOS many years ago. Looke like I'm about to dig back in. } :-D

My plan is exactly as you state, to load ProDOS.System to Location 2000 and execute it from there. 

There is likely to be some overhead before location 2000 that sets up page zero.

Setting up the proper values in page zero (and I believe some in pages 1,2, and 3) I "think" will be the bulk of the work.

I was hoping someone has done that in past, but with the new ProDOS release, I'm thinking that I'll end up as the first.

I enjoy writing 6502 code but time is my biggest setback.  At least until I retire ...

 

Offline
Last seen: 2 years 7 months ago
Joined: Aug 11 2015 - 20:13
Posts: 228
Have you tried DoubleDOS?

Have you tried DoubleDOS?

http://www.appleii-box.de/P072DoubleDOS.htm

macnoyd's picture
Online
Last seen: 1 hour 25 min ago
Joined: Oct 15 2012 - 08:59
Posts: 838
I have not...

Speedy also has a similar program called double boot...

These are great if my goal was to do this all from disk, but my end goal is to fit this all into a ROM.

Thanks for bringing it up though.  I will check into them later.

Online
Last seen: 46 min 8 sec ago
Joined: Jun 18 2010 - 13:54
Posts: 741
Make sure you also read the

Make sure you also read the Beneath Apple ProDOS v1.2 & 1.3 - Supplement. While the Loader code at $800 stayed the same for all versions, the Relocator and MLI are different. I don't think there's much setup needed (zero page or otherwise) but some registers might need pre-loading before calling the code at $2000. Examine the Loader code from $801 to $9FF to see what to expect.

 

That's the beauty of doing it this way; all the code up to this point has just been to load the Relocator/Kernel at $2000 and executing that should take care of everything else. The only change you should need to make is to trap the call that loads the first .SYSTEM file and have it load COPY II instead and then execute that.

Log in or register to post comments