Josip Retro Bits
Josip Retro Bits
  • 147
  • 227 798
Assembly Programming Using Commodore 64 Kernal Routines
In this episode, we use the Commodore 64 KERNAL routines and create some interesting effects on the screen with just a few lines of Assembly code. Even if you don't know how to program assembly, don't worry, part of the video is dedicated to explaining the basics of assembly programming.
☕ If You like this video you can buy me a coffee: ko-fi.com/josipretrobits ☕
INDEX:
======
0:00 - Intro
1:08 - Demo Assembly code
1:46 - Assembly language Basics
12:55 - Writing first Assembly code
20:46 - C64 Memory Map and Kernal Routines
27:45 - Example no. 1
30:50 - Example no. 2
34:28 - Example no. 3
38:43 - Example no. 4
39:31 - Example no. 5
44:36 - Example no. 6
49:29 - Example no. 7
53:58 - Example no. 8
55:13 - The End
SOURCES CODES:
==============
github.com/josipk/Commodore64/blob/main/C64_KERNAL/
CHECK OUT:
==========
@8BitRetroReFix
@CaptainCommodore
@Retro4u
@8bitsinthebasement
CHECK OUT MY OTHER COMMODORE/ACORN VIDEOS:
==========================================
🕹️ Commodore 64 Programming: ua-cam.com/play/PLT0ijfj8mLN7G_Et0DGaVxcVK3N2EpnYk.html
🕹️ Commodore 64 Hardware Videos: ua-cam.com/play/PLT0ijfj8mLN6JTkWianAanzEgLCaA0zFE.html
🕹️ Commodore 64 Plus/4 Videos: ua-cam.com/play/PLT0ijfj8mLN7ioE3wBPYsu32V6Vs9goib.html
🕹️ Acorn Electron Videos: ua-cam.com/play/PLT0ijfj8mLN5n1GNlJPZn3CW7o3hRf7Jv.html
🕹️ Commodore 64 Games and Demos: ua-cam.com/play/PLT0ijfj8mLN6yuzbYo6MnQifgUEM08t83.html
🕹️ The Pong Game Projects: ua-cam.com/play/PLT0ijfj8mLN6QqB1wxCWv7ERaw0fo44kB.html
#c64 #kernal #assembly #programming #retrocomputing #demo #visualeffects #assemblylanguage #commodore64 #routines
Переглядів: 5 887

Відео

