Re: [stella] PCAE has 263 Scanlines?

Subject: Re: [stella] PCAE has 263 Scanlines?
From: Rodrigo <rodrigoes@xxxxxxxxxxxxx>
Date: Tue, 20 Aug 2002 02:31:28 -0300
>>PCAE is puzzling me (and ruining my cycle/scanline counting as well)..
>>In its debugger there's a "Scan" (CY, CRT beam Y position) variable that 
>>is supposed to help the programmer to know in which scanline TIA (and the 
>>TV) is. Its value ranges from -40 to 222, which sums up to 263 scanlines. 
>>But, according to SPG, 3 Vsync + 37 Vblank = 40 (hence the -40 range in 
>>Scan). 192 visible scanlines + 30 Overscan = 222. And, finaly, 40+222=262. 
>>It seems that PCAE has an extra scanline!
>The scanline count is determined by the software (your program), not the
>hardware or the emulator.  If PCAE is showing 263 scanlines total, your
>program is probably doing 263, and you've got a bug somewhere. :)

Yes, you're right... and I realized it the hard way... :)
I did the same testing procedure with Pitfall and River Raid, and noticed the Scanline range dropped from 263 to 262 (ie, from -40 to 221, as it should be, and as it is in well done, bug-free actvision games, as opposed to my buggy one... ;)

So I realized PCAE dont "have" Scanlines... it just shows the scanlines the program is using... and it will show 500, 100, 1M scanlines if i never use a VSync... ;)

The problem is... I cant find the damn single extra scanline in my program! :(
But i will, I will... ;)

>Also, carefully consider zero and all the off-by-one possibilities.  Does
>PCAE have a scanline 0?  I'm not totally sure.

Yes, it does. Negative Scanlines (from -40 to -1) are Vsync/Vblank. 0 is the 1st visible scanline. And, as far as I can see, PCAE treat overscan the same way as visbile scanlines. It means thats up to you to count the 192 visible scanlines and then turn Vblank ON, otherwise PCAE will show everything up to its vertical resoluition limit (which can be 200, 204, 250 or 300)

Um Grande Abraco,

Archives (includes files) at
Unsub & more at

Current Thread