sci4me wrote:
So, the difference between IRQ and NMI is that NMI takes precedence over IRQ yes?
The important difference is that an NMI can't be ignored. An IRQ can be ignored by setting the I (interrupt disable) bit in the status register. I recommend you read up on and fully understand the 6502 architecture before attempting to emulate/simulate a 6502. In my opinion, you're putting the cart before the horse right now, as your questions indicate that you lack the knowledge needed to accomplish your goal.
Incidentally, if an IRQ and NMI simultaneously hit ("simultaneously" meaning during the same instruction processing cycle) the 65xx family will acknowledge NMI first.
Quote:
For my CPU design, would it be a good/bad/either way idea to do something like this:
IRQ₁
IRQ₂
IRQ₃
etc.. for some fixed number and basically have multiple interrupt handlers and pins to trigger them? If I did this, well.. I would have to figure out how to determine what happend first, I would prefer to just execute them in the order they come in though..
Prioritizing interrupts is usually a chore handled by a programmable interrupt controller. Most MPUs have only a few hardware interrupt inputs, IRQB being the most used one on a 6502. External hardware and/or software polling must be used to differentiate interrupt sources.