| |
Schema
Registered: May 2005 Posts: 15 |
Combining a charset and bitmap in VIC Bank 0?
Newbieish question here. I'm prefixing a little intro and bitmap before a game, and am unsure where to put everything in memory.
I'd prefer to keep it all in VIC Bank 0, as the game code neatly fits in $4000 onwards. Likewise, if I change VIC banks, then screen memory also moves, but that's where the game code is so writing to it would be bad ;-)
The problem is: I have to put the bitmap between $2000 and $4000, as the VIC sees the default character ROM from $1000-$2000.
So where can I put my custom charset? I'd have the same problem of the VIC seeing the default ROM instead if I put it at $1000 or $1800. $0800 is the intro code, and $0000 is zero page etc.
Surely this has been solved before, but I can't figure out a way to do it. Browsed many threads here, and read the c64codebase articles.
Can this be done?
|
|
| |
enthusi
Registered: May 2004 Posts: 677 |
Usually bank 0 is not used for that very reason ;-)
Why do you need charset AND bitmap anyway?
I mean what do you want to display?
Ifyou have i.e. some logo gfx in charmode you can set up the screen at 0400 (as is) and the charset above 2000.
Or use 0000-0800 non the less but only define and use areas that wont hurt. So if charset is at $0000, dont write/use first, second char ($00,$01) etc...
If it's just for an intro, I'd use bank 3 instead and move your code up again afterwards (if it leaks into $c000....) |
| |
Marauder/GSS Account closed
Registered: Jul 2006 Posts: 224 |
Can't you move your intro-code to $1000 and use the charset at $0800 then? |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Also note that commonly not all of a charset is needed. If you only use uppercase letters ~$200 bytes is usually enough. |
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
You could also put the charset into the bitmap and blank out that portion of the bitmap on the screen. Or use that part of the screen to display a different bank, or the same bank with charset etc.
Or compress the data and uncompress into the place where you need it on demand.
|
| |
Schema
Registered: May 2005 Posts: 15 |
Thanks for all the suggestions. I am only using lower-case, non-reversed chars (it's the world's most boring/minimalist intro screen).
So I ended up putting half the charset at $0C00, and just adc #$80 to all the characters ;-) Works fine. |
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
You could run the text through something so it is stored ORA #$80 already. BTW, why ADC instead of ORA? |
| |
Schema
Registered: May 2005 Posts: 15 |
True, it was just a quick code change to see that it worked, and I just left it. ORA would be more suitable, you're right. |
| |
The Phantom
Registered: Jan 2004 Posts: 360 |
You can use $800-$fff and then do a lda #$12, sta $d018
I often avoid using this area though, it sometimes get's over-written because I'm a very sloppy coder ;)
I typically use:
$0800-$0fff - Sinus/Data/Charset/Sprites
$1000-$1fff - music
$2000-$4711 - multicolor bitmap+screen+colors
$4718-$47ff - scroll text (if small text is required)
$4800-$???? - code
Most of the time I use $0800-$0fff for a cset if using bitmapped graphics and often I use $4800-$4fff for scroll memory. Most of my code starts at $5000, anybody can tell you that... |
| |
Skate
Registered: Jul 2003 Posts: 494 |
you don't have to use bank 0. you can change the order. placing first game datas then intro code+datas in the memory is a better solution i guess.
disable basic and kernal roms, use Bank 2-3 area (something like $b000-$ffff should be enough for your intro) and reserve rest of the memory for the packed game datas. pack everything (packed game datas + intro) with pucrunch. |