6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 1:26 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Oct 20, 2017 7:28 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Garth prompted me to look into the state of play of reverse-engineering the 65ce02 - this is a rarely seen successor to the 6502 with a number of improvements and at least one new bug (in decimal-mode SBC).

A preliminary datasheet from 1988 can be found in the usual place nearby. Quoting from the description there:
Quote:
The Commodore 65CE02 is an enhanced version of the popular 8-bit 6502. designed with entirely new
internal architecture and manufactured in 2-micron, double-level-metal, CMOS technology for high speed
and low power consumption. The 65CE02 is code and pin compatible with existing 6502/65C02s.
The instruction set has been streamlined, removing most dead cycles which occurred due to page
boundaries and micro-code pipelines, allowing existing code to run up to 25% faster. Additional instructions
and addressing modes allow even greater program efficiency. Add to this operational speeds of up to
10MHz (100ns instruction cycles) and the 65CE02 is capable of a 350% decrease in program execution
time compared to a standard 4MHz 6502.


The visual6502 project has amassed a collection of chips for deprocessing, photography, polygon capture and eventual rebirth as an in-browser emulator, but progress is slow. So far there are online transistor-level simulations of 6502, 6800, and ARM1.

But elsewhere, nearby, John McMaster has been decapsulating, deprocessing and photographing a variety of chips, including both a revision 1 and a revision 2 of generously donated 65ce02s. This was tricky - a double-layer metal chip needs careful etching to expose the lower layer without too much damage. You'll find high-resolution photos and zoomable slippy maps at those links.

Pavel Zima has then gone on to capture the layers as polygon data and to draw up schematics of various parts, as stated on his website:
Quote:
65CE02 CPU
Improved version of 6502 from Amiga A2232 serial port card and as well part of Commodore 65 CPU. Opcodes taken from preliminary manual and corrected by reverse engineering of the chip photograph: 65CE02 opcodes.
Drawings of the layers of the revision 2 of the chip are here: 65CE02 layers. Original microscopic pictures are here: http://siliconpr0n.org/archive/doku.php ... :65ce02-r2.
In the layers - pads are darker blue, metal2 is blue, metal1 is green, polysilicon is red, p-diffusion is pink, n-diffusion is light blue, n-well is grey, vias from metal2 to metal1 are yellow or dark blue if grounded or red if powered, vias from metal1 to polysilicon or diffusion are white or light blue if grounded or pink if powered.
Areas in layers images are here: 65CE02 areas.


It seems promising that, from the digitised layer information, someone could convert to the data structures needed for a visual6502-style transistor-level simulation. (As has been done previously, by Quietus, for the RP2A03 NES chip, which embeds a copy of a 6502.)


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 08, 2017 10:37 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
An exciting update: Pavel has begun to publish his findings. Already, the info on the sequencer is rather interesting. See here, and keep an eye open for updates:
http://pastraiser.com/cpu/65CE02/65CE02_schematic.html

For a backgrounder on the features of the 65ce02 - it's more of an upgrade that I thought - see for example page 2 of this PDF
http://archive.6502.org/datasheets/mos_65ce02_mpu.pdf
and also in a different format here, where it's the same core but now called the 4502 (for the C65):
https://archive.org/stream/C64DXakaC65S ... /mode/1up/
and the same info in a more plain text form here:
https://github.com/MEGA65/c65-specifica ... .txt#L2494

There's a nice opcode tabulation here:
http://pastraiser.com/cpu/65CE02/65CE02_opcodes.html


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 08, 2017 10:58 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Pavel has also shared his layout images (large!) and some supporting files:
Quote:

Please see the attached zip file for four files with more info (preliminary analysis subject to update, of course):
  • ROM_SIGS.txt (quick and dirty explanation of ROM signals) – I have to check what those * and + and – mean, but basically it is delay of the signal
  • transistors.txt – coordinates of few signals for simulator (yes, I have working simulator)
  • 65ce02.xlsx – table of how some signals and instructions work
  • output27.txt – output from my romreader, analysis of content of the ROM, if you look near to the bottom of the file there are signals provided by the ROM for each instructions like:
    Code:
    E8 INX 1 1
       T1P1 [PRESYNC]
         P2 [PRESYNC]
       T2P1 [SYNC PAD]
         P2 [ ALUADD][ CINONE][ MODFLAGN][ MODFLAGZ][ RDX][SYNC PAD]
       T3P1 [ ALUADD][ CINONE][ MODFLAGN][ MODFLAGZ][ RDX][*WRX]
    E9 SBC #d8 2 2
       T2P1
         P2 [ ALUADCINS][ ALUADD][ CINFLAGC][ GETALUB][ MODFLAGN][ MODFLAGZ][ NOTALUB][ RDA][ SYNC]
       T3P1 [ ALUADCINS][ ALUADD][ CINFLAGC][ GETALUB][ MODFLAGC+][ MODFLAGN][ MODFLAGV+][ MODFLAGZ][ NOTALUB][ RDA][ SYNC][*WRA]
         P2 [ MODFLAGC+][ MODFLAGV+]


Attachments:
four-files-65ce02-2017-10-21.zip [71.18 KiB]
Downloaded 201 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 08, 2017 12:00 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
That's amazing! Thanks. I linked to this topic on the 65CE02 line on my links page.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 08, 2017 12:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Thanks Garth. I see you already link to Michael Steil's handy differences document:
CSG65CE02 Technical Reference


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: