]> git.sur5r.net Git - cc65/commitdiff
Added lynx_change_framerate()
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 11 Oct 2004 07:19:13 +0000 (07:19 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 11 Oct 2004 07:19:13 +0000 (07:19 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3240 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/lynx/Makefile
libsrc/lynx/framerate.s [new file with mode: 0644]

index c39c75b2c8b7770fa5f02408ed30d555e1d71b37..d974d2916273068a8fe175b9f0f55d0271df9e5e 100644 (file)
@@ -33,7 +33,8 @@
 #--------------------------------------------------------------------------
 # Object files
 
-OBJS = crt0.o
+OBJS = crt0.o          \
+        framerate.o     
 
 #--------------------------------------------------------------------------
 # Drivers
@@ -46,7 +47,7 @@ MOUS =
 
 SERS =
 
-TGIS = 
+TGIS =
 
 #--------------------------------------------------------------------------
 # Targets
diff --git a/libsrc/lynx/framerate.s b/libsrc/lynx/framerate.s
new file mode 100644 (file)
index 0000000..89a5de5
--- /dev/null
@@ -0,0 +1,46 @@
+; ***
+; CC65 Lynx Library
+;
+; Originally by Bastian Schick, BLL kit mikey.mac
+; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
+;
+; Ported to cc65 (http://www.cc65.org) by
+; Shawn Jefferson, June 2004
+;
+; Ullrich von Bassewitz, 2004-10-09, small changes.
+;
+; void __fastcall__ lynx_change_framerate (unsigned char rate);
+; /* Change the framerate, in Hz.  Recognized values are 50, 60 and 75. */
+;
+
+        .include    "lynx.inc"
+       .export     _lynx_change_framerate
+
+       .code
+
+
+_lynx_change_framerate:
+               cmp     #75
+               beq     set_75
+               cmp     #60
+               beq     set_60
+        cmp     #50
+               bne     exit
+
+set_50: lda     #$bd
+               ldx     #$31
+               bra     doit
+
+set_60: lda     #$9e
+               ldx     #$29
+               bra     doit
+
+set_75: lda     #$7e
+               ldx     #$20
+
+doit:   sta     HTIMBKUP
+               stx     PBKUP
+
+exit:   rts
+
+