[Coco] auto-starting game paks
cocomalt at 6809.org.uk
Tue Jan 20 17:16:33 EST 2009
Roger Taylor wrote:
> At 09:57 PM 1/19/2009, you wrote:
> >Roger Taylor wrote:
> >>I've got a little question.
> >>What keeps an auto-starting ROM Pak (Q signal tied to CART) from
> >>continuously looping to $C000 instead of running the ROM code?
> >>If BASIC is responsible for resetting the FIRQ behavior before
> >>jumping into the ROM, I can understand how this would work right,
> >>but if the CPU itself is responsible by using the upper hardware
> >>vectors to jump directly to $C000 before BASIC even gets a chance
> >>to start, then if the ROM code doesn't start with ORCC #80 (mask
> >>IRQ/FIRQ), then I can't see the code ever getting past the first
> >>instruction, which in some cases is a NOP.
> >>Any ideas?
> >It's the PIA at $FF23 that controls whether the CPU responds to the
> >CART line. Basic turns this on, the ROM pak triggers the interrupt,
> >the interrupt vectors to $A0F6
> I'm aware how to configure the interrupts using the PIAs or GIME. My
> question was whether or not BASIC does the jump to the game pak code
> or if the CPU does it.
BASIC does it. The vector the CPU gets is to the hook in low RAM.
But it wouldn't cycle continually anyway, as when the CPU gets an FIRQ,
it masks further interrupts in CC itself.
Ciaran Anscomb, Perl/C Hacker
More information about the Coco