PDA

View Full Version : 65C02 in Apple IIe -- Can't boot from disk



Hyperfrog
July 7th, 2010, 11:26 AM
I replaced my Apple IIe's 6502 with a 65C02. She still displays "Apple ][" upon power on, which makes me believe the new CPU is good, but she now refuses to boot from disk. What's wrong? Do I need to also replace the ROMs in order to convert her into an enhanced IIe?

Thanks,

Christian

wmmullaney
July 7th, 2010, 11:42 AM
An enhanced IIe also has rom upgrades. New character and ef-cd roms, I believe. All in all 4 chips were replaced.

The 65c02 is functionally identical to the 65n02, just a few extras in the form of instructions and addressing modes. If the c02 doesn't work were the n02 did, I would suspect that chip is bad.

http://en.wikipedia.org/wiki/Apple_IIe#The_Enhanced_IIe


I have some untested enhanced ROMs for sale, if you are interested PM me.

Hyperfrog
July 7th, 2010, 11:52 AM
An enhanced IIe also has rom upgrades. New character and ef-cd roms, I believe. All in all 4 chips were replaced.

Right, but I thought one could just replace the CPU and get a semi-enhanced IIe. ;)


The 65c02 is functionally identical to the 65n02, just a few extras in the form of instructions and addressing modes. If the c02 doesn't work were the n02 did, I would suspect that chip is bad.

Well, I've just tested that particular 65C02 in my PET 8032, and it works great, so there must be some difference between a 6502 and a 65C02 in terms of timing. I've also read that some instructions take less cycles to execute on the 65C02. See http://www.6502.org/tutorials/65c02opcodes.html#7. I suppose disk I/O on the Apple II is very sensitive to slight variations in execution speed.

Has anyone got the same problem before?

Thanks,

Christian

Chuck(G)
July 7th, 2010, 12:33 PM
No, but I could believe that a different CPU would make a huge difference. The disk controller in the IIe is intimately tied to the CPU timings. See the disk chapter in "Understanding the Apple IIe". A fix might be to rework the floppy sequencer ROM contents.

wmmullaney
July 7th, 2010, 01:48 PM
Then how to enhanced and un-enhanced IIe's share the same floppy controller?

Chuck(G)
July 7th, 2010, 01:52 PM
Then how to enhanced and un-enhanced IIe's share the same floppy controller?

For a disk access the CPU is slowed down. But don't take my word for it, check out the very good chapter in "Understanding the Apple IIe". It's very detailed.

Raven
July 7th, 2010, 11:52 PM
Not to intrude with ignorance all over this fairly well-informed thread, but what CPU does the Apple IIe Platinum I have use? Would it be considered "enhanced"?

Dutch
July 8th, 2010, 05:14 AM
For a disk access the CPU is slowed down. But don't take my word for it, check out the very good chapter in "Understanding the Apple IIe". It's very detailed.

This is true, but only for the //GS operating in 2.8MHz "fast" mode. It is not slowed down for in the //e, although the 5.25 disk controller is very cycle dependent.

As a side note, you must use a 65C02 marked at least 2MHz operation. Even though it is clocked at only 1 MHz, due to some timing margins, it needs a little more.

I agree with Chuck, "Understanding the Apple //e" is an excellent reference in this case. The chapter on the disk controller, chapter 9 I believe, is the pretty much the same as in "Understanding the Apple ][" which is widely available on the internet.

And, the Platinum //e is enhanced.

Hyperfrog
July 8th, 2010, 08:21 AM
As a side note, you must use a 65C02 marked at least 2MHz operation. Even though it is clocked at only 1 MHz, due to some timing margins, it needs a little more.

I'm skeptical about that. Did you actually try to use a 1-MHz part? Although the CPU speed is a tiny little bit over 1 MHz (1.023 MHz), a CMOS part is generally easy to overclock, and 2.3% is probably within the specifications anyways.

