Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fast or direct load from disk.

28 views
Skip to first unread message

Egan Ford

unread,
Feb 22, 2012, 11:49:54 AM2/22/12
to
Hello all,

I am looking for any code or suggestions on how to load a single
binary to a specific address and execute it directly from disk
(booting required) without DOS or ProDOS loading first.

I've seen some games load very fast. Is there a general method for
doing this floating around?

Thanks.

Charlie

unread,
Feb 22, 2012, 3:22:43 PM2/22/12
to
I believe you can put a binary on track 0 sector 0 and it will load to
$800 upon booting the disk. It will then jump to $801 and execute the
code. The byte at $800 tells the boot code how many sectors to load up
to 16, I think.
No DOS is involved.

Charlie

Antoine Vignau

unread,
Feb 22, 2012, 3:41:43 PM2/22/12
to
You need the Accolade boot. In a single sector at $800. It uses the
disk II controller code to load sectors and also the move arm routine
and that was enough.

That was rendered popular by Tom E. Hawk to sign his cracks.

Antoine

Egan Ford

unread,
Feb 22, 2012, 4:35:48 PM2/22/12
to
Wow Charlie, that is stupid simple. I just need to make sure I turn
off the drive motor.

Thanks!

Egan Ford

unread,
Feb 22, 2012, 4:39:25 PM2/22/12
to
My Apple II knowledge has a gap from 1985 to 2008. Where can I find
this magic sector and docs on how to use it? Thanks.

D Finnigan

unread,
Feb 22, 2012, 5:01:36 PM2/22/12
to
Egan Ford wrote:
>
> My Apple II knowledge has a gap from 1985 to 2008. Where can I find
> this magic sector and docs on how to use it? Thanks.
>

Beneath Apple DOS explains the disk boot procedure, starting from the code
executed on the PROM before even DOS or ProDOS is fully loaded.

Hugh Hood

unread,
Feb 22, 2012, 6:04:56 PM2/22/12
to
Egan,

See Tom Weishaar's letter response under "Running without filenames" on Page
7 of the January, 1985 issue of Open-Apple.

He describes a technique that should do exactly what you're asking.

If you don't have your old paper copy, here's the link to an online pdf
copy:


<http://apple2online.com/web_documents/Open%20Apple%20Vol1No00.pdf>





Hugh Hood ...




in article
4adff58c-05e5-4a34...@jn12g2000pbb.googlegroups.com, Egan
Ford at data...@gmail.com wrote on 2/22/12 10:49 AM:

Antoine Vignau

unread,
Feb 22, 2012, 10:35:17 PM2/22/12
to
On 22 fév, 22:39, Egan Ford <dataj...@gmail.com> wrote:
>
> My Apple II knowledge has a gap from 1985 to 2008.  Where can I find
> this magic sector and docs on how to use it?  Thanks.

Once again, big thanks to Godfather for what he did in France during
the 80's:

http://boutillon.free.fr/Underground/Cours/Cours_GDF/Gp11/Gp11.html

Explanations are in French (David please?) but 6502 is universal :-)
antoine

Antoine Vignau

unread,
Feb 22, 2012, 11:06:43 PM2/22/12
to
And for fast boot, all the existing ones are probably based on either
Electronic Arts' or Locksmith's routines and, as usual, Godfather's
work may help you: http://boutillon.free.fr/Underground/Cours/Cours_GDF/Gp09/Gp09.html

The above course includes a fast boot maker :-)

antoine

D Finnigan

unread,
Feb 23, 2012, 11:49:12 AM2/23/12
to
Antoine Vignau wrote:
I'll see about it.

Egan Ford

unread,
Feb 24, 2012, 5:10:30 PM2/24/12
to
Update. I also have to move the arm. And workout the skew. I am
going to pass on this method for now.

Egan Ford

unread,
Feb 24, 2012, 5:11:28 PM2/24/12
to
Antoine, thanks! I'll look into it.

Egan Ford

