[comp.sys.apple] on 65c802's

ART100@PSUVM.BITNET ("Andy Tefft 862-6728", 814) (04/04/89)

It seems to me that interest has come up again in 65802's. A while
ago I asked about putting one in my //c and this is what i found out:

First, this was what got me interested:

From:         Brian Willoughby <microsoft!brianw@BEAVER.CS.WASHINGTON.EDU>
Subject:      Proposal: 16-bit C compiler for non GS

..
which can be munged by Orca's Assembler. This Assembler supports 6502, 65C02,
and 65C802 commands and will run on my home-built II Plus clone with a 65C802
installed.

    Since I have been looking for a more efficient C compiler, but can't seem
to find one, I started brainstorming. With the source for Small C, and an
assembler which works with a 16-bit 65C802, it should be possible to rewrite
the Assembler Macros that the compiler uses (this source is also included) to
use the 65C802 instructions. Thus the processor could access a true 64K stack,
not a software simulated stack. There would be many other benefits such as
faster manipulation of 16-bit data and smaller code.

    Unfortunately, no product like this will come out since not many Apple II
owners have the 65C802 plugged into their board, and any 16-bit C compilers
will probably be GS specific (not available to me!). { By the way, JameCo
Electronics has the 65C802-4MHz for $15.95 at 1355 Shoreway Road, Belmont, CA
94002 (415) 592-8097, and it works on my clone motherboard with all software
because it powers up in 6502 emulation mode! It also works with the standard
TransWarp accelerator from Applied Engineering. I swapped out the 65C02 and
found that AE even wrote boot code to recognise a 16-bit processor!. This gives
you a 3.58MHz 16-bit machine which is totally compatible! } END PLUGs;
          ...
I have been doing a lot of 65C802 programming...
The 65C802 is
certainly affordable by any Apple owner who doesn't already have it. All I

    Please respond by EMail to:    microsoft!brianw
                            or     uw-beaver!microsoft!brianw
- - - - -
And finally, the reply I was waiting for...


From: microsoft!brianw@beaver.cs.washington.edu

Andy,


Here is some info from my experience with the 65C802 in an Apple II Plus.
I hope it will help you to get started. I would like to see more 16-bit
non-GS users, so that the software available for the 16-bit enhanced machines
will increase.

I assume you're willing to "void" your warranty, so yes it would work as far
as I know. I don't know any //c owners, so I haven't heard of anyone trying
this. I'm sure that since the //c has the 65C02 that it could easily handle
the 65C802. No memory expansion is needed. The 65C802 only has a 16-bit
address bus in order to be compatible with the 6502.

In order to "utilize" the processor extensions, you are currently forced to
write your own software. Until more software is written in 16-bit mode that
doesn't access the IIGS ToolBox ROM calls, any 16-bit software available
probably won't run on our smaller machines. I used the Merlin 65C02 assembler
for a while, and wrote macros to add the new opcodes. It didn't read like
standard assembly, but at least I could use the new features. Now I have the
Orca/M ProDOS-based Assembler. It allows 6502, 65C02 and 65C802/816 code to
be mixed in the same program. It even allows you to turn the extensions off
for sections of code to flag an error if an extended opcode is used in the
wrong place. This allows you to write 6502 code which can check for which
processor is installed before executing 16-bit instructions.

At power up, the 65C802 behaves exactly like a 65C02, so the stack and zero
page are located in the default position, and the registers are forced to be
8-bit. I have had no problems with any software that previously worked with
my home-made clone of the Apple II Plus.

I only had one problem (and I mention it here FYI, but you shouldn't encounter
it). My reset circuit would overshoot the 0 to 5 Volt range of the CMOS
processor and cause it to lock up. The interesting side-effect was that all
processor outputs were shorted to 0 Volts when the chip was locked up, and
this caused every video access to be a write instead of a read. I've never
seen the graphics screen change so quickly. I had to cycle the power to force
a cold reset. CMOS processors can't handle input voltages beyond their power
supply range. I solved this by placing a 10uF capacitor on the reset line,
which reduced the "ringing" on the reset input. The reason I doubt that you
will have this problem is because your system is already designed for a CMOS
processor.

Feel free to contact me if you have any more questions, or if you write any
interesting 16-bit software.

Brian Willoughby        microsoft!brianw
- - - - -
Since I needed some electronic parts anyway I decided to get them from
JameCo and get a 65c802 at the same time to bring my total over $20.

Hardest part about installing this processor is getting the old one
out!! Just take it nice and slow, evenly from both ends (the right edge
is difficult to get out but I used a small pencil as a shim for the
screwdriver which was used to CAREFULLY pry that end out).

It's worked without any problems, but I haven't gotten to really use
any of its features yet. I'm waiting for Brian to send me a sort
of benchmark program, and I might be able to borrow the orca assembler
and try to write some programs. We'll just have to see.

Hope this answers some questions...

Andy