I believe the updated ROMs contain new routines for disk I/O that compensate for the 65C02 being a little bit faster with the execution of some instructions. I'll burn my own ROMs and post the results when I'm done.

Cheers,

Christian

Hyperfrog
July 8th, 2010, 09:52 AM
This is confirmed: a 1-MHz 65C02 (R65C02P1) works fine once you've replaced the CD and EF ROMs. :D

I didn't bother replacing the character generator yet.

Raven: Your Platinum IIe is an enhanced IIe with an upgraded keyboard. It should thus be fitted with a 65C02 CPU.

Cheers,

Christian

channelmaniac
July 8th, 2010, 09:09 PM
Yup... Apple went the cheap route for disk drives/controllers.The drive uses a 74LS125 to buffer the signals back to the controller and the controller uses 2 PROMs and some cheap logic along with software to replace those expensive disk controller ICs and data separator ICs.

If you change the processor out for the C02 then you'll change how fast some of those software routines work which will screw up the ability to read disks. The C02 is somewhat optimized and contains some additional opcodes. That optimization changes timing ever so slightly.

RJ

Dutch
July 9th, 2010, 04:48 AM
I'm skeptical about that. Did you actually try to use a 1-MHz part? Although the CPU speed is a tiny little bit over 1 MHz (1.023 MHz), a CMOS part is generally easy to overclock, and 2.3% is probably within the specifications anyways.

I believe the updated ROMs contain new routines for disk I/O that compensate for the 65C02 being a little bit faster with the execution of some instructions. I'll burn my own ROMs and post the results when I'm done.

Cheers,

Christian

Yes, I Did.:smile:

Dutch
July 9th, 2010, 05:01 AM
If you change the processor out for the C02 then you'll change how fast some of those software routines work which will screw up the ability to read disks. The C02 is somewhat optimized and contains some additional opcodes. That optimization changes timing ever so slightly.

RJ

I wonder how critical this is in a system wide sense, and from machine to machine. I have a Senior PROM and it uses unenchanced code. For those that don't know what this is, it was a deprotection tool that switches it own ROM for the Apple's CD-EF ROM. It's not a software controlled bankswitch, it's hardwired on a toggle switch, so it uses it's own disk routines. There was an enchanced version of this, but I've never seen one, so I mixed the enhanced Apple ROM and the unenhanced Senior PROM code on one set of EPROMS. I've yet to see a problem with reads and writes.

Maybe this only affects the boot code in the controller's P5 boot PROM and the not logic seqencer in P6 (been a while, might have the numbers backwards).

dave_m
July 9th, 2010, 08:33 AM
I've yet to see a problem with reads and writes.

Dutch,
I agree with you. The real issue is most likely bus loading. When the 65C02 was installed in a system with old NMOS ROMs and RAM, etc., it most likely violated the 65C02 capacitance/drive bus loading requirements.

When the person switched to faster lower capacitance EPROMs, the problem went away, but not due to the code being executed.

Your proposed solution of going to a 2 MHz CPU would most likely have solved the problem also due to its faster setup times and drive capabilities.
-Dave

Hyperfrog
July 10th, 2010, 09:11 AM
The real issue is most likely bus loading. When the 65C02 was installed in a system with old NMOS ROMs and RAM, etc., it most likely violated the 65C02 capacitance/drive bus loading requirements. When the person switched to faster lower capacitance EPROMs, the problem went away, but not due to the code being executed.

You could be right, but I'm still a bit skeptical about that. I'll burn the original code into the "new" EPROMs, and we'll see what happens. Let me remind you that I had the "Apple ][" screen consistently displayed upon power up when the computer was fitted with the 65C02 and the old ROMs. Had the CPU not been able to drive the bus, it should have crashed before displaying this screen -- at least once in a while.

Christian

dave_m
July 10th, 2010, 09:18 AM
I'll burn the original code into the "new" EPROMs, and we'll see what happens.

Oh yes, that would be a wonderful experiment. Either way I am curious to know the result. Thanks.
-Dave