MC-10でアセンブラやってみる その4

デバッガからキャラクタ表示してみました。

f:id:tanam:20211223004037p:plain

- g f0ca
- w fdf7 fdfb
- l 1000 1004
- w fdfc fe00
- l 1020 1024
- w fe01 fe05
- l 1040 1044
- w fe06 fe0a
- l 1060 1064
- w fe0b fe0f
- l 1080 1084
- w fe10 fe14
- l 10A0 10A4
- w fe15 fe19
- l 10C0 10C4
- w fe1a fe1e
- l 10E0 10E4
- w fe1f fe23
- l 1100 1104
- w fe24 fe28
- l 1120 1124
- w fe29 fe2a
- l 1140 1141
- w fe2b fe2c
- l 1160 1161
- w fe2d fe2e
- l 1180 1181
- w fe2f fe30
- l 11A0 11A1
- w fe31 fe32
- l 11C0 11C1
- w fe33 fe34
- l 1142 1143
- w fe35 fe36
- l 1162 1163
- w fe37 fe38
- l 1182 1183
- w fe39 fe3a
- l 11a2 11a3
- w fe3b fe3c
- l 11c2 11c3
- w fe3d fe40
- l 11e0 11e3
- w fe41 fe44
- l 1200 1203
- w fe45 fe48
- l 1220 1223
- w fe49 fe4c
- l 1240 1243
- w fe4d fe50
- l 1260 1263
- w fe51 fe51
- l 1280 1280
- w fe52 fe52
- l 12a0 12a0
- w fe53 fe53
- l 12c0 12c0
- w fe54 fe54
- l 12e0 12e0
- w fe55 fe55
- l 1300 1300
- w fe56 fe56
- l 1281 1281
- w fe57 fe57
- l 12a1 12a1
- w fe58 fe58
- l 12c1 12c1
- w fe59 fe59
- l 12e1 12e1
- w fe5a fe5a
- l 1301 1301
- w fe5b fe5b
- l 1282 1282
- w fe5c fe5c
- l 12a2 12a2
- w fe5d fe5d
- l 12c2 12c2
- w fe5e fe5e
- l 12e2 12e2
- w fe5f fe5f
- l 1302 1302
- l 1283 1283
- w fe61 fe61
- l 12a3 12a3
- w fe62 fe62
- l 12c3 12c3
- w fe63 fe63
- l 12e3 12e3
- w fe64 fe64
- l 1303 1303
- w fe65 fe65
- l 1284 1284
- w fe66 fe66
- l 12a4 12a4
- w fe67 fe67
- l 12c4 12c4
- w fe68 fe68
- l 12e4 12e4
- w fe69 fe69
- l 1304 1304
- w fe6a fe6a
- l 1285 1285
- w fe6b fe6b
- l 12a5 12a5
- w fe6c fe6c
- l 12c5 12c5
- w fe6d fe6d
- l 12e5 12e5
- w fe6e fe6e
- l 1305 1305
- w fe6f fe70
- l 1320 1321
- w fe71 fe72
- l 1340 1341
- w fe73 fe74
- l 1360 1361
- w fe75 fe76
- l 1380 1381
- w fe77 fe78
- l 13a0 13a1
- w fe79 fe7a
- l 1322 1323
- w fe7b fe7c
- l 1342 1343
- w fe7d fe7e
- l 1362 1363
- w fe7f fe80
- l 1382 1383
- w fe81 fe82
- l 13a2 13a3
- w fe83 fe84
- l 13c0 13c1
- w fe85 fe86
- l 13e0 13e1
- w fe87 fe88
- l 1400 1401
- w fe89 fe8a
- l 1420 1421
- w fe8b fe8c
- l 1440 1441
- w fe8d fe8e
- l 13c2 13c3
- w fe8f fe90
- l 13e2 13e3
- w fe91 fe92
- l 1402 1403
- w fe93 fe94
- l 1422 1423
- w fe95 fe96
- l 1442 1443

とりあえずVMC10で遊べるようにはなりました。

frogger10.txt

;
;   File:       frogger10.c10
;

    org $7000
    jmp START

TIMER:
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    dec $00DF
    bne NZERO
    dec $00DE
    bne NZERO
    dec $0095
NZERO:
    ldx #$47DF
    jmp LF9A5

WAIT:
    ldaa    $7F
    jsr WAIT_LOOP

    ldd $0009
    addd    #$0F8B
    std $001A
    ldaa    #$10
    oraa    $0018
    staa    $0018
    ldaa    #$FF
    staa    $0066
    ldaa    $0019
    bita    #$20
    ldd $0009
    addd    $0090
    std $001C
    ldaa    $0002
    eora    #$40
    staa    $0002
    rts

WAIT_LOOP:
    deca
    nop ;DUMMY
    nop ;DUMMY
    nop ;DUMMY
    nop ;DUMMY
    nop ;DUMMY
    nop ;DUMMY
    bne WAIT_LOOP
    rts

SHOT:
    ldaa    #$80
    coma            ;flip the bits
    staa    $0002       ;store in keystrobe
    ldaa    $BFFF       ;get the key group
    bita    #$08
    beq keySPC
    ldaa    #%11111110  ; check CTRL key
    staa    2
    ldaa    3   
    bita    #%00000010
    beq keyCTRL
    ldaa    #$FF
    rts

INPUT:
    ldaa    #$80
    coma            ;flip the bits
    staa    $0002       ;store in keystrobe
    ldaa    $BFFF       ;get the key group
    bita    #$04
    beq keyW
    ldaa    #$04
    coma            ;flip the bits
    staa    $0002       ;store in keystrobe
    ldaa    $BFFF       ;get the key group
    bita    #$08
    beq keyZ
    ldaa    #$02
    coma            ;flip the bits
    staa    $0002       ;store in keystrobe
    ldaa    $BFFF       ;get the key group
    bita    #$01
    beq keyA
    ldaa    #$08
    coma            ;flip the bits
    staa    $0002       ;store in keystrobe
    ldaa    $BFFF       ;get the key group
    bita    #$04
    beq keyS
    ldaa    #$FF
    rts

keyCTRL:
    ldaa    #$FB
    rts

keySPC:
    ldaa    #$FD
    rts

keyW:
    ldaa    #$FD
    rts

keyZ:
    ldaa    #$FB
    rts

keyA:
    ldaa    #$F7
    rts

keyS:
    ldaa    #$EF
    rts

INC55:
    inc $0055
    inc $0055
    inc $0055
    inc $0055
    ldaa    $0055
    bmi BMI55
    jmp LF6DB
BMI55:
    jmp LF550

INC56:
    inc $0056
    inc $0056
    inc $0056
    inc $0056
    ldaa    $0056
    bpl BPL56
    clr $0096
    clr $0056
BPL56:
    jmp LF70D

INC57:
    inc $0057
    inc $0057
    inc $0057
    inc $0057
    ldaa    $0057
    bmi BMI57
    jmp LF762
