Jump to content
IGNORED

Second Score Minikernel (works now)


Karl G

Recommended Posts

While perhaps not as fun as second breakfast, there has been a request for a minikernel that can display a second 6-digit score. The top score is set in the usual way with the special score variable, but the second is set manually with the "ssc1", "ssc2" and "ssc3" variables. The user needs to dim the variables "secondscore" and "secondscorecolor" in the BASIC code.

 

As stated above, this isn't working yet, but I thought I'd share my preliminary work in case anyone had any ideas as to the issue. Details in the next post.

 

Second Score v0.1:

 

secondscore.asm

secondscore.bas

 

  • Like 4
Link to comment
Share on other sites

The second set of digits does not display the expected values of "789012". Presumably there's a mistake with my pointer setup that I missed.

 

Since minikernels are called before the score, and the score pointers are already set by then, I let the minikernel score digits display the normal score. Once this is done, I set the pointers for each digit using the variables defined for the second score. I adapted some code from the titlescreen kernel for this purpose.

 

I'm sure I made some kind of simple error that I'm missing, but I can't find it now. If someone else wants to take a look, then that would be cool - otherwise I'll look at it again another time to see what I'm missing here.

Link to comment
Share on other sites

It seems like some variables/pointers are not unique between score kernels.

 

score = 111111
secondscore = $44
secondscore2 = $22
secondscore3 = $33
Results in a score display of:
111111
411231
You probably know this. I was just explaining my own discovery :)
I tried changing secondscore2 and secondscore3 to variables e and f with same results.
I tried renaming scorepointers to sscorepointers and that cause the duplicated digits to be garbled.
Link to comment
Share on other sites

I confirmed that the variables themselves contain the correct values, so presumably I setup the pointers incorrectly. No doubt it will jump out at me when I look at it again with a clear head.

 

Thank you for your interest in this. For me editing assembly files without proper knowledge of assembly itself.. well, gives me more practical exposure (and eventually understanding). Your sweet mini kernels are the perfect incentive :)

  • Like 1
Link to comment
Share on other sites

After sleeping on it, I was able to fix the problem. I was making the unwarranted assumption that the titescreen kernel set the score pointers in the same way that bB does. I replaced that code with the bB code that sets the pointers, and it is working now.

 

Note that this is pretty big for a minikernel since it duplicates the entire bB 6-digit score routine, but I can't really avoid that without also modifying the standard kernel.

 

As with any minikernel, this needs to go in the last bank of a multibank project.

Link to comment
Share on other sites

You're welcome. Let me know how it works for you. I thought of a couple more things to note. First, you can't yet use a different font for each score, but I will look into that for a future version. Also, the pfscore bars should still work, but only the ones next to the bottom score will display, by design. It has only been lightly tested, so definitely report any bugs!

  • Like 1
Link to comment
Share on other sites

Works for standard kernel. Multi sprite didn't like "secondscore2 = aux2" so I changed it to use yet another variable. Compiled but screen went blank.

 

I think using a different font would require editing the score_graphics.asm and adding a second scoretable label and data. I don't fully understand how to allocate more space via the ORG and REORG statements in there, though.

 

Thank you again Karl G!

Link to comment
Share on other sites

I would love it if this could also work with the multisprite kernel. Consider me a beggar and a chooser. :) Thanks again!

 

The multisprite kernel is a strange beast. I posted a solution in the topic below. You get two additional 2 digit scores and can use the pfscore bars. It does use up more variables and I haven't tested on real hardware (yet). Not my original work.

http://atariage.com/forums/topic/113146-minikernel-player-scores/page-4?do=findComment&comment=4155439

Link to comment
Share on other sites

Multi sprite didn't like "secondscore2 = aux2" so I changed it to use yet another variable. Compiled but screen went blank.

 

I tried the multisprite kernel, and my results were the same as yours. I did very briefly see a flash of both scores, but then it went blank, and it overcycles. I have no idea what the issue is with that one, and no idea how to fix it, unfortunately.

  • Like 1
Link to comment
Share on other sites

I would find this very useful with the DPC+ kernel also but assuming there would overcycle issues as with the multisprite.

 

On a side note im thinking it should be possible to hack the font using Bithacker on compiled ROM's haven't tried it though.

 

Nice project, very interesting.

Link to comment
Share on other sites

While you're dabbling with scores and the difference between titlescreen and bB score code, would you mind either sharing here or send me some code I can replace the titlescreen score code with that works exactly like in bB? Atleast when you're using DPC+ option in titlescreen the score is one pixel further to the left then in bB, I've tried to adjust it but I'm not there yet.

Link to comment
Share on other sites

  • 2 years later...

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