25c3: The Ultimate Commodore 64 Talk

Christiaan0082 minutes read

The text delves into the history and technical details of the Commodore 64, discussing its superior chip design, key features, and impressive graphics capabilities, such as the 6502 CPU with various addressing modes and the VIC video chip supporting sprites and different graphics modes. It highlights tricks and effects like interlacing for additional colors, border area expansion for visual space, and VSP for screen shifting, showcasing the advanced capabilities and creativity possible on the Commodore 64.

Insights

  • The Commodore 64, with its impressive chip design and 64KB memory, outsold its successors and featured various models, showcasing advanced graphics capabilities through demos and games.
  • The 6502 CPU in the Commodore 64, with unique assembly language and addressing modes, required cycle counting for memory access, had specific instructions with varying cycle counts, and needed workarounds for chip bugs, leading to innovative programming techniques like passing data to subroutines and self-modification.

Get key ideas from YouTube videos. It’s free

Recent questions

  • What is the history of the Commodore 64?

    The Commodore 64 was released in 1982 by Commodore, founded by Jack Tramiel in 1954. It featured superior chip design and graphics capabilities, outselling its successors with 17 million units sold between 1982 and 1994. The company initially produced calculators, later acquiring MOS Technology and expanding into home computers with models like the Commodore PET, VIC-20, and the successful Commodore 64 with 64KB of memory.

  • What are the key features of the Commodore 64?

    The Commodore 64 featured various models, including an original version, a flat design, a limited golden edition, and a portable version. Externally, it had two control ports, expansion ports, RF and S-video connectors, a serial bus, tape connector, and a user port. Internally, it housed the 6510 CPU, two CIA controllers, the SID sound chip, and the VIC video chip, each serving specific functions. The system booted directly into BASIC from ROM, showcasing impressive graphics capabilities through demos and games.

  • How does the 6502 CPU function in the Commodore 64?

    The 6502 CPU, designed in 1975, featured a unique assembly language with various addressing modes for efficient programming. The talk delves into the 6502's instruction set, addressing modes like immediate, absolute, zero page, and register addressing, along with control flow instructions and interrupt handling mechanisms. The CPU requires cycle counting for memory access, with each access taking one cycle and no instruction less than two cycles.

  • What are the capabilities of the SID sound chip in the Commodore 64?

    The SID 6581 sound chip in the Commodore 64 has three independent voices with analog and digital control. Each voice can produce various waveforms like sawtooth, triangle, pulse, or noise, with volume controlled by an envelope. The SID also features analog filters for effects, offering low pass, high pass, or band pass options, along with ring modulators and oscillator sync.

  • How does the VIC chip contribute to the graphics of the Commodore 64?

    The VIC 6569 chip in the Commodore 64 supports a 40x25 screen or a 320x200 Graphics mode, with 16 built-in colors and the ability to address 16 kilobytes of RAM. It can display 256 different characters with 16 colors each, using an 8x8 pixel character set encoded in character ROM. The VIC offers various modes like enhanced background, multicolor, and bitmap mode, allowing for different color combinations and effects.

Related videos

Summary

00:00

"Commodore 64: Superior Chip Design and Features"

  • The talk discusses the Commodore 64, highlighting its superior chip design compared to competitors like the IBM CGA card.
  • Commodore, founded in 1954 by Jack Tramiel, initially produced calculators and later acquired MOS Technology, a chip manufacturer.
  • The company extended its design into home computers, releasing the Commodore PET for small businesses and education, followed by the stripped-down Commodore VIC-20 and the successful Commodore 64 with 64KB of memory.
  • The Commodore 64, priced at $595, outsold its successor, the C128, and the less successful Plus/4, with a total of 17 million units sold between 1982 and 1994.
  • The Commodore 64 featured various models, including an original version, a flat design, a limited golden edition, a portable version, and others.
  • The system booted directly into BASIC from ROM, showcasing impressive graphics capabilities through demos and games.
  • Externally, the Commodore 64 featured two control ports, expansion ports, RF and S-video connectors, a serial bus, tape connector, and a user port for various peripherals.
  • Internally, the main board housed the 6510 CPU, two CIA controllers, the SID sound chip, and the VIC video chip, each serving specific functions.
  • The 6502 CPU, designed in 1975, featured a unique assembly language with various addressing modes for efficient programming.
  • The talk delves into the 6502's instruction set, addressing modes like immediate, absolute, zero page, and register addressing, along with control flow instructions and interrupt handling mechanisms.

