Jump to content
CurtisP

Minikernel - Player Scores

Recommended Posts

I tried some experiments with the multisprite kernel, and I saw in Stella that it overcycles with the 4 scores option as well as two scores plus the main score. I'm not sure what the difference is other than perhaps the multisprite kernel just uses more visible scanlines than the standard kernel does.

  • Like 1

Share this post


Link to post
Share on other sites

I tried some experiments with the multisprite kernel, and I saw in Stella that it overcycles with the 4 scores option as well as two scores plus the main score. I'm not sure what the difference is other than perhaps the multisprite kernel just uses more visible scanlines than the standard kernel does.

 

A common problem is page boundary crossing. If you have a branch statement that gets moved because some code is inserted before it you could end up losing a cycle if the branch target is in a different page because of the routine being relocated. Stepping through in stella debugger should let you easily see if this is the case or not.

Share this post


Link to post
Share on other sites

Could you publish that kernel? It would be cool for 4p stuff indeed.

 

Yes - I just need to test it more, document it, and make a sample program that uses it. I'll start a new topic for it when it is ready.

  • Like 1

Share this post


Link to post
Share on other sites

 

A common problem is page boundary crossing. If you have a branch statement that gets moved because some code is inserted before it you could end up losing a cycle if the branch target is in a different page because of the routine being relocated. Stepping through in stella debugger should let you easily see if this is the case or not.

 

That can throw off cycle counts on individual scanlines, but I don't think it has anything to do with the multisprite kernel specifically going several scanlines past overscan. I think it may be a side effect of turning off the score, but I would have to investigate more.

Share this post


Link to post
Share on other sites

Another question, is it possible to change the new score fonts into icons without changing the main score?

http://atariage.com/forums/topic/147450-custom-fonts-for-bb-all-in-one-score-graphicsasm/

 

It looks like you found the thread I was about to link to. I use RevEng's custom score_graphics.asm in every project. It doesn't take up any more ROM, but allows choosing of different fonts as well as symbols for digit values 10-15. You can modify one of the available fonts to give you the icons you want, or create your own new font.

Share this post


Link to post
Share on other sites

I just tried to make it compatible with the multisprite kernel, and WoW, after so many years, there is an attempt to do it. :) I'm gonna check it right now, I need at least two standalone digits for my next games Choplifter and Distopia. :)

Share this post


Link to post
Share on other sites

Unfortunately, it's still incompatible with multisprite kernel. The testprogram gives blank screen. The older version runs, as a test program, but including it into a complete code it seems to be rewriting something.

Share this post


Link to post
Share on other sites

I haven't spent much time looking at this with the Multisprite kernel, but I'll see what I can figure out. There's a separate issue with the Multisprite kernel when noscore is set, so I'll look at this, too.

Share this post


Link to post
Share on other sites

Okay, I changed a prev. version of you kernel, these two variables are now equal to an address that has no name in the memory map, they seems to be fine.

 

temp1digit1 = $9e
temp1digit2 = $a0
I'm using a bit modified version of multisprite, but I did only change it so the scoretable is always black and there is a line of the original PF color so you it looks better to the eye.
I have to admit, I did not test it with noscore and 4 numbers, but I will do it with my next game, Dystopia, it will be a strategy game and I will need four number on display as money, population, steps left, turns left.

playerscores_multi2.asm

ChoplifterNTSC 0.03.bas.bin

  • Like 1

Share this post


Link to post
Share on other sites

Oh, and I have to say, standard kernel is easy to modify and read, it's well polished, but multisprite seems a bit chunky to me.

 

For me, the perfect kernel would be one with:

-Non-mirrored playfield

-2 p0+ 2 p1 (so I can make larger, more detailed sprites by pairing them)

-2 piece of 2 digit numbers (like in this kernel)

-6 digits score

Share this post


Link to post
Share on other sites

 

Okay, I changed a prev. version of you kernel, these two variables are now equal to an address that has no name in the memory map, they seems to be fine.

 

temp1digit1 = $9e
temp1digit2 = $a0
I'm using a bit modified version of multisprite, but I did only change it so the scoretable is always black and there is a line of the original PF color so you it looks better to the eye.
I have to admit, I did not test it with noscore and 4 numbers, but I will do it with my next game, Dystopia, it will be a strategy game and I will need four number on display as money, population, steps left, turns left.

 

 

Seems to work so far. Have not stressed it for going overcycle and real hardware yet.

 

