Jump to content
CurtisP

Minikernel - Player Scores

Recommended Posts

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

 

Dang, you people are just never satisfied. :roll: Actually it should be possible to have one six-digit score on top of the other by hacking the standard kernel. It would use up the Aux variables which would mean no minikernel, though, I'll look into it when I get a chance.

Share this post


Link to post
Share on other sites

Sorry to bother you like that, I think what you've done is really cool. I just haven't found an excuse (other than a test) to use it so far. Keep up the good work. :cool:

Share this post


Link to post
Share on other sites
Can you look at the following code and tell me why playercolors can be set in the racetrack screen but not the main title screen?

 

During the title screen code, are you seetin COLUP0 and COLUP1 every time you call drawscreen? These are TIA registers and get overwritten by the Score routine, so that your players will end up being the same as the color of the last score.

 

It looks like this doesn't happen with your cars because you redefine each player and it's color every frame.

Share this post


Link to post
Share on other sites
Can you look at the following code and tell me why playercolors can be set in the racetrack screen but not the main title screen?

 

During the title screen code, are you seetin COLUP0 and COLUP1 every time you call drawscreen? These are TIA registers and get overwritten by the Score routine, so that your players will end up being the same as the color of the last score.

 

It looks like this doesn't happen with your cars because you redefine each player and it's color every frame.

 

Curtis,

 

To answer your previous question, I pretty much gave up on that, but I think the answer to my issue is that I would have just needed to set the player1scorecolor, player2scorecolor, player3scorecolor, player4scorecolor before each drawscreen.

Share this post


Link to post
Share on other sites

Curtis,

 

The player scores minikernel proves totally awesome again and am using it in Titan Diamonds (keep hitting select until you get one of the two-player games, then hit reset to start).

 

Two things I noticed though are that:

* When I use it it keeps wanting to flicker the 2nd score red (see attached 0.3).

 

titan_diamonds_0.3.bas.bintitan_diamonds_0.3.bas

 

* I can't use pfscore when I'm using the minikernel or it totally hoses everything up. It starts to ignore COLUBK and use COLUP0/COLUP1 instead (just by having using both playerscores minikernel and enabling pfscores at same time) and when I set the pfscores it changes the playerscores to player sprites that have been rolled down 2 rows instead of digits (see attached 0.3-pfscorebug).

 

titan_diamonds_0.3_pfscorebug.bas.bintitan_diamonds_0.3_pfscorebug.bas

post-7602-1195389921_thumb.png

post-7602-1195389927_thumb.png

Share this post


Link to post
Share on other sites
I've got a suggestion: How about two 6-digit scores?

 

Dang, you people are just never satisfied. :roll: Actually it should be possible to have one six-digit score on top of the other by hacking the standard kernel. It would use up the Aux variables which would mean no minikernel, though, I'll look into it when I get a chance.