BMI57:
    jmp LF6E2

INC58:
    inc $0058
    inc $0058
    inc $0058
    inc $0058
    ldaa    $0058
    bmi BMI58
    jmp LF7DA
;   jmp LF7DD
BMI58:
    jmp LF769

INC4F:
    inc $004F
    ldaa    $004F
    bpl BPL4F
    jmp LF62C
BPL4F:
    jmp LF673

INC4C:
    inc $004C
    ldaa    $004C
    bpl BPL4C
    jmp LF5A4
BPL4C:
    jmp LF5BC

INC46:
    ldaa    $0009
    anda    #$1F
    cmpa    #$01
    beq P61
    cmpa    #$02
    beq P62
    cmpa    #$03
    beq P63
    cmpa    #$04
    beq P64
    jmp RET46
DONE46:
    staa    $0048
    inc $0046
RET46:
    ldaa    $0046
    bpl BPL46
    jmp LF45A
BPL46:
    jmp LF47F
P61:
    ldaa    $4108
    cmpa    #$55
    bne P62
    ldaa    #$01
    jmp DONE46
P62:
    ldaa    $410F
    cmpa    #$55
    bne P63
    ldaa    #$02
    jmp DONE46
P63:
    ldaa    $4116
    cmpa    #$55
    bne P64
    ldaa    #$03
    jmp DONE46
P64:
    ldaa    $411d
    cmpa    #$55
    bne RET46
    ldaa    #$04
    jmp DONE46

INC49:
    ldaa    $0009
    anda    #$1F
    cmpa    #$01
    beq P91
    cmpa    #$02
    beq P92
    cmpa    #$03
    beq P93
    cmpa    #$04
    beq P94
    jmp RET49
DONE49:
    staa    $004b
    inc $0049
RET49:
    ldaa    $0049
    bpl BPL49
    jmp LF494
BPL49:
    jmp LF4AA
P91:
    ldaa    $4108
    cmpa    #$55
    bne P92
    ldaa    #$01
    jmp DONE49
P92:
    ldaa    $410F
    cmpa    #$55
    bne P93
    ldaa    #$02
    jmp DONE49
P93:
    ldaa    $4116
    cmpa    #$55
    bne P94
    ldaa    #$03
    jmp DONE49
P94:
    ldaa    $411d
    cmpa    #$55
    bne P90
    ldaa    #$04
    jmp DONE49
P90:
    ldaa    #$00
    jmp DONE49

    org $8000
START:
    clra
    staa    $0001
    staa    $0017
    coma
    staa    $0005
;   ldaa    #$7F
    ldaa    #$FF
    staa    $0000
    ldaa    #$0F
    staa    $0002
    lds #$00FF
    sei
    clra
    jsr LF9E5
;タイトル画面
LF018:
;   clr $2000
    clr $BFFF
    ldaa    #$20
    jsr LF9FB
    ldx #$8E97
    jsr LFA07
    ldx #$8EA8
    jsr LFA07
    ldx #$8EB2
    jsr LFA07
    ldx #$8EC2
    jsr LFA07
    ldx #$8F32
    jsr LFA07
    cli
    ldaa    #$FF
    staa    $005E
;ウェイト
LF043:
;   ldaa    $00C1
;   bpl LF043
    nop
    jsr WAIT
LF047:
    clr $00C1
    dec $005E
    bne LF043
;セレクト画面
LF04F:
    clr $BFFF
    jsr LFC9E
    ldaa    #$20
    jsr LF9FB
    ldx #$8ED0
    jsr LFA07
    ldx #$8EE6
    jsr LFA07
    ldx #$8EF1
    jsr LFA07
    ldaa    #$7E
    staa    $4065
    ldx #$0320
    clr $0044
LF077:
    cpx #$0300
    bpl LF0A9
;;;
;   jsr LFC8C
    jsr INPUT
    lsra
    lsra
    bcs LF092
    ldab    #$20
    stab    $40A5
    ldab    #$7E
    stab    $4065
    clr $0044
    bra LF0A1
LF092:
    lsra
    bcs LF0A1
    ldab    #$20
    stab    $4065
    ldab    #$7E
    stab    $40A5
    stab    $0044
LF0A1:
;   jsr LFC81
    jsr SHOT
LF0A3:  lsra
    lsra
    lsra
    bcc LF0B6
LF0A9:
;   ldaa    $00C1
;   bpl LF0A9
    nop
    jsr WAIT
LF0AD:
    clr $00C1
    dex
    bne LF077
;デモ開始 #$00
    clra
    bra LF0B8
;
LF0B6:
    ldaa    #$FF
;ゲーム開始 #$FF
LF0B8:
    staa    $0043
    ldaa    #$28
    staa    $BFFF
    staa    $008C
    ldaa    #$55
;
XF0C3:
    jsr LF9FB
    clrb
    ldx #$40E0
;1P HI: 2P
LF0CA:
    dex
    stab    $00,x
    cpx #$4000
    bne LF0CA
    ldaa    #$08
    staa    $00A1
    staa    $00A2
    stab    $00A0
    staa    $36,x
    ldaa    #$A0
    staa    $00,x
    ldaa    #$20
    staa    $20,x
    staa    $40,x
    staa    $60,x
    staa    $2C,x
    staa    $4C,x
    staa    $6C,x
    staa    $2D,x
    staa    $6D,x
    ldaa    #$A8
    staa    $80,x
    staa    $0C,x
    staa    $8C,x
    staa    $16,x
    staa    $56,x
    staa    $96,x
    staa    $4B,x
    staa    $17,x
    staa    $57,x
    staa    $01,x
    staa    $41,x
    ldaa    #$88
    staa    $0B,x
    staa    $2B,x
    staa    $6B,x
    staa    $8B,x
    staa    $37,x
    staa    $21,x
    ldaa    #$80
    staa    $76,x
    staa    $61,x
    staa    $81,x
    staa    $77,x
    staa    $97,x
    ldaa    #$06
    staa    $0095
    ldd #$0304
    stab    $0067
    stab    $0096
    std $005E
    ldx #$40E4
    clra
; GOAL
LF135:
    jsr LFA20
    inx
    dec $005E
    bne LF135
    dec $005F
    beq LF14C
    ldab    #$04
    abx
    ldab    #$03
    stab    $005E
    bra LF135
; 丸太
LF14C:
    clrb
LF14D:
    ldx #$8DF7
    abx
    ldaa    $14,x
    psha
    ldaa    $0F,x
    psha
    ldaa    $0A,x
    psha
    ldaa    $05,x
    psha
    ldaa    $00,x
    psha
    ldx #$41C7
    ldaa    $005E
    cmpa    #$01
    bne LF16C
    ldx #$41D4
LF16C:
    cmpa    #$02
    bne LF173
    ldx #$4343
LF173:
    cmpa    #$03
    bne LF17A
    ldx #$4350
