marioballano / emudore

emudore, a Commodore 64 emulator
Apache License 2.0
303 stars 21 forks source link

Multicolor sprites respecting borders and double height/width #12

Open xlar54 opened 6 years ago

xlar54 commented 6 years ago

I fixed this in my repo, you can just pull from the following functions (rather than pasting them here)

void Vic::draw_mcsprite(int x, int y, int sprite, int row)

and

void Vic::draw_sprite(int x, int y, int sprite, int row)

https://github.com/xlar54/emudore64/blob/master/src/c64/vic.cpp

I have a test program for this, but I cant extract it from the harddrive just yet. But the following pokes may help:

53271 - double height(0 = off for all, 255 = on for all) 53277 - double width (0= off for all, 255 = on for all) 53276 - multicolor sprite mode (0 = off, 255 all on)

capture-double-height-double-width capture-single-height-double-width capture-single-height-single-width

(the color differences are because the test program cycled colors, and my snapshot timings were off)

its pretty much all inclusive at this point, containing the 38 & 24 column code in there, h/v scrolling, and extended background color mode. At some point Ill look into sprite collisions and will update you.

xlar54 commented 6 years ago

the bottom of this page is one of the test programs I used, if it helps:

https://www.c64-wiki.com/wiki/Sprite