So, I was thinking about it this morning... should there be a few standard things that occur before turning on interrupts?
Let me make an example.
Let's say that you enable interrupts right away (CLI). Then, you start doing some game calculations before starting anything having to do with DMA. If you do this, and DMA activates, is it perceivable that the DMA will look to an unitnitialized DPPH/DPPL, and use some random default value, thereby pointing to some random location for graphics (as there is no real DLL), that could then spider off forever (i.e. what happens if one of the random DLL's has the interrupt bit set, so it goes to the IRQ vector before it's supposed to be used)?
I was wondering first, if this is a plausible scenario (i.e. you could randomly experience big problems based on where DMA cycling is on powerup). If so, maybe there should be some "safe procedures".
1) SEI
2) Set up DLL in RAM
3) Set up DL's in RAM
4) Initialize any RAM used by Interrupts
5) CLI
-- THEN do calculations.
I'm curious about opinions. I may be way off base with the theory here.
-John













