convert Spare Change demo, save 55kb, fix attract

This commit is contained in:
Peter Ferrie 2022-06-10 13:26:21 -07:00
parent b75d6f0247
commit 34224f1e65
62 changed files with 343 additions and 49 deletions

View File

@ -56,12 +56,12 @@ cat res/GAMES.CONF |
grep "^$game=0" >> /tmp/g
if [ "$game" == "SPARE.CHANGE" ]; then
echo "SPCARTOON.1=0" >> /tmp/g
echo "SPCARTOON.2=0" >> /tmp/g
echo "SPCARTOON.3=0" >> /tmp/g
echo "SPCARTOON.4=0" >> /tmp/g
echo "SPCARTOON.5=0" >> /tmp/g
echo "SPCARTOON.6=0" >> /tmp/g
echo "SPCARTOON.1.=0" >> /tmp/g
echo "SPCARTOON.2.=0" >> /tmp/g
echo "SPCARTOON.3.=0" >> /tmp/g
echo "SPCARTOON.4.=0" >> /tmp/g
echo "SPCARTOON.5.=0" >> /tmp/g
echo "SPCARTOON.6.=0" >> /tmp/g
fi
if [ "$game" == "PRINCEUNP" ]; then

View File

@ -6,11 +6,11 @@
SPARE.CHANGE=C
SPARE.CHANGE=A
SPARE.CHANGE=0
SPCARTOON.1=0
SPCARTOON.2=0
SPCARTOON.3=0
SPCARTOON.4=0
SPCARTOON.5=0
SPCARTOON.6=0
SPCARTOON.1.=0
SPCARTOON.2.=0
SPCARTOON.3.=0
SPCARTOON.4.=0
SPCARTOON.5.=0
SPCARTOON.6.=0
[eof]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

48
src/demo/spare.change.a Normal file
View File

@ -0,0 +1,48 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPARE.CHANGE",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #>(callback - 1)
sta $277A
lda #<(callback - 1)
sta $277D
jmp $2700 ; decompress
callback
lda #$4C
sta $182F
jsr $2000
lda #$44
sta $7A34
lda #$4C
sta $8E1C
ldx #0
stx $7F70
stx $8E1D
inx
stx $7F71
stx $8E1E
+DISABLE_ACCEL
jmp $1832
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.1.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.11",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #0
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.2.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.22",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #1
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.3.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.33",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #2
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.4.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.44",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #3
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.5.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.55",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #4
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

41
src/demo/spcartoon.6.s Normal file
View File

@ -0,0 +1,41 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "res/DEMO/SPCARTOON.66",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_KEEP_DIR spare_change, spare_change_dir_e-spare_change_dir_b
lda #$60
sta $277B
jsr $2700 ; decompress
lda #5
sta $19C7
lda #$4C
sta $182F
jsr $2000
lda #$B0
sta $963B
lda #$6C
sta $963C
+DISABLE_ACCEL
jsr $9600
jmp $100
spare_change
!byte spare_change_e-spare_change_b
spare_change_b
spare_change_dir_b
!text "X/SPARE.CHANGE"
spare_change_dir_e
!text "/SPARE.CHANGE"
spare_change_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11719597
!be24 11719603
!le16 4764

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11670619
!be24 11670625
!le16 5343

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11610759
!be24 11610765
!le16 3654

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11623607
!be24 11623613
!le16 4074

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11639694
!be24 11639700
!le16 5245

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11658275
!be24 11658281
!le16 5880

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11724361
!be24 11724367
!le16 410

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11725115
!be24 11725121
!le16 448

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11725563
!be24 11725569
!le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11678108
!be24 11678114
!le16 1242

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11724847
!be24 11724853
!le16 67

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11719538
!be24 11719544
!le16 59

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11718004
!be24 11718010
!le16 1437

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11703605
!be24 11703611
!le16 537

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11675962
!be24 11675968
!le16 2146

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11679708
!be24 11679714
!le16 6464

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11724771
!be24 11724777
!le16 76

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11719441
!be24 11719447
!le16 97

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11724914
!be24 11724920
!le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11704142
!be24 11704148
!le16 4511

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11708653
!be24 11708659
!le16 1591

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11710244
!be24 11710250
!le16 1053

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11711297
!be24 11711303
!le16 3237

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11714534
!be24 11714540
!le16 2877

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11717411
!be24 11717417
!le16 479

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11717890
!be24 11717896
!le16 114

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11725866
!be24 11725872
!le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11691128
!be24 11691134
!le16 4283

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11695411
!be24 11695417
!le16 2185

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11664155
!be24 11664161
!le16 6464

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11602439
!be24 11602445
!le16 8320

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11614413
!be24 11614419
!le16 9194

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11627681
!be24 11627687
!le16 12013

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11644939
!be24 11644945
!le16 13336

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11679350
!be24 11679356
!le16 358

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11686172
!be24 11686178
!le16 4956

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 11697596
!be24 11697602
!le16 6009