Jump to content
IGNORED

Questions about developing on C64.


Recommended Posts

Thanks in advance!

 

I would like to start playing (tinkering?) with programming for the C64 via WinVice emulation.

 

Now, I would guess that one would first program in ASM through their favorite mechanism and then just "run" the compiled file from WinVice.

 

Is this way off base?

 

 

Some questions please:

 

- What do most people use to program in? DASM? Other? Is there a "Windows" variant of DASM or the preferred C64 programming tool?

 

- Is there a "defacto" source (PDF?) for programming in ASM on the C64?

 

- Any other tips would be appreciated... REALLY anything if more than I currently know....

 

 

Thanks!

Link to comment
Share on other sites

DASM is fine

 

I use TMP on the actual C64 also. http://turbo.style64.org/ It's good stuff.

 

 

The best thing to do is go here:

http://www.bombjack....odore/books.htm

 

and pick a book that really grabs you.

 

I like 6502 machine code for humans, and any of the Abacus books

 

and, Machine Language for the C64 and other Commodore Computers by Butterfield.

 

edit: The butterfield book: http://www.bombjack....e_Computers.zip

 

It is the best way to get started.

 

Once you understand that book, you should get into some of the graphics/sound books as well.

 

Don't start with graphics and sound, or you will be confused beyond all belief.

 

 

 

EDIT 2: Also, don't buy into the hype people will tell you about doing it on the real hardware and all that noise. If you end up not enjoying your time, an emulator is free, so you haven't invested much.

 

Getting a real setup going is an adventure by itself. You'll need a working C64, a solid floppy drive or other way to transfer .d64's to your machine... a cartridge with a machine language monitor in it is important too.

 

Start with VICE, get the Butterfield stuff working out, and proceed from there. :)

 

the best way to decide if you like a book is to read it yourself. You may have a different approach to literature than someone else... so their recommendations might suck.

 

 

There are books I love that others hate, and vice versa. If by the 3rd or 4th chapter, a book isn't doin' it for you, pick a new one and try again.

Edited by Arkhan
Link to comment
Share on other sites

Arkhan,

 

Great, thanks!

 

Great website, thanks! Really needed this direction. Wow! If you read all those books, you might be a C64 expert! :-D

 

Is there a "windows" DASM? Or should I just set it up to work from Notepad+ (or one of the other text editor programs with some muscle) ?

Link to comment
Share on other sites

Arkhan,

 

Great, thanks!

 

Great website, thanks! Really needed this direction. Wow! If you read all those books, you might be a C64 expert! :-D

 

Is there a "windows" DASM? Or should I just set it up to work from Notepad+ (or one of the other text editor programs with some muscle) ?

 

http://www.luigidifraia.com/c64/index.htm

 

I might have DASM laying around in a folder still. I was doing odd rainbow things at one point for no reason really.

Link to comment
Share on other sites

Is there a "windows" DASM? Or should I just set it up to work from Notepad+ (or one of the other text editor programs with some muscle) ?

 

Dasm is only a cross assembler so it doesn't come with any Windows interfaces (this is normal for most of the options, i can only think of one that doesn't work that way) and i'd strongly advise against using Dasm whilst i'm here because it's truly appalling for error reporting in it's original flavour and not much better in the C64-specific modified form that exists! Have a look at ACME or KickAss instead, they're much better and the former will do a number of different platforms.

Link to comment
Share on other sites

I'd listen to TMR as far as DASM. I forgot about ACME.

 

I rarely use it or DASM because I use TMP *on* the C64 since I have all the hoojoo required to do that. I'm assuming you don't have all the hoojoo required to do that.

 

All the cool kids are using Final Cartridges and TMP, probably. :) lol

Link to comment
Share on other sites

TMR,

Cool, I will check out ACME and KickAss, they sound good.

 

Arkhan,

No, I do not have the hoojoo that all the cool kids have.... yet!

What are Final Cartridges? And TMP? Wait, TMP is an assembler on the C64? What is a Final Cartridge, sounds cool!

 

 

Thanks guys!

 

JR

Link to comment
Share on other sites

And TMP? Wait, TMP is an assembler on the C64?

 

Turbo Macro Pro assembler, a C64 native assembler that's an extension of the popular Turbo Assembler.

 

What is a Final Cartridge, sounds cool!

 

It's a freezer cartridge, allowing an executing program to be halted, disassembled and saved out in it's entirety. The Action Replay and it's recent cousin the Retro Replay tend to be more popular, the Chameleon defaults to loading a RR image at start-up for example.

Link to comment
Share on other sites

Arkhan,