unread,
Feb 24, 2012, 5:20:07 PM2/24/12
to
On Feb 22, 4:04 pm, Hugh Hood <hughh...@earthlink.net> wrote:
> Egan,
>
> See Tom Weishaar's letter response under "Running without filenames" on Page
> 7 of the January, 1985 issue of Open-Apple.
>
> He describes a technique that should do exactly what you're asking.
>
> If you don't have your old paper copy, here's the link to an online pdf
> copy:
>
> <http://apple2online.com/web_documents/Open%20Apple%20Vol1No00.pdf>
>
> Hugh Hood ...
>
> in article
> 4adff58c-05e5-4a34-9f29-b2989771f...@jn12g2000pbb.googlegroups.com, Egan
> Ford at dataj...@gmail.com wrote on 2/22/12 10:49 AM:
>
>
>
>
>
>
>
> > Hello all,
>
> > I am looking for any code or suggestions on how to load a single
> > binary to a specific address and execute it directly from disk
> > (booting required) without DOS or ProDOS loading first.
>
> > I've seen some games load very fast.  Is there a general method for
> > doing this floating around?
>
> > Thanks.

Hugh, perfect. A simple solution for a lazy programmer. It may not
be the fastest solution, but it was the fastest to implement. Thanks
again for everyone's help.

I just posted c2d (code to disk) to http://asciiexpress.net/files. I
included the source with OS/X and Windows binaries.

c2d will take a single binary (with or without 4-byte DOS header) or a
text monitor listing and create a bootable diskette (dsk) image.

usage: c2d [-vh?]
c2d [-m] input[.mon],[load_address] output.dsk

-h|? this help
-m jump to monitor after booting
-v print version number and exit

input without a .mon extension is assumed to be a binary with a 4 byte
header.
If the header is missing then you must append ,load_address to the
binary input
filename, e.g. filename,800. The load address will be read as hex.

input with a .mon extension expected input format:

0800: A2 FF 9A 20 8C 02 20 4F
0808: 03 4C 00 FF 20 9E 02 A9

Examples:

c2d hello hello.dsk
c2d hello.mon hello.dsk
c2d hello,800 hello.dsk
c2d -m test,300 test.dsk



Example Sessions:

$ c2d air_cars,6000 air.dsk

Reading air_cars, type BINARY, start: $6000, length: 8192

Number of sectors: 32
Sector page range: $60 - $7F
After boot, jump to: $6000

Writing air_cars to T:01/S:00 - T:02/S:15 on air.dsk


$ c2d moon.patrol,801 moon.dsk

Reading moon.patrol, type BINARY, start: $0801, length: 18460

Number of sectors: 73
Sector page range: $08 - $50
After boot, jump to: $0801

Writing moon.patrol to T:01/S:00 - T:05/S:08 on moon.dsk

Michael J. Mahon

unread,
Feb 24, 2012, 8:29:45 PM2/24/12
to
Moving the arm is not complicated--just a table and a time delay.

Physical to logical skew is also a simple lookup.

Take a look at the DOS boot loader to see how to do it.
..or just use the DOS boot loader as Open-Apple describes.

-michael

NadaNet 3.1 for Apple II parallel computing!
Home page: http://home.comcast.net/~mjmahon/

"The wastebasket is our most important design
tool--and it's seriously underused."

Antoine Vignau

unread,
Feb 25, 2012, 1:20:22 AM2/25/12
to
On 24 fév, 23:20, Egan Ford <dataj...@gmail.com> wrote:
> Hugh, perfect.  A simple solution for a lazy programmer.  It may not
> be the fastest solution, but it was the fastest to implement.  Thanks
> again for everyone's help.
>
> I just posted c2d (code to disk) tohttp://asciiexpress.net/files.  I
> included the source with OS/X and Windows binaries.
>
> c2d will take a single binary (with or without 4-byte DOS header) or a
> text monitor listing and create a bootable diskette (dsk) image.
>

Interesting work, Egan.

Do you have final disk images examples somewhere?

antoine

Egan Ford

unread,
Feb 25, 2012, 2:51:02 PM2/25/12
to
On Feb 24, 11:20 pm, Antoine Vignau <antoine.vig...@laposte.net>
wrote:
I posted 3 here: http://asciiexpress.net/files/antoine/

Moon Patrol and Ms. Pacman have a delay (decompression as part of the
binary).

The base disk image is a DOS 3.3 formatted (slave) dsk file. I then
just patched it following the Open-Apple notes. It would be very easy
to change the base disk image to use any loading method as long as it
only uses track 0 with minimal changes to my C code. Now that I have
something, I'll be experimenting with other methods as I have time.

Antoine Vignau

unread,
Feb 25, 2012, 5:03:11 PM2/25/12
to
Thanks, Egan,
a smart use of the good old RWTS ;-)
antoine

