Jump to content

Photo

How does a real console & TV behave with a "no kernel" program?


10 replies to this topic

#1 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • 14 posts
  • Location:Nashville, TN

Posted Wed Jan 2, 2019 12:59 PM

Hello all,

 

Newbie 2600 programmer here. I've been playing around with creating very simple code examples as a way of helping me to figure out how all this stuff works and fits together.

 

I've found that, if I don't do any sort of VSYNC or other typical kernel responsibilities (VBLANKs, etc.), I can get a "bare bones" program (similar to Tjoppen's minimal demo but not as tricky) to run in Stella just fine. I can get it to run in Javatari (on 8bitworkshop) too, with a bit of resetting/fiddling. Auto-recognition of NTSC/PAL fails, of course. That's to be expected, I guess.

 

But, out of curiosity, what if I were to try to run it on a real VCS? I know the TIA will take care of the horizontal beam movement without any help from me. But what about the vertical movement? Will the TV just keep scanning downward until it blows up or something? :-P

 

Thanks,

 

 - Jeff


Edited by JeffJetton, Wed Jan 2, 2019 12:59 PM.


#2 TheHoboInYourRoom OFFLINE  

TheHoboInYourRoom

    Moonsweeper

  • 416 posts
  • Whackadoo thingamajig
  • Location:Illinois

Posted Wed Jan 2, 2019 2:08 PM

Yup, without vertical sync the TV will keep scanning down until it reaches its "natural" limit and starts over. Whatever you draw with the Atari will show up at some slower-than-usual frame rate, assuming the TV shows it at all. Some more modern TVs will suppress any signal that doesn't have VSYNC.

Edited by TheHoboInYourRoom, Wed Jan 2, 2019 5:07 PM.


#3 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • Topic Starter
  • 14 posts
  • Location:Nashville, TN

Posted Wed Jan 2, 2019 10:04 PM

Ah! I didn't know that analog TVs had a natural limit. Good to know, thanks!



#4 TheHoboInYourRoom OFFLINE  

TheHoboInYourRoom

    Moonsweeper

  • 416 posts
  • Whackadoo thingamajig
  • Location:Illinois

Posted Thu Jan 3, 2019 11:49 AM

The limit can be different from set to set as well, so there's no guarantee that your program could draw a stable picture on any given TV.

#5 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,290 posts

Posted Thu Jan 3, 2019 1:04 PM

SpiceWare pointed me to his Jitter program / ROM to explore screen roll and timings.  Figured it'd be good to know how tolerant different RF connections are (VCRs, TVs, LCDs with RF tuner, etc..)

http://atariage.com/...-recovery-time/



#6 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • Topic Starter
  • 14 posts
  • Location:Nashville, TN

Posted Thu Jan 3, 2019 4:15 PM

SpiceWare pointed me to his Jitter program / ROM to explore screen roll and timings. Figured it'd be good to know how tolerant different RF connections are (VCRs, TVs, LCDs with RF tuner, etc..)
http://atariage.com/...-recovery-time/


Very cool. I'll check it out!

Edited by JeffJetton, Thu Jan 3, 2019 4:16 PM.


#7 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • Topic Starter
  • 14 posts
  • Location:Nashville, TN

Posted Thu Jan 3, 2019 4:15 PM

The limit can be different from set to set as well, so there's no guarantee that your program could draw a stable picture on any given TV.


Well specifically, I'm working with very basic programs that either don't display anything (other than the background), like this:
 

MyLoop  lda #$CE
        sta COLUBK

        jmp MyLoop

 
Or that display the same thing on every scanline, like this:
 

SetCols lda #$06
        sta COLUBK
        lda #$46
        sta COLUPF

        lda #%10110111
        sta PF1

        jmp SetCols

I'm assuming that, if these rolled, it wouldn't really make much of a difference, eh?



#8 TheHoboInYourRoom OFFLINE  

TheHoboInYourRoom

    Moonsweeper

  • 416 posts
  • Whackadoo thingamajig
  • Location:Illinois

Posted Thu Jan 3, 2019 4:21 PM

I'm assuming that, if these rolled, it wouldn't really make much of a difference, eh?

Indeed not.

 

Oh, a good thing to know for the future is that the TIA's registers latch the values written to them, so they won't change until you write different values. So, your example programs could write their values once and then fall into infinite loops.



#9 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • Topic Starter
  • 14 posts
  • Location:Nashville, TN

Posted Thu Jan 3, 2019 4:34 PM

Oh, a good thing to know for the future is that the TIA's registers latch the values written to them, so they won't change until you write different values. So, your example programs could write their values once and then fall into infinite loops.


I figured. But since I'm doing absolutely nothing after setting them, there wasn't really anywhere else I could think of to jump to. :D

 

Not sure if this sort of thing is kosher (a jmp jumping to itself):
 

InfLoop jmp InfLoop

Is it?



#10 TheHoboInYourRoom OFFLINE  

TheHoboInYourRoom

    Moonsweeper

  • 416 posts
  • Whackadoo thingamajig
  • Location:Illinois

Posted Thu Jan 3, 2019 4:44 PM

Not sure if this sort of thing is kosher (a jmp jumping to itself):
 

InfLoop jmp InfLoop

Is it?

Absolutely. Nothing bad happens if you (intend to :) ) do that.



#11 JeffJetton OFFLINE  

JeffJetton

    Space Invader

  • Topic Starter
  • 14 posts
  • Location:Nashville, TN

Posted Thu Jan 3, 2019 5:01 PM

Absolutely. Nothing bad happens if you (intend to :) ) do that.

 

Good to know. I didn't want to accidentally, like, break the internet or something. :-o






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users