Jump to content
IGNORED

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


JAC!

Recommended Posts

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.

Rolling.bin

Link to comment
Share on other sites

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).

  • Like 1
Link to comment
Share on other sites

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:

ISO.bin

Edited by JAC!
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...