From the Commodore 64 to the Vic 20

Basic and Machine Language

Moderator: Moderators

Post Reply
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

From the Commodore 64 to the Vic 20

Post by 20questions »

Ok, so i am learning 6502 assembly as a way to keep my mind occupied away from the corona-virus and was wondering: How different is the Vic 20 to the C64? would i have to downsize any machine language programs that would normally work on the C64? What about Zero Page? Would there be enough room? I know it sounds silly that i'd want to go backwards when programming, but it's easier on my brain: simpler system, Simpler time.

any thoughts on the matter

I am using Jim Butterfield's 6502 machine language book.

so far, i've done pretty well, examples are clear and concise. How much memory would i need on the Vic to assemble on Vicmon? Does anyone have a copy on file? (zimmers links just lead to garbage text)
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: From the Commodore 64 to the Vic 20

Post by chysn »

It's an interesting question you pose. I've got four kids and several other hobbies, so I decided to focus almost all of my retro-computing time on the VIC-20. I sold my C64 and C64 cartridges to finance more VIC-20 stuff. So it doesn't sound silly or backwards at all to prefer the VIC-20 over the C64. But I've spent way more time in my youth writing machine language for C64, so I know a bit about them both in terms of comparative features.

There are a great many similarities and a great many differences. Some things are directly transferable. For example, the 6502 instruction set is the same. The KERNAL jump table addresses are the same, so if you're familiar with the C64 KERNAL routines, you can use those. The PETSCII codes and screen codes are the same. Many things use the same memory addresses, and many things don't. You'll really have to refer to a memory map to do whatever it is you want to do.

Certainly the hardware capabilities are different, as you're probably aware. The C64 has the SID registers for sound, which make the sound more flexible but more complex. The C64 has hardware sprites which make some kinds of games way easier to make. Sound and graphics won't be the same at all.

If you want to use VICMON in RAM instead of from the VICMON cartridge, you should track down a 35K or 32K cartridge. This will allow you to use any of the VICMON images. Try to find one with a reset button, so that you don't have to load up VICMON again if you crash something. You can get VICMON here: http://www.zimmers.net/anonftp/pub/cbm/ ... index.html

I like having VICMON on cartridge, myself, for the immediacy. I do my actual programming on my MacBook Pro, but VICMON is a nice tool for debugging and seeing the code. Some people like VICE for doing all this work. There are as many workflows as there are programmers.

You had some questions about memory and downsizing and stuff. The best thing you can do to start may be to take a look at a high-level VIC-20 memory map (http://sleepingelephant.com/denial/wiki ... Memory_Map). The subject of a VIC-20's RAM is a pretty deep subject in itself. The C64 can switch between RAM and ROM, so there's still a little complexity. But the VIC-20's array of possible RAM and external ROM configurations is mind-boggling.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: From the Commodore 64 to the Vic 20

Post by TMR »

20questions wrote: Sun Mar 15, 2020 4:54 pm Ok, so i am learning 6502 assembly as a way to keep my mind occupied away from the corona-virus and was wondering: How different is the Vic 20 to the C64? would i have to downsize any machine language programs that would normally work on the C64?
It depends on the program; something simple will probably just need some changes for video registers and memory use, but anything written to take advange of the C64's hardware is, in general terms, probably going to be an absolute pig to convert. It certainly isn't something I'd recommend to an assembly language beginner.

Stick to one machine, learn how it works and get some practice in with assembly language and then look at other platforms to see how many of those skills can be transferred.
Post Reply