fix backspace behavior, click speaker!

This commit is contained in:
David Stancu 2018-02-08 22:22:16 -05:00
parent 31ae6bfcb5
commit de2c56450c
2 changed files with 23 additions and 127 deletions

View File

@ -28,6 +28,8 @@ There are two scripts here which will get all the tools needed to assemble the g
The `assemble` script runs the source through Merlin32, then changes the ProDOS file kind to `S16`, an executable format that is used for GS/OS applications. `_FileInformation.txt` is what `cadius` uses to manage the ProDOS metadata for each record (since obviously this information can't be mapped to your computer's filesystem).
I also extracted the Merlin16 macros from the original images. I'm not using them yet but I imagine I will need to in order to implement quitting, etc.
## References
There are a lot of good materials out there: here is what I used to make this. Additionally, thank you to the Apple IIGS Enthusiasts Facebook group and `#a2chat` over at `irc.a2central.com` for answering my questions.

View File

@ -2,6 +2,9 @@
typ $B3
dsk main.l
SPEAKER equ $00C030
PRODOS16 equ $E100A8
; ensure 16-bit mode (unnecessary?)
clc
xce
@ -50,7 +53,7 @@ keydown cmp #$8B ; up
cmp #$88 ; left
beq left
cmp #$95 ; right
beq colinc
beq right
cmp #$FF ; backspace
beq backspace
cmp #$8D ; return
@ -62,17 +65,20 @@ finkey ldal $00C010 ; clear strobe bit
rts
up cpy #0
beq finkey
beq ping
dey
jmp finkey
down cpy #22
beq finkey
beq ping
iny
jmp finkey
left cpx #0
beq finkey
beq ping
dex
jmp finkey
right cpx #39
beq ping
jmp *+2
colinc cpx #39
beq :rolcol
inx
@ -82,11 +88,18 @@ colinc cpx #39
return ldx #0
jmp down
backspace lda #$A0
jsr drawchar
jmp left
cpx #0
beq :contbs
dex
:contbs jsr drawchar
jmp finkey
ping pha
ldal SPEAKER
pla
jmp finkey
; $B0 is the start of the char table for numbers
; we start by preserving our registers
drawpos pha
phx
; draw the parens and comma
@ -218,126 +231,7 @@ tencount ldx #0
jmp :substart
:subout rts
; working text blit
* ldx #hithere+2 ; strl, first two bytes are strlen, # denotes immediate addr val
* ldy #$0400 ; start of text buffer on 00
* ldal hithere
* dec
* mvn $02, $00
* brk
; Important locations
SPEAKER equ $E0C030
PRODOS16 equ $E100A8
jsl PRODOS16
; This exit code is "device busy", why is it the only one
; that works?!
da $29
adrl QP
bcs ERROR
ERROR brk
QP adrl $0000
da $00
hithere strl "this was excruciating"
brkboi brk
bufbase da #40