Thursday, October 05, 2006

Xeo3: Playing shuffleboard with the C64....

I've been shuffling around the C64 code and data for a couple of reasons really. 1st It means I can use the music as is without having it relocate it, and second buy changing the VIC bank to $4000-$7fff it gives me a few extra sprites. It got me going for a while though until I discovered a bug in my IRQ code which was always setting a bit in the screen address, this meant I could only have screens at $0400 and $0c00 and it took me a while to track down exactly why this was. Vice came to the rescue with a reasonable debugger, although I really wish they would add some basic symbol table support. Being able to put a breakpoint on a label address is a godsend! Anyway, bug fixed, code and data all moved around... and I now have 160 sprite slots, and a few more above the panel.

I also workout out that if I changed the format of the +4 sprite a little, I could squeze in 199 sprites, quite a bit up on the 167 we already have! It depends if I get around it it... its not a huge change as it just involves making a 300 byte xply table and changing the cache pointers from pointers to indexes (theres only 147). But that would save 8 bytes per sprite * 167 sprites... a lot! I hope I get a chance to make the change, although Luca might not thank me, he already has a lot of space to fill!

7 comments:

Anonymous said...

Nah! Are you joking? Bigger space = bigger fun! :D What's the reason for my unhappiness if there would be space for more sprites?

Mike said...

Coz you'll have to think up yet move funny shapes, and then listen to me complain that they don't animate quite right.

Anonymous said...

What a nice doublejob, isn't it?
I learnt: shapes dont animate quite right by default, then we'll see :D

Anonymous said...

VICE *does* support labels. Check out the add_label and load_labels commands. Beware that there's a bug in the newest version though somehow prevents it from showing straight (non-indexed) zeropage labels.

Why not place the VIC bank at $c000 by the way? Hiding sprites or charsets beneath the IO registers relieves you from having to worry too much about memory configurations.

/doynax

Mike said...

Cool, I'll have to try that - I only "really" need labels for breakpoints...

Yeah, I did used to do that. Blood Money has everything under the VIC, but its been so long, I've forgotten how to! *blush* I was also wondering about the character rom, does it appear there, or is it only in bank 0 and 2?

Hell it was long ago....

Anonymous said...

Well, labels are quite comfortable for the code listings. Symbolic debugging, almost..
The real problem is that most assemblers don't output their local labels (which is one of the reasons that I refuse to use anything but opensource assemblers nowadays).

Fortunately the rom charset only appears in bank 0 and 2. So you've got the whole bank to play with :)
One drawback is that the VIC fetches it's graphics from the last byte of the bank in the upper/lower borders, and in bank 3 that's also the high byte of the IRQ vector.

/doynax

Mike said...

Well, its my own assembler and it already outputs symbols... so I can just change the format if I need to :)

Yeah, not a big concern, I dont intend knocking out the borders - and if I was really desprate, I could put a jump in zero page to fix it. I seem to remember putting the chracter set under the VIC in blood money - thats probably the best thing to do....