Jump to content

Photo

4scores Minikernel


4 replies to this topic

#1 Karl G ONLINE  

Karl G

    Moonsweeper

  • 443 posts

Posted Mon Aug 20, 2018 1:26 PM

I have created a new minikernel inspired by the Player Scores minikernel.  This minikernel can display 4 separate single-digit player scores in 4 different colors, all on the same line.

 

To use, you will need to disable the built-in scores with the following definition:

 const noscore=1

You will include the minikernel in the last bank of your project with the following line:

 inline 4scores.asm

You can then define each player's score and score color in a way similar to the following.  Note that the following variables are provided via the minikernel, and do not need to be defined manually:

 

 p0scorecolor = $4E
 p1scorecolor = $8E
 p2scorecolor = $CE
 p3scorecolor = $3E


 p0score = 0
 p1score = 0
 p2score = 0
 p3score = 0

I have also created a small (2K) game that uses this minikernel for a simple 4-player paddles game.  Since the standard kernel does not multiplex player objects, it relies upon flicker to display 4 players.  How good or bad this looks will depend on your individual setup (the screenshot is somewhat deceptive due to phosphor being turned on in Stella).

 

Anyway, please try it out, and let me know how it works for everyone!

 

unfair.bas.png

 

4scores Minikernel version 0.3 updated 8/30/2018:

 

Attached File  4scores.asm   2.25KB   2 downloads

 

Attached File  starcatcher.bas   4.19KB   13 downloads

 

Attached File  starcatcher.bas.bin   2KB   4 downloads

 



#2 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,135 posts

Posted Mon Aug 20, 2018 5:50 PM

I tried compiling at 4k and 8k (making sure 4scores was in bank 2) just fine.  Thank you!

 

bblint tried to object.  But, I think that was just bblint being bblint.  Stella didn't have a problem running the resulting ROMs.

[8/20/2018 7:48:37 PM] bblint found the following errors in starcatcher.bas
warning(): Found 1 "for" loops and 0 "next" loop-endings.
warning(): Found 0 commands that use end,  and 2 "end" commands.


#3 RevEng ONLINE  

RevEng

    River Patroller

  • 4,916 posts
  • Bitnik
  • Location:bottom of the stack

Posted Mon Aug 20, 2018 9:01 PM

bblint tried to object.  But, I think that was just bblint being bblint.


Fixed now. There was a bug where tabs weren't being correctly parsed as whitespace.

Great job on the 4scores minikernel, Karl!

#4 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 443 posts

Posted Tue Aug 21, 2018 10:21 AM

Uploaded version 0.2, which turns off the reflect bit, if it is on.

 

It looks like this minikernel fits and works in bank 1 for a DPC+ project, but, like the multisprite kernel, it overcycles.  I haven't figured out the reason for this yet, though.  It seems to be working fine with the standard kernel.



#5 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 443 posts

Posted Thu Aug 30, 2018 8:52 AM

Updated to version 0.3, which hides the HMOVE bar (black line on the left) in the same way that bB and other minikernels do.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users