Questions tagged [c64]

The Commodore 64, commonly called C64, C=64 (after the graphic logo on the case) or occasionally CBM 64 (for Commodore Business Machines), or VIC-64, was an 8-bit home computer introduced in January 1982 by Commodore International.

The Commodore 64, commonly called "C64," "C=64" (after the graphic logo on the case), "VIC-64," or occasionally CBM 64 (for Commodore Business Machines), is an 8-bit home computer, introduced in January 1982 by Commodore International.

The C64 uses an 8-bit MOS Technology 6510 microprocessor, has 64 kB of RAM, features a VIC-II graphic chip with 16 colors and a SID sound chip.

During the C64's lifetime, sales totalled between 12.5 and 17 million units, making it the best-selling single personal computer model of all time.

Approximately 10,000 commercial software titles were made for the Commodore 64, including development tools, office productivity applications and games.

88 questions
966
votes
16 answers

How do emulators work and how are they written?

How do emulators work? When I see NES/SNES or C64 emulators, it astounds me. Do you have to emulate the processor of those machines by interpreting its particular assembly instructions? What else goes into it? How are they typically designed? Can…
mmcdole
  • 91,488
  • 60
  • 186
  • 222
60
votes
9 answers

Draw on screen border in Commodore 64

I have this curiosity for 25 years and I would love to understand the trick. In the Commodore 64 the border was not addressable by the 6569 VIC. All you could do was to draw pixels in the central area, the one where the cursor moved. The border was…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
40
votes
6 answers

How do I show sprites in the border on C64?

I've seen cool C64 demos showing sprites in the border area of the screen. It shouldn't be possible; I think they managed to fool the graphics chip somehow. How exactly did they do it?
Danko Durbić
  • 7,077
  • 5
  • 34
  • 39
23
votes
8 answers

Bash Version of C64 Code Art: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10

I picked up a copy of the book 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 http://www.amazon.com/10-PRINT-CHR-205-5-RND/dp/0262018462 This book discusses the art produced by the single line of Commodore 64 BASIC: 10 PRINT CHR$(205.5+RND(1)); : GOTO…
spex
  • 1,110
  • 10
  • 21
18
votes
6 answers

How to autostart a program from floppy disk on a Commodore c64

Good news, my c64 ist still running after lots of years spending time on my attic.. But what I always wanted to know is: How can I automatically load & run a program from a floppy disk that is already inserted when I switch on the c64? Some…
17
votes
1 answer

How to disable screen in Commodore 64?

I know this question is very spesific question but I know there are some c64 code gurus around here. So, here is my question. When I try to disable screen using $d011 trick, upper/lower border also opens. I want to do that without opening…
user1060302
15
votes
4 answers

How to reproduce C64-like sounds?

I did some of my own research and found out that SID-chips had only few hardware supported synthesizing features. Including three audio oscillators with four possible waveforms (sawtooth, triangle, pulse, noise), with ADSR envelopes and ring…
Cheery
  • 24,645
  • 16
  • 59
  • 83
13
votes
3 answers

Why does PRINT'ing a true boolean expression output -1?

In Commodore 64 BASIC V2, PRINT'ing a true boolean expression outputs -1: READY. A=(5=5) READY. PRINT A -1 Why -1 and not 1?
Max
  • 9,220
  • 10
  • 51
  • 83
12
votes
3 answers

Using xa65 assembler to create Commodore 64 .prg

I am trying to learn 6510 assembly and since I am running Debian xa65 is the assembler I want to use. I have so far written a piece of code that looks like so: *=$0801 .byte $0c, $08, $0a, $00, $9e, $20 .byte $34, $30, $39, $36, $00, $00 .byte…
Waxhead
  • 500
  • 3
  • 16
11
votes
2 answers

Waiting for a change on $D012 (C64 assembler)

I've run into a few issues while playing around with asm on an emulated C64 machine. What I want to do is to check if the key "N" on the keyboard is being pressed, then the program should wait for a change to appear on address $D012. Now what I…
user1062704
  • 438
  • 4
  • 14
9
votes
2 answers

C64 Assembly Rendering a Sprite

I have written a short program in 6502 assembler for the Commodore 64 using the ca65 assembler and ld65 linker. The program should render a solid square sprite somewhere near the center of the display, but I don't see anything being rendered. This…
Woodrow Barlow
  • 8,477
  • 3
  • 48
  • 86
9
votes
2 answers

How to change kernal SCNKEY routine behaviour in Commodore 64

I'm trying to implement game controls using kernel routines in Commodore 64. Below code works with one exception. Each key stroke counted as single input. e.g.: There is no effect if you keep holding the button. You had to release and press again…
wizofwor
  • 917
  • 8
  • 25
9
votes
3 answers

Multi-line functions in Commodore 64 BASIC

So, I'd like to write larger functions in Commodore 64 BASIC. So far, from what I'm seeing from other sources (such as various C64 wikis, as well as the user's manual for the C64 itself,) function definitions can only be one line long. That is to…
9
votes
2 answers

Can I turn this into a loop through some 16-Bit Magic?

I'm starting out with 6502 Assembly right now and have a problem wrapping my head around loops that need to deal with numbers bigger than 8 bit. Specifically, I want to loop through some memory locations. In pseudo-c-code, I want to do this: //…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
8
votes
8 answers

Getting random number from 6502 assembler

Trying to generate a series of random numbers on my Commodore 64 (C64) using JSR $E09A and retrieving the number from $63 and $64. (which according to all the documentation I've seen is the same routine when you use RND(0) from BASIC. But can't get…
Kenny
  • 171
  • 1
  • 6
1
2 3 4 5 6