6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 3:02 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: the 65816 bug list
PostPosted: Sun Oct 09, 2022 9:56 am 
Offline

Joined: Sat Jul 09, 2016 6:01 pm
Posts: 180
Is there a list of the 65816 bugs somewhere? I have found a text which lists several bugs but it is without details. :( The text contains the next information.
Quote:
It turned out that the core had several more apparent errors. Unfortunately, we
were not expecting to require debugging the CPU because it was obtained directly from
the original manufacturer. When we started seeing errors very deep into the project, it
took us very off guard. For example, the Rotate Right (ROR) instruction gave incorrect
answers in several cases. A couple of instructions did not set the condition codes when
they were supposed to, or had timing problems such that they received the condition
codes from a different instruction. There were major bugs with the JSR instruction in the
absolute indexed indirect addressing mode. It saved the wrong address on the stack,
and then jumped to the wrong location.
It certainly looked like the errors that we found were coming from inside the CPU
and not from some interaction with our system. We expect that the WDC would have
informed us if the core was incomplete or untested. Also, there was a previous group
(the SNES) which used the same core but did not mention any errors in their report.

This is a cite from a book.

_________________
my blog about processors


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Sun Oct 09, 2022 11:53 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Interesting ("Apple IIGS by Chang, Osbun, and Walzer") - looks like a 2012 project report from perhaps an undergraduate course? Perhaps aiming to recreate the IIGS? In Verilog, using WDC's soft core, so presumably on an FPGA or similar. Indeed the Virtex 5 LX, which is approx from 2011.

So any bugs would be either in WDC's soft core - at that time - or possibly in the surrounding design or the toolchain.

Bruce's reference is quite exhaustive and I'd say definitive.
http://www.6502.org/tutorials/65c816opcodes.html


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Mon Oct 10, 2022 12:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
litwr wrote:
Is there a list of the 65816 bugs somewhere? I have found a text which lists several bugs but it is without details.

That book was describing a “homemade” system using an FPGA, not actual ][GS hardware. I'd take it with a grain of salt.

I have yet to run into any anomaly with the real 65C816 and do not believe that it has any hardware errata.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Mon Oct 10, 2022 3:55 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
It's possible we're in the clear now, but there was at least one '816 bug in the past. The one I heard about has to do with the REP and SEP instructions. Because of a timing problem, these instructions apparently were slow to take effect, and folks used to have to place a NOP after REP or SEP.

A quick web search revealed this discussion on stackexchange.com:

Early 65C816 CPU's SEP and REP instruction are followed by a NOP?

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Mon Oct 10, 2022 10:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
Dr Jefyll wrote:
It's possible we're in the clear now, but there was at least one '816 bug in the past. The one I heard about has to do with the REP and SEP instructions. Because of a timing problem, these instructions apparently were slow to take effect, and folks used to have to place a NOP after REP or SEP.

Yep!

This problem did exist for a while and is mentioned in the February 1991 data sheet (attached, see last page). I believe it got fixed when WDC converted the 816 to a static core (with Sanyo’s help). The July 1994 data sheet (also attached) makes no mention of the problem. By then, the 816 was a static core device (and the 65C802 was out of production), so I suspect some timing issues were resolved in the conversion.

Also, the 1994 data sheet indicates that a 20 MHz :!: version was available. The 1991 data sheet indicates 10 MHz was the highest available speed.

Attachment:
File comment: 65C816 Data Sheet (February 1991)
65802_816_1991.pdf [4.24 MiB]
Downloaded 29 times
Attachment:
File comment: 65C816 Data Sheet (July 1994)
65c816_1994.pdf [39.55 MiB]
Downloaded 31 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Thu Oct 13, 2022 2:08 pm 
Offline

Joined: Sat Jul 09, 2016 6:01 pm
Posts: 180
Thank you. It seems WDC's people did some bad Veriloging. One can think that there are issues with several (all?) WDC's 65816 cores in Verilog.
I wonder is there any test suite which probes all 65816 instructions? Such a program is available for the Commodore 64 and it is widely used for emulator/hardware testing...

_________________
my blog about processors


Top
 Profile  
Reply with quote  
 Post subject: Re: the 65816 bug list
PostPosted: Thu Oct 13, 2022 3:40 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
BigEd wrote:
In Verilog, using WDC's soft core [...]

So any bugs would be either in WDC's soft core - at that time - or possibly in the surrounding design or the toolchain.

I'd be curious to know whether bugs have been encountered by others using this soft core (or newer versions thereof, if they exist).

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 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: