summaryrefslogtreecommitdiffstats
path: root/from_toebes/testsnd
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2019-05-28 12:09:03 +0100
committerfishsoupisgood <github@madingley.org>2019-05-28 12:09:03 +0100
commitee33718ab57c5a041b55c70c0ae7e046b3d1592b (patch)
tree118fa6880cb9f8d592516c5b40325f9b7448d0af /from_toebes/testsnd
parent8110dec1577d9a9002119c15467d71d8a1f51bc8 (diff)
downloadwristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.gz
wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.bz2
wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.zip
general tidy up add all the timex apps and the toebes apps and numpad
Diffstat (limited to 'from_toebes/testsnd')
-rw-r--r--from_toebes/testsnd/testsnd.asm155
l---------from_toebes/testsnd/testsnd.known_good1
-rw-r--r--from_toebes/testsnd/testsnd.zap26
-rw-r--r--from_toebes/testsnd/testsnd.zsm154
4 files changed, 336 insertions, 0 deletions
diff --git a/from_toebes/testsnd/testsnd.asm b/from_toebes/testsnd/testsnd.asm
new file mode 100644
index 0000000..949b2dc
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.asm
@@ -0,0 +1,155 @@
+;Name: Test Sound
+;Version: TESTSND
+;Description: This routine tests the various sound capabilities of the datalink.
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+CURRENT_VAL EQU $61
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp DOEVENT0
+ db TABLE0-TABLE0
+L0127: jmp DOEVENT1
+ db TABLE1-TABLE0
+;
+; (3) Program strings
+S6_SOUND: timex6 "SOUND "
+S6_TEST: timex6 " TEST "
+S8_TOEBES: timex "J.TOEBES"
+;
+; (4) State Table
+;
+STATETAB0:
+TABLE0:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ;
+ db EVT_DNNEXT,TIM_ONCE,1 ; Next button
+ db EVT_DNPREV,TIM_ONCE,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNSET,TIM_ONCE,0 ; Set button
+ db EVT_UPSET,TIM_ONCE,0 ;
+ db EVT_END
+
+TABLE1:
+ db 1
+ db EVT_UPNEXT,TIM_ONCE,1 ; Releasing the next button
+ db EVT_UPPREV,TIM_ONCE,1 ; Releasing the prev button
+ db EVT_USER0,TIM_ONCE,0 ; Return to the main state table
+ db EVT_END ; End of table
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+DOEVENT0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_RESUME ; Did another app get called in the meantime?
+ beq REFRESH ; We will refresh the display in this case
+ cmp #EVT_TIMER2 ; Did the initial timer expire?
+ beq REFRESH ; Yes, clean up the screen
+ cmp #EVT_ENTER ; Is this the initial state?
+ beq INITBANNER ; Yes, put up the banner
+ cmp #EVT_DNSET ; Did they hit the set button
+ beq PLAYIT
+ cmp #EVT_UPSET
+ beq SILENCE
+ rts
+;
+; (6) Sound playing code. Note that we go straight to the hardware here for this one
+;
+PLAYIT:
+ lda #ROW_NOTE ; Turn on the little note symbol
+ sta DISP_ROW
+ bset COL_NOTE,DISP_COL
+ lda CURRENT_VAL
+ sta $28
+ rts
+
+SILENCE:
+ lda #ROW_NOTE ; Turn off the little note symbol
+ sta DISP_ROW
+ bclr COL_NOTE,DISP_COL
+ lda #15
+ sta $28
+ rts
+
+REFRESH:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put "SOUND" on the top of the display
+ jsr PUT6TOP
+ ldx CURRENT_VAL
+ jsr FMTX
+ jsr PUTMID34
+ bra JBANNER
+
+INITBANNER:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put 'SOUND ' on the top line
+ jsr PUT6TOP
+ lda #S6_TEST-START ; Put ' TEST ' on the second line
+ jsr PUT6MID
+JBANNER
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ bset 7,WRISTAPP_FLAGS ; Tell them that we are a live application
+ clr CURRENT_VAL
+ rts
+;
+; (8) State Table 1 Handler
+;
+; This is called when we press the prev/next button or when the timer fires during that event
+;
+DOEVENT1:
+ lda BTNSTATE
+ cmp #EVT_DNPREV
+ beq GO_DOWN
+ cmp #EVT_DNNEXT
+ beq GO_UP
+ lda #EVT_USER0
+ jmp POSTEVENT
+
+GO_DOWN bclr 0,SYSFLAGS ; Mark update direction as down
+ bra DOUPDN
+GO_UP bset 0,SYSFLAGS ; Mark update direction as up
+DOUPDN clra
+ jsr CLEARMID
+ sta UPDATE_MIN
+ lda #99
+ sta UPDATE_MAX
+ ldx #CURRENT_VAL
+ lda #UPD_MID34
+ jsr START_UPDATEP
+ bset 4,BTNFLAGS
+ rts
diff --git a/from_toebes/testsnd/testsnd.known_good b/from_toebes/testsnd/testsnd.known_good
new file mode 120000
index 0000000..1ef9b2c
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.known_good
@@ -0,0 +1 @@
+testsnd.zap.app \ No newline at end of file
diff --git a/from_toebes/testsnd/testsnd.zap b/from_toebes/testsnd/testsnd.zap
new file mode 100644
index 0000000..165ef1f
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.zap
@@ -0,0 +1,26 @@
+TDL0724962¬ Applet file header
+Test Sound¬ Applet friendly name
+testsnd1¬ Applet version #
+This routine tests the various sound capabilities of the datalink.
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150 Watch¬
+CC01B7819D9D819D9D819D9D819D9DD6013F81CC016400CC01BC1A050019150D1D1D180E05181D13321D180E0B0E1C001B84001AFF001FFF0080FF0183FF0101FFFF82FF00A2FF001D01A0FF01A3FF0137FF001D128FB691A11A2727A11F2723A11B2731A1822705A1A2270C81A60EB71D181EB661B72881A60EB71D191EA60FB72881CD577AA61BCD587EBE61CD5951CD5920200DCD577AA61BCD587EA621CD58A8A627CC58451E963F6181B691A1832709A1802709A637CC4E89119F2002109F4FCD58D8C704F4A663C704F5AE61A607CD57C7189081¬
+33981¬
+0¬ No data
+Test Sound¬ Applet friendly name
+testsnd2¬ Applet version #
+This routine tests the various sound capabilities of the datalink.
+
+
+TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!¬
+WATCHAPP.HLP¬ Applet help filename
+106¬
+none¬ Applet's parent's app name (if it exists - 'none' if it doesn't)
+Timex Data Link 150s Watch¬
+CC01B7819D9D819D9D819D9D819D9DD6013F81CC016400CC01BC1A050019150D1D1D180E05181D13321D180E0B0E1C001B84001AFF001FFF0080FF0183FF0101FFFF82FF00A2FF001D01A0FF01A3FF0137FF001D128FB691A11A2727A11F2723A11B2731A1822705A1A2270C81A60CB71D181EB661B72881A60CB71D191EA60FB72881CD5AA0A61BCD577FBE61CD5852CD5821200DCD5AA0A61BCD577FA621CD57A9A627CC57461E963F6181B691A1832709A1802709A637CC4E78119F2002109F4FCD57D9C704F4A663C704F5AE61A607CD56C8189081¬
+59850¬
+0¬ No data \ No newline at end of file
diff --git a/from_toebes/testsnd/testsnd.zsm b/from_toebes/testsnd/testsnd.zsm
new file mode 100644
index 0000000..f81b602
--- /dev/null
+++ b/from_toebes/testsnd/testsnd.zsm
@@ -0,0 +1,154 @@
+;Name: Test Sound
+;Version: TESTSND
+;Description: This routine tests the various sound capabilities of the datalink.
+;by John A. Toebes, VIII
+;
+;TIP: Download your watch faster: Download a WristApp once, then do not send it again. It stays in the watch!
+;HelpFile: watchapp.hlp
+;HelpTopic: 106
+ INCLUDE "WRISTAPP.I"
+;
+; (1) Program specific constants
+;
+CURRENT_VAL EQU $61
+;
+; (2) System entry point vectors
+;
+START EQU *
+L0110: jmp MAIN ; The main entry point - WRIST_MAIN
+L0113: rts ; Called when we are suspended for any reason - WRIST_SUSPEND
+ nop
+ nop
+L0116: rts ; Called to handle any timers or time events - WRIST_DOTIC
+ nop
+ nop
+L0119: rts ; Called when the COMM app starts and we have timers pending - WRIST_INCOMM
+ nop
+ nop
+L011c: rts ; Called when the COMM app loads new data - WRIST_NEWDATA
+ nop
+ nop
+
+L011f: lda STATETAB0,X ; The state table get routine - WRIST_GETSTATE
+ rts
+
+L0123: jmp DOEVENT0
+ db TABLE0-TABLE0
+L0127: jmp DOEVENT1
+ db TABLE1-TABLE0
+;
+; (3) Program strings
+S6_SOUND: timex6 "SOUND "
+S6_TEST: timex6 " TEST "
+S8_TOEBES: timex "J.TOEBES"
+;
+; (4) State Table
+;
+TABLE0:
+ db 0
+ db EVT_ENTER,TIM_LONG,0 ; Initial state
+ db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
+ db EVT_TIMER2,TIM_ONCE,0 ;
+ db EVT_DNNEXT,TIM_ONCE,1 ; Next button
+ db EVT_DNPREV,TIM_ONCE,1 ; Prev button
+ db EVT_MODE,TIM_ONCE,$FF ; Mode button
+ db EVT_DNSET,TIM_ONCE,0 ; Set button
+ db EVT_UPSET,TIM_ONCE,0 ;
+ db EVT_END
+
+TABLE1:
+ db 1
+ db EVT_UPNEXT,TIM_ONCE,1 ; Releasing the next button
+ db EVT_UPPREV,TIM_ONCE,1 ; Releasing the prev button
+ db EVT_USER0,TIM_ONCE,0 ; Return to the main state table
+ db EVT_END ; End of table
+;
+; (5) State Table 0 Handler
+; This is called to process the state events.
+; We see ENTER, TIMER2, and RESUME events
+;
+DOEVENT0:
+ bset 1,APP_FLAGS ; Allow us to be suspended
+ lda BTNSTATE ; Get the event
+ cmp #EVT_RESUME ; Did another app get called in the meantime?
+ beq REFRESH ; We will refresh the display in this case
+ cmp #EVT_TIMER2 ; Did the initial timer expire?
+ beq REFRESH ; Yes, clean up the screen
+ cmp #EVT_ENTER ; Is this the initial state?
+ beq INITBANNER ; Yes, put up the banner
+ cmp #EVT_DNSET ; Did they hit the set button
+ beq PLAYIT
+ cmp #EVT_UPSET
+ beq SILENCE
+ rts
+;
+; (6) Sound playing code. Note that we go straight to the hardware here for this one
+;
+PLAYIT:
+ lda #ROW_NOTE ; Turn on the little note symbol
+ sta DISP_ROW
+ bset COL_NOTE,DISP_COL
+ lda CURRENT_VAL
+ sta $28
+ rts
+
+SILENCE:
+ lda #ROW_NOTE ; Turn off the little note symbol
+ sta DISP_ROW
+ bclr COL_NOTE,DISP_COL
+ lda #15
+ sta $28
+ rts
+
+REFRESH:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put "SOUND" on the top of the display
+ jsr PUT6TOP
+ ldx CURRENT_VAL
+ jsr FMTX
+ jsr PUTMID34
+ bra JBANNER
+
+INITBANNER:
+ jsr CLEARALL ; Clear the display
+ lda #S6_SOUND-START ; Put 'SOUND ' on the top line
+ jsr PUT6TOP
+ lda #S6_TEST-START ; Put ' TEST ' on the second line
+ jsr PUT6MID
+JBANNER
+ lda #S8_TOEBES-START
+ jmp BANNER8
+;
+; (7) This is the main initialization routine which is called when we first get the app into memory
+;
+MAIN:
+ bset 7,WRISTAPP_FLAGS ; Tell them that we are a live application
+ clr CURRENT_VAL
+ rts
+;
+; (8) State Table 1 Handler
+;
+; This is called when we press the prev/next button or when the timer fires during that event
+;
+DOEVENT1:
+ lda BTNSTATE
+ cmp #EVT_DNPREV
+ beq GO_DOWN
+ cmp #EVT_DNNEXT
+ beq GO_UP
+ lda #EVT_USER0
+ jmp POSTEVENT
+
+GO_DOWN bclr 0,SYSFLAGS ; Mark update direction as down
+ bra DOUPDN
+GO_UP bset 0,SYSFLAGS ; Mark update direction as up
+DOUPDN clra
+ jsr CLEARMID
+ sta UPDATE_MIN
+ lda #99
+ sta UPDATE_MAX
+ ldx #CURRENT_VAL
+ lda #UPD_MID34
+ jsr START_UPDATEP
+ bset 4,BTNFLAGS
+ rts