|
Post by The Geek on Skates on Dec 17, 2022 16:14:04 GMT
For most of my not-web-based code projects - both at work and at play - I prefer C over pretty much anything else. But using cc65 with an unexpanded VIC-20 is... well, let's just say "limiting" (lol). There are a lot of standard C things you just can't do, and even using conio.h (which is my go-to for VIC-20 programming if I'm targeting the full 35K) using cc65 includes some extra code that I just don't need. No biggy on the C64 - I've programmed several text adventure (and "mad libs") games for the C64 using cc65 - but on the VIC... sadly, sometimes C is not the best choice. Fortunately, I'm semi-decent at 6502 Assembly. I'm far from teh best, frequently find myself in situations that have me searching the web for solutions, etc. but I'm way past "hello world". But one thing I'm not sure about (programming with dasm) is, where should the program start? Most assemblers (dasm included) you have to do something like "ORG $<memory address>" or "* = $<memory address>"... finding out wher eto start my VIC-2 program has been like finding a 1-bit needle in a 64k haystack.
|
|
|
Post by c64stuff on Dec 17, 2022 21:38:21 GMT
You're probably going to want to watch the video below, but first the only limited advice I can give, which you probably already know, is that on the C64 (this is from memory so I may be wrong in some respects) it's ram memory is broken into two chunks separated by ROM memory banks, and this is why basic has most but not quite all the ram available to it. Of course too some ram is used by the system.
On the Vic20, again if I remember right, it has a somewhat more continuous ram map when it's expanded than the C64 has. These issues aren't really a problem on the C64 because RAM expanders came with memory management banking so you can quickly swap memory in and out of what the 6502 can see at a much faster rate than the 6502 can even do. Something like the memory banking hardware can do it in only one cycle while the 6502 would take 8 cycles to complete the task. It's how some new games are being written to push the C64 to new levels of graphics and sound in games like the Sonic The Hedgehog port.
What I'm getting at to hopefully help some in answering your question is that you might want to watch a few videos from The 8 Bit Guy where he shows how the memory is banked on the Vic20 versus C64. I'd watch his Commodore History video on the Vic20 which also details it's memory configuration as well as his C64 history video which I think touches on it too comparing the two. And for sure another one you'll want to watch is the one below on a memory and games expansion cartridge for the Vic20 (which is still being sold today) because I know for sure he goes into details of the various ram expansion sizes you can set on this cartridge for proper compatibility with certain games and how this effects the memory map, because the Vic20 had several ram expansion cartridge sizes to choose from and I think all of them configured memory in a different way that can be commercial software specific.
|
|
|
Post by c64stuff on Dec 17, 2022 21:58:59 GMT
You might also want to check out this video by Adrian's Digital Basement (great channel), because he builds a 24k ram expander for the Vic20 and he usually gets into more technical details on computers when covering a topic. And also I think when I watched it a while back he delves into changing memory pointers on the Vic20 so it can run Pet software. I may be wrong about that though.
|
|
|
Post by The Geek on Skates on Dec 17, 2022 22:42:06 GMT
Wow, thanks for the videos, guys! I love watching "The 8-Bit Guy" (and thanks for the excuse to re-watch his VIC-20 content lol... how did I never see this video about the Penultimate cartridge? ). Never heard of "Adrian's Digital Basement" tho - definitely gonna watch that too. Very, very cool.
|
|
|
Post by c64stuff on Dec 17, 2022 23:11:48 GMT
Yes Adrian's Digital Basement is heavy in commodore content but he also covers other computers too. Another great one for more technical details is Jan Beta. He might have some more Vic20 specific ram mapping videos for you if you look up things like ram expanders for the Vic20. Btw, if you search the messages in this forum several months back I believe somebody posted a file for TheVic20 and C64 Mini or Maxi that is the above video's Penultimate cartridge in software, with all the proper tag file settings so it launches properly as that cartridge with expanded ram and everything else.
|
|