What rasterline to check for on NTSC VIC-20

Basic and Machine Language

Moderator: Moderators

Post Reply
jdxpolygon
Vic 20 Amateur
Posts: 43
Joined: Sat Mar 07, 2009 12:32 pm

What rasterline to check for on NTSC VIC-20

Post by jdxpolygon »

Hello

Hope you can help me. My game, 'Carling The Spider', will be getting released by Psytronik some time in the next few months, and I'd like to fix the game for NTSC. The only issue with running the PAL version on NTSC as far as I can tell is that when the maximum number of sprites are drawn, one or two of them will disappear as they get towards the top 2/top 6 rows of the screen respectively. Having investigated the timing using the border colour, it seems obvious that the game's synchronization method isn't working appropriately on NTSC. On PAL, the 'v_wait' routine waits for the value '112', which seems to start the game loop about 4 rows from the bottom of the visible area (it should really be 5 or even 6 but I'll fix later). It appears to start from somewhere else entirely when the same value is used on NTSC. Does anyone know what value I should be watching out for to achieve a similar effect on NTSC? I haven't changed the screen dimensions at all.

I don't know if sorting this out will necessarily eliminate the problem, but it'd be a step in the right direction.

Thanks :)

J
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Quoting from the thread 'QUIKMAN 2008 for the unexpanded VIC 20' ...

Code: Select all

; Interrupt server and wait routine. 
; The Timer 1 timing constant ($4243) and raster line ($75) need be changed for PAL. 

.C:02a1   78         SEI 
[...]
.C:02b3   A9 75      LDA #$75 
.C:02b5   CD 04 90   CMP $9004 
.C:02b8   D0 FB      BNE $02B5    ; sync to line $75, once, with IRQ's disabled
... it is (double-)line $75 for the start of the bottom border in NTSC.

In NTSC you've got much less time (262-184)*65=5070 cycles (vs. (312-184)*71=9088 on PAL) until the top border ends, and the display area begins in the next frame.

Michael
jdxpolygon
Vic 20 Amateur
Posts: 43
Joined: Sat Mar 07, 2009 12:32 pm

Post by jdxpolygon »

Thanks for the pointer, I've now found the value that gives the best result for my game, and it's almost gotten rid of the problem.
Post Reply