No, I do not have the hoojoo that all the cool kids have.... yet!

What are Final Cartridges? And TMP? Wait, TMP is an assembler on the C64? What is a Final Cartridge, sounds cool!

 

You can go for the RR or AR like TMR mentioned (They're probably easier to find. I haven't been keeping up with the current scarcity rate on crap for the C64), but I am partial to my Final Cartridge 3. Any of these kind of cartridges are great usually. If you're on a tight budget, last time I checked, you could get the Epyx fast loader cartridge for next to nothing. This at least gives you a monitor program. It's a pretty goofy one... but for the 5$ I paid for mine a few years back, it isn't THAT bad.

 

I don't really use any of the recent-hardware other than the music-related stuff for C64 (Fotios MIDI interface), so I won't comment on any of it. The Chameleon is supposed to be pretty sweet, so that may change things for me. Plus, I like chameleons.

 

Anyway, I linked to TMP up top. You can put that beast on a disk and fire it up on the real thing and program away. It's how I got started. It's pretty solid.

 

To be honest, you DO get a better feel for the machine if you start out actually programming on it. It's difficult to explain. You end up appreciating what you're doing more.

 

The cheap way to manage that is to just get one of the X1541 cables (I use the XA1541) and attach a 1541/1571 to a PC, and then write .d64s over to it. You can do this to get Turbo Macro Pro on to a real disk to launch on your C64. If you've already got a C64 and a disk drive, the cable costs around 15$ last I checked. If you're good at building those kind of things, you could just make one.

 

 

My dev setup when I did C64 stuff more often was kind of odd:

 

1 C64 w/ 1571 floppy drive attached and FC3 jammed in the back.

1 PC w/ my other 1571 floppy drive attached to it

 

Then I was able to go back and forth from C64 to PC quite easily when needed. I'd usually end up doing stuff in VICE/DASM (maybe ACME. I don't remember using it too much), and then I could just pop the disk out and stick it in the other 1571 and launch it on the real C64. Pretty handy.

 

Eventually I got a 1581 drive, and that made my life 100x easier. I would just create .d81 images on PC, write them to floppy, and then use that floppy on the 1581. It was pretty excellent.

 

I used DirMaster http://style64.org/dirmaster to do that. It was a fun time.

 

Also, for the love of god don't use any emulator other than VICE.

Link to comment
Share on other sites

Thanks A LOT Arkhan for your great reply!!!

 

Well, I do love God, so I will use WinVice! :-D

 

That being said, could I do all of the things you said with WinVice. For instance could I just use TMP on WinVice and program from there? I don't have any of the hardware for the C64 yet.

 

If so, is it possible in WinVice to map a modern keyboard to the C64 keyboard through WinVice? In other words is it possible to just "type away" on my PC keyboard and have it come out appropriately on the C64 emulation of WinVice.

 

 

THEN... once I get going with all of this and understand it better, I will start to by the real C64 hardware.

 

 

Does my plan sound rational and possible?

 

 

 

Thanks!

Link to comment
Share on other sites

Thanks A LOT Arkhan for your great reply!!!

 

Well, I do love God, so I will use WinVice! :-D

 

That being said, could I do all of the things you said with WinVice. For instance could I just use TMP on WinVice and program from there? I don't have any of the hardware for the C64 yet.

 

If so, is it possible in WinVice to map a modern keyboard to the C64 keyboard through WinVice? In other words is it possible to just "type away" on my PC keyboard and have it come out appropriately on the C64 emulation of WinVice.

 

 

THEN... once I get going with all of this and understand it better, I will start to by the real C64 hardware.

 

 

Does my plan sound rational and possible?

 

 

 

Thanks!

 

Yeah, you can get the TMP stuff and fire it up in VICE with 0 issue. Once you get hardware, you can take the stuff you work on in VICE and put it on real floppies to use on a real C64. Its pretty easy.

 

WinVICE already starts up with the weird C64 layout IIRC. like the 2/@ key will put a " on screen.

 

You can screw with the mappings all you want though.

 

I started with VICE myself when I was like 12. And then I bought a C64 and all the nonsense and started on the real thing!

 

Sounds very reasonable to me.

Link to comment
Share on other sites

Cool! Thanks! Really appreciate the help!

 

JR

 

word.

 

There was this tutorial floating around that made the background border do some spastic crap. It gives some graphics heads up as well, and offers some heads up on how to use TMP.

 

http://www.antimon.org/code/Linus/

 

Might be worth working through to get yourself started quick and easy. Then you can sit down and read the Butterfield book!

Link to comment
Share on other sites

Greetings.

 

We maintain and develop Turbo Macro Pro. Aside from whats been recommended here, the other great advantage of TMP is the use of a ram expansion unit (REU). While these are harder to come by as real hardware, VICE will emulate the REU. You'll find that the "TMP+REU" modification uses the REU to enable two key features: (1) you can keep up to 6 different source code projects in memory at once, useful as a sort of ad hoc "version control" while you code, or for working on a library/kernel source at the same time as you're working on a main code section, etc. (2) the REU acts as a temporary storage for your source code while you test: your code is assembled to REU, then swapped out leaving you with almost the full memory for your code/data. Without an REU you're generally limited to coding for memory only up to maybe $6000-$7000 give or take depending on your code size. This will not be a big problem as you learn but if you want to code on the real thing extensively it can be problematic. With an REU, TMP gives you the absolute fastest possible code-test-code cycle available (on the real hardware) for almost any project.

 

We've been meaning to create some sort of quick start documentation and if you are intent on learning to code with TMP/VICE we'd be happy to assist you and then fold over the shared experience into said documentation for future parties. We'd really value hearing the kinds of questions and problems that someone completely new to c64 coding might have. PM me some email contact details if interested.

 

Also, we'd further recommend TMPx which is our cross assembler developed specifically to provide a truely compatible syntax with TMP. You could code using TMP, then eventually convert your source codes to ASCII (using a conversion program, 'TMPview') to continue coding using TMPx on, say, win32, OSX, or linux - or even move from TMPx/cross assembling back to TMP on the real thing, with some careful considerations.

 

You can find current documentation for both the c64 and cross assembler tools here: http://turbo.style64...ble-of-contents

 

Thanks, and good luck!

  • Like 1
Link to comment
Share on other sites

 

 

We've been meaning to create some sort of quick start documentation and if you are intent on learning to code with TMP/VICE we'd be happy to assist you and then fold over the shared experience into said documentation for future parties. We'd really value hearing the kinds of questions and problems that someone completely new to c64 coding might have. PM me some email contact details if interested.

 

 

 

PM Sent!

Link to comment
Share on other sites

Getting a real setup going is an adventure by itself. You'll need a working C64, a solid floppy drive or other way to transfer .d64's to your machine... a cartridge with a machine language monitor in it is important too.

 

 

What is meant by "... a cartridge with a machine language monitor in it is important too." ???

 

Is this needed?

 

 

I was going to snag a C64 and a disk/tape drive and just go with it... Will I need other things too? Like a machine language monitor?

 

 

JR

Link to comment
Share on other sites

To be honest, you DO get a better feel for the machine if you start out actually programming on it. It's difficult to explain. You end up appreciating what you're doing more.

 

The cheap way to manage that is to just get one of the X1541 cables (I use the XA1541) and attach a 1541/1571 to a PC, and then write .d64s over to it. You can do this to get Turbo Macro Pro on to a real disk to launch on your C64. If you've already got a C64 and a disk drive, the cable costs around 15$ last I checked. If you're good at building those kind of things, you could just make one.

 

 

What is the diff between the X1541 and the XA1541? How does it attach to a PC, 25-pin connector? What if your machine does not have one? How does a modern PC "mount" the disk drive? Pretty wild!

 

Is it possible to "mount" a tape drive to a modern PC in the same fashion? Seems unlikely....

 

 

Thanks!

Link to comment
Share on other sites

There's various X1541 types - the best homebrew/selfmade type for a modern machine is probably the XM1541.

 

You don't "mount" the drive - you run software which communicates with the drive via the printer port. It sends/receives commands/data to the drive as a real C64 would. Turbo mode is also supported.

 

Machine language monitor on real machine - much less important than in the old days. In the modern day you can develop entirely on the PC side using tools and emulation. All that's needed is periodically to try it on the real machine.

 

There's also PC-side interfaces to talk to tape drives, I've not tried any.

Edited by Rybags
Link to comment
Share on other sites

Also a question...

 

So if I have a C64 and a disk drive, without some way to read the disk drive with a modern PC the data is effectively "stranded" on the C64 Diskdrive, right?

 

So if you developed something and wanted to "share" it with others, you either have to give them the original diskette or connect that DD to your PC and get the file off of the DD and email it to them (etc.)?

 

 

Is my thinking right here? Thanks.

Link to comment
Share on other sites

Or, as said in the other thread, use one of the SD devices instead. Then you can transfer between C64 and PC easily and quickly. Honestly, I think it's the best bang for the buck instead of a tethered solution or reading/writing floppies with the PC. Been there done that, no thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...