Page 1 of 1

What are all the various IRQ's that are generated?

Posted: Tue Mar 02, 2010 3:46 pm
by rizz1010
I'm trying to compile a list of the various IRQ's generated during game execution. I haven't begun learning sound programming yet, so there might be various IRQ's in that section.

This is what I know so far:
SEI and CLI disables and enables ALL IRQ's
frame counter IRQ's (see $4017)
DMC IRQ's (see $4010)
MMC3 IRQ's (see $C000, C001, E000, E001)
using BRK will generate your own IRQ

Which other things will trigger an IRQ?
When/how exactly is that DMC IRQ triggered?

Thanks

Posted: Tue Mar 02, 2010 5:24 pm
by tokumaru
If you listed the MMC3 you have to take a look at all the other mappers that generate IRQs, and there are a lot of them.

Posted: Wed Mar 03, 2010 12:20 am
by Bregalad
Well the exact list is :
- DMC IRQ
- APU frame IRQ
- External IRQs from cartridge or expansion port

Then mapper hardware on the cart can trigger IRQs, MMC3 is just one of them.
SEI will disable all IRQs, exept the ones which are from a BRK instruction.

Posted: Wed Mar 03, 2010 10:44 am
by rizz1010
I'll make this a little more specific - let's disregard mapper IRQ's (except the MMC3, which I am using).

So, if using no mapper, the only IRQ's are the frame counter and DMC?
Are there any automatic IRQ's from the MMC3 or will there only be IRQ's that I code?

Regarding this from Bregalad:
- External IRQs from cartridge or expansion port
any examples or any more information on this?



Did either of you know how/when the DMC IRQ is triggered? Thanks

Posted: Wed Mar 03, 2010 1:39 pm
by tepples
rizz1010 wrote:So, if using no mapper, the only IRQ's are the frame counter and DMC?
In addition to NROM (no mapper), several simple mappers have no IRQ, such as B*ROM, C*ROM, G*ROM, U*ROM, A*ROM, S*ROM, and D*ROM.
Are there any automatic IRQ's from the MMC3 or will there only be IRQ's that I code?
MMC3 watches the PPU address bus and counts rising edges on a slightly monostable-smoothed version of PPU A12. Wiki page should explain.
Regarding this from Bregalad:
- External IRQs from cartridge or expansion port
any examples or any more information on this?
"External IRQs from cartridge" are just mapper IRQs. Nintendo appears to have intended the expansion port for the NES version of the FDS disks, but after it saw all the copyright infringement of FDS, it decided not to bring the FDS to Latin-alphabet markets. To my knowledge, no expansion port devices were ever produced, and Nintendo eliminated the port from the top-loading NES.
Did either of you know how/when the DMC IRQ is triggered? Thanks
Wiki article describes the condition under which /IRQ is pulled low.

Posted: Wed Mar 03, 2010 8:29 pm
by tokumaru
rizz1010 wrote:Are there any automatic IRQ's from the MMC3 or will there only be IRQ's that I code?
The MMC3 has a register to disable IRQs, so you should use it when you don't want IRQs.
Did either of you know how/when the DMC IRQ is triggered?
I believe it triggers when the sample being played ends. When you play samples you have the options to loop them or to be warned (through an IRQ) when they end, so that you can take action (play another sample or whatever you want to do).