BASIC 60th Birthday | Commodore 64 | #basic60th
Переглядів 1,1 тис.4 місяці тому
To celebrate BASIC 60th Birthday (1st May) I decided to show what I really enjoy programming in BASIC on Commodore 64. Full BASIC, little bit of algorithms and PETSCII Art, Enjoy :) ☕ If You like this video you can buy me a coffee: ko-fi.com/josipretrobits ☕ WIKI: en.wikipedia.org/wiki/BASIC 10 PRINT "HAPPY BIRTHDAY BASIC" 20 GOTO 10 30 END SOURCES CODE AND PRG: github.com/josipk/Commodore64/tr...
Morse Code Keyer and Commodore 64 | Part Three
Переглядів 3644 місяці тому
This is the third part of the "Viking Morse Code Keyer" video and in this video we will decode Morse code messages back to letters. I will show how I converted the Morse Code Chart into a lookup table that we will use in assembly code. And of course, we will use the MIKRO ASSEMBLER Cartridge :) Enjoy! ☕ If You like this video you can buy me a coffee: ko-fi.com/josipretrobits ☕ PART ONE & TWO: u...
Morse Code Keyer and Commodore 64 | Part Two
Переглядів 3125 місяців тому
This is part two of the "Viking Morse Code Keyer" video and in this video, we will finally write some assembly code :) We will set NMI interrupt with an external trigger source to detect Morse code signals and for that, we will use MIKRO ASSEMBLER Cartridge. ☕ If You like this video you can buy me a coffee: ko-fi.com/josipretrobits ☕ PART ONE: ua-cam.com/video/dEVs1nmssco/v-deo.html DEVICE: Vik...
Morse Code Keyer and Commodore 64 | Part One
Переглядів 4675 місяців тому
This is the first part of the "Viking Morse Code Keyer" video and in this part, we will connect it to a Commodore 64 and try to capture the signals using BASIC language. We will prepare our circuit so that we can use external hardware interrupt and in the next video, we will capture Morse code signals using Assembly code and MIKRO ASSEMBLER Cartridge. ☕ If You like this video you can buy me a c...
Commodore 64 Keyboard Reset Circuit v2.0
Переглядів 2736 місяців тому
This is a follow-up to my video on the Keyboard Reset Circuit for the Commodore 64. This time I made a reset circuit much simpler in design and easier to build! The link for schematics and gerber files is down below. Enjoy :) ☕ If You like this video you can buy me a coffee: ko-fi.com/josipretrobits ☕ Commodore 64 Keyboard Reset Circuit (previous video): ua-cam.com/video/Y6tYIzj0WqE/v-deo.html ...
Keyboard Reset Circuit for Commodore 64 | Mods and Repairs
Переглядів 7096 місяців тому
Keyboard Reset Circuit for Commodore 64 | Mods and Repairs
Oscar64, C compiler for Commodore 64
Переглядів 2,4 тис.7 місяців тому
Oscar64, C compiler for Commodore 64
MERRY CHRISTMAS 2023 | C64
Переглядів 4208 місяців тому
MERRY CHRISTMAS 2023 | C64
10 PRINT VERTICAL & DIAGONAL | C64
Переглядів 5309 місяців тому
10 PRINT VERTICAL & DIAGONAL | C64
One Time Only in One-Liners | Commodore BASIC
Переглядів 56910 місяців тому
One Time Only in One-Liners | Commodore BASIC
One-Liner Pattern Generator | Explained
Переглядів 32910 місяців тому
One-Liner Pattern Generator | Explained
Large number of Patterns in a Single line of Code | Commodore 64
Переглядів 497Рік тому
Large number of Patterns in a Single line of Code | Commodore 64
Using Arithmetic Instead of Logical Operators in Commodore Basic
Переглядів 786Рік тому
Using Arithmetic Instead of Logical Operators in Commodore Basic
DONKEY.BAS for Commodore 64 | Game in BASIC
Переглядів 3,1 тис.Рік тому
DONKEY.BAS for Commodore 64 | Game in BASIC
Measure Temperature with Commodore 64
Переглядів 859Рік тому
Measure Temperature with Commodore 64
Creating Mazes on Commodore 64 | With cool visual effects
Переглядів 1,2 тис.Рік тому
Creating Mazes on Commodore 64 | With cool visual effects
Assembly and Basic code together on Commodore 64 | Mikro Assembler
Переглядів 3,3 тис.Рік тому
Assembly and Basic code together on Commodore 64 | Mikro Assembler
Someone cracked my game and made it better | C programming
Переглядів 1,1 тис.Рік тому
Someone cracked my game and made it better | C programming
I made a Commodore 64 Case | 3D Printed parts | DIY
Переглядів 1,1 тис.Рік тому
I made a Commodore 64 Case | 3D Printed parts | DIY
10 PRINT program with no RND() | Commodore 64
Переглядів 1,6 тис.Рік тому
10 PRINT program with no RND() | Commodore 64
Flooder | Commodore 64 Game
Переглядів 901Рік тому
Flooder | Commodore 64 Game
Making a Pong Game | Without a single line of code
Переглядів 1,3 тис.Рік тому
Making a Pong Game | Without a single line of code
Can ChatGPT fix my code?
Переглядів 1 тис.Рік тому
Can ChatGPT fix my code?
Invaders | My Game for BASIC 10 Liner Contest 2023
Переглядів 2,3 тис.Рік тому
Invaders | My Game for BASIC 10 Liner Contest 2023
Commodore Logo Demo in Basic
Переглядів 1,2 тис.Рік тому
Commodore Logo Demo in Basic
Commodore 64 Basic, Tips for Game Development
Переглядів 1,9 тис.Рік тому
Commodore 64 Basic, Tips for Game Development
A Twisted Christmas II, 1989 | Commodore 64 Greetings Card
Переглядів 298Рік тому
A Twisted Christmas II, 1989 | Commodore 64 Greetings Card
A Twisted Christmas 1988 | Commodore 64 Greetings Card
Переглядів 388Рік тому
A Twisted Christmas 1988 | Commodore 64 Greetings Card
Let it Snow in Basic | Scrolling Down on Commodore 64
Переглядів 2,7 тис.Рік тому
Let it Snow in Basic | Scrolling Down on Commodore 64

