// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-01 10:59:20
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0800  End: $ffff  (63488 bytes)
// Crunched with Idiots Packer v2.1 — depacked by emulation
// Packer entry: $080b (via BASIC SYS 2059)
// Entry point:  $09bb (2491)
//
// Code: 196 bytes, Data: 63292 bytes
// Labels: 58, Subroutines: 4
//
// Verification: 5 line(s) auto-corrected to .byte for exact byte matching
//
// Cross-references: all OK
// ============================================


// --- Region $081f-$0866 ---
.pc = $081f "loc_081f"

loc_081f:
        sei
        ldx #$ff
        txs
        cld
        lda #$06
        sta $01
        stx $0291
        inx
        stx $d020
        stx $d021
        lda #$15
        sta $d018

loc_0837:
.label smc_0838 = * + 1
.label smc_0839 = * + 2
        lda $09ba                                   // !SMC: modified by $09c7, $09cc
        beq loc_0849
        jsr $ffd2
        inc smc_0838
        bne loc_0837
        inc smc_0839
        bne loc_0837

loc_0849:
        cli
        jsr $f13e
        cmp #$20
        beq loc_085d
        cmp #$59
        bne loc_0849
        lda #$2c
        sta $4529
        jmp loc_fce2

loc_085d:
        lda #$ce
        sta $4529
        jmp loc_fce2

dat_0865:
        .byte $93,$11                               // ..

// --- Region $09bb-$09d2 ---
.pc = $09bb "main_09bb"

main_09bb:
        lda #$37
        sta $01
        jsr $ff81
        jsr $ff84
        lda #$65
        sta smc_0838                                // SMC: modifies $0838
        lda #$08
        sta smc_0839                                // SMC: modifies $0839
        jmp loc_081f

dat_09d2:
        // === Fill data (1 bytes, $09d2-$09d2) ===
        .byte $00                                   // .

// --- Region $0cf0-$0cf0 ---
.pc = $0cf0 "Program $0cf0"
        brk

// --- Region $3446-$3446 ---
.pc = $3446 "Segment $3446"
        brk

// --- Region $4145-$4147 ---
.pc = $4145 "Segment $4145"
        brk

dat_4146:
        .byte $00                                   // .
        brk

// --- Region $4843-$4843 ---
.pc = $4843 "sub_4843"
// Referenced by: jsr from $ff8f

sub_4843:
        brk

// --- Region $4952-$4952 ---
.pc = $4952 "sub_4952"
// Referenced by: jsr from $ffd9

sub_4952:
        brk

// --- Region $4d49-$4d49 ---
.pc = $4d49 "loc_4d49"

loc_4d49:
        brk

// --- Region $4e55-$4e55 ---
.pc = $4e55 "sub_4e55"
// Referenced by: jsr from $ffa5

sub_4e55:
        brk

// --- Region $4f46-$4f4d ---
.pc = $4f46 "Segment $4f46"
        brk

dat_4f47:
        .byte $00,$00,$00,$00,$00,$00               // ......
        brk

// --- Region $509a-$509a ---
.pc = $509a "Segment $509a"
        brk

// --- Region $5942-$5942 ---
.pc = $5942 "sub_5942"
// Referenced by: jsr from $ffd6

sub_5942:
        brk

// --- Region $8ed0-$8ed0 ---
.pc = $8ed0 "Segment $8ed0"
        brk

// --- Region $f13e-$f13e ---
.pc = $f13e "Segment $f13e"
        brk

// --- Region $fce2-$fce2 ---
.pc = $fce2 "loc_fce2"

loc_fce2:
        brk

// --- Region $ff81-$ffac ---
.pc = $ff81 "Segment $ff81"
        ora $1111
        ora ($04),y
        ora #$20
        txs
        bvc loc_ffd7
        eor $41
        .byte $53,$45                               // sre ($45),y // ILLEGAL
        jsr sub_4843
        .byte $4f,$4f,$53                           // sre $534f // ILLEGAL
        eor $20
        .byte $47,$41                               // sre $41 // ILLEGAL
        eor $2045
        eor $444f
        eor $0d
        ora ($11),y
        .byte $04,$0a                               // nop $0a // ILLEGAL
        jsr sub_4e55
        jmp loc_4d49

txt_ffab:
        .text "IT"

// --- Region $ffd2-$ffff ---
.pc = $ffd2 "Segment $ffd2"
        eor #$5a
        eor $44