LF17A:
    abx
    jsr LFAA9
    incb
    cmpb    #$05
    bne LF14D
    inc $005E
    ldaa    $005E
    cmpa    #$04
    bne LF14C
    ldaa    #$FF
    ldx #$4400
; 丸太
LF191:
    staa    $00,x
    inx
    cpx #$44A0
    bne LF19E
    ldx #$4700
    bra LF191
;
LF19E:
    cpx #$47A0
    bne LF191
    ldx #$4285
    stx $00D2
    ldx #$8E33
    stx $00D0
    jsr LFDB5
    inx
    inx
    stx $00D2
    jsr LFDB5
    ldx #$4290
    stx $00D2
    jsr LFDB5
    inx
    inx
    stx $00D2
    jsr LFDB5
    ldx #$429B
    stx $00D2
    jsr LFDB5
    inx
    inx
    stx $00D2
    jsr LFDB5
    clrb
    stab    $005E
    stab    $005F
; 車
LF1DA:
    ldx #$8E5F
LF1DD:
    ldaa    $00,x
    psha
    dex
    cpx #$8E50
    bne LF1DD
    ldx #$44C7
    ldaa    $005F
    beq LF1F0
    ldx #$4643
LF1F0:
    abx
LF1F1:
    jsr LFAA9
    inx
    ldaa    $005E
    inca
    staa    $005E
    cmpa    #$03
    bne LF1F1
    addb    #$0A
    clr $005E
    cmpb    #$1E
    bne LF1DA
    clrb
    ldaa    $005F
    inca
    staa    $005F
    cmpa    #$02
    bne LF1DA
    clrb
    stab    $005E
; 車
LF214:
    ldx #$8E6E
LF217:
    ldaa    $00,x
    psha
    dex
    cpx #$8E5F
    bne LF217
    ldx #$4586
    abx
LF224:
    jsr LFAA9
    inx
    ldaa    $005E
    inca
    staa    $005E
    cmpa    #$03
    bne LF224
    addb    #$0A
    clr $005E
    cmpb    #$1E
    bne LF214
    ldaa    #$0A
    staa    $004E
    ldaa    #$10
    staa    $0051
    ldaa    #$06
    staa    $0054
    com $0094
    jsr LF90A
    cli
; ゲームメインループ
LF24D:
    ldaa    $0060
    staa    $0070
    ldd $0061
    std $0071
    jsr LF9C0
    ldx #$4003
    stx $0073
    jsr LF933
    ldaa    $0044
    bne LF273
    clra
    ldx #$4016
LF268:
    jsr LFA22
    inx
    cpx #$401F
    bne LF268
    bra LF293
; デモメインループ
LF273:
    ldx #$4016
    stx $00D2
    ldx #$8FAA
    stx $00D0
    jsr LFDB5
    ldaa    $0063
    staa    $0070
    ldd $0064
    std $0071
    jsr LF9C0
    ldx #$4019
    stx $0073
    jsr LF933
LF293:
    ldaa    $0040
    staa    $0070
    ldd $0041
    std $0071
    ldx #$400E
    stx $0073
    jsr LF933
    ldx #$40A0
    clr $00,x
    clr $01,x
    clr $16,x
    clr $17,x
    ldab    #$16
    ldaa    $005A
    bne LF2B5
    clrb
LF2B5:
    abx
    ldd #$FFFF
    std $00,x
;残機
    ldaa    $0069
    bmi LF2C2
    jmp LF34C
;ゲームオーバー画面
LF2C2:
    clr $BFFF
    clr $0043
    ldaa    #$20
    jsr LF9FB
    ldx #$8EFD
    jsr LFA07
    ldx #$8F09
    jsr LFA07
    ldx #$8F26
    jsr LFA07
    ldaa    $0060
    staa    $0070
    ldd $0061
    std $0071
    ldx #$41C7
    stx $0073
    jsr LFF4D
;   jsr $8F4D
    ldaa    $0044
    beq LF309
    ldx #$8F2C
    jsr LFA07
    ldaa    $0063
    staa    $0070
    ldd $0064
    std $0071
    ldx #$41D5
    stx $0073
;   jsr LFF4D
    jsr $8F4D
;
LF309:
    ldaa    $0040
    staa    $0070
    ldd $0041
    std $0071
    ldx #$4173
    stx $0073
;;; jsr LFF4D
    jsr $8F4D
    clra
    jsr LF9EF
    ldx #$0200
LF320:
;   jsr LFC81
    jsr SHOT
    coma
    bita    #$04
    beq LF32B
    jmp LF0B6
;
LF32B:
    bita    #$02
    beq LF332
LF32F:
    jmp LF04F
;
LF332:
;   jsr LFC8C
    jsr INPUT
    coma
    anda    #$1E
    bne LF32F
    cpx #$0000
    bne LF342
    jmp LF018
;
LF342:
    dex
LF343:
;   ldaa    $00C1
;   bpl LF343
    jsr WAIT
    nop
    clr $00C1
    bra LF320
; サブルーチン
LF34C:
    ldaa    $0068
    bpl LF353
    jmp LF24D
; サブルーチン
LF353:
    ldaa    $006A
    beq LF397
;;;;;
LF357:
    ldaa    $00C1
    bpl LF357
    clr $00C1
    dec $006A
    bne LF357
    jsr LFC9E
    ldx #$4101
LF369:
    jsr LFA2D
    ldab    #$07
    abx
    cpx #$4124
    bne LF369
    ldaa    $0044
    beq LF381
    ldaa    $005A
    beq LF381
    clr $00C0
    bra LF384
;
LF381:
    clr $0045
LF384:
    jsr LF90A
    ldaa    #$06
    staa    $0095
    ldaa    $00A1
    cmpa    #$04
    beq LF397
    deca
    staa    $00A1
    clr $00A0
; サブルーチン
LF397:
    ldaa    $006B
    beq LF3B1
;;;;;
LF39B:
;   ldaa    $00C1
;   bpl LF39B
    jsr WAIT
    nop
    clr $00C1
    dec $006B
    bne LF39B
    jsr LFC9E
    ldaa    #$06
    staa    $0095
    jsr LF90A
;;;;;
; サブルーチン
LF3B1:
    ldaa    $006C
    bne LF3B8
    jmp LF445
LF3B8:
;   ldaa    $00C1
;   bpl LF3B8
    jsr WAIT
    nop
    clr $00C1
    dec $006C
    bne LF3B8
    jsr LFC9E
    ldx #$0089
;
LF3CA:
    ldaa    $00,x
    psha
    dex
    cpx #$007F
    bne LF3CA
    jsr LFA3B
    addd    #$00A0
    std $0075
LF3DB:
    pula
    staa    $00,x
    pula
    staa    $01,x
    ldab    #$20
    abx
    cpx $0075
    bne LF3DB
    ldaa    $0044
    beq LF3FC
    ldaa    $005A
    beq LF403
    dec $0067
    bpl LF403
LF3F5:
    ldaa    #$FF
    staa    $0069
    jmp LF24D
