Super Mario Bros for VIC-20

Basic and Machine Language

Moderator: Moderators

User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Super Mario Bros for VIC-20

Post by beamrider »

pixel wrote:I wouldn't be hurt if one would reuse the bit of graphics I made earlier with the screen designer. :D
sorry, was created from scratch :wink:

I did use your graphics in a static demo tho earlier in the thread...
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: Super Mario Bros for VIC-20

Post by Kakemoms »

I got the bugs out of the scrolling so now you can jump over some holes in the floor as well..
mario3.zip
(2.85 KiB) Downloaded 389 times
The bush is still only outlined. Collision detection is a mess. Masking of Mario is not working..

The whole meaning of this experiment was to see if I could get raster effects to color the bushes green (by changing background color). Its still possible, so I'll see if I have some time in the future to do something about that. I'll post the source once I have commented it (and removed some bugs).
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Super Mario Bros for VIC-20

Post by beamrider »

nice!

yes, that would be a big win being able to use raster effects to colour the bushes while scrolling and free up the foreground colour for other things avoiding colour clash.
User avatar
pixel
Vic 20 Scientist
Posts: 1359
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Super Mario Bros for VIC-20

Post by pixel »

I vote for beamrider's approach. *dug* :)

Wasn't it that raster effects come with a resolution of two characters? Just can't picture how that'd help with the bushes.

EDIT: Especially when things scroll.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
Snarko
Vic 20 Drifter
Posts: 22
Joined: Tue Feb 09, 2016 3:44 am
Location: Sweden

Re: Super Mario Bros for VIC-20

Post by Snarko »

I just tried the "mario3" image; I like it! :D I wonder if SMB20 really is possible? Maybe a short stage without enemies? Keep up the good work Kakemoms!
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: Super Mario Bros for VIC-20

Post by Kakemoms »

pixel wrote:I vote for beamrider's approach. *dug* :)

Wasn't it that raster effects come with a resolution of two characters? Just can't picture how that'd help with the bushes.

EDIT: Especially when things scroll.
Single cycle accuracy translates to half a character. When I made the unexpanded Vic-20 mousepointer, I only "borrowed" 4 characters from upper tape buffer to make the actual sprite. The rest of the screen was showing characters from character ROM; so you have to change character set position at start of the first byte, then change it back after two bytes have been shown.

As for the thinnest column that can be shown with a different color, that is two columns.

Example bush:

Outline:
bush-outline.png
bush-outline.png (1.29 KiB) Viewed 12383 times
Background:
bush-back.png
bush-back.png (1.05 KiB) Viewed 12383 times
Combined:
Attachments
bush-combined.png
bush-combined.png (1.31 KiB) Viewed 12383 times
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: Super Mario Bros for VIC-20

Post by Kakemoms »

As a side note: there is no way you can place above 3 pictures inline in same post without one of them overwriting one of the others. There is some kind of bug in the forum code.
User avatar
pixel
Vic 20 Scientist
Posts: 1359
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Super Mario Bros for VIC-20

Post by pixel »

All fine here. Will break out a raster lib when I get back to coding.

EDIT: And that'd be thanks to Mike who broke out an amazing bit of code. Who's paying the $7 for that team work Github account!? Let's kick butt.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: Super Mario Bros for VIC-20

Post by Kakemoms »

Yea. I'm plundering around with the example code, mostly optimizing it to get scrolling to work smoothly. Originally I was copying all bytes after 4 dual-bit shifts, but that takes a really long time and is a real waste. Now its only copying the bytes that contain something.. but I will improve that to only copy bytes that are actually changing. Should be alot faster. :shock:

The raster effect should be easy enough to get working once the rest of the code is fast enough.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Super Mario Bros for VIC-20

Post by beamrider »

In my experience the only way to achieve smooth scrolling on the Vic is to use double buffering otherwise you end up with tearing...

I switch the oversized screen between $1000 and $1400 and perform the characters shift in memory of the back buffer during which I use a combination of altering the horizontal offset at $9000 and udc character at $1800 and tool generated pair-shifted variants at $1C00 to obtain glitch free scrolling.

I now just need to write a sprite library compatible with all of this so may be gone for some time....
User avatar
Wilson
Vic 20 Enthusiast
Posts: 190
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Re: Super Mario Bros for VIC-20

Post by Wilson »

Kakemoms wrote:Yea. I'm plundering around with the example code, mostly optimizing it to get scrolling to work smoothly. Originally I was copying all bytes after 4 dual-bit shifts, but that takes a really long time and is a real waste. Now its only copying the bytes that contain something.. but I will improve that to only copy bytes that are actually changing. Should be alot faster. :shock:
Isn't that the same breakthrough that led to the development of Commander Keen? :mrgreen:
Really great stuff from you guys! I've been enjoying all the demos.
User avatar
Ivanhoe76
Vic 20 Devotee
Posts: 200
Joined: Fri Sep 28, 2007 11:17 am
Location: Italy

Re: Super Mario Bros for VIC-20

Post by Ivanhoe76 »

beamrider wrote:thought I'd add some music too.....
Wooow! That souds really similar to Nintendo one!!!!
No one should tolerate death and violence because tolerance will generate habit.
User avatar
Ola H
Vic 20 Enthusiast
Posts: 172
Joined: Thu Aug 20, 2015 6:08 pm
Website: http://www.athleticdesign.se/
Location: Sweden

Re: Super Mario Bros for VIC-20

Post by Ola H »

Agree, the music is among the best I've ever heard on the Vic.
User avatar
topcat
Vic 20 Drifter
Posts: 26
Joined: Fri Dec 16, 2016 12:57 pm
Location: London
Occupation: Broadcast R&D

Re: Super Mario Bros for VIC-20

Post by topcat »

It would be great for Mario to reappear 35 years after his debut on the VIC-20 in 1983's Donkey Kong. Yes, that was Mario!
https://en.wikipedia.org/wiki/Mario
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Super Mario Bros for VIC-20

Post by eslapion »

@Kakemoms
Concerning music...

When I was a kid, I dabbled around the music functionality of the Super Expander and I always set the volume to the max (15). I was rather frustrated that most polyphonic music came out as very noisy.

Then I realized many games used polyphonic music without the level of noise I was experiencing with my own creations but the volume was lower.

Only about 10 years ago I bothered to really investigate this problem with an oscilloscope. I noticed, when playing polyphonic music, the square waves generated by the VIC-I add (in amplitude) to each other and the sound amplification internal to the VIC-20 doesn't account for this effect.

When all 3 voices (normal, non-noise) add to each other then setting the volume to 8 should be considered the maximum. Any higher volume will cause waveform clipping and cause noise.
Be normal.
Post Reply