How Animated Commodore 64 Disk Directories Work

  Рет қаралды 47,585

8-Bit Show And Tell

5 жыл бұрын

We take a look at an animated disk directory, and in the process of figuring out how it works, learn about the structure of a 1541 disk. Also, we make our own animated disk directory!
Become a patron: patreon.com/8BitShowAndTell
One-time donation: paypal.me/8BitShowAndTell
This is a long video with several sections, so here's an approximate index:
0:00 Intro
3:15 Examining a freshly-formatted 1541 disk
8:35 Modifying a disk ID for fun
13:50 Scratching a file with the disk editor
14:50 Examining the wrestling animation
21:50 Making our own animated disk
32:40 The Results! And tweaking them.
35:20 Using Fast Hack'Em's sector editor
1541 User's Guide by Dr. Gerald Neufeld: archive.org/details/1541_Users_Guide
Links to download what I demonstrated today:
Championship Wrestling +3D DirArt: csdb.dk/release/?id=175448
Fast Hack’em V4.1A: csdb.dk/release/?id=74934
Directory Karate +: csdb.dk/release/?id=154856
More animated disk directories: csdb.dk/event/?id=2558
Follow me on Twitter: BedfordLvlExp
Check out my podcast Growing Up '80s: thecouch.website/category/gu80s/

