Jump to content

Photo

Minikernel - Player Scores


40 replies to this topic

#1 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • 211 posts

Posted Sat Sep 8, 2007 11:22 PM

This is something I've wanted to do for a long time. A minikernel that gives you two 2-digit scores, each in a different color.

So far I'm just displaying digits. No way to set them yet. Also I've only tested the timing in Stella, not in Z26 or a real 2600.

Attached Files



#2 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sun Sep 9, 2007 3:22 PM

The minikernel is complete and ready to use.

Attached Files


Edited by CurtisP, Sun Sep 9, 2007 3:25 PM.


#3 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,454 posts
  • Location:Georgia, USA

Posted Sun Sep 9, 2007 3:41 PM

The minikernel is complete and ready to use.

Thanks, this looks great!

Michael

#4 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,593 posts

Posted Sun Sep 9, 2007 8:25 PM

The minikernel is complete and ready to use.


That's totally awesome! This definitely help out a ton of games!

Any chance you might be able to do a 4 player version (4 2-digit scores)? If so, I could really use it.

#5 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sun Sep 9, 2007 8:31 PM

The minikernel is complete and ready to use.

Any chance you might be able to do a 4 player version (4 2-digit scores)? If so, I could really use it.


Probably not 4 on one line, but two on a line stacked on top of each other would be doable. It would require that the 6-digit score be turned off, though.

#6 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sun Sep 9, 2007 8:32 PM

Thanks, this looks great!


Could you test this with your Krokodile Cart for me? My Supercharger and 2600 are packed away at the moment.

#7 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,454 posts
  • Location:Georgia, USA

Posted Sun Sep 9, 2007 10:32 PM

Thanks, this looks great!


Could you test this with your Krokodile Cart for me? My Supercharger and 2600 are packed away at the moment.

Sure thing, but it won't be tonight.

I will say this, though-- and I probably should have posted something sooner about it. Last weekend I was running some tests on my heavy-sixer to get a better understanding of some of the finer details of the interval timer, and comparing the results with the z26 and Stella emulators. I was writing simple little programs in batari Basic, and displaying the values of TIMINT and INTIM using the score. In doing so, I happened to notice that the updating of the last digit of the score was a little off on my real Atari-- that is to say, the first 2 or 3 pixels of the 1s (sixth) digit were from the 100s (fourth) digit, and then the remaining pixels were from the 1s digit. This is caused by a combination of the timing of the "STA GRPx" commands and the horizontal positions of the players in the score. It looks like either the STA commands need to occur 1 cycle sooner, or the score needs to be shifted left 3 color clocks. The odd thing was, the z26 and Stella emulators both showed the last digit "correctly," so apparently they aren't emulating the actual timing behavior correctly. I meant to do some further investigations to verify this, and then tinker with the score timing in batari Basic. In particular, I'm curious to see if using VDELxx has any bearing on this. (I'm wondering if there's a tiny delay of 1 cycle after GRP0 is updated, during which the "old" GRP1 register is being updated from the "new" GRP1 register.)

Michael

#8 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,593 posts

Posted Mon Sep 10, 2007 5:12 AM

Probably not 4 on one line, but two on a line stacked on top of each other would be doable. It would require that the 6-digit score be turned off, though.


That would totally rock! I wouldn't mind at all that the 6-digit score get turned off. If there is anyway to also fit colors into it, that would be best, but even a single hardcoded color would be fine!

#9 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Thu Sep 13, 2007 8:54 PM

I just realized that as currently written, this minikernel will crash when used with the multisprite kernel. It's an easy fix, so I will change it when I add the ability to show 4 scores (along with a few other tweeks).

#10 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,593 posts

Posted Fri Sep 14, 2007 4:49 AM

I just realized that as currently written, this minikernel will crash when used with the multisprite kernel. It's an easy fix, so I will change it when I add the ability to show 4 scores (along with a few other tweeks).


Personally I wouldn't be using this with multisprite. I gave up on multisprite for the Ultimate Indy 500 game because of the lack of possible paddle support. Michael mentioned potentially modifying the kernel to get better vertical resolution of the playfield, but for now I'd still be really interested in a 4 score minikernel. If there were a way to have colors with those scores that would be even better, but they definitely wouldn't be necessary. They would be my lap counters, so they would be as functional within the game as they would be for display purposes. Thanks for doing this!

Edited by Fort Apocalypse, Fri Sep 14, 2007 4:51 AM.


#11 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Fri Sep 14, 2007 1:17 PM

If there were a way to have colors with those scores that would be even better, but they definitely wouldn't be necessary.


Have you looked at the sample program and documentation? The scores already have different colors.

#12 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,471 posts
  • begin 644 contest

Posted Fri Sep 14, 2007 1:36 PM

