English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 19 August 2020, 16:05   #1
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,414
What are NMI's used for on Amiga?

When coding, I often disable the OS using the normal method of disabling all interrupts (plus saving/restoring views, vectors, etc ). But, disabling interrupts only affects maskable interrupts, not non-maskable interrupts. However, just disabling maskable interrupts seems to work very well and most OS started demo's/games that hit the hardware seem to use this method.

The question I have is what are NMI's used for on the Amiga?
I'm assuming the basic machines (without expansions) don't use them, otherwise disabling only maskable interrupts will still potentially cause issues when NMI's hit.

Are they used by common hardware? If so, what kinds of hardware?
Or are NMI's not used at all (I don't think this is true)?
roondar is online now  
Old 19 August 2020, 16:43   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Quote:
Originally Posted by roondar View Post
When coding, I often disable the OS using the normal method of disabling all interrupts (plus saving/restoring views, vectors, etc ). But, disabling interrupts only affects maskable interrupts, not non-maskable interrupts.
This may make your machine unusable or unstable as certain hardware may require or generate periodic interrupts. Also note that not all interrupts are necessarily routed through PAULA.



Quote:
Originally Posted by roondar View Post

The question I have is what are NMI's used for on the Amiga?
Not at all. Some A2000 boards (from the 4.x area) have a slightly broken IRQ logic that generates sporadic NMIs from time to time.
Thomas Richter is offline  
Old 19 August 2020, 16:54   #3
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,414
Quote:
Not at all. Some A2000 boards (from the 4.x area) have a slightly broken IRQ logic that generates sporadic NMIs from time to time.
Interesting!

That makes me wonder: are these A2000 boards incompatible with the many games/demos (and WHDLoad for that matter) that throw out or disable the OS, or do they merely generate the odd spurious interrupt here and there without much issues?
roondar is online now  
Old 19 August 2020, 17:10   #4
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by roondar View Post
Are they used by common hardware? If so, what kinds of hardware?
Beermon and other monitors/freezers use the NMI for activating the monitor. ASM-One (and its derivates) use it to be return to the system if the code hangs (endless loops for example).


Quote:
This may make your machine unusable or unstable
Are there any real world examples for this claim?
StingRay is offline  
Old 19 August 2020, 17:22   #5
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,414
Quote:
Originally Posted by StingRay View Post
Beermon and other monitors/freezers use the NMI for activating the monitor. ASM-One (and its derivates) use it to be return to the system if the code hangs (endless loops for example).
Right, that's pretty clever. So at least monitors/freezers use NMI's.
Still wondering if expansions also use it (outside of AR, which is a freezer so it probably does as well), but this is already helpful information thanks!
roondar is online now  
Old 19 August 2020, 18:05   #6
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by roondar View Post
Interesting!

That makes me wonder: are these A2000 boards incompatible with the many games/demos (and WHDLoad for that matter) that throw out or disable the OS, or do they merely generate the odd spurious interrupt here and there without much issues?
Odd crashes granted unless the level 7 IRQ handler points to a valid IRQ handler (that is also operable in the current state of the machine). There are also more recent expansion hw e.g. for A500 that has the same issue.. There are threads in EAB about these.
mr.spiv is offline  
Old 20 August 2020, 20:13   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
Reason for spurious interrupts (at least the most common one): Paula IPL pins don't change at the same time but it seems Paula does it in two steps, clears pins first, then sets pins, delay is about 1/2 to 1/4 CCKs. If accelerator board does not sync IPL sampling to CCK and samples IPL state during this transition: spurious interrupt. Because IPL is active low, some IPL transition combinations can cause spurious NMI (all lines low for 1/4 CCKs or so).
Toni Wilen is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A2000/Blizzard060 NMI exception phx Coders. Asm / Hardware 3 12 October 2018 14:13
[WinUAE Request] Level 7 NMI Interrupt Boltar request.UAE Wishlist 2 26 December 2014 19:32
A600 NMI on 68k.. xc8 support.Hardware 11 08 November 2008 17:07
NMI Key? WintermuteX support.WinUAE 14 15 December 2003 20:39
NMI-Switch on A1200 rgen support.Hardware 5 16 March 2002 18:01

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07828 seconds with 15 queries