6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Apr 24, 2024 5:45 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 4:43 pm 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
For bank switch, trace debug, freeze, etc...
Whether it will work at all :?:


Attachments:
freezer.pdf [11.73 KiB]
Downloaded 103 times
Top
 Profile  
Reply with quote  
 Post subject: Re: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 5:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
(The idea I think is to detect three consecutive writes, using just a few gates, because that can only be the pushing of P and PC for an interrupt or BRK?)


Top
 Profile  
Reply with quote  
 Post subject: Re: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 5:30 pm 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
I want to build a functional equivalent of that.
ftp://www.zimmers.net/pub/cbm/schematic ... index.html
But in a system where the bank has switched 64K.
The goal is to register the P, PC onto the stack in one bank
A service interupt in another.
Is the detection of 3 consecutive write cycles makes it possible?


Top
 Profile  
Reply with quote  
 Post subject: Re: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 5:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Yes, I believe 3 consecutive writes is a unique signature. Watch out for RDY though - on a CMOS 6502 it can stretch writes.


Top
 Profile  
Reply with quote  
 Post subject: Re: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 5:42 pm 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
Thank you.
I do this in 6510 so RDY probably should not bother.


Top
 Profile  
Reply with quote  
 Post subject: Re: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 6:27 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
grzeg wrote:
Is the detection of 3 consecutive write cycles makes it possible?
I believe 3 consecutive write cycles is a reliable indication that an IRQ,NMI, or BRK is in progress. And your circuit looks right.

Another way to detect an interrupt is to monitor the address bus. Normally with 65xx the address bus will always increment following a SYNC cycle. The only exception is when an IRQ,NMI, or BRK is happening. In that case, the address will be the same one time. I mean the address during SYNC will be the same as the address during the following cycle. This is a reliable indication that an IRQ,NMI, or BRK is in progress -- and it works faster. The interrupt is detected before the writes to stack. You could switch banks before the writes if you want.

Here's the circuit. The XNOR gate looks at A0 to see whether PC incremented. The AND forces the output low in cycles other than those following SYNC.

cheers,
Jeff


Attachments:
Interrupt-recognition detector.gif
Interrupt-recognition detector.gif [ 5.3 KiB | Viewed 1135 times ]

_________________
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: IRQ,NMI,BRK detect
PostPosted: Fri Sep 11, 2015 6:43 pm 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
It is interesting .
But now I have 6510 without SYNC. :wink:


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 10 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: