Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Logic is a little bird, sitting in a tree; that smells *_____awful*.


computers / comp.sys.apple2 / Re: ProDOS boot block?

SubjectAuthor
* ProDOS boot block?Steve Nickolas
+* Re: ProDOS boot block?I am Rob
|`* Re: ProDOS boot block?Steve Nickolas
| `- Re: ProDOS boot block?qkumba
`* Re: ProDOS boot block?Kent Dickey
 +* Re: ProDOS boot block?Steve Nickolas
 |`- Re: ProDOS boot block?I am Rob
 `* Re: ProDOS boot block?qkumba
  +- Re: ProDOS boot block?qkumba
  +- Re: ProDOS boot block?qkumba
  `* Re: ProDOS boot block?Steve Nickolas
   `* Re: ProDOS boot block?Steve Nickolas
    `* Re: ProDOS boot block?qkumba
     `* Re: ProDOS boot block?Steve Nickolas
      `* Re: ProDOS boot block?qkumba
       `- Re: ProDOS boot block?Steve Nickolas

1
ProDOS boot block?

<alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3947&group=comp.sys.apple2#3947

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: ProDOS boot block?
Date: Mon, 20 Dec 2021 17:12:25 -0500
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
Injection-Info: reader02.eternal-september.org; posting-host="1d31b2ada9f5ecf0a20124a758fe0ad6";
logging-data="17354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KN0s/ERL2SRdSRQffUfma6SKegig2VCE="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:vyZEsIuPuBV76z/Vd5xg6SW2IYE=
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Mon, 20 Dec 2021 22:12 UTC

My head exploded when trying to parse the ProDOS boot block.

I'm trying to see whether it's possible to remove the Apple /// stuff and
add some 6502-8086 diglot stuff, given that I have an 8086 boot block that
does more or less the same thing, and that I could stuff into the second
block.

-uso.

Re: ProDOS boot block?

<cab5aa3b-7180-41a5-985f-323dbeb05bebn@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3948&group=comp.sys.apple2#3948

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a05:620a:4107:: with SMTP id j7mr6178024qko.645.1640391424476;
Fri, 24 Dec 2021 16:17:04 -0800 (PST)
X-Received: by 2002:ad4:5bc1:: with SMTP id t1mr7635594qvt.72.1640391424374;
Fri, 24 Dec 2021 16:17:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Fri, 24 Dec 2021 16:17:04 -0800 (PST)
In-Reply-To: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=207.195.86.171; posting-account=U4TNXwoAAABP4nIJHynAJZ69O_f3LY2g
NNTP-Posting-Host: 207.195.86.171
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cab5aa3b-7180-41a5-985f-323dbeb05bebn@googlegroups.com>
Subject: Re: ProDOS boot block?
From: gids...@sasktel.net (I am Rob)
Injection-Date: Sat, 25 Dec 2021 00:17:04 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 2
 by: I am Rob - Sat, 25 Dec 2021 00:17 UTC

> My head exploded when trying to parse the ProDOS boot block.

And thus the reason no-one has replied. We are not willing to follow in your footsteps.

Re: ProDOS boot block?

<alpine.DEB.2.21.2112242003090.24267@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3949&group=comp.sys.apple2#3949

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Fri, 24 Dec 2021 20:03:33 -0500
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <alpine.DEB.2.21.2112242003090.24267@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <cab5aa3b-7180-41a5-985f-323dbeb05bebn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="f8bc5bb1db5ef24bf21bf2387d2d3ff0";
logging-data="7875"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191fyCY+PT3fQkAuMofLG3A0jO+nsG27sM="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:YKBnw+xLUT3CJsoG5l/Ud7kNb0I=
In-Reply-To: <cab5aa3b-7180-41a5-985f-323dbeb05bebn@googlegroups.com>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Sat, 25 Dec 2021 01:03 UTC

On Fri, 24 Dec 2021, I am Rob wrote:

>> My head exploded when trying to parse the ProDOS boot block.
>
> And thus the reason no-one has replied. We are not willing to follow in your footsteps.
>

We all know I'm a lunatic ;p

-uso.

Re: ProDOS boot block?

<3e10df1e-703e-4675-bc26-13722e3556ben@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3951&group=comp.sys.apple2#3951

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a37:b3c7:: with SMTP id c190mr8272248qkf.730.1640473472163;
Sat, 25 Dec 2021 15:04:32 -0800 (PST)
X-Received: by 2002:a37:b7c3:: with SMTP id h186mr5245355qkf.691.1640473471727;
Sat, 25 Dec 2021 15:04:31 -0800 (PST)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Sat, 25 Dec 2021 15:04:31 -0800 (PST)
In-Reply-To: <alpine.DEB.2.21.2112242003090.24267@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:6105:e3f4:ce4a:9d39;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:6105:e3f4:ce4a:9d39
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<cab5aa3b-7180-41a5-985f-323dbeb05bebn@googlegroups.com> <alpine.DEB.2.21.2112242003090.24267@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e10df1e-703e-4675-bc26-13722e3556ben@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Sat, 25 Dec 2021 23:04:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: qkumba - Sat, 25 Dec 2021 23:04 UTC

ProBoot (part of Total Replay) parses the ProDOS file-system to find the named .SYS file to load and run.
It has no Apple III support, only Apple II and compatible. The source is in the repo on GitHub. Maybe it's useful to you somehow.

Re: ProDOS boot block?

<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3952&group=comp.sys.apple2#3952

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 25 Dec 2021 17:30:36 -0600
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
Organization: provalid.com
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
From: keg...@provalid.com (Kent Dickey)
Originator: kegs@provalid.com (Kent Dickey)
Message-ID: <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>
Date: Sat, 25 Dec 2021 17:30:36 -0600
Lines: 37
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-IOaNb2XVFgH9DGkpS5r6dXGIc/HKT/zGwMYAfgHQT3hlA7nDk3x1geBUoBvKEtDHo3ZPPnLDpERnNcX!6TUWId2kF6usG4N3lzuCbxQhY2RGhiaEQ6/6CX/e5sZLsHhejl55fnNo/IpmdHMWu9C0TlzJ2/W8
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2998
 by: Kent Dickey - Sat, 25 Dec 2021 23:30 UTC

In article <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>,
Steve Nickolas <usotsuki@buric.co> wrote:
>My head exploded when trying to parse the ProDOS boot block.
>
>I'm trying to see whether it's possible to remove the Apple /// stuff and
>add some 6502-8086 diglot stuff, given that I have an 8086 boot block that
>does more or less the same thing, and that I could stuff into the second
>block.
>
>-uso.

I don't understand what you are asking. Are you trying to make a boot block
that will work on 8086 and an Apple II? If so, you'll need to work out
opcodes to start the block with that make sense for both architectures.
I don't understand why you'd want to do this and what you think this will
achieve. For the Apple II part, the first byte needs to be $01 and will
not be executed. If you want it can be any value from $01 to $0f, but
higher values will result in wasted time (it will read more sectors into
memory which will in general not be useful).

As for the ProDOS boot block, it's basic operation is to find the PRODOS
file in the volume directory, and boot from a 5.25" Disk II or a "Smartport"
device (really, the ProDOS entry point). It looks at the boot slot
$CnFF to get the ProDOS entry point (generally $07, so the entry point is
$Cn07), and then makes READBLOCK calls to find PRODOS. For Disk II, it
creates a fake driver (so the rest of the code can think in terms of blocks),
which then does the needed head moves (slower than needed, but short code)
and re-uses the $Cn5C entry point to read the sector data. It's clever,
but not too complex.

You mention Apple ///, but again I don't know what you mean. There's
special code to handle $CnFF being >= $F9, and maybe that's for Apple ///,
but I didn't trace through that code to figure out what it was doing.
My understanding is an Apple /// will boot from Block 1 (and Block 1 is
usually all 0's on volumes created on an Apple II).

Kent

Re: ProDOS boot block?

<alpine.DEB.2.21.2112251856280.28958@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3953&group=comp.sys.apple2#3953

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Sat, 25 Dec 2021 19:00:18 -0500
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <alpine.DEB.2.21.2112251856280.28958@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="3e5e216fb1fa47a8f173d6769b975413";
logging-data="2095"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OGrBretfxFOuN8JXOg3RMUONouLpAG6o="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:pJuBc5sgOzShzrbz5KFIPElTN1c=
In-Reply-To: <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Sun, 26 Dec 2021 00:00 UTC

On Sat, 25 Dec 2021, Kent Dickey wrote:

> In article <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>,
> Steve Nickolas <usotsuki@buric.co> wrote:
>> My head exploded when trying to parse the ProDOS boot block.
>>
>> I'm trying to see whether it's possible to remove the Apple /// stuff and
>> add some 6502-8086 diglot stuff, given that I have an 8086 boot block that
>> does more or less the same thing, and that I could stuff into the second
>> block.
>>
>> -uso.
>
> I don't understand what you are asking. Are you trying to make a boot block
> that will work on 8086 and an Apple II? If so, you'll need to work out
> opcodes to start the block with that make sense for both architectures.
> I don't understand why you'd want to do this and what you think this will
> achieve. For the Apple II part, the first byte needs to be $01 and will
> not be executed. If you want it can be any value from $01 to $0f, but
> higher values will result in wasted time (it will read more sectors into
> memory which will in general not be useful).

That indeed was the trick.

> As for the ProDOS boot block, it's basic operation is to find the PRODOS
> file in the volume directory, and boot from a 5.25" Disk II or a "Smartport"
> device (really, the ProDOS entry point). It looks at the boot slot
> $CnFF to get the ProDOS entry point (generally $07, so the entry point is
> $Cn07), and then makes READBLOCK calls to find PRODOS. For Disk II, it
> creates a fake driver (so the rest of the code can think in terms of blocks),
> which then does the needed head moves (slower than needed, but short code)
> and re-uses the $Cn5C entry point to read the sector data. It's clever,
> but not too complex.
>
> You mention Apple ///, but again I don't know what you mean. There's
> special code to handle $CnFF being >= $F9, and maybe that's for Apple ///,
> but I didn't trace through that code to figure out what it was doing.
> My understanding is an Apple /// will boot from Block 1 (and Block 1 is
> usually all 0's on volumes created on an Apple II).
>
> Kent

I actually wrote this code:

http://6.buric.co/p86head.a86.txt

This is pretty close to what I understand the 6502 code does in principle,
but written from scratch in 8086 ASM (NASM dialect) - and I have written a
"hello world" test, though my head exploded trying to go further and
actually write a kernel.

I'm currently trying to write a small Apple ][ emulator in order to test
the code further, but I am very unfluent in 8086 being mainly a C
programmer.

-uso.

Re: ProDOS boot block?

<bfb8218e-00c3-40cc-a03d-04de04dab79en@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3954&group=comp.sys.apple2#3954

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a37:b3c7:: with SMTP id c190mr8452533qkf.730.1640481249171;
Sat, 25 Dec 2021 17:14:09 -0800 (PST)
X-Received: by 2002:a05:6214:230a:: with SMTP id gc10mr10447514qvb.124.1640481249021;
Sat, 25 Dec 2021 17:14:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Sat, 25 Dec 2021 17:14:08 -0800 (PST)
In-Reply-To: <alpine.DEB.2.21.2112251856280.28958@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=207.195.86.171; posting-account=U4TNXwoAAABP4nIJHynAJZ69O_f3LY2g
NNTP-Posting-Host: 207.195.86.171
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <alpine.DEB.2.21.2112251856280.28958@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bfb8218e-00c3-40cc-a03d-04de04dab79en@googlegroups.com>
Subject: Re: ProDOS boot block?
From: gids...@sasktel.net (I am Rob)
Injection-Date: Sun, 26 Dec 2021 01:14:09 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
 by: I am Rob - Sun, 26 Dec 2021 01:14 UTC

> I'm currently trying to write a small Apple ][ emulator in order to test
> the code further, but I am very unfluent in 8086 being mainly a C
> programmer.

Someone got the most part of an 8080 simulator working on a 6502 over here:

http://forum.6502.org/viewtopic.php?f=2&t=6541

See if the code listed can give you any ideas.

Re: ProDOS boot block?

<1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3956&group=comp.sys.apple2#3956

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:ad4:58cf:: with SMTP id dh15mr16482429qvb.125.1640630050329;
Mon, 27 Dec 2021 10:34:10 -0800 (PST)
X-Received: by 2002:ac8:57c2:: with SMTP id w2mr15618372qta.54.1640630050048;
Mon, 27 Dec 2021 10:34:10 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Mon, 27 Dec 2021 10:34:09 -0800 (PST)
In-Reply-To: <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:51ec:fdb2:77e2:346e;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:51ec:fdb2:77e2:346e
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Mon, 27 Dec 2021 18:34:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: qkumba - Mon, 27 Dec 2021 18:34 UTC

> For the Apple II part, the first byte needs to be $01

It can be zero. The PROM loops while the value in $3D is < $800.
Then to make 6502/8086 compatible, the sequence can be
00 CD EB xx

which on 8086 is
00 CD ADD CH,CL
EB xx JMP SHORT [to x86-specific code]
and on 6502
00 ;1 sector read
CD EB xx CMP $xxEB
[6502 continues]

Re: ProDOS boot block?

<65a0c46e-9261-4d42-a809-0e8655e860d8n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3957&group=comp.sys.apple2#3957

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a05:620a:1477:: with SMTP id j23mr14377356qkl.152.1640657815220;
Mon, 27 Dec 2021 18:16:55 -0800 (PST)
X-Received: by 2002:ac8:590d:: with SMTP id 13mr16613285qty.295.1640657814908;
Mon, 27 Dec 2021 18:16:54 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Mon, 27 Dec 2021 18:16:54 -0800 (PST)
In-Reply-To: <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:78ae:f469:d013:1e28;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:78ae:f469:d013:1e28
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <65a0c46e-9261-4d42-a809-0e8655e860d8n@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Tue, 28 Dec 2021 02:16:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: qkumba - Tue, 28 Dec 2021 02:16 UTC

If you need to load two sectors, that's fine, too:
02 CD ADD CL,CH

Re: ProDOS boot block?

<5d0f5788-0709-4662-8d0d-553655c56e4en@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3958&group=comp.sys.apple2#3958

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a37:6113:: with SMTP id v19mr14008442qkb.333.1640657830158;
Mon, 27 Dec 2021 18:17:10 -0800 (PST)
X-Received: by 2002:a05:622a:24e:: with SMTP id c14mr5086387qtx.6.1640657829928;
Mon, 27 Dec 2021 18:17:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Mon, 27 Dec 2021 18:17:09 -0800 (PST)
In-Reply-To: <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:78ae:f469:d013:1e28;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:78ae:f469:d013:1e28
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d0f5788-0709-4662-8d0d-553655c56e4en@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Tue, 28 Dec 2021 02:17:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
 by: qkumba - Tue, 28 Dec 2021 02:17 UTC

If you need to load two sectors, that's fine, too:
02 CD ADD CL,CH

Re: ProDOS boot block?

<alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3959&group=comp.sys.apple2#3959

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Tue, 28 Dec 2021 00:06:50 -0500
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="26c69f5691075fecce813eebce701cb6";
logging-data="23092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19k4uZD7C9OoBYHlrMs+ex+km5P8l0cJv0="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:HhCnVEPzGEdp6F4OlLBiXYw8MnE=
In-Reply-To: <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Tue, 28 Dec 2021 05:06 UTC

On Mon, 27 Dec 2021, qkumba wrote:

>> For the Apple II part, the first byte needs to be $01
>
> It can be zero. The PROM loops while the value in $3D is < $800.
> Then to make 6502/8086 compatible, the sequence can be
> 00 CD EB xx
>
> which on 8086 is
> 00 CD ADD CH,CL
> EB xx JMP SHORT [to x86-specific code]
> and on 6502
> 00 ;1 sector read
> CD EB xx CMP $xxEB
> [6502 continues]
>
Hm. So if I can plug in some x86 code that moves code out of the way to
load the second block in place of the first at 0000:7C00, i.e.,

retry: mov ax, 0x0201 ; read (AH) 1 (AL) sector
mov cx, 0x0002 ; track 0 sector 2
mov dh, 0x00 ; head 0 (DL unchanged from entry)
xor bx, bx
mov es, bx ; ES=$0000
mov bx, 0x7C00
int 0x13
jc retry
jmp 0x0000:0x7C00

(just banged out in a hurry)

it might be possible to make a diglot 6502-8086 bootloader. But I'd have
to strip out the /// stuff to have enough free space for that. And it
would probably require some better 8086 code than what I just wrote. But
it's a start.

-uso.

Re: ProDOS boot block?

<alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3960&group=comp.sys.apple2#3960

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Tue, 28 Dec 2021 03:11:55 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com> <alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="26c69f5691075fecce813eebce701cb6";
logging-data="4631"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/K+mXeLHn8sYBVp1FzvzlFjEClGHfkj8k="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:0T3d4q5H3QQ9KhSJpBookzuwfAY=
In-Reply-To: <alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Tue, 28 Dec 2021 08:11 UTC

Currently the most efficient x86-side code I can come up with is this:

B8 01 02 B9 02 00 30 F6 31 DB 8E C3 BB 00 7C 26
C7 06 FE 7B CD 13 EA 00 7C 00 00

That's pretty much the same code I described before, except that once the
registers are set I place an "int 13h" at 0000:7BFE and jump hard to it.
(This 8086 code could probably be done even more efficiently.)

Since I haven't yet RE'd the entire ProDOS bootloader - only as far as
$096C, and that only basically - I'm not really sure what code might be
safe to maneuver around without breaking things, other than the stuff that
I was able to identify as being part of the SOS chainloader.

Still, this seems to suggest that a 6502-8086 diglot bootloader is indeed
possible. (It would only really be feasible on a 1.44 MB floppy though
which is quite rare on the Apple ][ line!)

-uso.

Re: ProDOS boot block?

<28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3961&group=comp.sys.apple2#3961

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a05:622a:64c:: with SMTP id a12mr19486197qtb.312.1640712486675;
Tue, 28 Dec 2021 09:28:06 -0800 (PST)
X-Received: by 2002:a05:620a:3189:: with SMTP id bi9mr16214230qkb.266.1640712486354;
Tue, 28 Dec 2021 09:28:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Tue, 28 Dec 2021 09:28:06 -0800 (PST)
In-Reply-To: <alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:78ae:f469:d013:1e28;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:78ae:f469:d013:1e28
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
<alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr> <alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Tue, 28 Dec 2021 17:28:06 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
 by: qkumba - Tue, 28 Dec 2021 17:28 UTC

You'd be running already from 0000:7C00 if you're on a PC. Your read will overwrite your existing code.
Since all of the registers will have been set already for the first load, you could just
mov ax, 0x201
inc cx
pushf
push es
push bx
jmp far es:[0x004c]
and forget about retry.
Otherwise, yes it's possible to have a polyglot bootsector, even on a 5.25".
As for the ProDOS loader, block 1 is "reserved" (=unused). You could put the original sector there. Then you wouldn't need to fit the actual loader in the boot sector.

Re: ProDOS boot block?

<alpine.DEB.2.21.2112282012070.11956@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3964&group=comp.sys.apple2#3964

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Tue, 28 Dec 2021 20:19:58 -0500
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <alpine.DEB.2.21.2112282012070.11956@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com> <alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>
<alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr> <28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="b09b901580162d6e76fbd30a96229c12";
logging-data="26017"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186uZyqTTi4ScKK1EfzZv8h6g/C6yomCHk="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:+7bd49F0SEtRUkU9sSg0u7ymbqI=
In-Reply-To: <28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Wed, 29 Dec 2021 01:19 UTC

On Tue, 28 Dec 2021, qkumba wrote:

> You'd be running already from 0000:7C00 if you're on a PC. Your read
> will overwrite your existing code.

Yeah, knew that.

> Since all of the registers will have been set already for the first
> load, you could just
> mov ax, 0x201
> inc cx
> pushf
> push es
> push bx
> jmp far es:[0x004c]
> and forget about retry.

Hm. I was trying to think about how to emulate an INT by jumping (much
like the very common on the Apple ][ method of "return to subroutine",
which the ProDOS bootloader actually does use). I guess that's what I was
looking for.

0100- B8 01 02 MOV AX, 0201
0103- 41 INC CX
0104- 9C PUSHF
0105- 06 PUSH ES
0106- 53 PUSH BX
0107- EA 4C 00 00 00 JMP 0000:004C

12 bytes, eh? That's far more efficient than I'd come up with. xD

> Otherwise, yes it's possible to have a polyglot bootsector, even on a
> 5.25".

Of course most Apple ][ media wouldn't work on a PC and vice-versa - the
1.44 MB floppy being the exception.

> As for the ProDOS loader, block 1 is "reserved" (=unused). You could
> put the original sector there. Then you wouldn't need to fit the actual
> loader in the boot sector.

Yeah, that's what I was hoping to be able to do: literally the Apple ///
trick, with a PC replacing the ///.

-uso.

Re: ProDOS boot block?

<cbae89b5-ab7e-4f21-a603-e4355524387an@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3965&group=comp.sys.apple2#3965

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a05:6214:29c8:: with SMTP id gh8mr24987256qvb.78.1640801511728;
Wed, 29 Dec 2021 10:11:51 -0800 (PST)
X-Received: by 2002:a05:622a:494:: with SMTP id p20mr23614566qtx.83.1640801511387;
Wed, 29 Dec 2021 10:11:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Wed, 29 Dec 2021 10:11:51 -0800 (PST)
In-Reply-To: <alpine.DEB.2.21.2112282012070.11956@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8001:7300:56d5:cc85:16e6:b21f:8a76;
posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 2603:8001:7300:56d5:cc85:16e6:b21f:8a76
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr>
<NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com>
<alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr> <alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr>
<28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com> <alpine.DEB.2.21.2112282012070.11956@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cbae89b5-ab7e-4f21-a603-e4355524387an@googlegroups.com>
Subject: Re: ProDOS boot block?
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Wed, 29 Dec 2021 18:11:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: qkumba - Wed, 29 Dec 2021 18:11 UTC

> 0100- B8 01 02 MOV AX, 0201
> 0103- 41 INC CX
> 0104- 9C PUSHF
> 0105- 06 PUSH ES
> 0106- 53 PUSH BX
> 0107- EA 4C 00 00 00 JMP 0000:004C
>
> 12 bytes, eh? That's far more efficient than I'd come up with. xD

The instruction at 0107 should read

0107- 26 FF 26 4C 00 JMP FAR ES:[004C]

It has to be indirect to use the vector.
If you're willing to bet that DS is also zero, then you can drop the first 26.

Re: ProDOS boot block?

<alpine.DEB.2.21.2112291326390.15394@sd-119843.dedibox.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=3966&group=comp.sys.apple2#3966

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: usots...@buric.co (Steve Nickolas)
Newsgroups: comp.sys.apple2
Subject: Re: ProDOS boot block?
Date: Wed, 29 Dec 2021 13:27:59 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <alpine.DEB.2.21.2112291326390.15394@sd-119843.dedibox.fr>
References: <alpine.DEB.2.21.2112201707330.6571@sd-119843.dedibox.fr> <NrednQEBesQBNFr8nZ2dnUU7-THNnZ2d@giganews.com> <1b8716b4-8c29-43ee-91c4-fd1339277481n@googlegroups.com> <alpine.DEB.2.21.2112272359340.7938@sd-119843.dedibox.fr>
<alpine.DEB.2.21.2112280305470.9023@sd-119843.dedibox.fr> <28074545-89fb-4aca-9c74-1de5733f2cf5n@googlegroups.com> <alpine.DEB.2.21.2112282012070.11956@sd-119843.dedibox.fr> <cbae89b5-ab7e-4f21-a603-e4355524387an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader02.eternal-september.org; posting-host="b09b901580162d6e76fbd30a96229c12";
logging-data="18055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1838SIwCs2wooO/mfn4+LJbZolR2iQph44="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:VLLuFJD+ZCs/iFdl/XCLa2nJcOQ=
In-Reply-To: <cbae89b5-ab7e-4f21-a603-e4355524387an@googlegroups.com>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Wed, 29 Dec 2021 18:27 UTC

On Wed, 29 Dec 2021, qkumba wrote:

>> 0100- B8 01 02 MOV AX, 0201
>> 0103- 41 INC CX
>> 0104- 9C PUSHF
>> 0105- 06 PUSH ES
>> 0106- 53 PUSH BX
>> 0107- EA 4C 00 00 00 JMP 0000:004C
>>
>> 12 bytes, eh? That's far more efficient than I'd come up with. xD
>
> The instruction at 0107 should read
>
> 0107- 26 FF 26 4C 00 JMP FAR ES:[004C]
>
> It has to be indirect to use the vector.
> If you're willing to bet that DS is also zero, then you can drop the first 26.
>

Didn't know you could use a segment override with JMP. o.o

The 8086 is a lot more complicated than the 6502.

(I'm also trying to write a 6502 core in 8086 asm but given that I don't
even have a fully working 6502 core in C, it's probably a fool's errand.)

-uso.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor