[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tech ?s about apple2e



In article <hI2XB94.vimx@delphi.com> vimx <vimx@delphi.com> writes:
>1. I remember something about double HIRES on a 80 column card. How do you
>  turn it on. ? Poking the card causes strange display effects, but often
>  jams up the cpu. Also, how can you access the other 64k with poke & peek?

How to turn on double hires:

     10  PRINT  CHR$ (4)"PR#3": PRINT  CHR$ (12): REM Turn on 80 cols
     20  HGR : REM Turn on hires
     30  POKE 49246,0: REM Switch graphics to double-res

Unfortunately, there are no commands in BASIC to draw in double hires.  Since
the single hires and double hires buffers share the same memory, it is
possible to force BASIC's commands to plot points in double hires, but it's
slow, and you have to do the bank-switching by hand, and generally fight
against BASIC every step of the way.  Fortunately, there are double hires
ampersand utilities available that make double hires programming much easier--
Beagle Bros used to sell a fairly good one in their "Beagle Graphics" package
(you may still be able to get it from Quality Computers).

You can't access the extra 64K with poke and peek.  You can safely peek and
poke the alternate-bank display screens, but the rest of the extra 64K is
organized in such a way that flipping the bank-switch switches causes your
entire BASIC program to disappear out from under you.  If you need to move
data between the aux bank and your BASIC program, you'll have to write a
little bit of machine language.

If you're content to access only the aux-bank data in the display screen
areas, you CAN do that from BASIC.  Turn on the 80-column firmware with
PR#3 (as in line 10 above).  Then you can switch between the main and
aux text pages with POKE 49236,0 (for the main page) and POKE 49237,0 (for
the aux page).  If you turn on the hires switch (POKE 49239,0), then hires
page 1 also bank-switches in the same way, even you're looking at the text
screen.

(Note:  For maximum safety, it's best to do this bank-switching with
interrupts disabled.  Many peripheral cards use the screen holes, which
bank-switch along with the rest of the text screen, and if a card interrupts
while you have the aux text page switched in, it can't find its screen-hole
data, and all heck breaks loose.  Unfortunately, disabling and re-enabling
interrupts requires machine language.)

>2. What is sweet16?

Sweet-16 is small pseudo-machine-language interpreter originally found in
one of the spare sections of the original Integer BASIC ROMs.  It uses a
number of zero-page locations as 16-bit "registers," and provides a small set
of instructions to manipulate those registers.

Sweet-16 disappeared from the ROMs when the Apple ][+ came out, but if you
have at least 64K and a copy of the DOS 3.3 system master disk, you can get
Sweet-16 back by loading Integer BASIC into the "language card" area.

>3. I think I remember something about a modified DOS 3.3 hacked so it could
>  write on write protected disks. Is this possible? Also, how did they hack
>  DOS so that it could load binary files a lot quicker?

If you want to write to a write-protected 5.25-inch disk, you have to modify
the disk drive hardware and disable the write-protect switch, so that the
drive thinks all disks are write-enabled.  It shouldn't require any patches
to DOS (and it ought to work with ProDOS too).

Fixing DOS 3.3 to load files faster is too complicated a subject to be
described in detail in this short (?) message.

In brief, DOS 3.3 is so slow because it buffers everything several times
before putting the data in its final destination.  The main bottleneck is
the File Manager (the middle third of DOS 3.3, responsible for interpreting
the file structure of disks).  The File Manager reads sectors into an internal
buffer, and then doles out the contents of the buffer one byte at a time to
whoever was reading the data.  By the time it finishes handing out the
contents of one sector, the next sector has usually already spun past the
read-write head, so you have to wait for the disk to spin completely around
and bring the next sector back under the head again.

Most DOS speed-up patches work by eliminating this extra buffering.  They
check to see if it's possible to read the entire sector directly into the
target memory, and if so, they bypass the File Manager's buffer.  Eliminating
the middleman saves so much time that it becomes possible to read the next
sector the first time around, rather than having to wait a full disk
revolution.

Alas, writing such a patch requires a thorough knowledge of what goes on in
the innards of DOS 3.3.  Generally, this means you need to read, and
understand, most of the contents of the chapter on DOS program logic in
_Beneath_Apple_DOS_ by Worth and Lechner.

>4. Does the mini-assembler call integer basic or just the monitor?

The mini-assembler only calls monitor routines.  It contains no dependencies
on Integer BASIC, except for the fact that its original version lived in the
same ROM chip.

            - Neil Parker
--
Neil Parker               | I saw old Autumn in the misty morn
nparker@cie-2.uoregon.edu | Stand shadowless like silence, listening
nparker@cie.uoregon.edu   | To silence.  -- Thomas Hood (1799-1845)