mmphosis

unread,
Feb 28, 2012, 7:43:28 PM2/28/12
to
Antoine Vignau wrote:
I created a boot disk with c2d: APPLE-1 for Apple II...
http://hoop-la.ca/apple1/

make c2d

tr ‘[:upper:]‘ ‘[:lower:]‘ < apple1.hgr2.8000.bin.hex.txt | hex2bin
> apple1.hgr2.8000.bin

/c2d apple1.hgr2.8000.bin,8000 apple1-boot.dsk

http://hoop-la.ca/apple1/apple1-boot.dsk

Linards Ticmanis

unread,
Feb 28, 2012, 8:28:43 PM2/28/12
to
On 02/29/2012 01:43 AM, mmphosis wrote:

> tr ‘[:upper:]‘ ‘[:lower:]‘ < apple1.hgr2.8000.bin.hex.txt | hex2bin

You might want to check your newsreader; it obviously uses Unicode
(UTF-8) but the Content-Type: header gets set to ISO-8859-1. The result
is that unless you manually switch encodings, your line above looks like
this:

> tr ‘[:upper:]‘ ‘[:lower:]‘ < apple1.hgr2.8000.bin.hex.txt | hex2bin

--
Linards Ticmanis

Egan Ford

unread,
Feb 29, 2012, 12:34:39 PM2/29/12
to
On Feb 28, 5:43 pm, mmpho...@macgui.com ( mmphosis) wrote:
> Antoine Vignau wrote:
> > On 24 f v, 23:20, Egan Ford <dataj...@gmail.com> wrote:
> >> Hugh, perfect. A simple solution for a lazy programmer. It may not
> >> be the fastest solution, but it was the fastest to implement. Thanks
> >> again for everyone's help.
>
> >> I just posted c2d (code to disk) tohttp://asciiexpress.net/files. I
> >> included the source with OS/X and Windows binaries.
>
> >> c2d will take a single binary (with or without 4-byte DOS header) or a
> >> text monitor listing and create a bootable diskette (dsk) image.
>
> > Interesting work, Egan.
>
> > Do you have final disk images examples somewhere?
>
> > antoine
>
> I created a boot disk with c2d: APPLE-1 for Apple II...http://hoop-la.ca/apple1/
>
> make c2d
>
> tr ‘[:upper:]‘ ‘[:lower:]‘ < apple1.hgr2.8000.bin.hex.txt | hex2bin
>
> > apple1.hgr2.8000.bin
>
> /c2d apple1.hgr2.8000.bin,8000 apple1-boot.dsk
>
> http://hoop-la.ca/apple1/apple1-boot.dsk

c2d can also read a hex listing with the following rules:

1. Must end in .mon
2. Must have an address on the first line, others are ignored.
3. Must have a space after the :

e.g.:

perl -pi -e 's/:/8000: /' <apple1.hgr2.8000.bin.hex.txt
>apple1.hgr2.8000.bin.hex.mon

then

c2d apple1.hgr2.8000.bin.hex.mon apple1-boot.dsk

If you are interested I created you an audio file for use with Apple
IIs without a disk controller:

perl -pi -e 's/:/ /' <apple1.hgr2.8000.bin.hex.txt | \
perl -pi -e 's/[\n\r]//g' | \
perl -pi -e 's/^/8000: /' >apple1.hgr2.8000.bin.hex.mon

c2t -2 apple1.hgr2.8000.bin.hex.mon apple1-boot2.aif

Reading apple1.hgr2.8000.bin.hex.mon, type monitor, segment 1, start:
0x8000, length: 3840

Writing apple1-boot2.aif as Apple II formatted aiff.

To load up and run on your Apple II, type:

CALL -151
8000.8EFFR
8000G



D Finnigan

unread,
Feb 29, 2012, 2:05:58 PM2/29/12
to
Linards Ticmanis wrote:
> On 02/29/2012 01:43 AM, mmphosis wrote:
>
>> tr �[:upper:]� �[:lower:]� < apple1.hgr2.8000.bin.hex.txt |
hex2bin
>
> You might want to check your newsreader; it obviously uses Unicode
> (UTF-8) but the Content-Type: header gets set to ISO-8859-1.

That improvement is coming rather quite soon. I'm about 95% done writing my
MIME parsing library.
0 new messages