Jump to content

The Southsider

  • entries
    81
  • comments
    767
  • views
    138,564

16 Char Text


cd-w

1,502 views

I have written another text kernel which displays 16 characters. This may seem pointless, given my earlier 24-char and 28-char kernels, but it has several nice features:

  1. Uses less ZP memory (46 bytes total).
  2. Shows more lines on screen (14).
  3. Text width is a power of 2 (for easy calculations).
  4. Kernel has loads of free cycles (around 40 per scanline), e.g. could have a PF image underneath.

blogentry-6563-1206637439_thumb.png

 

The main reason for writing this kernel is to allow the Juno First score table to be displayed nicely on a single line, rather than split across lines. I'm planning to integrate this, together with SaveKey support, in the next release. Note that I haven't included the level number as there is no room to store this in a single page on the SaveKey.

 

Chris

9 Comments


Recommended Comments

I suggest dropping the slash in the zero - it's very hard to read.

 

(3 initials + 3 bytes for score) X top 10 = 60 - so I gather a page is 64 bytes?

 

Converting the score to a 2 byte value would give you 1 byte to store the level.

 

Another option would be to use the top 2 bits of each initial, though that would limit you to 32 levels. If the score's last digit is always 0 then you have another 4 bits available in the last nybble.

Link to comment

You could also pack the three initials into two bytes by storing the letters as 5 bits, which allows for upper-case letters, space, and dot, and maybe a few extra.

Link to comment

It looks like positions 1-9 would fit in 13 chars, and possible even 10 if you slide the 1 and the . over.

 

Given this, I'm wondering if a flickering 16-char routine is really that much better than a flicker-free 13-char routine? I don't know the details of the 13-char routine but I have seen a demo of it.

Link to comment
Given this, I'm wondering if a flickering 16-char routine is really that much better than a flicker-free 13-char routine? I don't know the details of the 13-char routine but I have seen a demo of it.

 

"10 CDW 123456"

 

Yup, fits into 13! :cool:

Link to comment

Thanks for the suggestions. Having thought about it some more, it wouldn't actually be necessary to use a 13 char routine as the kernel for the scores could be done with sprites like this:

 

0--101-10  or
0---01-101

 

However, I think I will go the 16 character route and pack in the wave number. If each initial is restricted to 32 chars (alphabet + punctuation), then I can pack three initials into two bytes and use the remaining byte for the wave number. This would then be displayed as 10-CDW-99-000000 using the full 16 char width. I'm only planning to have 32 or 64 waves in the game so this would work nicely, and the flicker isn't a big issue given the main game :cool:

 

Chris

Link to comment
However, I think I will go the 16 character route and pack in the wave number. If each initial is restricted to 32 chars (alphabet + punctuation), then I can pack three initials into two bytes and use the remaining byte for the wave number. This would then be displayed as 10-CDW-99-000000 using the full 16 char width. I'm only planning to have 32 or 64 waves in the game so this would work nicely, and the flicker isn't a big issue given the main game :cool:

 

How about using 13 characters but dropping the rank? If you display 10 scores, in order from highest to lowest, do you really need to label them 1-10?

Link to comment
But if you do that, you don't get the satisfaction of seeing your name next to #1. :cool:

 

How about using the Playfield and Ball to draw a nice big digit behind the score table showing the player's rank from the last game (if applicable)? A 7-segment-style digit could be done without requiring any CPU cycles during the score-digit-display kernel.

Link to comment
Guest
Add a comment...

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