Jump to content
IGNORED

"extra" bytes?


jrok

Recommended Posts

I have a feeling this was documented somewhere, but I cannot seem to find it.

 

I'm working on a 4 bank game. My program compiles successfully, but the message log includes the following output:

 

 90 bytes found in extra9 ( 0 used)
90 bytes found in extra14 ( 0 used)
90 bytes found in extra19 ( 0 used)
90 bytes found in extra23 ( 0 used)
90 bytes found in extra27 ( 0 used)
90 bytes found in extra31 ( 0 used)
90 bytes found in extra35 ( 0 used)

 

Can anyone explain what this is all about?

 

Thanks in advance,

Jarod.

Link to comment
Share on other sites

I have a feeling this was documented somewhere, but I cannot seem to find it.

 

I'm working on a 4 bank game. My program compiles successfully, but the message log includes the following output:

 

 90 bytes found in extra9 ( 0 used)
90 bytes found in extra14 ( 0 used)
90 bytes found in extra19 ( 0 used)
90 bytes found in extra23 ( 0 used)
90 bytes found in extra27 ( 0 used)
90 bytes found in extra31 ( 0 used)
90 bytes found in extra35 ( 0 used)

 

Can anyone explain what this is all about?

 

Thanks in advance,

Jarod.

Those bytes are a result of zero-filling of sprite data to avoid page-wrapping in the kernel. You can use those bytes by using an obscure, undocumented command called extra. The bytes are always in the last bank, and you may only place data statements and inline asm there, no graphics or bB code.

 

To use those bytes, create an "extra" section:

 extra0:

 data mydata
12,23,33,66,77
end
 asm
myasm
 lda #myvar
 sta $FF
 ldx $FE
 CPX #4
 BEQ tst
 rts
tst
 inx
 rts
end

end

 extra1:
 data shipsize
 1,2,3,4,5,6,78,8,9,233
end
end

Note that as you recompile your code, the actual size of each section may change and the number of available sections may change, so the command has somewhat limited utility.

 

If you are really tight on space and really need more, however, it can be helpful.

Link to comment
Share on other sites

I have a feeling this was documented somewhere, but I cannot seem to find it.

 

I'm working on a 4 bank game. My program compiles successfully, but the message log includes the following output:

 

 90 bytes found in extra9 ( 0 used)
90 bytes found in extra14 ( 0 used)
90 bytes found in extra19 ( 0 used)
90 bytes found in extra23 ( 0 used)
90 bytes found in extra27 ( 0 used)
90 bytes found in extra31 ( 0 used)
90 bytes found in extra35 ( 0 used)

 

Can anyone explain what this is all about?

 

Thanks in advance,

Jarod.

Those bytes are a result of zero-filling of sprite data to avoid page-wrapping in the kernel. You can use those bytes by using an obscure, undocumented command called extra. The bytes are always in the last bank, and you may only place data statements and inline asm there, no graphics or bB code.

 

To use those bytes, create an "extra" section:

 extra0:

 data mydata
12,23,33,66,77
end
 asm
myasm
 lda #myvar
 sta $FF
 ldx $FE
 CPX #4
 BEQ tst
 rts
tst
 inx
 rts
end

end

 extra1:
 data shipsize
 1,2,3,4,5,6,78,8,9,233
end
end

Note that as you recompile your code, the actual size of each section may change and the number of available sections may change, so the command has somewhat limited utility.

 

If you are really tight on space and really need more, however, it can be helpful.

 

Thanks, batari!

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