| |
spinal Account closed
Registered: Jan 2005 Posts: 47 |
noob requires help to start coding
ok here goes, i would like to code something for the C64, don't have a clue where to start, i cnow a little C, a little more BASIC and havent even looked at ASM, so what im asking is -
Is there a good C cross-compiler that i can download from anywhere? (assuming that it is free) |
|
... 27 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
I agree with Graham and Hollowman, although I haven't tried out C on c64. It might be better than basic atleast. |
| |
RaveGuru
Registered: Apr 2002 Posts: 43 |
First of all, you should start with learning the VIC-II chip coz that's where most of the C64 magic happens.. unless you're planning to do tools and music stuff only.
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
My suggestion: experiment with C64 features by using BASIC first if ASM seems scary, but eventually go to directly to ASM. That way you don't have to deal with any side-effects & weirdnesses of the C runtime library + compiler, instead all code will be yours so it'll be easier for you to understand.
BASIC & ASM both contribute to a delightful spaghetti coding style - and I'm seriously of the opinion that JMP/GOTO are much better for controlling the flow of average C64 game or demo than wimpy C function calls :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
I used CC65 first with inline assembly when needed and that's a choice I regret. If you want to use the CC65 package, only use the CA65 assembler and the LD65 linker. Those two are great tools but forget C, it will only make you understand less on the C64.
/JackAsser |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Mmmh I probably wouldnt suggest cc65 to someone who wants to learn about the c64 either.... but still imho its a great tool, and you ofcourse can write useful things with it. not demos or games or anything else that involves a lot of timing and/or speed critical things, no doubt. but tools that for the most part need to look nice and which basically dont do anything besides wait for user input - certainly worth thinking about. but you'll have to know about the c64 _and_ the quirks of cc65 so you dont end up in the horrible bloat and slowness of badly written (or ported) C-code :)
|
| |
enthusi
Registered: May 2004 Posts: 677 |
Hum, I tried CC65 for a while and it does indeed not help much :) Most of c64-programming is less about 6502-asm or even C but knowing VIC and SID and whatever you want. So simple C wont help much. I intended to use it for game-logic and code the critical stuff in inline asm. Clever idea, huh? :o) well, I burried that Idea pretty soon. C ist not THAT slow actually and you can always optimize but its big and you have little control over it and after a handful of inline_asm you lose track of it and lose the one advantage of c - its 'structure'.
So better start with basic and soon go on with asm since its just basic-style (even if many might disagree :)
Also bugfixing asm can be much easier than C. As unbelievable as it sounds.
The best about C would be that small programs could be ported to unix or vice versa. But cc65 for example has no floatingpointoperations (for a good reason).
I once wrote a pretty small c-program that compiled with gcc and cc65 :o) it just printed out some astronomical data though...
|
| |
RaveGuru
Registered: Apr 2002 Posts: 43 |
...And then again, the reason we do it on the C64 is....
...becoz we don't want to do it on a unix!! ;-)
|
| |
spinal Account closed
Registered: Jan 2005 Posts: 47 |
So you guys are saying i shoudn't use C on the C64...
OK then, ill first do some BASIC, only problem is, i dont have an origional C64 anymore, and im using VICE, does anyone know how to map the keyboard so the keys match up? i dont like having to remember that '#' = '=' and ']' = '*' etc. I would like to be able to type BASIC code without it ending up as complete gibberish!! |
| |
yago
Registered: May 2002 Posts: 333 |
You can crossdevelop BASIC-Programs with your favorite Text-editor.
Then use "petcat -w2" to produce the loadable Program.
petcat is a part of VICE, there are also other Tokenizer.
@enthusi: Did you take a look at k2devel.sourceforge.net/doc_k2asm.html ? Pretty "structurized" ASM
|
| |
enthusi
Registered: May 2004 Posts: 677 |
@yago, no I havent until now.
Nice :)
I just wanted to point out that C isnt THAT slow and that I'd rather code something in C than nothing in asm.
Actually, right now, In coding several things in asm :o)
Also, when I mean asm I mean NO cross-asm, so this might add to the difference c-asm.
As long as anyone codes anything for the c64 Im happy :)
Be it brainfuck or forth (java excluded). |
Previous - 1 | 2 | 3 | 4 - Next |