[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 65c02 in ][+ problem
John L <jd@logotech.8m.com> wrote:
> On Tue, 4 Dec 2001 12:26:27 +1300, dempson@actrix.gen.nz (David
> Empson) wrote:
>
> >John L <jd@logotech.8m.com> wrote:
> >
> >> I've got a Rockwell 65c02 CPU running quite well in my ][+ (64K with
> >> language card), however, I can't seem to get ProDOS 2.0.3 running at
> >> all. When I attempt to boot P8 2.0.3 from any device I get the splash
> >> screen then the system locks up with a few garbage characters.
> >
> >One possible explanation is that ProDOS is trying to use a CPU detection
> >algorithm which involves 65802/65816 instructions but doesn't allow for
> >the Rockwell R65C02.
>
> How compatible is the R65c02 with the 8-bit mode of the 65816 ?
The R65C02 instruction set is a superset of the WDC/GTE 65C02 (see David
Wilson's post elsewhere in this thread for details).
Unfortunately, the extra instructions added in the R65C02 do not exist
in the 65802 or 65816: the same opcodes are used for completely
different instructions.
As long as a program sticks to "standard" 65C02 opcodes, it will work
fine on a WDC/GTE 65C02, a Rockwell R65C02, or a 65802/65816.
If the program tries to use the extra instructions of the R65C02 or
65802/65816 on the wrong processor, they will not have the expected
effect.
With some careful planning it is possible for a program to detect the
CPU type, and either refuse to run or use different code according to
the detected CPU.
Programming the 65816 by Eyes & Lichty had a routine of this type which
was able to distinguish between a 65802/65816, normal 65C02 and original
6502. It failed if an R65C02 was in the machine.
I managed to work out a modified version of this routine which allowed
for the R65C02 as well.
(The 65802 and 65816 have identical instruction sets and core logic.
The only differences are in the external connections: the 65802 is able
to be used in place of a 65C02 or 6502, and can only directly address 64
KB of memory; the 65816 has different bus signals which allow it to
directly address 16 MB of memory, and it cannot be reliably used in
place of a 65C02 or 6502.)
> Assuming this CPU detection algorithm is correct, how is it that an
> enhanced //e running an R65c02 can run P8 2.0.3 without trouble ?
It could be related to the machine detection logic, bypassing the
R6502-incompatible code if IIgs, IIc or enhanced IIe firmware is
detected, though I'd expect that it should still be checking for a 65C02
in the case of an enhanced IIe (someone might have done a partial
enhancement, leaving the 6502 processor but replacing the firmware).
> The Rockwell 65c02 I'm using [in the II+] actually came from a TransWarp
> accelerator card which failed to work on my //e. The CPU is operational
> and is rated at 4MHz.
This particular CPU might have borderline timing problems with a II+.
You may find that a slower R65C02 works fine in the II+.