.label loc_ffd7 = * + 1
        jsr sub_5942
        jsr sub_4952
        .byte $43,$4b                               // sre ($4b,x) // ILLEGAL
        eor $4620,y
        .byte $4f,$52,$20                           // sre $2052 // ILLEGAL
        lsr $34
        and ($0d,x)
        brk

loc_ffe9:
        lda #$37
        sta $01
        jsr $ff81
        jsr $ff84
        lda #$65
        sta smc_0838
        lda #$08
        sta smc_0839
        jmp loc_081f

// ============================================
// Data blocks
// ============================================

// --- Region $0801-$081e ---
.pc = $0801 "dat_0801"

dat_0801:
        // === BASIC loader stub ===
        .byte $0e,$08                                                     // [corrected] was: .byte $0b,$08                               // next line pointer ($080b)
        .byte $83,$bb                                                     // [corrected] was: .byte $00,$00                               // line number 0
        .byte $9e                                   // SYS token
        .byte $20,$28,$32,$30
        .byte $36                                                         // [corrected] was: .byte $00                                   // end of line
        .byte $34,$29                                                     // [corrected] was: .byte $00,$00                               // end of BASIC program
        .byte $00,$00,$00,$a9,$60,$8d,$38,$08,$a9,$a3,$8d,$39,$08,$a9,$e1,$8d // ....`.8....9....
        .byte $28,$03                               // (.

// --- Region $0867-$09ba ---
.pc = $0867 "txt_0867"

txt_0867:
        .text "              "
        .byte $05,$12                               // ..

txt_0877:
        .text "            "
        .byte $0d                                   // string terminator

txt_0884:
        .text "              "
        .byte $12                                   // .

txt_0893:
        .text " F4 PROUDLY "
        .byte $98,$92,$a1,$0d                       // ....

txt_08a3:
        .text "              "
        .byte $05,$12                               // ..

txt_08b3:
        .text "            "
        .byte $98,$92,$a1,$0d                       // ....

txt_08c3:
        .text "               "
        .byte $12,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$92,$be,$0d,$11 // ................

txt_08e2:
        .text "                 "
        .byte $9f                                   // .

txt_08f4:
        .text "PRESENTS"
        .byte $0d                                   // string terminator
        .byte $11,$11                               // ..

txt_08ff:
        .text "        "
        .byte $9e                                   // .

txt_0908:
        .text "THE TRAINER OF IMPLOSION! "
        .byte $0d                                   // string terminator

txt_0923:
        .text "        "
        .byte $a3                                   // '#' | $80 (end-of-string marker)
        .fill 24, $a3
        .byte $20,$0d,$11,$11,$11                   //  ....

txt_0949:
        .text "         "
        .byte $9a                                   // .

txt_0953:
        .text "PLEASE CHOOSE GAME MODE"
        .byte $0d                                   // string terminator
        .byte $11,$11                               // ..

txt_096d:
        .text "          UNLIMITED LIVES (Y/N)"
        .byte $0d                                   // string terminator
        .byte $11,$11,$11,$11,$20,$05               // .... .

txt_0993:
        .text "GAME VERSION REALIZED BY RICKY FOR F4!"
        .byte $0d                                   // string terminator
        .byte $00                                   // .

// --- Region $0cf1-$0cf1 ---
.pc = $0cf1 "dat_0cf1"

dat_0cf1:
        // === Fill data (1 bytes, $0cf1-$0cf1) ===
        .byte $00                                   // .

// --- Region $3447-$3447 ---
.pc = $3447 "dat_3447"

dat_3447:
        // === Fill data (1 bytes, $3447-$3447) ===
        .byte $00                                   // .

// --- Region $4148-$4148 ---
.pc = $4148 "dat_4148"

dat_4148:
        // === Fill data (1 bytes, $4148-$4148) ===
        .byte $00                                   // .

// --- Region $4844-$4844 ---
.pc = $4844 "dat_4844"

dat_4844:
        // === Fill data (1 bytes, $4844-$4844) ===
        .byte $00                                   // .

// --- Region $4953-$4953 ---
.pc = $4953 "dat_4953"

dat_4953:
        // === Fill data (1 bytes, $4953-$4953) ===
        .byte $00                                   // .

// --- Region $4d4a-$4d4a ---
.pc = $4d4a "dat_4d4a"

