Jump to content




2 replies to this topic


BNE Jeff


  • 346 posts
  • Location:$5787

Posted Sat Aug 4, 2018 11:04 PM

Good Evening..


Could someone please explain this?  I don't understand the behavior of GRP1 here (above the words "Space Taxi").  I write $1 to it and P0 for troubleshooting.  (I would normally write zero).  But on the TIA tab, you can see $F0 stays in the VDEL line of GRP1. Then you can see TIA writes the $1, then $F0, then $1 again.  What's up with that?



SS 8-5-18.jpg

Edited by BNE Jeff, Sat Aug 4, 2018 11:05 PM.

#2 alex_79 OFFLINE  



  • 1,187 posts
  • Location:Italy

Posted Sat Aug 4, 2018 11:57 PM

You need to write to P0, P1 and then P0 again if you want to change the ouptut of both players while VDEL is enabled.

The mechanism isn't very complicated once you understand the basics:

There are 2 registers for each player in the TIA: "new" (the one at the top in the stella debugger) and "old" (at the bottom).
When you write to GRPx in your code, 2 things happen:
1 - the value you're writing is stored in the "new" register
2 - the content of the "new" register of the other player is copied in the "old" register

The key part is that this mechanism is always in place, no matter if VDEL is enabled or not.

What VDEL does is just select which one of the two registers is used for the actual output to the screen. If VDEL is enabled, the "old" register is used, if it's disabled, the "new" one will be shown instead.

So, suppose that the value of  both GRP0_new and GRP1_new is $F0. If VDEL is enabled, the actual output for the two players is whatever is stored in their "old" registers.
If you want the output to be $01 for both, you proceed like this:



- store $01 to GRP0
GRP0_new is now $01, GRP0_old stays the same it was before, while GRP1_new ($F0) is copied to GRP1_old.

- store $01 to GRP1
GRP1_new is now $01, GRP1_old stays as it was ($F0), GRP0_new ($01) is copied to GRP0_old.

- store "anything" to GRP0
GRP0_new takes the new value, GRPO_old stays $01, GRP1_new ($01) is copied to GRP1_old.


Now the ouptut is $01 for both players.


Edited by alex_79, Sun Aug 5, 2018 12:16 AM.


BNE Jeff


  • Topic Starter
  • 346 posts
  • Location:$5787

Posted Sun Aug 5, 2018 5:38 AM

Thanks!  I have a better understanding of that now.  I had read page 23 in the Stella manual over and over and never saw it that way.  To me, it looked like it was saying that if your graphic is loaded in the register, it just won't show up until the next line.

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users