]> git.sur5r.net Git - cc65/commitdiff
Added fast(), slow() and c64mode()
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 13 Feb 2003 21:29:12 +0000 (21:29 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 13 Feb 2003 21:29:12 +0000 (21:29 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1982 b7a2c559-68d2-44c3-8de9-860c34a00d81

include/c128.h
libsrc/c128/Makefile
libsrc/c128/c128.inc
libsrc/c128/c64mode.s [new file with mode: 0644]
libsrc/c128/fast.s [new file with mode: 0644]
libsrc/c128/slow.s [new file with mode: 0644]

index 205febd26711a6579a555eb978211ad7204c3b8b..746215a480b2dfd1e75d3b592d0a0fa790515954 100644 (file)
 void toggle_videomode (void);
 /* Toggle the video mode between 40 and 80 chars (calls SWAPPER) */
 
+void c64mode (void);
+/* Switch the C128 into C64 mode. Note: This function will not return! */
+
+void fast (void);
+/* Switch the CPU into 2MHz mode. Note: This will disable video when in
+ * 40 column mode.
+ */
+
+void slow (void);
+/* Switch the CPU into 1MHz mode. */
+
 
 
 /* End of c128.h */
index cad101c5900fd2d38629baa86ec0358c612ba3bf..36310200b0a3ddcc3f87eb3f13feed7a55c586f8 100644 (file)
 
 OBJS = _scrsize.o              \
        break.o                 \
+       c64mode.o               \
        cgetc.o                 \
                clrscr.o                \
        conio.o                 \
        crt0.o                  \
                color.o                 \
        cputc.o                 \
+       fast.o                  \
         get_tv.o               \
        joy_stddrv.o            \
        kbhit.o                 \
@@ -42,6 +44,7 @@ OBJS =        _scrsize.o              \
         randomize.o            \
         revers.o               \
        rs232.o                 \
+       slow.o                  \
        tgi_mode_table.o        \
        toggle_videomode.o
 
index e30c3b9b73a1e5c46d3a480a1b43f249bb665d80..aed393980133dcf93b00400ca8c4935af3e502de 100644 (file)
@@ -47,7 +47,8 @@ KBDREAD               = $C006
 NEWLINE                = $C363
 PRINT          = $C322
 
-; Extended jump table
+; Extended jump table  
+C64MODE                = $FF4D
 SWAPPER                = $FF5F
 SETBNK          = $FF68
 
diff --git a/libsrc/c128/c64mode.s b/libsrc/c128/c64mode.s
new file mode 100644 (file)
index 0000000..88a632d
--- /dev/null
@@ -0,0 +1,13 @@
+;
+; Ullrich von Bassewitz, 2003-02-13
+;
+; void c64mode (void);
+; /* Switch the C128 into C64 mode. Note: This function will not return! */
+;
+
+       .export         _c64mode
+
+       .include        "c128.inc"
+
+               _c64mode        = C64MODE
+
diff --git a/libsrc/c128/fast.s b/libsrc/c128/fast.s
new file mode 100644 (file)
index 0000000..abb32d2
--- /dev/null
@@ -0,0 +1,23 @@
+;
+; Ullrich von Bassewitz, 2003-02-13
+;
+; void fast (void);
+; /* Switch the CPU into 2MHz mode. Note: This will disable video when in
+;  * 40 column mode.
+;  */
+;
+
+       .export         _fast
+
+       .include        "c128.inc"
+
+
+.proc  _fast
+
+       lda     #$01
+       sta     VIC_CLK_128
+       rts
+
+.endproc
+
+
diff --git a/libsrc/c128/slow.s b/libsrc/c128/slow.s
new file mode 100644 (file)
index 0000000..0c265ee
--- /dev/null
@@ -0,0 +1,22 @@
+;
+; Ullrich von Bassewitz, 2003-02-13
+;
+; void slow (void);
+; /* Switch the CPU into 1MHz mode. */
+;  */
+;
+
+       .export         _slow
+
+       .include        "c128.inc"
+
+
+.proc  _slow
+
+       lda     #$00
+       sta     VIC_CLK_128
+       rts
+
+.endproc
+
+