dat_4d4a:
        // === Fill data (1 bytes, $4d4a-$4d4a) ===
        .byte $00                                   // .

// --- Region $4e56-$4e56 ---
.pc = $4e56 "dat_4e56"

dat_4e56:
        // === Fill data (1 bytes, $4e56-$4e56) ===
        .byte $00                                   // .

// --- Region $4f4e-$4f4e ---
.pc = $4f4e "dat_4f4e"

dat_4f4e:
        // === Fill data (1 bytes, $4f4e-$4f4e) ===
        .byte $00                                   // .

// --- Region $509b-$509b ---
.pc = $509b "dat_509b"

dat_509b:
        // === Fill data (1 bytes, $509b-$509b) ===
        .byte $00                                   // .

// --- Region $5943-$5943 ---
.pc = $5943 "dat_5943"

dat_5943:
        // === Fill data (1 bytes, $5943-$5943) ===
        .byte $00                                   // .

// --- Region $8ed1-$8ed1 ---
.pc = $8ed1 "dat_8ed1"

dat_8ed1:
        // === Fill data (1 bytes, $8ed1-$8ed1) ===
        .byte $00                                   // .

// --- Region $f13f-$f13f ---
.pc = $f13f "dat_f13f"

dat_f13f:
        // === Fill data (1 bytes, $f13f-$f13f) ===
        .byte $00                                   // .

// --- Region $fce3-$fce3 ---
.pc = $fce3 "dat_fce3"

dat_fce3:
        // === Fill data (1 bytes, $fce3-$fce3) ===
        .byte $00                                   // .

// --- Region $fe87-$ff80 ---
.pc = $fe87 "dat_fe87"

dat_fe87:
        .byte $0a,$08,$be,$1b,$9e
        .text "2059"
        .byte $00,$a2,$00,$78,$86,$01,$bd
        .byte $ac,$07,$9d,$32,$fe,$e8,$d0,$f7,$ce,$12,$08,$ce,$15,$08,$ad,$12 // ...2............
        .byte $08,$c9,$06,$d0,$ea,$a0,$b1,$4c,$01,$00,$00,$0e,$08,$83,$bb,$9e // .......L........

txt_feb7:
        .text " (2064)"
        .byte $00                                   // string terminator
        .byte $00,$00,$a9,$60,$8d,$38,$08,$a9,$a3,$8d,$39,$08,$a9,$e1,$8d,$28 // ...`.8....9....(
        .byte $03,$78,$a2,$ff,$9a,$d8,$a9,$06,$85,$01,$8e,$91,$02,$e8,$8e,$20 // .x............. 
        .byte $d0,$8e,$21,$d0,$a9,$15,$8d,$18,$d0,$ad,$ba,$09,$f0,$0d,$20,$d2 // ..!........... .
        .byte $ff,$ee,$38,$08,$d0,$f3,$ee,$39,$08,$d0,$ee,$58,$20,$3e,$f1,$c9 // ..8....9...X >..
        .byte $20,$f0,$0c,$c9,$59,$d0,$f4,$a9,$2c,$8d,$29,$45,$4c,$e2,$fc,$a9 //  ...Y...,.)EL...
        .byte $ce,$8d,$29,$45,$4c,$e2,$fc,$93       // ..)EL...

txt_ff17:
        .encoding "screencode_mixed"
        .text "qdn erdl mdn r"
        .encoding "petscii_upper"

txt_ff25:
        .text " F4 PROUDLY "
        .byte $98,$92,$a1,$0d,$04,$0e,$20,$05,$12,$04,$0c,$20,$98,$92,$a1,$0d // ...... .... ....
        .byte $04,$0f,$20,$12,$04,$0b,$a2,$92,$be,$0d,$11,$04,$11,$20,$9f // .. .......... .

txt_ff50:
        .text "PRESENTS"
        .byte $0d                                   // string terminator
        .byte $11,$11,$04,$08,$20,$9e               // .... .

txt_ff5f:
        .text "THE TRAINER OF IMPLOSION! "
        .byte $0d                                   // string terminator
        .byte $04,$08,$20,$04,$19,$a3,$20           // .. ... 

// --- Region $ffad-$ffd1 ---
.pc = $ffad "Segment $ffad"
        .text "ED LIVES (Y/N)"
        .byte $0d,$04
        .byte $04,$11,$20,$05                       // .. .

txt_ffc1:
        .text "GAME VERSION REAL"