I've got a game I'm working on here that would really benefit from having two six-digit scores, so if anyone has any free time, could someone please hack the standard kernel for me? (I'd do it myself, but I have absolutely no idea how to).

Edited by atari2600land

Share this post


Link to post
Share on other sites
I've got a suggestion: How about two 6-digit scores?

 

Dang, you people are just never satisfied. :roll: Actually it should be possible to have one six-digit score on top of the other by hacking the standard kernel. It would use up the Aux variables which would mean no minikernel, though, I'll look into it when I get a chance.

I've got a game I'm working on here that would really benefit from having two six-digit scores, so if anyone has any free time, could someone please hack the standard kernel for me? (I'd do it myself, but I have absolutely no idea how to).

 

The problem with this is that the scorepointers are precalculated during the overscan and require 6 bytes of RAM, so this hack would cause you to lose variables U-Z.

Share this post


Link to post
Share on other sites

Curtis,

 

Thank you so much for writing this minikernel. I'm hoping that this (or something similar) gets included in a future version of bB so people won't have to download it to use it, but I understand that some things may need to get worked out first.

 

But I have been having one issue I can't figure out. It compiles but I get:

 

2600 Basic compilation complete.
DASM V2.20.07, Macro Assembler (C)1988-2003
  bytes of ROM space left in bank 1
  bytes of ROM space left in bank 2
Possible duplicate label: L067 d181				  

> Terminated with exit code 0.

 

Specifically it is freaking out at:

	STA player0scorecolor
STA player1scorecolor
.L067;  COLUP0  =  gameovercolb  :  COLUP1  =  gameovercolb

 

And I think it is the

	STA player1scorecolor

It seems like maybe it could be an incompatibility between 8ksc (superchip) and the player scores minikernel. Please see attached for the issue I'm having.

 

Thanks for any help you can provide!

titan_diamonds_2.0.bas

titan_diamonds_2.0.bas.asm.txt

titan_diamonds_2.0.bas.bin

Share this post


Link to post
Share on other sites

Hi,

 

So I have spent the last few hours trying to figure out why my bBasic setup doesn't like this minikernel. I have moved files around that I have modified in my "includes" folder but I still get the following errors and it won't compile, though I have the bcd_math and playerscore asm files in the same "includes" folder, but it can't "open" them for some reason:

 

--

 

batari Basic v1.01 ©2005-2007

2600 Basic compilation complete.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

Warning: Unable to open 'playerscores.asm'

Warning: Unable to open 'bcd_math.asm'

bytes of ROM space left in bank 2

3173 bytes of ROM space left in bank 1

--> cycle74_HMCLR f084

 

--

 

:x Any help as to what or why it won't compile when I run 2600bas, will be appreciated or anybody else run into this problem? I am using the multisprite kernel and Curisp's minikernel and have both "inline playerscores.asm" and "inline bcd_math.asm" and the end of my .bas file

 

Thanks,

 

Weston :ponder:

Share this post


Link to post
Share on other sites

I always put the extra include files in the same folder as the .bas file that I am compiling, rather than bB's includes folder.

 

Hi,

 

So I have spent the last few hours trying to figure out why my bBasic setup doesn't like this minikernel. I have moved files around that I have modified in my "includes" folder but I still get the following errors and it won't compile, though I have the bcd_math and playerscore asm files in the same "includes" folder, but it can't "open" them for some reason:

 

--

 

batari Basic v1.01 ©2005-2007

2600 Basic compilation complete.

DASM V2.20.07, Macro Assembler ©1988-2003

bytes of ROM space left in bank 1

Warning: Unable to open 'playerscores.asm'

Warning: Unable to open 'bcd_math.asm'

bytes of ROM space left in bank 2

3173 bytes of ROM space left in bank 1

--> cycle74_HMCLR f084

 

--

 

:x Any help as to what or why it won't compile when I run 2600bas, will be appreciated or anybody else run into this problem? I am using the multisprite kernel and Curisp's minikernel and have both "inline playerscores.asm" and "inline bcd_math.asm" and the end of my .bas file

 

Thanks,

 

Weston :ponder:

Share this post


Link to post
Share on other sites

 

 

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


Dang, you people are just never satisfied. icon_rolleyes.gif

 

Suggestions are good, they'll help you improve your work.

Edited by smartkitten26
  • Like 1

Share this post


Link to post
Share on other sites

Thanks for this!

 

One suggestion: in the readme, I didn't really "get" what

 

This line must not be within any executed code, and in an 8K or larger game, must be in the last bank. A 2k or 4k game can use the include directive instead of inline.

 

meant. (I was great for Fort Apocalypse's Indy example and comment that meant (for a 4K game at least) "at the end... I thought maybe since it was at the top, with all the declarations, it might not count as "executed code". Dumb on my part, but an easy mistake for a newb or klutz to make

Share this post


Link to post
Share on other sites

Any chance this could be made to work in the DPC+ Kernal?

 

Seems like most people who know how to do anything have either disappeared or are too busy because of demanding jobs.

Share this post


Link to post
Share on other sites

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.

 

Can you combine this with a healthbar on one side? (say left and score on the right?)

Share this post


Link to post
Share on other sites

 

Seems like most people who know how to do anything have either disappeared or are too busy because of demanding jobs.

 

Both of those describe me. I also tend to jump between interests. In fact, I don't even remember writing this minikernel. Of course it has been over 10 years.

Edited by CurtisP
  • Like 1

Share this post


Link to post
Share on other sites

 

Can you combine this with a healthbar on one side? (say left and score on the right?)

 

Without reviewing the code, I'm guessing that a healthbar would have to use an asymmetric playfield. There may not be enough free RAM to implement it, though.

 

Edit: I can't do two scores and a healthbar, but it should be possible to write a minikernel that does one two-digit score and a healthbar.

Edited by CurtisP
  • Like 1

Share this post


Link to post
Share on other sites

My problem is the same as mentioned above, the only thing that is in my way that I would write the very first (?) strategy game for the system, but I can't do it, because I have to choose between having 5 sprites in multisprite kernel without showing resourches (which is important in an TBS or RTS), or doing this crazy movement of player1 sprite, even using player0 for filing, but still, the flicker kills your eyes.

 

Share this post


Link to post
Share on other sites

Hi,

Is there a way to use this code outside batari basic? What if I want to add a 6 digit score in my game?

 

Thanks and sorry for ressurecting this thread.

Share this post


Link to post
Share on other sites

A minikernel is just a chunk of ASM code called from bB towards the end of the visible screen. It could certainly be adapted for use in a non-bB project, but would need to be reworked as the code would be using symbols previously defined by bB.

 

As for the 6-digit score routine, an example of this extracted to its own routine can be found in the Titlescreen Kernel.

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