[Coco] auto-starting game paks

Robert Gault robert.gault at worldnet.att.net
Mon Jan 19 22:57:17 EST 2009


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 which vectors to $A02A where the PIA's are 
reset (turning off the CART I assume), initialization exits at $A108 and 
jumps to the ROM pak.
A ROM pak is not likely to turn on the CART line interrupt, which as you 
say, would cause a loop.



More information about the Coco mailing list