Jump to content
Sign in to follow this  
CurtisP

Stupid Kernel Tricks

Recommended Posts

While working on the tutorial I had the idea for a hack to continue drawing PF0 into the score. I changed the code directly after the endkernel label to

 

 ; 6 digit score routine
 stx PF1
 stx PF2
 ifnconst extendborder
 stx PF0
 endif

 

With this hack in place, the following line will cause the border to extend into the score.

 

 const extendborder=1

 

In addition, when this option is set, PF0 does not need to set every time drawscreen is executed.

Share this post


Link to post
Share on other sites

It's good to see other people tinkering with modifications this way! :) But you do need to watch out for two things when modifying the kernel: (1) that you don't mess up any timing; and (2) that you don't mess up any branching (either by altering where page-crossings occur, or by causing branches to become out of range). I don't think your modification has any problems with those things, and you may already be familiar with these sorts of issues, but I wanted to mention this for everyone else's benefit, in case other people get brave enough to start tinkering with modifications of their own.

 

Michael

 

PS -- Another thing to watch out for is that the standard kernel makes heavy use of directives, like the one added here ("ifnconst extendborder"). So if a modification is being made in an area of the kernel that has two or more alternate sections of code (as determined by the directives), then the modification might need to be made in all of the alternate sections.

Edited by SeaGtGruff

Share this post


Link to post
Share on other sites

All good points. The kernel can be quite convoluted and hard to follow, so it can take a while to figure out how to make a hack.

 

In this case it was reasonasbly easy: I just did a search in the file for PF0 and only found one occurence.

Share this post


Link to post
Share on other sites

I've also found 12 cycles available if you aren't using readpaddles, playercolors, or pfcolors. Don't know what to put there, but at least I know it's available.

Share this post


Link to post
Share on other sites
I've also found 12 cycles available if you aren't using readpaddles, playercolors, or pfcolors. Don't know what to put there, but at least I know it's available.

Where are the 12 available cycles located?

 

Michael

Share this post


Link to post
Share on other sites
I've also found 12 cycles available if you aren't using readpaddles, playercolors, or pfcolors. Don't know what to put there, but at least I know it's available.

Where are the 12 available cycles located?

 

Line 217 of std_kernel.asm

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...