Jump to content

Photo

Minikernel - Player Scores


95 replies to this topic

#76 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Sun Aug 19, 2018 9:43 AM

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.



#77 Coolcrab OFFLINE  

Coolcrab

    Moonsweeper

  • 385 posts
  • Location:Stockholm

Posted Sun Aug 19, 2018 3:51 PM

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

#78 ZackAttack OFFLINE  

ZackAttack

    Dragonstomper

  • 754 posts
  • Location:Orlando, FL US

Posted Sun Aug 19, 2018 6:46 PM

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.



#79 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Sun Aug 19, 2018 7:09 PM

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.



#80 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Sun Aug 19, 2018 7:11 PM

 

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.



#81 Coolcrab OFFLINE  

Coolcrab

    Moonsweeper

  • 385 posts
  • Location:Stockholm

Posted Sat Aug 25, 2018 8:58 AM

Another question, is it possible to change the new score fonts into icons without changing the main score?
http://atariage.com/...re-graphicsasm/

#82 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Sat Aug 25, 2018 10:02 AM

Another question, is it possible to change the new score fonts into icons without changing the main score?
http://atariage.com/...re-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.



#83 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Mon Sep 17, 2018 10:53 AM

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



#84 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Mon Sep 17, 2018 12:03 PM

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.



#85 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Mon Sep 17, 2018 12:08 PM

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.



#86 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Mon Sep 17, 2018 1:44 PM

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.

Attached Files



#87 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Mon Sep 17, 2018 1:47 PM

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



#88 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,221 posts

Posted Sat Sep 22, 2018 5:26 AM

 

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 :)

 

cote19b.bas.png



#89 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Sat Sep 22, 2018 5:45 AM

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!



#90 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,789 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Oct 4, 2018 5:35 PM

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 )


#91 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Oct 4, 2018 5:39 PM

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.

#92 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Oct 4, 2018 5:40 PM

Oh I misread that - I'll take a look.

#93 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Oct 4, 2018 5:49 PM

 

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.



#94 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Oct 4, 2018 6:10 PM

 

 

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:

 

Attached File  playerscores.asm   5.57KB   8 downloads

 

Attached File  playerscores.bas   607bytes   7 downloads



#95 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 238 posts

Posted Thu Oct 4, 2018 9:19 PM

 

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, Thu Oct 4, 2018 9:19 PM.


#96 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,221 posts

Posted Mon Nov 12, 2018 9:15 AM

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.

 

Attached File  playerscores.zip   3.22KB   1 downloads

 

playerscoresMSnot_b.bas.png


Edited by Gemintronic, Mon Nov 12, 2018 9:21 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users