Jump to content

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


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.

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




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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...