wallaby Posted September 17, 2016 Share Posted September 17, 2016 I'm still wrangling with some aspects of DPC+. For example, if I set the player graphics likes this: player0: %1111111 etc. batari will take that information and store it in the graphics bank with a generated label. I don't know what the label will be called ahead of time. So I can't easily assign another sprite that graphics data. However, a label DOES exist, and if I knew what it was, I could easily assign it to other sprites. A work around is to create a data statement with the graphics data: data mysprite %1111111 etc. Now I can assign this data to another sprite. But - the caveat is that the data is stored in whatever bank you define it in and not the graphics bank. Can I explicitly place data in the graphics bank so I don't waste it? Quote Link to comment Share on other sites More sharing options...
wallaby Posted September 17, 2016 Author Share Posted September 17, 2016 It looks like you can access bank 7 in the normal way which is the graphics bank. Hmm. I'll try putting some data sprites there. Quote Link to comment Share on other sites More sharing options...
bogax Posted September 17, 2016 Share Posted September 17, 2016 (edited) edit: oops goofed it, hopefully fixed now.. the sprite data needs to be page aligned it can't cross a page boundary (in the standard kernel, I don't know about DPC+) the sprite data label is the line number of the player statement where it's defined something like playerL032_0 if it's line 32 you can get the label from a list file if you can coax bB/DASM to produce a list file* probably the simplest thing is just to define the player with all the sprite data then read the lo byte of the pointer into a variable and use that then bB will put the sprite data at the end and adjust things so that it doesn't cross a page boundary (but data statements are more flexible in some ways) if you don't want to spend a variable on that, write the pointer lo byte to a screen variable read the number off the screen then incorporate it into your code as a constant (in such a way that it doesn't change the player data location or so that you give it the correct location if you remove a write to the screen that's four bytes to subtract, maybe) *it's a switch somewhere in the make mechanics what dingbat thought it was a good thing to remove that!? it's the most useful thing bB produces second only to the bin Edited September 17, 2016 by bogax Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 17, 2016 Share Posted September 17, 2016 Dunno. Listing are enabled by default in my bB build. In case you missed it wllaby, you can already use the "player#-#:" command to share DPC+ sprite definitions with multiple spites. Quote Link to comment Share on other sites More sharing options...
bogax Posted September 17, 2016 Share Posted September 17, 2016 Dunno. Listing are enabled by default in my bB build. In case you missed it wllaby, you can already use the "player#-#:" command to share DPC+ sprite definitions with multiple spites. to be fair I don't remember if I had to turn on listing in the version I'm using now (which is bB.1.1d.reveng37) and I haven't kept up but I know it was off at one time Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 17, 2016 Share Posted September 17, 2016 If I recall correctly, batari didn't have it enabled, and as a result probably some of my earlier releases. I figured that even if some coders didn't make use of the file, it would make troubleshooting easier. So I enabled it. 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.