;
LF3FC:
    dec $0067
    bpl LF43E
    bmi LF3F5
LF403:
    ldaa    $0045
    com $005A
    beq LF40C
    ldaa    $00C0
LF40C:
    asla
    asla
    asla
    staa    $005E
    ldx #$4101
LF414:
    asl $005E
    bcc LF425
    stx $00D2
    ldx #$8FE6
    stx $00D0
    jsr LFDB5
    bra LF428
;
LF425:
    jsr LFA2D
LF428:
    ldab    #$07
    abx
    cpx #$4124
    bne LF414
    clra
    tab
    std $0046
    std $0049
    staa    $00A0
    ldd $00A1
    stab    $00A1
    staa    $00A2
LF43E:
    ldaa    #$06
    staa    $0095
    jsr LF90A
LF445:
    ldaa    $0047
    beq LF456
    dec $0047
    bne LF47F
    ldaa    $0048
    jsr LFA4A
    jsr LFA2D
LF456:
;   ldaa    $0046
;   bpl LF47F
    jmp INC46
    nop
LF45A:
    ldaa    $0048
    jsr LFA4A
    ldd $8E13
    std $00,x
    ldd $8E18
    std $20,x
    ldd $8E1D
    std $40,x
    ldd $8E22
    std $60,x
    ldd $8E27
    std $80,x
    ldaa    #$FF
    staa    $0047
    clr $0046
;
LF47F:
    ldaa    $004A
    beq LF490
    dec $004A
    bne LF4AA
    ldaa    $004B
    jsr LFA4A
    jsr LFA2D
LF490:
;   ldaa    $0049
;   bpl LF4AA
    jmp INC49
    nop
LF494:
    ldaa    $004B
    jsr LFA4A
    stx $00D2
    ldx #$8E83
    stx $00D0
    jsr LFDB5
    ldaa    #$FF
    staa    $004A
    clr $0049
LF4AA:
    ldaa    $006D
    bpl LF50C
    cmpa    #$FF
    beq LF4B5
    jsr LFCB2
LF4B5:
    jsr LFA3B
    addd    #$0080
    std $0075
    ldab    #$20
LF4BF:
    ldaa    $00,x
    psha
    ldaa    $01,x
    psha
    cpx $0075
    beq LF4CC
    abx
    bra LF4BF
;
LF4CC:
    ldx #$0089
LF4CF:
    pula
    staa    $00,x
    cpx #$0080
    beq LF4DA
    dex
    bra LF4CF
;
LF4DA:
    ldx #$8E96
LF4DD:
    ldaa    $00,x
    psha
    dex
    cpx #$8E8C
    bne LF4DD
    ldd $0075
    subd    #$0080
    std $0077
    ldx $0077
LF4EF:
    pula
    staa    $00,x
    pula
    staa    $01,x
    cpx $0075
    beq LF4FE
    ldab    #$20
    abx
    bra LF4EF
;
LF4FE:
    ldaa    #$80
    staa    $006C
    jsr LFC97
;   jsr SOUND
    clra
    staa    $006D
    staa    $00CC
    bra LF546
;
LF50C:
    ldaa    $006E
    bpl LF549
    ldaa    $005D
    jsr LFA4A
    stx $00D2
    ldx #$8FE6
    stx $00D0
    jsr LFDB5
    ldaa    $006F
    bpl LF52A
    staa    $006A
    clr $006F
    bra LF52E
;
LF52A:
    ldaa    #$7F
    staa    $006B
LF52E:
    clr $006E
    jsr LFC97
;   jsr SOUND
    ldx #$8F81
    ldaa    $006B
    bne LF53E
    ldx #$8F6F
LF53E:
    stx $00CA
    clr $008F
    clr $00CC
LF546:
    jmp LF24D
;
LF549:
;   ldaa    $0055
    jmp INC55
    nop
;   bmi LF550
    jmp LF6DB
;
LF550:
    clr $0055
    ldaa    $005B
    cmpa    #$01
    bne LF570
LF559:
    inc $005C
    ldaa    $005C
    cmpa    #$1F
    bne LF56E
    dec $005C
LF565:
    jsr LFCB2
    ldaa    #$FF
    staa    $006D
    bra LF546
LF56E:
    bra LF582
;
LF570:
    cmpa    #$03
    beq LF559
    cmpa    #$02
    bne LF582
    dec $005C
    bpl LF582
    inc $005C
    bra LF565
;
LF582:
    ldaa    $004D
    beq LF59C
    dec $004D
    bne LF596
    ldab    #$04
    stab    $0094
    ldx #$8DF7
    stx $0079
    bra LF5C4
;
LF596:
    ldaa    $0094
    bmi LF5BC
    bra LF5C4
;
LF59C:
    ldab    $0094
    bpl LF5C4
;   ldaa    $004C
;   bpl LF5BC
    jmp INC4C
    nop
LF5A4:
    ldaa    $004E
    cmpa    #$1E
    bne LF5BC
    ldx #$8E10
    stx $0079
    ldab    #$04
    stab    $0094
    clr $004C
    ldaa    #$20
    staa    $004D
    bra LF5C4
;
LF5BC:
    ldx #$41DF
    jsr LFA55
    bra LF5E0
;
LF5C4:
    ldx $0079
    ldab    $0094
    abx
    ldaa    $00,x
    staa    $007B
    ldaa    $05,x
    staa    $007C
    ldaa    $0A,x
    staa    $007D
    ldaa    $0F,x
    staa    $007E
    ldaa    $14,x
    staa    $007F
    dec $0094
LF5E0:
    ldx #$41DF
LF5E3:
    dex
    jsr LFA7F
    cpx #$41C0
    bne LF5E3
    jsr LFA6A
    inc $004E
    ldaa    $004E
    cmpa    #$20
    bne LF5FB
    clr $004E
LF5FB:
    ldaa    $0050
    beq LF628
XF5FF:
    dec $0050
    bne LF673
    ldaa    $0051
    cmpa    #$1C
    ble LF60F
    inc $0050
    bra LF626
;
LF60F:
    ldx #$4280
    ldab    $0051
    abx
    stx $00D2
    ldx #$8E33
    stx $00D0
    jsr LFDB5
    inx
    inx
    stx $00D2
    jsr LFDB5
LF626:
    bra LF673
;
LF628:
;   ldaa    $004F
;   bpl LF673
    jmp INC4F
    nop
LF62C:
    ldaa    $0051
    cmpa    #$1C
    bhi LF673
    ldaa    $005B
    cmpa    #$02
    bne LF64E
    ldaa    $005C
    inca
    inca
    suba    $0051
    bmi LF64E
    cmpa    #$04
    bgt LF64E
    ldaa    #$FF
    staa    $006D
    inc $005C
    jsr LFCB2
