Jump to content
IGNORED

Minikernel - Player Scores


CurtisP

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

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

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

Link to comment
Share on other sites

  • 4 weeks later...

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
Link to comment
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

Link to comment
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

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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 )
Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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