Sure thing, but it won't be tonight.

I will say this, though-- and I probably should have posted something sooner about it. Last weekend I was running some tests on my heavy-sixer to get a better understanding of some of the finer details of the interval timer, and comparing the results with the z26 and Stella emulators. I was writing simple little programs in batari Basic, and displaying the values of TIMINT and INTIM using the score. In doing so, I happened to notice that the updating of the last digit of the score was a little off on my real Atari-- that is to say, the first 2 or 3 pixels of the 1s (sixth) digit were from the 100s (fourth) digit, and then the remaining pixels were from the 1s digit. This is caused by a combination of the timing of the "STA GRPx" commands and the horizontal positions of the players in the score. It looks like either the STA commands need to occur 1 cycle sooner, or the score needs to be shifted left 3 color clocks. The odd thing was, the z26 and Stella emulators both showed the last digit "correctly," so apparently they aren't emulating the actual timing behavior correctly. I meant to do some further investigations to verify this, and then tinker with the score timing in batari Basic. In particular, I'm curious to see if using VDELxx has any bearing on this. (I'm wondering if there's a tiny delay of 1 cycle after GRP0 is updated, during which the "old" GRP1 register is being updated from the "new" GRP1 register.)

Michael

I have not noticed this issue on my 4-switch, so it might be a heavy-sixer thing. If you can post the binary you used to test the timers, I will let you know if that binary has a distorted score. BTW, have you noticed any weirdness with the score on all bB 1.0 binaries, or just this one?

#13 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Fri Sep 14, 2007 5:39 PM

Sure thing, but it won't be tonight.
It looks like either the STA commands need to occur 1 cycle sooner, or the score needs to be shifted left 3 color clocks. The odd thing was, the z26 and Stella emulators both showed the last digit "correctly," so apparently they aren't emulating the actual timing behavior correctly. I meant to do some further investigations to verify this, and then tinker with the score timing in batari Basic. In particular, I'm curious to see if using VDELxx has any bearing on this. (I'm wondering if there's a tiny delay of 1 cycle after GRP0 is updated, during which the "old" GRP1 register is being updated from the "new" GRP1 register.)

I have not noticed this issue on my 4-switch, so it might be a heavy-sixer thing. If you can post the binary you used to test the timers, I will let you know if that binary has a distorted score. BTW, have you noticed any weirdness with the score on all bB 1.0 binaries, or just this one?


Thanks for the info. It was a pain getting the cycles right, but I may have to work on it some more. I pulled out my heavy six so I can do some more testing.

Looks like I'm going to have to buy some more 2600s, all I have are heavy-sixers.

#14 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Fri Sep 14, 2007 10:12 PM

I updated playerscores.bas to cycle the score as well, and ran it on my heavy sixer. I didn't see any problems with either my playerscore (yay!) or bAtari's regular score routine.

Attached Files



#15 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,593 posts

Posted Sat Sep 15, 2007 8:16 AM

If there were a way to have colors with those scores that would be even better, but they definitely wouldn't be necessary.


Have you looked at the sample program and documentation? The scores already have different colors.


Sorry, I meant a separate color for each of the four scores.

#16 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sat Sep 15, 2007 5:40 PM

Alright. I finally saw the color bug that Michael pointed out (right most pixel of the first digit). Adding a cycle into the middle of the display routine fixed it.

I rewrote the code to reference existing labels instead of memory locations, so it should work with both kernels now.

