-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some tidying, starting to work on a cooler demo.
- Loading branch information
Showing
7 changed files
with
120 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ case RTI: | |
break; | ||
|
||
case WAI: | ||
wait_for_interrupt = 1; | ||
m->emu_flags |= EMU_FLAG_WAIT_FOR_INTERRUPT; | ||
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#include <stdio.s> | ||
|
||
rows = 25 | ||
cols = 40 | ||
|
||
; load location of ISR | ||
lda #<isr | ||
sta $FFFE | ||
lda #>isr | ||
sta $FFFF | ||
|
||
; activate vterm mode | ||
lda #$01 | ||
sta $FF02 | ||
|
||
; shiny pretty colors | ||
lda #$04 | ||
sta paint | ||
|
||
; register and addressing init | ||
lda #$00 | ||
sta $00 | ||
lda #$FB | ||
sta $01 | ||
|
||
lda #$A4 | ||
ldy #$00 | ||
|
||
cli | ||
|
||
loop | ||
sta ($00),Y | ||
wai | ||
jmp loop | ||
|
||
isr: | ||
pha | ||
|
||
; clear existing character | ||
lda #$20 | ||
sta ($00),Y | ||
|
||
lda getc | ||
|
||
cmp #$71 ; 71 == 'q' | ||
bne checkj | ||
ext | ||
|
||
checkj: | ||
cmp #$6A ; 6A == 'j' | ||
bne checkk | ||
; it's a j. move down. | ||
tya | ||
clc | ||
adc #cols | ||
jmp checkbounds | ||
|
||
checkk: | ||
cmp #$6B ; 6B == 'k' | ||
bne checkh | ||
; it's a k. move up. | ||
tya | ||
sec | ||
sbc #cols | ||
jmp checkbounds | ||
|
||
checkh: | ||
cmp #$68 ; 68 == 'h' | ||
bne checkl | ||
; it's an h. move left. | ||
tya | ||
sec | ||
sbc #$02 | ||
jmp checkbounds | ||
|
||
checkl: | ||
cmp #$6C ; 6C == 'l' | ||
bne done | ||
; it's an h. move left. | ||
tya | ||
clc | ||
adc #$02 | ||
jmp checkbounds | ||
|
||
checkbounds: | ||
; TODO | ||
tay | ||
|
||
done: | ||
pla | ||
rti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
putc = $FF00 | ||
getc = $FF01 | ||
iomode = $FF02 | ||
paint = $FEE8 | ||
|
||
#define debug .byt $FC | ||
#define ext .byt $FF | ||
|