I got the impression the developer of batari BASIC was having trouble finding the cycles for further features on the multi sprite kernel. If you think you can do better I'd test the heck out of a new multi sprite kernel :)

 

post-13304-0-72138900-1537615604_thumb.png

Share this post


Link to post
Share on other sites

A new multisprite kernel would be really useful for people who wouldn't like to use DPC+. I have seen nowadays a lot of games those could be just std kernel games.
Don't know if it would be possible to keep the "non-mirrored pf", add an extra p1 and p0 and remove the gaps between pf blocks that makes the original std kernel look awful with no sacrifice of missile0.

Btw. that maze looks really cool!

  • Like 1

Share this post


Link to post
Share on other sites

Another revised version. Once all of the obvious bugs have been ironed out, I will bundle it in a zip with updated documentation for any others that may benefit from these changes.

 

Anyway, give this version a shot, and let me know how it works for you. You will define the variables with something like this:

 dim player0score = y ; Define a variable for this only if pfscore1 is used
 dim player1score = x ; Define a variable for this only if pfscore2 is used

attachicon.gifplayerscores.asm

 

Does anything special have to be done for it to work with more than one bank? Right now I get this with "inline playerscores.asm" in the last bank:


--- Unresolved Symbol List
onedigitscore            0000 ????         (R )

Share this post


Link to post
Share on other sites

I don't think so. As normal, minikernels get put in the last bank. Let me know if you see any issues in a multi bank game, though, because I don't think I ever tried it.

Share this post


Link to post
Share on other sites

 

Okay, I changed a prev. version of you kernel, these two variables are now equal to an address that has no name in the memory map, they seems to be fine.

 

temp1digit1 = $9e
temp1digit2 = $a0
I'm using a bit modified version of multisprite, but I did only change it so the scoretable is always black and there is a line of the original PF color so you it looks better to the eye.
I have to admit, I did not test it with noscore and 4 numbers, but I will do it with my next game, Dystopia, it will be a strategy game and I will need four number on display as money, population, steps left, turns left.

 

 

I'm late getting back to this, but these are not unused variables:

$9d    SpriteGfxIndex
$9e    
$9f    
$a0    
$a1    

These 5 variables correspond to the 5 virtual sprites.

Share this post


Link to post
Share on other sites

 

 

Does anything special have to be done for it to work with more than one bank? Right now I get this with "inline playerscores.asm" in the last bank:


--- Unresolved Symbol List
onedigitscore            0000 ????         (R )

 

 

Looks like that version had a typo. Those responsible have been sacked. Here's the latest version. Maybe I should start putting numbers on these.

 

Revised playerscores minikernel version 0.1:

 

playerscores.asm

 

playerscores.bas

  • Like 2

Share this post


Link to post
Share on other sites

 

I'm late getting back to this, but these are not unused variables:

$9d    SpriteGfxIndex
$9e    
$9f    
$a0    
$a1    

These 5 variables correspond to the 5 virtual sprites.

They may be, but using them has no effect on my game somehow. :D It's called luck I guess.

Edited by MemberAtarian

Share this post


Link to post
Share on other sites

I noticed only the combination of these exact files allowed enough time to execute normal game operations - otherwise even a call to the rand command would cause things to go over cycle.

 

I tested this with both "multi sprite" and "pfcolors no_blank_lines" without going over cycle. I have not tried the 4 score option (mainly because the below screenshot is what I need.)

 

I also used the variable z for player1scorecolor as I intend to use the pfscore bars as well.

 

playerscores.zip

 

post-13304-0-97699800-1542035695_thumb.png

Edited by Gemintronic

Share this post


Link to post
Share on other sites

I like the use of the minikernal to display dice, and I'm rather pleased that this little project I did years ago is being updated and still in use.

  • Like 3

Share this post


Link to post
Share on other sites

Repeating a request that was made earlier in this thread: is it possible to have two six-digit scores? I'm willing to sacrifice variables!

Share this post


Link to post
Share on other sites

As a minikernel? Definitely feasible, though I would make it a separate code base than this minikernel. I'll give it a try.

 

Edit: One limitation to keep in mind is that you will need to have your own functions for changing the value of the second score. You won't be able to do e.g. score2 = score2 + 100 and have it work the way you would expect.

Share this post


Link to post
Share on other sites

Also, do you want to be able to set the color of the other score dynamically via a variable, or just set it to a static value with a const statement?

Share this post


Link to post
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.

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