LF64E:
    ldx #$4280
    ldab    $0051
    abx
    stx $00D2
    ldx #$8E29
    stx $00D0
    jsr LFDB5
    inx
    inx
    stx $00D2
    jsr LFDB5
    clr $004F
    ldaa    #$2A
    staa    $0050
    ldaa    $006D
    bpl LF673
    jmp LF24D
;
LF673:
    ldx #$4280
    jsr LFA55
LF679:
    jsr LFA94
    inx
    cpx #$429F
    bne LF679
    jsr LFA6A
    dec $0051
    bpl LF68E
    ldaa    #$1F
    staa    $0051
LF68E:
    ldab    $0053
    beq LF69E
    decb
    stab    $0053
    cmpb    #$02
    bcc LF6BA
    jsr LFDDE
    bra LF6C0
;
LF69E:
    ldaa    $0052
    bpl LF6BA
    ldaa    $0054
    bne LF6BA
    ldx #$4340
    stx $00D2
    ldx #$FE79
    stx $00D0
    jsr LFDB5
    clr $0052
    ldaa    #$1F
    staa    $0053
LF6BA:
    ldx #$435F
    jsr LFA55
LF6C0:
    ldx #$435F
LF6C3:
    dex
    jsr LFA7F
    cpx #$4340
    bne LF6C3
    jsr LFA6A
    inc $0054
    ldaa    $0054
    cmpa    #$20
    bne LF6DB
    clr $0054
LF6DB:
;   ldaa    $0057
    jmp INC57
    nop
;   bmi LF6E2
    jmp LF762
;
LF6E2:
    clr $0057
    ldaa    $005B
    cmpa    #$04
    bne LF6F7
    ldab    $005C
    ldx #$4400
    abx
    ldd #$FFFF
    jsr LFA30
LF6F7:
    ldx #$4400
LF6FA:
    jsr LFA94
    inx
    cpx #$441F
    bne LF6FA
;   ldaa    $0056
    jmp INC56
    nop
;   bpl LF70D
    clr $0096
    clr $0056
LF70D:
    ldab    $0096
    cmpb    #$04
    beq LF735
    ldx #$8E3D
    abx
    ldaa    $00,x
    staa    $441F
    ldaa    $04,x
    staa    $443F
    ldaa    $08,x
    staa    $445F
    ldaa    $0C,x
    staa    $447F
    ldaa    $10,x
    staa    $449F
    inc $0096
    bra LF73D
;
LF735:
    ldaa    #$FF
    ldx #$441F
    jsr LFA22
LF73D:
    ldab    $005B
    cmpb    #$04
    bne LF762
    ldab    $005C
    ldx #$4400
    abx
    ldaa    $01,x
    cmpa    #$FF
    bne LF75B
    stx $00D2
    ldx #$8E6F
    stx $00D0
    jsr LFDB5
    bra LF762
;
LF75B:
    ldaa    #$FF
    staa    $006D
    jmp LF24D
;
LF762:
;   ldaa    $0058
    jmp INC58
    nop
;   bmi LF769
    jmp LF7DA
;
LF769:
    clr $0058
    ldaa    $005B
    cmpa    #$07
    bhi LF77C
    cmpa    #$05
    blt LF77C
    jsr LFA3B
    jsr LFA2D
LF77C:
    ldx #$44C0
    jsr LFA55
LF782:
    jsr LFA94
    inx
    cpx #$44DF
    bne LF782
    jsr LFA6A
    ldx #$459F
    jsr LFA55
LF794:
    dex
    jsr LFA7F
    cpx #$4580
    bne LF794
    jsr LFA6A
    ldx #$4640
    jsr LFA55
LF7A6:
    jsr LFA94
    inx
    cpx #$465F
    bne LF7A6
    jsr LFA6A
    ldaa    $005B
    cmpa    #$07
    bhi LF7DA
    cmpa    #$05
    blt LF7DA
    jsr LFA3B
    ldaa    $40,x
    anda    $41,x
    cmpa    #$55
    bne LF7D3
    stx $00D2
    ldx #$8FE6
    stx $00D0
    jsr LFDB5
    bra LF7DA
;
LF7D3:
    ldaa    #$FF
    staa    $006D
    jmp LF24D
;
LF7DA:
    jsr LF99E
LF7DD:
    jsr LF983
    ldaa    $006D
    bpl LF7E6
    bra LF816
;
LF7E6:
    ldaa    $0043
    bne LF809
;   jsr LFC81
    jsr SHOT
    coma
    anda    #$06
    bne LF7FA
;   jsr LFC8C
    jsr INPUT
    coma
    anda    #$1E
    beq LF801
LF7FA:
    clra
    jsr LF9EF
    jmp LF04F
;
LF801:
    ldaa    $0009
    anda    $000A
    oraa    #$04
    bra LF80C
;
LF809:
;   jsr LFC8C
    jsr INPUT
LF80C:
    tab
    andb    #$1E
    cmpb    #$1E
    bne LF819
    clr $00BA
LF816:
    jmp LF24D
;
LF819:
    ldab    $00BA
    bpl LF81F
    bra LF816
;
LF81F:
    lsra
    lsra
    bcc LF826
    jmp LF8C8
;
LF826:
    jsr LFCB2
    dec $005B
    beq LF831
    jmp LF8D7
;
LF831:
    ldaa    $005C
    clr $005E
LF836:
    cmpa    #$07
    blt LF841
    suba    #$07
    inc $005E
    bra LF836
;
LF841:
    cmpa    #$02
    bls LF848
    jmp LF8C1
;
LF848:
    ldaa    $005E
    staa    $005D
    ldaa    #$20
    staa    $005F
LF850:
    lsr $005F
    dec $005E
    bpl LF850
    ldaa    $005F
    ldab    $0044
    beq LF866
    ldab    $005A
    beq LF866
    anda    $00C0
    bra LF868
;
LF866:
    anda    $0045
LF868:
    bne LF8C1
    ldaa    $0047
    beq LF874
    ldaa    $0048
    cmpa    $005D
    beq LF8C1
LF874:
    ldaa    $004A
    beq LF888
    ldaa    $004B
    cmpa    $005D
    bne LF888
    ldaa    #$02
    staa    $00BC
    jsr LFC5C
    clr $004A
LF888:
    ldaa    $005F
    ldab    $0044
    beq LF898
    ldab    $005A
    beq LF898
    oraa    $00C0
    staa    $00C0
    bra LF89C
;
LF898:
    oraa    $0045
    staa    $0045
LF89C:
    ldab    #$FF
    anda    #$1F
    cmpa    #$1F
    bne LF8AF
    stab    $006F
    ldaa    #$10
    staa    $00BC
    jsr LFC5C
    ldab    #$FF
LF8AF:
    stab    $006E
    clra
    staa    $006D
    staa    $0046
    staa    $0049
    ldaa    #$05
    staa    $00BC
    jsr LFC5C
    bra LF8DE
;
LF8C1:
    ldaa    #$FF
    staa    $006D
    jmp LF24D
