Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

When writing a C64 game in 6502 Assembler and loading the game using LOAD "Game",8,1, I can choose the address where the game is loaded to. The most popular address I saw is $c000, closely followed by $0810, but I also saw $1000 and $2000 used a lot.

Why would I choose one over the other? I understand $0810 because it's close to $0801 which you have to write the SYS instruction to, but the other addresses all seem arbitrary.

Can someone shed some light into this?

share|improve this question
    
I almost suspect, despite its context, that SO could be better suited, just because the question is so specific! I may be wrong. –  Daniel Dec 2 '11 at 6:55
4  
Well I sure hope to see more C64 and other vintage hardware Q&As here! –  Sam Hocevar Dec 2 '11 at 10:03
1  
@Daniel True, it's more a generic programming question. I'd like to see if there is interest in vintage game development, I'm just starting to seriously get into C64 Game Dev (on my todolist since 25 years :)) –  Michael Stum Dec 2 '11 at 20:48
add comment

2 Answers

up vote 6 down vote accepted

$0810 is good start for asm stuff. Near start of basic mem $0801 so you can put sys 2064 in $0801...

$c000 -$cfff is after basic rom area and free so basic programs "poke" asm sub routines there often...

$1000-$1fff (and $9000-9ffff) usually in asm programs contain music because that area contains shadow copy of fonts and can't be used for own charactersets, so it's ideal for music...

share|improve this answer
    
Thanks, that helped a lot, I've read up on how the VIC-II chip works and indeed $1000 and $9000 are problematic for graphics. $c000 also seems to always be "free RAM" –  Michael Stum Dec 2 '11 at 20:53
add comment

The $0801-Adress is the place where normal Basic-Listings start. If you do a list after loading some programm, you normally have a SYS-Line (fex. 1989 SYS 2064) So the code at 2064 ($0810) is started.

That quote was from this thread: http://www.lemon64.com/forum/viewtopic.php?t=870&sid=a13a63a952d295ff70c67d93409bc392

So basically you load to that address, starting your code with a short BASIC instruction to jump to wherever your code actually is. (Oh, and I think the first $0801 there is a typo),

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.