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
4
votes
3 answers

How to have 9 sprites in rasterline

Is it possible to have more than 8 sprites in a rasterline on a real Commodore 64 (not on an emulator)? the sprites don't need to be different.
qwasyx
  • 43
  • 3
4
votes
2 answers

C64 out of memory error after loading PRG file in VICE emulator

I was getting ?OUT OF MEMORY ERROR when I was trying to get directory listing of a disk after returned assembly routine. I've prepared a simple routine just to understand what was happening, e.g: *=$c000 lda #$00 sta $d020 rts And my build…
wizofwor
  • 917
  • 8
  • 25
4
votes
3 answers

Is it possible to store any PETSCII character in a DATA statement string in Commodore BASIC?

I would like to store some binary data in a BASIC program on the Commodore 64 as DATA statements. To save space, I'd prefer to store as a string, rather than as a sequence of numbers. Is it possible to store any character, from CHR$(0) through…
Laurence Gonsalves
  • 137,896
  • 35
  • 246
  • 299
4
votes
1 answer

How to include a SID-File into a cc65 program on a C64?

I want to include and play .sid files (music for C64 chiptunes) in a cc65 program. Usually sid-files contain a play routine that starts at $1000, how do I link this to my cc65-program? At the moment I compile my code with cc65 using this…
Peter B.
  • 371
  • 2
  • 16
4
votes
1 answer

Why are the upper bits of 53280 $D020 always set (c64)

At least running VICE 2.4: PRINT PEEK(53280) 254 POKE 53280,14 PRINT PEEK(53280) 254 It's clear that only bits #0-#3 are used, and that the "correct" value is obtained with AND 15, but why does the 6510 set the upper bits to 1?
youri
  • 3,685
  • 5
  • 23
  • 43
4
votes
3 answers

SID file format parsing

I want to write a parser for .sid files (music for C64 chiptunes) to extract some patterns into notes. I search for format and found this: http://cpansearch.perl.org/src/LALA/Audio-SID-3.11/SID_file_format.txt I can read the header as in that…
4
votes
1 answer

Why are characters being offset by 0x40 on my Commodore 64 emulator?

I have some 6502 code to print a string to the screen memory after clearing the screen. Unfortunately if I print a string, for example "HELLO WORLD", it will come out in garbled characters. I've found that this is because the upper case characters…
Joe Bentley
  • 296
  • 2
  • 13
3
votes
1 answer

C64 Assembly - 6502/6510 - displaying a series of three bitmaps one after the other, and then moving into character mode

I have a pretty big question here that I am finding really difficult to answer with just a couple of reference books, the internet, and yours truly. I just want to display a bitmap. Wait a couple secs. Wipe it from memory. Display another bitmap.…
Smokeyparkin
  • 103
  • 6
3
votes
1 answer

commodore 64 smooth scroller on line 1 - is jumping around on the screen if interrupt set on line #0

I have this horizontal smooth scrolling text on line 1 on the screen. the smooth scrolling effect is made using the $d016 hardware scrolling effect by iterating on the 7 lowest bits of $d016). The scroller runs on line 1 of the screen. I have set up…
Nick Developer
  • 277
  • 1
  • 4
  • 15
3
votes
3 answers

Modified 6502 Interrupt Returns

I am trying to switch normal program flow while an interrupt returns: START SEI LDX #IRQ STX $FFFE STY $FFFF CLI LOOP1 INC $D020 JMP LOOP1 LOOP2 INC $D021 JMP LOOP2 IRQ STA SAVEA+1 STX…
Digerkam
  • 1,826
  • 4
  • 24
  • 39
3
votes
2 answers

Enemy bullets targeting player on a C64

I'm scanning the internet and old C64 books for the question without finding an answer, so in the end I just had to post it here. I love the good old times of C64 coding and while I'm not currently programming a game on this platform I would like to…
3
votes
1 answer

How to separate a string in commodore 64 basic?

I have a board of "."s initialized into a board in commodore 64. I want to randomly place words into the board with each letter of the word being a "." on the board (like a word search game). If the word does not fit, then the next word can be…
Surz
  • 984
  • 3
  • 11
  • 36
3
votes
1 answer

C64 development in Xcode?

With the Vice C64 emulator I've got a tool called 'petcat', which converts BASIC (ascii text) to a .prg file for running in Vice. Previsouly I've been able to develop in TextMate and set up a key-press 'bundle' in there to make a shell call out to…
SM2011
  • 287
  • 3
  • 9
3
votes
1 answer

CC65: Four lines bad, two lines good?

I'm trying to do IO using stdio.h on a Commodore 64, but I'm having with even the following program: #include void main(void) { printf("Foo\n"); printf("Bar\n"); /* printf("Foo\n"); */ /* printf("Bar\n"); */ } The problem…
Cactus
  • 27,075
  • 9
  • 69
  • 149
3
votes
2 answers

Print out letter in any position on the screen

According to the C64 manual you can print a character using "POKE 1024, 1" where 1024 is the start address (C64-BASIC). The screen is 40*25 which means that 2024 is the position for the end of the screen. This gives the following formula for writing…
user1062704
  • 438
  • 4
  • 14