Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Commodore 128
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== C64 === [[file:Commodore 128 set-up with a 1541, 1571, 1200 baud Modem, and two displays (filtered).jpg|thumb|Photo from the 1980s showing a C128 setup with two disk drives and two monitors displaying the independent 40- and 80-column screens. Many users continued to use the 1541 inherited from their C64 system as a second drive.]] By incorporating the original C64 BASIC and Kernal ROMs in their entirety (16 KB total), the C128 achieves almost 100 percent compatibility with the Commodore 64. The C64 mode can be accessed in three ways: # Holding down the Commodore-logo key when booting. # Entering the <CODE>GO 64</CODE> command, then responding <code>Y</code> to the <code>ARE YOU SURE?</code> prompt, in BASIC 7.0.<ref>{{Cite web|url=http://www.commodore.ca/manuals/128_system_guide/sect-02.htm|title=C128 System Guide – 2.2.1 MODE SWITCHING CHART|website=commodore.ca|access-date=8 August 2016}}</ref> # Booting with a C64 cartridge plugged in. Grounding the cartridge port's /EXROM and/or /GAME lines will cause the computer to automatically start up in C64 mode. This feature faithfully duplicates the C64's behavior when a cartridge (such as [[Simons' BASIC]]) is plugged into the port and asserts either of these lines but, unlike an actual C64, where the memory-map-changing action of these lines is implemented directly in hardware, the C128's Z80 firmware startup code polls these lines on power-up and then switches modes as necessary. C128 native-mode cartridges are recognized and started by the kernel polling defined locations in the memory map.{{citation needed|date=December 2023}} C64 mode almost exactly duplicates the features of a hardware C64. The MMU, Z80, and IEC burst mode are disabled in C64 mode, however all other C128 hardware features including the VDU and 2 MHz mode are still accessible. The extended keys of the C128 keyboard may be read from machine language, although the kernal routines only recognize the keys that exist on the C64. A few games are capable of detecting if a C128 is running and switching to 2 MHz mode during the vertical retrace for faster performance.{{citation needed|date=December 2023}} On North American C128s, when in C64 mode, even the character (font) ROM changes from that of C128 mode. Early C128 prototypes had a single ROM, with a slightly improved character set over that of the C64. But some C64 programs read the character ROM as data, and will fail in various ways on a C128. Thus, the C128 was given a double-sized character ROM, which delivers the C128 font in C128 mode, and the C64 font in C64 mode. International models of the C128 use the unmodified C64 font in both modes, since the second half of the character ROM is instead dedicated to the international font (containing such things as accented characters or German [[Diaeresis (diacritic)|umlaut]]s).{{citation needed|date=December 2023}} Some of the few C64 programs that fail on a C128 will run correctly when the {{keypress|caps lock}} key is pressed down (or the ASCII/National key on international C128 models). This has to do with the larger built-in I/O port of the C128's CPU. Whereas the {{keypress|SHIFT LOCK}} key found on both C64 and C128 is simply a mechanical latch for the left {{keypress|SHIFT}} key, the {{keypress|CAPS LOCK}} key on the C128 can be read via the 8502's built-in I/O port. A few C64 programs are confused by this extra I/O bit; keeping the {{keypress|CAPS LOCK}} key in the down position will force the I/O line low, matching the C64's configuration and resolving the issue.{{citation needed|date=December 2023}} A handful of C64 programs write to <code>[[Hexadecimal|$]]D030 (53296)</code>, often as part of a loop initializing the [[MOS Technology VIC-II|VIC-II]] chip registers. This memory-mapped register, unused in the C64, determines the system clock rate. Since this register is fully functional in C64 mode, an inadvertent write can scramble the 40-column display by switching the CPU over to 2–MHz, at which clock rate the VIC-II video processor cannot produce a coherent display. Fortunately, few programs suffer from this flaw. In July 1986, ''[[COMPUTE!'s Gazette]]'' published a type-in program that exploited this difference by using a [[raster interrupt]] to enable fast mode when the bottom of the visible screen was reached, and then disable it when screen rendering began again at the top. By using the higher clock rate during the [[vertical blank]] period, standard video display is maintained while increasing overall execution speed by about 20 percent.<ref>[http://www.devili.iki.fi/pub/Commodore/docs/magazines/gazette/1986/07jul/jul86-64ModeSpeed-UpForThe128A.jpg jul86-64 ModeSpeed (A)]</ref><ref>[http://www.devili.iki.fi/pub/Commodore/docs/magazines/gazette/1986/07jul/jul86-64ModeSpeed-UpForThe128B.jpg jul86-64 ModeSpeed (B)]</ref> A few C64 programs would lack sound effects and music because on a C64 the SID chip $D4xx memory page was also mirrored on $D5xx, $D6xx and $D7xx pages, while on a C128 it was only accessible through $D4xx page. This is not a common issue, since the C64 reference guide only describes registers in $D4xx in details while describing $D5xx-$D8xx just as "SID IMAGES", making most programs accessing them through $D4xx page and hence have the sound getting played as intended on a C128.{{citation needed|date=December 2023}} An easy way to differentiate between a hardware C64 and a C128 operating in C64 mode, typically used from within a running program, is to write a value different from <code>$FF (255)</code> to [[memory address]] <code>$D02F (53295)</code>, a register which is used to decode the extra keys of the C128 (the numerical keypad and some other keys). On the C64 this memory location will always contain the value <code>$FF</code> no matter what is written to it, but on a C128 in C64 mode the value of the location—a memory-mapped register—can be changed. Thus, checking the location's value after writing to it will reveal the actual hardware platform.{{citation needed|date=December 2023}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Commodore 128
(section)
Add topic