Welcome! Please add your programs.

Basic and Machine Language

Moderator: Moderators

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

Re: Welcome! Please add your programs.

Post by 20questions »

it's less of a game, more of a utility, but this is my morse code helper, programmed by me to help others learn morse code at a pace they're comfortable with. I'm still getting used to commodore basic so bear with me, feel free to send me any bugs so i can work them out. for those that need one, here is a sheet to help http://experimentexchange.com/wp-conten ... de-pic.jpg

You never know, one day we might get hit by an EMP or lightning might cut off communications.

enjoy and give feedback

hope the file works ok

for the unexpanded vic 20
Attachments
morse code.zip
(715 Bytes) Downloaded 375 times
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
20questions
Vic 20 Hobbyist
Posts: 108
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Welcome! Please add your programs.

Post by 20questions »

do you like it?
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: 1204
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Welcome! Please add your programs.

Post by chysn »

Eh, what the heck. My son is a huge esoteric programming language fan, and wants to learn an assembly language before he goes off to college next fall. So I wrote a Brainfuck interpreter as a sort of demo for him. There was already a Brainfuck interpreter for VIC-20, but mine is way better, in that it uses 16-bit addressing and it can optionally execute code directly from screen RAM.

https://github.com/Chysn/vicbf
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
Miklós
Vic 20 Enthusiast
Posts: 165
Joined: Fri Oct 04, 2019 1:04 pm
Location: Hungary/Pécs
Occupation: butcher

Re: Welcome! Please add your programs.

Post by Miklós »

Hello
Here are 3 BASIC prg. which in the late '80s I was teasing.
You need VIC 20 + 16k ram.
My "coloring" program is my first program.
A kind of "mastermid".
The first version exists on VIC 20, somewhere on tape.
This is a redesigned version of c64.

Original, please translate it.
<language:Magyar, HU, Hungarian>
Hello
Itt van 3 BASIC prg. amit a 80-as évek végén itram.
VIC 20 +16k ram kell hozzá.
A "szinező" prg.-re az első saját programom.
Egyfajta "mastermid" .
Az első verzió VIC 20-on létezik, valahol megvan kazettán.
Ez a c64-es átdolgozott változat.
Attachments
vic 20 1987.zip
(6.25 KiB) Downloaded 301 times
RetroBasic
Vic 20 Newbie
Posts: 1
Joined: Sun Apr 19, 2020 1:33 pm
Occupation: Retired

Re: Welcome! Please add your programs.

Post by RetroBasic »

Hello,

I'm new here and new to the Vic 20. I'm a bit of a text adventure nut. I've contributed a few maps to CASA (solutionarchive.com)
I've read in various mags and web sites that Greg Hassett text adventures were converted from TRS80 to other systems "... like Vic 20 ...".
Well maybe I'm looking in the wrong places!
So in a moment of madness (or more like a weekend of madness), I typed it in from the Captain 80 Book of Basic Adventures.
This book contains TRS80 listings but the Basic is sooo similar that I only needed to remove a few Pokes and rewrite some lines that were longer than 88 characters. In the interest of trying to keep it as close to the original as possible, I've not altered any logic, input, or output to suit the Vic.
I know it's not up to the amazing work you guys do, but hey you have to start somewhere!
(requires 16K)

Si
Attachments
Journey.zip
(113.95 KiB) Downloaded 342 times
Last edited by RetroBasic on Sun Apr 19, 2020 2:32 pm, edited 1 time in total.
User avatar
Mike
Herr VC
Posts: 5130
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Welcome! Please add your programs.

Post by Mike »

Hi, Simon,
RetroBasic wrote:I'm new here and new to the Vic 20.
welcome to Denial! :mrgreen:

Cheers,

Michael
User avatar
orion70
VICtalian
Posts: 4272
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Welcome! Please add your programs.

Post by orion70 »

Welcome and thanks for your effort! A text adventure is always worth playing :D
User avatar
javierglez
Vic 20 Hobbyist
Posts: 120
Joined: Sat Jun 03, 2017 3:33 pm
Location: Spain

Re: Welcome! Please add your programs.

Post by javierglez »

I've been browsing the code samples for CC65 here https://github.com/cc65/wiki/wiki/Appli ... -assembler

As a tutorial I've modified the 2048 puzzle game for the VIC 20.

The original repository is here https://github.com/nanoflite/2048-cc65. I guess I should request a branch and upload the code modified by me, but I'm not really familiar.

It requires 16kb because of the compiler overhead whileas there's a C16 version running in 3 kb which I guess could run on a stock VIC but for me the point was learn cc65 not the game on itself.

Furthermore I know there's some other versions out there. Anyway here it is the prg in case anyone likes this puzzle.
Attachments
2048.zip
(6.18 KiB) Downloaded 307 times
charles92027
Vic 20 Newbie
Posts: 8
Joined: Tue Jun 14, 2022 12:57 pm
Location: California
Occupation: software engineer

My WIP PacMan

Post by charles92027 »

Back in the day I cut my teeth writing different versions of PacMan on the Vic 20. Recently I downloaded the emulator and starting working on this. It still needs some work, but it's coming along. Please comment.
Attachments
pacman.zip
(10.49 KiB) Downloaded 337 times
User avatar
Mike
Herr VC
Posts: 5130
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: My WIP PacMan

