Buckaroo Posted May 18, 2017 Share Posted May 18, 2017 While working on something completely unrelated I found that you can use [xx] in Visual BB to access most of the commands,variables,sounds etc... E.g. player0x=10 is exactly the same as [128]=10 Some of the variables do require you to update them every frame (NUSIZ0 for example) If you just use it once it seems to cost you more bytes, but if you can use a loop to set multiple items at the same time you can save loads of bytes. 6-bit address 1.0.bas Use Joy0 L/R to select item to edit Use Joy0 U/D to edit values Hold Joy0 fire to increase the amount to change First 3 digits of score are the item you're editing [xxx] Last 3 digits of score are the value Checkerboard.bas Demonstration of playfield usage with 2820 bytes to spare The best use I've found so far is on the playfield, you're able to set segments of 8 pixels directly and it seems to be really fast at doing it (seems to be faster than pfline). Here is an incomplete list of the links I've found so far, if you can help me fill the gaps I'd appreciate it: Red items are ones I've not been able to confirm 0 VSYNC 128 player0x1 VBLANK 129 player1x2 WSYNC 130 missile0x3 RSYNC 131 missile1x4 NUSIZ0 132 ballx5 NUSIZ1 133 player0y6 COLUP0 134 player1y7 COLUP1 135 missile1height8 COLUPF 136 missile1y9 COLUBK 137 bally10 CTRLPF 138 player0pointerlo11 REFP0 139 player0pointerhi12 REFP1 140 player1pointerlo13 PF0 141 player1pointerhi14 PF1 142 player0height15 PF2 143 player1height16 RESP0 144 missile0height17 RESP1 145 missile0y18 RESM0 146 ballheight19 RESM1 147 XX000 score20 RESBL 148 00XX00 score21 AUDC0 149 000XX score22 AUDC1 23 AUDF0 163 scorecolor24 AUDF1 25 AUDV0 164-207 playfield (see below)26 AUDV1 27 GRP0 212-237 Variables a-z28 GRP1 29 ENAM0 239 playfieldpos30 ENAM1 31 ENABL 254 Inaccessible32 HMP0 33 HMP1 255 RESET?34 HMM0 35 HMM1 36 HMBL 37 VDELP0 38 VDELP1 39 VDELBL 40 RESMP0 41 RESMP1 42 HMOVE 43 HMCLR 44 CXCLR 64-108 same as 0-44 Playfield positions blue for reversed bit order __________________ | 164 | 165 | 166 | 167 | | 168 | 169 | 170 | 171 | | 172 | 173 | 174 | 175 | | 176 | 177 | 178 | 179 | | 180 | 181 | 182 | 183 | | 184 | 185 | 186 | 187 | | 188 | 189 | 190 | 191 | | 192 | 193 | 194 | 195 | | 196 | 197 | 198 | 199 | | 200 | 201 | 202 | 203 | | 204 | 205 | 206 | 207 | ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ xx 6-bit Address 1.0.bas.bin xx 6-bit Address 1.0.bas checkerboard.bas.bin Checkerboard.bas Quote Link to comment Share on other sites More sharing options...
bogax Posted May 19, 2017 Share Posted May 19, 2017 that's a bug not a feature if you omit the base reference so does bB and DASM (apparently) defaults to 0 I assume it clears a parameter and it stays cleared if you don't change it however, you can include a constant (in this context a variable name is a constant) the variables are in order so eg a[3] is the same location as d 1 Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 19, 2017 Author Share Posted May 19, 2017 that's a bug not a feature Thanks for the information. I couldn't find a reference to this anywhere so thought it was a hack. Is there a list which will tell me where all 255 of them point to? If there are any that are unused then I can use them to store data in and get a couple of extra variables. I've also tried it with different Kernels and the reference numbers change for each. 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.