Page 3 of 3

Posted: Fri Jan 20, 2006 8:48 pm
by tokumaru
lynxsolaris wrote:I will try what you suggested. Just wondering .. what compiler do you use?
Please, don't choose your tools based on my taste, I'm weird. But if you must know, I use Michal Kowalski's 6502 simulator (http://home.pacbell.net/michal_k/6502.html). It's great for larning and debugging. Since I was already so used with it, and since it can export binary data, I didn't bother looking for a more "traditional" compiler. I like that tool very much.

Posted: Fri Jan 20, 2006 11:11 pm
by Celius
By the way, you could just try and switch the incbined files. Instead of:

Code: Select all

.incbin "spr.chr"
.incbin "bkg.chr"
You could try:

Code: Select all

.incbin "bkg.chr"
.incbin "spr.chr"
And did I hear you say they're bigger than 4k each? Then that causes problems. You use YY-CHR? If you use the default file size, then you are using 8k for each one. I hope you know that both parts of the pattern table(sprites/background) have #$FF tiles each, so you can only have 256 tiles for backgrounds, and 256 for sprites. So with that in mind, open a new file in YY-CHR, take the tiles from your BKG data, and copy/paste them into the first half of the new file. Then take your sprites, and copy/paste them into the lower half of your new file, and save it as blah.chr. Then incbin that 1 file into your code instead of those two. If you really want to have your sprites and backgrounds in two 4k files instead of 1 8k, then go download a random hex editor, and start a new file, and put $1000 zeros, and save it as something.chr. Then open that file up with YY-CHR, then do your drawing, and save it as whatever.chr, and you'll have a 4k file. That's what I do when I want a specific .chr size...


EDIT: I read your post a little more, and I wanted to explain something. Since you are using 8k CHR files, you have 256 tiles of either bkg or sprites, and nothing for the other 256 tiles below that. So you can have 8k of data in the pattern tables at a time. When you incbin 2 8k chunks of data into the pattern table, it just incbins one and shuts the other one out. So put your two files into one. Take the data from the sprite one, and copy/paste it into the lower half of your bkg one, and save it. Then they'll both show up.

Posted: Sat Jan 21, 2006 7:48 am
by lynxsolaris
Celius wrote:
EDIT: I read your post a little more, and I wanted to explain something. Since you are using 8k CHR files, you have 256 tiles of either bkg or sprites, and nothing for the other 256 tiles below that. So you can have 8k of data in the pattern tables at a time. When you incbin 2 8k chunks of data into the pattern table, it just incbins one and shuts the other one out. So put your two files into one. Take the data from the sprite one, and copy/paste it into the lower half of your bkg one, and save it. Then they'll both show up.
You're right on. When I put my sprites and bg into the same file everything
showed up nicely. Thanks to you Celius and everyone else here who helped
me get off the ground :)