Retro Programming on the Commodore 64 - Episode 1 - Getting Started

  Рет қаралды 49,438

TheStuffMade

TheStuffMade

Күн бұрын

A lot of people, including myself, are stuck at home these days, so I thought it would be fun to try program the good old Commodore 64 again. This video is just me sharing my experience to make it easier for others to get started on the C64.
Episode 2: • Retro Programming on t...
Content:
00:00 Intro
00:55 Software - CBM prg Studio
01:42 Software - Vice Emulator
02:00 Configuring CBM prg Studio
02:38 Create a project
03:05 Write a BASIC program
04:24 Write a program in assembly
05:59 Write more complex assembly programs
10:47 Resources
12:37 Ending
Note: If you experience issues running the assembly code it's likely due to an issue with the latest version of CBM prg Studio. (Thanks to Roy Meredith for his help reporting and testing this issue, check out his youtube channel: / roypmetedith , he does remixes of classic video game music and various other game projects) You can download the older version of CBM prg Studio from my dropbox.
Downloads:
Episode 1 Project: www.dropbox.com/sh/cqafooib3f...
CBM prg Studio v3.13.0: www.dropbox.com/s/dk1d5e2hdgk...
Resources:
CBM prg Studio: ajordison.co.uk/index.html
Vice Emulator: vice-emu.sourceforge.io/
Instructions Reference: 6502.org/tutorials/6502opcodes...
C64 Wiki: c64-wiki.com/wiki/
Memory Map: sta.c64.org/cbm64mem.html
Machine Code for Beginners: ia601705.us.archive.org/22/it...

