Hi there
My plan is to create a demo for unexpanded VIC20 and I have couple questions since I'm a beginner.
1. VIC Tracker is a nice tool for creating music, but sometimes I have only 0.5 kb of free RAM for music, so I guess vtcomp (player) is not a way to go in that case? Do you adive any other player or one has to create player/tracker from scratch?
2. I'm planning to use Kernal procedures for loading data from disk, what locations on zero page and the area $200-$3ff are forbidden to change in that case?
3. I couldn't find an information about displaying graphics on the border- I saw that some demos display more than 22x23 characters, how is that done? by modifying $9002 and $9003 registers? what about the screen memory then? is it also $1e00-$1fff?
Thanks
gorgh
Some basic questions
Moderator: Moderators
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Some basic questions
Welcome!
You find more background, especially about free ZP addresses, in the thread "Free ZP" which ones?.
Greetings,
Michael
gorgh wrote:1. VIC Tracker is a nice tool for creating music, but sometimes I have only 0.5 kb of free RAM for music, so I guess vtcomp (player) is not a way to go in that case? Do you adive any other player or one has to create player/tracker from scratch?
I am not an expert in VIC Tracker (rather did my own sound player routines where needed), but Daniel Kahlin (tlr) posts regularly here in Denial, so should be able to explain the use of VT in tight memory setups.tlr wrote:[...]
The KERNAL occupies $90..$FA in zero page, and also a fair share of the $0200..$03FF OS workspace. The vectors at $03xx should be left untouched unless you really know what you're doing, there are also some vital tables in the $02xx range. The so-called 'program indirects' at $02A1..$02FF and the tape buffer in $033C..$3FB are free for user programs - the latter obviously only if no tape operations are active.2. I'm planning to use Kernal procedures for loading data from disk, what locations on zero page and the area $200-$3ff are forbidden to change in that case?
You find more background, especially about free ZP addresses, in the thread "Free ZP" which ones?.
There's no way to put things in the border, but the display window can be re-sized and re-positioned with the VIC registers $9000..$9003. Please note some of the values there depend on whether a PAL or NTSC VIC-20 is in use.3. I couldn't find an information about displaying graphics on the border- I saw that some demos display more than 22x23 characters, how is that done? by modifying $9002 and $9003 registers?
The base address of the text screen and character generator can be changed with VIC registers $9005 and $9002. Only the internal RAM ($0000..$03FF and $1000..$1FFF) and the character ROM can be accessed by the VIC chip for graphics data!what about the screen memory then? is it also $1e00-$1fff?
Greetings,
Michael
-
- Vic 20 Newbie
- Posts: 7
- Joined: Sat Jan 11, 2025 12:37 pm
- Location: Wyszków
- Occupation: Engineer
Re: Some basic questions
Lovely, thanks Mike!
-
- Vic 20 Newbie
- Posts: 7
- Joined: Sat Jan 11, 2025 12:37 pm
- Location: Wyszków
- Occupation: Engineer
Re: Some basic questions
Hi again,
I have another question regarding screen size, what happens if the total sum of number row x columns exceeds $200 bytes size? What happens with color RAM at locations $9600-$97ff? Where are those extra loactions taking color information from?
I have another question regarding screen size, what happens if the total sum of number row x columns exceeds $200 bytes size? What happens with color RAM at locations $9600-$97ff? Where are those extra loactions taking color information from?
- javierglez
- Vic 20 Hobbyist
- Posts: 120
- Joined: Sat Jun 03, 2017 3:33 pm
- Location: Spain
Re: Some basic questions
Color RAM starts at $9400. Maybe you can find examples on how to use the video registers in the books hosted here:
https://commodore.bombjack.org/vic-20/books-vic.htm
https://commodore.bombjack.org/vic-20/books-vic.htm
-
- Vic 20 Newbie
- Posts: 7
- Joined: Sat Jan 11, 2025 12:37 pm
- Location: Wyszków
- Occupation: Engineer
Re: Some basic questions
AFAIK color RAM at $9400 is available only if 3k memory expansion is present, am I right?
I've got additional question: what part of the stack is safe to be utilized by the program?
I've got additional question: what part of the stack is safe to be utilized by the program?
Re: Some basic questions
The address depends on b7 of the $9002 register. Under normal circumstances this bit is set for unexpanded and 3K expansion systems and clear for 8K+.
There's no absolutely safe region, the bottom of the stack is used for scratch space by the BASIC number to string conversion routines. The top of the stack is used for the cassette error log. It very much depends on what context your code is running in.I've got additional question: what part of the stack is safe to be utilized by the program?
-
- Vic 20 Newbie
- Posts: 7
- Joined: Sat Jan 11, 2025 12:37 pm
- Location: Wyszków
- Occupation: Engineer
Re: Some basic questions
right
I'm going to use system disk loading routine during my demo, so can I assume that locations somewhere between $110-$1a0 are safe?
I'm going to use system disk loading routine during my demo, so can I assume that locations somewhere between $110-$1a0 are safe?
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Some basic questions
See also the recent thread here:
How do you decide how much memory can be forked off the stack for your own code?
... which practically asks the same question ...
... and where also an empirical method is given how to find out. 
Greetings,
Michael
How do you decide how much memory can be forked off the stack for your own code?
... which practically asks the same question ...


Greetings,
Michael