Jump to content
IGNORED

Text Minikernel


Karl G

Recommended Posts

Could you add some information about the "free" variables you used in the DPC+ kernel to the first post? Explaining the trade off could save a dev some headaches later.

 

 

DPC+ is desperately low on vars; many devs are going to see the memory map and grab those two extra variables.

Link to comment
Share on other sites

  • 2 years later...

Documentation has been updated, and the Multisprite kernel example has been updated to no longer include a patched multisprite_kernel.asm file. This was needed due to a bug in the Multisprite kernel which has since been corrected in newer bB releases.

 

No code changes otherwise in this update, so no need to update to the latest version if you are already using this.

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, Gemintronic said:

I thought I saw that you posted about having your own score related code in there (5 digit score topic).

 

Does this effect people who use modied score_graphics.asm?  I know I needed to modify that to include A-F and something else for RevEngs multi kernel framework.

My duplicate score code is the 6-digit routine that is normally part of the kernel (standard kernel, multisprite, or DPC+). The score_graphics.asm code is not affected, and you can use that version. I actually include a version of RevEng's score_graphics.asm modified to add a "squish" score font (less scanlines used to save CPU cycles).

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
  • 8 months later...

I was thinking if it is possible to remove all lowercase letters, and force all parameters so that the kernel does not have to check them, such as: forcing it to always not show the score, to always have a fixed text color, removing all handling for the extend text mode, and so on, in such way that the kernel could become smaller and use less cycles?

 

Maybe a minimalist version of this minikernel (for the standard kernel), where everything except the basic features are stripped ?

 

Edited by rfunes
Fixed typo
Link to comment
Share on other sites

My implementation does not use any lowercase letters - just capital letters, numbers, and some punctuation characters. Removing options and features will not reduce the cycles used by this or any other mini kernel, at any rate. That is a function of how many lines the minikernel displays. Mini kernels extend the visible screen, taking some processing time away from the overscan area where bB code runs. The text minikernel displays more lines than most, and unfortunately there is no way to avoid this. 

Link to comment
Share on other sites

  • 1 year later...
On 2/15/2019 at 5:24 PM, Karl G said:
Version 0.6 is up. This version adds DPC+ kernel support, and the user's guide has been updated with instructions on how to use this minikernel with a DPC+ kernel. I've placed everything in a zip file, with DPC+ in its own subdirectory, and added it to the first post.

 

 

 

 

Here's a hacked version of RT's 13-object demo using the text minikernel to show what object is currently selected.

 

 

 

 

 

 

Karl G,

 

Are you able to share the bas file the 13 object demo? That would probably answer my questions on trying to incorporate text into DPC, thanks. 

Link to comment
Share on other sites

1 hour ago, Lewis2907 said:

Karl G,

 

Are you able to share the bas file the 13 object demo? That would probably answer my questions on trying to incorporate text into DPC, thanks. 

Not sharing the source at the time was an oversight. Unfortunately I don't have it anymore, since it was lost with my laptop crash. I can help if you run into issues, and when I have time I can maybe make a new demo that uses DPC+.

  • Like 1
Link to comment
Share on other sites

47 minutes ago, Karl G said:

Not sharing the source at the time was an oversight. Unfortunately I don't have it anymore, since it was lost with my laptop crash. I can help if you run into issues, and when I have time I can maybe make a new demo that uses DPC+.

Karl G, 

 

Thanks. I'm gonna play around with it tomorrow as I just port over the titlescreen to the DPC game I back working on. If I can't figure it out I will send you the code to look over if you have time.

  • Like 1
Link to comment
Share on other sites

Karl G,

 

I stripped down the Multisprite version that I'm trying to port over to DPC+. I think my issue will be besides memory also that I have the titlescreen in the game in the other thread. If I get a DPC version going I will post it here for others to use. I removed the playfield since collision detection is very difficult with the Multisprite Kernel. Thanks again if you have time and are able to make a DPC demo. 

 

Edit:

 

