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

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 107

  • @TheStuffMade
    @TheStuffMade  3 роки тому +9

    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: ua-cam.com/users/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, link in description.

  • @taddy666
    @taddy666 Рік тому +2

    Superb - thanks so much!

  • @TheUtuber999
    @TheUtuber999 Рік тому +2

    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  Рік тому +1

      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

  • @XYZB0RG
    @XYZB0RG 9 місяців тому +1

    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  9 місяців тому +1

      It's good fun programming these retro 8bit computers with all their limitations.
      Cheers,
      Jake

  • @Erikslust
    @Erikslust 4 роки тому +8

    Love the Commodore 64, lots of great memories.

  • @juanmanuelvalitutti5834
    @juanmanuelvalitutti5834 3 роки тому +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.

  • @G_Rizzly
    @G_Rizzly 2 роки тому +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.

  • @tertia0011
    @tertia0011 3 роки тому +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.

  • @RavenWolfRetroTech
    @RavenWolfRetroTech 4 роки тому +7

    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 роки тому +2

      Thanks, that is great. Keep us updated on your progress and feel welcome to request anything you'd like included.

    • @RavenWolfRetroTech
      @RavenWolfRetroTech 4 роки тому +2

      @@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 роки тому +2

      ​@@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 роки тому +1

      @@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 роки тому +1

      @@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

  • @grymmjack
    @grymmjack 2 роки тому +2

    Thanks for the tutorial. This is helpful. Appreciate the compassionate output!

  • @DailyCorvid
    @DailyCorvid 3 роки тому +3

    Yay ohh love the old Commodore machines. Just got myself a TheC64 trying to get Simons Basic on there! Greatest Microcomputer ever.

    • @TheStuffMade
      @TheStuffMade  3 роки тому +1

      Yeah, it's a lot of good memories from a time when everything was much simpler.

    • @DailyCorvid
      @DailyCorvid 3 роки тому +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 роки тому +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 роки тому +2

      @@BikeArea Linus watches Pokimane, i watch Pewdiepie, we all have a dirty little UA-cam secret :D
      The real miracle is that TV still exists...

  • @TheStuffMade
    @TheStuffMade  4 роки тому +11

    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

  • @samhoward8909
    @samhoward8909 3 роки тому +2

    Never delved into assembly language. Very informative!

  • @Starredmediasoft
    @Starredmediasoft 3 роки тому +5

    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 роки тому +2

      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

  • @franzbranntwein3541
    @franzbranntwein3541 3 роки тому +5

    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

  •  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.

  • @henrikorpela2818
    @henrikorpela2818 2 роки тому +1

    Thank you, very helpful video! Finally got some assembly up and running on C64!

  • @FeedBackMain
    @FeedBackMain 3 роки тому +2

    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!

  • @paullee2449
    @paullee2449 Рік тому +1

    Excellent stuff! It's got me off to a really good start. Thanks.

    • @TheStuffMade
      @TheStuffMade  Рік тому +1

      Thanks, it's a lot of fun programming the old C64 once you get started.
      Cheers,
      Jake

  • @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.

  • @kaydues
    @kaydues 3 роки тому +2

    first: thank you for this tutorial! second: what type of keyboard did you use here? sound very nice a not to loud.

  • @nicksmithtech
    @nicksmithtech 2 роки тому +1

    This is so awesome! Thanks!

  • @sarahaugust8221
    @sarahaugust8221 3 роки тому

    Thanks for making this video, a very good introduction!

  • @thehardcorezombie9444
    @thehardcorezombie9444 2 роки тому +1

    This is an awesome video best stuff to learn :)

  • @briankumanchik2474
    @briankumanchik2474 3 роки тому +2

    This is awesome!

  • @Testacabeza
    @Testacabeza 3 роки тому +1

    Superb tutorial, thank you very much. You have showed me the way :) Cheers.

  • @BeatMax2023
    @BeatMax2023 3 роки тому +1

    Nice introduction!

  • @beans315
    @beans315 3 роки тому +3

    Its mad how u get tutorials that just work

  • @SaschaRobitzki
    @SaschaRobitzki 3 роки тому +2

    Assembler didn't work for me either with the last stable 3.5 release, the nightly build r39851 worked though.

    • @TheStuffMade
      @TheStuffMade  3 роки тому +1

      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

  • @meneerjansen00
    @meneerjansen00 4 роки тому +1

    Looking forward to the other video's. Keep up the good work. :-)

  • @kamara4700
    @kamara4700 3 роки тому +1

    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 3 роки тому

      Thank you so much!

    • @rici_21
      @rici_21 2 роки тому

      not working :/

  • @victorwidell9751
    @victorwidell9751 3 роки тому +2

    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  3 роки тому

      For assembly just remove the sys statement at the beginning of the code.
      Cheers,
      Jake

    • @kamara4700
      @kamara4700 3 роки тому +2

      I had to add -autoload parameter at 2:30 of his video in front of %prg in Emulator Parameters

  • @sussus4914
    @sussus4914 2 роки тому

    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  2 роки тому

      sure, it will return to the basic prompt after it's done.

  • @newbiegaming6090
    @newbiegaming6090 3 роки тому +1

    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 роки тому +2

      @@TheStuffMade I am using the older cbm. The problem is with Vice. The emulator is running the .bas without waiting for input.

    • @kamara4700
      @kamara4700 3 роки тому +1

      I had to add -autoload parameter at 2:30 of his video in front of %prg in Emulator Parameters

    • @newbiegaming6090
      @newbiegaming6090 3 роки тому

      @@kamara4700 thanks. I'll try that next time...

  • @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

  • @retronexusnet
    @retronexusnet 4 роки тому +1

    love it

  • @rickyderocher3181
    @rickyderocher3181 3 роки тому +2

    Cool video! :-)

  • @MichaelTheSequel
    @MichaelTheSequel 3 роки тому +1

    when i program assembly, it doesnt run

    • @TheStuffMade
      @TheStuffMade  3 роки тому

      Check the description and try the older version of CBM Studio.
      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

  • @TechMalaya
    @TechMalaya 3 роки тому +1

    nicee

  • @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

      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

  • @SebastianSeth
    @SebastianSeth 2 роки тому

    when i generate and run the program, the assembly dump launches, and when i exit it, the emulator doesn't open

    • @TheStuffMade
      @TheStuffMade  2 роки тому

      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 2 роки тому

      @@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 роки тому +1

      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

  • @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 роки тому +1

      @@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!

  • @SebastianSeth
    @SebastianSeth 2 роки тому

    what does the rts command do?

    • @TheStuffMade
      @TheStuffMade  2 роки тому +1

      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 2 роки тому

      @@TheStuffMade so that rts in the main label ends the program after ending the loop?

  • @jasonking1284
    @jasonking1284 2 роки тому

    Wow.. you are still using Windows 7......

    • @TheStuffMade
      @TheStuffMade  2 роки тому +1

      Sure, why not? I've got machines running anything from XP SP3 up to Win 11.

    • @jasonking1284
      @jasonking1284 2 роки тому

      @@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 2 роки тому

      @@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.