6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 2:07 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed May 21, 2008 4:04 am 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
ok, voyage of discovery, ran across a whle bunch of stuff, but you may enjoy this all from Atariage.com....

6502 programming hacks...
http://www.atariage.com/forums/index.ph ... opic=71120

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 28, 2009 5:22 pm 
Offline

Joined: Wed Jul 16, 2008 6:54 pm
Posts: 7
Location: Florida
Another AtariAge topic I participated in...

http://www.atariage.com/forums/topic/14 ... mi-timing/

Although the original 6502 documentation states that an NMI pulse only needs to be 2-cycles to be acknowledged, this isn't true if an IRQ happens at the same time. Most systems hold /NMI longer (or until cleared by software) but Atari's Antic does two cycles only and this can lead to lost NMI's when IRQ's are enabled.

Extending NMI to 8 cycles solved the problem, so another small 6502 bug for the list (although I don't yet know how many cycles it must actually be, I've proven it's 8 or less).

-Bry


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 28, 2009 8:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8155
Location: Midwestern USA
Nightmaretony wrote:
ok, voyage of discovery, ran across a whle bunch of stuff, but you may enjoy this all from Atariage.com....

6502 programming hacks...
http://www.atariage.com/forums/index.ph ... opic=71120


Of course, some of that stuff won't work on the C02, etc., due to the use of undocumented opcodes.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 28, 2009 10:38 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
Quote:
Extending NMI to 8 cycles solved the problem, so another small 6502 bug for the list (although I don't yet know how many cycles it must actually be, I've proven it's 8 or less).

I wonder if that's basically the same as the IRQ-coinciding-with-BRK-instruction bug which was also fixed in the 65c02. AFAIK, all the NMOS 6502 bugs were fixed in the CMOS 65c02.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 29, 2009 1:03 am 
Offline

Joined: Wed Jul 16, 2008 6:54 pm
Posts: 7
Location: Florida
GARTHWILSON wrote:
Quote:
Extending NMI to 8 cycles solved the problem, so another small 6502 bug for the list (although I don't yet know how many cycles it must actually be, I've proven it's 8 or less).

I wonder if that's basically the same as the IRQ-coinciding-with-BRK-instruction bug which was also fixed in the 65c02. AFAIK, all the NMOS 6502 bugs were fixed in the CMOS 65c02.


The 400/800 used a regular 6502 and the XL/XE lines used Atari's modified "Sally" 6502C (the main difference is a tri-state address bus, and some extra clock control to reduce parts count). Both of these chips exhibit the problem of lost NMIs.

If I had to guess, I'd say I believe this and the BRK bug are due to the simple nature of the interrupt logic that can lose a transitory event while in certain set-up states.

In the linked thread, someone tried a 65C02 in an 800 and the problem went away so I agree that the 65C02 is fixed.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 29, 2009 1:42 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
Quote:
used Atari's modified "Sally" 6502C (the main difference is a tri-state address bus, and some extra clock control to reduce parts count)

Just as a note-- WDC's 65c02's do have a BE (bus-enable) input (pin 36 on the DIP) that allows tri-stating the bus, a ML\ (memory-lock) output (pin 5 on the DIP), and a VP\ (vector-pull) output (pin 1 on the DIP), and all 65c02's have an on-board clock oscillator.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 29, 2009 1:45 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
That's because both of those chips are NMOS. The 65C02 is not the 6502C. :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 29, 2009 2:22 am 
Offline

Joined: Wed Jul 16, 2008 6:54 pm
Posts: 7
Location: Florida
kc5tja wrote:
That's because both of those chips are NMOS. The 65C02 is not the 6502C. :)


Right. Atari's 6502C is just a NMOS 6502 with some of the TTL required for Antic's DMA moved into the chip and predates the 65C02. The 400/800's CPU board contains the equivalent circuit and a stock 6502.

Anyway, the problem is annoying but we came up with a couple work-arounds. I'm actually surprised that it wasn't well-documented a long time ago (in Atari circles, that is...)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 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: