Version 1 'final' demo for the Apple II'

This commit is contained in:
Madeline 2022-07-19 20:16:36 -04:00
commit df654cb1b2
2 changed files with 185 additions and 0 deletions

185
DEMO.ASM Normal file
View File

@ -0,0 +1,185 @@
.ORG $8000
CLOBBER:
LDA #$04 ; text / lo mem address
STA $0B
LDA #$00 ; text / lo mem address
STA $0A
LDA #$60 ; graphic asset address
STA $0D
LDA #$00 ; graphic asset address
STA $0C
CLOBNP:
LDY #$00 ; indirect addressing mode stuff
CLOBLOOP:
LDA ($0C),y
STA ($0A),y
INY
CPY #$FF
BNE CLOBLOOP
LDY $0B
INY
STY $0B
CPY #$20
BEQ TIMER
LDY $0D
INY
STY $0D
JMP CLOBNP
TIMER:
LDY #$00
STY $71 ; timer1 y
OUTERLOOP:
LDY $71
LDX #$00
STX $70 ; timer1 x
INNERLOOP:
LDX $70
INX
STX $70
CPX #$FF
BNE INNERLOOP
INY
STY $71
CPY #$FF
BNE OUTERLOOP
JSR LGRMODE
JMP TIMER2
TIMER2:
LDY #$00
OUTERLOOP2:
LDX #$00
INNERLOOP2:
INX
CPX #$FF
BNE INNERLOOP2
INY
CPY #$FF
BNE OUTERLOOP2
JSR INITDISPLAY
LGRMODE:
LDA #$FF
STA $C056
STA $C054
STA $C050
RTS
INITDISPLAY:
LDA #$FF
STA $C057
STA $C054
STA $C050
LDA #$80
STA $2000
STA $2001
STA $2002
STA $2003
JMP XOREFFECT
LOADBUFFER:
LDA #$FF
LDX #$00
LOADLOOP:
STA $20,x
INX
CPX #$28
BNE LOADLOOP
JMP GLITCHINIT
LOOP:
NOP
JMP LOOP
XOREFFECT:
LDA #$34
STA $01 ; start memory address
LDA #$25
STA $02 ; width of individual row
LDA $01
ADC $02
STA $03 ; memory address of end of line
LDA #$00
STA $64 ; counter 1
STA $65 ; counter 2
STA $66 ; counter 3
LDA $00
STA $08 ; low order address byte
LDA $20
STA $09 ; high order address byte
GLITCHINIT:
LDX #$65
STX $04 ; memory address currently being grabbed
GLITCHSTORE:
;LDA $2000,x ; grab the byte from HGR memory
LDA #$FF
STA $20,x ; store it in zero page
INX
STX $04 ; store current memory address
TXA
CMP $02
BNE GLITCHSTORE
LTIMERY:
LDA #$00
STA $65
LTIMERX:
LDA #$00
STA $64
XEINIT:
LDX $01
XELINE:
LDA $2000,x
EOR $20,x
STA $2000,x
INX
STX $04 ; store current XOR byte
TXA
CMP $02 ; compare to width of row
BNE XELINE
LTIMER:
LDX $64 ; start of long timer
INX
STX $64
CPX #$FF
BNE XEINIT
LDX $65
INX
STX $65
CPX #$02
BNE LTIMERX
LDA #$FF ; switch to page 2
STA $C050
STA $C052
STA $C057
STA $C055
; go through once more in the timer
LDA #$00
STA $64
STA $65
LDX $66
INX
CPX #$02
BEQ CLEANUP
;LDX $66 ; don't need this third variable
;INX
;STX $66
;CPX #$FF
;BNE LTIMERY
;JMP XEINIT
;SWITCHPAGE:
;LDA #$FF
;STA $C055
;RTS
CLEANUP:
LDA #$00
STA $4000
STA $4001
STA $4002
STA $4003
JMP CLEANUP

BIN
HTIMG.BIN Normal file

Binary file not shown.