Пікірлер: 162
@DavidRomigJr
@DavidRomigJr 5 жыл бұрын
Neat stuff. I remember as a kid repairing a missing directory on a game I copied from my family’s friend. Only sectors 0 and 1 of track 18 existed, so only the first 8 filenames existed. I noticed most tracks contained data and I knew the normal sector pattern the 1541 used to save. One of the files had a list of file names. So, I was able to rebuild the missing directory and the game played. I was so proud of myself at the time. Later as a young adult I learned all sort of neat info about 1541. Like, the drive could address 80 physical tracks, but the write head was too wide to write adjacent tracks (without effecting them), so they numbered them logically as half-tracks from 1 to 40. Also, the very first drives got stuck past track 35, so, though all subsequent drives didn’t have this problem, the drive software would never write past track 35 by default. Also, the drive was programmable (same cpu), the drive speed could be set to 4 speeds, half tracks were selectable, and you could even specify the way the magnetic pulses were read and wrote (except for the sector sync markers)- I see how weird copy protection was possible with that kind of power. Too bad by the time I learned this information it was more trivia than useful, but I loved learning it anyway.
@8_Bit
@8_Bit 5 жыл бұрын
Great memories! I remember trying to run (a copy of) Karateka on my brand new 1541 drive. I'm almost certain the copy protection pushed the head past track 35 and it got stuck. 12 years old and my brand new 1541 drive appears to be broken. It was a terrible experience :)
@martsmiscmix
@martsmiscmix 5 ай бұрын
Robin, I have been "binge watching" your output for a few weeks now, and this, in my opinion is possibly your most compelling episode (possibly after your "C64 Max" stuff). There is so much to savour here! You have a real gift for "explaining stuff" (I note someone else in the comments has said very much the same thing) plus you manage to convey your own enthusiasm for the subject in a lovely "avuncular" - dare I say "Canadian" way that I as a "Brit of a certain age" finds most appealing. Thanks to you mainly, along with a few others I have found myself sucked in to the "C64 Vortex", to the extent that I have now treated myself to a "C64 Max", and I am enjoying that experience immensely. I am a little older than you, having been born in 1957, and therefore "grew up" in the mid 60s to the late 70s, a little before yourself (some may say I haven't truly grown up yet!), and had very little exposure to computers until I had started my professional career in broadcasting when in the early 80s my colleagues were developing programs on a Commodore PET to assist with "productivity" by helping to manage spare parts, and analyse telemetry from remote transmission sites and so forth. Not long after this the "BBC/Acorn" system became a "thing" and that is where our efforts were diverted to, and from that point I became immersed in the BBC/Acorn ecosystem until the behemoth of IBM compatibles and MS Windows eventually took over. (There was a dalliance in the late 80s early 90s with Convergent Technologies/Burroughs/Unisys systems and I am surprised how little "CTOS/BTOS" stuff there is out there on KZbin!) From that point we were just passengers/users, at work anyhow. Hobby wise I dabbled in the Amiga platform in the early to mid 1990s, end even built my own PC systems (as many of us did) in the mid 1990s until Widows 95 came along, c/w "Plug and Play", and from tat point everything "just worked" (more or less) and home computing became somehow less fulfilling to one who does not have the requirement or the "chops" to have to make a living out of it. Until that is I (re) discovered "retro computing" thanks to KZbin channels like yours and many others, in which I am now totally and delightfully immersed. (Being now retired helps somewhat!) So here I am, having to learn "C64" from scratch. Your output is just punching all the right buttons with me! BTW I have also watched and listened to some of the "Podcast" stuff you and Darren have done - you guys really resonate with me - in fact the tale and Darren's recounting the story of your "R&R Detective Agency" from the standpoint of someone not "included" is one of the most delightful things I have ever heard in a podcast! I can so relate to that and it sends me to a happy place in my memories when I recall the trials and tribulations of finding out how "awkward" three way relationships can be at times! Brilliantly done and so delightfully recounted ...
@8_Bit
@8_Bit 5 ай бұрын
Thanks very much for your comment! That's excellent that you've got a "Max" now and are enjoying it. There's so much to learn and experience on this platform and of course many of the others. I'm going to try a couple new platforms this year, starting with the MSX and I've got Spectrum and BBC machines now that I hope work (haven't really tried them yet) that I should get to later this year. I'd love to learn more about CTOS/BTOS; seems so little of that was preserved when businesses moved on. We had some Unisys systems at our high schools in Ontario that all got rounded up and destroyed. I wish I could play with those again. I passed on your message to Darren, he really appreciated that. Thanks for watching and listening!
@m2esectr
@m2esectr 5 жыл бұрын
This reminds me of what I had done in the 80’s: I had saved one program that began with the “clear screen” symbol so that when it was loaded, the screen cleared immediately after printing “searching for” which disappeared. Also, instances of using the cursor down and cursor left symbols made for interesting results, which also worked when using the DIR program from the test/demo disk that came with the 1541. But this takes it to an unimaginable level!
@JasonSmith3
@JasonSmith3 2 жыл бұрын
A big program I wrote in the 80’s is riddled with stuff like this because I saw it as a cool way to hide my BASIC code. When listed it keeps changing the cursor color and using the clear screen and cursor keys to mess up the list. Now I wish for an easy way to clean it up ha ha.
@Wertercat
@Wertercat Жыл бұрын
@@JasonSmith3Print it using VICE's NL10 emulation, that'll get the listing without interpreting control characters.
@gettingpast4391
@gettingpast4391 4 жыл бұрын
I discovered this as a kid. I wondered how they did that so I listed to my 1526 printer and that is when I learned exactly how this is done and used it myself. It was a pretty popular trick for hiding lines of code in basic under the list command.
@williamsquires3070
@williamsquires3070 4 жыл бұрын
I remember doing something similar with AppleSoft BASIC programs to “hide” certain lines of code. The basic (sorry about the pun) procedure was: 1) type out the line as desired, then add a “: REM” and hit key. 2) do a listing showing the line, and count out how many character ON SCREEN (not in memory) there are. 3) edit the line and insert that many character s after the REM statement. 4) type in CALL -151 to go into the monitor. 5) examine memory starting at 0x0800 (the beginning of a basic program), and keep going until you find the line with all those characters you typed in. 6) replace them with 0x08 (backspace). 7) exit out back to the “]” prompt. 8) list the program. Now you see only the line # and nothing else! 😁 I loved finding little tricks like this way back when. I miss those days. Thanks for bringing back memories!
@8BitNaptime
@8BitNaptime 2 жыл бұрын
It's fun for sure. I think on the 64 it was similar, you enter REM at the end of the line but you could use the shift-insert editor mode to add backspace codes right in the BASIC editor.
@mikegarland4500
@mikegarland4500 11 ай бұрын
1:50 "..So of course, I'm not happy just showing you this.. I wanna figure out why it works.." And boy are we happy that you're not happy..! 🙂 Thanks for showing us this. I had never seen one before.
@cbmeeks
@cbmeeks 5 жыл бұрын
2019 and I'm still learning new things about the Commodore 64. Amazing. Great video! Please keep it up.
@telengardforever7783
@telengardforever7783 2 жыл бұрын
Man, where were you back in the mid to late 1980's when we needed you?!
@yorgle
@yorgle 5 жыл бұрын
Awesome! I never knew such a thing existed, and I was of course fascinated to see how it worked. Great comprehensive coverage of it! I've always loved how the C64 series used screen memory to edit stuff, etc... so weird and awesome!
@stupossibleify
@stupossibleify 5 жыл бұрын
Fantastic episode yet again! Just shows that there is so much still to talk about with the C64.
@pauldeane8369
@pauldeane8369 5 жыл бұрын
That's really cool. I used to write lots of these types of animations in BASIC back in the day, never thought it could be used in this way. Very impressive, thanks for doing this up!
@duckyvirus
@duckyvirus 5 жыл бұрын
omg, I didnt even know that was possible. its a LOT of work, but the effect is quite worth it! thank you for the breakdown Robin!
@osgrov
@osgrov 5 жыл бұрын
That..is awesome. Never saw that before, but as soon as I did see it I knew how it was done. :D Really clever, and elegant in a way. Keep up the great videos, been binge-watching them for hours now, hehe.
@project1984
@project1984 3 жыл бұрын
Excellent explanation. I appreciate all of your work for the community. Thanks
@10MARC
@10MARC 5 жыл бұрын
Robin, that was really cool! It is fun seeing what these old machines can do with a bit of creative hacking. Great job as always. 👐👐👐
@HeyBirt
@HeyBirt 5 жыл бұрын
Very cool! This is something I never knew about before. I have just started reading all of the Transactor newsletters which started with the PET in 1978. Clever folks were doing interesting stuff with the cursor control characters back then too, like an auto filling form; print your questions and default answers, print the cursor control characters to get back to where the first answer would start.
@8_Bit
@8_Bit 5 жыл бұрын
I love Transactor, I grew up reading it, and actually became friends with the long-time editor Karl Hildon in the mid-2000s! Yes, it's amazing some of the things that were discovered even back in the '70s.
@Waccoon
@Waccoon 5 жыл бұрын
Back in the day, it never occurred to me that "sys 49152" means "sys $C000". I always hated the fact that I had to type in that arbitrary number to get many programs working and I never knew what it meant. These days, it's no less annoying, but at least now it's annoying in a cool, geeky way. 8)
@rev.davemoorman3883
@rev.davemoorman3883 3 жыл бұрын
So I soon learned that most calls to memory (toolboxes, etc) start at a given page number. C0 = 192. So by thinking of memory as pages let me get memory working in my mind. SYS 192*256 just makes sense. With that, I learned how to read hex - but never very well.
@Guggel1966
@Guggel1966 2 жыл бұрын
Back in the day, I programmed in machine language using a machine code monitor called "zoom", which I loaded into memory location $C000. So "SYS 49125" is still a very familiar command to me 😀 (Later on, I got an "Expert Cartridge", which had more features as well...)
@logiker
@logiker 5 жыл бұрын
Great video with detailed explanations! Wonderful! Thank you!
@jpcompton
@jpcompton 5 жыл бұрын
That "Jason" has some okay ideas!
@8_Bit
@8_Bit 5 жыл бұрын
He does, I should listen to him more often!
@amadagio2856
@amadagio2856 5 жыл бұрын
Love your videos. Keep up the good work.
@anthonycipolla8630
@anthonycipolla8630 5 жыл бұрын
Just brilliant! Great video...
@Eightbitswide
@Eightbitswide 5 жыл бұрын
Reminded me a bit of some of the talks that Jim Butterfield gave at a few of the expos. Good stuff you don't find anywhere else. Keep it coming!
@fuzzybad
@fuzzybad 5 жыл бұрын
Forbidden Forest ftw! It's neat that Commodore DOS was flexible enough to allow putting control characters into filenames. In the 80's I experimented with putting color control chars in program names so that my brothers wouldn't be able to run them. It wasn't a very effective form of access control. :)
@elbiggus
@elbiggus 2 жыл бұрын
There were a bunch of "ATASCII animation" editors on the Atari (including one I wrote) that let you easily create animations that worked on a similar principle - basically a full screen editor that recorded cursor movements as control codes into a long string so you could replay the animation with a simple PRINT statement, and I imagine the C64 had equivalents that could be easily repurposed to simplify this.
@PontusBerg
@PontusBerg 5 жыл бұрын
Kewl stuff. I guess I would have separated the disk format section from the animation section and made that to two shorter episodes tmwhete you would reference the first from the second so that people familiar with the disk format could go directly to the animation part. Anyway - great work. Keep it up
@johnroberts2681
@johnroberts2681 3 жыл бұрын
That brought back a lot of memories. I also used to use disk cracker a lot even rewrote the basic disk editing side in assembly. I remember using it to change the text of games adding your names in etc :) Eventually fast loaders got stored in the directory track so they didn’t use any space on the disk too. Loved my c64 and expert cartridge.
@da5idnz
@da5idnz 4 жыл бұрын
I had Fast HAck 'Em back in the day. Learned a lot by using the sector editor...
@laurent64
@laurent64 5 жыл бұрын
very interesting video !
@AmigaLove
@AmigaLove 5 жыл бұрын
I am not a programmer but I love your videos. I always learn something along the way even though most of the programming aspects are a bit over my head.But I'll listen to these. You're sort of my C64 Bob Ross, except you talk about happy little screens instead of trees. ;) Great stuff, man. I wish I could plug your C64 brain into my brain.
@AmigaLove
@AmigaLove 5 жыл бұрын
I do want to save these, though, and copy your programs line-by-line like I used to BITD out of the back of magazines. :)
@TheHighlander71
@TheHighlander71 5 жыл бұрын
That's just amazing. I thought the wrestlers were cool, but the karate one is off the charts! Don't think I didn't notice that copy of Forbidden Forest! Scary memories of that game. And that music!
@c64customs
@c64customs 5 жыл бұрын
Wow, very interesting!
@madcommodore
@madcommodore 5 жыл бұрын
From the earliest times of C64 games releases software companies used the special colour/cursor etc control symbols from BASIC in the filenames of games on tape (so games would clear the screen and say the game name in a different colour etc). The tough bit is the filename limit which you have to keep within. Still this is possible on other Commodore machines too that have the special codes activated for inside the print statement quotes.
@rev.davemoorman3883
@rev.davemoorman3883 5 жыл бұрын
I am excited that some 8405 people (today) are still interested with the internal workings of the C64. It is (and always will be) the epitome of the 8-bit computer. The designers listened to programmers and thought long and hard about possible ways to do things - making the machine better than they themselves could have imagined. I am doing my long (12 year) hiatus - but your lessons are whetting my curiosity. What more can this penultimate machine accomplish?
@8_Bit
@8_Bit 5 жыл бұрын
Thanks Dave! You and Fender were an important part of my growth as a programmer, by giving me a target: to get published in Loadstar :)
@rev.davemoorman3883
@rev.davemoorman3883 3 жыл бұрын
@@8_Bit Loadstar became - for a while - a community of hobbyist programmers. At least that was what I wound up doing. I remember the rag-mags kept rehashing the beginner stuff. When I found Loadstar (issue 56, I think), I was delighted that Fender and Jeff seemed to respect my intelligence. Sure, for a long time, the tutorials were way over my head. But I still had the issues when I was ready to try using stuff like font design and under-ROM memory.
@imbezol
@imbezol 5 жыл бұрын
Awesome!
@leebrewer1190
@leebrewer1190 5 жыл бұрын
The fastload cartridge has such a faster and easier to access. I used to do stuff like this back in the late 80s. You can also hide a directory entry by putting backspaces over them on the directory block or else give them a name that does not exist but lists in the directory.
@8_Bit
@8_Bit 5 жыл бұрын
I may be doing a video about EPYX Fast Load soon. It's a great cartridge and relatively easy to obtain today.
@leebrewer1190
@leebrewer1190 5 жыл бұрын
Sorry my initial post left something out! I meant to say its block editor was so much faster and easier to access disk blocks with. Somehow I left that out. Looking forward to the review. To me, the most incredible cartridge ever was the Datel Action replay. I used it for all sorts of things. One main thing was swapping characters from one game to another by saving the sprites and easily putting them into a nother program. Another amazing thing it allowed was Freezing/compressing/saving any program onto disk, and (after special formatting using the cart.) would trubo load any program in a literal few seconds. @@8_Bit
@RetroBoxRoom
@RetroBoxRoom 5 жыл бұрын
Very interesting indeed! I've never seen anything like that before on the C64!
@IDPhotoMan
@IDPhotoMan 5 жыл бұрын
That's pretty cool.
@ideegeniali
@ideegeniali 2 жыл бұрын
Back in the days I saw and recreated directory listings with colored filenames and down arrows to space them apart, but never encounteted or tough of up arrow to overwrite and animate.
@mikegarland4500
@mikegarland4500 11 ай бұрын
Fast Hack 'Em!! I had forgotten that was the name. The Fast Hack 'Em disk was the first disk we copied. I used it to make backups of a lot of my programs on disk, so I wouldn't have to use the originals. Plus a friend of mine used it to give me a ton of games he had copied.
@ideegeniali
@ideegeniali 2 жыл бұрын
To get rid of alhpabet, instead of disk editing, you can have your basic program generate (up)(up)(up)(left)(space)(left)(left)($A0) So after the variable letter a left cursor positions cursor onto same letter, then space hides it by overwriting.
@JustWasted3HoursHere
@JustWasted3HoursHere 5 жыл бұрын
Yeah, it's cool that the Commodore character set includes cursor positioning and reverse text and such. I used to make scrolling marquees using this method. It's pretty slow in uncompiled BASIC, though.
@nullplan01
@nullplan01 5 жыл бұрын
So basically, the C64 has an arbitrary code execution flaw in the directory listing. Thank god no-one used that for nefarious purposes...
@8_Bit
@8_Bit 5 жыл бұрын
I'm not sure you can exploit this to execute arbitrary code. But you can definitely get it to print any control code you want.
@3DPDK
@3DPDK 5 жыл бұрын
It has to do with the "\" character in the file name, set by the shifted return. The screen printing routines recognize this character (if reversed background) as an "escape" character and goes into command mode, thereby performing the format characters rather than printing them. The "trick" is in the C-64's screen printing routines and very much intentional. The "\" character has always been an escape (to command mode) character in the world of automated printing and typing equipment since the 1960s. The technique was used by some software producers to prevent visible listings of program code and to hide visible listings of some key files on the disk. Again - not a flaw but an industry standard at the time. IBM's disk operations has added further meaning to the backslash, but even in something like "C:\directory name\..." it still is referred to as an escape command and line feed.
@AiOinc1
@AiOinc1 4 жыл бұрын
I really doubt you could do any damage to anything but the disk which was showing the directory. What data is there to destroy but your own? It was exceedingly rare to see machines with more than one drive. Also, cursor movements aren't exactly ACE. It's an intentional feature, even the VIC-20 and I believe the PET machines had this too.
@dirkvonfabeck2059
@dirkvonfabeck2059 4 жыл бұрын
AIO inc. ß
@gettingpast4391
@gettingpast4391 4 жыл бұрын
Um... they are about to load and run whatever is on that disk. Wouldn't that be a bigger risk?
@airjuri
@airjuri 5 жыл бұрын
Great stuff!
@manicsorceress2181
@manicsorceress2181 5 жыл бұрын
I have no use for this. But it's still fascinating me even today. Great video. I wish the internet existed in the 80s when the C64 was up to date. Thumbs up!
@cbmeeks
@cbmeeks 5 жыл бұрын
For me, the C64 is still up to date.
@manicsorceress2181
@manicsorceress2181 5 жыл бұрын
I always admired the people who still use this old machines. What are you doing with it?
@cbmeeks
@cbmeeks 5 жыл бұрын
@@manicsorceress2181 Mostly games. But I'm also learning how to develop hardware for it. Like new sound cards.
@manicsorceress2181
@manicsorceress2181 5 жыл бұрын
That's cool. Are you going to sell them?
@cbmeeks
@cbmeeks 5 жыл бұрын
@@manicsorceress2181 Unlikely. I open source most of my stuff.
@uriituw
@uriituw Жыл бұрын
Back in the '90s, there was a technique I was aware of that could give you coloured directories. I believe it was published in _Run_ . I remember trying all sorts of ways to implemented colours in directories, but I never succeeded. I wish I knew what the trick was.
@midnitepagan9118
@midnitepagan9118 5 жыл бұрын
omg fast hackem. I was going to suggest Disk Doctor, but i forgot that it did that.
@75slaine
@75slaine 5 жыл бұрын
Pretty cool alright. I’ve been using a similar technique in large build systems on Linux to display a project name followed by a color coded label to show [ WORKING ] and replace it with [ ERROR ] or [ DONE ] when appropriate. Never even considered the good old 1541 could do something like that.
@HoSza1
@HoSza1 5 жыл бұрын
Until you realize parallel builds are possible and need to figure out which [WORKING] is to be replaced... :)
@75slaine
@75slaine 5 жыл бұрын
Szabolcs Horváth yeah. But thankfully it’s project level. Each project builds in parallel. There’s always more knob twisting that can be done. But with diminishing returns
@xotmatrix
@xotmatrix 5 жыл бұрын
Really interesting. You can do some cursor tricks with filenames on Apple ][ DOS 3.3 but unfortunately the COUT routine doesn't handle moving the cursor up, so animations like this aren't possible.
@ideegeniali
@ideegeniali 2 жыл бұрын
Directory Karate apparently doesn't freeze at the end, just leaves you with blue text on blue background cursor. I didn't investigate, but maybe same trick to hide all PRG DEL etc. as well: print them blue on blue.
@ChristmasEve777
@ChristmasEve777 2 жыл бұрын
It didn't even occur to me to manually change filenames to be the same name after the fact (after saving) lol nice! It's the save routine that doesn't allow it, not the many directory listers or file loaders out there (including the builtin ones). They're actually fine with duplicate names so long as you aren't trying to load the nth one of a particular name.
@ChrisKewl
@ChrisKewl 4 жыл бұрын
A suggestion to make it a little more pretty is to print both lines with the blank in the middle and the move up after making the bottom line and then do your animation. This way the directory is already done and doesn't continue after.
@csbruce
@csbruce 5 жыл бұрын
23:39 Missing hyphens in compound adjectives bug me, too! JiffyDOS would speed up all disk operations.
5 жыл бұрын
you need to see our early (probably 1989) demo "midnite movie" original release disk. we were making almost small intro in directory 8) vigo/zombie boys
@logiker
@logiker 5 жыл бұрын
Seems like an important and interesting bit of history! You got any link for download? Thank you!
@8_Bit
@8_Bit 5 жыл бұрын
There's a Zombie Boys demo called "Midnite Movie" on CSDb but unfortunately the directory appears to be normal. It'd be very cool to see this animated directory version!
5 жыл бұрын
8-Bit Show And Tell i need to find original release disk at home. couldn't find it online.
@robsku1
@robsku1 4 жыл бұрын
@ Me wants to see the funny directory as well ;)
4 жыл бұрын
robsku1 unfortunately I couldn't find it. 8(
@laureven
@laureven 5 жыл бұрын
You are very good with explaining "stuff" ...thanks for Your time and sharing this cool trick with everybody :) ...because of You, 1286 people become a little bit smarter, including me :)
@8_Bit
@8_Bit 5 жыл бұрын
Thanks for watching Marcin, it's great how people are still interested in learning about these old computers. I learned a lot making this episode too!
@NLB90805
@NLB90805 4 жыл бұрын
"A 'Little Bit'" what is a 'Little Bit' - a half of a Nibble? Sorry, Pun Intended... I wrote this in good fun. Thought it was funny you wrote 'a little bit'. Thank you for the subconscious Lol
@ropersonline
@ropersonline 4 жыл бұрын
Actually, I think this video could have gotten more views and would have been easier to understand if the printing cursor control characters part had been explained at the outset, because as it is, viewers have to stick with it and watch almost halfway through the video before that's made clear.
@casaderobison2718
@casaderobison2718 2 жыл бұрын
@@NLB90805 I think a little bit is 0 and a big bit is 1. #haha
@00Skyfox
@00Skyfox 5 жыл бұрын
Pretty cool! I was going to ask if you could use quotes-mode color codes to make the unwanted letters the same color as the background, but that Directory Karate looks like it can use color codes. (The next question would be if the code could be inserted to change the text color back so the rest of the animated directory would be visible.)
@8_Bit
@8_Bit 5 жыл бұрын
You can definitely use the colour codes in the filenames, yes, though I think it would "waste" at least 2 of the 16 characters to change it to the background colour and then back again. There might be other side-effects too. Maybe I'll get a chance to give it a try, though it'd be cool if anyone else tried modifying my program listing to see if they could make it work.
@douggale5962
@douggale5962 5 жыл бұрын
You will get a good speedup by using % to declare the type as integer, your FOR loop is using floating point emulation for X. Of course the long wait in this specific case was disk I/O, but in general you want to save CPU using integers.
@8_Bit
@8_Bit 5 жыл бұрын
This is true in other languages, but not in C64 BASIC where integers are actually slower than floats. In fact, you can't even use integers at all in a C64 BASIC FOR/NEXT loop, you'll get a ?SYNTAX ERROR. Give it a try.
@loopymind
@loopymind 2 жыл бұрын
I remember playing with those cursor movement codes/characters in basic programs...
@RobLindman
@RobLindman 5 жыл бұрын
once you have the directory listing in memory you could look in the monitor to see what chars are used for animating.
@zaindlmaier266
@zaindlmaier266 4 жыл бұрын
At 4:50 you mentioned the dos version byte $41 on track 18,0. If you changed it there is a possibility to write it back: In drive memory at address $0101 there is a copy of that value. You have to change this in drive ram to $41. Then you can write to disk again.
@8_Bit
@8_Bit 4 жыл бұрын
Aha, thank you for the info!
@ChristmasEve777
@ChristmasEve777 2 жыл бұрын
Drive memory!! Ahhh I remember messing with that. You had to toggle the clock bit from 0 to 1 to 0, back to 1 again and so on while passing one bit at a time in the data bit (to write to drive memory or read from it). I experimented with a routine that used the clock bit as a data bit too for double the speed so it depended on the C64 and 1541 running at the same speed. It actually worked (most of the time). One time I had a disk become unwritable. I couldn't even reformat it. The disk turned out not to be bad though. After taking a magnet to the disk, I was finally able to format it. Maybe this could have been solved by writing to drive memory.
@misterkite
@misterkite 4 жыл бұрын
Now I'm wondering if you can use ansi control codes in msdos filenames.
@jeffryan7672
@jeffryan7672 4 жыл бұрын
I just stared using PETMATE. There is. a way to load directory lists into that program. I’m thinking they used that to create the ring and wrestliers, then did the cursor movement after.
@davewilks847
@davewilks847 3 жыл бұрын
try the csdb demos on vic20, pet and c16. they kinda work on these too
@MurderMostFowl
@MurderMostFowl 4 жыл бұрын
Oh man I loved Forbidden Forest back in the day ( and its sequel )
@111utoobmetoob111
@111utoobmetoob111 5 жыл бұрын
Hi. First time viewer. First I have to say, your hand there in the video makes me think of Mr. Bill lol. Secondly, I recall using REM statements with cursor controls to make my basic program listing disappear so it could not be viewed. I think...been a long time lol.
@8_Bit
@8_Bit 5 жыл бұрын
Oh nooo! And after a bit of searching, I now know that Ellen DeGeneres' brother was Mr. Hands in the early Mr. Bill episodes, weird. And yes, your memories of using REM are correct. REM Shift-L opens up a whole bunch of possibilities which I'll likely do an episode on at some point :)
@8_Bit
@8_Bit 5 жыл бұрын
Whoops, REM Shift-L is a different trick. It causes an error when you try to LIST that line. Instead it's a sequence of quotes, deletes, inserts that allows you to embed characters colour and cursor control characters.
@111utoobmetoob111
@111utoobmetoob111 5 жыл бұрын
@@8_Bit Haha that's right, Mr Hands lol. And thanks for the irrelevant fact I can now throw around at parties :)
@bloepje
@bloepje 5 жыл бұрын
Did anyone ever try the &command filename? If you save a file with that name you could run it later, the disk drive would read the first sector into memory and execute that. At least on a CBM8050 (the one with 2 cpu's and 2 drives). The program would run until interrupted by the next ATTENtion from the IEEE488 bus. No idea if the 1540/41 did the same.
@8_Bit
@8_Bit 5 жыл бұрын
I've heard of that but I've never tried it. I think the 1541 has the same ability, maybe I'll get to try it out sometime in a video.
@jeffthecoder
@jeffthecoder 5 жыл бұрын
That's the first time I'e ever seen an animated directory listing too, I'm guessing this is a new thing?
@8_Bit
@8_Bit 5 жыл бұрын
Yeah, I don't know of any examples earlier than 2017. There was a competition on CSDb: csdb.dk/event/?id=2558
@logiker
@logiker 5 жыл бұрын
@@8_Bit The CSDb competition made animated DirArt popular lately. I don't know how many of such animations were made before it. I also wished to know if there ever was an animated DirArt, that was included into the directory itself like this one. Those I know usually clean the screen first, which makes life easier.
@SpearM3064
@SpearM3064 5 жыл бұрын
As a side-note, instead of popping the disk out and putting it back in again, you can force the 1541 to re-read the BAM by sending an Init command (I0). Whenever I wrote a program that wrote to disk, I would always send an I0 command before opening or closing any data files, just to be safe. It only added a second or two to the access time, and protected you from a bug that could potentially cause data corruption. (I forget the details of the bug, but it could cause the drive to write to a sector that actually was already in use. Sending an I0 command forced it to update the cached copy of the BAM.)
@3DPDK
@3DPDK 5 жыл бұрын
The bug had to do with overwriting files on a full disk. The SAVE"@0:filename" had the same bug. If the disk was in the middle of writing a file and would run out of blank sectors (a deleted file is not considered to be "blank") it would go back and continue writing to used and non-validated sectors. A good practice in any program that wrote to disk was to validate the disk (OPEN15,8,15,"V0":CLOSE15) when the program first runs and before it ends. The "I0" command simply rebuilds the BAM but the non-validated sectors remain.
@3DPDK
@3DPDK 5 жыл бұрын
I never thought about putting this trick into the disk directory listing. Notice that the shifted return actually puts a reversed background back slash in the monitor's directory listing. On the screen this is chr$(77) but reversing it makes it screen code 205 (77 OR 128). Since the early days of programmable electric typewriters the '\' character has been used to "escape" from normal print mode and go into command mode. The C-64 screen printing routines used this convention. type: 10 REM " \ ( _from here you can enter any screen formatting commands you use in direct mode, ie; text color changes, cursor movements, clear screen, cursor 'home', etc. when typing, they display as the reversed graphics character you expect in quote mode, but when listed, they become screen print and format commands because of the "\" escape. Do not include a closing quote_ ) *For this to work you need to enter the line, cursor back up to the '\", turn on reverse mode [CTRL 9] and retype the shifted M which is the back slash, then hit RETURN to re-enter the line* . It MUST be a reversed back slash character. You could use this technique to create similar animations in your program listings, to erase lines from view while listing, to highlight REMark statements with a different text color, to insert line feeds or cursor downs to visually separate sections of code. One thing to note is the reversed back slash automatically induces a carriage return and line feed (or sends the cursor down to the start of the next line) so a line like: 10 REM "\ \ \ will list as: 10 REM 20 (more code, maybe the start of a subroutine). A line like: 10 REM"\ [cursor up] [7 spaces] [color blue] SUBROUTINE TO DO SOMETHING [original text color] 20 (start of subroutine) will list as: SUBROUTINE TO DO SOMETHING (in blue) 20 (start of subroutine) (in original listing color) The cursor movements and spaces erases the line number and REM and just prints the normal text within the quotes making it impossible to simply edit line 10 without re-entering the entire line.
@8_Bit
@8_Bit 5 жыл бұрын
I've been fascinated by these REM tricks since I learned about them in the late '80s. I've got them on my list of things to make an episode about in the future, unless someone does a good job of it before me :) It's kind of meta-programming, making a LISTing that almost executes like a program itself. Thanks for the comment.
@3DPDK
@3DPDK 5 жыл бұрын
@@8_Bit "Meta-Rems" ... never thought of it that way but an excellent name for them. I'm debating producing a series of videos that deal strictly with Commodore Basic by creating simple text graphics games - working on my version of "Mastermind" at the moment, to try to show the versatility of the C-64 BASIC command set, and how much can be done in pure BASIC. I have used these "Meta-REMS" to highlight subroutines and other key code. If I start posting these videos I'm sure someone will ask how the heck to get color changes in a program listing. They bloat a program with useless code, but it's handy if you share your programs with others for learning purposes. P.S. so far, yours is the best C-64 programming channel on KZbin, so it kind of sets the bar for understandable, interesting content. Keep up the good work.
@8_Bit
@8_Bit 5 жыл бұрын
3DPDK thanks very much, and that’d be fantastic if you did a series like that. I think there is a lot of interest in BASIC programming again for people who want to get into C64 coding again but still find ML too daunting
@gummansgubbe6225
@gummansgubbe6225 4 жыл бұрын
Terry A. Davis was there?
@mule1991
@mule1991 5 жыл бұрын
So cool, never saw that either in my 35 + C= years
@williamsquires3070
@williamsquires3070 4 жыл бұрын
What happens if you replace the 0xA0 with 0x20?
@jeffstack4217
@jeffstack4217 5 жыл бұрын
Another great effort Robin! (Who's the 'D' that gave this a thumbs down)? LoL... Oh Well, haters' gonna hate.
@8_Bit
@8_Bit 5 жыл бұрын
Thanks! And yeah, it seems there's always somebody giving a thumbs down whenever I have a video that gets noticed beyond the normal audience. Oh well, I guess it's a sign of growth :)
@Simcore999
@Simcore999 Жыл бұрын
👍
@ericmullins7990
@ericmullins7990 5 жыл бұрын
I noticed you using Disk Cracker. There is a 4.0 version of that program, I think the latest. Some of your gripes are addressed-- hex data entry, for example. Also, I revamped it a while back. Your video gave me a kick in the posterior to get it back online since I cancelled my GitHub account. You can find BASIC and C versions of the revamp at goabq.org/c64/disk-cracker-revamp.html
@8_Bit
@8_Bit 5 жыл бұрын
Excellent, it looks great!
@hueyiroquois3839
@hueyiroquois3839 2 жыл бұрын
4:55 I have an idea on how to undo that, but I can't test my idea, because I can't replicate the behavior in C64 Forever.
@KuraIthys
@KuraIthys 5 жыл бұрын
Ah, amusing. XD I guess in the internet era this would sort of fall under the category of a bug related to not sanitising user input. That's a big no-no on a website. But basically it amounts to processing input without checking it for control characters that shouldn't be allowed in that kind of input. That would be akin to putting a html tag in a youtube comment and having it mess up the page formatting for everyone that sees the comment. Same basic category of exploit, but I guess somewhat more harmless... ... Hopefully. XD
@logiker
@logiker 5 жыл бұрын
Yes, I would agree with you. These days that would be a bug for sure. Back then there was no internet and mostly even no hard disk. So the "bug" stayed on the disk. Last but not least, it does not execute any code and is harmless therefor.
@KuraIthys
@KuraIthys 5 жыл бұрын
Yes. That last part is an important point. I imagine this still could've done something dubious in theory... But the stuff it can do is mostly harmless. It'd be a big problem if it allowed arbitrary code execution, but even then given that a c64 has no persistent storage, what's it going to do? Mess up the same floppy disk it's stored on? Seems kinda pointless. XD If it could do something truly dangerous, the biggest risk would likely be having it on a disk that contains a disk copying utility or something similar. In that case it could result in virus-like behaviour... But since it really only alters the onscreen printing of the directory listing itself, even that is fairly unlikely.
@robsku1
@robsku1 4 жыл бұрын
I usually get what your explaining, including the tiny text adventure, but now I'm left baffled. Maybe I missed a part (watching at workplace), but I still have no clue why and how does C-64 list directories in such way that this is even possible... Why does it keep updating the listing after it's already been printed on screen?
@8_Bit
@8_Bit 4 жыл бұрын
I think the heart of it is explained around 17:30 - some of the filenames have cursor movement codes embedded in them so instead of just printing filenames one after the other down the screen, some of them move the cursor up the screen several lines, then print new filenames on top of the old to give the appearance of the animation.
@robsku1
@robsku1 4 жыл бұрын
@@8_Bit Thanks... Actually I think I got the gist of it afterwards, it was just that I was confused about how it functioned - I originally thought (I should've paid more attention) that it printed the directory, returned the control to the user/BASIC shell and continued updating the already printed directory listing in the background. It felt like really odd functionality for C-64 to have. Instead you're not able to do anything with the computer until the animation is finished, right? I have no problem understanding that now - it would be like using ANSI/VT100+ control sequences in DOS filenames (if DOS had long filename support, otherwise you couldn't fit anything meaningful in it... Or with 4DOS in the file description. Very cool indeed. Btw, I assume that there's some character that, when printed, delays the animation? Like "draw animation frame, short delay, draw another animation frame, ..."?
@rednight2476
@rednight2476 5 жыл бұрын
cool - You could change the color to blue on blue to hide the artefacts
@8_Bit
@8_Bit 5 жыл бұрын
I briefly tried that (off-camera!) and I think I had trouble with the colour change carrying over to the next directory entry. So maybe it would work but it would use one or two character worth of the displayed file name? I'll see if I get a chance to try it, but let me know if you get it working.
@logiker
@logiker 5 жыл бұрын
​@@8_Bit Exactly. You only transfer the problem to the next line. If the action would only happen on the left side, it could work. But not if the action is positioned in the center or further right.
@bloodyl_uk
@bloodyl_uk 5 жыл бұрын
What on earth is that patch?, Commodore Community?
@8_Bit
@8_Bit 5 жыл бұрын
It's a reproduction of the Commodore Security badges that the guards at Commodore actually wore on their jackets. It was made by my friend DLH who runs the book archive at bombjack.org. I talked about it a bit in a previous video but I can't remember which one right now :)
@dr.ignacioglez.9677
@dr.ignacioglez.9677 2 жыл бұрын
I LOVE C64 👍🥂🎩
@duckyvirus
@duckyvirus 5 жыл бұрын
an UNOFFICIAL git with the code from these videos is available on GitHub. the link for the Code used in this one is github.com/duckyvirus/8bitshowandtell/tree/master/8-Bit%20Show%20And%20Tell%20-%20E10
@appenginenode
@appenginenode 5 жыл бұрын
"Fifteen-fourtyone" Correctly said
@8_Bit
@8_Bit 5 жыл бұрын
Yes! Now how about SYS 64738? Would you say "S-Y-S" or "SYS" as in "sis"? :)
@appenginenode
@appenginenode 5 жыл бұрын
@Me oof yeah. Me is correct
@appenginenode
@appenginenode 5 жыл бұрын
@@8_Bit sys ;)
@LocalAitch
@LocalAitch 5 жыл бұрын
I’m dense, just realized who you were. Hello Macbeth :)
@8_Bit
@8_Bit 5 жыл бұрын
Hi LocalH, it's been a while :)
@stefankrause5138
@stefankrause5138 3 жыл бұрын
...this is like debunking copperfield's tricks.. somehow takes away the magic.... ;)
@tenminutetokyo2643
@tenminutetokyo2643 5 жыл бұрын
DOOD!
@stevenorgate4307
@stevenorgate4307 5 жыл бұрын
Omg.....Fast Hack 'Em .....I'm 16 again lol....
@napomania
@napomania 5 жыл бұрын
my eyes suggest you to use a white colour for your typing.. the grey over the blue are not very friendly. to my eyes :-(
@8_Bit
@8_Bit 5 жыл бұрын
Unfortunately these are the default Commodore 64 colours, light blue on dark blue, that you get when you power on the computer. I've been in the habit of using them for 35 years so it'll be difficult for me to remember to change them. I'll see if I can try it for part of an episode and see what people think.
@napomania
@napomania 5 жыл бұрын
@@8_Bit i usually push ctrl+1 ( or 2, don't remember.). but if the machine came back always to defaults is pretty annoyng all the time
@8_Bit
@8_Bit 5 жыл бұрын
@mapo mapo Yeah, it's CTRL+2. I think the 8-Bit Guy is in the habit of doing that.
@pr0wl3r666
@pr0wl3r666 5 жыл бұрын
@mapo mapo how can you dislike the default Commodore 64 colours? I like them ever since I first saw a Commodore 64 being powered on back in 1984! Christmas 1985 I would finally be the proud owner of a Commodore 64.
@alexsandrosschneidinger5215
@alexsandrosschneidinger5215 Жыл бұрын
Der Nachteil war beispiel Basic mann muste Die Befehle Manuel einstellen jetzt komm der Apple der ist der erfinder der Automatik er hat den Befehl Funktion in Automatik funktion umgestellt
@Reth_Hard
@Reth_Hard 5 жыл бұрын
OK, but how does it work? lol
@8_Bit
@8_Bit 5 жыл бұрын
Sounds like I need to make part 2!
@altubes
@altubes 5 жыл бұрын
U need a "retrobright"..
@JWalterHawkes
@JWalterHawkes 5 жыл бұрын
Great video. In depth content. Well presented. Forbidden Forest FTW. Subscribed.
@crapcbm
@crapcbm 5 жыл бұрын
something like we did in the 80s with "reverse displayed" dir lists haha
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 92 МЛН
После ввода кода - протирайте панель
0:18
Secret Wireless charger 😱 #shorts
0:28
Mr DegrEE
Рет қаралды 2,4 МЛН
Low Price Best 👌 China Mobile 📱
0:42
Tech Official
Рет қаралды 718 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2 МЛН