17:37

"Microsoft Easter Egg Code for 6502"

  • The Easter egg code written by Microsoft prints "Microsoft" when a parameter of 6502 is passed to the weight instruction.
  • The code loads the low byte of the first parameter and compares it to the low byte of 6502, branching away if not equal.
  • It then tests the high byte and stores a zero if it's not equal, initializing a pointer and copying the zero to the Y register.
  • The screen RAM is stored at parameter one for use as a pointer in zero page.
  • The code counts the characters in "Microsoft" and loads one character at a time, clearing upper bits and storing in screen RAM.
  • Incrementing the pointer for indirect Y addressing, it loops until all characters are printed.
  • The 6502 requires cycle counting for memory access, with each access taking one cycle and no instruction less than two cycles.
  • Various instructions have different cycle counts, with some more complex ones like return and jump to subroutine taking six cycles.
  • The 6502 has chip bugs that need to be worked around, like issues with indirect jumps and illegal opcodes.
  • Tricks like passing data to subroutines, using jump tables, and self-modification are common on 6502 systems like the C64.

33:54

Comprehensive Overview of Commodore 64 Components

  • The CIA2 manages the I bus and user Port, while the SID 6581 sound chip has three independent voices with analog and digital control.
  • Each voice on the SID can produce various waveforms like sawtooth, triangle, pulse, or noise, with volume controlled by an envelope.
  • The SID also features analog filters for effects, offering low pass, high pass, or band pass options, along with ring modulators and oscillator sync.
  • The VIC 6569 supports a 40x25 screen or a 320x200 Graphics mode, with 16 built-in colors and the ability to address 16 kilobytes of RAM.
  • The VIC can display 256 different characters with 16 colors each, using an 8x8 pixel character set encoded in character ROM.
  • The VIC offers various modes like enhanced background, multicolor, and bitmap mode, allowing for different color combinations and effects.
  • Soft scrolling is possible on the VIC, shifting the screen pixel-wise left or right, with options to switch between 40 and 38 column modes and 25 and 24 row modes.
  • The VIC supports sprites, with 24x21 pixel size and the ability to expand horizontally and vertically, offering sprite priority and collision detection.
  • Memory layout on the VIC includes 16 kilobytes of RAM, with specific allocations for screen RAM, character set, bitmap, and sprites.
  • The VIC's timing and memory access intricacies are crucial for understanding advanced tricks and effects, with details on bad lines and bus sharing with the C6502 processor.

50:04

Enhancing Graphics with VIC Chip Tricks

  • The trick used in the picture shown involves interlacing to create additional colors by alternating between two colors, resulting in a potential 256 colors.
  • By causing extra bad lines, it's possible to change the screen RAM pointer, allowing for more color options within a block of four times two tiles.
  • The picture utilizes a significant amount of border area, expanding the screen's visual space, with sprites strategically placed to enhance resolution.
  • Shifting the screen without copying data is achieved through VSP (Variable Screen Position), as seen in the game "Mayhem and Monsterland."
  • Line crunching compresses the screen into 25 lines by causing bad lines, enabling flexible movement without copying data.
  • The VIC chip's ability to output black pixels on top of garbage allows for creative workarounds, like placing sprites to mask unwanted visuals.
  • Achieving cycle exact actions, like changing screen colors precisely, involves intricate interrupt manipulation and timing to ensure accuracy.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.