Changes

Jump to: navigation, search

Programming:Convert CPC sprites to Plus hardware sprites

72 bytes removed, 01:57, 2 February 2010
;Public Domain
org &82008000
ld b,16 ;loop counter, sprite is 16 lines high
bit 7,a ;does bit 0 equal 1? if so, reset Z
ld b,&1 ;pixel 0, bit 0 = &1
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 3,a ;does bit 0 equal 1? if so, reset Z
ld b,&2 ;pixel 0, bit 1 (%0010) = &2
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 5,a ;does bit 0 equal 1? if so, reset Z
ld b,&4 ;pixel 0, bit 2 (%0100) = &4
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 1,a ;does bit 0 equal 1? if so, reset Z
ld b,&8 ;pixel 0, bit 3 (%1000) = &8
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
call storeit ;store pixel at sprite address
bit 6,a ;does bit 0 equal 1? if so, reset Z
ld b,&1 ;pixel 1, bit 0 (%0001) = &1
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 2,a ;does bit 0 equal 1? if so, reset Z
ld b,&2 ;pixel 1, bit 1 (%0010) = &2
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 4,a ;does bit 0 equal 1? if so, reset Z
ld b,&4 ;pixel 1, bit 2 (%0100) = &4
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
bit 0,a ;does bit 0 equal 1? if so, reset Z
ld b,&8 ;pixel 1, bit 3 (%1000) = &8
call nz,addbit ;and write it out add the bit to sprite memoryour pixel
call storeit ;store pixel at sprite address
244
edits