git.haldean.org x6502 / 544c4ae
More work on minigame, more debugging output. mostly just committing to switch branches. Will Haldean Brown 7 years ago
2 changed file(s) with 43 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
100100
101101 if (get_emu_flag(m, EMU_FLAG_DIRTY)) {
102102 uint16_t addr = m->dirty_mem_addr;
103
104 #ifdef DEBUG
105 fprintf(stderr, "dirty address %04X has value %02x\n",
106 addr, m->mem[addr]);
107 #endif
108
103109 if (addr == IO_PUTCHAR) {
104110 if (io_modeflags & IO_MODEFLAG_VTERM) {
105111 wprintw(window, "%c", m->mem[addr]);
00 #include <stdio.s>
1
2 ; $00 low byte of character address
3 ; $01 high byte of character address
14
25 rows = 25
36 cols = 40
4952 cmp #$6A ; 6A == 'j'
5053 bne checkk
5154 ; it's a j. move down.
52 tya
5355 clc
56
57 lda $00
5458 adc #cols
59 sta $00
60
61 lda $01
62 adc #$00
63 sta $01
64
5565 jmp checkbounds
5666
5767 checkk:
5868 cmp #$6B ; 6B == 'k'
5969 bne checkh
6070 ; it's a k. move up.
61 tya
6271 sec
72
73 lda $00
6374 sbc #cols
75 sta $00
76
77 lda $01
78 sbc #$00
79 sta $01
80
6481 jmp checkbounds
6582
6683 checkh:
6784 cmp #$68 ; 68 == 'h'
6885 bne checkl
6986 ; it's an h. move left.
70 tya
7187 sec
88
89 lda $00
7290 sbc #$02
91 sta $00
92
93 lda $01
94 sbc #$00
95 sta $01
96
7397 jmp checkbounds
7498
7599 checkl:
76100 cmp #$6C ; 6C == 'l'
77101 bne done
78 ; it's an h. move left.
79 tya
102 ; it's an l. move right.
80103 clc
104
105 lda $00
81106 adc #$02
107 sta $00
108
109 lda $01
110 adc #$00
111 sta $01
112
82113 jmp checkbounds
83114
84115 checkbounds:
85 ; TODO
86 tay
87
116 checked:
88117 done:
89118 pla
90119 rti