;
LF8C8:
    lsra
    bcs LF8E1
    ldab    $005B
    cmpb    #$08
    beq LF8E1
    jsr LFCB2
    inc $005B
LF8D7:
    ldaa    #$FF
    staa    $00BA
    jsr LFCCA
LF8DE:
    jmp LF24D

LF8E1:
    lsra
    bcs LF8F4
    jsr LFCB2
    dec $005C
    dec $005C
    bpl LF8D7
    clr $005C
    bra LF8C1
LF8F4:
    lsra
    bcs LF8DE
    jsr LFCB2
    inc $005C
    inc $005C
    ldaa    #$1E
    cmpa    $005C
    bge LF8D7
    staa    $005C
    bra LF8C1

;LOOP:
;   jmp LOOP
;
;
;
LF90A:
    ldx #$4710
    stx $00D2
    ldx #$8E6F
    stx $00D0
    jsr LFDB5
;;;
    ldd #$FFFF
    std $00B0
    std $00B2
    std $00B4
    std $00B6
    std $00B8
    ldaa    #$10
    staa    $005C
    ldaa    #$08
    staa    $005B
    ldaa    #$03
    staa    $00CC
    jmp LFC97
;   jmp SOUND
;
LF933:
    ldaa    #$01
    staa    $005E
LF937:
    ldaa    $0070
    ldx #$8FB4
    ldab    $005E
    lsrb
    cmpb    #$01
    bne LF945
    ldaa    $0071
LF945:
    cmpb    #$02
    bne LF94B
    ldaa    $0072
LF94B:
    cmpb    #$03
    beq LF982
    ldab    $005E
    lsrb
    bcs LF95A
    lsra
    lsra
    lsra
    lsra
    bra LF95C
;
LF95A:
    anda    #$0F
LF95C:
    clrb
    tsta
    beq LF965
LF960:
    addb    #$05
    deca
    bne LF960
LF965:
    abx
    ldaa    $04,x
    psha
    ldaa    $03,x
    psha
    ldaa    $02,x
    psha
    ldaa    $01,x
    psha
    ldaa    $00,x
    psha
    ldx $0073
    jsr LFAA9
    inc $005E
    inc $0074
    bra LF937
LF982:
    rts
LF983:
    ldaa    #$03
    staa    $005E
    ldx #$47C1
    ldab    $0067
LF98C:
    ldaa    #$A5
    decb
    bpl LF993
    ldaa    #$55
LF993:
    staa    $00,x
    staa    $20,x
    inx
    dec $005E
    bpl LF98C
    rts
;
LF99E:
    ldaa    #$07
    staa    $005E
;   ldx #$47DF
    jmp TIMER
LF9A5:
    ldab    $0095
    beq LF9AB
    bpl LF9AF
LF9AB:
    ldaa    #$80
    staa    $006D
LF9AF:
    ldaa    #$AA
    decb
    bpl LF9B5
    coma
LF9B5:
    staa    $00,x
    staa    $20,x
    dex
    dec $005E
    bpl LF9AF
    rts
;
LF9C0:
    ldaa    $0043
    beq LF9E4
    ldaa    $0070
    cmpa    $0040
    bhi LF9DC
    blt LF9E4
    ldaa    $0071
    cmpa    $0041
    bhi LF9DC
    blt LF9E4
    ldaa    $0072
    cmpa    $0042
    bhi LF9DC
    bra LF9E4
;
LF9DC:
    ldaa    $0070
    staa    $0040
    ldd $0071
    std $0041
LF9E4:
    rts
;
LF9E5:
    staa    $0040
    staa    $0041
    staa    $0042
    staa    $0043
    staa    $0044
LF9EF:
    ldx #$0045
LF9F2:
    staa    $00,x
    inx
    cpx #$00E0
    bne LF9F2
    rts
;
LF9FB:
    ldx #$4000
LF9FE:
    staa    $00,x
    inx
    cpx #$4800
    bne LF9FE
    rts
;
LFA07:
    ldd $00,x
    inx
    inx
    pshb
    psha
LFA0D:
    ldaa    $00,x
    bmi LFA1D
    inx
    stx $0073
    pulx
    staa    $00,x
    inx
    pshx
    ldx $0073
    bra LFA0D
;
LFA1D:
    pulb
    pula
    rts
;
LFA20:
    staa    $A0,x
LFA22:
    staa    $20,x
    staa    $40,x
    staa    $60,x
    staa    $80,x
    staa    $00,x
    rts
LFA2D:
    ldd #$5555
LFA30:
    std $00,x
    std $20,x
    std $40,x
    std $60,x
    std $80,x
    rts
;
LFA3B:
    ldaa    $005B
    ldab    #$C0
    mul
    addd    #$4100
    addb    $005C
    std $0075
    ldx $0075
    rts
;
LFA4A:
    ldab    #$07
    mul
    addd    #$4101
    std $0075
    ldx $0075
    rts
;
LFA55:
    ldaa    $00,x
    staa    $007B
    ldaa    $20,x
    staa    $007C
    ldaa    $40,x
    staa    $007D
    ldaa    $60,x
    staa    $007E
    ldaa    $80,x
    staa    $007F
    rts
LFA6A:
    ldaa    $007B
    staa    $00,x
    ldaa    $007C
    staa    $20,x
    ldaa    $007D
    staa    $40,x
    ldaa    $007E
    staa    $60,x
    ldaa    $007F
    staa    $80,x
    rts
;
LFA7F:
    ldaa    $00,x
    staa    $01,x
    ldaa    $20,x
    staa    $21,x
    ldaa    $40,x
    staa    $41,x
    ldaa    $60,x
    staa    $61,x
    ldaa    $80,x
    staa    $81,x
    rts
;
LFA94:
    ldaa    $01,x
    staa    $00,x
    ldaa    $21,x
    staa    $20,x
    ldaa    $41,x
    staa    $40,x
    ldaa    $61,x
    staa    $60,x
    ldaa    $81,x
    staa    $80,x
    rts

LFAA9:
    pula
    staa    $00CE
    pula
    staa    $00CF
    pula
    staa    $00,x
    pula
    staa    $20,x
    pula
    staa    $40,x
    pula
    staa    $60,x
    pula
    staa    $80,x
    ldaa    $00CF
    psha
    ldaa    $00CE
    psha
    rts
;
LFAC5:
    ldd $0009
    addd    #$0F8B
    std $001A
    ldaa    #$10
    oraa    $0018
    staa    $0018
    ldaa    #$FF
    staa    $0066
    rti
LFAD7:
    ldaa    $0019
    bita    #$20
    beq LFAEA
    ldd $0009
    addd    $0090
    std $001C
    ldaa    $0002
    eora    #$40
    staa    $0002
    rti
;
LFAEA:
    ldd $0009
    std $001A
    cli
    ldaa    #$FF
    staa    $00C1
;   jsr LFC81
    jsr SHOT
    tab
    andb    #$0E
    cmpb    #$0E
    bne LFB02
LFAFD:
    clr $00C3
    bra LFB1A
