mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-06 20:05:25 +00:00
571b3d403b
--HG-- rename : eg/cinv.60pical => eg/cinv.60p rename : eg/demo.60pical => eg/demo.60p rename : eg/hi.60pical => eg/hi.60p rename : eg/screen.60pical => eg/screen1.60p rename : eg/screen2.60pical => eg/screen2.60p rename : eg/screen3.60pical => eg/screen3.60p
111 lines
1.7 KiB
Plaintext
111 lines
1.7 KiB
Plaintext
assign byte table screen $0400
|
|
assign byte table screen2 1274
|
|
assign byte table screen3 1524
|
|
assign byte table screen4 1774
|
|
|
|
assign byte table colormap 55296
|
|
assign byte table colormap2 55546
|
|
assign byte table colormap3 55796
|
|
assign byte table colormap4 56046
|
|
|
|
assign byte vic_border 53280
|
|
assign byte table vic_bg 53281
|
|
|
|
assign vector cinv 788
|
|
reserve vector save_cinv
|
|
|
|
assign word position $fb
|
|
|
|
reserve byte value
|
|
|
|
reserve word m
|
|
reserve word n
|
|
|
|
routine main {
|
|
lda #5
|
|
sta vic_border
|
|
lda #0
|
|
sta vic_bg
|
|
jsr reset_position
|
|
jsr clear_screen
|
|
sei {
|
|
copy vector cinv to save_cinv
|
|
copy routine our_cinv to cinv
|
|
}
|
|
clc
|
|
repeat bcc { }
|
|
}
|
|
|
|
routine reset_position {
|
|
lda #$00
|
|
sta <position
|
|
lda #$04
|
|
sta >position
|
|
}
|
|
|
|
routine our_cinv {
|
|
lda value
|
|
inc value
|
|
ldy #0
|
|
sta (position), y
|
|
jsr increment_pos
|
|
jsr compare_pos
|
|
if beq {
|
|
jsr reset_position
|
|
} else {
|
|
}
|
|
jmp (save_cinv)
|
|
}
|
|
|
|
routine increment_pos {
|
|
clc
|
|
lda <position
|
|
adc #1
|
|
sta <position
|
|
lda >position
|
|
adc #0
|
|
sta >position
|
|
}
|
|
|
|
routine compare_pos {
|
|
lda <position
|
|
sta <m
|
|
lda >position
|
|
sta >m
|
|
lda #$07
|
|
sta >n
|
|
lda #$e8
|
|
sta <n
|
|
jsr compare_16_bit
|
|
}
|
|
|
|
routine compare_16_bit {
|
|
lda >m
|
|
cmp >n
|
|
if beq {
|
|
lda <m
|
|
cmp <n
|
|
} else {
|
|
}
|
|
}
|
|
|
|
routine clear_screen {
|
|
ldy #0
|
|
repeat bne {
|
|
lda #1
|
|
sta colormap, y
|
|
sta colormap2, y
|
|
sta colormap3, y
|
|
sta colormap4, y
|
|
|
|
lda #32
|
|
sta screen, y
|
|
sta screen2, y
|
|
sta screen3, y
|
|
sta screen4, y
|
|
|
|
iny
|
|
cpy #250
|
|
}
|
|
}
|