From 25916c1c7443bc5dc19e06f117eb82df94f5bb0c Mon Sep 17 00:00:00 2001 From: blondie7575 Date: Sat, 7 Oct 2017 15:00:40 -0700 Subject: [PATCH] Much refinment to Mr.Sprite-based art pipeline --- Art/block1_002.txt | 136 ------- Art/block_001.txt | 136 ------- Art/cat_000.txt | 215 ---------- Art/spritebankSrc.txt | 15 - GSCats.xcodeproj/project.pbxproj | 2 + Makefile | 22 +- MerlinToCA65.sh | 33 ++ Art/spritebank00.bin => SpriteBank00.bin | Bin Sprites/block1_002.s | 124 ------ Sprites/block_001.s | 124 ------ Sprites/cat_000.s | 219 ----------- config_ca65.txt | 11 - gamemanager.s | 2 +- gscats.2mg | Bin 819264 -> 819264 bytes spritebank.s | 35 +- spritebank_other.s | 17 - sprites.lst | 481 ----------------------- sprites.o | Bin 3726 -> 0 bytes 18 files changed, 68 insertions(+), 1504 deletions(-) delete mode 100644 Art/block1_002.txt delete mode 100644 Art/block_001.txt delete mode 100644 Art/cat_000.txt delete mode 100644 Art/spritebankSrc.txt create mode 100755 MerlinToCA65.sh rename Art/spritebank00.bin => SpriteBank00.bin (100%) delete mode 100644 Sprites/block1_002.s delete mode 100644 Sprites/block_001.s delete mode 100644 Sprites/cat_000.s delete mode 100644 config_ca65.txt delete mode 100644 spritebank_other.s delete mode 100644 sprites.lst delete mode 100644 sprites.o diff --git a/Art/block1_002.txt b/Art/block1_002.txt deleted file mode 100644 index 69573a7..0000000 --- a/Art/block1_002.txt +++ /dev/null @@ -1,136 +0,0 @@ -Spr_002: - clc ; 16x16, 185 bytes, 439 cycles - sei ; Disable Interrupts - phd ; Backup Direct Page - tsc ; Backup Stack - sta StackAddress - ldal $e1c068 ; Direct Page and Stack in Bank 01/ - ora #$0030 - stal $e1c068 - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$6666 ; Pattern #1 : 112 -*---------- - tsc - adc #$0007 - tcs - phx - phx - phx - phx - tsc ; Line 1 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 2 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 3 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 4 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 5 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 6 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 7 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 8 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 9 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 10 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 11 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 12 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 13 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 14 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 15 - adc #$00A8 - tcs - phx - phx - phx - phx -*---------- - ldal $e1C068 ; Direct Page and Stack in Bank 00/ - and #$ffcf - stal $e1c068 - lda StackAddress ; Restore Stack - tcs - pld ; Restore Direct Page - cli ; Enable Interrupts - rtl - -*---------- diff --git a/Art/block_001.txt b/Art/block_001.txt deleted file mode 100644 index 4bb4ccf..0000000 --- a/Art/block_001.txt +++ /dev/null @@ -1,136 +0,0 @@ -Spr_001: - clc ; 16x16, 185 bytes, 439 cycles - sei ; Disable Interrupts - phd ; Backup Direct Page - tsc ; Backup Stack - sta StackAddress - ldal $e1c068 ; Direct Page and Stack in Bank 01/ - ora #$0030 - stal $e1c068 - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$FFFF ; Pattern #1 : 112 -*---------- - tsc - adc #$0007 - tcs - phx - phx - phx - phx - tsc ; Line 1 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 2 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 3 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 4 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 5 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 6 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 7 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 8 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 9 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 10 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 11 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 12 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 13 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 14 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 15 - adc #$00A8 - tcs - phx - phx - phx - phx -*---------- - ldal $e1C068 ; Direct Page and Stack in Bank 00/ - and #$ffcf - stal $e1c068 - lda StackAddress ; Restore Stack - tcs - pld ; Restore Direct Page - cli ; Enable Interrupts - rtl - -*---------- diff --git a/Art/cat_000.txt b/Art/cat_000.txt deleted file mode 100644 index d24ac6f..0000000 --- a/Art/cat_000.txt +++ /dev/null @@ -1,215 +0,0 @@ -Spr_000: - clc ; 16x16, 455 bytes, 716 cycles - sei ; Disable Interrupts - phd ; Backup Direct Page - tsc ; Backup Stack - sta StackAddress - ldal $e1c068 ; Direct Page and Stack in Bank 01/ - ora #$0030 - stal $e1c068 - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$4444 ; Pattern #1 : 4 - ldy #$0444 ; Pattern #2 : 2 - lda #$4004 ; Pattern #3 : 2 - tcd -*---------- - lda #$2633 ; Line 0 - sta $A5,S - lda $A3,S - and #$F000 - ora #$0226 - sta $A3,S - sep #$20 - lda $03,S - and #$F0 - ora #$03 - sta $03,S - lda $06,S - and #$F0 - ora #$03 - sta $06,S - lda $A7,S - and #$0F - ora #$20 - sta $A7,S - rep #$30 - tsc ; Line 2 - adc #$0140 - tcs - sep #$20 - lda #$FF - sta $00,S - sta $A0,S - lda $07,S - and #$0F - ora #$20 - sta $07,S - lda $A7,S - and #$0F - ora #$20 - sta $A7,S - rep #$30 - tsc - adc #$0006 - tcs - pea $3533 - pea $2425 - tsc ; Line 3 - adc #$00A4 - tcs - sep #$20 - lda #$23 - sta $9A,S - lda $A1,S - and #$0F - ora #$30 - sta $A1,S - rep #$30 - pea $3434 - pea $4423 - tsc ; Line 4 - adc #$00A4 - tcs - lda $9C,S - and #$00F0 - ora #$2303 - sta $9C,S - sep #$20 - lda #$24 - sta $9A,S - rep #$30 - phx - pea $4434 - tsc ; Line 5 - adc #$00A5 - tcs - sep #$20 - lda #$24 - sta $99,S - lda $A0,S - and #$0F - ora #$30 - sta $A0,S - rep #$30 - pea $2340 - phy - tsc ; Line 6 - adc #$00A3 - tcs - phd - pea $4433 - tsc ; Line 7 - adc #$00A5 - tcs - sep #$20 - lda $99,S - and #$F0 - ora #$03 - sta $99,S - rep #$30 - pea $236F - pea $F64F - pea $2233 - pea $3324 - tsc ; Line 8 - adc #$00A7 - tcs - lda $9F,S - and #$0F00 - ora #$3022 - sta $9F,S - sep #$20 - lda $9A,S - and #$F0 - ora #$03 - sta $9A,S - rep #$30 - pea $F2FF - pea $2333 - pea $3444 - tsc ; Line 9 - adc #$00A4 - tcs - txa - sta $9E,S - lda $9C,S - and #$00F0 - ora #$4403 - sta $9C,S - lda $A0,S - and #$0F00 - ora #$F03F - sta $A0,S - pea $FF43 - phx - tsc ; Line 11 - adc #$0140 - tcs - lda #$4434 - sta $02,S - lda #$2322 - sta $A2,S - lda $00,S - and #$00F0 - ora #$4403 - sta $00,S - lda $04,S - and #$0F00 - ora #$F043 - sta $04,S - lda $A0,S - and #$00F0 - ora #$4303 - sta $A0,S - lda $A4,S - and #$0F00 - ora #$3044 - sta $A4,S - tsc ; Line 13 - adc #$0140 - tcs - lda $00,S - and #$00F0 - ora #$3204 - sta $00,S - lda $03,S - and #$00F0 - ora #$4203 - sta $03,S - lda $A0,S - and #$00F0 - ora #$3203 - sta $A0,S - lda $A3,S - and #$00F0 - ora #$3203 - sta $A3,S - sep #$20 - lda $05,S - and #$0F - ora #$30 - sta $05,S - rep #$30 - tsc ; Line 15 - adc #$0140 - tcs - lda $00,S - and #$00F0 - ora #$F30F - sta $00,S - lda $03,S - and #$00F0 - ora #$F30F - sta $03,S -*---------- - ldal $e1C068 ; Direct Page and Stack in Bank 00/ - and #$ffcf - stal $e1c068 - lda StackAddress ; Restore Stack - tcs - pld ; Restore Direct Page - cli ; Enable Interrupts - rtl - -*---------- diff --git a/Art/spritebankSrc.txt b/Art/spritebankSrc.txt deleted file mode 100644 index 224bddf..0000000 --- a/Art/spritebankSrc.txt +++ /dev/null @@ -1,15 +0,0 @@ -Drawspritebank ASL ; A=Sprite Number ($0000-$0002) - TAX ; Y=Target Screen Address ($2000-$9D00) - LDA spritebankNum,X ; Relative Sprite Number Table - JMP (spritebankBank,X) ; Bank Number Table - -spritebankNum HEX 0000,0200,0100 - -spritebankBank DA spritebankBank00,spritebankBank00,spritebankBank00 - -spritebankBank00 JSL $AA0000 - PHK - PLB - RTS - -*---------- diff --git a/GSCats.xcodeproj/project.pbxproj b/GSCats.xcodeproj/project.pbxproj index 34868c2..099a370 100644 --- a/GSCats.xcodeproj/project.pbxproj +++ b/GSCats.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 70E9D8631F2BD95400555C19 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 70F0869F1F413A89002446C3 /* player.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = player.s; sourceTree = ""; }; 70F086A01F4230CB002446C3 /* utility.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = utility.s; sourceTree = ""; }; + 70FE79D21F8814A600E0095C /* MerlinToCA65.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = MerlinToCA65.sh; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ @@ -54,6 +55,7 @@ 70E554C41F807ADB00F3C871 /* spritebank.s */, 70E9D8611F2BD95400555C19 /* gscats.s */, 70E9D8631F2BD95400555C19 /* Makefile */, + 70FE79D21F8814A600E0095C /* MerlinToCA65.sh */, 7088096D1F2ECE8D00D4C950 /* GenerateRenderSpans.py */, 7059502B1F37A0BE00BBE90F /* GenerateVRAMTable.py */, 7099E3851F4107B100182A82 /* GenerateVRAMYOffset.py */, diff --git a/Makefile b/Makefile index 277240d..d433dca 100644 --- a/Makefile +++ b/Makefile @@ -14,18 +14,19 @@ AC=AppleCommander.jar ADDR=800 PGM=gscats -MRSPRITE=../MrSprite/mrsprite CODE +MRSPRITE=../MrSprite/mrsprite PALETTE=00ff00 000000 ffff00 886611 cc9933 eebb44 dd6666 ff99aa 00ff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffffff +SPRITES=SpriteBank -all: loader $(PGM) +all: $(PGM) loader $(PGM): @PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh --cpu 65816 --start-addr 0000 -l$(PGM).lst $(PGM).s java -jar $(AC) -d $(PGM).2mg CODEBANK java -jar $(AC) -p $(PGM).2mg CODEBANK BIN 0x0000 < $(PGM) - java -jar $(AC) -d $(PGM).2mg SPRITEBANK00 - java -jar $(AC) -p $(PGM).2mg SPRITEBANK00 BIN 0x0000 < Art/spritebank00.bin + java -jar $(AC) -d $(PGM).2mg $(SPRITES)00 + java -jar $(AC) -p $(PGM).2mg $(SPRITES)00 BIN 0x0000 < $(SPRITES)00.bin rm -f $(PGM) rm -f $(PGM).o osascript V2Make.scpt $(PROJECT_DIR) $(PGM) @@ -45,9 +46,10 @@ clean: .PHONY: art art: - $(MRSPRITE) "Art/*.gif" $(PALETTE) - mv Art/*.s Sprites - @PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh --cpu 65816 --start-addr $(ADDR) -lspritebank.lst spritebank.s - java -jar $(AC) -p $(PGM).2mg spritebank BIN 0x$(ADDR) < spritebank - rm -f spritebank - rm -f spritebank.o + $(MRSPRITE) CODE "Art/*.gif" $(PALETTE) + $(MRSPRITE) BANK "Art/*.txt" $(SPRITES) + mv Art/$(SPRITES)00.bin . + ./MerlinToCA65.sh Art/$(SPRITES)Src.txt > spritebank.s + rm Art/*.txt + java -jar $(AC) -d $(PGM).2mg $(SPRITES)00 + java -jar $(AC) -p $(PGM).2mg $(SPRITES)00 BIN 0x0000 < $(SPRITES)00.bin diff --git a/MerlinToCA65.sh b/MerlinToCA65.sh new file mode 100755 index 0000000..d2e605d --- /dev/null +++ b/MerlinToCA65.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env awk -f +BEGIN { + FS="\t"; + print "; Autogenerated by Mr. Sprite. Do not modify\n\n" +} +{ + if ($2 == "DA") + { + $2 = ".addr" + } + else if ($2 == "HEX") + { + $2 = ".dbyt" + } +} +{ + if ($1 != "") + { + first = substr($1,0,1); + if (first == "*") + { + print ";----------","\t",$2,"\t",$3,"\t",$4; + } + else + { + print $1,":\n","\t",$2,"\t",$3,"\t",$4; + } + } + else + { + print "\t",$1,"\t",$2,"\t",$3,"\t",$4; + } +} diff --git a/Art/spritebank00.bin b/SpriteBank00.bin similarity index 100% rename from Art/spritebank00.bin rename to SpriteBank00.bin diff --git a/Sprites/block1_002.s b/Sprites/block1_002.s deleted file mode 100644 index ee1ecde..0000000 --- a/Sprites/block1_002.s +++ /dev/null @@ -1,124 +0,0 @@ -Spr_002: - FASTGRAPHICS ; 16x16, 175 bytes, 470 cycles - clc - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$6666 ; Pattern #1 : 112 -;-- - tsc - adc #$0007 - tcs - phx - phx - phx - phx - tsc ; Line 1 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 2 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 3 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 4 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 5 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 6 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 7 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 8 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 9 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 10 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 11 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 12 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 13 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 14 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 15 - adc #$00A8 - tcs - phx - phx - phx - phx -;-- -SLOWGRAPHICS - rts - -;------------------------------ diff --git a/Sprites/block_001.s b/Sprites/block_001.s deleted file mode 100644 index b1bff71..0000000 --- a/Sprites/block_001.s +++ /dev/null @@ -1,124 +0,0 @@ -Spr_001: - FASTGRAPHICS ; 16x16, 175 bytes, 470 cycles - clc - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$FFFF ; Pattern #1 : 112 -;-- - tsc - adc #$0007 - tcs - phx - phx - phx - phx - tsc ; Line 1 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 2 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 3 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 4 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 5 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 6 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 7 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 8 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 9 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 10 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 11 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 12 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 13 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 14 - adc #$00A8 - tcs - phx - phx - phx - phx - tsc ; Line 15 - adc #$00A8 - tcs - phx - phx - phx - phx -;-- -SLOWGRAPHICS - rts - -;------------------------------ diff --git a/Sprites/cat_000.s b/Sprites/cat_000.s deleted file mode 100644 index f3f8033..0000000 --- a/Sprites/cat_000.s +++ /dev/null @@ -1,219 +0,0 @@ -Spr_000: - FASTGRAPHICS ; 16x16, 445 bytes, 747 cycles - clc - tya ; Y = Sprite Target Screen Address (upper left corner) - tcs ; New Stack address - ldx #$4444 ; Pattern #1 : 4 - ldy #$0444 ; Pattern #2 : 2 - lda #$4004 ; Pattern #3 : 2 - tcd -;-- - lda #$2633 ; Line 0 - sta $A5,S - lda $A3,S - and #$F000 - ora #$0226 - sta $A3,S - sep #$20 - .a8 - lda $03,S - and #$F0 - ora #$03 - sta $03,S - lda $06,S - and #$F0 - ora #$03 - sta $06,S - lda $A7,S - and #$0F - ora #$20 - sta $A7,S - rep #$30 - .a16 - tsc ; Line 2 - adc #$0140 - tcs - sep #$20 - .a8 - lda #$FF - sta $00,S - sta $A0,S - lda $07,S - and #$0F - ora #$20 - sta $07,S - lda $A7,S - and #$0F - ora #$20 - sta $A7,S - rep #$30 - .a16 - tsc - adc #$0006 - tcs - pea $3533 - pea $2425 - tsc ; Line 3 - adc #$00A4 - tcs - sep #$20 - .a8 - lda #$23 - sta $9A,S - lda $A1,S - and #$0F - ora #$30 - sta $A1,S - rep #$30 - .a16 - pea $3434 - pea $4423 - tsc ; Line 4 - adc #$00A4 - tcs - lda $9C,S - and #$00F0 - ora #$2303 - sta $9C,S - sep #$20 - .a8 - lda #$24 - sta $9A,S - rep #$30 - .a16 - phx - pea $4434 - tsc ; Line 5 - adc #$00A5 - tcs - sep #$20 - .a8 - lda #$24 - sta $99,S - lda $A0,S - and #$0F - ora #$30 - sta $A0,S - rep #$30 - .a16 - pea $2340 - phy - tsc ; Line 6 - adc #$00A3 - tcs - phd - pea $4433 - tsc ; Line 7 - adc #$00A5 - tcs - sep #$20 - .a8 - lda $99,S - and #$F0 - ora #$03 - sta $99,S - rep #$30 - .a16 - pea $236F - pea $F64F - pea $2233 - pea $3324 - tsc ; Line 8 - adc #$00A7 - tcs - lda $9F,S - and #$0F00 - ora #$3022 - sta $9F,S - sep #$20 - .a8 - lda $9A,S - and #$F0 - ora #$03 - sta $9A,S - rep #$30 - .a16 - pea $F2FF - pea $2333 - pea $3444 - tsc ; Line 9 - adc #$00A4 - tcs - txa - sta $9E,S - lda $9C,S - and #$00F0 - ora #$4403 - sta $9C,S - lda $A0,S - and #$0F00 - ora #$F03F - sta $A0,S - pea $FF43 - phx - tsc ; Line 11 - adc #$0140 - tcs - lda #$4434 - sta $02,S - lda #$2322 - sta $A2,S - lda $00,S - and #$00F0 - ora #$4403 - sta $00,S - lda $04,S - and #$0F00 - ora #$F043 - sta $04,S - lda $A0,S - and #$00F0 - ora #$4303 - sta $A0,S - lda $A4,S - and #$0F00 - ora #$3044 - sta $A4,S - tsc ; Line 13 - adc #$0140 - tcs - lda $00,S - and #$00F0 - ora #$3204 - sta $00,S - lda $03,S - and #$00F0 - ora #$4203 - sta $03,S - lda $A0,S - and #$00F0 - ora #$3203 - sta $A0,S - lda $A3,S - and #$00F0 - ora #$3203 - sta $A3,S - sep #$20 - .a8 - lda $05,S - and #$0F - ora #$30 - sta $05,S - rep #$30 - .a16 - tsc ; Line 15 - adc #$0140 - tcs - lda $00,S - and #$00F0 - ora #$F30F - sta $00,S - lda $03,S - and #$00F0 - ora #$F30F - sta $03,S -;-- -SLOWGRAPHICS - rts - -;------------------------------ diff --git a/config_ca65.txt b/config_ca65.txt deleted file mode 100644 index c53ae33..0000000 --- a/config_ca65.txt +++ /dev/null @@ -1,11 +0,0 @@ -lda -.s - -0 -0 - -0 -0 -;----------- -rts -1 diff --git a/gamemanager.s b/gamemanager.s index a2b210c..9ccfa66 100644 --- a/gamemanager.s +++ b/gamemanager.s @@ -19,7 +19,7 @@ beginGameplay: ; Set up sprite rendering BITS8 lda #3 - sta spritebankBank00+3 ; Tell compiled sprites what bank they are in + sta SpriteBankBank00+3 ; Tell compiled sprites what bank they are in BITS16 ; Erase the screen diff --git a/gscats.2mg b/gscats.2mg index 13e027861debad54e2b9a8744193e2cca943a997..a91ab8fa73033eba9592989086838d11e87fc8dc 100644 GIT binary patch delta 553 zcmX@mV056tXoCc6(qRT027yurcV#O+28PEBU|b#2r4l!tnyx+0JH@NJZ?p`vh{ssoKxS})I8mhjnRCwBhyjFUe~gPA{xC7^J^*Jgcc@`x+U~%@_<%8*knx9(96fgY#K}{q&zwDX{=&sem#&lpTB(l_Wj4tU%&tSMRgG4zr~JB cjFSuA7EKOd>IFFo?2OF|dN()^dBQ*k0N7Xj3IG5A delta 446 zcmX@mV056tXoCc6QZs`MgFq>Ro3bPi1H)qmFoTIfCpaL;GsM-&(a+n!fPsO5t$~4= z!GjrHnV5U9vtvjwLfJkBMuyc8LqMi+fQ;Q-#d?>Gk#TY&&+^FyJe-?3c&$EecKY#; zk*U6Mvm@6(#?20Y9xy910kytj1VJSRhE?9H6M)tNfyb?=R<^#cjB}c%x-gnE@7}X_ zb0FJM#^nx7j3vt*ni!dw_Z>L6d19{si#W3s4?_Y21HZm|uwy`gzO%mz*aJYx{mz>g L^llg?#B?>16,Arg&$0000ffff -000000r 2 .endmacro -000000r 2 -000000r 2 .macro BREAK -000000r 2 pha -000000r 2 lda breakpoint -000000r 2 beq nobrk -000000r 2 lda #1 -000000r 2 sta $e1c029 -000000r 2 pla -000000r 2 brk -000000r 2 nobrk: -000000r 2 pla -000000r 2 .endmacro -000000r 2 -000000r 2 ;;;;;;;;;; -000000r 2 ; Stack Macros -000000r 2 -000000r 2 -000000r 2 .macro SAVE_AXY ; Saves all registers -000000r 2 pha -000000r 2 phx -000000r 2 phy -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro RESTORE_AXY ; Restores all registers -000000r 2 ply -000000r 2 plx -000000r 2 pla -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro SAVE_AY ; Saves accumulator and Y index -000000r 2 pha -000000r 2 phy -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro RESTORE_AY ; Restores accumulator and Y index -000000r 2 ply -000000r 2 pla -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro SAVE_AX ; Saves accumulator and X index -000000r 2 pha -000000r 2 phx -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro RESTORE_AX ; Restores accumulator and X index -000000r 2 plx -000000r 2 pla -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro SAVE_XY ; Saves X and Y index -000000r 2 phx -000000r 2 phy -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro RESTORE_XY ; Restores X and Y index -000000r 2 ply -000000r 2 plx -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro SAVE_P0 ; Saves PARAML0 -000000r 2 lda PARAML0 -000000r 2 pha -000000r 2 .endmacro -000000r 2 -000000r 2 -000000r 2 .macro RESTORE_P0 ; Restores PARAML0 -000000r 2 pla -000000r 2 sta PARAML0 -000000r 2 .endmacro -000000r 2 -000000r 1 .include "equates.s" -000000r 2 TEXTCOLOR = $e0c022 -000000r 2 NEWVIDEO = $e0c029 -000000r 2 BORDERCOLOR = $e0c034 -000000r 2 CLOCKCTL = $e0c034 -000000r 2 SHADOW = $e0c035 -000000r 2 STACKCTL = $e0c068 -000000r 2 KBD = $e0c000 -000000r 2 KBDSTROBE = $e0c010 -000000r 2 COUT = $fded -000000r 2 VRAM = $e12000 -000000r 2 VRAMBANK = $e10000 -000000r 2 -000000r 2 ; Zero page locations we use (unused by Monitor, Applesoft, or ProDOS) -000000r 2 PARAM0 = $06 -000000r 2 PARAM1 = $07 -000000r 2 PARAM2 = $08 -000000r 2 PARAM3 = $09 -000000r 2 PARAML0 = $06 ; 16-bit versions of params -000000r 2 PARAML1 = $08 -000000r 2 SCRATCH0 = $19 -000000r 2 SCRATCH1 = $1a -000000r 2 SCRATCHL = $19 ; 16-bit version of scratch -000000r 2 SCRATCHL2 = $67 ; Second 16-bit scratch -000000r 2 PARAM24 = $67 ; 24-bit param (This is almost certainly messing up AppleSoft, but meh) -000000r 2 STACKPTR = $70 ; Cache for stack pointer in fast graphics -000000r 2 SHADOWREGISTER = $72 ; Cache for shadow register in fast graphics -000000r 2 STACKREGISTER = $73 ; Cache for stack register in fast graphics -000000r 2 -000000r 1 -000000r 1 .org $800 -000800 1 -000800 1 18 FB C2 30 NATIVE -000804 1 -000804 1 .include "Sprites/cat_000.s" -000804 2 Spr_000: -000804 2 78 0B E2 20 FASTGRAPHICS ; 16x16, 445 bytes, 747 cycles -000808 2 AF 35 C0 E0 -00080C 2 85 72 A9 00 -000825 2 18 clc -000826 2 98 tya ; Y = Sprite Target Screen Address (upper left corner) -000827 2 1B tcs ; New Stack address -000828 2 A2 44 44 ldx #$4444 ; Pattern #1 : 4 -00082B 2 A0 44 04 ldy #$0444 ; Pattern #2 : 2 -00082E 2 A9 04 40 lda #$4004 ; Pattern #3 : 2 -000831 2 5B tcd -000832 2 ;-- -000832 2 A9 33 26 lda #$2633 ; Line 0 -000835 2 83 A5 sta $A5,S -000837 2 A3 A3 lda $A3,S -000839 2 29 00 F0 and #$F000 -00083C 2 09 26 02 ora #$0226 -00083F 2 83 A3 sta $A3,S -000841 2 E2 20 sep #$20 -000843 2 .a8 -000843 2 A3 03 lda $03,S -000845 2 29 F0 and #$F0 -000847 2 09 03 ora #$03 -000849 2 83 03 sta $03,S -00084B 2 A3 06 lda $06,S -00084D 2 29 F0 and #$F0 -00084F 2 09 03 ora #$03 -000851 2 83 06 sta $06,S -000853 2 A3 A7 lda $A7,S -000855 2 29 0F and #$0F -000857 2 09 20 ora #$20 -000859 2 83 A7 sta $A7,S -00085B 2 C2 30 rep #$30 -00085D 2 .a16 -00085D 2 3B tsc ; Line 2 -00085E 2 69 40 01 adc #$0140 -000861 2 1B tcs -000862 2 E2 20 sep #$20 -000864 2 .a8 -000864 2 A9 FF lda #$FF -000866 2 83 00 sta $00,S -000868 2 83 A0 sta $A0,S -00086A 2 A3 07 lda $07,S -00086C 2 29 0F and #$0F -00086E 2 09 20 ora #$20 -000870 2 83 07 sta $07,S -000872 2 A3 A7 lda $A7,S -000874 2 29 0F and #$0F -000876 2 09 20 ora #$20 -000878 2 83 A7 sta $A7,S -00087A 2 C2 30 rep #$30 -00087C 2 .a16 -00087C 2 3B tsc -00087D 2 69 06 00 adc #$0006 -000880 2 1B tcs -000881 2 F4 33 35 pea $3533 -000884 2 F4 25 24 pea $2425 -000887 2 3B tsc ; Line 3 -000888 2 69 A4 00 adc #$00A4 -00088B 2 1B tcs -00088C 2 E2 20 sep #$20 -00088E 2 .a8 -00088E 2 A9 23 lda #$23 -000890 2 83 9A sta $9A,S -000892 2 A3 A1 lda $A1,S -000894 2 29 0F and #$0F -000896 2 09 30 ora #$30 -000898 2 83 A1 sta $A1,S -00089A 2 C2 30 rep #$30 -00089C 2 .a16 -00089C 2 F4 34 34 pea $3434 -00089F 2 F4 23 44 pea $4423 -0008A2 2 3B tsc ; Line 4 -0008A3 2 69 A4 00 adc #$00A4 -0008A6 2 1B tcs -0008A7 2 A3 9C lda $9C,S -0008A9 2 29 F0 00 and #$00F0 -0008AC 2 09 03 23 ora #$2303 -0008AF 2 83 9C sta $9C,S -0008B1 2 E2 20 sep #$20 -0008B3 2 .a8 -0008B3 2 A9 24 lda #$24 -0008B5 2 83 9A sta $9A,S -0008B7 2 C2 30 rep #$30 -0008B9 2 .a16 -0008B9 2 DA phx -0008BA 2 F4 34 44 pea $4434 -0008BD 2 3B tsc ; Line 5 -0008BE 2 69 A5 00 adc #$00A5 -0008C1 2 1B tcs -0008C2 2 E2 20 sep #$20 -0008C4 2 .a8 -0008C4 2 A9 24 lda #$24 -0008C6 2 83 99 sta $99,S -0008C8 2 A3 A0 lda $A0,S -0008CA 2 29 0F and #$0F -0008CC 2 09 30 ora #$30 -0008CE 2 83 A0 sta $A0,S -0008D0 2 C2 30 rep #$30 -0008D2 2 .a16 -0008D2 2 F4 40 23 pea $2340 -0008D5 2 5A phy -0008D6 2 3B tsc ; Line 6 -0008D7 2 69 A3 00 adc #$00A3 -0008DA 2 1B tcs -0008DB 2 0B phd -0008DC 2 F4 33 44 pea $4433 -0008DF 2 3B tsc ; Line 7 -0008E0 2 69 A5 00 adc #$00A5 -0008E3 2 1B tcs -0008E4 2 E2 20 sep #$20 -0008E6 2 .a8 -0008E6 2 A3 99 lda $99,S -0008E8 2 29 F0 and #$F0 -0008EA 2 09 03 ora #$03 -0008EC 2 83 99 sta $99,S -0008EE 2 C2 30 rep #$30 -0008F0 2 .a16 -0008F0 2 F4 6F 23 pea $236F -0008F3 2 F4 4F F6 pea $F64F -0008F6 2 F4 33 22 pea $2233 -0008F9 2 F4 24 33 pea $3324 -0008FC 2 3B tsc ; Line 8 -0008FD 2 69 A7 00 adc #$00A7 -000900 2 1B tcs -000901 2 A3 9F lda $9F,S -000903 2 29 00 0F and #$0F00 -000906 2 09 22 30 ora #$3022 -000909 2 83 9F sta $9F,S -00090B 2 E2 20 sep #$20 -00090D 2 .a8 -00090D 2 A3 9A lda $9A,S -00090F 2 29 F0 and #$F0 -000911 2 09 03 ora #$03 -000913 2 83 9A sta $9A,S -000915 2 C2 30 rep #$30 -000917 2 .a16 -000917 2 F4 FF F2 pea $F2FF -00091A 2 F4 33 23 pea $2333 -00091D 2 F4 44 34 pea $3444 -000920 2 3B tsc ; Line 9 -000921 2 69 A4 00 adc #$00A4 -000924 2 1B tcs -000925 2 8A txa -000926 2 83 9E sta $9E,S -000928 2 A3 9C lda $9C,S -00092A 2 29 F0 00 and #$00F0 -00092D 2 09 03 44 ora #$4403 -000930 2 83 9C sta $9C,S -000932 2 A3 A0 lda $A0,S -000934 2 29 00 0F and #$0F00 -000937 2 09 3F F0 ora #$F03F -00093A 2 83 A0 sta $A0,S -00093C 2 F4 43 FF pea $FF43 -00093F 2 DA phx -000940 2 3B tsc ; Line 11 -000941 2 69 40 01 adc #$0140 -000944 2 1B tcs -000945 2 A9 34 44 lda #$4434 -000948 2 83 02 sta $02,S -00094A 2 A9 22 23 lda #$2322 -00094D 2 83 A2 sta $A2,S -00094F 2 A3 00 lda $00,S -000951 2 29 F0 00 and #$00F0 -000954 2 09 03 44 ora #$4403 -000957 2 83 00 sta $00,S -000959 2 A3 04 lda $04,S -00095B 2 29 00 0F and #$0F00 -00095E 2 09 43 F0 ora #$F043 -000961 2 83 04 sta $04,S -000963 2 A3 A0 lda $A0,S -000965 2 29 F0 00 and #$00F0 -000968 2 09 03 43 ora #$4303 -00096B 2 83 A0 sta $A0,S -00096D 2 A3 A4 lda $A4,S -00096F 2 29 00 0F and #$0F00 -000972 2 09 44 30 ora #$3044 -000975 2 83 A4 sta $A4,S -000977 2 3B tsc ; Line 13 -000978 2 69 40 01 adc #$0140 -00097B 2 1B tcs -00097C 2 A3 00 lda $00,S -00097E 2 29 F0 00 and #$00F0 -000981 2 09 04 32 ora #$3204 -000984 2 83 00 sta $00,S -000986 2 A3 03 lda $03,S -000988 2 29 F0 00 and #$00F0 -00098B 2 09 03 42 ora #$4203 -00098E 2 83 03 sta $03,S -000990 2 A3 A0 lda $A0,S -000992 2 29 F0 00 and #$00F0 -000995 2 09 03 32 ora #$3203 -000998 2 83 A0 sta $A0,S -00099A 2 A3 A3 lda $A3,S -00099C 2 29 F0 00 and #$00F0 -00099F 2 09 03 32 ora #$3203 -0009A2 2 83 A3 sta $A3,S -0009A4 2 E2 20 sep #$20 -0009A6 2 .a8 -0009A6 2 A3 05 lda $05,S -0009A8 2 29 0F and #$0F -0009AA 2 09 30 ora #$30 -0009AC 2 83 05 sta $05,S -0009AE 2 C2 30 rep #$30 -0009B0 2 .a16 -0009B0 2 3B tsc ; Line 15 -0009B1 2 69 40 01 adc #$0140 -0009B4 2 1B tcs -0009B5 2 A3 00 lda $00,S -0009B7 2 29 F0 00 and #$00F0 -0009BA 2 09 0F F3 ora #$F30F -0009BD 2 83 00 sta $00,S -0009BF 2 A3 03 lda $03,S -0009C1 2 29 F0 00 and #$00F0 -0009C4 2 09 0F F3 ora #$F30F -0009C7 2 83 03 sta $03,S -0009C9 2 ;-- -0009C9 2 E2 20 A5 72 SLOWGRAPHICS -0009CD 2 8F 35 C0 E0 -0009D1 2 A5 73 8F 68 -0009DE 2 60 rts -0009DF 2 -0009DF 2 ;------------------------------ -0009DF 2 -0009DF 1 -0009DF 1 -0009DF 1 ; Suppress some linker warnings - Must be the last thing in the file -0009DF 1 ; This is because Quinn doesn't really know how to use ca65 properly -0009DF 1 .SEGMENT "ZPSAVE" -0009DF 1 .SEGMENT "EXEHDR" -0009DF 1 .SEGMENT "STARTUP" -0009DF 1 .SEGMENT "INIT" -0009DF 1 .SEGMENT "LOWCODE" -0009DF 1 diff --git a/sprites.o b/sprites.o deleted file mode 100644 index a1f826632f1baaefc8b0301df734b1d25ad3615e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3726 zcmZ9P>2p(M6vp3^o2Gp&B_J+nTxwG*SG0zvxMkF&xmQ{VO-<5LaH$qL1;5zCTo&E(G&G^L+c<*^mw9=W|-}9X9J@3tQCLLUR`Dn9J zYS@3Y|BU+2k^Xb5|J*r4so5<`k+1g^&Jpe>+~4OKzhJ{m)cK|S6AD@Bb@%T2x*;68 zxp()nv|ke57913Mz*00f(&$V28>j#Y zU`=S2-%8EE6wnI1z_1p6_&fZ1U>qm|3fRc_uU2|5+N*a0)f!0rulL{D3c|8Q3Qi7R z4L8?n2-bci+!!F%z}OaP@m0_CCR!R=}IXISa7&<6ITc`?IqEa{wvBfl3D}2lWfahdvTFs*VWkXXI@ZSbOcRr0aei-8?HB`; zJJ{_3%uzg40cIY%Nx-w&H3Ih0+!qD(e9Q#QF{lK*W7+Kl>`wFn`Z)9fCV@(zvVe05 zAeH3h$GZ7S5yhm~LXOss4;n+sg-oiQ!1l;?CZ$fq+c=3^w<{*aPR83vVFRFi3cEO9 zPUU?z1Kw%uo&fALS4IJy!LESmK_yVhA_vr5-mSZvNww42#vLZ57Gc$1S(Qn#K3>&3 zgU4^ff7yFRF;#{v5Wu2E4Y=^NR$C75JxLMZyj-Zv(PrkSB3f(cuQ#3OTDmi zEAk0p?KaMb_WS`swc8O$#v!P72Letv1f}jIT=g#E#kVU6iftgi?HzZ6W+TqtD)jDw z-y*c{#ek}UAblSKmIFcNe(4Z;55P|f?FZ4Iq7bAXLg2J21eu4WLs)x+eJHyJf_~kE zWmB8wR*zyrnjk2)1qJ2Dkmz2Vz5@j57Z7j~5M*AI4q@sgdDSnYFij8?dj+rBdld~zXupQSs)8W>Is)M?2r_R- zhtPWy-V)kx)h9rZej5R+2ZGEy(joNTg`X7K@6{(jkbYk#bU~2$KstophwydUyXq4l zNLT6;Ajo_q9m1)P<&R(JeS&<0(Eb$ps8D|sNpv{Vf8~KOx9`CmllXdw5G||4^R*LHft~1PC%eNr!OiX9~VmQmb%> za9p?%48ASzRWY$wh5wycA{F7@GgnJICY&!E7M}M@@Lv4?6I9%Pg72?^Zl9)ue^Bc2 z4%WmqM@@^*o2Kn)`sitT{xp4z=m5v6mXVRnz(CIJa{GHnM)bt$@v$pcPIOMpSTTD1 z!q%a#&IQTNWYcA%E5=v(QN8ktt42AmOYU$fo6qG7P5tiDp+3jWH}~WVj$1%5o6Bbx zXG^(Au{Y!7mo^nk8TQuV9!L96u~f+SxZ!MmuoNCDWR^4qzj`wLiz5RWUnPJAKo^i~ z#jpVeXa$P9y>c$EKrNT_CRB#vd6-#cRg;%S)*+sm8<5rAb zIg&^uIwuF^- c?y%eI6dL{Uh0@?axUavj)R@aJ4F;%x06bmvU;qFB