I attached my attempt at the DPC Text version. Of course it doesn't work. I'm thinking maybe Bank 6 at the end is the problem also I'm using the player 0 to test the text kernel.

 

   bank 2

 

   ;***************************************************************
   ;
   ;  Player0 Text Controls
   ;  
   if joy0up then TextIndex = p0_text 
   if joy0down then TextIndex = p1_text 
   if joy0left then TextIndex = p2_text 
   if joy0right then TextIndex = p3_text 

 

   bank 6

 

   ;```````````````````````````````````````````````````````````````
   ;      
   ; Use the PDF provided by Carl G to make your text below
   ; They will correspond to the "Const" and the movement code
   ;
   data text_strings
   __C, __L, __Y, __D, __E, _sp, __F, __A, __S, __T, __E, __R
   __F, __A, __S, __T, __E, __R, _sp, __P, __I, __N, __K, __Y
   __G, __E, __T, _sp, __H, __I, __M, _sp, __I, __N, __K, __Y
   __C, __A, __T, __C, __H, _sp, __H, __I, __M, _sp, _sp, _sp
   __T, __R, __Y, _sp, _sp, __A, __G, __A, __I, __N, _sp, _sp, 
   __G, __O, __O, __D, _sp, _sp, __L, __U, __C, __K, _sp, _sp
   __T, __A, __S, __T, __Y, _sp, _sp, _sp, _sp, _sp, _sp, _sp
   _sp, _sp, _sp, __P, __A, __U, __S, __E, __D, _sp, _sp, _sp
   __B, __A, __L, __L, _sp, __O, __B, __J, __E, __C, __T, _sp
end

 

   inline text12b.asm

 

   inline text12a.asm

 

   inline text12DPCplus.asm
 

 

 

20230820_Text_Multisprite.bas.bin 20230820_Text_Multisprite.bas 20230820_Text_DPC.bas

Edited by Lewis2907
Link to comment
Share on other sites

23 hours ago, Lewis2907 said:

Karl G,

 

I stripped down the Multisprite version that I'm trying to port over to DPC+. I think my issue will be besides memory also that I have the titlescreen in the game in the other thread. If I get a DPC version going I will post it here for others to use. I removed the playfield since collision detection is very difficult with the Multisprite Kernel. Thanks again if you have time and are able to make a DPC demo. 

I guess this shows how poor my memory is, but it looks like I have the source for the DPC+ text minikernel demo in the DPC subdirectory of the text kernel zip file. I hope that helps, and let me know if you still have issues after using that for reference.

Link to comment
Share on other sites

5 hours ago, Karl G said:

I guess this shows how poor my memory is, but it looks like I have the source for the DPC+ text minikernel demo in the DPC subdirectory of the text kernel zip file. I hope that helps, and let me know if you still have issues after using that for reference.

Karl,

 

Lol on the memory. Once I started to really look at the file it came back to me as my memory was foggy too. I got it working thanks to the location of the files. I notified the best way to get my sample to work was to actually put it into the folder for DPC. Then I moved the game I'm working on with the Titlescreen into the same text DPC folder and it works. Just food for thought for others the Text Kernel and Titlescreen take up a lot of bites. Thanks again for the help. 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Karl G,

It's me again with another request I was trying to add text to the below and attached, but ran into some errors. Is it possible to add text? Also is it possible to do this in DPC? I recall that you mentioned DPC was probably not do able, but it would help on the next game I'm building (well for what I can do). My plan is to try and do a DPC & multisprite version of the game. Thanks if you can assist me as I'm lost in ASM.  

 

image.thumb.png.83e450185679b2519295f1a38025358e.png

20230908 - 5digit_Text_Sprite_Multisprite.bas

Link to comment
Share on other sites

9 hours ago, Lewis2907 said:

Karl G,

It's me again with another request I was trying to add text to the below and attached, but ran into some errors. Is it possible to add text? Also is it possible to do this in DPC? I recall that you mentioned DPC was probably not do able, but it would help on the next game I'm building (well for what I can do). My plan is to try and do a DPC & multisprite version of the game. Thanks if you can assist me as I'm lost in ASM.  

 

image.thumb.png.83e450185679b2519295f1a38025358e.png

20230908 - 5digit_Text_Sprite_Multisprite.bas 16.33 kB · 1 download

I'm a bit confused on what you are trying to do here and why. It looks like you are using a modified version of the "cannons" demo game I made for the 2playerlives minikernel I made, and using both the minikernel and pfscore bars (which seems like it would be redundant), and now trying to add text to that?

 

As a starting point, you can't have two minikernels in the same project. If you hacked them to be one huge minikernel that included both the 2playerlives and text minikernels into one, then that minikernel (megakernel?) would use WAY too many lines, and push the score partially off the screen of most displays as well as leave too little processing time in overscan for your game.

Link to comment
Share on other sites

  • 5 months later...

Karl, I posted in another thread about how my program wouldn't compile in 64k, and I've resolved the issue.

I was using the score_graphics.asm file that came with your text minikernel so I could use the "squish" mode that you added.

It seems that it doesn't have support for 64k.

I fixed it by adding the following code near the beginning of the file:

     if bankswitch == 64
       ORG  $10FD0-scorelength-bscode_length
       RORG $1FFD0-scorelength-bscode_length
     endif

And again near the end of the file:

     if bankswitch == 64
       ORG  $10FE0-bscode_length
       RORG $1FFE0-bscode_length
     endif
  • Like 2
Link to comment
Share on other sites

21 hours ago, Krunkcleanup said:

Karl, I posted in another thread about how my program wouldn't compile in 64k, and I've resolved the issue.

I was using the score_graphics.asm file that came with your text minikernel so I could use the "squish" mode that you added.

It seems that it doesn't have support for 64k.

I fixed it by adding the following code near the beginning of the file:

     if bankswitch == 64
       ORG  $10FD0-scorelength-bscode_length
       RORG $1FFD0-scorelength-bscode_length
     endif

And again near the end of the file:

     if bankswitch == 64
       ORG  $10FE0-bscode_length
       RORG $1FFE0-bscode_length
     endif

Excellent, and thanks for letting me know! I'll put that fix in the next version of the minikernel.

  • Like 1
Link to comment
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.
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...