How do you make a demo?

Basic and Machine Language

Moderator: Moderators

JRBasic
Vic 20 Newbie
Posts: 17
Joined: Thu Dec 20, 2018 10:31 am
Occupation: Programmer

How do you make a demo?

Post by JRBasic »

I wanna know how to make a demo, because I wanna make a demo myself...
...But I don't know how, I think they go into some sort of screen mode that the VIC-20 has, which probably interprets empty memory as pixels, and colors those pixels to create mind-blowing effects.
siccoyote
Vic 20 Dabbler
Posts: 91
Joined: Sun Nov 26, 2017 6:27 pm
Location: UK

Re: How do you make a demo?

Post by siccoyote »

I hear you need a high powered spectra-laser-scope which can put you on the grid from there you can manipulate the code on a bit-level. You can utilize all the memories at the disposal of the master control program.
User avatar
OmegaMax
Vic 20 Newbie
Posts: 12
Joined: Fri Mar 08, 2019 9:59 pm
Location: Canada

Re: How do you make a demo?

Post by OmegaMax »

You could try and find some source code to study or have a look through the code of the demo you're interested in using debugger.
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Re: How do you make a demo?

Post by Witzo »

"They need to do way instain c0der> who kill thier demmos, becuse these demmo cant fright back? It was on the news this mroing a scener in ar who had unstabled raster for three scrolls, they are taking the three demo back to csdb too lady to rest. my pary are with the group who lost his prods ; i am truley sorry for your lots"
JRBasic
Vic 20 Newbie
Posts: 17
Joined: Thu Dec 20, 2018 10:31 am
Occupation: Programmer

Re: How do you make a demo?

Post by JRBasic »

That might actually be a good idea, I will try to find a debugger and look through memory of demos, such as Impossiblator 3, Vicual MMix, Large Unified Theory, and maybe a few other demos...
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Re: How do you make a demo?

Post by Witzo »

I don't know much about demo programming myself, but I'm looking into this Pascal compiler's tutorial to learn some things:
http://www.lemonspawn.com/turbo-rascal- ... downloads/
Maybe it can help you as well.

For example, VIC tutorial 2 does an animated tunnel effect.
Image

Here's Lemonspawn's introductory vid:
https://www.youtube.com/watch?v=WhJSG7TiHAE
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Re: How do you make a demo?

Post by Kweepa »

Every demo (and especially every part of every demo) is different, and reading the source won't help much I don't think (unless you spend waaaay too long analyzing it). It's kind of like cutting open a brain to see how it works. It just looks like a mess of neurons/opcodes.

Generally, I imagine the thought process is one of either
- X hasn't been done before on the Y. how do I do X, given my awesome assembly and hardware knowledge?
- the Y has this cool hardware feature that will let me do X, and blow peoples' minds.

For example, the VIC can
- control the screen size and position
- using interrupts, change the screen size, position and colors more than once per frame
- use the tiled screen to update multiple locations on the screen at once
RJBowman
Vic 20 Enthusiast
Posts: 198
Joined: Tue Oct 25, 2011 7:50 pm

Re: How do you make a demo?

Post by RJBowman »

Demos generally need to be written in assembly language to really push the machine to the max. They require a creative mind that can look at a 30 year old hardware specification and see something that hasn't been seen before.

The most impressive demos I've seen are the "New Frontiers in VIC-Hires-Graphics" demos that showed how to display full color photos on the VIC's 2600-era graphics interface, and various demos that are full of color and more movement than you would think the machine could produce. What they have in common is that they use a technique called raster chasing to alter the main VIC registers (background color, screen position, etc.) multiple times as the TV raster draws the image on the screen. With this technique, the VIC can do things that "bigger" machines like the C-64 and Atari 8-bit series would be hard pressed to do.

The VIC does have one advantage over those bigger machines; the graphic interface uses less memory than the others to fill the entire screen with graphics. There is less detail, but fewer CPU cycles are required to change the image.
User avatar
Wilson
Vic 20 Enthusiast
Posts: 190
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Re: How do you make a demo?

Post by Wilson »