КОМЕНТАРІ

  • @Mario-vt2ss
    @Mario-vt2ss 2 дні тому

    Hi, nice job explaining and implementing mandelbrot set in our beloved C64. I have couple of ideas maybe you can try yourself. 1, you could reorder collors to get some nice gradients, I chose 8 colors and changed iteration to 8, but it could be easily changed even to all 16 colors, but for small iteration count it is not necessary. important are to get smooth color transition ---------- 2 dim a(7): for i = 0 to 7;read a(i):next 3 data 0,9,8,10,7,3,14,6 ... 160 for i=7 to 0 step -1 .... 230 poke 55296,a(i) --------- idea is from wikipedia where its used just 16 colors in 2 gradients 2. I saw your other video about 10 print chr 223 and chr 233, and it gave me idea to try that here with mandelbrot and i was very happy with result. I used for left upper and lower right part of screen chr(233) and chr(223) for other two quadrants. Then I combined that with black background (bouth 53280.0 and 53281,0) and chose border at midle of mandelbrot set at x=28 (not 20 :-)), somethin like this: --------- 220 if (py<13 and px<28) or (py>=13 and px>=28) then poke 1024+p, 233 220 if (py>=13 and px<28) or (py<13 and px>=28) then poke 1024+p, 223 --------- Love your videos, keep up the good work. Lijep pozdrav!

  • @michaelstoliker971
    @michaelstoliker971 16 днів тому

    Is there a graphics package for this version of C? I converted an Atari Basic program to Commodore Basic and the lack of graphics commands in Commodore Basic made it very difficult and slow performing. Of course I could have added multi color, but compared to the Atari's graphic commands, reproducing the bitmapped graphics was much more difficult than it needed to be. With this C, can you specify an X,Y location and plot a point with or without color information?

    • @michaelstoliker971
      @michaelstoliker971 16 днів тому

      I should watch the whole video and I'd get my question answered,

  • @WindowsVista_OSC
    @WindowsVista_OSC 19 днів тому

    Is this real?

  • @international806yachting
    @international806yachting 23 дні тому

    I am surprised :-)

  • @GhassanPL
    @GhassanPL Місяць тому

    The content of the video is great, but please try to improve your mic quality, as you're barely audible.

  • @WillemSandfort
    @WillemSandfort Місяць тому

    The right spelling is: Kernel

  • @CyberhugTechnologies
    @CyberhugTechnologies Місяць тому

    That was some gathering guys! Thumbs up!..

  • @borayurt66
    @borayurt66 Місяць тому

    Nice and simple, but unfortunately with the C64, a simple CPU reset will not get you out of some persistent software. Too long to explain here but it is about how the reset vector is set and simply resetting the CPU will only make it jump to where the programmer wants it to jump. So, some clever people came up with something called "EXROM Reset". It involves using a second line (PLA EXROM pin) and pulling both the CPU reset and the EXROM low, but releasing CPU a little before EXROM. There is a good video here, ua-cam.com/video/OV5tNYhqQ7w/v-deo.htmlsi=rTxRNl2_RsN0OVai which explains it much better, also check the follow up video on the same subject.

    • @JosipRetroBits
      @JosipRetroBits Місяць тому

      Well, I know that my solution is not perfect, I just wanted to be able to reset c64 using the keyboard (combination of keys) and I managed to do just that. In addition, I was using the stock C64 and never tested my solution with other Kernal ROMs or other sys cartridges. Thank You for the video suggestion and thank You for watching :) Cheers!

  • @StargateMax
    @StargateMax Місяць тому

    I still love the C64 and I used to program it over 30 years ago, but since I despise math I didn't get to advanced stuff. Seeing this code here and all that math makes my stomach turn. But the end result is amazing!

  • @CityXen
    @CityXen Місяць тому

    Never messed around with Morse Code stuff on the C64, seems cool. Is there anything the C64 can't do?

  • @OlivierSimpleLife
    @OlivierSimpleLife Місяць тому

    Really nice, and like many others i would have liked to have such a cartridge back in the days. I love your trick at the very end :) thinking that it might have been possible to parse the basic line holding the "*=" directory and dynamically generate the buffer data in the very last line so that one can assemble and run at any memory location. Awesome stuff !

  • @saganandroid4175
    @saganandroid4175 Місяць тому

    Does this basic assembler lack comment or rem features? If would be useful in these videos. Really useful. You know that tone left on at about 55:05? RunStop Restore fixes sound/noise too.

  • @saganandroid4175
    @saganandroid4175 Місяць тому

    Always, ALWAYS show what the program does first, THEN the source.

  • @wadz668
    @wadz668 Місяць тому

    Programming definitely is a LOT of fun. I find it more fun than playing games

  • @jeffzebert4982
    @jeffzebert4982 2 місяці тому

    If you made this Donkey game in 6502 Assembly (a.k.a. Machine Language), then you could get the game's action to REALLY speed up -- to the point where it becomes impossible to avoid hitting the donkeys! This would be a good demonstration of the capabilities of 6502 Assembly. Of course, Donkey in 6502 Assembly would require many more lines of code than the BASIC version; as 6502 Assembly is a very low-level language.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Yes, it would require much more coding but it would be fun to try :) ..and it could be crazy fast :) he he Thank You very much for watching :) Cheers!

  • @jimmydandy9364
    @jimmydandy9364 2 місяці тому

    When I did programming on my C--64, I used BASIC a lot, much faster to write software, but I also used assembler a lot too, because BASIC would be way too slow for certain things, so I mixed both, I did BASIC and assembly for some routines and embedded those routines in my BASIC program through the SYS command. I did some pretty impressive and fast BASIC stuff this way - It was very useful for BASIC programs with background stuff, through the use of interrupt routines in assembler.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Oh Yes, that was the thing back then and still is, if You want to speed up some parts of the BASIC code, just inject that part in the memory (machine code) and call it with SYS. And Yes, BASIC couldn't handle interrupts so for that You would need to use assembly/machine code for sure :) Cool! Thank You for watching :)

  • @nagyandras8857
    @nagyandras8857 2 місяці тому

    why not jump to 20 ?

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Well, those numbers are part of a BASIC code. I used Mikro Assembler cartridge so that I could write on C64 and compile and run the assembly code on C64. But, You don't need those numbers if you use some other assembly compiler. You can compile the code on a modern PC and then just run it on C64. For assembly language the labels are important. ...and those labels are converted to memory addresses during the compile process.

    • @nagyandras8857
      @nagyandras8857 2 місяці тому

      ​@@JosipRetroBits I mean you had 10 loop lda $d020 20 adc #01 30 sta $d020 40 jmp loop Why not 20 loop adc #01 ?

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      @@nagyandras8857 Yes this is where I want to explain how lda and sta instructions work. This is not a good code :) A more efficient way would be to have a loop label on line 20, yes! But also, we have direct instruction if we want to increment by one, just direct "inc $d020". If we want a different increment value then we can use Your suggestion, Yes. Sorry, I didn't get what are you asking the first time :)

  • @Commodoreretro-programming
    @Commodoreretro-programming 2 місяці тому

    Very interesting video. The Kernal contains indeed fun to use ready-to-go routines !

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Yes it does and what I show in the video is just a very small amount of those routines :) Thank You for watching :) Cheers!

  • @TheUtuber999
    @TheUtuber999 2 місяці тому

    19:50 I would probably use JSR $FFE4, then BEQ LOOP. That way you can exit by pressing any key. 31:03 This effect only works on PAL C64s. On NTSC machines, it just displays somewhat random garbage.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You for your information, uuu, ok I need to check what is the problem with 31:03 on NTSC, to be honest, I didn't check if ti works on all systems. Cheers!

  • @saganandroid4175
    @saganandroid4175 2 місяці тому

    I imagine discovering RunStop/Restore is going to change your life. I can't imagine not having that available! It was essential in my experience. ProTip: sharp quick taps on the Restore key. It's weird that speed of tap can make a difference sometimes but it really does. Gotta be in how downside transition of the signal generates the NMI.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      I think that will change my life tremendously :) Thank You for watching :) Cheers!

  • @WilcoGroothand
    @WilcoGroothand 2 місяці тому

    nice examples on how assembly works. Thx

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Glad you liked it and thank You for watching :) Cheers!

  • @Jemacaza
    @Jemacaza 2 місяці тому

    Very nice video.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You very much and thank You for watching :) Cheers!

    • @Jemacaza
      @Jemacaza 2 місяці тому

      @@JosipRetroBits if I just knew this back in the eighties.. those kernel routines are very useful. Back then it was really hard to get this kind of info and explanations. I only changed colors and did some sprites as an teenager in assembly. Could you even imagine what an impact it had if everybody had an assembler and this kind of kernel-routine info back then ..

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      @@Jemacaza Yes for sure. For comparison, the first time I used C64 was retyping some game from the magazine. I didn't understand anything :) Now it's so much easier to get information and to learn new stuff. And of course, You can develop and test your code on the modern PC before you run it on the real C64 and this much faster and easier way to do this. :)

  • @CDP1861
    @CDP1861 2 місяці тому

    My first computer had a hex keypad and allowed to enter machine code directly. No assembler needed. A rough start, but after that you are afraid of nothing anymore 🙂

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Ha ha, that is awesome :) Oh, those are the first kit comp.? with just a numeric keyboard? Programming in machine code directly, You have my respect, Sir. :)

    • @CDP1861
      @CDP1861 2 місяці тому

      @@JosipRetroBits Yes, it's a kit from the time when you could not buy a computer in stores yet. A Netronics Elf II. I still used ut until I bought a Atari ST and still have it. You should take a look at the processor (a CDP1802) if you are really interested in 8 bit computers. Not exactly mainstream, more like RISC before that was officially invented.

  • @CityXen
    @CityXen 2 місяці тому

    Love some PETSCI art

  • @AngryCVO
    @AngryCVO 2 місяці тому

    As an ICT-professional, also very interested in retro-computing, I see many videos about different computer & network stuff on youtube and other media. I must say that this one is amazing. You explain this in a professional way. Lots of video's have lots of hesitating as if the teacher sees what appears on his screen for the first time. Not in your case. You master the knowledge perfectly. This video gave me lots of ideas and teached me stuff I was looking for. Thank you very much.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You very much :) Just to be clear, there are people in the retro community who have more knowledge and teaching capabilities than I do. I wish You the very best in Your retro journey and welcome aboard :) Cheers!

  • @byteforever7829
    @byteforever7829 2 місяці тому

    Excellent video! I like the Mikro assembler as well, i'm definitely going to try that soon

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You very much :) Yes I like MA too, I know it's way easier to develop on a modern machine these days but this feels so natural to me :) Cheers!

  • @SpeccyMan
    @SpeccyMan 2 місяці тому

    KERNEL, no A!

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Sorry. It's KERNAL :) Thank You for watching :)

    • @JayH_Norway
      @JayH_Norway 2 місяці тому

      I suggest that you check your facts before offering such bombastic corrections. On the C64 it is and always has been spelled KERNAL. en.wikipedia.org/wiki/KERNAL

  • @wolfman946
    @wolfman946 2 місяці тому

    Interesante información sobre Commodore 64

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You very much :) I really enjoy exploring C64 routines and I hope this video is interesting to watch :) Cheers!

  • @ehudgavron1
    @ehudgavron1 2 місяці тому

    What's a kernal? Do tell.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      KERNAL is Operating System on Commodore 64. Cheers!

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      @@Joel-qz6sd Yes, a bit more than that. but in general Yes. Kernal is simply an operating system on Commodore 64. It also takes care of all other operations on the system, like cursor, serial communication, time, etc.

    • @ehudgavron1
      @ehudgavron1 2 місяці тому

      @@Joel-qz6sd No, really, there's no such thing as a kernal. Perhaps you're trying to explain "kernel."

  • @Ferrie123
    @Ferrie123 2 місяці тому

    Very well explained 👍 enjoyable stuff ❤

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Glad you enjoyed it and thank You for watching:) Cheers!

  • @PeranMe
    @PeranMe 2 місяці тому

    This is like ”stupid pet tricks”, except a generation or two later :-) Lots of fun stuff, thanks for this, I enjoyed it a lot!

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Ha Ha, something like that :) Thank You very much :) Cheers!

  • @HelloKittyFanMan
    @HelloKittyFanMan 2 місяці тому

    You have to turn off the computer just to get out of that 4096 loop? Why won't the stop/restore key combo work, even though I've seen it stop plenty of ML programs before, without your having to look for a press of "stop" or "stop/restore"?

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Run/Stop key will not stop ML execution only execution of BASIC code. That is why I needed to implement STOP key detection to exit the program in my examples. Thank You for watching :) Cheers!

  • @HelloKittyFanMan
    @HelloKittyFanMan 2 місяці тому

    Haha, wow, interesting way to write an ML assembly: using a BASIC listing as your playground (but then still having to have the underlying programmer assemble it).

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Yes, back then this was a very nice way to program/develop in assembly and compile/run on the same machine. Now it's way better to develop on a modern pc and then just test on C64, but I like this first method, don't know why, feels natural :) Thank You for watching :) Cheers!

  • @HelloKittyFanMan
    @HelloKittyFanMan 2 місяці тому

    JCR? What's that, especially when you typed "JSR" while saying it?

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      I did pronounce that incorrectly, sorry about that. JSR is "Jump to Subroutine", or "Jump to Routine". Cheers!

  • @johnwatson4801
    @johnwatson4801 2 місяці тому

    Background music ruins this video. Sorry but i couldn't watch it. Thanks for making the content though.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Sorry about that. I had some issues with the audio in a couple of videos from that period. Cheers!

  • @saganandroid4175
    @saganandroid4175 2 місяці тому

    21:12 there is a bad edit about PAL jiffy timing. Can't tell if you are saying is same 60Hz for PAL or 50Hz. I would read the text description onscreen but your PIP narration window blocks it.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      It is the same on PAL and NTSC machines, 1/60th of a second. (60 times per second) Sorry, maybe I didn't explain that very well in the video :) Thank You for watching, Cheers!

  • @TinySmall69
    @TinySmall69 2 місяці тому

    Back in the day we were relying on books, and I think there wasn't a book that had all these routines printed correct, either missed a whole page or printed a different page instead, also I had so many bookmarks in those books to find all the routines again 🤷‍♂ I still have the Commodore related books in between the newer computer language books 😅

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Yes, it is much easier today, and most of it has been well documented and disassembled so that we now "know" a lot more. I don't have many Commodore books but I never saw any routines explained anywhere in those books. Memory addresses Yes, but not routines. Thank You very much for watching :) Cheers!

  • @saganandroid4175
    @saganandroid4175 2 місяці тому

    16:00 You don't need to power off! Just hit RunStop/RESTORE and that should work.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Hi, not with machine code (assembly code). That only works with BASIC code. But I've implemented that option later in the video. Thank You for watching :)

    • @saganandroid4175
      @saganandroid4175 2 місяці тому

      @@JosipRetroBits that's weird because l remember RunStop/Restore working for ML unless it was specifically disabled. Hold down RunStop while you sharply tap RESTORE several times. I know the C64 needs a rapid transition on the restore key- usually several. Why, l don't know. But slow wrists were less successful. I suppose this could be a Mandela memory Effect since l haven't tried this is decades. But l could swear this triggered an interrupt that sends you back to the ready prompt. Try it and let me know.

    • @HelloKittyFanMan
      @HelloKittyFanMan 2 місяці тому

      @@saganandroid4175: Yeah, that's what I remember as well. I wonder why he never bothered to try it. I have just set my 128/64 back up and I have just re-encountered ones that have _disabled_ the restore key for exiting; and in fact, they restart the programs instead; and you can even soft-reset from 64 back into 128, run something there, and then soft-reset or go64 back into 64 and that program immediately restarts! BUT... if I remember right, it had to be specifically programmed to do that; otherwise what you were saying would indeed happen. I'll have to go through my disks and make a count list of some sort to see if we're right: which is the exception or the rule. And yeah, on an original 64 you do have to hit "restore" fairly hard. I don't know about the C, but on the 128 in either mode you don't. Why don't you set your 64 back up now too?

    • @saganandroid4175
      @saganandroid4175 2 місяці тому

      @@JosipRetroBits try it. Run your ML code. Hold down RunStop and nothing happens. Now while holding that key down, sharply smack the Restore key several times. That should generate a NMI. But on most C64s you need a quick sharp wrist action on the Restore key because only the trailing edge of that line is useful. Try it and report back.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      @@saganandroid4175 Aaaa ok, got it! Thanks :)

  • @pamelax64
    @pamelax64 2 місяці тому

    sys53248 to do a reset,discovered some decade ago.

  • @RudysRetroIntel
    @RudysRetroIntel 2 місяці тому

    Excellent video and work! Thanks for sharing all your knowledge

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You Rudy :) I enjoy this stuff and I do hope I managed to share my enthusiasm with all of You :)

    • @ajarivas72
      @ajarivas72 2 місяці тому

      ​@@JosipRetroBits Great video. I had a Commodore 16 in 1985. My classmate had a Commodore 64. Any idea where I can find the user's manual. There were very good Basic codes in that book.

  • @hai.1820
    @hai.1820 2 місяці тому

    I hope we had youtube back then ^^

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Yes, it is so much easier to find and share information these days :) Thank You for watching ;) Cheers!

    • @HelloKittyFanMan
      @HelloKittyFanMan 2 місяці тому

      We didn't, so I've dashed your hope. Sorry.

  • @JayH_Norway
    @JayH_Norway 2 місяці тому

    Really interesting stuff! One thing though: At 45:02 ... What is the reason for EOR $d012 and not simply LDA $d012 ? Am i missing something vital here?

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You :) EOR to get more random values in A. Whatever is in A we EOR with D012 and that will give more random numbers than just loading D012 :)

    • @JayH_Norway
      @JayH_Norway 2 місяці тому

      @@JosipRetroBits But the accumulator will always have the same value (255 / $ff) on each iteration due to your JSR to $FFE1, so I cannot see how that would increase randomness. Try adding STA $d020 in line 22 and you will see what I mean.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Ok will try. I never checked value in A when returning from $FFE1, but yes You are probably right :) Thank You!

  • @CaptainCommodore
    @CaptainCommodore 2 місяці тому

    Nice explanation as always, assembly for everyone.......

  • @macdaddyns
    @macdaddyns 2 місяці тому

    Really like your style of teaching, thanks for sharing your knowledge and time!

  • @8BitRetroReFix
    @8BitRetroReFix 2 місяці тому

    Interesting stuff .. nicely explained, mate

  • @m0nde
    @m0nde 2 місяці тому

    very well explained

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Thank You and thanks for watching :)

  • @CityXen
    @CityXen 2 місяці тому

    C64 4EVA!

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      4EVA & EVA :) Thank You for watching :) Cheers!

  • @Cj-2-channel-123
    @Cj-2-channel-123 2 місяці тому

    It broken

  • @adroharv5140
    @adroharv5140 2 місяці тому

    definitely not awful

  • @saganandroid4175
    @saganandroid4175 2 місяці тому

    17:54 no matter what i do, l cannot see what you are typing at screen bottom. Using Google's UA-cam app to view. Went fullscreen. Tried changing orientation. No use.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      Sorry about that. I will send you here full code today.

    • @JosipRetroBits
      @JosipRetroBits 2 місяці тому

      I was explaining how "on goto" was used as "if then else" In case (g<28) is true; the result will be -1, so then we have "on - (-1) goto 2" which gives "on 1 goto 2". So it will jump to line 2. Once we reach 28, (g<28) is false = 0, then we have "on -0 goto 2"; we will not jump on line 2, but the rest of that line will be executed. ?"time our":end (game over) in short, it's a kind of replacement for if then else: on (condition) {then}: {else}