;
LFB02:
    ldab    $0043
    beq LFAFD
    ldab    $00C3
    bmi LFB1A
    bita    #$08
    bne LFB1A
    ldab    #$FF
    stab    $00C3
    com $0068
    bpl LFB1A
    jsr LFC9E
LFB1A:
    ldaa    $0068
    bpl LFB21
LFB1E:
    jmp LFC54
;
LFB21:
    ldaa    $008C
    beq LFB1E
    ldaa    $006A
    oraa    $006B
    beq LFB42
    ldaa    $008F
    bne LFB3F
    ldx $00CA
    ldd $00,x
    jsr LFCA5
    ldaa    $02,x
    staa    $008F
    inx
    inx
    inx
    stx $00CA
LFB3F:
    dec $008F
LFB42:
    ldaa    $00D7
    beq LFB68
    clr $00CC
    ldaa    $008F
    bne LFB5D
    ldx $00CA
    ldd $00,x
    jsr LFCA5
    ldaa    $02,x
    staa    $008F
    inx
    inx
    inx
    stx $00CA
LFB5D:
    dec $008F
    dec $00D7
    bne LFB68
    jsr LFC9E
LFB68:
    ldaa    $006C
    beq LFB89
    clr $00D7
    cmpa    #$70
    beq LFBA5
    ldaa    $0044
    bne LFB81
    ldaa    $006C
    cmpa    #$40
    bne LFB81
    ldaa    #$01
    staa    $006C
LFB81:
    ldd #$4500
    jsr LFCA5
    bra LFBA8
;
LFB89:
    ldaa    $00CC
    beq LFBA8
    tab
    anda    #$03
    cmpa    #$03
    bne LFBA0
    lsrb
    lsrb
    aslb
    ldx #$8FA2
    abx
    ldd $00,x
    jsr LFCA5
LFBA0:
    dec $00CC
    bne LFBA8
LFBA5:
    jsr LFC9E
LFBA8:
    ldaa    $006A
    oraa    $006B
    oraa    $006C
    oraa    $006D
    oraa    $006E
    oraa    $006F
    beq LFBB9
    jmp LFC54
;
LFBB9:
    inc $008A
    bne LFBC1
    inc $008B
LFBC1:
    ldab    $008B
    ldaa    $008A
    bne LFBE5
    ldaa    #$FF
    andb    #$01
    bne LFBCF
    staa    $004C
LFBCF:
    ldab    $008B
    andb    #$03
    bne LFBD7
    staa    $004F
LFBD7:
    ldab    $008B
    andb    #$0F
    bne LFBDF
    staa    $0052
LFBDF:
    andb    #$03
    bne LFBE5
    staa    $0056
LFBE5:
    ldab    $008A
    bitb    #$01
    bne LFBF7
    ldaa    $00A0
    bne LFBF4
    coma
    staa    $0055
    ldaa    $00A1
LFBF4:
    deca
    staa    $00A0
LFBF7:
    andb    #$07
    bne LFBFF
    ldaa    #$FF
    staa    $0058
LFBFF:
    andb    #$03
    bne LFC07
    ldaa    #$FF
    staa    $0057
LFC07:
    ldaa    $008A
    bne LFC4B
    ldaa    $000A
    tab
    anda    #$03
    aslb
    adca    #$00
    staa    $00C2
    ldab    #$20
    stab    $00BE
LFC19:
    lsr $00BE
    deca
    bpl LFC19
    ldaa    $00BE
    ldab    $0044
    beq LFC2D
    ldab    $005A
    beq LFC2D
    anda    $00C0
    bra LFC2F
;
LFC2D:
    anda    $0045
LFC2F:
    bne LFC4B
    ldaa    #$FF
    ldab    $008B
    andb    #$03
    bne LFC41
    ldab    $00C2
    stab    $004B
    staa    $0049
    bra LFC4B
;
LFC41:
    cmpb    #$02
    bne LFC4B
    ldab    $00C2
    stab    $0048
    staa    $0046
LFC4B:
    ldaa    $008A
    anda    #$7F
    bne LFC54
    dec $0095
LFC54:
    clr $0066
LFC57:
    ldaa    $0066
    bpl LFC57
    rti
;
LFC5C:
    ldaa    $00BC
    ldab    $0044
    beq LFC74
    ldab    $005A
    beq LFC74
    adda    $0064
    daa
    staa    $0064
    ldaa    $0063
    adca    #$00
    daa
    staa    $0063
    bra LFC80
;
LFC74:
    adda    $0061
    daa
    staa    $0061
    ldaa    $0060
    adca    #$00
    daa
    staa    $0060
LFC80:
    rts

;
LFC81:
    ldaa    $0002
    anda    #$FE
    oraa    #$02
    staa    $0002
    ldaa    $0003
    rts

LFC8C:
    ldaa    $0002
    anda    #$FD
    oraa    #$01
    staa    $0002
    ldaa    $0003
    rts
;
LFC97:
    ldaa    $0002
    oraa    #$20
    staa    $0002
    rts
;
LFC9E:
    ldaa    $0002
    anda    #$DF
    staa    $0002
    rts
;
LFCA5:
    std $0090
    addd    $0009
    std $001C
    ldaa    $0018
    oraa    #$20
    staa    $0018
    rts
;
LFCB2:
    jsr LFA3B
    ldd $00B0
    std $00,x
    ldd $00B2
    std $20,x
    ldd $00B4
    std $40,x
    ldd $00B6
    std $60,x
    ldd $00B8
    std $80,x
    rts
LFCCA:
    jsr LFA3B
    addd    #$00A0
    std $0077
    ldab    #$20
    ldaa    $00,x
LFCD6:
    cmpa    $00,x
    bne LFCE6
    cmpa    $01,x
    bne LFCE6
    abx
    cpx $0077
    bne LFCD6
    clra
    bra LFCE8

LFCE6:
    ldaa    #$FF
LFCE8:
    ldab    $005B
    cmpb    #$03
    bgt LFCF3
    tsta
    bne LFCF8
    bra LFD21
;
LFCF3:
    tsta
    beq LFD65
    bra LFD21
;
LFCF8:
    cmpb    #$01
    bne LFD0E
    ldaa    $004D
    beq LFD0E
    ldaa    $005C
    inca
    suba    $004E
    bmi LFD0E
    cmpa    #$02
    bgt LFD0E
    jmp LFDB0
;
LFD0E:
    cmpb    #$02
    bne LFD24
    ldaa    $0050
    beq LFD24
    ldaa    $005C
    inca
    suba    $0051
    bmi LFD24
    cmpa    #$04
    bgt LFD24
LFD21:
    jmp LFDB0

