What happens if the VBLANK int code takes too long?

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

What happens if the VBLANK int code takes too long?

Post by tryphon » Tue Sep 29, 2015 8:51 pm

Is another VBLANK interrupt triggered while processing VBLANK code ?

In other words : do I have to stop Vints in my VBLANK interrupt routine ?

Sorry if this question sounds stupid, I have to make it clear.

mikejmoffitt
Very interested
Posts: 86
Joined: Fri Sep 25, 2015 4:16 pm

Re: What happens if the VBLANK int code takes too long?

Post by mikejmoffitt » Tue Sep 29, 2015 9:16 pm

I don't remember if that is what will happen in that situation, but one solution is to have your vblank routine set a flag that vblank is active, which will let your main code spin on that flag until VBlank sets it, at which point your vblank logic can occur.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: What happens if the VBLANK int code takes too long?

Post by Stef » Tue Sep 29, 2015 10:23 pm

You don't need that, when the 68000 takes an interrupt it raises its interrupt level mask to the current interrupt level, meaning that only higher interrupt can interrupt current processing. A V-Int can interrupt H-Int process but not the contrary, also V-Int cannot interrupt another V-Int.

Post Reply