;license:MIT ;(c) 2021 by Frank M. !cpu 6502 !to "res/DEMO/BORG",plain *=$310 !source "src/constants.a" ; no code in these !source "src/macros.a" +READ_RAM2_WRITE_RAM2 ;jsr EnableAccelerator ; can't because of animation ;+LOAD_FILE_KEEP_DIR ldx #0 ; read to main memory stx ldrhi stx ldrlo +LDADDR title jsr iLoadFileDirect ldx #7-1 ; we also need to copy the length byte - lda newpath,x sta $BFD0,x dex bpl - +READ_ROM_NO_WRITE lda #$60 sta $609E jsr $6000 ; decompress and show animation lda #$4C sta $8C27 ; exit after 1 cycle sta $ECA ; exit on keypress 1 (joysticks not polled) sta $99 lda #0 sta $8C27+1 sta $ECA+1 lda #1 sta $8C27+2 sta $ECA+2 ldx #7-1 - lda patch, x sta $8C2D, x dex bpl - ; exit on keypress 2 inc $C9 ; must be non-zero jmp $EB0 patch !byte $30,$F8,$EA,$20,$00,$0F,$60 newpath !byte 6 !text "X/BORG" title !byte x_e-x_b x_b !text "X/BORG/BORG" x_e !if * > $3F0 { !error "code is too large, ends at ", * }