| Home CBM ASCII-X BASIC C128 2MHz Border BASIC 7.80 BASIC 8 CPM Digimaster 128 Fast Serial for uIEC Games Interlace JiffySoft128 Keyboard Scan Media Player 128 Orig Interlace RGBI to S-Video RGBI to SCART RGBI to VGA RGB Conversion SAM 128 SID Player 128 VDC Interlace Mp128alpha N-progs D64plus Disk Escape Codes Hardware PCxface PETSCII Pet2asc Futurama IBM PC-AT Contact Games Glossary Hall of fame Hall of shame Miscellaneous Privacy policy Programming Twisty puzzles |
It has been said that the Commodore 128 is both the fastest and the slowest
of all CBM 8-bit computers!
To test that, below is a simple "test" program (by BenDevil) written in BASIC 2.0...
in other words it will run on any CBM machine (except the very original/prototype PETs).
Try running that on your favorite Commodore, or any good emulator.
Hopefully you will see that on the C128 (in default "slow" mode) is slower than any other 8-bit CBM
(like the famous C64). On the other hand, if you issue the BASIC command "FAST", then running the same program
will give a "speed" faster than any other 8-Bit CBM (yes, faster than C64).
However, most of us know that FAST / 2MHz speed only works (by default) when used
with the 80-column VDC screen. If you try to use FAST with 40-column (VIC-II / C64-compatible) video screen,
then there is no display (the VIC is disabled at 2MHz).
The following is a very simple/lame wedge for 40-column / VIC users...
It enables FAST (2MHz) speed during the VIC "border"... the CPU runs at "slow" (1MHz) speed
while VIC displays the "active" screen (active graphics between the borders).
FYI, the following code is my original work (used by me for many years),
but I am not the first/only person to do this... many commercial programs also used the 2MHz-Border trick
(for example "Gunship" by MicroProse).
EDIT / NOTE: The code switches between two IRQ routines;
notice that "phase 2" will immediately change CPU to 2MHz speed (as soon as possible),
while "phase 1" waits until the end before it sets CPU to 1MHz speed...
thus, maximum performance from your 8502 :)
That code works well for "standard" VIC display (GRAPHIC 0, GRAPHIC 1, GRAPHIC 3), but it fails with split-screen modes (like GRAPHIC 2 or GRAPHIC 4). The code can be fixed to work with those modes, but would be more complex. The important thing is that it speeds up normal VIC (40-column) speed by about 22% (in detail, 18.3% for NTSC or 25.6% for PAL). If you don't (can't ?) compile the Assembly Language code above, you can also download a small "PRG" file that you should BLOAD and then "install" with SYS 5888. All by itself, the program will enhance many 40-column programs. However, I hope the actual SOURCE CODE will explain how to implement a raster interrupt (or in this case, two interrupts). BE AWARE, because of the simplicity of this sample, some 40-column programs (mainly, those which use split-screen) will FAIL. Split-screen mode is possible with the "2MHz-Border" trick, but it requires a more sophisticated "wedge".
Please be aware the above assembly code is VERY primitive... it does not work with split-screen modes, nor with other (non-Raster) interrupts of VIC-II(e). In particular, BASIC 7 allows both SPRITE and PEN interrupts, but neither work with the simple/lame code posted above... you have been warned!! ©H2Obsession 1988, 1992, 2003, 2005, 2009, 2010, 2011, 2013, 2014, 2015 Test Program ©Bendevil, 2015 (used by permission) |