Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user eightbitswide ! (Registered 2024-12-24) 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)
 
... 30 posts hidden. Click here to view all posts....
 
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: 5094
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: 677
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
Ricky/Bonzai
Six/G★P
MCM/ONSLAUGHT
Jazzcat/Onslaught
Fungus/Nostalgia
Stryyker/Tide
Sulevi/Virtual Dreams
Guests online: 81
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 X-Mas Demo 2024  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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