I remember being mystified by this too. :D
Even though I was very new to programming at the time I read it, I found this introduction very helpful:
http://www.antimon.org/code/Linus/
It's C64 focused, but a lot of it applies to any platform. It only goes into the very basics, but I think it does a good job explaining the basic concepts.
groepaz
Vic 20 Scientist
Posts: 1191
Joined: Wed Aug 25, 2010 5:30 pm

Re: How do you make a demo?

Post by groepaz »

it probably makes sense to study some simple c64 things first... the basic ideas are the same, but you will find a lot more info about it, and on the vic the memory restrictions are a lot more present than on the c64, its way easier when you dont have to worry about just having those 3k to work with :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: How do you make a demo?

Post by Noizer »

Memory restrictions and the lack of special chips may lead to efficient coding techniques and new interesting discoveries. Do consider a few things on c64, like independent sprites or ADSR supported on hardware level are easy to code compared to vc20. So for begin the look on other systems can be helpfull and inspirating, but the target shouldn‘t be forget. The danger of disappointment could overhand.
I think Vic20 is an unique system, so who‘s coding on it, should keep it on mind.
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
User avatar
Mike
Herr VC
Posts: 4852
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: How do you make a demo?

Post by Mike »

As a rough hint to the OP, if you need to ask such a question with a broad scope like this, no clear goal and showing some misconceptions (even if mostly benign ones) - you still got a long way to go. Doesn't help either if you state something like this in another thread:
JRBasic wrote:I know how to program in Basic, or at least some basic functions of Basic!
... because that's not really telling much. I'd think lots of people here in Denial share that interest. :wink:

Demos are mostly written in machine language, and when write your first demos you'll need to demo your developing skills to yourself. In that sense, even something like the small programs I recently did with VICMON would be a step in the right direction.

Otherwise, I'd have to concur with what Noizer wrote in the preceding post: a similar platform like the C64 might be a step stone as well, but the different hardware could raise false hopes when it comes to transferring the skills to the VIC-20. You should be aware of that.
JRBasic
Vic 20 Newbie
Posts: 17
Joined: Thu Dec 20, 2018 10:31 am
Occupation: Programmer

Re: How do you make a demo?

Post by JRBasic »

Witzo wrote:I'm looking into this Pascal compiler's tutorial to learn some things:
http://www.lemonspawn.com/turbo-rascal- ... downloads/
Maybe it can help you as well.
Thnaks, there's two things I don't really know, and they're both important for demos!
1. If you created your own visuals, they wouldn't normally display, how do you display them?
2. How do you combine visuals, like for example switch from one screen to another, many demos do this!

Oh, and I'm getting an error if I try to compile the music.
User avatar
Mike
Herr VC
Posts: 4852
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: How do you make a demo?

Post by Mike »

JRBasic wrote:1. If you created your own visuals, they wouldn't normally display, how do you display them?
There is a representation of your 'visuals' in memory (mostly, text screen buffer, attribute data in colour RAM and character definitions) and - in preparation to all this! - you already have programmed the corresponding registers of the VIC chip in order to display that representation on screen. This includes, but is not limited to, the register $9005 (36869) and also the registers $900E and $900F (36878/36879) which define the global colour palette. Please refer to the VIC-I data sheet for further information.
2. How do you combine visuals, like for example switch from one screen to another, many demos do this!
This needs you to change the representation in memory, possibly also some of the VIC registers, in order to comply with how you want that change to look like.
Oh, and I'm getting an error if I try to compile the music.
Can't tell you anything about that one. I don't know how your (cross-)programming setup looks like.
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Re: How do you make a demo?

Post by Witzo »

JRBasic wrote:
Witzo wrote:I'm looking into this Pascal compiler's tutorial to learn some things:
http://www.lemonspawn.com/turbo-rascal- ... downloads/
Maybe it can help you as well.
Thnaks, there's two things I don't really know, and they're both important for demos!
1. If you created your own visuals, they wouldn't normally display, how do you display them?
2. How do you combine visuals, like for example switch from one screen to another, many demos do this!

Oh, and I'm getting an error if I try to compile the music.
Mike has answered your questions beautifully. Thanks Mike!
The error you get on the music example in Turbo Rascal, is because it is a procedure that is compiled from and called by the demo 'tutorial_4_rastereffect_and_music.ras'. So build that one, and the music gets compiled along with it.
When you look in the code of that one, you can see that it looks up the source file of mystic_runner.ras.
Post Reply