Jump to content

Photo

Minikernel - Player Scores


50 replies to this topic

#26 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Sat Sep 29, 2007 8:36 AM

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.

#27 atari2600land ONLINE  

atari2600land

    Channel F Viewer

  • 11,345 posts
  • Location:Salem, Oregon

Posted Mon Oct 1, 2007 2:57 AM

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:

#28 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,595 posts

Posted Wed Oct 3, 2007 9:03 PM

Curtis,

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?

Thanks!

Attached File  ultindy500_0.3b.bas   16.73KB   194 downloads
Attached File  ultindy500_0.3b.bas.bin   4KB   176 downloads
Attached File  ultindy500_0.3b.asm.txt   72.65KB   189 downloads

#29 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Thu Oct 4, 2007 6:48 PM

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.

#30 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,595 posts

Posted Sun Nov 18, 2007 6:32 AM

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.

#31 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,595 posts

Posted Sun Nov 18, 2007 6:45 AM

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

Attached File  titan_diamonds_0.3.bas.bin   4KB   232 downloadsAttached File  titan_diamonds_0.3.bas   12.38KB   180 downloadsas]

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

Attached File  titan_diamonds_0.3_pfscorebug.bas.bin   4KB   234 downloadsAttached File  titan_diamonds_0.3_pfscorebug.bas   12.42KB   190 downloadsbas]

Attached Thumbnails

  • titan_diamonds_0.3_bug.bas.bin.png
  • titan_diamonds_0.3_bug.bas.bin_1.png


#32 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Wed Dec 5, 2007 11:09 PM

I'll try and take a look at that soon.

#33 atari2600land ONLINE  

atari2600land

    Channel F Viewer

  • 11,345 posts
  • Location:Salem, Oregon

Posted Sun Dec 16, 2007 3:33 PM

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, Sun Dec 16, 2007 3:36 PM.


#34 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Tue Jan 1, 2008 9:30 PM

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.

#35 Fort Apocalypse OFFLINE  

Fort Apocalypse

    Stargunner

  • 1,595 posts

Posted Mon Feb 4, 2008 9:52 PM

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!

Attached Files



#36 Gateway OFFLINE  

Gateway

    River Patroller

  • 2,165 posts
  • Trotter Atari Globetrotter now on Facebook!
  • Location:St. Joseph area, Missouri

Posted Fri Jul 17, 2009 7:30 PM

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:

#37 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Sat Jul 18, 2009 3:13 PM

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:



#38 smartkitten26 OFFLINE  

smartkitten26

    Chopper Commander

  • 146 posts

Posted Tue Aug 18, 2009 9:35 PM

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, Tue May 19, 2015 3:17 PM.


#39 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,904 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Fri Sep 11, 2009 9:38 PM

I like this minikernel. :thumbsup: :thumbsup:

#40 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,904 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Mon Sep 14, 2009 12:29 AM

Does this work with the multisprite kernel?

Edited by accousticguitar, Thu Sep 17, 2009 7:28 PM.


#41 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,904 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Sep 17, 2009 7:26 PM

I have determined that this minikernel does not work with the multisprite kernel. :(

Edited by accousticguitar, Thu Sep 17, 2009 7:28 PM.


#42 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 4,059 posts
  • Location:Boston Burbs, MA

Posted Sat Jan 24, 2015 10:03 PM

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



#43 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • 679 posts
  • Location:Philadelphia, PA

Posted Mon Sep 7, 2015 8:37 PM

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



#44 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

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

Posted Mon Sep 7, 2015 9:28 PM

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.



#45 Coolcrab OFFLINE  

Coolcrab

    Chopper Commander

  • 205 posts
  • Location:Stockholm

Posted Thu Feb 8, 2018 3:08 AM

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



#46 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Mon Feb 12, 2018 7:52 PM

 
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, Mon Feb 12, 2018 8:22 PM.


#47 CurtisP OFFLINE  

CurtisP

    Moonsweeper

  • Topic Starter
  • 257 posts

Posted Mon Feb 12, 2018 7:54 PM

 

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, Mon Feb 12, 2018 8:07 PM.


#48 MemberAtarian OFFLINE  

MemberAtarian

    Chopper Commander

  • 155 posts

Posted Mon Apr 30, 2018 2:51 AM

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.

 



#49 IuriNery OFFLINE  

IuriNery

    Space Invader

  • 10 posts

Posted Sat Jul 7, 2018 10:58 AM

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.



#50 Karl G OFFLINE  

Karl G

    Moonsweeper

  • 358 posts

Posted Sat Jul 7, 2018 11:39 AM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users