Commodore BASIC from PET to BASIC65 & MEGA65 Conversion from BASIC 7.

  Рет қаралды 5,571

retroCombs

retroCombs

Күн бұрын

Check This Fun MEGA65 Video: "📺️ The Silent Enigma: New MEGA65 Demo by Gürçe (1970s-Style Interview)": • 📺️ The Silent Enigma: ...
-~-
I convert a Submarine Tracking System BASIC program from the C128 Programmer's Reference Guide to run on my @MEGA65retro Dev Kit and the Xemu xmega65 emulator.
As I convert this BASIC program from the C128 (BASIC version 7) to the MEGA65 (BASIC version 10), I found many changes. Before I show my conversion, I discuss the many versions of Commodore BASIC via my Commodore BASIC version timeline. Finally, I make one more conversion. I convert the low resolution (320 x200) MEGA65 version to high resolution (640 x 400) and kick up the speed to 40 Mhz.
Watch the original live stream that inspired this video:
www.buymeacoffee.com/retroCom...
📝Companion blog post with more information and all the links you need at:
www.retrocombs.com/sub-track-sys
👍 Please take the time to like, subscribe, and support the channel using the links ↑. Find something useful that provided information or saved you time? Send a {❤THANKS}! You can now become a member, or support me, at ☕ BMAC (www.buymeacoffee.com/retroCombs).
Find me online at:
📝 Blog: www.retrocombs.com/
🐦 Twitter: / stevencombs
📹 KZfaq: / stevencombs
📘 Facebook: retrocombsfb
Producers:
- Mislav Krleža
- Jamie's Hack Shack
- Boba Fett
- The Lovely Accountant
Sign up for a C128 (Producer) or MEGA65 (Executive Producer) membership to have your name listed in future videos.
------------------------------
Music: The Big Beat 80s - Kevin MacLeod, Syrinx Starr • The Big Beat 80s - Kev...
------------------------------
Time Codes:
00:00 Intro
00:00 Video Introduction
00:19 Video Bumper
00:30 Past Attempts to Convert
01:20 The MEGA65 Book
01:34 Summary of Conversion Process
01:44 What's in this Video
02:02 Support the Channel and Blog
02:21 Channel Producers
02:31 Companion Blog Post Information
02:43 My Commodore 128
03:04 Using VICE C128
03:23 Submarine Tracking System Code
03:40 Running the Submarine Tracking System for C128
04:32 CBM BASIC Timeline
05:27 Commodore BASIC Trivia
05:55 Commodore BASIC Version Numbers
08:10 My Commodore Plus/4 User's Guide Series
09:14 Unreleased BASIC Versions
09:39 Back to Version 10
10:29 V10 Submarine Tracking Program Code
10:54 V10 Submarine Tracking Program Demonstration
11:37 Viewing Both Versions
12:05 Line-by-Line Comparison
12:41 Configure the Graphics Screen
13:07 The SPEED Command
13:41 The BOX Command
14:15 The CHAR Command
14:37 More CHAR Command Options
16:13 Changing Colors with COLOR and PEN
16:32 Variables
16:50 Draw the Submarine Tracking System
17:03 Loops (DO and LOOP Commands)
17:21 The CIRCLE Command
18:00 Drawing circles differently
18:45 Adding Values to Variables
19:03 Drawing Concentric Circles Using a Loop
19:50 An Infinite Loop - Tracking Submarines
20:37 Nested Loops
21:12 Deviation from Common Code Lines
21:39 Drawing the Tracking Marker (or Sub)
22:33 Audio Ping Using the SOUND Command
22:45 Restoring the Sonar Circles
23:11 Exiting a Loop with LOOP Command Conditions
23:26 No End to the Infinite LOOP Command
23:43 Exit and Infinite Loop with the Run/Stop Key
23:50 Comparing the Size of the Two Programs
24:33 A High Resolution Version
25:36 Ideas to Make the Program Better
26:09 Ideas to Make the Submarine Tracking Program Better
27:52 What Else Can we do to Make This Code Better?
28:16 retroCombs Parting Thoughts
29:06 Share Your Optimizations
30:28 That's All Folks!
30:49 Watch More retroCombs
The MEGA65 is THE 21ST CENTURY REALIZATION OF THE C65 HERITAGE: A COMPLETE 8-BIT COMPUTER RUNNING AROUND 40X FASTER THAN A C64 WHILE BEING HIGHLY COMPATIBLE. C65 DESIGN, MECHANICAL KEYBOARD, HD OUTPUT, SD CARD SUPPORT, ETHERNET, EXTENDED MEMORY AND OTHER FEATURES INCREASE THE FUN WITHOUT SPOILING THE 8-BIT FEEL. HARDWARE DESIGNS AND SOFTWARE ARE OPEN-SOURCE (LGPL).
The Commodore 128, also known as the C128, C-128, C= 128,[n 1] is the last 8-bit home computer that was commercially released by Commodore Business Machines (CBM). Introduced in January 1985 at the CES in Las Vegas, it appeared three years after its predecessor, the bestselling Commodore 64.
The C128 is a significantly expanded successor to the C64, with nearly full compatibility. The newer machine has 128 KB of RAM in two 64 KB banks, and an 80-column color video output. It has a redesigned case and keyboard. Also included is a Zilog Z80 CPU which allows the C128 to run CP/M, as an alternative to the usual Commodore BASIC environment. The presence of the Z80 and the huge CP/M software library it brings, coupled with the C64's software library, gave the C128 one of the broadest ranges of available software among its competitors. - en.wikipedia.org/wiki/Commodo...
#mega65 #basicprogramming #c128

