jrok Posted September 10, 2009 Share Posted September 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
+batari Posted September 10, 2009 Share Posted September 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
jrok Posted September 10, 2009 Author Share Posted September 10, 2009 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.