]> git.sur5r.net Git - cc65/blob - libsrc/lynx/framerate.s
Add definitions for tools so the makefile is useful by itself.
[cc65] / libsrc / lynx / framerate.s
1 ; ***
2 ; CC65 Lynx Library
3 ;
4 ; Originally by Bastian Schick, BLL kit mikey.mac
5 ; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
6 ;
7 ; Ported to cc65 (http://www.cc65.org) by
8 ; Shawn Jefferson, June 2004
9 ;
10 ; Ullrich von Bassewitz, 2004-10-09, small changes.
11 ;
12 ; void __fastcall__ lynx_change_framerate (unsigned char rate);
13 ; /* Change the framerate, in Hz.  Recognized values are 50, 60 and 75. */
14 ;
15
16         .include    "lynx.inc"
17         .export     _lynx_change_framerate
18
19         .code
20
21
22 _lynx_change_framerate:
23         cmp     #75
24         beq     set_75
25         cmp     #60
26         beq     set_60
27         cmp     #50
28         bne     exit
29
30 set_50: lda     #$bd
31         ldx     #$31
32         bra     doit
33
34 set_60: lda     #$9e
35         ldx     #$29
36         bra     doit
37
38 set_75: lda     #$7e
39         ldx     #$20
40
41 doit:   sta     HTIMBKUP
42         stx     PBKUP
43
44 exit:   rts
45
46