LFD24:
    cmpb    #$03
    bne LFD65
    ldaa    $0053
    beq LFD65
    ldaa    $005C
    inca
    suba    $0054
    bmi LFD65
    cmpa    #$02
    bgt LFD65
    ldaa    #$02
    staa    $00BC
    jsr LFC5C
    clrb
    jsr LFDDE
    ldx #$4340
    ldab    $0054
    abx
    jsr LFA6A
    pshx
    ldab    #$01
    jsr LFDDE
    pulx
    inx
    jsr LFA6A
    clr $008F
    ldx #$8F96
    stx $00CA
    jsr LFC97
;   jsr SOUND
    ldaa    #$2F
    staa    $00D7
;
LFD65:
    ldx #$8E6F
    stx $0077
    ldx $0075
    ldd $00,x
    std $00B0
    ldd $20,x
    std $00B2
    ldd $40,x
    std $00B4
    ldd $60,x
    std $00B6
    ldd $80,x
    std $00B8
    ldd $0075
    addd    #$00A0
    std $005E
LFD87:
    ldx $0077
    ldd $00,x
    inx
    inx
    stx $0077
    ldx $0075
    anda    $00,x
    andb    $01,x
    std $00,x
    ldab    #$20
    abx
    stx $0075
    cpx $005E
    bne LFD87
    ldaa    $00CC
    beq LFDA8
    eora    #$0C
    bra LFDAA

LFDA8:
    ldaa    #$0F
LFDAA:
    staa    $00CC
    jsr LFC97
;   jsr SOUND
    rts
;
LFDB0:
    ldaa    #$FF
    staa    $006D
    rts

LFDB5:
    ldx $00D0
    ldd $00,x
    pshb
    psha
    ldd $02,x
    pshb
    psha
    ldd $04,x
    pshb
    psha
    ldd $06,x
    pshb
    psha
    ldd $08,x
    ldx $00D2
    std $80,x
    pula
    pulb
    std $60,x
    pula
    pulb
    std $40,x
    pula
    pulb
    std $20,x
    pula
    pulb
    std $00,x
    rts
;
LFDDE:
    ldx #$8DF7
    abx
    ldaa    $03,x
    staa    $007B
    ldaa    $08,x
    staa    $007C
    ldaa    $0D,x
    staa    $007D
    ldaa    $12,x
    staa    $007E
    ldaa    $17,x
    staa    $007F
    rts
;
;
;
    org $8df7

    .byte $5F,$FF,$FF,$FE,$A5,$7E,$FE,$FE,$FA
;   org $8e00
    .byte $A9,$FF,$FF,$FF,$EA,$6A,$7F,$FB,$FB,$FA,$A9,$5F,$FF,$FF,$FE,$A5
    .byte $D5,$55,$55,$5D,$7F,$7D,$55,$55,$73,$F5,$5F,$FF,$F5,$FF,$D5,$57
    .byte $FF,$FF,$FF,$55,$55,$FF,$FF,$FF,$FF,$51,$51,$40,$00,$00,$00,$40
    .byte $00,$51,$51,$5D,$5D,$7F,$FF,$FF,$FF,$7F,$FF,$5D,$5D,$AA,$AF,$FF
    .byte $FF,$FE,$2F,$FF,$FF,$EA,$BF,$BF,$FF,$FF,$AE,$AF,$EF,$FE,$AA,$EA
    .byte $BF,$5A,$7F,$00,$7F,$5A,$95,$FF,$00,$FF,$95,$A5,$D5,$05,$D5,$A5
    .byte $A5,$7F,$00,$7F,$A5,$6A,$FF,$00,$FF,$6A,$55,$D5,$05,$D5,$55,$F3
    .byte $33,$F0,$03,$FC,$0F,$F3,$F3,$F0,$C3,$F2,$21,$F0,$01,$E8,$0A,$F2
    .byte $A1,$F0,$81,$56,$65,$55,$95,$56,$A5,$59,$99,$55,$95,$5A,$95,$6E
    .byte $E5,$6A,$A5,$6B,$A5,$5A,$95,$40,$68,$03,$0F,$0D,$10,$01,$03,$14
    .byte $20,$16,$09,$13,$09,$0F,$0E,$80,$40,$AC,$14,$16,$20,$20,$02,$0F
    .byte $19,$80,$41,$29,$06,$20,$12,$20,$0F,$20,$07,$20,$07,$20,$05,$20
    .byte $12,$80,$40,$2A,$07,$20,$01,$20,$0B,$20,$0B,$20,$05,$20,$0E,$80
    .byte $40,$22,$2A,$2A,$20,$10,$0C,$05,$01,$13,$05,$20,$13,$05,$0C,$05
    .byte $03,$14,$20,$2A,$2A,$80,$40,$67,$31,$20,$10,$0C,$01,$19,$05,$12
    .byte $80,$40,$A7,$32,$20,$10,$0C,$01,$19,$05,$12,$13,$80,$40,$CB,$07
    .byte $01,$0D,$05,$20,$0F,$16,$05,$12,$80,$41,$62,$2D,$2D,$2D,$20,$08
    .byte $09,$20,$20,$20,$13,$03,$0F,$12,$05,$20,$3A,$20,$20,$20,$20,$20
    .byte $20,$20,$2D,$2D,$2D,$80,$41,$C3,$31,$10,$3A,$80,$41,$D1,$32,$10
    .byte $3A,$80,$41,$A4,$03,$0F,$10,$19,$12,$09,$07,$08,$14,$20,$02,$19
;
    .byte $20,$0B,$0F,$0E,$01,$0D,$09,$20,$31,$39,$38,$31,$80

LFF4D:
    ldx $0073
    ldaa    $0070
    anda    #$0F
LFF53:
    adda    #$30
LFF55:
    staa    $00,x
    inx
    ldaa    $0071
    jsr LFF61
    inx
    inx
    ldaa    $0072
LFF61:
    tab
    lsra
    lsra
    lsra
    lsra
    adda    #$30
    andb    #$0F
    addb    #$30
    std $00,x
    rts
;
    .byte $06
    .byte $BB,$20,$02,$FF,$10,$03,$5D,$10,$03,$FE,$10,$03,$C5,$10,$03,$5D
    .byte $20,$02,$FF,$10,$03,$5D,$10,$04,$79,$10,$03,$5D,$10,$03,$8D,$10
    .byte $02,$FF,$10,$03,$5D,$20,$05,$53,$10,$05,$FE,$08,$05,$53,$08,$05
    .byte $07,$10,$03,$5D,$03,$8D,$03,$FE,$04,$79,$A8,$A8,$08,$88,$A8,$A8
    .byte $80,$80,$A8,$80,$A8,$88,$88,$88,$A8,$A0,$20,$20,$20,$A8,$A8,$08
    .byte $A8,$80,$A8,$A8,$08,$A8,$08,$A8,$08,$28,$88,$A8,$08,$A8,$80,$A8
    .byte $08,$A8,$A8,$80,$A8,$88,$A8,$A8,$08,$08,$08,$08,$A8,$88,$A8,$88
    .byte $A8,$A8,$88,$A8,$08,$A8,$51,$11,$50,$01,$54,$05,$51,$51,$50,$41