From dbe729e839d38ad789f2e3a69f9afcf978225202 Mon Sep 17 00:00:00 2001 From: Quinn Dunki Date: Thu, 18 Aug 2016 12:12:11 -0700 Subject: [PATCH] Basic shifted data unrolling working for violet and green --- .gitignore | 1 + HGR.xcodeproj/project.pbxproj | 16 +- HiSprite.py | 86 ++++++---- HiSprite2.py | 157 +++++++++++++++++ V2Make.scpt | Bin 3350 -> 3350 bytes box.png | Bin 177 -> 0 bytes box_grn.png | Bin 0 -> 163 bytes box_mag.png | Bin 0 -> 166 bytes hgrtable.s | 1 + hgrtable2.s | 283 ++++++++++++++++++++++++++++++ hgrtest.dsk | Bin 143360 -> 143360 bytes hgrtest.s | 312 ++++++++++++++++++++++++++++------ scratch.s | 19 +++ spritedata.s => spritedata0.s | 38 +++-- spritedata1.s | 152 +++++++++++++++++ spritegen.s | 143 ---------------- spritegen0.s | 210 +++++++++++++++++++++++ spritegen1.s | 210 +++++++++++++++++++++++ 18 files changed, 1381 insertions(+), 247 deletions(-) create mode 100755 HiSprite2.py delete mode 100644 box.png create mode 100644 box_grn.png create mode 100644 box_mag.png create mode 100644 hgrtable2.s create mode 100644 scratch.s rename spritedata.s => spritedata0.s (89%) create mode 100644 spritedata1.s delete mode 100644 spritegen.s create mode 100644 spritegen0.s create mode 100644 spritegen1.s diff --git a/.gitignore b/.gitignore index b4ec515..383c4ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ HGR.xcodeproj/xcuserdata hgrtest.lst HGR.xcodeproj/project.xcworkspace/xcuserdata/qd.xcuserdatad/UserInterfaceState.xcuserstate +/.DS_Store diff --git a/HGR.xcodeproj/project.pbxproj b/HGR.xcodeproj/project.pbxproj index adf4c4f..c22afbb 100644 --- a/HGR.xcodeproj/project.pbxproj +++ b/HGR.xcodeproj/project.pbxproj @@ -10,8 +10,12 @@ 707005BE1D3EC75F00623A10 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 707005BF1D3EC7FD00623A10 /* hgrtest.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = hgrtest.s; sourceTree = ""; }; 707005C01D3FD65900623A10 /* hgrtable.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = hgrtable.s; sourceTree = ""; }; - 7090ABA91D4012A600F02EAA /* spritedata.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = spritedata.s; sourceTree = ""; }; - 7090ABAA1D407B8100F02EAA /* spritegen.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = spritegen.s; sourceTree = ""; }; + 7090ABA91D4012A600F02EAA /* spritedata0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = spritedata0.s; sourceTree = ""; }; + 7090ABAB1D41663400F02EAA /* scratch.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = scratch.s; sourceTree = ""; }; + 7090ABAC1D418B8900F02EAA /* spritegen0.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = spritegen0.s; sourceTree = ""; }; + 7090ABAD1D418B8900F02EAA /* spritegen1.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = spritegen1.s; sourceTree = ""; }; + 7090ABAE1D419C3E00F02EAA /* spritedata1.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = spritedata1.s; sourceTree = ""; }; + 7090ABAF1D453FDC00F02EAA /* hgrtable2.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = hgrtable2.s; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ @@ -20,9 +24,13 @@ children = ( 707005BE1D3EC75F00623A10 /* Makefile */, 707005BF1D3EC7FD00623A10 /* hgrtest.s */, - 7090ABA91D4012A600F02EAA /* spritedata.s */, - 7090ABAA1D407B8100F02EAA /* spritegen.s */, + 7090ABAB1D41663400F02EAA /* scratch.s */, + 7090ABA91D4012A600F02EAA /* spritedata0.s */, + 7090ABAE1D419C3E00F02EAA /* spritedata1.s */, + 7090ABAC1D418B8900F02EAA /* spritegen0.s */, + 7090ABAD1D418B8900F02EAA /* spritegen1.s */, 707005C01D3FD65900623A10 /* hgrtable.s */, + 7090ABAF1D453FDC00F02EAA /* hgrtable2.s */, ); sourceTree = ""; }; diff --git a/HiSprite.py b/HiSprite.py index 8b50363..c489167 100755 --- a/HiSprite.py +++ b/HiSprite.py @@ -3,7 +3,7 @@ import sys,os,png class Colors: - black,magenta = range(2) + black,magenta,green = range(3) def main(argv): @@ -27,26 +27,37 @@ def main(argv): for shift in range(7): for phase in range(2): - if shift==0 and phase>0: - continue for row in range(height): for col in range(width): - (pixelr,pixelg,pixelb,half) = pixelRemap(pixeldata,row,col,width,shift,phase) + (color,half) = pixelRemap(pixeldata,row,col,width,shift,phase) + bitmap[row][col] = color - if pixelr==255 and pixelg==0 and pixelb==255: - bitmap[row][col] = Colors.magenta - else: - bitmap[row][col] = Colors.black - - spriteNum = max(0,shift*2-1+phase) - printBitmap(bitmap,os.path.splitext(pngfile)[0].upper(),spriteNum,half,0) + spriteNum = shift*2+phase + printBitmap(bitmap,os.path.splitext(pngfile)[0].upper(),spriteNum,half,0,phase) +def pixelColor(pixeldata,row,col): + r = pixeldata[row][col*3] + g = pixeldata[row][col*3+1] + b = pixeldata[row][col*3+2] + color = Colors.black + + if r==255 and g==0 and b==255: + color = Colors.magenta + else: + if r==0 and g==255 and b==0: + color = Colors.green + + return color + + def pixelRemap(pixeldata,row,col,width,shift,phase): halfPixel = 0 overHalf = 0 + + origColor = pixelColor(pixeldata,row,col) if shift>=width: overHalf = 1 @@ -58,37 +69,40 @@ def pixelRemap(pixeldata,row,col,width,shift,phase): col = col+shift else: col = col-(width-shift) + if origColor==Colors.green: + col = col+1 if not overHalf: halfPixel = -1 - if col >= width or col<0: - return (0,0,0,halfPixel) - - r = pixeldata[row][col*3] - g = pixeldata[row][col*3+1] - b = pixeldata[row][col*3+2] - - return (r,g,b,halfPixel) + return (Colors.black,halfPixel) + + remapColor = pixelColor(pixeldata,row,col) + return (remapColor,halfPixel) def colorString(color,currByteString): - if len(currByteString) > 6: - if color==Colors.magenta: - return '1' - else: - return '0' - else: - if color==Colors.magenta: - return '10' + if color==Colors.magenta: + return 'ba' + else: + if color==Colors.green: + return 'ab' return '00' - -def printBitmap(bitmap,label,shift,halfShift,highbit): - print "%s%d:" % (label,shift) + +def containsGreen(row): + for col in range(len(row)): + if row[col] == Colors.green: + return 1 + + return 0 + + +def printBitmap(bitmap,label,spriteNum,halfShift,highbit,phase): + print "%s%d:" % (label,spriteNum) for row in range(len(bitmap)): - byteString = "%d" % highbit + byteString = "" for col in range(len(bitmap[0])): append = colorString(bitmap[row][col],byteString) @@ -99,8 +113,14 @@ def printBitmap(bitmap,label,shift,halfShift,highbit): else: if halfShift<0: byteString = byteString[1:] + "0" - - sys.stdout.write("\t.byte\t%%%s\n" % byteString); + + if len(byteString)>6: + byteString = byteString[:-1] + +# if phase==0: +# byteString = byteString[::-1] + + sys.stdout.write("\t.byte\t%%%d%s\n" % (highbit,byteString)); sys.stdout.write('\n\n') sys.stdout.flush() diff --git a/HiSprite2.py b/HiSprite2.py new file mode 100755 index 0000000..ae92c24 --- /dev/null +++ b/HiSprite2.py @@ -0,0 +1,157 @@ +#!/usr/bin/python + +import sys,os,png + +class Colors: + black,magenta,green = range(3) + + + +def main(argv): + + if len(argv)<1: + printHorzontalLookup() + exit(0) + + pngfile = sys.argv[1] + + reader = png.Reader(pngfile) + try: + pngdata = reader.asRGB8() + except: + usage() + + width = pngdata[0] + height = pngdata[1] + pixeldata = pngdata[2] + + for shift in range(0,7): + + spriteChunks = layoutSpriteChunk(pixeldata,width,height,shift) + + for chunkIndex in range(len(spriteChunks)): + print "%s_SHIFT%d_CHUNK%d:" % (os.path.splitext(pngfile)[0].upper(),shift,chunkIndex) + print spriteChunks[chunkIndex] + + + + +def layoutSpriteChunk(pixeldata,width,height,shift): + + bitmap = [[0 for x in range(width)] for y in range(height)] + + byteWidth = width/2+1 + spriteChunks = ["" for x in range(byteWidth)] + + for row in range(height): + pixelRow = bitmap[row] + bitStream = "" + + for pixelIndex in range(width): + pixel = pixelColor(pixeldata,row,pixelIndex) + if pixel == Colors.black: + bitStream += "00" + else: + if pixel == Colors.green: + bitStream += "01" + else: + bitStream += "10" + + bitStream = shiftStringRight(bitStream,shift) + bitStream = bitStream[:byteWidth*8] + + bitPos = 0 + byteSplits = [0 for x in range(byteWidth)] + + for byteIndex in range(byteWidth): + remainingBits = len(bitStream) - bitPos + + bitChunk = "" + + if remainingBits < 0: + bitChunk = "0000000" + else: + if remainingBits < 7: + bitChunk = bitStream[bitPos:] + bitChunk += fillOutByte(7-remainingBits) + else: + bitChunk = bitStream[bitPos:bitPos+7] + + bitChunk = bitChunk[::-1] + + byteSplits[byteIndex] = "0" + bitChunk + bitPos += 7 + + for chunkIndex in range(len(byteSplits)): + spriteChunks[chunkIndex] += ".byte %%%s\t\n" % byteSplits[chunkIndex] + + return spriteChunks + + + +def fillOutByte(numBits): + filler = "" + for bit in range(numBits): + filler += "0" + + return filler + + +def shiftStringRight(string,shift): + if shift==0: + return string + + shift *=2 + result = "" + + for i in range(shift): + result += "0" + + result += string + return result + + +def pixelColor(pixeldata,row,col): + r = pixeldata[row][col*3] + g = pixeldata[row][col*3+1] + b = pixeldata[row][col*3+2] + color = Colors.black + + if r==255 and g==0 and b==255: + color = Colors.magenta + else: + if r==0 and g==255 and b==0: + color = Colors.green + + return color + + +def printHorzontalLookup(): + print "HGRROWS_GRN:" + for byte in range(40): + pixels = 4 + offset = 0 + if (byte%2): + pixels = 3 + offset = -1 + + for entry in range(pixels): + print "\t.byte $%02x" % (byte + offset) + + print "\nHGRROWS_BITSHIFT_GRN:" + for pixel in range(140): + print "\t.byte $%02x" % ((pixel % 7)*24) + + +def usage(): + print ''' +Usage: HiSprite + +PNG file must not have an alpha channel! +''' + sys.exit(2) + + +if __name__ == "__main__": + main(sys.argv[1:]) + \ No newline at end of file diff --git a/V2Make.scpt b/V2Make.scpt index c669d891ea23dc0b08136b67643d86f9f55712e0..8c107ae3e6b7f103a6bb14ad53dbb9ffe9abd34f 100644 GIT binary patch delta 22 ecmbOxHBD-R1}D?K?~}DS{g^g9-(1BxhZz82_z0T- delta 22 ecmbOxHBD-R1}D>R@yS}8eoSZCH&=1aVFmzGxd#;h diff --git a/box.png b/box.png deleted file mode 100644 index cdbaa4db0820abb403f8c5d63a3ab9b29bdf9378..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^EI`b`!2~1&15bhkI14-?iy0WWg+Z8+Vb&Z8pdfpR zr>`sf19nknExy)AQ(ppwWHUn|N}Tg^b5rw5fLsO!=c3falGGH1^30M91$R&1fE2w{ zcA&Vrr;B3<$Mxht=ReG6WSgNNqRgy3`sf19nkiRhEC9hdqEovY8S|xv6<2KrRD=b5UwyNotBhd1gt5g1e`0K#E=} zJ5XHG)5S4_<9c$+kMj*I|CA+sPCR;2AThC*jY0Yr3+HON9I$RrS3j3^P6`sf19mYnZYATtN^^ihvY8S|xv6<2KrRD=b5UwyNotBhd1gt5g1e`0K#E=} zJ5XH4)5S4_<9hO+^B?9j@;#XIpXdKfi3tprGHxl08BNY}ux1Op=YS0GboFyt=akR{ E02kgVG5`Po literal 0 HcmV?d00001 diff --git a/hgrtable.s b/hgrtable.s index b887925..ae71517 100644 --- a/hgrtable.s +++ b/hgrtable.s @@ -441,3 +441,4 @@ HGRROWS_L: .byte $D0 .byte $D0 + diff --git a/hgrtable2.s b/hgrtable2.s new file mode 100644 index 0000000..467bda5 --- /dev/null +++ b/hgrtable2.s @@ -0,0 +1,283 @@ +HGRROWS_GRN: + .byte $00 + .byte $00 + .byte $00 + .byte $00 + .byte $00 + .byte $00 + .byte $00 + .byte $02 + .byte $02 + .byte $02 + .byte $02 + .byte $02 + .byte $02 + .byte $02 + .byte $04 + .byte $04 + .byte $04 + .byte $04 + .byte $04 + .byte $04 + .byte $04 + .byte $06 + .byte $06 + .byte $06 + .byte $06 + .byte $06 + .byte $06 + .byte $06 + .byte $08 + .byte $08 + .byte $08 + .byte $08 + .byte $08 + .byte $08 + .byte $08 + .byte $0a + .byte $0a + .byte $0a + .byte $0a + .byte $0a + .byte $0a + .byte $0a + .byte $0c + .byte $0c + .byte $0c + .byte $0c + .byte $0c + .byte $0c + .byte $0c + .byte $0e + .byte $0e + .byte $0e + .byte $0e + .byte $0e + .byte $0e + .byte $0e + .byte $10 + .byte $10 + .byte $10 + .byte $10 + .byte $10 + .byte $10 + .byte $10 + .byte $12 + .byte $12 + .byte $12 + .byte $12 + .byte $12 + .byte $12 + .byte $12 + .byte $14 + .byte $14 + .byte $14 + .byte $14 + .byte $14 + .byte $14 + .byte $14 + .byte $16 + .byte $16 + .byte $16 + .byte $16 + .byte $16 + .byte $16 + .byte $16 + .byte $18 + .byte $18 + .byte $18 + .byte $18 + .byte $18 + .byte $18 + .byte $18 + .byte $1a + .byte $1a + .byte $1a + .byte $1a + .byte $1a + .byte $1a + .byte $1a + .byte $1c + .byte $1c + .byte $1c + .byte $1c + .byte $1c + .byte $1c + .byte $1c + .byte $1e + .byte $1e + .byte $1e + .byte $1e + .byte $1e + .byte $1e + .byte $1e + .byte $20 + .byte $20 + .byte $20 + .byte $20 + .byte $20 + .byte $20 + .byte $20 + .byte $22 + .byte $22 + .byte $22 + .byte $22 + .byte $22 + .byte $22 + .byte $22 + .byte $24 + .byte $24 + .byte $24 + .byte $24 + .byte $24 + .byte $24 + .byte $24 + .byte $26 + .byte $26 + .byte $26 + .byte $26 + .byte $26 + .byte $26 + .byte $26 + +HGRROWS_BITSHIFT_GRN: + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 + .byte $00 + .byte $18 + .byte $30 + .byte $48 + .byte $60 + .byte $78 + .byte $90 diff --git a/hgrtest.dsk b/hgrtest.dsk index 6e6c1fa3bd92748b74822efed00bbbd6d247fa12..3a85d9db2de4e58936a734a2b35a8460a967440c 100644 GIT binary patch delta 1333 zcmZp8z|ru4V?#Q(KshUeprRrV1H)s61Q26$Id`XPJqs%X6evJ}r~nv8s3RDJ z!uT*cgar&jn4kbA9sn^XfQthRxM1QAP@n~}k4ZscvZ6r!Wc5&^dYV|Epr8e_7)EPB z9IC|#1yJ#N1`UWyHCQ1&!Wl9+3_#N_p`c;Fz#%|1rG;B5ddN)H49%Dv8ERP%j*)?g zH%PEfRuyQQY!s?K+@cOCQ!q#vcqCLzz)xx6R)Z_*#Gtteo_j8U!K6^ddT4rtW+zBm zWMP8;(jGcqwQiezR})zmdKwVV|8D^VdQVI_k?S;8X5Hnx=kt?Vn+TRB#yv~nuQBqT^I zW81qqDU|~#!jQ_@%DI4DVn!=xe1deho>)!V+6UbDPdUx;{^bi CQOD*0 delta 1685 zcmbVMO-vI(6y8$UT}m*;P;9Hnru;2MK{=>t{J}($1~;*gRzd|_s+FdC@Mc2PUC>S7 zPy{q);4_%<}B% zVTGS98&;}R+S6zc^9m2Ca1|+|(k(H0EDQBN7Z|c77FgUMd@%qgv}cEN|;Pqj9Wi#rs<0 zy2>nsW#PSqHX@2MqBy!YBcgXXs5-o=(>uw4eT(#=ZHK(`jHA;YaD1`2I6A%9#bRf4AXjBQm;&1d`9ABa%0>qcV-YYdIq@BDn1w}26AI{>NA9B$<$0A| zFm2o;(>5l9hwt9mloV)cz!~sgD8%W{(!ysY>9bf^lJ#1+c^6K%+hxJ&Hfh1LB>9}2Y?7Q7 zw!#9OHYy!wTovw`x)YwW+6s!=z5;6tedW56%XvevNTH!mVPL<)!VGB8fMhQDYY(bm z7R52f{y5A`&5nm+ouS#zYcVkdI@=v3sD4Q52cgJV)~VZu)mRezV90gaCjxSPA zD8o=m)MIe~%N=p;5zFAA8(@$bae7-LvDnm-NfmY0!}Cjxz@I7mk^R zFAcSB_{xB?vExLC$&9{T;K>`8R0`&2=y(}v%tikE|U1&F&ryc)plEz>O{#Lkb`68p3taEY~? Oc~7Fj>lG(OQ|dPYV1R)D diff --git a/hgrtest.s b/hgrtest.s index ebeb2fb..df7de68 100644 --- a/hgrtest.s +++ b/hgrtest.s @@ -28,6 +28,18 @@ SCRATCH0 = $19 SCRATCH1 = $1a ; Macros +.macro BLITBYTE xPos,yPos,addr + lda #xPos + sta PARAM0 + lda #yPos + sta PARAM1 + lda #addr + sta PARAM3 + jsr BlitSpriteOnByte +.endmacro + .macro BLIT xPos,yPos,addr lda #xPos sta PARAM0 @@ -55,80 +67,226 @@ loop: lda #$00 jsr LinearFill +.if 1 + ldx #1 + stx PARAM0 + lda #80 + sta PARAM1 + lda #BOX_MAG_SHIFT0_CHUNK0 + sta PARAM3 + jsr BlitSprite + + +.endif +.if 0 + BLITBYTE 0,80,BOX_MAG_SHIFT0_CHUNK0 + BLITBYTE 1,80,BOX_MAG_SHIFT0_CHUNK1 + BLITBYTE 2,80,BOX_MAG_SHIFT0_CHUNK2 + + BLITBYTE 0,90,BOX_MAG_SHIFT1_CHUNK0 + BLITBYTE 1,90,BOX_MAG_SHIFT1_CHUNK1 + BLITBYTE 2,90,BOX_MAG_SHIFT1_CHUNK2 + + BLITBYTE 0,100,BOX_MAG_SHIFT2_CHUNK0 + BLITBYTE 1,100,BOX_MAG_SHIFT2_CHUNK1 + BLITBYTE 2,100,BOX_MAG_SHIFT2_CHUNK2 + + BLITBYTE 0,110,BOX_MAG_SHIFT3_CHUNK0 + BLITBYTE 1,110,BOX_MAG_SHIFT3_CHUNK1 + BLITBYTE 2,110,BOX_MAG_SHIFT3_CHUNK2 + + BLITBYTE 0,120,BOX_MAG_SHIFT4_CHUNK0 + BLITBYTE 1,120,BOX_MAG_SHIFT4_CHUNK1 + BLITBYTE 2,120,BOX_MAG_SHIFT4_CHUNK2 + + BLITBYTE 0,130,BOX_MAG_SHIFT5_CHUNK0 + BLITBYTE 1,130,BOX_MAG_SHIFT5_CHUNK1 + BLITBYTE 2,130,BOX_MAG_SHIFT5_CHUNK2 + + BLITBYTE 0,140,BOX_MAG_SHIFT6_CHUNK0 + BLITBYTE 1,140,BOX_MAG_SHIFT6_CHUNK1 + BLITBYTE 2,140,BOX_MAG_SHIFT6_CHUNK2 + + + + + BLITBYTE 4,80,BOX_GRN_SHIFT0_CHUNK0 + BLITBYTE 5,80,BOX_GRN_SHIFT0_CHUNK1 + BLITBYTE 6,80,BOX_GRN_SHIFT0_CHUNK2 + + BLITBYTE 4,90,BOX_GRN_SHIFT1_CHUNK0 + BLITBYTE 5,90,BOX_GRN_SHIFT1_CHUNK1 + BLITBYTE 6,90,BOX_GRN_SHIFT1_CHUNK2 + + BLITBYTE 4,100,BOX_GRN_SHIFT2_CHUNK0 + BLITBYTE 5,100,BOX_GRN_SHIFT2_CHUNK1 + BLITBYTE 6,100,BOX_GRN_SHIFT2_CHUNK2 + + BLITBYTE 4,110,BOX_GRN_SHIFT3_CHUNK0 + BLITBYTE 5,110,BOX_GRN_SHIFT3_CHUNK1 + BLITBYTE 6,110,BOX_GRN_SHIFT3_CHUNK2 + + BLITBYTE 4,120,BOX_GRN_SHIFT4_CHUNK0 + BLITBYTE 5,120,BOX_GRN_SHIFT4_CHUNK1 + BLITBYTE 6,120,BOX_GRN_SHIFT4_CHUNK2 + + BLITBYTE 4,130,BOX_GRN_SHIFT5_CHUNK0 + BLITBYTE 5,130,BOX_GRN_SHIFT5_CHUNK1 + BLITBYTE 6,130,BOX_GRN_SHIFT5_CHUNK2 + + BLITBYTE 4,140,BOX_GRN_SHIFT6_CHUNK0 + BLITBYTE 5,140,BOX_GRN_SHIFT6_CHUNK1 + BLITBYTE 6,140,BOX_GRN_SHIFT6_CHUNK2 + +.endif + .if 0 - BLIT 20,80,SPRITE0 + BLITBYTE 20,80,MAG0 + BLITBYTE 21,80,MAG1 - BLIT 20,90,SPRITE1 - BLIT 21,90,SPRITE2 + BLITBYTE 20,90,MAG2 + BLITBYTE 21,90,MAG3 - BLIT 20,100,SPRITE3 - BLIT 21,100,SPRITE4 + BLITBYTE 20,100,MAG4 + BLITBYTE 21,100,MAG5 - BLIT 20,110,SPRITE5 - BLIT 21,110,SPRITE6 + BLITBYTE 20,110,MAG6 + BLITBYTE 21,110,MAG7 - BLIT 21,120,SPRITE7 - BLIT 22,120,SPRITE8 + BLITBYTE 21,120,MAG8 + BLITBYTE 22,120,MAG9 - BLIT 21,130,SPRITE9 - BLIT 22,130,SPRITE10 + BLITBYTE 21,130,MAG10 + BLITBYTE 22,130,MAG11 - BLIT 21,140,SPRITE11 - BLIT 22,140,SPRITE12 - - BLIT 22,150,SPRITE0 + BLITBYTE 21,140,MAG12 + BLITBYTE 22,140,MAG13 +.endif + +.if 0 + + BLITBYTE 22,80,GRN0 + BLITBYTE 23,80,GRN1 + + BLITBYTE 22,90,GRN2 + BLITBYTE 23,90,GRN3 + + BLITBYTE 22,100,GRN4 + BLITBYTE 23,100,GRN5 + + BLITBYTE 22,110,GRN6 + BLITBYTE 23,110,GRN7 + + BLITBYTE 23,120,GRN8 + BLITBYTE 24,120,GRN9 + + BLITBYTE 23,130,GRN10 + BLITBYTE 24,130,GRN11 + + BLITBYTE 23,140,GRN12 + BLITBYTE 24,140,GRN13 +.endif + + +.if 0 + BLITBYTE 20,80,BOX_MAG0 + BLITBYTE 21,80,BOX_MAG1 + + BLITBYTE 20,90,BOX_MAG2 + BLITBYTE 21,90,BOX_MAG3 + + BLITBYTE 20,100,BOX_MAG4 + BLITBYTE 21,100,BOX_MAG5 + + BLITBYTE 20,110,BOX_MAG6 + BLITBYTE 21,110,BOX_MAG7 + + BLITBYTE 21,120,BOX_MAG8 + BLITBYTE 22,120,BOX_MAG9 + + BLITBYTE 21,130,BOX_MAG10 + BLITBYTE 22,130,BOX_MAG11 + + BLITBYTE 21,140,BOX_MAG12 + BLITBYTE 22,140,BOX_MAG13 +.endif + +.if 0 + BLITBYTE 20,80,BOX_GRN0 + + BLITBYTE 20,90,BOX_GRN1 + BLITBYTE 21,90,BOX_GRN2 + + BLITBYTE 20,100,BOX_GRN3 + BLITBYTE 21,100,BOX_GRN4 + + BLITBYTE 20,110,BOX_GRN5 + BLITBYTE 21,110,BOX_GRN6 + + BLITBYTE 21,120,BOX_GRN7 + BLITBYTE 22,120,BOX_GRN8 + + BLITBYTE 21,130,BOX_GRN9 + BLITBYTE 22,130,BOX_GRN10 + + BLITBYTE 21,140,BOX_GRN11 + BLITBYTE 22,140,BOX_GRN12 .endif -;rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - BLIT 20,80,BOX0 +.if 0 + BLITBYTE 20,80,BOX0 WAIT - BLIT 20,80,BLACK + BLITBYTE 20,80,BLACK - BLIT 20,80,BOX1 - BLIT 21,80,BOX2 + BLITBYTE 20,80,BOX1 + BLITBYTE 21,80,BOX2 WAIT - BLIT 20,80,BLACK - BLIT 21,80,BLACK + BLITBYTE 20,80,BLACK + BLITBYTE 21,80,BLACK - BLIT 20,80,BOX3 - BLIT 21,80,BOX4 + BLITBYTE 20,80,BOX3 + BLITBYTE 21,80,BOX4 WAIT - BLIT 20,80,BLACK - BLIT 21,80,BLACK + BLITBYTE 20,80,BLACK + BLITBYTE 21,80,BLACK - BLIT 20,80,BOX5 - BLIT 21,80,BOX6 + BLITBYTE 20,80,BOX5 + BLITBYTE 21,80,BOX6 WAIT - BLIT 20,80,BLACK - BLIT 21,80,BLACK + BLITBYTE 20,80,BLACK + BLITBYTE 21,80,BLACK - BLIT 21,80,BOX7 - BLIT 22,80,BOX8 + BLITBYTE 21,80,BOX7 + BLITBYTE 22,80,BOX8 WAIT - BLIT 21,80,BLACK - BLIT 22,80,BLACK + BLITBYTE 21,80,BLACK + BLITBYTE 22,80,BLACK - BLIT 21,80,BOX9 - BLIT 22,80,BOX10 + BLITBYTE 21,80,BOX9 + BLITBYTE 22,80,BOX10 WAIT - BLIT 21,80,BLACK - BLIT 22,80,BLACK + BLITBYTE 21,80,BLACK + BLITBYTE 22,80,BLACK - BLIT 21,80,BOX11 - BLIT 22,80,BOX12 + BLITBYTE 21,80,BOX11 + BLITBYTE 22,80,BOX12 WAIT - BLIT 21,80,BLACK - BLIT 22,80,BLACK + BLITBYTE 21,80,BLACK + BLITBYTE 22,80,BLACK - BLIT 22,80,BOX0 + BLITBYTE 22,80,BOX0 WAIT - BLIT 22,80,BLACK + BLITBYTE 22,80,BLACK jmp loop +.endif + + rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -136,30 +294,75 @@ loop: ; Trashes everything ; PARAM0: X Pos ; PARAM1: Y Pos -; PARAM2: Sprite Ptr MSB -; PARAM3: Sprite Ptr LSB +; PARAM2: Sprite Ptr LSB +; PARAM3: Sprite Ptr MSB ; BlitSprite: + clc ; Compute sprite data base + ldx PARAM0 + lda HGRROWS_BITSHIFT_GRN,x + adc PARAM2 + sta PARAM2 + lda #0 + adc PARAM3 + sta PARAM3 + ldy #7 blitSprite_loop: - clc + clc ; Calculate Y line tya - adc PARAM1 ; Calculate Y line + adc PARAM1 tax lda HGRROWS_H,x ; Compute hires row - sta blitSprite_smc+2 + sta blitSprite_smc+2 ; Self-modifying code lda HGRROWS_L,x sta blitSprite_smc+1 - ldx PARAM0 ; Compute hires column + ldx PARAM0 ; Compute hires horizontal byte + lda HGRROWS_GRN,x + tax + lda (PARAM2),y blitSprite_smc: sta $2000,x dey bpl blitSprite_loop + + rts + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; BlitSpriteOnByte +; Trashes everything +; PARAM0: X Byte +; PARAM1: Y Pos +; PARAM2: Sprite Ptr MSB +; PARAM3: Sprite Ptr LSB +; +BlitSpriteOnByte: + ldy #7 + +blitSpriteOnByte_loop: + clc + tya + adc PARAM1 ; Calculate Y line + tax + + lda HGRROWS_H,x ; Compute hires row + sta blitSpriteOnByte_smc+2 + lda HGRROWS_L,x + sta blitSpriteOnByte_smc+1 + + ldx PARAM0 ; Compute hires column + lda (PARAM2),y + +blitSpriteOnByte_smc: + sta $2000,x + dey + bpl blitSpriteOnByte_loop rts @@ -221,8 +424,11 @@ venetianFill_inner: .include "hgrtable.s" -.include "spritedata.s" -.include "spritegen.s" +.include "hgrtable2.s" +.include "spritedata0.s" +.include "spritedata1.s" +.include "spritegen0.s" +.include "spritegen1.s" ; Suppress some linker warnings - Must be the last thing in the file diff --git a/scratch.s b/scratch.s new file mode 100644 index 0000000..4623d61 --- /dev/null +++ b/scratch.s @@ -0,0 +1,19 @@ +BOX0: + .byte %00101010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00101010 + +BOX1: + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 diff --git a/spritedata.s b/spritedata0.s similarity index 89% rename from spritedata.s rename to spritedata0.s index 86dd8e7..e62f8dc 100644 --- a/spritedata.s +++ b/spritedata0.s @@ -5,17 +5,27 @@ ; Copyright (c) 2015 One Girl, One Laptop Productions. All rights reserved. ; -SPRITE0: +MAG0: .byte %01010101 ; Byte aligned .byte %01000001 ; (reversed) .byte %01000001 - .byte %01000001 + .byte %01000001 ;;;;;;;;;;;;;;;;;;;; .byte %01000001 .byte %01000001 .byte %01000001 .byte %01010101 -SPRITE1: +MAG1: + .byte %00000000 ; Byte aligned + .byte %00000000 ; (2nd byte, reversed) + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + +MAG2: .byte %01010100 ; One pixel shift .byte %00000100 ; (reversed) .byte %00000100 @@ -25,7 +35,7 @@ SPRITE1: .byte %00000100 .byte %01010100 -SPRITE2: +MAG3: .byte %00000010 ; One pixel shift .byte %00000010 ; (2nd byte, reversed) .byte %00000010 @@ -36,7 +46,7 @@ SPRITE2: .byte %00000010 -SPRITE3: +MAG4: .byte %01010000 ; Two pixel shift .byte %00010000 ; (reversed) .byte %00010000 @@ -46,7 +56,7 @@ SPRITE3: .byte %00010000 .byte %01010000 -SPRITE4: +MAG5: .byte %00001010 ; Two pixel shift .byte %00001000 ; (2nd byte, reversed) .byte %00001000 @@ -57,7 +67,7 @@ SPRITE4: .byte %00001010 -SPRITE5: +MAG6: .byte %01000000 ; Three pixel shift .byte %01000000 ; (reversed) .byte %01000000 @@ -67,7 +77,7 @@ SPRITE5: .byte %01000000 .byte %01000000 -SPRITE6: +MAG7: .byte %00101010 ; Three pixel shift .byte %00100000 ; (2nd byte, reversed) .byte %00100000 @@ -78,7 +88,7 @@ SPRITE6: .byte %00101010 -SPRITE7: +MAG8: .byte %00101010 ; Four pixel shift .byte %00000010 ; (reversed) .byte %00000010 @@ -88,7 +98,7 @@ SPRITE7: .byte %00000010 .byte %00101010 -SPRITE8: +MAG9: .byte %00000001 ; Four pixel shift .byte %00000001 ; (2nd byte, reversed) .byte %00000001 @@ -99,7 +109,7 @@ SPRITE8: .byte %00000001 -SPRITE9: +MAG10: .byte %00101000 ; Five pixel shift .byte %00001000 ; (reversed) .byte %00001000 @@ -109,7 +119,7 @@ SPRITE9: .byte %00001000 .byte %00101000 -SPRITE10: +MAG11: .byte %00000101 ; Five pixel shift .byte %00000100 ; (2nd byte, reversed) .byte %00000100 @@ -120,7 +130,7 @@ SPRITE10: .byte %00000101 -SPRITE11: +MAG12: .byte %00100000 ; Six pixel shift .byte %00100000 ; (2nd byte, reversed) .byte %00100000 @@ -130,7 +140,7 @@ SPRITE11: .byte %00100000 .byte %00100000 -SPRITE12: +MAG13: .byte %00010101 ; Six pixel shift .byte %00010000 ; (reversed) .byte %00010000 diff --git a/spritedata1.s b/spritedata1.s new file mode 100644 index 0000000..a7953b2 --- /dev/null +++ b/spritedata1.s @@ -0,0 +1,152 @@ +; +; spritedata.s +; +; Created by Quinn Dunki on 7/19/16 +; Copyright (c) 2015 One Girl, One Laptop Productions. All rights reserved. +; + +GRN0: + .byte %00101010 ; Byte aligned + .byte %00000010 ; (reversed) + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00101010 + +GRN1: + .byte %00000001 ; Byte aligned + .byte %00000001 ; (2nd byte, reversed) + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + .byte %00000001 + +GRN2: + .byte %00101000 ; One pixel shift + .byte %00001000 ; (reversed) + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00101000 + +GRN3: + .byte %00000101 ; One pixel shift + .byte %00000100 ; (2nd byte, reversed) + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %00000101 + + +GRN4: + .byte %00100000 ; Two pixel shift + .byte %00100000 ; (reversed) + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00100000 + +GRN5: + .byte %00010101 ; Two pixel shift + .byte %00010000 ; (2nd byte, reversed) + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %00010101 + + +GRN6: + .byte %00000000 ; Three pixel shift + .byte %00000000 ; (reversed) + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + .byte %00000000 + +GRN7: + .byte %01010101 ; Three pixel shift + .byte %01000001 ; (2nd byte, reversed) + .byte %01000001 + .byte %01000001 ;;;;;;;;;;;;;;;;;;;; + .byte %01000001 + .byte %01000001 + .byte %01000001 + .byte %01010101 + + +GRN8: + .byte %01010100 ; Four pixel shift + .byte %00000100 ; (reversed) + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %00000100 + .byte %01010100 + +GRN9: + .byte %00000010 ; Four pixel shift + .byte %00000010 ; (2nd byte, reversed) + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + .byte %00000010 + + +GRN10: + .byte %01010000 ; Five pixel shift + .byte %00010000 ; (reversed) + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %00010000 + .byte %01010000 + +GRN11: + .byte %00001010 ; Five pixel shift + .byte %00001000 ; (2nd byte, reversed) + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00001000 + .byte %00001010 + + +GRN12: + .byte %01000000 ; Six pixel shift + .byte %01000000 ; (2nd byte, reversed) + .byte %01000000 + .byte %01000000 + .byte %01000000 + .byte %01000000 + .byte %01000000 + .byte %01000000 + +GRN13: + .byte %00101010 ; Six pixel shift + .byte %00100000 ; (reversed) + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00100000 + .byte %00101010 + diff --git a/spritegen.s b/spritegen.s deleted file mode 100644 index cac9602..0000000 --- a/spritegen.s +++ /dev/null @@ -1,143 +0,0 @@ -BOX0: - .byte %01010101 - .byte %01010001 - .byte %01000101 - .byte %01010001 - .byte %01000101 - .byte %01010001 - .byte %01000101 - .byte %01010101 - - -BOX1: - .byte %01010100 - .byte %01000100 - .byte %00010100 - .byte %01000100 - .byte %00010100 - .byte %01000100 - .byte %00010100 - .byte %01010100 - - -BOX2: - .byte %00000010 - .byte %00000010 - .byte %00000010 - .byte %00000010 - .byte %00000010 - .byte %00000010 - .byte %00000010 - .byte %00000010 - - -BOX3: - .byte %01010000 - .byte %00010000 - .byte %01010000 - .byte %00010000 - .byte %01010000 - .byte %00010000 - .byte %01010000 - .byte %01010000 - - -BOX4: - .byte %00001010 - .byte %00001010 - .byte %00001000 - .byte %00001010 - .byte %00001000 - .byte %00001010 - .byte %00001000 - .byte %00001010 - - -BOX5: - .byte %01000000 - .byte %01000000 - .byte %01000000 - .byte %01000000 - .byte %01000000 - .byte %01000000 - .byte %01000000 - .byte %01000000 - - -BOX6: - .byte %00101010 - .byte %00101000 - .byte %00100010 - .byte %00101000 - .byte %00100010 - .byte %00101000 - .byte %00100010 - .byte %00101010 - - -BOX7: - .byte %00101010 - .byte %00100010 - .byte %00001010 - .byte %00100010 - .byte %00001010 - .byte %00100010 - .byte %00001010 - .byte %00101010 - - -BOX8: - .byte %00000001 - .byte %00000001 - .byte %00000001 - .byte %00000001 - .byte %00000001 - .byte %00000001 - .byte %00000001 - .byte %00000001 - - -BOX9: - .byte %00101000 - .byte %00001000 - .byte %00101000 - .byte %00001000 - .byte %00101000 - .byte %00001000 - .byte %00101000 - .byte %00101000 - - -BOX10: - .byte %00000101 - .byte %00000101 - .byte %00000100 - .byte %00000101 - .byte %00000100 - .byte %00000101 - .byte %00000100 - .byte %00000101 - - -BOX11: - .byte %00100000 - .byte %00100000 - .byte %00100000 - .byte %00100000 - .byte %00100000 - .byte %00100000 - .byte %00100000 - .byte %00100000 - - -BOX12: - .byte %00010101 - .byte %00010100 - .byte %00010001 - .byte %00010100 - .byte %00010001 - .byte %00010100 - .byte %00010001 - .byte %00010101 - - diff --git a/spritegen0.s b/spritegen0.s new file mode 100644 index 0000000..dd0f57e --- /dev/null +++ b/spritegen0.s @@ -0,0 +1,210 @@ +BOX_MAG_SHIFT0_CHUNK0: +.byte %01010101 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01010101 + +BOX_MAG_SHIFT0_CHUNK1: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT0_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT1_CHUNK0: +.byte %01010100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %01010100 + +BOX_MAG_SHIFT1_CHUNK1: +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 + +BOX_MAG_SHIFT1_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT2_CHUNK0: +.byte %01010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %01010000 + +BOX_MAG_SHIFT2_CHUNK1: +.byte %00001010 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001010 + +BOX_MAG_SHIFT2_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT3_CHUNK0: +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 + +BOX_MAG_SHIFT3_CHUNK1: +.byte %00101010 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00101010 + +BOX_MAG_SHIFT3_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT4_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT4_CHUNK1: +.byte %00101010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00101010 + +BOX_MAG_SHIFT4_CHUNK2: +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 + +BOX_MAG_SHIFT5_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT5_CHUNK1: +.byte %00101000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00101000 + +BOX_MAG_SHIFT5_CHUNK2: +.byte %00000101 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000101 + +BOX_MAG_SHIFT6_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_MAG_SHIFT6_CHUNK1: +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 + +BOX_MAG_SHIFT6_CHUNK2: +.byte %00010101 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010101 + diff --git a/spritegen1.s b/spritegen1.s new file mode 100644 index 0000000..161ec0a --- /dev/null +++ b/spritegen1.s @@ -0,0 +1,210 @@ +BOX_GRN_SHIFT0_CHUNK0: +.byte %00101010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00101010 + +BOX_GRN_SHIFT0_CHUNK1: +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 +.byte %00000001 + +BOX_GRN_SHIFT0_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT1_CHUNK0: +.byte %00101000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00101000 + +BOX_GRN_SHIFT1_CHUNK1: +.byte %00000101 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000101 + +BOX_GRN_SHIFT1_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT2_CHUNK0: +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 + +BOX_GRN_SHIFT2_CHUNK1: +.byte %00010101 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010101 + +BOX_GRN_SHIFT2_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT3_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT3_CHUNK1: +.byte %01010101 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01000001 +.byte %01010101 + +BOX_GRN_SHIFT3_CHUNK2: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT4_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT4_CHUNK1: +.byte %01010100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %00000100 +.byte %01010100 + +BOX_GRN_SHIFT4_CHUNK2: +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 +.byte %00000010 + +BOX_GRN_SHIFT5_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT5_CHUNK1: +.byte %01010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %00010000 +.byte %01010000 + +BOX_GRN_SHIFT5_CHUNK2: +.byte %00001010 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001000 +.byte %00001010 + +BOX_GRN_SHIFT6_CHUNK0: +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 +.byte %00000000 + +BOX_GRN_SHIFT6_CHUNK1: +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 +.byte %01000000 + +BOX_GRN_SHIFT6_CHUNK2: +.byte %00101010 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00100000 +.byte %00101010 +