You'll need:
An Emulator, I use VICE:
http://www.viceteam.org/
A 6502 compiler, I use CC65:
http://www.cc65.org/
A cable, I use a XM1541:
http://sta.c64.org/xm1541.html
A transfer program, I use CBMXfer:
http://www.6502.org/users/sjgray/software/cbmxfer/cbmxfer.html
The easiest thing to do it use the emulator to find bugs, make changes, and experiments. Then every now and then, and if it's convenient, shoot the program over to a real PET to hear what it actually sounds like.
If you've only got a tape drive, you'll need some programs to convert a compiled program to a file that you can record onto tape. Here's some programs that I haven't used, but might be useful to you:
http://www.zimmers.net/anonftp/pub/cbm/crossplatform/transfer/datassette/index.html
If you're developing using this method, it going to take a few minutes to record a program. It also takes a few minutes to load it on the PET as well. You're well advised to rely on the emulator to make sure the program is working first and as much as possible.
-----
The Source Code
There's no fancy pants make files or API or dependancies or any other weirdo junk. It's one big file, with few functions, and lots of ugly punk-rock code. There's also no weirdo MAKE file balloney. The closest thing that I've come to that is using an MS-DOS batch file called GO.BAT with the following one line of "code":
cl65 -t pet %1.c -o %1.prg
to use, type something like this :
go petsynth007
Which assumes the source file is called petsynth007.c and creates an output file called petsynth007.prg. It also creates an object file but who cares, you can ignore it. Or, you can add a DEL %1.o line to the end of the batch file if you want.
There's also no structs, or other fancy-pants modern programming techniques, or make files... or any crap. It's one big nasty pile of code I pounded out as quickly as possible. There's few comments, probably some swearing where there is comments, and there's some undocumented POKE-like statements, possibly without any mention of why or what it does. It's one file too, and includes only standard libraries. I believe there may also be some "copy and paste programming techniques" as well, but I can't remember, I stopped programming when I started having fun playing it.
Some programmers might be too self-conscience to release such a messy and nasty jumble of code... but not me. Computers and programming aren't supposed to do or be anything. They are a canvas. The creative process is messy. Anyone who is creating without making a mess isn't tapping into their creative spirit. Life is messy, so play! Also, it's open source, so it doesn't have to be anything. If you want to use my mess to make your own, I'm excited to hear what you play with it!
Also, I greatly enjoyed creating it, but I also enjoy using it. Once I liked playing it so much, I didn't want to change it.
There's also lots of quirks some people might consider as "bugs", but I've found them to be interesting and compelling, and I don't feel like changing it just yet. Since it uses the computer keyboard, and it's setup in a ASCII or similar style, and includes a hardware matrix, it means that some keys "take-over" the sound over other keys. Once you figure this out, it's neat, because you can make real arpeggiated-like sounds. In fact, the entire drum feature was a combination of deliberate thought, experimentation, as well as accident. I knew it would sound interesting, but I never thought it would sound like it does!
So, if I were to re-write the program, doing it the way someone might think it "should" do done (including me!), then something would be lost, and something would be gained, but this is music, and it's the messiest of messes.
Music can't exist without a person, and nothing in the natural world sounds like it. It's just about the only art form with that nature.
In any case, you have been warned.
Once you hack and compile it, you're left with a .PRG program. Transfer it to your disk drive (see this section) and you're off and rocking!
