[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> wrote:
> 1. I remember something about double HIRES on a 80 column card. How do you
>   turn it on. ? 

Double Hi-res graphics is available on the Apple IIe (except the
original revision A motherboard) if a 64k "extended 80-column card" is
installed in the auxiliary slot.  With some cards, a jumper must be
connected to enable double hi-res modes.

This mode is also available on the IIc and IIgs.

Activating it is straightforward: get into 80-column text mode, turn
on hi-res graphics, and turn off annunicator 3 by reading or writing
$C05E (49246).  To return to standard resolution hi-res graphics, turn
on annunicator 3 by reading or writing $C05F (49247).

Actually using double hi-res graphics mode is rather tricky.  The two
halves of the video buffer are in main and auxiliary memory at
$2000-$3FFF.  Accessing the auxiliary memory portion requires the use
of the 80STORE soft switch (enabled by writing to $C001).  The PAGE1
and PAGE2 softswitches then select whether the $2000-$3FFF area access
main or auxiliary memory (if double hi-res graphics is enabled).

Colours work quite differently (and very awkwardly) in double hi-res
graphics mode.

Applesoft BASIC does not directly support double hi-res graphics.  You
can only draw on the double hi-res screen from assembly language, or
by calling assembly language support routines, or by tedious partial
plotting and page flipping.

There is also a double lo-res graphics mode, which Apple have never
officially documented.  It is supported by Applesoft BASIC in the IIc
and IIgs, and is enabled by using the GR command after setting
annunciator 3 off.

> Poking the card causes strange display effects, but often jams up
> the cpu.

What do you mean by "poking the card"?  The IIe 80-column card and
some other features are controlled by a series of softswitches in
$C000-$C00F (49152 to 49167).  Poking these indiscriminately is a bad
idea, because some of them switch out main memory, while others switch
out the zero page and stack area (along with the language card).
These switches can only be used properly from assembly language (with
a few exceptions, e.g. 80STORE, 80VID and PRIMARY/ALTERNATE CHARSET).

> Also, how can you access the other 64k with poke & peek? 

You can't.  It can only be accessed by assembly language programs.
There are a couple of exceptions: the auxiliary memory text screen and
double hi-res screen areas can probably be accessed by a careful
series of soft switch toggles, but you could leave the machine in a
nasty state if the program left these switches on.

Assembly language programs running in the main 48k RAM area can
directly access auxiliary memory zero page and stack areas, and the
auxiliary memory language card space.  Assembly language programs
running in the auxiliary language card space can directly access
anything except the main language card and zero page/stack.

There are also a couple of routines provided in the IIe's ROM to
facilitate the use of auxiliary memory: AUXMOVE, which can transfer
blocks of data between main and auxiliary memory (or vice versa) and
XFER, which can transfer control of execution between main and
auxiliary memory (or vice versa).

None of these are easy to use, and all require assembly language.

> 2. What is sweet16? 

It is an emulated processor and instruction set which is available as
part of INTBASIC.  It is used by some INTBASIC add-ons, such as the
Programmers Aid #1 ROM.  It is also used by 8-bit versions of the
Merlin assembler, when assembling.

Sweet-16 provides 16 emulated 16-bit registers, with the ability to do
simple calculations between any pair of registers.  It is somewhat
slower than normal 6502 assembly language, because the Sweet-16
interpreter has to work out what each Sweet-16 instruction is doing,
and emulate this using a series of 6502 instructions (it isn't as hard
as it sounds).

The main benefit of Sweet-16 is that it can do quite complicated
16-bit calculations while using a lot less code space than the
corresponding 6502 assembly language program would take.

> 3. I think I remember something about a modified DOS 3.3 hacked so it could
>   write on write protected disks. Is this possible?

No.  The disk drive (probably the controller, actually) prevents
software from writing to a write protected disk.

> Also, how did they hack DOS so that it could load binary files a lot
> quicker? 

As used in the OILER program, or Pronto-DOS, for example?  I'm not
quite sure.  I think it was done by eliminating an unnecessary
buffering stage inside DOS.  Significant improvements can be made in
the SAVE/BSAVE function by disabling the automatic verification.

ProDOS achieves faster read rates than any version of DOS 3.3 - it can
decode the disk data as it is being read (rather than buffering the
encoded data and then decoding it), it places the decoded data directly
into the destination buffer whenever possible, and it is always
reading two sectors at a time, with a minimum delay between them.

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

It probably relies on the monitor's instruction set table (in the
disassembler) and obviously uses the monitor for keyboard and screen I/O.

It doesn't rely on Integer BASIC at all.  I've relocated the Integer
BASIC version of the mini-assembler to lower memory areas and had it
working fine with only Applesoft in the machine.

The enhanced IIe, IIc (except for the original ROM version) and IIgs
include improved versions of the mini-assembler in ROM - you don't need
Integer BASIC at all.  All three are activated by typing ! from the
monitor, and you can return to the monitor by pressing RETURN on a
blank line.

The IIe version only supports the 6502 instruction set.  The IIc
version also supports 65C02 instructions.  The IIgs version supports
the full 65816 instruction set.

The IIgs version has one other nice feature: you can type in the first
instruction on the monitor command line, e.g.

*!300:LDA #0
00/0300: A9 00         LDA #00
!

On the IIe/IIc, you have to type !, press RETURN, then type in the
first instruction.
-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand