Frozone212 Posted April 21, 2021 Share Posted April 21, 2021 Ok so, i want to learn programming on the C64 (mainly ASM) but i have two questions: 1: How do i read a memory map (and how does it help with assembly?) 2: What is a good assembler for newbies (Outside of FC3) and what magazines do you guys recommend that have ASM listings? 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 22, 2021 Share Posted April 22, 2021 First you need to get a general grasp of the memory map: which addresses are used for screen matrix, graphics memory, registers for VIC-II, SID etc, what is zeropage and how much of that one is yours to use. Then you can dig into details like ROM disassemblies to find e.g. Kernel routines and pointers where you can jump directly to ROM routines to help you. Of course you don't need to call ROM routines, you can reinvent all parts of the wheel yourself. I haven't used it myself, but this one calls itself the Ultimate C64 Reference (last updated June 2020) and seems extremely detailed. Perhaps a bit too much detail for a newbie, but a few Google attempts later you'll find more sparse and brief resources as well. Regarding which assembler to use, it is a matter of taste but I have one very good advice: go directly for cross assembly. That means you'll use a text editor on your PC, perhaps an IDE like CBM prg Studio or similar, a cross assembler (I'm using Dasm, but I know there are many options out there) and then either an emulator for dry testing or transfer programs to real hardware. Given that modern emulators are well over 90-95% accurate, I would recommend emulation for most of the development cycle. Once you have something reasonably playable, you can use real hardware to check for details and bugs that may behave differently from emulation. There are real assemblers on the native machine too, like Turbo Assembler which are usable but then you get issues about moving your source code later plus that modern cross assemblers tend to have more options in terms of macros, includes, multiple passes etc plus that most text editors made in the last 25 years are superior for editing compared to the 40 column screen on the C64. I know many newbies think it is the other way around, that cross assembly would be something difficult, for the pros while newbies are better off working natively but the threshold isn't that big to get cross assembly working, in particular not if you're using a ready-made IDE, and you have saved yourself from lots of hassles and risks of losing code by taking that approach directly. Also once you're into cross dev, you might want to try cc65 or some other C compiler, perhaps other cross compiling languages that can be intermixed with pure assembly language code. That is something you rarely can do on the native machine. Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 22, 2021 Share Posted April 22, 2021 (edited) And yeah, I completely glossed over the fact whether you know anything about 6502 machine language already. Since you asked about memory maps and assembler programs, I imagine you already have some prerequisites. Otherwise there are online resources for learning 6502 too. See also Codebase 64 for programming tips. Edited April 22, 2021 by carlsson Quote Link to comment Share on other sites More sharing options...
Frozone212 Posted April 23, 2021 Author Share Posted April 23, 2021 much obliged Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.