Post by Mike »

charles92027 wrote:[...] PacMan [...] still needs some work, but it's coming along. Please comment.
You should at least add a detection for "PacMan got eaten" and "All pills are eaten -> next level". ;) Also, sometimes the scoring seems to 'drop'/'forget' pills.

That being said, continuing a journal in an own (game specific) WIP thread surely is in order. :)
charles92027
Vic 20 Newbie
Posts: 8
Joined: Tue Jun 14, 2022 12:57 pm
Location: California
Occupation: software engineer

Re: My WIP PacMan

Post by charles92027 »

Mike wrote: Sat Jul 09, 2022 12:21 pm
charles92027 wrote:[...] PacMan [...] still needs some work, but it's coming along. Please comment.
You should at least add a detection for "PacMan got eaten" and "All pills are eaten -> next level". ;) Also, sometimes the scoring seems to 'drop'/'forget' pills.

That being said, continuing a journal in an own (game specific) WIP thread surely is in order. :)
Thanks Mike, I’ll start a WIP thread. The dropping pills seems to be a problem with the order that pac man and the ghosts clear themselves before moving.
In my todo list is death of Pac-Man, changing the level when it clears, a start screen and sound.
Back in the day I didn’t write in ML, so figuring out relatively easy things, like displaying the score, have been particularly fun.
User avatar
fishhack66
Vic 20 Newbie
Posts: 13
Joined: Tue Jul 25, 2023 8:49 am
Website: http://www.vanportmedia.com/PAL-1
Location: Cascadia, USA

Re: Welcome! Please add your programs.

Post by fishhack66 »

Hi, folks. Long-time reader, first-time poster. I'm also a long-time VIC-20 owner - it was my very first machine back in '82, and it's still operational. Once K-Mart had them down to $99 I could make it work on summer job money (that, and an electric guitar...it was a great year!). The last thing I did with it was in the early Teens, when I bought a MegaCart. Anyway, my retro computing hobby has been all over the place - different systems/processors (but all 8-bit stuff), old software preservation, relearning 6502 assembly language, and recently I built my own 6802-based machine from scratch (I do miss the more flexible index registers in the 6502, though).

Anyway, now everything is coming full circle, and my interest in my old VIC-20 has been rekindled. Specifically, I look forward to learning more about graphics and pushing the VIC chip, and also hardware interfacing.

But who doesn't love games (am I right???). So, with my introduction, I've attached a game of Swedish Whist, a trick-taking card game. I found this on a FLEX/OS-9 disk image from a Swedish source, dated from 1980 and written in TSC Extended BASIC. I modded and adapted it, added some color and bells and whistles as a first little project, mainly just to become reacquainted with the VIC's music generation and graphics characters. Listing and PRG file included. I hope you enjoy it. But beware: you may find yourself shouting "Stupid Lars!" at the screen more often than you'd think!

Thanks for the read,
Dave/Fishhack66
swedish-whist-16k.zip
(13.54 KiB) Downloaded 163 times
User avatar
mathom
Vic 20 Dabbler
Posts: 95
Joined: Wed Aug 07, 2019 11:37 am
Location: Centennial, CO USA
Occupation: Software Engineer

Re: Welcome! Please add your programs.

Post by mathom »

Nice game! Having to “play to lose” takes a little getting used to.
...mathom...
User avatar
Orangeman96
Vic 20 Enthusiast
Posts: 176
Joined: Tue Jan 16, 2024 3:42 pm
Location: U.S.A.

Re: Welcome! Please add your programs.

Post by Orangeman96 »

Too funny, and welcome! I too got my VIC-20 at a K-Mart (in Philly, mind you) for $88.00 back in 1983, if memory serves--with some First Holy Communion gift money. (Since you have been "lurking" for some time, you probably have a good idea of who is "naughty" and who is "nice." :P ) -OGM
boraxman
Vic 20 Newbie
Posts: 6
Joined: Wed Nov 04, 2020 3:19 am
Location: Melbourne

Re: Welcome! Please add your programs.

Post by boraxman »

This is a basic "demo" called "Smile Bounce". Lame name, but this is my first foray into assembly for the 6502. I had a Vic 20 when I was a teenager for a brief period (still have one, but it need repair), but never was able to fully utilise it, stuck with only basic.

This program displays a bouncing face, a movable cross hair, twinkling stars and some music. Its' designed for the PAL version, as it expands the screen size to something which is perhaps too large for NTSC. This was more an exercise in toying with the Vic20 internals. Shifting the screenmap, using interrupts, resizing the screen, graphics, self modifying code, music and a 'trick' where the .PRG loads binary data right where the screenmap is.

Source is attached. The ZIP file contains the source, the graphics, and a .prg ready to run.
smilebounce2.png
smilebounce2.png (11.49 KiB) Viewed 6554 times
Attachments
smilebounce1.png
smilebounce1.png (18 KiB) Viewed 6554 times
smilebounce.zip
(11.55 KiB) Downloaded 145 times
Post Reply