Codex Gamicus
Explore
Main Page
Discuss
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Forums
Company Index
Character Index
Hardware Index
In-Game Index
Ratings Index
Video Game Index
Fandom
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Fandom's centric source of video game knowledge
42,423
pages
Explore
Main Page
Discuss
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Forums
Company Index
Character Index
Hardware Index
In-Game Index
Ratings Index
Video Game Index
Fandom
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Commodore 128
(section)
Back to page
Edit
VisualEditor
View history
Talk (0)
Edit Page
Commodore 128
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!
===<span class="editsection" style="float: right; margin-left: 5px; ">[http://en.wikipedia.org/w/index.php?title=Commodore_128&action=edit§ion=4 edit]</span>C64 Mode=== <p style="line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">By incorporating the original C64 BASIC and kernal ROMs in their entirety (16 KB total), the C128 achieved almost 100 percent compatibility with the Commodore 64. The C64 mode can be accessed in one of three ways:</p> *Hold down the Commodore logo key when booting the system *Enter the GO64 command in BASIC 7.0 *Boot with a C64 cartridge plugged in <p style="line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">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 behavior when a cartridge (such as Simons' BASIC) is plugged into the port and asserts either of these lines, but unlike the 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 kernal polling defined locations in the memory map.</p> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">C64 mode almost exactly duplicated the features of a hardware 64; many of the 128's additional features were disabled or unavailable in this mode. The 80 column display, fast mode, MMU, and BASIC 7.0 were not available in 64 mode. The 4 cursor keys at the top of the keyboard were unrecognized, forcing the user to use the 64's cumbersome shifted key arrangement, which were included at the bottom of the 128 keyboard. Also ignored were the 128's numeric keypad and added top-row keys (the only top row keys that were functional in 64 mode were the f1-f8 keys above the keypad.) Some of these features could be turned back on by user software but most commercial programs would ignore them at best, or be completely nonfunctional with these user "wedge" programs in memory.</p> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">When in C64 mode, even the character (font) ROM changed 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 would fail in various ways on a C128. Thus, the C128 was given a double-sized character ROM, which delivered the C128 font in C128 mode, the C64 font in C64 mode.</p> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">Some of the few C64 programs that fail on a C128 run correctly when the [http://en.wikipedia.org/wiki/Caps_lock 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 SHIFT LOCK key found on both C64 and C128 is simply a mechanical latch for the left SHIFT key, the CAPS LOCK key on the C128 can be read via the [http://en.wikipedia.org/wiki/MOS_Technology_8502 8502]'s built-in I/O port. A few C64 programs are confused by this extra I/O bit; keeping the CAPS LOCK key in the down position will force the I/O line low, matching the C64's configuration and resolving the issue. he main reason that the C128 still sold fairly well was probably that it was a much better machine for hobbyist programming than the C64. A handful of C64 programs wrote to [http://en.wikipedia.org/wiki/Hexadecimal $] D030 (53296), often as part of a loop initializing the [http://en.wikipedia.org/wiki/MOS_Technology_VIC-II VIC-II] chip registers. This memory-mapped register, unused in the C64, determined the system clock rate. Since this register was fully functional in C64 mode, an inadvertent write could scramble the 40-column display by switching the CPU over to 2–MHz, at which clock rate the VIC-II video processor could not produce a coherent display. Fortunately, few programs suffered from this flaw. In July 1986, ''[http://en.wikipedia.org/wiki/COMPUTE!%27s_Gazette COMPUTE!'s Gazette]'' published a [http://en.wikipedia.org/wiki/Type-in_program type-in program] that exploited this difference by using a [http://en.wikipedia.org/wiki/Raster_interrupt 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 [http://en.wikipedia.org/wiki/Vertical_blank vertical blank] period, standard video display was maintained while increasing overall execution speed by about 20 percent.<sup class="reference" id="cite_ref-7" style="line-height: 1em; font-style: normal; ">[http://en.wikipedia.org/wiki/Commodore_128#cite_note-7 [8]]</sup><sup class="reference" id="cite_ref-8" style="line-height: 1em; font-style: normal; ">[http://en.wikipedia.org/wiki/Commodore_128#cite_note-8 [9]]</sup></p> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 19px; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; ">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 [http://en.wikipedia.org/wiki/Hexadecimal $] FF (255) to [http://en.wikipedia.org/wiki/Memory_address memory address]$D02F (53295), a register which is used to decode the extra keys of the C128 (the numerical keypad and some other keys). On the 64 this memory location will always contain the value $FF no matter what is written to it, but on a C128 in 64 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.</p>
Summary:
Please note that all contributions to the Codex Gamicus are considered to be released under the CC BY-SA 3.0
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab