Sign in to follow this  
Followers 0
bigbadbear9885

How were Commodore 64 games developed?

25 posts in this topic

So I guess that the Commodore 64 was used to make games for itself

What language did they use for them(And by the way, I'm talking those actual commercial games and software for the C64)
because I know you can program in basic straight from the the thing, but did commercial games use assembly?

Speaking of that, could Assembly code be assembled on just the C64, just like basic? Not having to go and buy something

One more thing is, could the Painting softwares for the C64 be used to make the graphics for the C64 games, or did to all be done in the programming?
0

Share this post


Link to post
Share on other sites
There were assemblers (MIKRO or MIRKO I think), C compilers, Basic things. There were also paint programs like Deep Paint, and Koala Painter
0

Share this post


Link to post
Share on other sites
Can the C64 assemble by itself?

And so those Paint programs you listed could be used for the game graphics and sprites on the C64?
0

Share this post


Link to post
Share on other sites
There were commercial development systems available for the C64. You could get a Pascal compiler, for example. There were also assemblers. There were a lot of people well versed in 6502 assembler in those days.

Even programs written in BASIC usually had reems of POKEs.
0

Share this post


Link to post
Share on other sites
Yes. Why not?

There is nothing special about generating an .exe or creating a data file to be read. An assembler program needs only to read in your instructions and convert them to a proper binary format in machine language, in this case, machine language specific to the C64.
0

Share this post


Link to post
Share on other sites
I mean just like how you can just start the C64 without anything, and just write basic code and compile it without any compiling software, could you do the same exact thing with assembly, just go write some assembly code without anything and assemble same, same exact thing or did you have to Have some assembling software?
0

Share this post


Link to post
Share on other sites
[quote name='bigbadbear9885' timestamp='1352073335' post='4997346']
I mean just like how you can just start the C64 without anything, and just write basic code and compile it without any compiling software, could you do the same exact thing with assembly, just go write some assembly code without anything and assemble same, same exact thing or did you have to Have some assembling software?
[/quote]
You would either use a macro assembler to convert your assembly code into a binary executable (which you could later LOAD *,8 and RUN), or hand-translate your assembly code into machine code and use the built-in BASIC interpreter to POKE the machine language into memory and execute it.

The C64 used a BASIC interpreter as its "shell". It did not have a line-by-line assembler as its "shell".
1

Share this post


Link to post
Share on other sites
[quote name='Daaark' timestamp='1352071684' post='4997338']
Yes. Why not?

There is nothing special about generating an .exe or creating a data file to be read
[/quote]
I disagree with your exact wording here, though the underlying thought is bang on the money. The EXE file format is specific to Windows, so there's some secret sauce there. The specifics of how Windows loads and runs programs are kind of cool and worth a read.
0

Share this post


Link to post
Share on other sites
My bad, I meant executable. But .exe files predate windows, and are used as the executable extension on a few non MS OSes.
0

Share this post


Link to post
Share on other sites
The C64 did not ship with an assembler program, but you could write your own in BASIC if you wanted to, so yes, you could start from "scratch"
0

Share this post


Link to post
Share on other sites
I was too young to do commercial games back then, but I remember spending a lot of time with machine code / assembly cartridges like Final Cartridge and Hesmon. I would guess that this was the development environment for many commercial games too, at least to low-to-mid budget ones.

Most games were written in straight machine code, but there were some in basic or basic/machine code hybrids, such as many of the text adventure games and Sword of Fargoal.
0

Share this post


Link to post
Share on other sites
Commecial development has been for sure be done with Macro Assemblers, and compilers for programming languages like PASCAL. If I remember right there was an BASIC compiler available that gives good results. Mainly the assemblers and compilers are split into parts and loaded in background from a disk (160kb single sided 5 1/4 inches), wenn needed.
Think of the memory constraints that you have on a C64. Even if you turned off the BASIC ROM you allways had less than 64kB for your program and data.

Writing an assembler program and translating it by hand was only a time consuming thing. If you have done this some time you know the instruction codes by value and it was easy to read and write them. Reading could be interesting if you had some assembler code and wants to know what they do in there (reverse engineering). It was easy.

Accessing the hardware was even easy, because you had no restrictions while accessing. The hardware registers where all memory mapped. So you only needed to know the address and then you could manipulate the functions of the hardware at will.

Funny time
1

Share this post


Link to post
Share on other sites
I reckon the first few years of the C64's life games were written on the C64 itself, but then written on a more powerful machine in its later years such as the Commodore Amiga. Just a guess though...

I'm currently going through the book "Machine language for the Commodore 64 and other Commodore Computers" by Jim Butterfield, and that is a good place to start learning about the C64. First thing one discovers is that separate programs were needed to write machine code and assembly - Monitors and Assemblers, respectively.

I'm using the VICE emulator and also downloaded a nifty little IDE called C64 Program Generator, written by .Arthur Jordison. Oh, and for learning how to use VICE's built-in monitor, I highly recommend "Spiro's CBM Blog" Monitor tutorials.
1

Share this post


Link to post
Share on other sites
[quote name='Anri' timestamp='1352116546' post='4997536']
I reckon the first few years of the C64's life games were written on the C64 itself, but then written on a more powerful machine in its later years such as the Commodore Amiga. Just a guess though...
[/quote]
I don't know if it happened on machines such as the c64 but I do know that at some point amiga games were developed using cross assemblers and debuggers running on intel PCs.

I know that reflections did this at least on shadow of the beast II and later games (they used to have interesting blurbs in the documentation of their games telling about the developpment process and it was mentioned there iirc).
Factor 5 had even developped their own intel pc based toolset called "pegasus" that they used for all their amiga and console games (probably even for their atari ports too)., I had read this in an interview somewhere.

Nowadays it doesn't makes a lot of sense to use another pc to develop a pc game, but in those days it probably made a lot of sense for professional developers to turn to that kind of solutions because machines had small amounts of memory which made it hard to have a game and development tools to coexist and even though some OSes like amiga's had preemptive multitasking they didn't provide any kind of memory protection and process isolation, which meant any unfortunate write through a bad pointer could bring the entire system down (or worse, result in filesystem or text editor buffer corruption, all kind of fun things).

Also since most games just clobbered the entire hardware and memory and interruption handlers (because using the os induced too much overhead and the hardware was fixed anyway) it was likely much easier to use remote debuggers running on the intel pc than having some hacks to let the game coexist peacefully with the os during development.

As an example of the kind of things that could happen in those days when developing directly on actual target machine , the first game that Reflections developped on amiga was ballistix. I can't remember how the hell I managed to come accross that in the first place but there were actual portions of the game's assembler source code that ended up lying around on some unused sectors of the floppy disk. Evidently that game wasn't yet using a development process using a separate pc... Edited by Zlodo
2

Share this post


Link to post
Share on other sites
Games for the C64 were written on the C64, mostly in Assembler except for maybe a few early commercial one in Basic. It was near impossible to emulate a C64 on another machine since the C64 used, like most computer of that time, some very proprietary parts that distinguished it from the other comparable machine on the market. At that time, there was fierce competition by computer maker trying to corner the market. There were no incentive to create something that could be copied by your competitor. Yes they all used the same CPU or some version of it (the C64 used the 6510 variant of the 6502) but their helper chips were all different, like the SID for audio on the C64 or the Antic graphical chip on the Atari 800 computer.


Also, the other plateform in existence at the time weren't up to the task when in comes to emulation. Even the Amiga fared poorly when trying to emulate a C64. The early PC's also cost a lot at that time and had limited graphical capability (think CGA 320x200 4 color mode) and couldn't really be used to emulate the colr mode of even those 8bit computers.
. Edited by AMenard
0

Share this post


Link to post
Share on other sites
If some are interested, you can read on what was being done and what was available at the time on those 8 bit machine by reading some scanned magazine like the one you can find on [url="http://www.atarimania.com/list-atari-magazines.html"]this site[/url]. Those are for the Atari 8bit computers and Atari ST but they should give you an idea.

Note: I'm old enough to have lived through the home computer revolution. I never had the money to buy an Apple 2, but I did owned and used/programmed the following:
[list]
[*]TRS-80 MC10
[*]TRS-80 Color Computer 2
[*]Vic 20
[*]C64 (still have it!)
[*]Atari 600XL
[*]Atari 800XL (still have it!)
[*]Atari 130XE (Still have it!)
[*]Atari ST 520FM
[*]Amiga 1000 (Still have it!)
[*]Amiga 500 (Still have it!)
[*]Powermac G5
[*]iMac 2010 (i3 still have it)
[*]PC (XT & up to present day, I have a Dell 8500SE )
[/list]
0

Share this post


Link to post
Share on other sites
Almost forgot...

If you can get your hand on some way to try those game of yore, maybe via emulation, those are a great source of inspiration for those trying their hands at game programming. Those game, for a big part, were simple, since they had to fit in limited ressources. A big game at the time had to fit into 32k of ram and the data for the game was splitted on one to a couple of floppy sides, which were 170k per side for the C64. This didn't impact the variety of games though, so there is plenty to "re-invent".

I would really like a modern version of Archon to be made for exemple. Hell, I may try to make one myself if it comes down to it.
0

Share this post


Link to post
Share on other sites
[quote name='bigbadbear9885' timestamp='1352069858' post='4997325']
So I guess that the Commodore 64 was used to make games for itself

What language did they use for them(And by the way, I'm talking those actual commercial games and software for the C64)
because I know you can program in basic straight from the the thing, but did commercial games use assembly?
[/quote]

Mostly (6502) assembly language. This is a good read:
[url="http://bryanpendleton.blogspot.com/2011/12/prince-of-persia-still-alive-after-25.html"]http://bryanpendleto...e-after-25.html[/url]
[url="http://jordanmechner.com/blog/2009/05/prince-of-persia-released/"]http://jordanmechner...ersia-released/[/url] Edited by Matt-D
0

Share this post


Link to post
Share on other sites
Today some game are still developed for it (selfsell: Look at my journal, I'm building a game in several steps [url="http://www.gamedev.net/blog/949-new-old-things/"]here[/url])
It's way easier today with all the cross assemblers and information on your fingertips.

(selfsell2: I also recommend C64Studio, a Visual Studio like IDE, that attaches to WinVICE to allow debugging)
0

Share this post


Link to post
Share on other sites
Commercial software for the C64 tended to be pure assembly code. Obfuscating basic wasn't really viable and the programmers were able to squeeze alot more out of their hardware in assembly. When you have tiny floppy disks it makes more sense to store the data in binary format rather than in plain text for the basic interpreter.

As for images, again, resource constraints it wasn't exactly viable to save an image file and stick it somewhere, the filesystem itself would take a little too much space. They tended to be hardcoded graphics.
0

Share this post


Link to post
Share on other sites
[quote name='Endurion' timestamp='1352215422' post='4998056']
Today some game are still developed for it (selfsell: Look at my journal, I'm building a game in several steps [url="http://www.gamedev.net/blog/949-new-old-things/"]here[/url])
It's way easier today with all the cross assemblers and information on your fingertips.

(selfsell2: I also recommend C64Studio, a Visual Studio like IDE, that attaches to WinVICE to allow debugging)
[/quote]

Nice Cthulhu reference in your sig :-)
But isn't the unholy one using pure DirectX call instead of SDL?
0

Share this post


Link to post
Share on other sites
[quote name='Anri' timestamp='1352116546' post='4997536']
I reckon the first few years of the C64's life games were written on the C64 itself, but then written on a more powerful machine in its later years such as the Commodore Amiga. Just a guess though...
[/quote]

Dos based PCs were used on a few commercial games. Retro Gamer magazine (http://www.retrogamer.net/) has had several articles dealing with commercial C64 game development.

The most common way was on the C64 though. PCs were expensive, and a lot of games were developed by "bedroom coders" as contractors.
0

Share this post


Link to post
Share on other sites
In the beginning of the C64 there were only two available methods of writing your programs. Use the embedded basic and/or the Commodore Macro Assembler which was purchased separately. Many games were written with a combination of the two items where basic was used as a "script" language and time critical code was written in assembly and loaded in the free memory just above the basic interpreter ROM but below the kernel ROM. If I remember correctly the memory was 32k of free memory, minus 0 block of 256 bytes for optimal CPU usage and another 768 bytes of OS/Basic usage so all "effective" memory started at 1024. (I think it may have been 2048, can't remember positively.)

Anyway, eventually other assemblers were made available, languages, etc. But most of your most memorable games probably used the Commodore supplied tools because they were solid and simply worked.

Of anything which I remember of my days on the C64, the only one which stands out anymore: Hex EA == NOP instruction on the 65x series chips. As many times as I've worked for EA (they pay REALLY well), that's pretty much appropriate, NOP. :)

If you want further details of C64 dev, let me know, I can probably even dig up some old 6502 assembly source files assuming they are readable after all these years.
0

Share this post


Link to post
Share on other sites
A few people still code C64 games and demos as personal challenges.

Some tools:

http://www.cc65.org/
http://www.1541ultimate.net/content/index.php
http://6502.org/tools/asm/
http://www.8bitventures.com/mssiah/

This company still publishes C64 software:

http://www.psytronik.net/main/index.php
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0