Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Werner ! (Registered 2024-05-30) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > noob requires help to start coding
2005-01-14 22:56
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....
 
2005-01-26 09:49
Puterman
Account closed

Registered: Jan 2002
Posts: 188
enthusi: I wouldn't recommend Richard's tutorial, there's so much stuff in it that just doesn't make sense.

Check out Programmer's Reference Guide or C=Hacking instead.
2005-01-26 10:14
JackAsser

Registered: Jun 2002
Posts: 1994
Stop whining and start coding for christ sake!

1. IO-map: http://www.hut.fi/Misc/cbm/docs/c64-io.html
2. OP-Codes: http://www.oxyron.de/html/opcodes02.html
3. Assembler: http://www.cc65.org/
4. Emulator: http://www.viceteam.org/
5. People to ask: Channel #c-64 @ IRCNet
6. Brain

I used then above recipe and it worked out pretty well...

/JackAsser
2005-01-26 10:18
iopop

Registered: Dec 2001
Posts: 317
also worth to check out is this one. The Best C64 Ml tutorial collection

if you're not able to do a demo after reading that one, you prolly not should do c64 stuff at all..
2005-01-26 10:42
TDJ

Registered: Dec 2001
Posts: 1879
Quote: also worth to check out is this one. The Best C64 Ml tutorial collection

if you're not able to do a demo after reading that one, you prolly not should do c64 stuff at all..


Hell, even I used that collection to finally start coding in ML on c-64!!

(All my demos from before 2001 were done in LOGO. Remember that, LOGO? The turtle rocked!)
2005-01-26 11:00
H.O
Account closed

Registered: Oct 2002
Posts: 70
Not to advocate Basic, but it actually can be used for some stuff. What is important is that speed isnt important and of course you can't do anything that requires timing.

For example, an adventure is easy to do in basic and has decent speed. Simpler arcade games (like a simpler version of galaxians) can also be done since you can put all moving items into sprites, and then just check sprite-to-sprite-collisions.

But, once we need more then 8 sprites, smooth scrolling of characters, etc, then basic is no longer an option. A game like "Space invaders" could be done in Basic, but it would have jerky movements. A game like "Scramble" wouldnt work at all since you would get neither smooth scrolling or be able to scroll the whole screen at decent speed in basic.

The few first "demos" that I wrote actually was in basic. Naturally, that meant that the scrolls would be very ugly since you cant time smooth scrolling in basic. On the other hand, if you make a scroller in sprites, using sprite movements, then it would look decent in Basic (but you might get raster glitches)

There also is compiled basic for the c64, but the version I tried oh-so-many-years-ago didnt increase speed that much. Around 3 times faster then regular basic, which is still way too slow for any raster timing.

There was also a decent Pascal compiler for the c-64, but I cant recall what kind of speeds you could get with it.

So, basically (pun intended) you can do some stuff with Basic (or compiled languages) on the c-64, but you become very limited in what you can create. Ever since I learned ML, the only things I used basic for myself was simpler stuff, like scroll-text-editors, sprite-editors, movement calculation, etc.
2005-01-26 11:14
Oswald

Registered: Apr 2002
Posts: 5029
heh, once I did a "quite" "smooth" upscroller in basic :) d011+print to scroll up a line :)

and I have learned ASM from a hungarian book about c64, which only explained the CPU specs and adressing in 3 pages, and in short each instruction (it expected that you already know asm) I only coded in basic before that...

/me rulez :)
2005-01-26 14:48
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Quote: heh, once I did a "quite" "smooth" upscroller in basic :) d011+print to scroll up a line :)

and I have learned ASM from a hungarian book about c64, which only explained the CPU specs and adressing in 3 pages, and in short each instruction (it expected that you already know asm) I only coded in basic before that...

/me rulez :)


No, you a show-off... =-)

i learnt from a VIC20 machine code book and the addresses from the C64 manual; kids today have it so easy with their cross assemblers and online documentation and tutorials!! =-)
2005-01-26 15:20
hollowman

Registered: Dec 2001
Posts: 474
Quote: No, you a show-off... =-)

i learnt from a VIC20 machine code book and the addresses from the C64 manual; kids today have it so easy with their cross assemblers and online documentation and tutorials!! =-)


i'd say learning asm from richards tutorial is more impressive
2005-01-26 16:24
enthusi

Registered: May 2004
Posts: 675
Hm, I posted the link less for learning it all, but to see what's possible and it's good for that. A quick start :) I think most people are pissed by pages of introduction to hex,dec lda/sta blabla... So if someone's really new - what more impressive than seeing how fast and small things can be (this counts for 'coding' only :).
My opinion.
@Jackasser: nice links, but I prefer not to use the brain as last option...

And its true: dont talk - do it!
And to some amount: dont read - do it!

There is ALOT out there but noone needs to know it all at once.
Hmm, if I wait maybe I find some more super-clever stuff I can declare. Like pi=3 or something...
2006-02-27 01:28
THE TEA DRINKER

Registered: Jul 2005
Posts: 39
If you're new to coding on c64 I would advice the basic first begin with simple stuff then go to more advanced basic stuff then it will also be easier to understand assembler/machine code languages.

I have an idea of how Oswald did that smooth scroller in basic but I guess he used some data lines for it on the basic.

Let us try a lame example of how many ways there is to do the same thing basic/machine code/assembler languages.

Let say we want black color on the border and screenbackground.
I think the easy way is basic, if you're a beginner on codeing on c64.

poke 53281,0:poke 53280,0 (if you want that in your program use a line number in basic)
Like this:
10 poke 53281,0:poke 53280,0

Just for fun how is that in machinecode languages ?

lda#$00
sta$d020
sta$d021
rts

so can you convert machinecode/assembler to basic ?

I would say yes, but this is not a very easy task, but this is just a lame example, so I give it a try.

so the basic would look like this, well proberly not the best one as I call this is a machine code basic initilation routine.

10 a=0:for i=49152to49160
20 if i=-1thenend
30 a=a+1:read a:print a
40 poke i,a:next i
50 data 169,0,141,32,208,141,33,208,96,-1

if you want to call that from basic after run and nothing happend then type sys49152, I have difficult to explain this, maybe another user can do this for the new one that want to learn coding on the c64.
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Dr. Doom/RAD
serato/Finnish Gold
mahamsp
deetsay
Claus_2015
Bieno/Commodore Plus
Hydrogen/Glance
bexxx
Guests online: 75
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Aliens in Wonderland  (9.6)
6 Edge of Disgrace  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Fungus  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.05 sec.