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

Re: Proterm and the //E



Neil Parker (nparker@cie-2.uoregon.edu) wrote:
: In article <4qvndj$38f@news.vanderbilt.edu> lesherjt@vuse.vanderbilt.edu (John
: Lesher) writes:
: >[...]
: >Would anyone happen to know, then, how to tell an enhanced //e from
: >a mere //e with a 65c02, from software?

: The enhanced ROM is easy to detect.  The (almost) full ROM ID test goes
: like this:

:      Look at location $FBB3.
:      If the value is $38, it's an original Apple II ROM.
:      If the value is $EA, it's an Apple II+ ROM (or a III in emulation mode).
:      If the value is $06, it's a IIe, IIc, or IIGS ROM, in which case...
:           Look at location $FBC0.
:           If the value is $EA, it's an unenhanced IIe ROM.
:           If the value is $E0, it's an enhanced IIe ROM, or a IIGS.
:           If the value is $00, it's a IIc ROM, in which case...
:                Look at location $FBBF.
:                For the first four IIc revisions, the values are $FF, $00,
:                $03, and $04 respectively.  For the IIc+, the value is $05.

: (Actually, that's not really the full test...the full test would include
: distinguishing between a II+ and a III in emulation mode, and between an
: enhanced IIe, an IIGS, and an Apple IIe card in a Mac.)

: As far as I know, the Mousetext character generator can't be detected by 
: software.  But it's generally safe to assume that if the machine is an
: enhanced IIe, a IIc, or a IIGS, then Mousetext is available.  (It is
: possible to install a pre-Mousetext character generator in an enhanced IIe,
: or a Mousetext character generator in an unenhanced IIe, but not many
: people do so.)

: In other words,

:      IF  PEEK (64435) = 6 AND  PEEK (64448) <  > 234 THEN  PRINT "Mousetext
:      is probably available."

I thought of another possible trick, while puzzling over this in my spare
time.  I remember some old programs which would "mirror" the text screen
to the graphic screen.  All I'd have to do is check a certain bit on the
hires screen, and I'd be able to tell between pre-Mousetext and Mousetext
ROMs.  I'd also be able to tell between the old Mousetext ROMs (running
man) and the new ROMs (inverse CR & horizontal lines).

Can anyone tell me if this is possible, or did the "mirror" trick not
really use the ROMs?

: The above line is also sufficient to distinguish if the CPU is a 65C02 (or
: better), since all ROMs that pass that test make use of 65C02 opcodes.  If
: you want to check whether or not an unenhanced machine has a 65C02, you can
: use a machine-language routine that tries to test for one of the infamous
: 6502 bugs, like this:

: 18        CLC
: F8        SED
: A9 99     LDA #$99
: 69 01     ADC #1
: D8        CLD
: D0 xx     BNE Not65C02

: This takes advantage of the fact that on an original 6502, the sign flag
: doesn't work right in decimal mode.  This bug was fixed in the 65C02.
: Thus the BNE always branches on a 6502, and never branches on a 65C02.

I thought of another to detect the difference between the two processors.

lda #$ff
inc          ;to accumulator ($1A or $3A opcode)
cmp #$00
beq _65C02_Present

Instead of trying to use an error in the 6502, I just use an opcode
not available to the 6502, which would be ignored on the 6502.

Tilghman