+Karl G Posted November 27, 2018 Share Posted November 27, 2018 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 4 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/ Share on other sites More sharing options...
+Karl G Posted November 27, 2018 Author Share Posted November 27, 2018 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. Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165272 Share on other sites More sharing options...
+Karl G Posted November 27, 2018 Author Share Posted November 27, 2018 To be clear, both scores display, but the wrong digits display on the bottom one: Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165281 Share on other sites More sharing options...
+Gemintronic Posted November 27, 2018 Share Posted November 27, 2018 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. Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165349 Share on other sites More sharing options...
+Karl G Posted November 27, 2018 Author Share Posted November 27, 2018 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. 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165374 Share on other sites More sharing options...
+Gemintronic Posted November 27, 2018 Share Posted November 27, 2018 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 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165379 Share on other sites More sharing options...
+Karl G Posted November 28, 2018 Author Share Posted November 28, 2018 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. 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165830 Share on other sites More sharing options...
Coolcrab Posted November 28, 2018 Share Posted November 28, 2018 Awesome! Also you should edit the main thread as it says that its not working. Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165850 Share on other sites More sharing options...
+Karl G Posted November 28, 2018 Author Share Posted November 28, 2018 Awesome! Also you should edit the main thread as it says that its not working. Actually, I had changed it to "works now". Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165857 Share on other sites More sharing options...
bjbest60 Posted November 28, 2018 Share Posted November 28, 2018 Awesome! This looks great--can't wait to use it. Thanks so much! Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165897 Share on other sites More sharing options...
+Karl G Posted November 28, 2018 Author Share Posted November 28, 2018 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! 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165911 Share on other sites More sharing options...
+Gemintronic Posted November 28, 2018 Share Posted November 28, 2018 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! Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4165981 Share on other sites More sharing options...
+Karl G Posted November 28, 2018 Author Share Posted November 28, 2018 I think it can be done just by offsetting the pointer by the appropriate amount to point at the new font. I don't expect it to be too difficult, but we shall see. 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4166007 Share on other sites More sharing options...
bjbest60 Posted November 28, 2018 Share Posted November 28, 2018 I would love it if this could also work with the multisprite kernel. Consider me a beggar and a chooser. Thanks again! Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4166157 Share on other sites More sharing options...
+Gemintronic Posted November 28, 2018 Share Posted November 28, 2018 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 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4166163 Share on other sites More sharing options...
+Karl G Posted November 29, 2018 Author Share Posted November 29, 2018 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. 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4166261 Share on other sites More sharing options...
+Karl G Posted November 29, 2018 Author Share Posted November 29, 2018 Looks like I was wrong about how simple it would be to use a separate font for the second score. It will indeed require a second font table. I'm not sure when I'll get around to this, but it should still be doable. 1 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4166594 Share on other sites More sharing options...
TwentySixHundred Posted November 30, 2018 Share Posted November 30, 2018 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. Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4167221 Share on other sites More sharing options...
Lillapojkenpåön Posted November 30, 2018 Share Posted November 30, 2018 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. Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4167461 Share on other sites More sharing options...
ZippyRedPlumber Posted September 23, 2021 Share Posted September 23, 2021 I want to remove the middle 2 numbers so I can make health & status bar, how can I do it? Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4910418 Share on other sites More sharing options...
+Karl G Posted September 23, 2021 Author Share Posted September 23, 2021 11 hours ago, ZippyRedPlumber said: I want to remove the middle 2 numbers so I can make health & status bar, how can I do it? Set the variable ssc2 to $AA. Here's a screenshot after I did so in the same program in the first post: 2 Quote Link to comment https://forums.atariage.com/topic/285438-second-score-minikernel-works-now/#findComment-4910664 Share on other sites More sharing options...
Recommended Posts
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.