Jump to content

The Southsider

  • entries
    81
  • comments
    767
  • views
    138,543

Score Kernel Revisited!


cd-w

1,822 views

It seems that nobody was impressed with my 16 character kernel last time - the main problem being the introduction of unnecessary flicker! I wasn't entirely happy with it myself, but I couldn't think of a better solution at the time. However, based on batari and Manuel's comments I decided to have another look at the no-flicker 13 char text demos. The 13+2 char demo uses a neat trick of rewriting NUSIZ during a scanline to squeeze in an extra two characters (in addition to using the ball and missile sprites to draw the 13th character). This trick provides exactly what I need for my high score table:

 

blogentry-6563-1206883013_thumb.png

 

The first part of the kernel arranges the sprites like this (P0 is set to 3 copies medium and P1 is set to 3 copies close):

0--101-10

Using the NUSIZ trick it is possible to display another copy of P1 (by setting it to 3 copies medium after the third sprite is drawn). This gives the following sprite layout:

0--101-10--1

This layout provides the necessary four-part display (Position, Score, Initials, Wave) that I was after! The spacing between the columns isn't perfect, but I think it looks good enough in the screenshot.

 

The attached code demonstrates this technique. I haven't actually tested this on real hardware, so I hope the NUSIZ trick works in practise (it works fine in Stella and Z26)? Hopefully everyone will agree that this kernel looks much better than my previous attempt!

 

Chris

  • Like 1

9 Comments


Recommended Comments

That's absolutely fantastic, definitely worth the extra time invested here! :lust:

 

And yes, it works flawless on my PAL system! :cool:

Link to comment
That's absolutely fantastic, definitely worth the extra time invested here! :lust:

And yes, it works flawless on my PAL system! :cool:

 

Thanks for your suggestion to look at the 13+2 char demo - I had completely forgotten about the NUSIZ trick. Also thanks for testing this on real hardware - it is definitely a big improvement over the old version.

 

Chris

Link to comment

This NUSIZ trick is interesting. I wonder if this would work:

 

Set NUSIZ0 to two copies wide and NUSIZ1 to two copies close. After the two copies of P1 are drawn, change NUSIZ1 to two copies wide, then after two copies of P0 are drawn, change to two copies close. In theory, would something like this be possible?

 

101-------010

 

I wonder, since it would be a great way to display two three-digit scores.

Link to comment
I wonder, since it would be a great way to display two three-digit scores.

 

I think you can just shift the normal 6-char over the screen border so that it wraps around with 3 sprites on each side. IIRC I possibly did that in the Dog Patch demo I posted some time ago.

Link to comment
I wonder, since it would be a great way to display two three-digit scores.

 

I think you can just shift the normal 6-char over the screen border so that it wraps around with 3 sprites on each side. IIRC I possibly did that in the Dog Patch demo I posted some time ago.

Thanks! That's so obvious now, I don't know why I never thought of it :cool:

Link to comment
Set NUSIZ0 to two copies wide and NUSIZ1 to two copies close. After the two copies of P1 are drawn, change NUSIZ1 to two copies wide, then after two copies of P0 are drawn, change to two copies close. In theory, would something like this be possible?

 

101-------010

 

There are four positions, relative to the reset strobe, where a player or missile sprite can be triggered (at 16, 32, 64, or 160 pixels after the strobe). The last is always enabled; the other three are controlled by NUSIZx bits 0-2. To be precise: (bit 0 and not bit 2), (bit 1), (bit 2 and not bit 0).

 

Player 1 could behave something like what you're after, but player 0 wouldn't.

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