The Killer POKE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

So much work behind this clip. I love it.

👍︎︎ 1 👤︎︎ u/mi_to__ 📅︎︎ Apr 30 2020 🗫︎ replies

Are there any other pokes that could actually fry the innerds?

👍︎︎ 1 👤︎︎ u/[deleted] 📅︎︎ Apr 30 2020 🗫︎ replies
Captions
this is my commodore pet 40:32 it is the second major design of the pet that was originally released in 1977 one thing many pet owners and vintage computer enthusiasts in general may know is that the pet has something called the killer poke if you aren't familiar with it it is a command that has reached the point of legend as being able to swiftly and assuredly destroy your computer when you run it old software was designed intentionally using it making loading each new program a game of Russian roulette now because you never know when you may accidentally run into a killer poke that command is poke five nine four five eight comma six - but here's the thing if you run it it looks scary and is obviously not normal but it's not really the killer that it has been made out to be in this video I'm going to show you exactly how this works what it is doing and put to rest the myth that this poke kills [Music] before we get to that though this video was sponsored by Linode Linode is a Linux server hosting service they let you run a virtual machine on a physical server with options to configure however you want through remote access you can remotely log in using the SSH clients built into Linux Windows and Mac or use the web console if you need more direct control I've been using Lou nodes $5 month a node tear since 2018 to host my own website and a few discord bots getting it installed was easy as they provide ready to go distributions you can load up and get running quickly they also provide one-click setups for popular software configurations like lamp gitlab or WordPress and something that I personally like that Linode offers are a bunch of free guides and how to set up and configure your server they have anything from setting up a minecraft server to configuring Apache virtual host files so there's a lot of good stuff in there if you want to try out Linode which I would recommend as a paying user then you can use the link in the description to get a twenty dollar free credit which would give you about four months for a service like mine now let's get back to it when the Commodore pet first came out in the late 1970s it was one of a handful of computers being introduced to the home market for the first time the different choices you had between computers focused on price software and features and not really performance there just weren't faster versions of any of the computers you could buy this meant if you wanted better performance you had to buy or write more efficient software so when new ways were discovered that could potentially make your existing programs faster everyone with that computer would be interested magazines were one of the most popular ways to learn new things about your computer like what hardware or software was being announced and it was common for them to have full source listings of programs as well computers then nearly universally started up to basic letting you begin immediately writing software without other development tools or traditional software training this led to a flourishing community of software information being exchanged and when ways to speed up your programs were discovered they were shared this is how the killer Polk started but not as a way to damage unsuspecting users computers it was a speed boost but there wasn't a complete understanding of how it made the computers faster let's start out by taking a look at killer poke from the software side a poke is a command that allows you to directly write to memory the compliment to it is a peek which allows you to directly read from memory both of these commands take a memory address that specifies which data you'll be working with in RAM when you run a peek it retrieves the data at that location if you can access it when you've run a poke you use a second value which will be written to the memory at the given address doing this would allow you more direct control over the system like changing the location the cursor to let you print anywhere on the screen but you would need to know what the different memory locations are for them to be meaningful because they're ambiguous in arbitrary numbers it was possible to get a book like this one and tried to look them up directly but many people would have learned about new pokes from magazines without the full understanding of how they've worked do you need to know why poke five nine four six eight comma fourteen makes the characters lowercase it changes the state of via pin 39 port a output tube connected to the a-10 address bit of the character ROM but does knowing that helped you at all probably not so most people didn't worry about it this is what happened with the killer poke likely the lowercase characters command it temporarily changes something in the computer in the result was that the computer could print faster there were no significant side-effects in the original pets so why this worked wasn't a concern but understanding what it changes is crucial to understanding the killer fear of the killer poke at the electronics design level the Commodore pet is a simple computer that can be broken down into a few core elements including the CPU io interfaces display memory and the monitor the CPU runs code and controls the memory it also uses the i/o interfaces to talk to other parts of the computer and other devices the way the monitor works with the video memory though is the critical component to understanding the killer poke but you need to know how a CRT works I've talked about this somewhat in my VJ capture video but more detail is needed here a monochrome CRT like this has three basic controls video in horizontal drive and vertical drive CRTs work by moving a dot generated by an electron beam around the screen with magnetic coils when the video signal sends a our voltage the beam becomes more intense making the dot brighter and lower voltages make it darker vector screens like this oscilloscope move the beam based on an analog signal and literally draw on the tube through a combination of speed and a persistent phosphor coating on the tube movements can blur together faster than you can see with your eyes a computer monitor like the pet though displays an image broken down into lines through a process called rasterization lines are drawn from the top to the bottom even if the video signal is off and the dot is not active the display driving circuit is still moving a dot through the lines these lines also extend beyond the normal viewing area allowing for a blank space to ensure the intended image fits on the screen instead of controlling the lines with analog signals the display driving circuit here handles the beam movement and accepts syncing signals these control when to move the dot to the next line and when all the lines should begin again in the VGA video I mentioned how VGA is nearly a direct control over the CRT interface but in the pet the CRT driving circuits are not directly controlled through a video interface and instead run independently the horizontal line and vertical sync signals are generated automatically by the display logic instead of sending video data the display memory in the pet is shared between the CPU and the CRT driving circuits but there was a potential problem with the way the CPU and monitor interact with the shared video memory it could arise if the CPU tried to write a character as the display was trying to read it if this happened the end result would be minor resulting in an unpredictable value being read from the memory so as a workaround for this issue commodore made it so that the kernel could only write to the display memory during the vertical blank periods outside of the visible area of the screen a signal was sent from the display circuits to one of the i/o chips that would be high while the visible area was being drawn and low during the blank parts if it needed to print the CPU would keep reading the i/o chip and wait until it was low meaning the display memory was free to be written to and now we finally get to the original reason for the killer poke io pins are typically configured to be either an input or an output by software by default the blank signal pin was an input but the killer poke changes it to an output with a low state the same CPU command that checks for the low blank signal will now always see the low output state and believe the display memory is free to be written to this bypasses the wait to print to the screen with the side effect that some writes will produce snow but other than that there were no significant drawbacks programs like games that needed to draw to the screen frequently would benefit from not being held back by the memory access prevention at this point it would be nice to see how much faster this really made the original pet 2001 models but I don't have one that I can try it on so I reached out to Adrian from Adrian's digital basement who does and he's gonna help me out by running some tests on his pet as well as going over some other things in a bit but first let's take a look at how that poke works on my pet 2001 this is the same pet 2001 you've seen in my previous pet restoration videos and it's completely a bone stock machine with no modifications other than that I added heatsinks on to various chips Shelby wrote a short test program that we're going to use to see how fast it displays some text on the screen let's load that what Shelby's program is going to do is print a bunch of text on screen as it's doing now and it's gonna count up the amount of time it takes to display it all I'm gonna run it three times and then we'll take an average over the results and we'll use that as the baseline stock performance of this machine as you notice there's no snow here although there is this flashing which is normal for these pets whenever the screen Scrolls but no snow otherwise 1459 ticks we'll run that a second time we got the same result 1459 ticks and one more run 1459 ticks we got the same exact performance for all three runs let's try out the poke and see what happens when I hate nothing should happen at all except the performance of the computer should be increased by potentially to X so all looks normal on the computer if I type some letters on here everything seems to be pretty much normal but if you noticed when I hit Enter there was a little bit of static there you see that you might not be able to see it very clearly on the camera but definitely there's a little bit of static that displays as it updates the video memory let me load Shelby's test program and there it goes now you see the static display in here as it Scrolls but you can right always see how much faster it's running right now than it was the first time so we got seven hundred and four ticks with the killer poke engaged this is compared to fourteen hundred and fifty nine last time around let me run this three times just to get a consistent reading seven hundred and nine ticks and the final result is 709 ticks and when we average all three on this second run we get seven hundred and seven ticks so with a simple calculation we can see that we have a hundred and six percent speed increase by doing this killer poke and honestly the side effect is just some slight static seems like a small price to pay now it is important to distinguish here that the faster performance only allowed the computer to draw faster actual computations took the same amount of time so program like this prime number finder I wrote wouldn't see a very significant improvement with the poke since it spends much more time doing actual math than it does writing to the display memory but games and other visual software would have been much faster the earlier pets were all fine with this workaround because they were all built the same way but ultimately this was a happy accident and not a feature when Commodore redesigned the pets in 1980 they simplified the display circuit with a CRT controller chip that would do the same job reducing production costs the timing for the way the CPU writes to the display memory was also changed because the memory speed had increased now you had the same speed advantage all the time as the previous models did with the poke these changes eliminated the need for the poke but this wasn't advertised so new software would still be made with it and there was still all the old software that used it and the old that benefited from it unfortunately it was also still possible to run the same poke command on the newer pets but the circuit connected to the i/o pin was significantly redesigned the pin was now connected directly to the vertical sync signal coming out of the new crtc chip instead of the blinking signal a signal was still needed there to give the CPU a 60 Hertz timing reference relative to the screen drawing what happens when you set the output low now though is where this gets messy the i/o chip the CPU uses will sync about 1.6 million of current when it is in a low state that is to say conventional current will flow into the chip when you run the killer poke it causes some of the current for the vertical sync signal to flow into the i/o chip which reduces its voltage the lower voltage vsync signal then goes off into the CRT circuits even though this is a digital signal the CRT circuits are all analog so everything that happens based on the vertical sync signal will now have a reduced voltage the biggest impact of this is that the display shrinks vertically we can see why this is happening at a test point right before the vertical deflection coil normally there is a large charge followed by a downward sweep as a trace moves from the top of the CRT to the bottom but the lower voltage vsync signal causes the charge to be much lower in the sweep to be less intense so it doesn't travel as far this is what causes the shrinking but the thing is that's it that's all it does the killer poke the feared pet smoke generator just shrinks the display vertically but surely you ask there must be more to it well this could have other side effects like the bottom of what is displayed is now too bright and will burn in a line if left like that and this unusual signal may not allow some parts to fully charge in discharge like they are designed to but here's something else you may not know about the killer poke there haven't been any pets killed by it or at the very least there haven't been any documented looking back to the time of the pet now it's hard to find much real info on the killer poke without scouring hundreds of pages of old user group documents but what little info I have been able to find barely mentions even potential damage of run the poke and even in the age of the Internet I can't find any posts about a pet that has been ruined by the killer poke so there aren't even any examples where we could see what parts would fail on a poke that killed a pet now of course I could let it run on my own pet and see what smokes but is that actually a fair test if you saw your pet do this wouldn't you turn it off immediately the display is illegible with the improper vertical deflection so it's not like you can accidentally use it like this instead I sought out some help Andre who wrote one of the more in-depth original looks into the killer poke that has been key for making this video and I have been asking around for input on what could happen based on observations we have made we can say that any damage is most likely to happen to the CRT driving circuits and after getting multiple responses from people who are more familiar with CR T's it really seems like it's not likely to cause a problem or at least not caused a problem in a duration of time that anyone would leave it running like this so I would say the killer poke myth is busted oh well yeah okay there is one caveat to this and I'm gonna pass the reins back to Adrian for that let's try out the poke and see what happens when I hit enter nothing should happen at all except the performance of the computer should be increased by potentially 2x but something's wrong when I do this poke on my pet I actually get a black screen and the only way for me to recover out of it is to power cycle the machine so this is very unusual it doesn't work on my pet like I mentioned before this machine is completely stock and unmodified and this is definitely the right poke and it should work on this machine so to understand that better let's take a look at this schematic so to better understand what actually is going on when you issue this poke command the relevant pin we're dealing with is pin 15 otherwise known as PB 5 if we take a look at the signal on the oscilloscope pulses are occurring 60 times a second that are perfectly in line with the vertical refresh of the monitor issuing this particular poke actually changes pin 15 from an input to an output and it also sets it to be though or ground it and what that has the effect of doing is whatever signal is on this line here labeled sync is now gonna be grounded through the 65 22 let's follow the sync signal back to the source to see what exactly is being grounded we follow it over to here to this Junction and up to this chip right here which is a 74 LS o 8 pin 8 is the output of that gate and this is the signal that is getting grounded by the 65 22 when we issue the killer poke you'll notice here it's labeled video on this has two functions both to generate that 60 Hertz sync signal but also to control whether the CRT is on or off what that means is while the monitor is doing its vertical sync 60 times a second it actually briefly turns off the picture I mentioned before that this poke is well known to work on these machines so my particular machine is somewhat of an outlier now I can't say for sure if it ever worked on this machine or not but it does seem like a bad thing to do to one of these pets you are literally shorting that 7408 to ground which can't be good for that chip perhaps over the lifetime it's machine the killer poke was used a lot which damaged that 7408 I won't know for sure the voltage drop on the video signal there is similar to what happens on a pet like mine but on most 2001 pet models it isn't an issue the signal voltage would be reduced but the pets before the CRTC were used had another chip that would buffer the signal before it was sent to the analog CRT components as long as the signal stays above the logic threshold the buffer will output the same signal again at 5 volts it seems like something may have gone out of spec on Adrian's pet it could be the i/o chip syncing too much current lead 74 LSO 8 may have a weak output or the logic level may be higher on the buffer chip this could be indicative of a possible failure point on pets the Polk was used on this is definitely not what the original concern was for the killer Polk but I would say it's a good enough reason not to use it on older pets if you were curious this problem along with all the other killer poke related issues would have been avoided if a resistor had just been placed here in front of the input pin with the right value you could significantly reduce the amount of current syncing but still measure the signal but this pin wasn't that special so they would have either done this to all of the pins or none and since cost was king at this time every savings opportunity would have been taken for now though if you want the speed boost on a 2001 but not risk the lower voltage you can lift the pin on the i/o chip and connect it to ground through a resistor this was how Adrian got the speed boost working on his pet earlier and he's going to have a video on his channel talking more about it in any case though the killer poke isn't going to instantly destroy your pet so it doesn't need to be feared as much as it has been it gives you plenty of warning so you pretty much have to try to damage your pet with it if you even can and if you run across the program with it that you want to run and it's written in basic you can just delete that line and the program should run perfectly fine afterwards I hope this detailed look into the killer poke helps clear the air about it when I first got my pet I read up about it and was terrified I might accidentally damage my pet by running a killer poke on it so much so I set up a workflow to scan programs for that line so I could be sure that they were safe while trying yet still to work on a different video project with my pet I finally ran into my first program with a killer poke in it without knowing beforehand and it was a word processor of all things that definitely did not need a speed boost but it scared me into making another attempt at researching it and this video was the result now I feel a lot more confident about not being concerned about the killer poke I want to thank Andre for his original write-up on the killer poke it was instrumental in trying to get closer to an answer of what happens and I also want to thank Adrian for helping me out with the video you should definitely go check out his channel Adrian's digital basement and I want to give a shout out to the people who helps by taking a look at the CRT schematics they were all great help in coming to the conclusion that the killer poke really isn't I'll be back with more soon so may want to subscribe and if you want to support the channel I am on patreon but for now that's it and I'll see you next time as we run out the end cards I want to note you shouldn't take this as a carte blanche to run anything on your pet there are still other programming compatibilities out there especially with the machine language software like this copy of space invaders that completely messes up the CRTC sync signals this is pretty much why we stopped writing assembly for everything and created BIOS and operating systems
Info
Channel: Tech Tangents
Views: 73,748
Rating: 4.9259787 out of 5
Keywords: Tech Tangents, AkBKukU, main, computer, 1980s, ee
Id: 7bMJ0NIuWU0
Channel Id: undefined
Length: 21min 16sec (1276 seconds)
Published: Wed Apr 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.