Пікірлер: 62
@dvdvnr
@dvdvnr Жыл бұрын
What happened to BASIC 3? Looking at the original source to CBM Basic from 1979 shows that version 3 was the short-lived (approx 2 months May/June 1979) enhancement to add the faster garbage collect but BEFORE the extra disk commands that were in the official version 4. Here is what the source file says: ;VERSION 1 - AUGUST 1977 ; ORIGINAL MICROSOFT RELEASE ;VERSION 2 - AUGUST 1978 ; FIXED MANY BUGS SOME ARE: ; 1) ARRAYS LIMITED TO 255 ; 2) NON-INTERRUPTABLE CODE ; 3) GARBAGE COLLECT STRINGS ;VERSION 3 - MAY 1979 ; FASTER GARBAGE COLLECT ;VERSION 4 - JULY 1979 ; 1) EXPAND RESERVED WORDS ; 2) ADD DISK COMMANDS ; 3) ADD DISK STATUS VARS. The original source is now available on places such as Github. It all makes for interesting reading!
@retroCombs
@retroCombs Жыл бұрын
I was not aware of this version. Thanks for the tip and the reading! I pinned the comment.
@dvdvnr
@dvdvnr Жыл бұрын
@@retroCombs Cheers - glad it was useful!
@retroCombs
@retroCombs Жыл бұрын
@@dvdvnr 👍
@Jimblefy
@Jimblefy 2 жыл бұрын
that is the coolest T-shirt I have ever seen.
@retroCombs
@retroCombs 2 жыл бұрын
Me too. My wife bought this for me as a gift. I'm actually not sure where she found it.
@TheRealShedLife
@TheRealShedLife Жыл бұрын
Submarine sound, use all three voices, starting with all triangle but you can use the filter on each for later experiments to filter down a sawtooth, say; then you want to work with ADSR, the first sound a fairly quick attack, like a 1, the second sound (say, an octave lower), use an attack of 2 and modify your sustain and release appropriately, but now we need a long decay to emulate reverb so we'll use the third voice for that, bringing it in slowly with an attack of 3 and a gentler slope for DSR, we'll have long low sustain so that it outlasts the previous two. We'll basically tier these, to get that extended reverb effect.
@retroCombs
@retroCombs Жыл бұрын
Now I just need to find some time to give this a shot. Great tips!
@elnebuloso9391
@elnebuloso9391 2 жыл бұрын
I'm really looking forward for programming the Mega65 Basic 10. Although preordered last year the system still hasn't been shipped. Hope that the Mega65 isn't an expensive hoax.
@retroCombs
@retroCombs 2 жыл бұрын
Hang in there. It's coming and you are going to enjoy it when it arrives.
@8BitBoyzRetro
@8BitBoyzRetro 2 жыл бұрын
Well done presentation, I really enjoyed it! For a while I have been thinking of getting back to some basic coding (which I have not done in years) when my MEGA65 arrives, now you really have me excited to get back to it! Also looking forward to more vids like this.
@retroCombs
@retroCombs 2 жыл бұрын
Thanks so much and glad you enjoyed it. I think those of us who programmed in BASIC previously probably will get more from this video. You have to really like BASIC to watch the entire line-by-line analysis! 😂
@8BitBoyzRetro
@8BitBoyzRetro 2 жыл бұрын
@@retroCombs "You have to really like BASIC to watch the entire line-by-line analysis! " Guess I do... My wife came in my office to ask a question, saw me intensly watching the side by side code comparison in your video, then said she would ask later and walked off. hehe It is serious stuff!
@retroCombs
@retroCombs 2 жыл бұрын
I suspect our wives are very similar. 😃
@AS-ly3jp
@AS-ly3jp 2 жыл бұрын
Thanks, it was a delight to watch! Keep up commodiring!!! 👍🖖🏻
@retroCombs
@retroCombs 2 жыл бұрын
You are welcome. I will keep "Commodoring!" Made me think of the commercial, "Are you keeping up with Commodore, cause the Commodore is keeping up with you!" 😃
@igork3522
@igork3522 2 жыл бұрын
Great video! Thank you very much. I love Mega65 content.
@retroCombs
@retroCombs 2 жыл бұрын
Stay tuned. More MEGA65 content to come. Glad you like it.
@EdgardoAlessio
@EdgardoAlessio Жыл бұрын
There are so few videos about BASIC 10 and the Mega 65 that I use to check your channel just to see if there's something new about this topic.
@retroCombs
@retroCombs Жыл бұрын
Thanks for keeping an eye on the channel. I want to dig into some BASIC 65 content. It's a blast. Here's hoping I can find time in 2023. Hang in there and be sure to download the MEGA65 Programming Guide.
@CubicleNate
@CubicleNate 2 жыл бұрын
I did find this very interesting. I am currently studying python but I want to create a BASIC or at least C64 port of the application I'm writing, you know, just for fun.
@retroCombs
@retroCombs 2 жыл бұрын
BASIC was my first language and helped inform my understanding of modern languages such as Ruby and Python. I still think it is a wonderful language that I wish had seen development for modern systems. And if you get that C64 port done. Ping me! I'd love to take a look.
@Jimblefy
@Jimblefy 2 жыл бұрын
Great video. Thanks :)
@retroCombs
@retroCombs 2 жыл бұрын
You are welcome and thanks for letting me know you liked it.
@sandcat-maurice
@sandcat-maurice 2 жыл бұрын
Thanks!
@retroCombs
@retroCombs 2 жыл бұрын
That was so nice of you, Maurice! As always, appreciate your support.
@mkrleza
@mkrleza 2 жыл бұрын
Hvala!
@retroCombs
@retroCombs 2 жыл бұрын
Thanks, Mislav and also for your continued support as one of my active producers!
@sandcat-maurice
@sandcat-maurice 2 жыл бұрын
Ah, this is a very informative comparison video, thanks a lot!! It’s probably the best way to explore the similarities and differences of the MEGA65 compared to earlier CBM machines. Waiting for my MEGA65 to do some similar experiments 😋
@retroCombs
@retroCombs 2 жыл бұрын
I found the process informative as well. As I stated, I did not expect many differences between version 7 and 10 and after the shock wore off, and I used V10, I found it so much better. Commands make more sense and, as we saw, programs were shorter. I can't wait to try another conversion.
@LoveDoctorNL
@LoveDoctorNL 2 жыл бұрын
I love 3.5 ! So much better that Basic poke v2
@retroCombs
@retroCombs 2 жыл бұрын
And the first of a second generation of BASIC for Commodore.
@grantbyers7625
@grantbyers7625 2 жыл бұрын
Thanks for highlighting the differences. Very excited to start re experiencing the learning curve when we get out machines! Wrt circle, could you have not used the ellipse command to more closely simulate the circle command of basic 7?
@retroCombs
@retroCombs 2 жыл бұрын
I got excited when you mentioned using the ELLIPSE command to simulate the end to end drawing of circles. I jumped on Xemu to try it. Nope! It draws each half of the ellipse instead of the four quadrants. Thanks for the comment and idea! Keep 'em coming.
@mkrleza
@mkrleza 2 жыл бұрын
Very interseting, very educational. One thing I would disagree with... It was fun watching you on a live stream, and chatting among ourselves, while you sweated in the coal-mine... Just MO.
@retroCombs
@retroCombs 2 жыл бұрын
That's a disagreement I can live with! I was sweating and just glad I finally came through with a solution.
@Miasmark
@Miasmark 2 жыл бұрын
ok, your v7 code is more of a programming example that appears to be intentionally breaking out all the functions of the circle command, whereas your v10 code looks considerably more optimized so the character comparison is not strictly apples to apples. If I am reading the programmers reference guide for the c128 correctly the YR variable could be eliminated entirely from the code without a functional difference. just ensure to keep the commas in the circle command as the default value of Yr is Xr for the command itself. in fact it seems like the circle commands are using much of the default values to allow for a program to be tweaked by a beginner. Functionally the same code for 80 could be written like this: 80 CIRCLE 1, 160, 100, XR,,,,, and so each instance of circle can be modified like this and any references to YR could be left out of the v7 version. Not sure if all the commas are necessary but page 33 states: "You may omit a parameter, but you must still place a comma in the appropriate position. Omitted parameters take on the default values."
@retroCombs
@retroCombs 2 жыл бұрын
Great summary and you are correct. I did a later follow up (kzfaq.info/get/bejne/qrWcmcelq7-ocoE.html) but even in that video didn't touch on all your points. Excellent additions and admittedly, I only looked at the program and did not dig into the programmer's guide itself.
@danield.7359
@danield.7359 2 жыл бұрын
Speed 1 sets CPU clock to 1MHz. That's why the execution is so slow on the M65 when compared to the C128.
@retroCombs
@retroCombs 2 жыл бұрын
Although the new Circle algorithms can draw circles faster at 1 MHz than the C128 can at 2Mhz. We've learned a lot since the early days and this is one of the exciting reasons to support the MEGA65. It's an amazing 8 bit computer.
@danield.7359
@danield.7359 2 жыл бұрын
@@retroCombs yes, thanks for completing my incomplete remark. Clearly the mega65 was drawing the circles faster than the c128. And yet it was still surprisingly slow for a 40MHz machine. That's why I looked at the code to check if there's something that slowing down the program, for example a loop, delay, pause or similar. But heck no! You can actually set the Mega65 CPU speed in basic to either 1, 3.5 or 40MHz! How cool is that?!
@retroCombs
@retroCombs 2 жыл бұрын
Very cool! Thanks for the conversation.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR Жыл бұрын
It should be possible to compile it to speed things up.
@retroCombs
@retroCombs Жыл бұрын
Running the MEGA65 at 40 MHz feels like it already had been compiled.
@speakerr45t
@speakerr45t 2 жыл бұрын
It’s the Mega 65 on sell, where or with who can I buy it. Thanks for your answer.
@retroCombs
@retroCombs 2 жыл бұрын
Here ya go: mega65.org
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
Convert Oregon Trail. 😉
@retroCombs
@retroCombs 2 жыл бұрын
It did have a bit of the OT feel as the blip moves.
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
Is there no way to draw an arc for something like a pizza slice? Polygon seems like it wants all sides to be the same. What about a Bezier curve? I blitzed through the manual for B10 and didn't see those. Odd.
@retroCombs
@retroCombs 2 жыл бұрын
That's a great question. I checked the manual and couldn't find anything. I'm going to post this question in the Discord.
@retroCombs
@retroCombs 2 жыл бұрын
Answer from the Discord in the #basic channel was no command for arc. Expanding the BASIC set is currently on hold.
@retroCombs
@retroCombs 2 жыл бұрын
There is now! Bit Shifter just added this feature after being inspired by my video: discord.com/channels/719326990221574164/805252939593416705/952594030154375168
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
You might be able to get the ping you want by choosing xylophone and then adjust the ADSR values.
@retroCombs
@retroCombs 2 жыл бұрын
Jeffrey. What do you mean "choosing xylophone?" I'm intrigued.
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
@@retroCombs I saw something mentioned on one of the commands that mentioned a handful of instruments (maybe some presets...? See page B93 in the guide you spoke of once before. I think the discussion on the page was what kind of sounds would be created by adjusting the envelope/ADSR of the sound (presumably each frequency would apply in the envelope also). Drifting through the commands, I couldn't seem to wrap my brain around DPAT. Maybe the ELLIPSE command has some options I missed, but I just couldn't find an arc or bezier.
@retroCombs
@retroCombs 2 жыл бұрын
I'll take a look. Thanks! Admittedly, I didn't spend much time on the SOUND command since it was an easy conversion.
@fliplefrog8843
@fliplefrog8843 Жыл бұрын
1: It took 12mins to come to the point. (we all know the history) 2: The first Do-loop could be deleted.
@retroCombs
@retroCombs Жыл бұрын
Hope you used those chapter markers to move past the parts you weren't interested in watching. Don't disagree. I believe I've since gotten better at getting to the point (I hope), although, I have had folks tell me they like the history portion. As I say, to each his own. Thanks for the feedback.
@fliplefrog8843
@fliplefrog8843 11 ай бұрын
@@retroCombs it might have been a bit harsh. Sorry. Thats not what i meant. I tried to critic to the top of this. If ppl watch this kind of vids, they allready know about the history (if not, google it :) I appreciated the chapters! Thank you! Everybody should use them. What i hate the most ( all vids, not only you!!). The preview on KZfaq is ment to get you into it. But the most ppl just blablabla the 30s, without teasing their content! I loose my mind on this, and skip it. :) So i didnt watch the content! Consider that pls :) Thank u for beeing polite!
@retroCombs
@retroCombs 11 ай бұрын
Yep…funny, I'm the same way when I watch videos, but when I first began making them, I did what I absolutely didn't like. Trying my hardest to make videos more concise and hopefully fun. Note taken and great advice. Happy to be polite. We (my viewers and I) pride ourselves on trying to be the friendliest retro computing community. Viewers are a blast during livestreams (which do not follow the concise rule) and very welcoming. Again, much appreciate your feedback.
@0LoneTech
@0LoneTech Ай бұрын
Summary of Commodore version numbers: Almost as bad as Microsoft.
@retroCombs
@retroCombs Ай бұрын
Almost, for sure! I was surprised as I researched just how many there were.
99.8% Compatible? The C64 Mode of the Commodore 128
1:02:11
8-Bit Show And Tell
Рет қаралды 29 М.
MEGA65 Keyboard, Editor & Freezer: The Basics (User's Guide Ch. 3)
31:04
1,000 Diamonds! (Funny Minecraft Animation) #shorts #cartoon
00:31
toonz CRAFT
Рет қаралды 39 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 6 МЛН
Schoolboy - Часть 2
00:12
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 2,5 МЛН
Ten Great Commodore 128 BASIC Improvements Over The C64
45:43
8-Bit Show And Tell
Рет қаралды 40 М.
1981 CAD Monster - HP Series 200 9836C
38:49
Tech Tangents
Рет қаралды 295 М.
The Real Reason Robots Shouldn’t Look Like Humans
1:27:20
Veritasium
Рет қаралды 1,3 МЛН
C128 BASIC Hack: Playing Digital Samples
17:38
8-Bit Show And Tell
Рет қаралды 26 М.
AMAZING New OS for the 40-year-old Commodore 64! C64 OS Review
39:47
Retro Recipes
Рет қаралды 282 М.
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 737 М.
27c3: Reverse Engineering the MOS 6502 CPU (en)
51:57
Christiaan008
Рет қаралды 434 М.
🕹️👾 I Play Six New MEGA65 Games with 1980s Joysticks!
1:20:58
MEGA65 Intro: The Retro Journey Begins (User's Guide Ch. 1)
6:34
Episode 8: C128 Black Screen Diagnostic and Repair
52:31
Commodore Restore
Рет қаралды 5 М.
Сколько реально стоит ПК Величайшего?
0:37
Vision Pro наконец-то доработали! Но не Apple!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 172 М.