And I added support for 4 scores (each with it's own color of course). With just one minikernel, you can have 2 or 4 scores. See the documentation for more details.

Attached Files



#17 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,471 posts
  • begin 644 contest

Posted Sat Sep 15, 2007 8:45 PM

Alright. I finally saw the color bug that Michael pointed out (right most pixel of the first digit). Adding a cycle into the middle of the display routine fixed it.

I rewrote the code to reference existing labels instead of memory locations, so it should work with both kernels now.

And I added support for 4 scores (each with it's own color of course). With just one minikernel, you can have 2 or 4 scores. See the documentation for more details.

The problem with adding cycles is it might muck up the pfscore bars. IIRC, the timing on those needed to be exactly as it was or they wouldn't work right.

#18 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,471 posts
  • begin 644 contest

Posted Sat Sep 15, 2007 8:55 PM

Alright. I finally saw the color bug that Michael pointed out (right most pixel of the first digit). Adding a cycle into the middle of the display routine fixed it.

I rewrote the code to reference existing labels instead of memory locations, so it should work with both kernels now.

And I added support for 4 scores (each with it's own color of course). With just one minikernel, you can have 2 or 4 scores. See the documentation for more details.

The problem with adding cycles is it might muck up the pfscore bars. IIRC, the timing on those needed to be exactly as it was or they wouldn't work right.

Sorry, I just downloaded your code and see that you were talking about your own 2-player score thing and not the bB 6-digit score. So does that one work, or does it have the same bug?

#19 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sat Sep 15, 2007 10:39 PM

The problem with adding cycles is it might muck up the pfscore bars. IIRC, the timing on those needed to be exactly as it was or they wouldn't work right.

Sorry, I just downloaded your code and see that you were talking about your own 2-player score thing and not the bB 6-digit score. So does that one work, or does it have the same bug?


Mine is working now. Your score code only has one color, whereas mine has two per line. Michael noticed that the color was off by one pixel, but i was able to fix it by adding a cycle. Getting that timing right sure can be a pain, can't it?

Anyway, I've licensed the minikernel so that it can be included in future releases of bAtari Basic. I think it is pretty solid at this point.

#20 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sat Sep 15, 2007 10:49 PM

As for the 6-digit score routine, I have never seen any problems with any of the digits. I saw things similar to what Michael was describing when I was playing around with my code to get the timing right, but once I did it's been fine. As far as i can tell, so is yours.

#21 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,454 posts
  • Location:Georgia, USA

Posted Sun Sep 16, 2007 12:52 AM

As for the 6-digit score routine, I have never seen any problems with any of the digits. I saw things similar to what Michael was describing when I was playing around with my code to get the timing right, but once I did it's been fine. As far as i can tell, so is yours.

It's the graphics that seem to be off, not the colors. And it doesn't happen on the emulators, just on a real Atari (well, on my heavy-sixer, at least-- I haven't tried it on my 7800 yet, but I *did* find my Cuttle Cart 2 today! :)).

Michael

#22 CurtisP OFFLINE  

CurtisP

    Chopper Commander

  • Topic Starter
  • 211 posts

Posted Sun Sep 16, 2007 10:07 AM

It's the graphics that seem to be off, not the colors. And it doesn't happen on the emulators, just on a real Atari (well, on my heavy-sixer, at least-- I haven't tried it on my 7800 yet, but I *did* find my Cuttle Cart 2 today! :)).


Just to be clear, which score are you talking about, this minikernel one or the standard six-digit? And in exactly which digit (numbered from the left) are the graphics messed up?

#23 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,454 posts
  • Location:Georgia, USA

Posted Sun Sep 16, 2007 10:59 AM

It's the graphics that seem to be off, not the colors. And it doesn't happen on the emulators, just on a real Atari (well, on my heavy-sixer, at least-- I haven't tried it on my 7800 yet, but I *did* find my Cuttle Cart 2 today! :)).


Just to be clear, which score are you talking about, this minikernel one or the standard six-digit? And in exactly which digit (numbered from the left) are the graphics messed up?

I noticed it in the standard six-digit score the other weekend, while running some little test programs I wrote to help me answer certain questions I had about the interval timer. I was using bB's score to display the value of the timer, as well as the status of the timer interrupt flag. I was running my test programs in the z26 and Stella emulators, but Fred/batari had once posted a comment that the timer isn't being emulated correctly on the emulators, so I was also running my test programs on my 2600 (heavy six-switch), and comparing all three results (z26, Stella, and 2600). When I did, I noticed that the score looks fine on the emulators, but the last digit is a little bit off on my 2600-- specifically, it looks like the graphics for the last digit are being updated about 1 cycle later than expected, because it looks like the first few pixels of the sixth digit might be the same as the first few pixels of the fourth digit. I need to investigate this further, but I'm in the middle of moving, so I can't do it right now.

Anyway, when you asked me to check your minikernel on my 2600 with the Krokodile Cartridge, I said I wouldn't be able to do that yet, but then I commented about what I'd noticed the week before in bB's standard score. I figured that if this problem is occurring in bB's six-digit score, then your minikernel might exhibit the same problem on a real 2600. Note that if this is caused by a slight timing issue (as I suspect), then it follows that the timing of any color changes in your minikernel might be a little off, as well. When I'm finished moving, I'll do some more tests to investigate further, and post my results.

Michael

#24 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,593 posts

Posted Tue Sep 18, 2007 9:12 PM

This is totally awesome! I haven't made much progress with the indy500 game yet, but attached is a demo of how 4 colors can be used as lap counters. Even the logic stuff works. The "game" uses 4 paddles and ends at 10 laps. Please don't make fun of it. ;)

Attached File  ultindy500_0.1.bas   5.11KB   212 downloadsAttached File  ultindy500_0.1.bin   4KB   211 downloads

#25 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 8,040 posts
  • The brightest ideas in the world are here to play.
  • Location:Salem, Oregon

Posted Sat Sep 29, 2007 2:26 AM

I've got a suggestion: How about two 6-digit scores?




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users