Jump to content
IGNORED

Access the graphics bank / access batari labels


wallaby

Recommended Posts

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?

Link to comment
Share on other sites

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 by bogax
Link to comment
Share on other sites

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

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