Пікірлер: 107
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Note: If you experience issues running the assembly code it's likely due to an issue with the latest version of CBM prg Studio. (Thanks to Roy Meredith for his help reporting and testing this issue, check out his youtube channel: kzfaq.info, he does remixes of classic video game music and various other game projects) You can download the older version of CBM prg Studio from my dropbox, link in description.
@TheStuffMade
@TheStuffMade 4 жыл бұрын
A lot of people, including myself, are stuck at home these days, so I thought it would be fun to try program the good old Commodore 64 again. This video is me sharing my experience to make it easier for others to get started on the C64. Content: 00:00 Intro 00:55 Software - CBM prg Studio 01:42 Software - Vice Emulator 02:00 Configuring CBM prg Studio 02:38 Create a project 03:05 Write a BASIC program 04:24 Write a program in assembly 05:59 Write more complex assembly programs 10:47 Resources 12:37 Ending
@G_Rizzly
@G_Rizzly 2 жыл бұрын
Thanks for this tutorial, I appreciate your effort to share this! Clear, straight to the point, and you know what you’re talking about. Exactly what I wanted to find.
@juanmanuelvalitutti5834
@juanmanuelvalitutti5834 3 жыл бұрын
Hello. I see that there are many people of my generation; I really like that. It seems like a meeting between boys, after a long time. Thanks for bringing the C64 back. Hope you upload more videos. Greetings from Argentina, and I thank you.
@johnadger6699
@johnadger6699 3 жыл бұрын
Hello Juan miguel amigo! Hope all is going well in Argentina.
@DailyCorvid
@DailyCorvid 2 жыл бұрын
Yay ohh love the old Commodore machines. Just got myself a TheC64 trying to get Simons Basic on there! Greatest Microcomputer ever.
@TheStuffMade
@TheStuffMade 2 жыл бұрын
Yeah, it's a lot of good memories from a time when everything was much simpler.
@DailyCorvid
@DailyCorvid 2 жыл бұрын
@@TheStuffMade not everything! You ever try to send a digital camera picture to somebody in 2002 .... LOL well, nobody knew how to open the weird file formats let alone have an internet connection. They use dial up which comes on a free CD! haha 42K Modem etc. Those were the days, having computers chirp instructions to each other using a phone! These days we send terabytes every week without a second thought. Back then it took hours and hours to send a single picture! Computers were in their infancy back then, and we're starting now to see just what miracles we can achieve using the things :)
@BikeArea
@BikeArea 2 жыл бұрын
@@DailyCorvid Yeah, miracles like pet videos and girls shuffle dancing... 😄 ...and being fed up of everybody posting daily garbage which leads us people back to those simpler times where everything was about learning stuff and not abusing stuff. 😉😉
@DailyCorvid
@DailyCorvid 2 жыл бұрын
@@BikeArea Linus watches Pokimane, i watch Pewdiepie, we all have a dirty little KZfaq secret :D The real miracle is that TV still exists...
3 жыл бұрын
The C64 was my first computer ever. I was 8 years old and it brings me so many memories back just starring at the blue screen.
@grymmjack
@grymmjack 2 жыл бұрын
Thanks for the tutorial. This is helpful. Appreciate the compassionate output!
@Erikslust
@Erikslust 4 жыл бұрын
Love the Commodore 64, lots of great memories.
@XYZB0RG
@XYZB0RG 5 ай бұрын
thanks for linking a book for noobs like me I've never ventured into doing things like this but I find C64 very interesting
@TheStuffMade
@TheStuffMade 5 ай бұрын
It's good fun programming these retro 8bit computers with all their limitations. Cheers, Jake
@RavenWolfRetroTech
@RavenWolfRetroTech 4 жыл бұрын
OMG what timing, I just started refurbing a 64 after 30+ years with the intent to get the RPG I was working on in the early 80's up and running. I had map code done in Assy for speed and was planning to write the game itself in basic. I look forward to watching these videos!
@TheStuffMade
@TheStuffMade 4 жыл бұрын
Thanks, that is great. Keep us updated on your progress and feel welcome to request anything you'd like included.
@RavenWolfRetroTech
@RavenWolfRetroTech 4 жыл бұрын
@@TheStuffMade @TheStuffMade First I need to get back up to speed. I did my "Assembly" programming using a HexMon cartridge so I didn't even have an assembler. I recently found my disks (Fortunately several of each) and a hard print (4.5 inches wide with tiny type from my old 1520 printer no less). Do you have any suggestions for an environment that will work well on the machine itself or is a PC based IDE the best option?
@TheStuffMade
@TheStuffMade 4 жыл бұрын
​@@RavenWolfRetroTech No worries. I'd highly recommend doing the development on PC, it will save you a lot of headaches. Then you can generate a prg file with your work and run it on real hardware, either using one of the SD card solutions (e.g. SD2IEC) or if you have a 1541 and want everything to be authentic you could use something like the ZoomFloppy interface to connected the drive to your PC and copy the files.
@meneerjansen00
@meneerjansen00 4 жыл бұрын
@@RavenWolfRetroTech I wouldn't want to start Assembly coding w/ CBM Prg Studio. It's meant for people who already know a lot about the C64's inner workings, sprites, bitmaps, character sets etc. I needed to read a book about Assembly first and practice w/ the 'Turbo Macro Pro' assembler on a C64 (emulator). "Professionals" who want to make cutting edge games use CBM Prg Studio (or C64 Studio , not related).
@RavenWolfRetroTech
@RavenWolfRetroTech 4 жыл бұрын
@@meneerjansen00 I used to know a lot about the inner workings and assembly on the C64 and Amigas. Now, not so much but I am hoping it comes back to me quickly
@henrikorpela2818
@henrikorpela2818 2 жыл бұрын
Thank you, very helpful video! Finally got some assembly up and running on C64!
@meneerjansen00
@meneerjansen00 4 жыл бұрын
Looking forward to the other video's. Keep up the good work. :-)
@franzbranntwein3541
@franzbranntwein3541 3 жыл бұрын
Wonderful tutorial! Really everything you need to get started. A+! Thank you.
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Thanks, much appreciated.
@1invag
@1invag 2 жыл бұрын
Not exactly, I had zero clue what was going on from the start, and proceeded to only get more lost from there on out 🤣. It may be everything you need to know to get started if you have some degree of experience with coding but if you have non it's just jibberish. I grasped the hello world bit, then nada
@sarahaugust8221
@sarahaugust8221 3 жыл бұрын
Thanks for making this video, a very good introduction!
@Starredmediasoft
@Starredmediasoft 3 жыл бұрын
It's fun to see you use the same sources I do for opcodes and memory map. This ide is very popular among C64 devs, however I still use notepad++ and 64tass as cross asm
@TheStuffMade
@TheStuffMade 3 жыл бұрын
It's so much easier these days with these great online resources, back in the day it was books or experimenting until you got the result your were looking for. I chose to use the CBM prg Studio IDE for this series because it's so easy to use and get up and running, sure there are more powerful solutions once you reach the advanced level, but for beginners, you can't beat that IDE. Cheers, Jake
@samhoward8909
@samhoward8909 3 жыл бұрын
Never delved into assembly language. Very informative!
@paullee2449
@paullee2449 Жыл бұрын
Excellent stuff! It's got me off to a really good start. Thanks.
@TheStuffMade
@TheStuffMade Жыл бұрын
Thanks, it's a lot of fun programming the old C64 once you get started. Cheers, Jake
@Testacabeza
@Testacabeza 2 жыл бұрын
Superb tutorial, thank you very much. You have showed me the way :) Cheers.
@taddy666
@taddy666 10 ай бұрын
Superb - thanks so much!
@FeedBackMain
@FeedBackMain 3 жыл бұрын
Pretty good! much memories, really great.....i was programmer for Ahoy! magazine... at mid 80´s! I wrote some games and bunch utilities for the 64 in those years. Im in nostalgic mode now... hahaha!
@briankumanchik2474
@briankumanchik2474 3 жыл бұрын
This is awesome!
@nicksmithtech
@nicksmithtech 2 жыл бұрын
This is so awesome! Thanks!
@tertia0011
@tertia0011 3 жыл бұрын
I would have liked to have programmed C-64 with assembly language in 1989 however there was little in way of text books on subject at my local libraries, bookshops & the technical institute I was studying microprocessor technology. Only info on this topic I had access to was for 8086, & 6809 microprocessors. CBM development environment & C-64 emulator looks excellent for program development & SD2IEC interface ideal for loading files direct to C-64 mainframe. Thanks for info on setting up. I will subscribe & look for your more recent uploads on C-64 assembly code programming.
@thehardcorezombie9444
@thehardcorezombie9444 2 жыл бұрын
This is an awesome video best stuff to learn :)
@TheUtuber999
@TheUtuber999 Жыл бұрын
First off, thanks for a great beginner's tutorial. At 10:40 the only caveat would be that the compiled prg file is 2,083 bytes, whereby most of that space is unused. I found that by omitting the base (org) address reference in code and then specifying $810 as the start address under Tools, Generate Sys() Call, the BASIC header bytes that are inserted toward the top will allow the SYS call to jump over them and continue seamlessly where the rest of ML code starts. The prg file will also compile down to just 51 bytes and the string should print properly. In this way it is not necessary to specify two org addresses and there is no need to think about how much of a gap to provide. Regards.
@TheStuffMade
@TheStuffMade Жыл бұрын
Hello, thanks. You shouldn't think of it as wasted space, it's just available memory. The way prg files work is that the contents must be continuous memory space, so when you build the sample it will go from $0801 until $10xx. So sure if it was important to make this specific file as small as possible then you are correct, but somewhat pointless in real projects where you use most of the memory including bank switching. It's much more important to plan your memory usage and configure the VIC memory space correctly for where you want your screen, sprites and charsets in memory. Then you can use a prg compressor like Exomizer to make your prg much smaller, for example my conversion of Rally-X (thestuffmade.itch.io/rally-x-64) the prg is around 62 kb, but after compression it can be as small as 22kb, but then again a few kb of saved disk space doesn't mean anything these days. Cheers, Jake
@BeatMax2023
@BeatMax2023 3 жыл бұрын
Nice introduction!
@konturgestalter
@konturgestalter 4 жыл бұрын
love it
@rickyderocher3181
@rickyderocher3181 3 жыл бұрын
Cool video! :-)
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Thanks
@beans315
@beans315 3 жыл бұрын
Its mad how u get tutorials that just work
@kaydues
@kaydues 3 жыл бұрын
first: thank you for this tutorial! second: what type of keyboard did you use here? sound very nice a not to loud.
@Centar1964
@Centar1964 Жыл бұрын
There is a new development package for the C64 called VISION BASIC. It compiles on the fly and makes stand alone programs for stock C64's plus a whole bunch of other cool things.
@TechMalaya
@TechMalaya 3 жыл бұрын
nicee
@SaschaRobitzki
@SaschaRobitzki 3 жыл бұрын
Assembler didn't work for me either with the last stable 3.5 release, the nightly build r39851 worked though.
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Yeah it seems something is not compatible between the latest CBM studio and VICE emulator. I have a link in the description with previous version of CBM studio, it works fine with VICE 3.5. Cheers, Jake
@kamara4700
@kamara4700 2 жыл бұрын
At 2:30 where he adds the emulator go to emulator parameters and add -autoload before the %pro otherwise vice with automatically run the program instead of just loading it.
@SockTaters
@SockTaters 2 жыл бұрын
Thank you so much!
@rici_21
@rici_21 2 жыл бұрын
not working :/
@nickbungus
@nickbungus 3 жыл бұрын
Please someone help me?????? I'm following this tutorial and I can get the BASIC programs going no problem, the issues start when I try and run the assembly. Its not copying the bytes into memory in VICE. I'm clicking 'Generate and Launch' and if I do the SYS call I just get 'READY'. If I do some PEEKS, I can see that the machine code isnt even loaded in the addresses? Where am I going wrong?
@TheStuffMade
@TheStuffMade 3 жыл бұрын
1. Do you use the "Generate and Launch" button when you launch the code from prg studio? 2. Does it show you a window with the code when you launch? 3. Can you try record what happens using the Steps Recorder? (this program comes with Windows, just type steps recorder on the start menu) Then either upload the file somewhere or email it to me on the address I have in the about section. Cheers, Jake
@victorwidell9751
@victorwidell9751 3 жыл бұрын
How do you prevent Vice from autostarting the prg? I'd like to have a chance to list and poke around before running it.
@TheStuffMade
@TheStuffMade 2 жыл бұрын
For assembly just remove the sys statement at the beginning of the code. Cheers, Jake
@kamara4700
@kamara4700 2 жыл бұрын
I had to add -autoload parameter at 2:30 of his video in front of %prg in Emulator Parameters
@vbrigham
@vbrigham 2 жыл бұрын
I see everyone's using cbm to program c64? I dont understand why except you see more code on the screen. I already know how to program on the vice. What is the learning curve?
@TheStuffMade
@TheStuffMade 2 жыл бұрын
If you only program in BASIC then it's mostly just a nicer editor plus it's easier to load and save the project you're working on, and if something crashes you don't risk losing your code. However if you program in assembly, then it's a huge advantage you can work with multiple source files in your project plus it's easy to copy and paste code around and you can include resource files, use the debugger etc etc. It's easy to setup and get started, just follow the steps in this video. Cheers, Jake
@hf4229
@hf4229 2 жыл бұрын
how to you open these programs through VICE rather than running them through CBM? I hope that question still makes sense. Also it appears that there still may be the bug where assembly wont load through VICE, it shows that its trying after I generate and send the assembly but it won't open. Thanks for the help in advance.
@TheStuffMade
@TheStuffMade 2 жыл бұрын
Hi, Check the video description if you have trouble building the project files. Once you have build the code, the CBM prg Studio will generate a .prg file, that's like a c64 executable, you can load this file directly in VICE or any other emulator. Cheers, Jake
@hf4229
@hf4229 2 жыл бұрын
@@TheStuffMade gotcha, are there like commands that i can use to open these projects in VICE traditionally? Not sure if that makes sense either, like how you can navigate your drives in DOS to open programs, but for basic?
@TheStuffMade
@TheStuffMade 2 жыл бұрын
@@hf4229 Hi, you cannot load the code directly in VICE, it must be compiled into a .prg file first. The easiest way to do it is how I show it in the video. Cheers, Jake
@sussus4914
@sussus4914 Жыл бұрын
I noticed that you have 'rts' on line 5 (after 'jsr write_string'). So I'm guesstimg that 'sys 4096' is also a subroutine call to address $1000 (in the basic assembly)?
@TheStuffMade
@TheStuffMade Жыл бұрын
sure, it will return to the basic prompt after it's done.
@newbiegaming6090
@newbiegaming6090 3 жыл бұрын
I'm having a problem following the tutorial. When I made the .bas file and clicked the generate and launch button, the emulator launched and in a few seconds it automatically ran the file, differently to your video. I just shrugged and thought it was a nice feature. But when it was time to test the .asm file, clicking the generate and launch button did the exact same as when launching the .bas file. Without giving me the chance to give any commands. How do I stop the emulator to simply autorun stuff, like in your video? It looks like the emulator waits for your input instead of autorunning.
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Have a look in the video description, many people got problems with the latest CBM prg Studio, there is a link to download the previous version. Cheers, Jake
@newbiegaming6090
@newbiegaming6090 3 жыл бұрын
@@TheStuffMade I am using the older cbm. The problem is with Vice. The emulator is running the .bas without waiting for input.
@kamara4700
@kamara4700 2 жыл бұрын
I had to add -autoload parameter at 2:30 of his video in front of %prg in Emulator Parameters
@newbiegaming6090
@newbiegaming6090 2 жыл бұрын
@@kamara4700 thanks. I'll try that next time...
@MichaelTheSequel
@MichaelTheSequel 3 жыл бұрын
when i program assembly, it doesnt run
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Check the description and try the older version of CBM Studio. Cheers, Jake
@SebastianSeth
@SebastianSeth Жыл бұрын
when i generate and run the program, the assembly dump launches, and when i exit it, the emulator doesn't open
@TheStuffMade
@TheStuffMade Жыл бұрын
Make sure you set the path to the Vice emulator 2:20 and that you use the Generate and Launch button to run your code. Cheers, Jake
@SebastianSeth
@SebastianSeth Жыл бұрын
@@TheStuffMade i was using the newest version, i then downloaded the previous version on your dropbox and it worked
@botteu
@botteu 2 жыл бұрын
When I try to run the assembly code, Vice runs the basic code and sys4096 does nothing. What am I doing wrong?
@TheStuffMade
@TheStuffMade 2 жыл бұрын
Check the video description and download the older version of CBM prg Studio. Cheers, Jake
@botteu
@botteu 2 жыл бұрын
@@TheStuffMade Thanks. I figured it out. Cheers, Daniel
@blorpburnday4249
@blorpburnday4249 3 жыл бұрын
What is that character at the beggining of the assembly program?
@TheStuffMade
@TheStuffMade 3 жыл бұрын
I assume you mean the line "*=$1000" it's just a star/asterisk. You can download the project with the sample source code, there is a link in the description. Cheers, Jake
@blorpburnday4249
@blorpburnday4249 3 жыл бұрын
@@TheStuffMade i see. Thanks!
@Obcubeon
@Obcubeon 2 жыл бұрын
generating and launching does not work for me. is there a way to fix it?
@TheStuffMade
@TheStuffMade 2 жыл бұрын
Check the video description. Cheers, Jake
@TheStuffMade
@TheStuffMade 2 жыл бұрын
@@Obcubeon Did you install the specific version linked in the video description?
@Obcubeon
@Obcubeon 2 жыл бұрын
Yes.
@TheStuffMade
@TheStuffMade 2 жыл бұрын
@@Obcubeon That's strange, you must have a different issue than everyone else. Best suggestion is to just open the source files and copy the code to a new project. Cheers, Jake
@SebastianSeth
@SebastianSeth Жыл бұрын
what does the rts command do?
@TheStuffMade
@TheStuffMade Жыл бұрын
RTS is return from subrutine. When you do a JSR MySubrutine, (JSR = Jump Subrutine) the CPU will push the return address onto the stack before jumping to MySubrutine and when you add a RTS at the end of MySubrutine, it will pop the return address off the stack and jump to just after your JSR call. Hope it makes sense. Cheers, Jake
@SebastianSeth
@SebastianSeth Жыл бұрын
@@TheStuffMade so that rts in the main label ends the program after ending the loop?
@random_precision_software
@random_precision_software 3 жыл бұрын
Any reason why the assembly program don't work?.. The basic one works fine so it's not the emulator.
@TheStuffMade
@TheStuffMade 3 жыл бұрын
Hi Roy, if you are on windows, you can try record what's happening with the Steps Recorder (it's built into windows, just type "steps recorder" in the start menu). Then record what happens when you run the assembly code and either upload the file somewhere or send it to the email I have in the about section, then I'd be happy to take a look. Of could make sure to check the captures don't include anything you don't want to share. Cheers, Jake
@random_precision_software
@random_precision_software 3 жыл бұрын
@@TheStuffMade OK thanks Ill have another go on my PC
@Veksta
@Veksta 3 жыл бұрын
@@random_precision_software Interestingly, I am faced with the same issue. BASIC program loads fine, but the asm seems to open vice quickly then shuts it..... I wonder if this is a bug (in the emulator). Sadly, I only have the one windows box to check on because quite frankly, windows is the devil.
@random_precision_software
@random_precision_software 3 жыл бұрын
@@Veksta download version 13 it'll work
@Veksta
@Veksta 3 жыл бұрын
@@random_precision_software copy. Will give it a crack and report back. Thanks for the tip!
@jasonking1284
@jasonking1284 Жыл бұрын
Wow.. you are still using Windows 7......
@TheStuffMade
@TheStuffMade Жыл бұрын
Sure, why not? I've got machines running anything from XP SP3 up to Win 11.
@jasonking1284
@jasonking1284 Жыл бұрын
@@TheStuffMade IMO Windows Aero was the best UI Microsoft ever made, followed by WIndows XP UI. Windows 10 looks like a Lego 5yr old stuff...
@Pseudoplasmagore
@Pseudoplasmagore Жыл бұрын
@@jasonking1284 I detest the transparent, light-coloured and skeuomorphic Windows Aero UI. IMO Windows 10 has by far the best UI out of everything I've seen. I just like it black, flat and with sharp edges.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 10 МЛН
No empty
00:35
Mamasoboliha
Рет қаралды 11 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 27 МЛН
How It Was Made: THE COMMODORE 64 factory tour
22:10
Retro Recipes
Рет қаралды 505 М.
The Commodore 64 Programming Language that Doesn't Exist | MicroText
12:43
Using a Commodore 64 on the modern internet!
21:08
Veronica Explains
Рет қаралды 700 М.
Intro to 6502 Assembly Language Programming
35:30
Aaron Baugher
Рет қаралды 9 М.
The Ultimate Top 100 C64 Games Ever Made!
1:11:42
Retro B8
Рет қаралды 86 М.
Writing Commodore 64 Assembly Language....using only BASIC.
10:08
My Developer Thoughts
Рет қаралды 6 М.
38911 Bytes Free? Commodore 64's BASIC RAM
29:57
8-Bit Show And Tell
Рет қаралды 38 М.
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 450 М.
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 19 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,9 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18