HCF Reverse Engineering BIOS from IBM PC

Поділитися
Вставка
  • Опубліковано 13 вер 2024
  • Clip from Halt and Catch Fire episode 1, reverse engineering proprietary BIOS code from IBM PC

КОМЕНТАРІ • 118

  • @jaedaens
    @jaedaens 8 років тому +94

    Gordon reminds me of my dad so much with his 80s beard and glasses, intelligence, and certain mannerisms. Miss you, dad.

  • @PimpMatt0
    @PimpMatt0 9 років тому +101

    This scene is what drove me into this show.

    • @migueld2456
      @migueld2456 2 роки тому +2

      Same!!!

    • @patluvsvettes
      @patluvsvettes Рік тому +3

      Yep! I work in I.T. and HACF is my all-time favorite show! I've watched the entire series four times now, and plan to again.

    • @tempsanity
      @tempsanity Рік тому +1

      @@patluvsvettes watching it for the third time at the moment, haha

  • @Vkusnodonis
    @Vkusnodonis 2 роки тому +29

    It amazes me that there are people who watch this and actually understand the technical aspects of scenes like this. I just watch HACF for Lee Pace 😂

    • @ibrahimkayikci2146
      @ibrahimkayikci2146 Рік тому +5

      I'm one of those guys who spent years in studying electrical engineering and some other years in software developing. Trust me, the most resonating part wasn't all the electronics and coding, but it was the last part of this video 😂

  • @xPixelDreams
    @xPixelDreams 4 місяці тому +3

    I started watching this show a week ago. This is the scene that got me to continue it lol.

  • @captainjava1
    @captainjava1 2 роки тому +18

    Commenting as a novelist and computer scientist and of these characters' generation: the dramatic inspiration for the reversing engineering storyline was Tracy Kidder's Soul Of A New Machine (and I drew on the same book, with acknowledgment, for one of my novels). The dominance of IBM rang so very true and took me straight back to my early programming career, when I watched Episode 1 of HCF.
    Part of the fiction here is actually the need to analyse the BIOS, as mentioned below by uzimonkey. I don't remember this, although I coded on an early IBM PC (being used to larger IBM machines), but I believe that hardcopy BIOS was actually shipped with some machines. (I wasn't interested in the BIOS at the time: I read about this in a retrospective written by an ex-IBMer or ex-Compaq creator.)
    Still my favourite tech TV show, is HCF. And yes, the most glaring technical boo-boo is when a mainframe terminal runs PC DOS, but never mind. Pure nostalgia. Love it.

  • @doubleeeeeee
    @doubleeeeeee 9 років тому +30

    thanks for the upload, this show is so good. my favourite scene so far

  • @The_Pariah
    @The_Pariah Рік тому +1

    HCF is a show I can watch over and over and never get tired of.
    It's actually one of the few shows/movies that I strongly prefer to have playing in the background while I, myself, code.
    Such an incredible and powerful series that geeks, like myself, can cannect with on a level that others can't.

  • @reflexindex267
    @reflexindex267 4 роки тому +33

    Strange how they showed him desolder a component that had a DIP socket. Then again most people watching this don't understand soldering.

  • @samirsinha1135
    @samirsinha1135 3 місяці тому

    I do like how they made Joe into something more than a salesperson and had some decent technical literacy. That scene from the S2 episode where he caught on to Mutiny's fake demo was another good example. He and Gordon really did respect each other even if they might've hated the other at times.

  • @devrim-oguz
    @devrim-oguz Рік тому +4

    Well, he managed to desolder a socketed chip 👏👏

    • @AMD1
      @AMD1 3 місяці тому +1

      AMC always over dramatizes everything and never thinks the audience will pick on on small to somewhat major details. We can tear this scene apart, but what I think they got right was the music. The synthesizer fits perfect.

  • @SithLordNefaar022
    @SithLordNefaar022 2 роки тому +2

    I need the scene at the end of this episode when the horde of IBM lawyers come into the office with that epic scene 🤯

  • @MrRaizada
    @MrRaizada 2 роки тому +5

    PC-DOS that came with this computer had something called "debug"... it had a command called "disassemble". You can disaasemble entire bios using debug. What even better, you can single step into bios by calling software interrupts and single step into the bios.

  • @6lucario
    @6lucario Рік тому +4

    1:30 why did he desolder the socket to take the chip out of the socket 😅

  • @miltonhowe2556
    @miltonhowe2556 4 роки тому +37

    Not very realistic - they would have been chainsmoking.

    • @silvercloud1641
      @silvercloud1641 2 роки тому +1

      😆

    • @captainjava1
      @captainjava1 2 роки тому

      That made me smile, but probably they wouldn't. Workplaces did allow smoking, but the generation who graduated from university in the 1970s tended not to smoke, at least in the UK. (Our parents smoked non-stop, of course.) The 1980s weren't the 1960s, although if you weren't around then, it probably all blurs into one.

  • @virtualinfinity6280
    @virtualinfinity6280 3 роки тому +21

    Hilarious, total Hollywood-style. Engineers would have put the PROM in a reader, push a button, viola, have it's contents. This is very VERY wrong in terms of reverse engineering. The REAL reverse-engineering process (as done by Compaq back in the day and others as well) was more like this:
    Team A: Gets an IBM PC, inspecting the machine from the inside out and writing everything in a specification - including documenting every call to the BIOS and the resulting actions (like read a block from floppy disc, etc). They actually poke every aspect of the machine as hard as they can, to catch everything
    Team B: Receives the specification. Members of this team are not from team A, never had contact with them. Likewise, not with IBM either. No IBM engineers here ;). Finally, that have never ever touched an IBM PC. This team then builds a machine from ground up to fulfil the specification. Likewise, they write a BIOS does does exactly do, what the specification says.
    In the end, you'll have a fully functional version of the IBM PC, that is legally not a copy. The reverse-engineering process is complete.

    • @PBurns-ng3gw
      @PBurns-ng3gw 3 роки тому +6

      You're right. Legally speaking, Team A and Team B aren't supposed to even know each other. Maybe the fact that these guys didn't know that and did everything themselves is the reason they got a visit from Big Blue later in the episode?

    • @adamgower4353
      @adamgower4353 3 роки тому +2

      But then where would all of the pretty blinking lights be?

    • @SimonBauer7
      @SimonBauer7 3 роки тому +1

      but thankfully big blue couldnt do shit about it otherwise we all wouldnt be rocking pcs today from different manufacturers

    • @adarshvatsa7395
      @adarshvatsa7395 2 роки тому +5

      This does happen in later episodes if you've seen the show.

    • @silvercloud1641
      @silvercloud1641 2 роки тому +1

      @@adamgower4353 Kind of like the movie Hackers. If all we saw was code, that would be pretty boring. But with the "cool graphics" it has longer lasting power, looks more interesting to the non computer literate, and gets more people interested in computers. If you want the "true story" check out Silicon Cowboys [History of Compaq]. If you want something based on "true events" that's also entertaining and fun to watch, this is it.

  • @pawelostaszewski8367
    @pawelostaszewski8367 7 років тому +11

    gosh score is lika tangerine dream at its best in 80'ties.. and yuppie guy remindes me jake from nightcrawler plus patric bateman

    • @EzeICE
      @EzeICE 7 років тому +5

      pawel ostaszewski awesome because Paul Haslinger is from Tangerine Dream. Joe does kinda look like a healthier version Lou Bloom from Nightcrawler...and 1980s bliss!!!

  • @Hiphopasaurus
    @Hiphopasaurus 2 роки тому +3

    The five IBM PC 8KiB ROMs were only 40,960 "addresses" (40KiB), not 65,536. The BIOS itself was only 8,192, the rest was BASIC (which they had no interest in). C'mon Hollywood, get it right!

  • @HattoSora
    @HattoSora 3 роки тому +4

    If it's repeatable, it's programmable. Work smarter, not harder.

  • @animaze86
    @animaze86 3 роки тому +13

    EPROM reader would have been much quicker lol

    • @SimonBauer7
      @SimonBauer7 3 роки тому +1

      where these a thing back then when they did it?

    • @henrahmagix
      @henrahmagix 3 роки тому +1

      @@SimonBauer7 yeah I'd like to know this too =)

    • @animaze86
      @animaze86 3 роки тому +1

      @@SimonBauer7 yeah man for sure that's how they would write and test the bios EPROM chips in development prior to production

    • @animaze86
      @animaze86 3 роки тому +1

      @@SimonBauer7 apparently the first EPROM device was '72 so by '83 they were very common

    • @reflexindex267
      @reflexindex267 2 роки тому

      @@SimonBauer7 In 1983 it's very likely. There were some programmers available for the commodore systems, maybe even the apple II, TRS-80 or even the IBM PC itself could interface with one and you could figure out what's going on with the ROM.

  • @phlimma
    @phlimma 5 місяців тому +1

    2:20 only 1 ONE fcking kilobyte. Today we have terabytes of data in our laptops.

  • @animaze86
    @animaze86 3 роки тому +15

    You don't have to desolder a socketed chip, just sayin' :)

    • @squirlmy
      @squirlmy 3 роки тому +8

      for that matter, bad code won't create sparks and trip a fuse for the lights.

    • @johnmcallister7833
      @johnmcallister7833 3 роки тому +6

      And for that matter, they could have just written a computer program that dumped the hex code from the chip 😂 I love the show but boy it’s not very accurate.

    • @johnmcallister7833
      @johnmcallister7833 3 роки тому +4

      @@squirlmy Yeah what on earth was up with that 😂 If you get a syntax error your whole computer just explodes??

    • @der.Schtefan
      @der.Schtefan 10 місяців тому

      Yes, it is sooo stupid!

    • @der.Schtefan
      @der.Schtefan 10 місяців тому

      @@johnmcallister7833 Exactly. The BIOS ROM has to be in the address range FFFFF0 for the reset vector on an Intel 8088, you can simply access that memory range and dump the last 8K (size of the ROM chip) into a file. Takes you 3 minutes to write and execute.

  • @CFSworks
    @CFSworks 2 роки тому +5

    As far as I can tell, everything in this scene does square 1:1 with reality. By that I mean: what they're shown doing does/did indeed work that way in real life.
    The scene falls short of being totally realistic, though, because the way they're dumping the chip is unnecessarily tedious and error-prone. It's a very "Rube Goldberg" way of getting the contents of the ROM: flashy and fun to look at but not practical.

    • @brunospasta
      @brunospasta Рік тому

      What would have been the "right" way to dump the chip contents?

    • @CFSworks
      @CFSworks Рік тому +4

      @@brunospasta Good: Gordon connects the data lines not to a bunch of LEDs but back to the Commodore(?) he's using to advance the addresses, so that it can just write the data straight to a file.
      Better: They put the BIOS chip in a (E)PROM programmer and have that dump it.
      Best: They leave the chip in the PC and run a program on that to save its contents to a file.

  • @jensmaa
    @jensmaa 9 років тому +40

    Why are they desoldering a socketed chip? :D

    • @teresamartinson7427
      @teresamartinson7427 6 років тому

      ikr

    • @brettsalling
      @brettsalling 5 років тому

      My thoughts exactly

    • @uzimonkey
      @uzimonkey 5 років тому +12

      Why are they manually transcribing the ROM contents when they could have dumped it from memory? Why are they only dumping one ROM chip which will have either only even or odd addresses (early IBM PCs used 2 ROM chips)? Why does the computer blow up at the end? Nothing makes sense here.

    • @madr1x
      @madr1x 5 років тому

      @@uzimonkey You cant dump it from memory, not everything is loaded to memory

    • @uzimonkey
      @uzimonkey 5 років тому +9

      @@madr1x The BIOS ROM (and BIOS extension ROM, such as the video BIOS commonly found in the C block of IBM PCs) chips are literally sitting on the memory bus, there is no "loading" to be done. If they can't be directly addressed then the computer cannot boot.

  • @xanthippe318
    @xanthippe318 2 роки тому

    Very inspirational I loved the scene a lot, thanks!

  • @nejir4439
    @nejir4439 2 роки тому +1

    why they don t use the debug program to disassemble the rom bios with
    U unassemble
    D dump

  • @sergey.soldatov
    @sergey.soldatov 10 місяців тому

    "Остановись и гори" серия 1
    история про Реверс-инжиниринг BIOS от IBM PC
    Гордон Кларк

  • @johnnycincocero
    @johnnycincocero 9 місяців тому

    Joe asked Gordon how many of these addresses do they need to transcribe. Gordon replies with 65,536. What would be that number today? Also, is it realistic or feasible to reverse a chip like they did in the show. I love this show.

  • @jameslay6505
    @jameslay6505 7 років тому +14

    0b1101 is 0xD, not 0xB. Am I missing something?

    • @pawcuqu
      @pawcuqu 6 років тому +4

      Same question here :D

    • @erhanvarlik
      @erhanvarlik 6 років тому

      yes, i thought the same :D

    • @jamiecowan6683
      @jamiecowan6683 6 років тому +3

      Given that they got E (1110) right, I'm guessing they must've muddled up 1101 with 1011 :P

    • @arm4life87
      @arm4life87 6 років тому +2

      i thought the same thing when i watched this episode

    • @gunpeidunkelheit4977
      @gunpeidunkelheit4977 6 років тому +3

      It appears they assembled the display backwards, like in 1101, an exact mirror of 0x1011. Hey, at least the show got it right somehow

  • @alexsinclair2012
    @alexsinclair2012 7 років тому +14

    They've only just begun in the reverse engineering process?
    Besides the ROM dump, They have to disassemble the program
    to decipher how it even runs. Then using a logic analyzer,
    decipher what address is responsible for which command...
    From a comment below, They diddn't even bother consulting
    the technical reference manual..

    • @nickbee5311
      @nickbee5311  7 років тому +5

      someone sound the nerd alarm:)

    • @alexsinclair2012
      @alexsinclair2012 7 років тому +1

      Nick, I'd consider myself more of a geek.
      "Nerd" IMO refers to the mainstream of techie know-it-alls
      like Linus Sebastian.

    • @teresamartinson7427
      @teresamartinson7427 5 років тому +3

      the moment you open the manual you can be sued for copyright.

    • @sundhaug92
      @sundhaug92 4 роки тому +4

      @@teresamartinson7427 No. What happened in reality was a two-step process. One team goes through the IBM BIOS and creates a specification, the other implements the specification. For liability-purposes, the second team should never have previously seen IBM code.

  • @uzimonkey
    @uzimonkey 5 років тому +12

    The computer came with a book that had full schematics and they could have dumped the ROM to disk with the debug program that was right there on the book disk. Nothing here makes any sense, but I guess that would have been a much less dramatic scene.
    I don't get why they're doing this though. The one thing they _can't_ legally copy is the BIOS ROM so why bother doing this at all?

    • @MohammedGamal87
      @MohammedGamal87 5 років тому +8

      They indeed couldn't legally do it, if you watch the rest of the season you'll know how they got around that.

    • @kenudice9841
      @kenudice9841 5 років тому +6

      I think the point was to get ahold of the operating system in order to get an idea of how a functioning operating system works, and more importantly, use it as a reference to make a similar one without violating copyrights.

    • @sundhaug92
      @sundhaug92 4 роки тому +4

      The word "copy" has two meanings. You can't redistribute a direct copy of the IBM BIOS, but you can redistribute a functional equivalent

    • @squirlmy
      @squirlmy 3 роки тому +5

      they had to make something that functions like the IBM BIOS, without looking at it themselves. The only way to do that is for one team to get the specification (and yes that team could dump the ROM), and the other team try to get the same BIOS results (booting into DOS) without any of IBM's original code. "The one thing they can't legally copy is the BIOS ROM" well yes, but BIOS is exactly what is needed to run programs!! Other companies like Digital did run slightly altered versions of MS-DOS which would only run a few of the applications made for PC-DOS. Reverse engineering a BIOS is extremely tedious, and this scene does dramatise just how tedious a job it was, while minimizing the suffering of the audience! Note also, Compaq's team ended up with a BIOS that was half the size of IBMs, and they were panicking the first few weeks, worried that they missed some important functionality from the original. Turns out they didn't. Just IBM's BOS code was crufty and bloated.

    • @kenudice9841
      @kenudice9841 2 роки тому +1

      @@squirlmy Sounds legit.🙃

  • @sundhaug92
    @sundhaug92 4 роки тому +8

    What happened in reality was a two-step process. One team goes through the IBM BIOS and creates a specification, the other implements the specification. For liability-purposes, the second team should never have previously seen IBM code.

    • @migueld2456
      @migueld2456 4 роки тому +5

      They do that in the show later on. This scene was only the extraction of the BIOS ROM. What I don't understand is why they do it by hand with a notebook and a breadboard. Didn't they have like a dumper or something like that?

    • @shanemshort
      @shanemshort 2 роки тому

      @@migueld2456 you’re assuming they were readily available at the time

    • @migueld2456
      @migueld2456 2 роки тому +1

      @@shanemshort I believe they were. If ROMs and other ICs existed, it is reasonable to assume a sequencial circuit that basically counts the addresses existed, especially since much more complex boards like entire microcomputers were readily available to the public. But correct me if I'm wrong.
      Heck you could connect the ROM to the parallel port of an IBM PC and bitbang a ROM dumper

  • @computeraidedworld1148
    @computeraidedworld1148 3 роки тому +6

    I loved this scene the first time I watched it. But I look back and there are little weird things.
    Why would you record the voltages of the chips
    why would you de solder a socketed chip
    why would getting the listing wrong blow a fuse in the house

    • @0neo
      @0neo 3 роки тому +2

      and why would the listing burn up the display lol

  • @-Engineering01-
    @-Engineering01- 4 роки тому +2

    i learned how to do this stuff maann,now im a fking reverse engineer too...

  • @DigitalPhage
    @DigitalPhage 9 років тому +6

    How about just get themselves a copy of the IBM Technical Refrence. Got a lising of the BIOS and schematics.

    • @jamiecowan6683
      @jamiecowan6683 6 років тому +12

      The context in the story is that they need to do it without that. Joe has worked for IBM and his intention with this, although you don't know at the time, is to a: get their attention, b: get someone to design a BIOS without doing any of this or looking at any tech references so they're legally clear and c: avoid the tech reference because they could then be charged for copyright infringement and sent to jail. In a later episode, IBM's lawyers sit a copy of it down in front of them and try to bait them into opening it so they can get them charged.

    • @squirlmy
      @squirlmy 3 роки тому +1

      @@jamiecowan6683 correct, a really good explanation. But the truth is that about half the engineers at Compaq were already familiar with IBM BIOS contents, they were just sent to work on BASIC while others reverse engineered the BIOS. BTW, Compaq's BIOS ended up only half as big as IBM's. They never figured out why IBM's was so much bigger and it gave them sleepless nights. Maybe it was mostly cruft, like maybe leftover code for booting other CPUs

    • @johnmcallister7833
      @johnmcallister7833 3 роки тому

      @@squirlmy I never knew that! That’s very interesting!

    • @andrewnerney2779
      @andrewnerney2779 3 роки тому

      @@squirlmy can't remember where, but I read an article that confirmed your suspicions. The IBM BIOS was full of a bunch of leftover junk, so the clean, reverse-engineered version was noticeably smaller.

  • @sundhaug92
    @sundhaug92 4 роки тому +1

    There are some inaccuracies here

  • @carlric
    @carlric 4 роки тому +2

    Why not using a rom reader and a hed editor?

  • @balintszarka4562
    @balintszarka4562 3 роки тому

    imádom!

  • @brianrodriguez6750
    @brianrodriguez6750 2 роки тому

    tin tin tin tin, Soy el fuego que arde tu piel, soy el agua que mata tu sed

  • @PeterSwinkels
    @PeterSwinkels 4 роки тому

    2:24 And there's no other way to transcribe that?

  • @deoxal7947
    @deoxal7947 6 років тому +1

    I'm sure there is a good reason for but I don't get why they couldn't read the boot code electronically.

    • @squirlmy
      @squirlmy 3 роки тому +4

      because they's be accused of copying it. They had to legally protect themselves by NOT looking at the boot code, and yet coming up with the same results- with an original boot code they came up with themselves. Pretending it is a black box (that's literally the term they'd use). A year later, Franklin Ace copied the Apple II boot ROM directly. They tried to argue copyright didn't apply to computer code, but 1984 Court Case by Apple found Franklin liable for copyright infringement and they had to pay Apple millions in addition to ending that line of hardware. Compaq could have taken chances, and used an engineer who knew just a little bit of code, but there's no way to know beforehand how much of the code must be different for a favorable court decision. The only way to be sure, is if no one working on it saw any of it beforehand.

    • @deoxal7947
      @deoxal7947 3 роки тому +3

      @@squirlmy I'm well aware of the history but he made a crude hex dumper with the LEDs. He could have gotten the same result reading the BIOS normally and nothing would have changed copyright wise.
      IBM PCs were really well documented actually. I guarnatee they didn't have to guess which chip was the EEPROM.

  • @joyeechen287
    @joyeechen287 9 місяців тому

    now try a neural network