Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user lotus_skylight ! (Registered 2024-09-25) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > NMI delay
2024-02-13 22:34
JackAsser

Registered: Jun 2002
Posts: 2014
NMI delay

How much is an NMI delayed if triggered during IRQ-setup?
2024-02-13 22:39
Fungus

Registered: Sep 2002
Posts: 668
1 cycle I think?

Was talking to groepaz a couple months ago about "eaten IRQs" which is a bug in the 6502. I supposed if the NMI came at the wrong time after an IRQ the IRQ can be lost, or a BRK.

There was some talk about it on the 6502 site he linked.
2024-02-13 22:43
chatGPZ

Registered: Dec 2001
Posts: 11293
what do you mean "during IRQ-setup"?
2024-02-13 22:44
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: 1 cycle I think?

Was talking to groepaz a couple months ago about "eaten IRQs" which is a bug in the 6502. I supposed if the NMI came at the wrong time after an IRQ the IRQ can be lost, or a BRK.

There was some talk about it on the 6502 site he linked.


In VICE it's definetly more than 1 cycle, but hard to tell.
2024-02-13 22:44
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: what do you mean "during IRQ-setup"?

When the CPU performs the 7-cycle IRQ-setup (i.e. push status etc on the stack). During that time NMIs won't interrupt and will be delayed. But it doesn't seem to be delayed the full 7 cycles (at least not in VICE, havn't tested on the real thing but this is surely emulated correctly anyways).
2024-02-13 22:47
chatGPZ

Registered: Dec 2001
Posts: 11293
ok. for that case, basically look at it like your NMI interrupts a BRK instruction (because it IS a BRK instruction!).

and then to see the details, simulate in visual6502 :) i am still struggling at explaining this properly, it should be added to NMS :)
2024-02-13 22:50
Oswald

Registered: Apr 2002
Posts: 5076
cool, this sounds like a yummy raster fx :)
2024-02-13 22:52
Fungus

Registered: Sep 2002
Posts: 668
Oh you mean the lockout time before another NMI can occur, isn't it the instruction length, but... if NMI is held low then another one shouldn't be able to strike unless you are doing something weird. Are you using the CIA where the code is executed the so the flag is cleared automatically? That would present a problem.
2024-02-13 22:52
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: ok. for that case, basically look at it like your NMI interrupts a BRK instruction (because it IS a BRK instruction!).

and then to see the details, simulate in visual6502 :) i am still struggling at explaining this properly, it should be added to NMS :)


Struggling also (and already checked visual6502), hence I took the lazy path and just asked. :D
2024-02-13 22:53
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Oh you mean the lockout time before another NMI can occur, isn't it the instruction length, but... if NMI is held low then another one shouldn't be able to strike unless you are doing something weird. Are you using the CIA where the code is executed the so the flag is cleared automatically? That would present a problem.

No no no not at all. Imagine u have a raster IRQ, and when the CPU performs the IRQ-load (i.e. push status, return address, read IRQ vector and jump (7c) ) an NMI occurs. This NMI will get delayed by that IRQ process, but how much at most? In VICE it looks like around 3-4 cycles, but I don't understand why. Why not 7c?
2024-02-13 22:55
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: cool, this sounds like a yummy raster fx :)

It depends on the max delay, hence my question. :D
 
... 45 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Airwolf/F4CG
iceout/Avatar/HF
rambo/Therapy/ Resou..
kbs/Pht/Lxt
Jetboy/Elysium
lA-sTYLe/Quantum
MWR/Visdom
dstar/Fairlight
Alakran_64
celticdesign/G★P/M..
Guests online: 128
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.6)
4 Mutetus  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.062 sec.