mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-26 18:32:56 +00:00
generate CRYSTAL data at runtime
This commit is contained in:
parent
0fc86a65be
commit
3936ef734b
@ -1,5 +1,5 @@
|
||||
;license:MIT
|
||||
;(c) 2018 by 4am
|
||||
;(c) 2018-2020 by 4am/qkumba
|
||||
;
|
||||
; reverse engineered from Sapphire's crack screen of 'Crystal Castles'
|
||||
;
|
||||
@ -7,13 +7,76 @@
|
||||
!to "build/FX/CRYSTAL",plain
|
||||
*=$6000
|
||||
|
||||
ldx #0
|
||||
stx $51
|
||||
ldx #4
|
||||
stx $50
|
||||
ldx #$17
|
||||
stx $53
|
||||
--- lda $53
|
||||
jsr $FBC1 ; BASCALC
|
||||
ldy #$27
|
||||
-- ldx $51
|
||||
lda @table1, x
|
||||
ldx $50
|
||||
!byte $2C
|
||||
- lsr
|
||||
lsr
|
||||
dex
|
||||
bne -
|
||||
and #3
|
||||
dec $50
|
||||
bne +
|
||||
ldx #4
|
||||
stx $50
|
||||
inc $51
|
||||
+ sta ($28), y
|
||||
dey
|
||||
bpl --
|
||||
dec $53
|
||||
bpl ---
|
||||
iny
|
||||
sty $54
|
||||
lda #<Coordinates
|
||||
sta $FE
|
||||
ldx #>Coordinates
|
||||
stx $FF
|
||||
--- ldx #0
|
||||
-- txa
|
||||
jsr $FBC1 ; BASCALC
|
||||
- lda ($28), y
|
||||
cmp $54
|
||||
bne +
|
||||
tya
|
||||
pha
|
||||
txa
|
||||
jsr @stainc
|
||||
pla
|
||||
jsr @stainc
|
||||
tay
|
||||
+ iny
|
||||
cpy #$28
|
||||
bne -
|
||||
lda #$FF
|
||||
jsr @stainc2
|
||||
inx
|
||||
cpx #$18
|
||||
bcc --
|
||||
inc $54
|
||||
lda $54
|
||||
cmp #4
|
||||
bne ---
|
||||
|
||||
lda #$80
|
||||
sta Coordinates+$840
|
||||
|
||||
lda #$01
|
||||
sta $FD
|
||||
@outerloop
|
||||
dec $FD
|
||||
lda #<@coords
|
||||
lda #<Coordinates
|
||||
sta $FE
|
||||
lda #>@coords
|
||||
lda #>Coordinates
|
||||
sta $FF
|
||||
ldy #$00
|
||||
@loop
|
||||
@ -49,10 +112,33 @@
|
||||
bpl @outerloop
|
||||
@exit rts
|
||||
|
||||
@coords
|
||||
!source "src/fx/fx.hgr.crystal.data.a"
|
||||
!byte $80
|
||||
@stainc2 jsr @stainc
|
||||
@stainc ldy #0
|
||||
sta ($FE), y
|
||||
inc $FE
|
||||
bne +
|
||||
inc $FF
|
||||
+ rts
|
||||
|
||||
@table1
|
||||
!byte $05, $AF, $05, $AF, $06, $90, $FA, $50, $FA, $50, $50, $5A, $F0, $5A, $F0, $0F
|
||||
!byte $A5, $0F, $A5, $05, $A5, $05, $AF, $05, $AF, $FA, $50, $FA, $50, $5A, $FA, $50
|
||||
!byte $5A, $F0, $5A, $A5, $0F, $A5, $05, $AF, $0F, $A5, $05, $AF, $05, $50, $FA, $50
|
||||
!byte $5A, $F0, $50, $FE, $54, $5E, $F4, $0B, $A1, $01, $AB, $01, $A1, $0B, $A1, $01
|
||||
!byte $AB, $FE, $54, $5E, $F4, $5E, $FE, $54, $FE, $54, $5E, $A1, $01, $AB, $01, $AB
|
||||
!byte $0B, $A1, $0B, $A1, $01, $54, $5E, $F4, $5E, $F4, $54, $FE, $54, $FE, $54, $01
|
||||
!byte $AB, $01, $AB, $01, $A1, $0B, $A1, $0B, $A1, $5E, $F0, $5A, $F0, $5A, $3A, $50
|
||||
!byte $FA, $50, $FA, $AF, $01, $AB, $01, $A8, $3E, $54, $FE, $54, $FE, $AB, $01, $AB
|
||||
!byte $01, $A8, $A1, $0B, $A1, $0B, $A1, $5E, $F4, $5E, $F4, $5E, $54, $FE, $54, $FE
|
||||
!byte $54, $01, $AB, $01, $AB, $01, $0B, $A1, $0B, $A1, $01, $54, $5E, $F4, $5E, $F4
|
||||
!byte $FE, $50, $FA, $50, $5A, $A5, $05, $AF, $05, $AF, $A5, $0F, $A5, $05, $AF, $FA
|
||||
!byte $50, $5A, $F0, $5A, $50, $FA, $50, $5A, $F0, $0F, $A5, $05, $AF, $05, $0F, $A5
|
||||
!byte $05, $AF, $05, $50, $FA, $50, $5A, $F0, $FA, $50, $5A, $F0, $5A, $A5, $0F, $A5
|
||||
!byte $05, $AF, $A5, $05, $AF, $05, $AF, $FA, $50, $FA, $50, $5A, $50, $5A, $F0, $5A
|
||||
!byte $F0, $0F, $A5, $0F, $A5, $05, $05, $AF, $05, $AF, $06, $90, $FA, $50, $FA, $50
|
||||
|
||||
!source "src/wait.a"
|
||||
!source "src/fx/fx.hgr.common.a"
|
||||
+HGR_WHITE_ROUTINES
|
||||
+HGR_BLOCK_COPY_ROUTINES
|
||||
Coordinates
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -44,8 +44,8 @@
|
||||
cmp #6
|
||||
bne -
|
||||
|
||||
sec
|
||||
ror Coordinates+$798
|
||||
lda #$80
|
||||
sta Coordinates+$798
|
||||
|
||||
lda #<Coordinates
|
||||
sta $FE
|
||||
|
@ -73,8 +73,8 @@
|
||||
cmp #12
|
||||
bne --
|
||||
|
||||
sec
|
||||
ror Coordinates+$798
|
||||
lda #$80
|
||||
sta Coordinates+$798
|
||||
|
||||
lda #<Coordinates
|
||||
sta $FE
|
||||
|
Loading…
x
Reference in New Issue
Block a user