The Extra Spaces in Commodore 64 BASIC Errors

  Рет қаралды 34,396

8-Bit Show And Tell

8-Bit Show And Tell

Күн бұрын

Why are there two spaces in the famous ?SYNTAX ERROR on the Commodore 64? Why are there three spaces in the little-seen ?BREAK ERROR? Let's dig into it with a C64 machine language monitor and see if we can patch those extra spaces out!
Become a patron: / 8bitshowandtell
One-time donation: paypal.me/8Bit...
AtariAge Store: www.atariage.c...
Jim Butterfield's Commodore 64 Training Tape: • Commodore 64 Training ...
The extended version of my song Commodore 64 Christmas: • A Commodore 64 Christmas
Follow me on Twitter: / bedfordlvlexp
Check out my podcast Growing Up '80s: thecouch.websi...

Пікірлер: 192
@csbruce
@csbruce 5 жыл бұрын
The BASIC ROM for the C64 was pretty much a verbatim copy of the VIC-20, except it was relocated to $A000 from $C000. The VIC-20 had a very narrow screen, so the "ERROR" part of the message included a carriage return and a Space prefix to start and indent it on a different line. They could easily have cleaned this up by shifting the whole "ERROR" text back one byte and putting a redundant $00 on the end to maintain the code alignment, but they apparently didn't bother. When you were looking at the error messages in ROM, you could have hit Commodore-Shift to see that the last letter is in upper-case, which in PETSCII means that the high bit is set, which also acts as a terminator.
@8_Bit
@8_Bit 5 жыл бұрын
Good points. I also have notes for an episode about the history of these space errors going through from the PET and VIC-20, and had that info in there, I think someone else commented on it shortly after the episode was first released. I wish I had thought of doing the Shift+Commodore thing to illustrate the high bit being set!
@pb7379-j2k
@pb7379-j2k 5 жыл бұрын
8-Bit Show And Tell is it because of that legendary deal that Jack made with Microsoft-they didn’t change anything because that would have broken their sweetheart deal?
@8_Bit
@8_Bit 5 жыл бұрын
Paul Bruneau I think that was a factor, yes!
@pb7379-j2k
@pb7379-j2k 5 жыл бұрын
8-Bit Show And Tell thanks! Your videos are fantastic btw. I bought a vic-20 then a C64 a couple years later. 30 years later I program iphones 😃
@sa3270
@sa3270 5 жыл бұрын
It helps to have exotropia if you're trying to program a VIC-20.
@stupossibleify
@stupossibleify 5 жыл бұрын
When you consider how last minute the BASIC ROM and Kernal was for the C64, we can forgive them for this! I'm less forgiving about the IEC transfer routine that made the disc drive ridiculously slow!
@SpearM3064
@SpearM3064 5 жыл бұрын
@stupossibleify Yeah, but that's because of a bug in the 6522 chip that was fixed in the 6526. Essentially, it was supposed to have a hardware shift register, but it didn't work. They were forced to resort to bit banging in software. The Commodore 64 used the 6526 chip, but when the 1541 disk drive came out, they wanted to make sure it was backwards compatible with the 1540, so they used the 6522 *again.* Now, you may wonder, "wait a minute... why didn't they just skip backwards compatibility, so that there would be a working pair of 6526 chips?" Simple... some jackhole at the factory decided the C64's motherboard wasn't secure enough, so he added a screw hole right through the trace for the 6526's shift register. In other words, it wouldn't matter if the 1541 had a 6526 or not, because the hardware shift register still wouldn't work. It wasn't until the Commodore 128 and the 1571 disk drive that we got a working pair of 6526 chips. On top of that, the new VIC-II chip introduced "flutter" into the timing, so they had to slow the drive down _even more_ to make it reliable again. The result was a disk drive that, even under ideal conditions, couldn't transfer more than 512 bytes per second using the standard I/O routines.
@stuartmcconnachie
@stuartmcconnachie 5 жыл бұрын
But wait, you didn’t change the error messages to random curse words? How disappointing..... 😉
@peterlamont647
@peterlamont647 4 жыл бұрын
Bugger! You oinked it you fucka'!
@MatthewPegg
@MatthewPegg 5 жыл бұрын
I thought the extra spaces before "ERROR" simply was a form text alignment so that all different errors messages lined up.
@8_Bit
@8_Bit 5 жыл бұрын
This seems to be the reason: On the PET there was just one space before the ERROR. Then on the VIC-20 they added a carriage return because some of the errors were too long and had an ugly screen wrap otherwise. Then on the C64 they didn't bother to recompile, and instead just patched over the CR with a space.
@TheJamesM
@TheJamesM 5 жыл бұрын
That was my guess, too.
@christopherlawley1842
@christopherlawley1842 4 жыл бұрын
Late to the party. This was what I thought too. But /why/? It's not as tho' you got a series of errors in one go (I assume)
@Nostrum84
@Nostrum84 4 жыл бұрын
@@christopherlawley1842 read the other comments here. the answer is in this video's comment section
@WalterFrancis
@WalterFrancis 4 жыл бұрын
I have no idea why this is interesting as I haven't had any interest in a C64 since about 1987 but it is fascinating to learn how they packed as much as they could into it, including pointing to strings they already used elsewhere rather than wasting space.
@Haldrie
@Haldrie 5 жыл бұрын
I just took this a step further and patched these bugs by hex editing the "basic" file for the VICE C64 Emulator I'm using so now it only shows 1 space. I'm sure you could also patch this by flashing your own EPROM chip with these fixes burned on it.
@JustWasted3HoursHere
@JustWasted3HoursHere 5 жыл бұрын
It really warms my soul to see all these new games coming out for classic systems like the Atari 2600, Sinclair Spectrum, Intellivision, C64 and so on...and new hardware too! In fact, retro gaming is arguably MORE popular now than it has ever been.
@stupossibleify
@stupossibleify 5 жыл бұрын
I love how through bugs/anomalies we get to understand how things work. Excellent video, I always wondered how the error handler printed the messages
@dru1432
@dru1432 5 жыл бұрын
I had to rewatch the first couple of minutes today cause all I did during the premiere was stare at the lovely quartflakes! :) Can't believe the video is 37 minutes long, it felt like 20 minutes max! Thanks for the great content and merry Christmas to you and your family!
@dru1432
@dru1432 5 жыл бұрын
Now that I think about it it's probably quadflake, not quartflake... Anyways, they're great! :)
@8_Bit
@8_Bit 5 жыл бұрын
@@dru1432 Yeah, I think Darren called them quadflakes. Thanks very much for watching and commenting, it's really encouraging and makes me want to keep making more videos :) Merry Christmas to you and your family too!
@dru1432
@dru1432 5 жыл бұрын
@@8_Bit Thank you! :) I'm always looking forward to your video premieres. I try to catch them live whenever I can. :)
@stupossibleify
@stupossibleify 5 жыл бұрын
I did the same! I spent most of the first watch trying to figure out how Robin has achieved the snowflakes with interrupts!
@randysmith7094
@randysmith7094 5 жыл бұрын
Cool snowflake code, I have some suggestions to make it more interesting. Make the outside corner pixels less likely to be generated, should produce more rounded flakes. Randomly have one generated double size. I'd love to see a breakdown and tutorial of the code. Thanks.
@8_Bit
@8_Bit 5 жыл бұрын
Good ideas, and yes, I'll try and get to that explanation of the code.
@williefleete
@williefleete 5 жыл бұрын
never really had a 64 but I enjoy low level computer stuff
@patsfan4life
@patsfan4life 5 жыл бұрын
You should emulate it , if nothing else for the amazing array of 8-bit games
@GrokThis
@GrokThis 4 жыл бұрын
Me either. I have really enjoyed getting into the details of the Commodore 64. Even inspired me to homebrew my own computer from the ground up.
@rev.davemoorman3883
@rev.davemoorman3883 5 жыл бұрын
Great tutorial! And I love the C=hristmas song! Keep 'em coming. I once knew this stuff, but my (soon to be) 69 year old brain is forgetting things.
@8_Bit
@8_Bit 5 жыл бұрын
Thanks Dave. Have a great birthday as we ring in 2019!
@TheXJ12
@TheXJ12 3 жыл бұрын
At 30:20, you changed BREAK00A0 to BREAK0080 but wasn't changing the K to K+$80 a better choice ? Both work but printing char 00 twice seems weird although invisible...
@shieladixon
@shieladixon 5 жыл бұрын
Lovely work with the snowflakes! And being sprites and using an interrupt means that they continue while you do other things. Stuff people take for granted nowadays!! Clever stuff with the double symmetry to make a quadroflake. I'd be dead impressed with a routine that made 6-pointed snowflakes!
@michaelbarry8005
@michaelbarry8005 4 жыл бұрын
I think that $A0 at $A389 might be the opcode of a LDY #$BA instruction! You should have changed $A387 to $CB instead to avoid introducing another obscure bug. [Edit: I read a bit further down in the comments and realized that the breaK solution isn't that great. My point about the danger of changing the $A0 may still apply.] [Edit#2: I checked the commented disassembly, and discovered that there's no danger ... the executable code starts at the $BA (TSX) ... nevermind ...]
@madyogi6164
@madyogi6164 3 жыл бұрын
I used c64 in the 90's (still in the basement somewhere). 6:25 My 1st pick is to notice that ERROR word in both cases (most likely in all) is 9 characters from the left of the screen. Conclusion - there are 9 characters for error "name" that are later followed by ERROR string. EDIT: Check from $A360, and yea, I remember there were longer error messages as well so... funny one.
@MrGoatflakes
@MrGoatflakes 5 жыл бұрын
We still put snowflakes on everything in Christmas here in Australia xD
@rjc199
@rjc199 5 жыл бұрын
That toy game looks really fun. That would have been a very popular and good selling game back in the day.
@10MARC
@10MARC 5 жыл бұрын
Interesting video! I never thought about those spaces...
@EVPaddy
@EVPaddy 4 жыл бұрын
So much fun. I abandoned my C64 at the beginning of 1987 when I got my Amiga. But I never dug that deep. But strange how memory works. I barely know my phone number, but still remember 53281, 53280, 64738 etc ;)
@BikeArea
@BikeArea 9 ай бұрын
Your much younger brain was much more able to learn and hardwire memories into itself. The older you get the harder you learn because nature assumes after a certain time i. e. after childhood you have learnt 90 % of all life supporting skills that shouldn't be changed or forgotten or relearnt. 🙃👀✌️
@rdoetjes
@rdoetjes 4 жыл бұрын
You have a knack of teaching! Even as a seasoned C64/6502 hacker I keep watching. And then at the very end my musican heart is also pleased with a nice original song. I think I enjoyed it more than your kids 🤪
@AlexanderKurtz
@AlexanderKurtz 5 жыл бұрын
i tested the 128mode via vice. the "normal" errors, like syntax error are corrected, so the just have on space inbetween. the break error has two spaces... so they just done one bugfix. the vic20 uses returns between... and i figured out, a basic line on the vic 20 can have 88 chars, or 4 screenlines (4*22) on cbm II the errors have one space and if you break a disk operation as load"$",8 you will get a ?file not found error. instead of break error... on a cbm 5x0 there is also the correct syntax error. and hit stop at load"$",8 brings a "?stop key detectet" message. the PET also have correct messages, and it seems u can't break listings, at least i can't do it in VICE using the ESC-Key the plus/4 behaves like the c128... I hope this little info is kind of interesting for you ;) well i tryed it all useing VICE Emulatior...
@8_Bit
@8_Bit 5 жыл бұрын
Awesome! I had tried some of this and have notes for a follow-up episode, but hadn't tried CBM-II, Plus/4. I was thinking of doing a little history of this bug, from the PET through the VIC-20, C64 and C128, as they kept re-using much of the code and just tweaking it slightly. Oh, I wonder if it's totally fixed in the C65? :)
@denismilic1878
@denismilic1878 4 жыл бұрын
Man, you are guilty of my decision to buy c64 ant recover my software written in assembler on my old types.
@TanjoGalbi
@TanjoGalbi 5 жыл бұрын
Instead of changing the A0 to 80 after BREAK you could instead change the 00 before the A0 to 80 and get the same result but have the routine read 1 less null character (which would add a tiny unnoticeable speed increase, not that it matters). So that's POKE 41864,128 instead of 41865 that you use. EDIT: You can save yet another null character from being read in the routine by adding the high bit to the K of BREAK with POKE 41863,203
@8_Bit
@8_Bit 5 жыл бұрын
Unfortunately, that prints "breaK" (if in lower-case mode) when STOPing a RUNning program. There's two different print routines using that same string: one expects null-terminated strings, the other, high-bit terminated.
@marcuslundblad6977
@marcuslundblad6977 5 жыл бұрын
I was always curious about those Basic-extending cartridges (like the one you used there, and things like Simon's Basic). How did they actually work? Did they "bank-override" the entire Basic, or patch certain parts, or was there actually some entrypoints for adding new commands provided by the stock ROM-code? Maybe an idea for an exploration video? And great channel, BTW! :)
@8_Bit
@8_Bit 5 жыл бұрын
Thanks, I added this to my list of video ideas. Which is... about 150 items long! But I'm not doing them in order, so who knows, it might happen sooner than later :) I'll have to study up on this more to know for sure, but my understanding is that most BASIC extensions use various hooks provided by BASIC.
@8_Bit
@8_Bit 5 жыл бұрын
Vectors at $030A or there abouts.
@NeilRoy
@NeilRoy 5 жыл бұрын
This really brings back memories for me. My favourite cartridge was the Super Snapshot 5 (in fact I think it was my first and only one I used). And I absolutely loved 6510 assembly, it was so easy to program. A great CPU to learn assembly on to be honest. I have a C64 along with a 1541 and 1571 in storage, I don't think they work 100%. I have my Vice64 emulator with SS5 cartridge ROM, so it comes up like my real machine used to . I loved how you could copy the ROM into the RAM. The reason why this happened which was not explained is because you could ONLY read from ROM, you could not write to ROM, so when you poked the same value back to the same location, it read the ROM, but because it is Read Only Memory, any writes to that location went to the RAM under it. Anyhow, this also works for all other ROMs like the character ROM because the C64 has the maximum memory addressable for 16bits, all ROMs are located above RAM. You could copy the character set, which many games did, and the redo the characters, which was a handy trick. I one time created my own custom 80 column text with 4bit wide characters (not the best, but it worked) for use with 80 column BBSes back in the day. I recall a nifty little program in one of the Compute! magazines (or Compute! Gazette) where you could use the hidden RAM under the ROMs as a temporary RAM drive to store small files (just don't power the machine off). Anyhow, nostalgia overload. :)
@TheHighlander71
@TheHighlander71 5 жыл бұрын
Hah..what a wonderful video. Over 3 decades of commodore experience here, and I've always found something to be wonky with the basic error messages. Never really looked close enough to figure out it was the spaces all along. In assembly I usually disable interrupts before changing the memory mapping, but in basic there's not really a way to do that. Could that be worked into the poke command itself perhaps?
@8_Bit
@8_Bit 5 жыл бұрын
Thanks, glad you enjoyed the video! Yes, in most cases when changing the memory mapping interrupts should be disabled first, but in this case I think it's safe to leave them as we're switching from ROM to the RAM underneath which has an exact copy of the ROM. The keyscan IRQ can be turned off in BASIC with POKE 56334,PEEK(56334)AND 254 as seen in line 20 of the custom character example on page 110 of the C64 Programmer's Reference Guide.
@gnustep
@gnustep 5 жыл бұрын
It is likely to save space in ROM. They are probably just inserting the type of error into a predefined.
@chromosundrift
@chromosundrift 5 жыл бұрын
Love it. For the record in most video editing software you can edit out audio and video separately, optionally extending silences or whatever to keep sync reasonable. So if you want to get rid of audio mistakes there are options - not that you need it! Your narration is perfect to my ear. Thanks from Australia.
@RamLaska
@RamLaska 5 жыл бұрын
Who, I had no idea the C64 had (something like) TSRs!! And the sprites don't slow down an iota while scrolling or executing programs! **Witchcraft**!!! :O :D (I mean, I know they're *hardware* sprites, but still. It's buttery smooth, on an 8-bit machine. Weird!)
@idealmobilecanal
@idealmobilecanal 5 жыл бұрын
Great channel! You deserve more views
@WarrenGarabrandt
@WarrenGarabrandt 5 жыл бұрын
So, could you change the rom, write it to an EEPROM, swap the chip in, and have a permanently fixed rom?
@8_Bit
@8_Bit 5 жыл бұрын
It should work!
@JMPurcell
@JMPurcell Ай бұрын
In the comments of one of your other videos, I believe you said this vid was your most downvoted. Like, WtH, Robin? What's wrong with youngsters these days? There's PLENTY to learn in this vid, and those extraneous spaces have been juicing my Type-A tendencies for 35-40 years. Now I can finally chill! In this case, at least, pay no attention to the naysayers. They be wack.
@TheUtuber999
@TheUtuber999 Жыл бұрын
Don't know why I ever typed-out "COMMODORE 64" in those "hello world" sample programs... 10 forx=828to853:readn:pokex,n:next 20 sys828 30 data 160,16,162,0,189,126,228,32 40 data 210,255,232,224,13,208,245,138 50 data 32,210,255,238,134,2,136,208 60 data 233,96
@markmeric8580
@markmeric8580 5 жыл бұрын
A fascinating insight and very well narrated. Love the outro song! A belated merry Christmas, and best wishes for the new year from a new subscriber :)
@fitfogey
@fitfogey 5 жыл бұрын
Those extra spaces always triggered me. Even at 13 yrs old decades ago! Thanks for showing what the deal was there. Great stuff!
@mikegarland4500
@mikegarland4500 Жыл бұрын
I'm probably doing something wrong, and braindead most likely.. Just for fun, I tried to do the copy to $c000 in the monitor for VICE for the C64, and it copied all the data from $a000 to $bfff just fine. Verified it by looking at it in the monitor. But it freezes the emulator, when I return back to BASIC.. it's just a black screen. But, using the FOR..NEXT loop to poke the values "back on themselves" from $a000 to $bfff worked just fine. Any idea why that Transfer thing wouldn't work?
@duckyvirus
@duckyvirus 5 жыл бұрын
not only did you get me INTO the C64 way back then you keep me going. i'm sure you're beyond sick of hearing from me with random messages, but these videos are great! keep em coming I learn something new or long forgotten each time.!!
@jakubkrcma
@jakubkrcma 3 жыл бұрын
BTW: It sounds like a great idea to fix all C64 design mistakes but in the back of my mind I know there are crazy programmers out there fully relying on some of those mistakes to produce code otherwise impossible... :-))))))))))))))))))
@martin_soerensen
@martin_soerensen 4 жыл бұрын
Now this isn't a new video but I didn't notice your great channel before recently, so it is new to me. :-) I know that several people already mentioned that the double spaces was likely a leftover from the VIC, but I found a comment in an official C= ROM listing that verifies that. The line in question states: '00470 A369 20 ERR .BYT $20,' ERROR',0 ;ADD A SPACE FOR VIC-40 SCREEN'
@Jdvc-yd5tx
@Jdvc-yd5tx 2 ай бұрын
Am I missing something here? How did you get the snowflakes falling whilst you work? That is true multi-tasking.
@mechaform
@mechaform Жыл бұрын
Hoping the new (to me) breadbin will fire up and let me pick up where I left off in the 80s. Here for my daily C64 lesson. Now that you have verified these patches, do you ever plan to burn a new EPROM so that they will always be active?
@MartinFarrell1972
@MartinFarrell1972 4 жыл бұрын
It's January 2020 and I had a commodore 64 Christmas. Before Christmas I bought the new 2019 with built i games but was more interested in basic. I have an old commodore 16 which, although limited, had better basic. I'm going to try your hacks for the Ready. statement
@larswadefalk6423
@larswadefalk6423 2 жыл бұрын
Challange to Robin, make them snowflakes at least 48 ones, I think it would be not too difficult. With a nice sort multiplexing algorithm. Basically some sorting work.
@3D-PHASE
@3D-PHASE 5 жыл бұрын
Some people seem having too much time lol. Nevertheless very funny and interesting. Thanks :D
@youuuuuuuuuuutube
@youuuuuuuuuuutube 3 жыл бұрын
Maybe they're not bugs, something I like to do in my code is make some messages more visible than others, an error would be such a message. So, having 2 or 3 spaces in front would certainly make the error pop out more. Also the fact that those errors are aligned to the same column makes reading easier, which is also something I'm doing a lot. The reason I don't think it's a bug is because 1) they're extremely easy to fix, and 2) those messages are extremely frequent. So the best explanation is that this was done by design.
@the8bitbarn836
@the8bitbarn836 4 жыл бұрын
Wow cool video! It made me realize I was 16 when i got my C64 Christmas in 1983! But I felt the same way about it (Good Memories!) ☺!
@12...
@12... 5 жыл бұрын
Hmm I bet they could've saved more bytes by not using the table of pointers, and instead searching through the error message table until they passed a certain number of characters with the high bit set. slower, of course, but for printing error messages it wouldn't matter anyway
@Oli1974
@Oli1974 4 жыл бұрын
My question is if that would introduce any compatibility problems if you patched that permanently in the ROM.
@jakubkrcma
@jakubkrcma 3 жыл бұрын
I could watch stuff like this forever. My youth back in late 1980s... Aaaaaaaaaaaaaaahhh...
@janklingel5662
@janklingel5662 4 жыл бұрын
Oh Lord, what has become of me? Here I ‘am, lying in bed and watching somebody on his mission to fight the sinister spaces. And while the fight comes to an end, good prevails eval, the wizard shines in his glory, I ‘am slowly closing my eyes, drifting away with a last tender smile on my face.
@robertlock5501
@robertlock5501 Жыл бұрын
Hahha - you should consider doing the sport coat thing XD Also, it would be great to have a follow-up with the history of these "bugs".
@MiccaPhone
@MiccaPhone 3 жыл бұрын
Can you program a new Basic altogether this way, e.g. a slimmer basic that leaves more space for the program than 38911 bytes?
@KelvinW344
@KelvinW344 4 жыл бұрын
Why didn't they use a special character that the error printing routine recognized and printed the word "FILE"?
@MrKillerRichie
@MrKillerRichie 3 жыл бұрын
Watching this in 2021 - nearly forty year old riddle revealed and patched, now i can die in peace. Thank you! :D
@samhoward8909
@samhoward8909 3 жыл бұрын
Loved seeing the basic rom poked into RAM. Is that an intentional “bug” made my commodore? Awesome.
@roygalaasen
@roygalaasen 5 жыл бұрын
If I remember correctly, when you wrote to a ROM address, you would write to the underlying RAM instead. This means that you could read from the ROM and write the byte back into RAM without any bank switching. Then when you copied the whole ROM into RAM, you could just switch the ROM out for the RAM.
@8_Bit
@8_Bit 5 жыл бұрын
Yes, that's exactly what I'm doing at 25:20 or so.
@roygalaasen
@roygalaasen 5 жыл бұрын
8-Bit Show And Tell oh yes, there it is! I think I watched to 20 something minutes before I had to go, but I did assume that it was exactly the thing you were doing.
@markevans2294
@markevans2294 4 жыл бұрын
Interesting to discover that the C64 effectively has "shadow RAM".
@bloodmapedit
@bloodmapedit 3 жыл бұрын
@36:38 Did you ever get the remaining 4 kb..... for christmas? ;)
@DreanPetruza
@DreanPetruza Жыл бұрын
My dear Robin, not all of your southern hemisphere followers are Australians, one from Argentina here.
@henkeboy1317
@henkeboy1317 2 жыл бұрын
Does the POKE 1,PEEK(1) AND 254 restore after runstop/restore?
@samcoupe4608KB
@samcoupe4608KB 5 жыл бұрын
manic miner on the zx spectrum with +d hacker loaded that can view ram as graphics...
@andysimpson8974
@andysimpson8974 2 жыл бұрын
Wasn't Two Prints a song from the 90s by the Spin Doctors?
@christianknechtel8683
@christianknechtel8683 5 жыл бұрын
Great vid ,man! Will there ever come a video about scrolling,using the raster-irq?
@8_Bit
@8_Bit 5 жыл бұрын
That's a good idea, I"ll put it on my list!
@dezeekat
@dezeekat 5 жыл бұрын
wait this is not 8-bit guy??? :O
@8_Bit
@8_Bit 5 жыл бұрын
No, but I've been on his channel!
@robinbrowne5419
@robinbrowne5419 2 жыл бұрын
Cool Christmas song. I'm glad you finally got your 64 wish 👍
@Jdvc-yd5tx
@Jdvc-yd5tx 2 ай бұрын
'I had to go have a sandwich break'. I go out and mow the lawn.
@Jdvc-yd5tx
@Jdvc-yd5tx 2 ай бұрын
This is like watching the O.U. [Open University] on BBC 2 back in the 80s - it's 4am here. Did you know that &4B534154 is TASK spelled backwards? 🎒 🏫 🚸 🖋
@fnjesusfreak
@fnjesusfreak 5 жыл бұрын
I'm going to say it probably has to do with the VIC-20 which has before the space. On the Apple //e, you have " ERROR" followed by Ctrl-G (bell) and null at D350.
@tredI9100
@tredI9100 3 жыл бұрын
Case: apple // Startup: APPLE ][
@mikegarland4500
@mikegarland4500 Жыл бұрын
The video at the end was classic! I got mine in 1982.
@misterhat5823
@misterhat5823 5 жыл бұрын
But... You never explained why Commodore did the two spaces (for everything but break) thing.
@Haldrie
@Haldrie 5 жыл бұрын
Check the top comment by Brutikus Red I think he does a good job explaining it.
@AxelWerner
@AxelWerner 2 жыл бұрын
Your kids like: what is the old man so excited bout?!
@douggale5962
@douggale5962 5 жыл бұрын
You explained it perfectly.
@svenpetersen1965
@svenpetersen1965 4 жыл бұрын
You can definitely sing better than me :-)
@JustWasted3HoursHere
@JustWasted3HoursHere 3 жыл бұрын
It makes me wonder how different things might have been if the Commodore 64 had included something more feature-rich like BASIC 7.0 (or even 3.5!). Then again, the REAL programmers all used ASM so it's a moot point 😋
@8_Bit
@8_Bit 3 жыл бұрын
A better built-in BASIC probably would have meant more hobby programmers creating a larger body of somewhat better BASIC software. But I don't think it would have changed much in the commercial game market because ASM was always going to be necessary to push the machine to its limits. As nice as BASIC 3.5 and 7.0 are, they're still slow and not up to making commercial quality games (except maybe slow-paced strategy/adventure type games).
@JustWasted3HoursHere
@JustWasted3HoursHere 3 жыл бұрын
@@8_Bit True. But what if a built in compiler (not p-code) had also been included? 🤔 And the Programmer's Reference Manual? And "Mapping the C64"? And...
@TheUtuber999
@TheUtuber999 Жыл бұрын
22:25 Classifying this as a bug implies that the implementation was unintentional. However, that might not necessarily be the case. I would postulate that the decision could have been made to have "BREAK" terminated with a null character, followed by $A0, since it would eliminate the need to take up additional space by adding it to the table of high bit-terminated strings, with the caveat of having additional space taken up on-screen. Without insight from the developer, it's anyone's guess as to intent.
@8_Bit
@8_Bit Жыл бұрын
Seeing as it's possible to eliminate the extra space by modifying a single byte (as I show later in the video), and that neither the PET or VIC-20 display the extra spaces even though the C64 ROM was very directly derived from them, I'm going to continue calling it a bug. I'm not very agreeable to the idea that the developer's intention is the main factor in deciding whether something is or isn't a bug. If that were the case, I could declare all the code I've ever written to be bug free by simply stating that's how I meant it to be.
@TheUtuber999
@TheUtuber999 Жыл бұрын
@@8_Bit I understand your point, but if anything I would consider it to be a cosmetic imperfection rather than a bug. A bug breaks something.
@SuperJavabean
@SuperJavabean 4 жыл бұрын
wasnt using sprites for animating the snowflakes a lot easier ?
@blaizejosh
@blaizejosh 5 жыл бұрын
The ?BREAK ERROR was a fix to the Commodore 64 and 128 from pressing the RUN/STOP key constantly to get a BREAK, after loading a file from cassette or disk. The ?BREAK ERROR resets how many times the LOAD command was being used. The Commodore PET/CBM had a glitch, that if you kept pressing the SHIFT key & RUN/STOP key over and over around 50 or 100 times of getting the message "PRESS PLAY ON TAPE #1" and "BREAK", you would get an ?ILLEGAL QUANTITY ERROR for the 8K PET Computer 2001 Series or a B* Monitor Machine Language prompt for other Commodore PET/CBM computers. The Commodore PET/CBM computers just used "BREAK" instead of the "?BREAK ERROR". The Commodore PET/CBM computers did not use two spaces for an error message. I wonder what the cause of this RUN/STOP LOAD glitch is about for the Commodore PET/CBM computers?
@8_Bit
@8_Bit 5 жыл бұрын
Very interesting, I hadn't heard some of these details before. I've been planning an episode about the history of these errors from the PET on, and how the extra spaces came to be. This may be an important part of the puzzle, thanks. Did you have any sources for this info?
@blaizejosh
@blaizejosh 5 жыл бұрын
@@8_Bit I discovered it when I was an eight year old kid, when my mom use to have a Commodore CBM 2032 Series. I would play around and press the RUN/STOP key over and over again. An error of some kind would reset how many times the LOAD command was used. In the B* Monitor Machine Language prompt I would play around and press G and RETURN over and over, until it either crashed or escaped the B* Monitor Machine Language prompt.
@TanjoGalbi
@TanjoGalbi 5 жыл бұрын
For anyone who wants the 'fix' in a more elegant form here it is: FOR X=40960 TO 49151: POKE X, PEEK(X):NEXT POKE 1, PEEK(1) AND 254 POKE 41865,80 POKE 42086,106 Edited note: I had originally used POKE 41863,203 to get the error routine to end at the K of BREAK but as you can see in his reply it prevented another routine from displaying BREAK correctly, it would still have worked it's just that the K would have been a different character because of the high bit being set :)
@8_Bit
@8_Bit 5 жыл бұрын
I didn't use that approach because the BREAK word is used by two different print routines - one expects BREAK to be 0-terminated, the other uses the high bit. So your patch prints the shifted-K when breaking out of a program. Just do 10 GOTO 10, then RUN, then hit the STOP key and you'll see.
@TanjoGalbi
@TanjoGalbi 5 жыл бұрын
@@8_Bit Ahh, so there would be missing information in your video then. It would have been informative to include that information in the video to prevent others making the same mistake I did from just using the information given :)
@antwakefield
@antwakefield 4 жыл бұрын
Nice call out to us Aussies! Not many seem to realise we are in a completely different season.Love watching you videos man!
@8_Bit
@8_Bit 4 жыл бұрын
I lived in Perth, WA for one year in 1987 so that helps me keep a more global perspective :) Thanks for watching!
@edabean007
@edabean007 4 жыл бұрын
when you do "?fre(0)+65536" to see how many bytes are free. it will print an extra space. i always wondered why the 64k ram system 38911 basic bytes free had 2 spaces in the middle. i would check to see if its the same thing as the extra break space but i'm not smart enough :D
@8_Bit
@8_Bit 4 жыл бұрын
Yes, C64 BASIC prints a space in front of all positive numbers; I haven't disassembled the code but it doesn't leave the space for negative numbers, so I'd guess the code is printing a minus for negative numbers and a space instead of a plus sign for positive numbers. You can simply "?1" and "?-1" to see the formatting. The extra space can be annoying but usually can be worked around. For the two spaces after "64K RAM SYSTEM" it seems that was a deliberate formatting choice, so there's one blank space on each side of the screen. The two spaces are directly embedded in the null (0) terminated string in the KERNAL ROM: >C:e49b 36 34 4b 20 52 41 4d 20 53 59 53 54 45 4d 20 20 00 "64K RAM SYSTEM " Thanks for the comment :)
@edabean007
@edabean007 4 жыл бұрын
@@8_Bit Thanks for the reply. i just watched your all 32 basic errors video and in the formula too complex part, you just explained to me that c64 basic wraps spaces around numeric values. i am really enjoying you channel. thank you for taking the time to explain things to us "lamers". 🕹️
@carnright
@carnright 4 жыл бұрын
Very cute song! My first pc was a VIC-20. I had always thought that after you had access to assembly you no longer needed peek poke. I guess that is true but peek and poke are a lot easier to use in some cases 🙂
@antonnym214
@antonnym214 5 жыл бұрын
Excellent work, Sir! I programmed in Z80 assembly, so this makes good sense to me. You do a nice job of explaining everything you're doing. i have subscribed. All good wishes!
@DavidYoud
@DavidYoud 5 жыл бұрын
Great channel Robin! I just subscribed. :) A few years back, someone named palordrolap gave the following explanation for the two spaces on reddit: ------------------ Commodore BASIC V2 is the same dialect of BASIC that was on the VIC-20, and the interpreter was pretty much ported wholesale from one computer to the other. Note that there's nothing specific to either machine in the BASIC language itself, so only minor changes were required. Now, the VIC-20 had a 22 column screen, and so on that machine, while errors like ?SYNTAX ERROR could have fit neatly on one line, some would not... so the VIC-20 printed a carriage return immediately before the space. ?SYNTAX ERROR See how that lines up? On the '64, plenty more line real estate was available, so the carriage return was superfluous. Since removing a byte from the ROM could be troublesome and require branch recalculations and other things, it seems that the (lazy?) decision was made to replace the carriage return with a harmless space.
@8_Bit
@8_Bit 5 жыл бұрын
Thanks David! I think this explanation makes perfect sense. I've had a follow-up video planned for some time, but I keep getting side-tracked with other ideas :) I'll try to get to it soon.
@espenskog8745
@espenskog8745 2 жыл бұрын
Great video! Keep up the great work.
@TheGodOfAllThatWas
@TheGodOfAllThatWas 5 жыл бұрын
Is the Lynx the Device of choice for the perfect child, or is there a better reason that only 1 of your kids chooses awesome portables?
@JohnnyLutz
@JohnnyLutz 5 жыл бұрын
Dawg, you need some retrobright. word.
@8_Bit
@8_Bit 5 жыл бұрын
Believe it or not, that's actually the least yellowed of my six C128D keyboards! I mentioned last episode that I do want to try retrobrighting it, but I don't currently have the means to try that indoors, and we're getting deep into the Canadian winter here, so it'll probably have to wait until summer.
@putrid.p
@putrid.p 5 жыл бұрын
Great video, thank you. I love the song and the reactions! How does the snowflake program work?
@8_Bit
@8_Bit 5 жыл бұрын
Thanks Ed. I've had quite a few people interested in the snowflake program, so I'm thinking about making a video to explain it. But basically it's interrupt driven, so 60 times a second the BASIC environment is interrupted and runs my custom code which moves the snowflake sprites down the screen, and when they hit the bottom, a new snowflake pattern is generated and placed at the top of the screen again. The snowflakes are basically just a random 8x8 pixel in the top left of each sprite, which then is mirrored and flipped into the other 3 quadrants of the sprite.
@tredI9100
@tredI9100 3 жыл бұрын
@@8_Bit I've noticed that there are no more than 8 snowflakes present at once. Using the VIC-II's hardware sprites, by any chance? (lol)
@cosmicrdt
@cosmicrdt 5 жыл бұрын
Just discovered your channel. Liking what I see, subscribed and I hope you get more subs!
@insertaverygenericnamehere
@insertaverygenericnamehere 5 жыл бұрын
37+ Minutes about spaces 👍🏻
@111utoobmetoob111
@111utoobmetoob111 5 жыл бұрын
Woo hoo! 8-Bit Guy is Canadian!
@neviemdopice
@neviemdopice 5 жыл бұрын
I thought the first part of the error messages were simply fixed-size strings. But no! much more complex than that. I enjoyed the video! ;-)
@tomlake2732
@tomlake2732 5 жыл бұрын
The error message is a fixed-width 8-character field.
@tomlake2732
@tomlake2732 5 жыл бұрын
That was a programmer joke for those who aren't programmers!
@hugoegon8148
@hugoegon8148 Жыл бұрын
Very interesting. 👍🏼
@koningbolo4700
@koningbolo4700 5 жыл бұрын
snowflakes wunderbar but how ironic that between Syntax and Error there are two (safe) spaces...
@Meganarb
@Meganarb 5 жыл бұрын
Dope video, I love errors and stuff in retro tech! Very cool, and I'm glad to see more Canadian youtubers, especially for retro tech! Keep it up!
@paulwratt
@paulwratt 5 жыл бұрын
thanks for this, now I know how to hack basic :) looking forward to the follow up with the PET.
@rolandgerard6064
@rolandgerard6064 5 жыл бұрын
Great channel 👍😎
@FaberX
@FaberX 5 жыл бұрын
Loved this, great insight, kick ass song and your kids face was the cherry on the top! Happy new year!
@madyogi6164
@madyogi6164 3 жыл бұрын
COOL SONG AT THE END!
Optimizing With Integers in Commodore 64 BASIC?
22:10
8-Bit Show And Tell
Рет қаралды 22 М.
Commodore 64 REU (RAM Expansion Unit) & SID Random Numbers
40:31
8-Bit Show And Tell
Рет қаралды 47 М.
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 12 МЛН
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 3,8 МЛН
Exploring Epyx Fast Load for the Commodore 64
42:41
8-Bit Show And Tell
Рет қаралды 77 М.
10x Faster Than C64 BASIC? Hare Basic
48:01
8-Bit Show And Tell
Рет қаралды 33 М.
The c64 maxi - 10 things of interest
20:13
YaggieBoat
Рет қаралды 13 М.
Even More Commodore 64 BASIC Optimizations
18:16
8-Bit Show And Tell
Рет қаралды 14 М.
Live: #RIPJAY OC World Record Attempt #RIPPAUL
3:28:23
Gamers Nexus
Рет қаралды 404 М.
Exploring the SuperCPU Accelerator for C64
29:13
8-Bit Show And Tell
Рет қаралды 106 М.
Exploring TheC64 "Maxi" Full-Size Commodore 64 Replica
44:52
8-Bit Show And Tell
Рет қаралды 120 М.
Fixing a Bug in Rodnay Zaks' "Programming the 6502"
43:38
8-Bit Show And Tell
Рет қаралды 22 М.
8-Bit Book Club: Mapping the Commodore 64
45:34
8-Bit Show And Tell
Рет қаралды 22 М.
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26