Jump to content



1

Screen is rolling on real TV - 312 scanlines - Why?


4 replies to this topic

#1 JAC! OFFLINE  

JAC!

    Moonsweeper

  • 472 posts
  • Always looking for GFX and MSX for my demos
  • Location:Lebach, Germany

Posted Mon Oct 24, 2011 12:39 PM

Hi there,
I have a large project which is almost finished now, dead line is next week, so I started testing on real hardware using my Harmony cart. On my first (very old) TV set, everything is fine. On my (old) TV set, the screen loses sync at the beginning. Stella shows 50 Hz/312 Scanlines/PAL and I have no clue, what could be wrong. The later parts all work fine.

I have attached version which simply loops the intro. So maybe somebody can test it on his real PAL machine, too or maybe even find out what "magic thing" goes wrong here.

Attached Files



#2 RevEng ONLINE  

RevEng

    River Patroller

  • 2,011 posts
  • bit shoveler
  • Location:Canada

Posted Tue Oct 25, 2011 8:46 AM

Stepping through it in Stella, I'm seeing 3 lines of VSYNC, which is good, but VBLANK isn't ever turned on.

VSYNC is the most critical, for sure, but it's my understanding that some TVs aren't happy without a real vertical blank.

#3 stephena OFFLINE  

stephena

    Stargunner

  • 1,968 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Tue Oct 25, 2011 1:40 PM

View PostRevEng, on Tue Oct 25, 2011 8:46 AM, said:

Stepping through it in Stella, I'm seeing 3 lines of VSYNC, which is good, but VBLANK isn't ever turned on.

VSYNC is the most critical, for sure, but it's my understanding that some TVs aren't happy without a real vertical blank.

At some point I hope to add emulation for this to Stella (so that it acts more like a real TV, and rolls when appropriate).

#4 JAC! OFFLINE  

JAC!

    Moonsweeper

  • 472 posts
  • Always looking for GFX and MSX for my demos
  • Location:Lebach, Germany

Posted Thu Oct 27, 2011 2:55 PM

Great! It's what you get when you name a procedure like a system label (silly me).
Looking at the list file, it is plain to see:


38 709F .proc vblank
39 709F A9 31 lda #49 ;(45-6)*76/64 = 46,3125 the logo requires 6 scanlines for object positioning
40 70A1 8D 96 02 sta tim64t
41
42 70A4 4C 41 70 jmp call_vblank ;Call routine pointed to by vblank_ptr in other bank
43 70A7 return
44
45 70A7 20 8E 7C jsr effect.logo.vblank ;Animate the logo
46
47 70AA AD 84 02 sync lda intim ;Sync with beam again
48 ; sta colubk ;Debug remaining time


76 70C7 A9 02 lda #2 ;<A>:=2
77 70C9 8D 9F 70 sta vblank ;Activate VBLANK bit 1

49 ;stop bmi stop ;Time overrun
50 70AD D0 FB bne sync
51 70AF 85 02 sta wsync
52 70B1 8D 9F 70 sta vblank ;Deactivate VBLANK bit 1
53 .endp

BUT: Now that I set/reset VBLANK the situation on the TV gets completely out of control. Not only the screen is rolling (even more than before) but also the 2600 seems to reduce its speed during the rolling. The sound frequency drops and the speed of the effects is "slow motion". Crazy. It the kind of things that ONLY happed 3 days before the deadline...

I think I simply got the timing wrong for re/setting VBLANK, so I hope some of you can also help here.

Here is the exmaple file:

Attached Files

  • Attached File  ISO.bin   8K   16 downloads

Edited by JAC!, Thu Oct 27, 2011 2:55 PM.


#5 JAC! OFFLINE  

JAC!

    Moonsweeper

  • 472 posts
  • Always looking for GFX and MSX for my demos
  • Location:Lebach, Germany

Posted Fri Oct 28, 2011 5:47 AM

Found 2 solution which works for this TV, I'll go any try some other TV set now.

lda #$0e ;Create 3 lines of vsync=1 plus 1 line of vsync=0
sta :vblank ;Activate VBLANK bit 1 in scanline 308
vsync_loop
sta wsync
sta vsync
lsr
bne vsync_loop
sta :vblank ;Deactivate VBLANK bit 1 in scanline 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users